@formant/data-sdk 1.78.1 → 1.78.3
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/dist/assets/DataFetchWorker-0a168933.js.map +1 -1
- package/dist/assets/{PcdLoaderWorker-eaac0b31.js.map → PcdLoaderWorker-6fe0da29.js.map} +1 -1
- package/dist/assets/ui-sdk-realtime-player-core-worker.umd-68a6e16a.js.map +1 -1
- package/dist/data-sdk.cjs.js +13 -13
- package/dist/data-sdk.cjs.js.map +1 -1
- package/dist/data-sdk.es.js +558 -553
- package/dist/data-sdk.es.js.map +1 -1
- package/dist/data-sdk.es6.js +558 -553
- package/dist/data-sdk.umd.js +13 -13
- package/package.json +1 -1
- package/CHANGELOG.md +0 -575
package/dist/data-sdk.es.js
CHANGED
|
@@ -241,9 +241,13 @@ class AuthenticationStore {
|
|
|
241
241
|
Authorization: "Bearer " + t
|
|
242
242
|
}
|
|
243
243
|
}), l = await g.json();
|
|
244
|
-
if (g.status
|
|
245
|
-
|
|
246
|
-
|
|
244
|
+
if (g.status === 404)
|
|
245
|
+
this._currentUser = void 0;
|
|
246
|
+
else {
|
|
247
|
+
if (g.status !== 200)
|
|
248
|
+
throw new Error(l.message);
|
|
249
|
+
this._currentUser = l;
|
|
250
|
+
}
|
|
247
251
|
}
|
|
248
252
|
this._token = t, this._waitingForAuth.forEach((g) => g(!0));
|
|
249
253
|
} catch (s) {
|
|
@@ -586,6 +590,7 @@ function addOverviewDeviceListener(e) {
|
|
|
586
590
|
return window.addEventListener("message", t), () => window.removeEventListener("message", t);
|
|
587
591
|
}
|
|
588
592
|
function _typeof(e) {
|
|
593
|
+
"@babel/helpers - typeof";
|
|
589
594
|
return _typeof = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
590
595
|
return typeof t;
|
|
591
596
|
} : function(t) {
|
|
@@ -1137,7 +1142,7 @@ async function prompt(e, t) {
|
|
|
1137
1142
|
window.addEventListener("message", o);
|
|
1138
1143
|
});
|
|
1139
1144
|
}
|
|
1140
|
-
const
|
|
1145
|
+
const Pe = class Pe {
|
|
1141
1146
|
static isModule() {
|
|
1142
1147
|
return getCurrentModuleContext() !== null;
|
|
1143
1148
|
}
|
|
@@ -1149,7 +1154,7 @@ const Yt = class {
|
|
|
1149
1154
|
return getModuleConfiguration(n.trim());
|
|
1150
1155
|
}
|
|
1151
1156
|
static get isOnline() {
|
|
1152
|
-
return
|
|
1157
|
+
return Pe._isOnline;
|
|
1153
1158
|
}
|
|
1154
1159
|
static listenForConnectionEvents() {
|
|
1155
1160
|
const t = (n) => {
|
|
@@ -1184,11 +1189,11 @@ const Yt = class {
|
|
|
1184
1189
|
return Promise.race([r, s()]);
|
|
1185
1190
|
}
|
|
1186
1191
|
};
|
|
1187
|
-
|
|
1188
|
-
he(
|
|
1189
|
-
he(
|
|
1190
|
-
he(
|
|
1191
|
-
|
|
1192
|
+
he(Pe, "getCurrentModuleContext", getCurrentModuleContext), // senders
|
|
1193
|
+
he(Pe, "disableAnalyticsBottomBar", disableAnalyticsBottomBar), he(Pe, "goToDevice", goToDevice), he(Pe, "goToTime", goToTime), he(Pe, "refreshAuthToken", refreshAuthToken), he(Pe, "requestModuleData", requestModuleData), he(Pe, "sendChannelData", sendChannelData), he(Pe, "setModuleDateTimeRange", setModuleDateTimeRange), he(Pe, "setupModuleMenus", setupModuleMenus), he(Pe, "showMessage", showMessage), // listeners
|
|
1194
|
+
he(Pe, "addAccessTokenRefreshListener", addAccessTokenRefreshListener), he(Pe, "addChannelDataListener", addChannelDataListener), he(Pe, "addMenuListener", addMenuListener), he(Pe, "addModuleConfigurationListener", addModuleConfigurationListener), he(Pe, "addModuleDataListener", addModuleDataListener), he(Pe, "addOverviewDeviceListener", addOverviewDeviceListener), he(Pe, "addStreamListener", addStreamListener), // bidirectional
|
|
1195
|
+
he(Pe, "getDate", getDate), he(Pe, "prompt", prompt), he(Pe, "_isOnline", null);
|
|
1196
|
+
let App = Pe;
|
|
1192
1197
|
function stringToArrayBuffer(e) {
|
|
1193
1198
|
return Uint8Array.from(base64Exports.decode(e), (t) => t.charCodeAt(0));
|
|
1194
1199
|
}
|
|
@@ -1482,21 +1487,21 @@ var dist = { exports: {} };
|
|
|
1482
1487
|
var te = K.match(B);
|
|
1483
1488
|
if (!te)
|
|
1484
1489
|
return /* @__PURE__ */ new Date(NaN);
|
|
1485
|
-
var oe = !!te[4], ge = M(te[1]), Se = M(te[2]) - 1, ve = M(te[3]), ye = M(te[4]),
|
|
1490
|
+
var oe = !!te[4], ge = M(te[1]), Se = M(te[2]) - 1, ve = M(te[3]), ye = M(te[4]), We = M(te[5]) - 1;
|
|
1486
1491
|
if (oe)
|
|
1487
|
-
return function(be,
|
|
1488
|
-
return
|
|
1489
|
-
}(0, ye,
|
|
1490
|
-
var
|
|
1491
|
-
|
|
1492
|
-
var
|
|
1493
|
-
return
|
|
1494
|
-
}(Y, ye,
|
|
1492
|
+
return function(be, Je, je) {
|
|
1493
|
+
return Je >= 1 && Je <= 53 && je >= 0 && je <= 6;
|
|
1494
|
+
}(0, ye, We) ? function(be, Je, je) {
|
|
1495
|
+
var Ae = /* @__PURE__ */ new Date(0);
|
|
1496
|
+
Ae.setUTCFullYear(be, 0, 4);
|
|
1497
|
+
var st = Ae.getUTCDay() || 7, bt = 7 * (Je - 1) + je + 1 - st;
|
|
1498
|
+
return Ae.setUTCDate(Ae.getUTCDate() + bt), Ae;
|
|
1499
|
+
}(Y, ye, We) : /* @__PURE__ */ new Date(NaN);
|
|
1495
1500
|
var Ee = /* @__PURE__ */ new Date(0);
|
|
1496
|
-
return function(be,
|
|
1497
|
-
return
|
|
1498
|
-
}(Y, Se, ve) && function(be,
|
|
1499
|
-
return
|
|
1501
|
+
return function(be, Je, je) {
|
|
1502
|
+
return Je >= 0 && Je <= 11 && je >= 1 && je <= (h[Je] || (T(be) ? 29 : 28));
|
|
1503
|
+
}(Y, Se, ve) && function(be, Je) {
|
|
1504
|
+
return Je >= 1 && Je <= (T(be) ? 366 : 365);
|
|
1500
1505
|
}(Y, ge) ? (Ee.setUTCFullYear(Y, Se, Math.max(ge, ve)), Ee) : /* @__PURE__ */ new Date(NaN);
|
|
1501
1506
|
}
|
|
1502
1507
|
function M(K) {
|
|
@@ -1549,19 +1554,19 @@ var dist = { exports: {} };
|
|
|
1549
1554
|
return /* @__PURE__ */ new Date(NaN);
|
|
1550
1555
|
var ve, ye = p(te);
|
|
1551
1556
|
if (ye.date) {
|
|
1552
|
-
var
|
|
1553
|
-
ve = E(
|
|
1557
|
+
var We = U(ye.date, Se);
|
|
1558
|
+
ve = E(We.restDateString, We.year);
|
|
1554
1559
|
}
|
|
1555
1560
|
if (!ve || isNaN(ve.getTime()))
|
|
1556
1561
|
return /* @__PURE__ */ new Date(NaN);
|
|
1557
|
-
var Ee, be = ve.getTime(),
|
|
1558
|
-
if (ye.time && (
|
|
1562
|
+
var Ee, be = ve.getTime(), Je = 0;
|
|
1563
|
+
if (ye.time && (Je = W(ye.time), isNaN(Je)))
|
|
1559
1564
|
return /* @__PURE__ */ new Date(NaN);
|
|
1560
1565
|
if (!ye.timezone) {
|
|
1561
|
-
var
|
|
1562
|
-
return
|
|
1566
|
+
var je = new Date(be + Je), Ae = /* @__PURE__ */ new Date(0);
|
|
1567
|
+
return Ae.setFullYear(je.getUTCFullYear(), je.getUTCMonth(), je.getUTCDate()), Ae.setHours(je.getUTCHours(), je.getUTCMinutes(), je.getUTCSeconds(), je.getUTCMilliseconds()), Ae;
|
|
1563
1568
|
}
|
|
1564
|
-
return Ee = m(ye.timezone), isNaN(Ee) ? /* @__PURE__ */ new Date(NaN) : new Date(be +
|
|
1569
|
+
return Ee = m(ye.timezone), isNaN(Ee) ? /* @__PURE__ */ new Date(NaN) : new Date(be + Je + Ee);
|
|
1565
1570
|
}(K);
|
|
1566
1571
|
if (!function(te) {
|
|
1567
1572
|
if (u(1, arguments), !X(te) && typeof te != "number")
|
|
@@ -1589,7 +1594,7 @@ var dist = { exports: {} };
|
|
|
1589
1594
|
return te;
|
|
1590
1595
|
};
|
|
1591
1596
|
function v(K, Y = {}) {
|
|
1592
|
-
const { redacted: te = !0 } = Y, oe = (
|
|
1597
|
+
const { redacted: te = !0 } = Y, oe = (We) => te ? Object(j.a)(We) : We;
|
|
1593
1598
|
if (!K.stack)
|
|
1594
1599
|
return { message: C(oe(K)) };
|
|
1595
1600
|
const { name: ge, message: Se, stack: ve } = K, ye = J(K, ["name", "message", "stack"]);
|
|
@@ -1605,25 +1610,25 @@ var dist = { exports: {} };
|
|
|
1605
1610
|
return new (te || (te = Promise))(function(ge, Se) {
|
|
1606
1611
|
function ve(Ee) {
|
|
1607
1612
|
try {
|
|
1608
|
-
|
|
1613
|
+
We(oe.next(Ee));
|
|
1609
1614
|
} catch (be) {
|
|
1610
1615
|
Se(be);
|
|
1611
1616
|
}
|
|
1612
1617
|
}
|
|
1613
1618
|
function ye(Ee) {
|
|
1614
1619
|
try {
|
|
1615
|
-
|
|
1620
|
+
We(oe.throw(Ee));
|
|
1616
1621
|
} catch (be) {
|
|
1617
1622
|
Se(be);
|
|
1618
1623
|
}
|
|
1619
1624
|
}
|
|
1620
|
-
function
|
|
1625
|
+
function We(Ee) {
|
|
1621
1626
|
var be;
|
|
1622
|
-
Ee.done ? ge(Ee.value) : (be = Ee.value, be instanceof te ? be : new te(function(
|
|
1623
|
-
|
|
1627
|
+
Ee.done ? ge(Ee.value) : (be = Ee.value, be instanceof te ? be : new te(function(Je) {
|
|
1628
|
+
Je(be);
|
|
1624
1629
|
})).then(ve, ye);
|
|
1625
1630
|
}
|
|
1626
|
-
|
|
1631
|
+
We((oe = oe.apply(K, Y || [])).next());
|
|
1627
1632
|
});
|
|
1628
1633
|
}, ee = function(K, Y) {
|
|
1629
1634
|
var te = {};
|
|
@@ -1977,8 +1982,8 @@ var dist = { exports: {} };
|
|
|
1977
1982
|
return -1;
|
|
1978
1983
|
oe = 2, ge /= 2, Se /= 2, G /= 2;
|
|
1979
1984
|
}
|
|
1980
|
-
function ve(be,
|
|
1981
|
-
return oe === 1 ? be[
|
|
1985
|
+
function ve(be, Je) {
|
|
1986
|
+
return oe === 1 ? be[Je] : be.readUInt16BE(Je * oe);
|
|
1982
1987
|
}
|
|
1983
1988
|
if (Y) {
|
|
1984
1989
|
var ye = -1;
|
|
@@ -1990,12 +1995,12 @@ var dist = { exports: {} };
|
|
|
1990
1995
|
ye !== -1 && (te -= te - ye), ye = -1;
|
|
1991
1996
|
} else
|
|
1992
1997
|
for (G + Se > ge && (G = ge - Se), te = G; te >= 0; te--) {
|
|
1993
|
-
for (var
|
|
1998
|
+
for (var We = !0, Ee = 0; Ee < Se; Ee++)
|
|
1994
1999
|
if (ve(S, te + Ee) !== ve(V, Ee)) {
|
|
1995
|
-
|
|
2000
|
+
We = !1;
|
|
1996
2001
|
break;
|
|
1997
2002
|
}
|
|
1998
|
-
if (
|
|
2003
|
+
if (We)
|
|
1999
2004
|
return te;
|
|
2000
2005
|
}
|
|
2001
2006
|
return -1;
|
|
@@ -2045,9 +2050,9 @@ var dist = { exports: {} };
|
|
|
2045
2050
|
function x(S, V, G) {
|
|
2046
2051
|
G = Math.min(S.length, G);
|
|
2047
2052
|
for (var K = [], Y = V; Y < G; ) {
|
|
2048
|
-
var te, oe, ge, Se, ve = S[Y], ye = null,
|
|
2049
|
-
if (Y +
|
|
2050
|
-
switch (
|
|
2053
|
+
var te, oe, ge, Se, ve = S[Y], ye = null, We = ve > 239 ? 4 : ve > 223 ? 3 : ve > 191 ? 2 : 1;
|
|
2054
|
+
if (Y + We <= G)
|
|
2055
|
+
switch (We) {
|
|
2051
2056
|
case 1:
|
|
2052
2057
|
ve < 128 && (ye = ve);
|
|
2053
2058
|
break;
|
|
@@ -2060,15 +2065,15 @@ var dist = { exports: {} };
|
|
|
2060
2065
|
case 4:
|
|
2061
2066
|
te = S[Y + 1], oe = S[Y + 2], ge = S[Y + 3], (192 & te) == 128 && (192 & oe) == 128 && (192 & ge) == 128 && (Se = (15 & ve) << 18 | (63 & te) << 12 | (63 & oe) << 6 | 63 & ge) > 65535 && Se < 1114112 && (ye = Se);
|
|
2062
2067
|
}
|
|
2063
|
-
ye === null ? (ye = 65533,
|
|
2068
|
+
ye === null ? (ye = 65533, We = 1) : ye > 65535 && (ye -= 65536, K.push(ye >>> 10 & 1023 | 55296), ye = 56320 | 1023 & ye), K.push(ye), Y += We;
|
|
2064
2069
|
}
|
|
2065
2070
|
return function(Ee) {
|
|
2066
2071
|
var be = Ee.length;
|
|
2067
2072
|
if (be <= 4096)
|
|
2068
2073
|
return String.fromCharCode.apply(String, Ee);
|
|
2069
|
-
for (var
|
|
2070
|
-
|
|
2071
|
-
return
|
|
2074
|
+
for (var Je = "", je = 0; je < be; )
|
|
2075
|
+
Je += String.fromCharCode.apply(String, Ee.slice(je, je += 4096));
|
|
2076
|
+
return Je;
|
|
2072
2077
|
}(K);
|
|
2073
2078
|
}
|
|
2074
2079
|
t.Buffer = c, t.SlowBuffer = function(S) {
|
|
@@ -4100,19 +4105,19 @@ Found: `.concat(W.toString().split(`
|
|
|
4100
4105
|
Be.reject(Te);
|
|
4101
4106
|
}
|
|
4102
4107
|
}, H.prototype.then = function(de, Qe) {
|
|
4103
|
-
function Be(
|
|
4104
|
-
return typeof
|
|
4108
|
+
function Be(Me, Ie) {
|
|
4109
|
+
return typeof Me == "function" ? function(xe) {
|
|
4105
4110
|
try {
|
|
4106
|
-
Te(
|
|
4107
|
-
} catch (
|
|
4108
|
-
_e(
|
|
4111
|
+
Te(Me(xe));
|
|
4112
|
+
} catch (we) {
|
|
4113
|
+
_e(we);
|
|
4109
4114
|
}
|
|
4110
|
-
} :
|
|
4115
|
+
} : Ie;
|
|
4111
4116
|
}
|
|
4112
|
-
var Te, _e,
|
|
4113
|
-
Te =
|
|
4117
|
+
var Te, _e, Ce = new H(function(Me, Ie) {
|
|
4118
|
+
Te = Me, _e = Ie;
|
|
4114
4119
|
});
|
|
4115
|
-
return this.F(Be(de, Te), Be(Qe, _e)),
|
|
4120
|
+
return this.F(Be(de, Te), Be(Qe, _e)), Ce;
|
|
4116
4121
|
}, H.prototype.catch = function(de) {
|
|
4117
4122
|
return this.then(void 0, de);
|
|
4118
4123
|
}, H.prototype.F = function(de, Qe) {
|
|
@@ -4142,14 +4147,14 @@ Found: `.concat(W.toString().split(`
|
|
|
4142
4147
|
}, H.all = function(de) {
|
|
4143
4148
|
var Qe = f(de), Be = Qe.next();
|
|
4144
4149
|
return Be.done ? ae([]) : new H(function(Te, _e) {
|
|
4145
|
-
function
|
|
4146
|
-
return function(
|
|
4147
|
-
|
|
4150
|
+
function Ce(xe) {
|
|
4151
|
+
return function(we) {
|
|
4152
|
+
Me[xe] = we, --Ie == 0 && Te(Me);
|
|
4148
4153
|
};
|
|
4149
4154
|
}
|
|
4150
|
-
var
|
|
4155
|
+
var Me = [], Ie = 0;
|
|
4151
4156
|
do
|
|
4152
|
-
|
|
4157
|
+
Me.push(void 0), Ie++, ae(Be.value).F(Ce(Me.length - 1), _e), Be = Qe.next();
|
|
4153
4158
|
while (!Be.done);
|
|
4154
4159
|
});
|
|
4155
4160
|
}, H;
|
|
@@ -4299,7 +4304,7 @@ Found: `.concat(W.toString().split(`
|
|
|
4299
4304
|
K = "";
|
|
4300
4305
|
}
|
|
4301
4306
|
var ye = "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
|
|
4302
|
-
function
|
|
4307
|
+
function We(N) {
|
|
4303
4308
|
var H = 1;
|
|
4304
4309
|
N = N.split(":");
|
|
4305
4310
|
for (var ne = []; 0 < H && N.length; )
|
|
@@ -4310,22 +4315,22 @@ Found: `.concat(W.toString().split(`
|
|
|
4310
4315
|
return Ee[" "](N), N;
|
|
4311
4316
|
}
|
|
4312
4317
|
Ee[" "] = X;
|
|
4313
|
-
var be,
|
|
4318
|
+
var be, Je, je = oe(K, "Opera"), Ae = oe(K, "Trident") || oe(K, "MSIE"), st = oe(K, "Edge"), bt = oe(K, "Gecko") && !(oe(K.toLowerCase(), "webkit") && !oe(K, "Edge")) && !(oe(K, "Trident") || oe(K, "MSIE")) && !oe(K, "Edge"), Jt = oe(K.toLowerCase(), "webkit") && !oe(K, "Edge");
|
|
4314
4319
|
e: {
|
|
4315
|
-
var
|
|
4316
|
-
if (
|
|
4317
|
-
var
|
|
4318
|
-
if ((
|
|
4319
|
-
be = String(
|
|
4320
|
+
var Et = "", ct = (Je = K, bt ? /rv:([^\);]+)(\)|;)/.exec(Je) : st ? /Edge\/([\d\.]+)/.exec(Je) : Ae ? /\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(Je) : Jt ? /WebKit\/(\S+)/.exec(Je) : je ? /(?:Version)[ \/]?(\S+)/.exec(Je) : void 0);
|
|
4321
|
+
if (ct && (Et = ct ? ct[1] : ""), Ae) {
|
|
4322
|
+
var Tt, lt = T.document;
|
|
4323
|
+
if ((Tt = lt ? lt.documentMode : void 0) != null && Tt > parseFloat(Et)) {
|
|
4324
|
+
be = String(Tt);
|
|
4320
4325
|
break e;
|
|
4321
4326
|
}
|
|
4322
4327
|
}
|
|
4323
|
-
be =
|
|
4328
|
+
be = Et;
|
|
4324
4329
|
}
|
|
4325
|
-
var
|
|
4326
|
-
function
|
|
4330
|
+
var vt = {};
|
|
4331
|
+
function Ut() {
|
|
4327
4332
|
return function(N) {
|
|
4328
|
-
var H =
|
|
4333
|
+
var H = vt;
|
|
4329
4334
|
return Object.prototype.hasOwnProperty.call(H, 9) ? H[9] : H[9] = N(9);
|
|
4330
4335
|
}(function() {
|
|
4331
4336
|
for (var N = 0, H = te(String(be)).split("."), ne = te("9").split("."), ae = Math.max(H.length, ne.length), pe = 0; N == 0 && pe < ae; pe++) {
|
|
@@ -4339,20 +4344,20 @@ Found: `.concat(W.toString().split(`
|
|
|
4339
4344
|
return 0 <= N;
|
|
4340
4345
|
});
|
|
4341
4346
|
}
|
|
4342
|
-
function
|
|
4347
|
+
function _t() {
|
|
4343
4348
|
this.K = this.K;
|
|
4344
4349
|
}
|
|
4345
|
-
|
|
4346
|
-
var
|
|
4350
|
+
_t.prototype.K = !1;
|
|
4351
|
+
var At = Object.freeze || function(N) {
|
|
4347
4352
|
return N;
|
|
4348
4353
|
};
|
|
4349
|
-
function
|
|
4354
|
+
function dt(N, H) {
|
|
4350
4355
|
this.type = N, this.a = this.target = H, this.defaultPrevented = !1;
|
|
4351
4356
|
}
|
|
4352
|
-
|
|
4357
|
+
dt.prototype.b = function() {
|
|
4353
4358
|
this.defaultPrevented = !0;
|
|
4354
4359
|
};
|
|
4355
|
-
var
|
|
4360
|
+
var Oe = function() {
|
|
4356
4361
|
if (!T.addEventListener || !Object.defineProperty)
|
|
4357
4362
|
return !1;
|
|
4358
4363
|
var N = !1, H = Object.defineProperty({}, "passive", { get: function() {
|
|
@@ -4364,11 +4369,11 @@ Found: `.concat(W.toString().split(`
|
|
|
4364
4369
|
}
|
|
4365
4370
|
return N;
|
|
4366
4371
|
}();
|
|
4367
|
-
function
|
|
4368
|
-
if (
|
|
4372
|
+
function ft(N, H) {
|
|
4373
|
+
if (dt.call(this, N ? N.type : ""), this.relatedTarget = this.a = this.target = null, this.button = this.screenY = this.screenX = this.clientY = this.clientX = 0, this.key = "", this.metaKey = this.shiftKey = this.altKey = this.ctrlKey = !1, this.pointerId = 0, this.pointerType = "", this.c = null, N) {
|
|
4369
4374
|
var ne = this.type = N.type, ae = N.changedTouches && N.changedTouches.length ? N.changedTouches[0] : null;
|
|
4370
4375
|
if (this.target = N.target || N.srcElement, this.a = H, H = N.relatedTarget) {
|
|
4371
|
-
if (
|
|
4376
|
+
if (bt) {
|
|
4372
4377
|
e: {
|
|
4373
4378
|
try {
|
|
4374
4379
|
Ee(H.nodeName);
|
|
@@ -4382,34 +4387,34 @@ Found: `.concat(W.toString().split(`
|
|
|
4382
4387
|
}
|
|
4383
4388
|
} else
|
|
4384
4389
|
ne == "mouseover" ? H = N.fromElement : ne == "mouseout" && (H = N.toElement);
|
|
4385
|
-
this.relatedTarget = H, ae ? (this.clientX = ae.clientX !== void 0 ? ae.clientX : ae.pageX, this.clientY = ae.clientY !== void 0 ? ae.clientY : ae.pageY, this.screenX = ae.screenX || 0, this.screenY = ae.screenY || 0) : (this.clientX = N.clientX !== void 0 ? N.clientX : N.pageX, this.clientY = N.clientY !== void 0 ? N.clientY : N.pageY, this.screenX = N.screenX || 0, this.screenY = N.screenY || 0), this.button = N.button, this.key = N.key || "", this.ctrlKey = N.ctrlKey, this.altKey = N.altKey, this.shiftKey = N.shiftKey, this.metaKey = N.metaKey, this.pointerId = N.pointerId || 0, this.pointerType = typeof N.pointerType == "string" ? N.pointerType :
|
|
4390
|
+
this.relatedTarget = H, ae ? (this.clientX = ae.clientX !== void 0 ? ae.clientX : ae.pageX, this.clientY = ae.clientY !== void 0 ? ae.clientY : ae.pageY, this.screenX = ae.screenX || 0, this.screenY = ae.screenY || 0) : (this.clientX = N.clientX !== void 0 ? N.clientX : N.pageX, this.clientY = N.clientY !== void 0 ? N.clientY : N.pageY, this.screenX = N.screenX || 0, this.screenY = N.screenY || 0), this.button = N.button, this.key = N.key || "", this.ctrlKey = N.ctrlKey, this.altKey = N.altKey, this.shiftKey = N.shiftKey, this.metaKey = N.metaKey, this.pointerId = N.pointerId || 0, this.pointerType = typeof N.pointerType == "string" ? N.pointerType : xt[N.pointerType] || "", this.c = N, N.defaultPrevented && ft.O.b.call(this);
|
|
4386
4391
|
}
|
|
4387
4392
|
}
|
|
4388
|
-
_(
|
|
4389
|
-
var
|
|
4390
|
-
|
|
4391
|
-
|
|
4393
|
+
_(ft, dt);
|
|
4394
|
+
var xt = At({ 2: "touch", 3: "pen", 4: "mouse" });
|
|
4395
|
+
ft.prototype.b = function() {
|
|
4396
|
+
ft.O.b.call(this);
|
|
4392
4397
|
var N = this.c;
|
|
4393
4398
|
N.preventDefault ? N.preventDefault() : N.returnValue = !1;
|
|
4394
4399
|
};
|
|
4395
|
-
var
|
|
4396
|
-
function
|
|
4397
|
-
this.listener = N, this.proxy = null, this.src = H, this.type = ne, this.capture = !!ae, this.H = pe, this.key = ++
|
|
4400
|
+
var rt = "closure_listenable_" + (1e6 * Math.random() | 0), Ft = 0;
|
|
4401
|
+
function Lt(N, H, ne, ae, pe) {
|
|
4402
|
+
this.listener = N, this.proxy = null, this.src = H, this.type = ne, this.capture = !!ae, this.H = pe, this.key = ++Ft, this.A = this.D = !1;
|
|
4398
4403
|
}
|
|
4399
|
-
function
|
|
4404
|
+
function Wt(N) {
|
|
4400
4405
|
N.A = !0, N.listener = null, N.proxy = null, N.src = null, N.H = null;
|
|
4401
4406
|
}
|
|
4402
|
-
function
|
|
4407
|
+
function Qt(N) {
|
|
4403
4408
|
this.src = N, this.a = {}, this.b = 0;
|
|
4404
4409
|
}
|
|
4405
|
-
function
|
|
4410
|
+
function ot(N, H) {
|
|
4406
4411
|
var ne = H.type;
|
|
4407
4412
|
if (ne in N.a) {
|
|
4408
4413
|
var ae, pe = N.a[ne], Fe = Y(pe, H);
|
|
4409
|
-
(ae = 0 <= Fe) && Array.prototype.splice.call(pe, Fe, 1), ae && (
|
|
4414
|
+
(ae = 0 <= Fe) && Array.prototype.splice.call(pe, Fe, 1), ae && (Wt(H), N.a[ne].length == 0 && (delete N.a[ne], N.b--));
|
|
4410
4415
|
}
|
|
4411
4416
|
}
|
|
4412
|
-
function
|
|
4417
|
+
function Ct(N, H, ne, ae) {
|
|
4413
4418
|
for (var pe = 0; pe < N.length; ++pe) {
|
|
4414
4419
|
var Fe = N[pe];
|
|
4415
4420
|
if (!Fe.A && Fe.listener == H && Fe.capture == !!ne && Fe.H == ae)
|
|
@@ -4417,45 +4422,45 @@ Found: `.concat(W.toString().split(`
|
|
|
4417
4422
|
}
|
|
4418
4423
|
return -1;
|
|
4419
4424
|
}
|
|
4420
|
-
|
|
4425
|
+
Qt.prototype.add = function(N, H, ne, ae, pe) {
|
|
4421
4426
|
var Fe = N.toString();
|
|
4422
4427
|
(N = this.a[Fe]) || (N = this.a[Fe] = [], this.b++);
|
|
4423
|
-
var de =
|
|
4424
|
-
return -1 < de ? (H = N[de], ne || (H.D = !1)) : ((H = new
|
|
4425
|
-
},
|
|
4428
|
+
var de = Ct(N, H, ae, pe);
|
|
4429
|
+
return -1 < de ? (H = N[de], ne || (H.D = !1)) : ((H = new Lt(H, this.src, Fe, !!ae, pe)).D = ne, N.push(H)), H;
|
|
4430
|
+
}, Qt.prototype.remove = function(N, H, ne, ae) {
|
|
4426
4431
|
if (!((N = N.toString()) in this.a))
|
|
4427
4432
|
return !1;
|
|
4428
4433
|
var pe = this.a[N];
|
|
4429
|
-
return -1 < (H =
|
|
4434
|
+
return -1 < (H = Ct(pe, H, ne, ae)) && (Wt(pe[H]), Array.prototype.splice.call(pe, H, 1), pe.length == 0 && (delete this.a[N], this.b--), !0);
|
|
4430
4435
|
};
|
|
4431
|
-
var
|
|
4436
|
+
var Ze = "closure_lm_" + (1e6 * Math.random() | 0), kt = {};
|
|
4432
4437
|
function Re(N, H, ne, ae, pe) {
|
|
4433
4438
|
if (ae && ae.once)
|
|
4434
|
-
(function de(Qe, Be, Te, _e,
|
|
4439
|
+
(function de(Qe, Be, Te, _e, Ce) {
|
|
4435
4440
|
if (Array.isArray(Be))
|
|
4436
|
-
for (var
|
|
4437
|
-
de(Qe, Be[
|
|
4441
|
+
for (var Me = 0; Me < Be.length; Me++)
|
|
4442
|
+
de(Qe, Be[Me], Te, _e, Ce);
|
|
4438
4443
|
else
|
|
4439
|
-
Te = fe(Te), Qe && Qe[
|
|
4444
|
+
Te = fe(Te), Qe && Qe[rt] ? Qe.f.add(String(Be), Te, !0, F(_e) ? !!_e.capture : !!_e, Ce) : Z(Qe, Be, Te, !0, _e, Ce);
|
|
4440
4445
|
})(N, H, ne, ae, pe);
|
|
4441
4446
|
else if (Array.isArray(H))
|
|
4442
4447
|
for (var Fe = 0; Fe < H.length; Fe++)
|
|
4443
4448
|
Re(N, H[Fe], ne, ae, pe);
|
|
4444
4449
|
else
|
|
4445
|
-
ne = fe(ne), N && N[
|
|
4450
|
+
ne = fe(ne), N && N[rt] ? N.f.add(String(H), ne, !1, F(ae) ? !!ae.capture : !!ae, pe) : Z(N, H, ne, !1, ae, pe);
|
|
4446
4451
|
}
|
|
4447
4452
|
function Z(N, H, ne, ae, pe, Fe) {
|
|
4448
4453
|
if (!H)
|
|
4449
4454
|
throw Error("Invalid event type");
|
|
4450
4455
|
var de = F(pe) ? !!pe.capture : !!pe, Qe = se(N);
|
|
4451
|
-
if (Qe || (N[
|
|
4456
|
+
if (Qe || (N[Ze] = Qe = new Qt(N)), !(ne = Qe.add(H, ne, ae, de, Fe)).proxy)
|
|
4452
4457
|
if (ae = function() {
|
|
4453
4458
|
var Be = ie;
|
|
4454
4459
|
return function Te(_e) {
|
|
4455
4460
|
return Be.call(Te.src, Te.listener, _e);
|
|
4456
4461
|
};
|
|
4457
4462
|
}(), ne.proxy = ae, ae.src = N, ae.listener = ne, N.addEventListener)
|
|
4458
|
-
|
|
4463
|
+
Oe || (pe = de), pe === void 0 && (pe = !1), N.addEventListener(H.toString(), ae, pe);
|
|
4459
4464
|
else if (N.attachEvent)
|
|
4460
4465
|
N.attachEvent(q(H.toString()), ae);
|
|
4461
4466
|
else {
|
|
@@ -4467,29 +4472,29 @@ Found: `.concat(W.toString().split(`
|
|
|
4467
4472
|
function L(N) {
|
|
4468
4473
|
if (typeof N != "number" && N && !N.A) {
|
|
4469
4474
|
var H = N.src;
|
|
4470
|
-
if (H && H[
|
|
4471
|
-
|
|
4475
|
+
if (H && H[rt])
|
|
4476
|
+
ot(H.f, N);
|
|
4472
4477
|
else {
|
|
4473
4478
|
var ne = N.type, ae = N.proxy;
|
|
4474
|
-
H.removeEventListener ? H.removeEventListener(ne, ae, N.capture) : H.detachEvent ? H.detachEvent(q(ne), ae) : H.addListener && H.removeListener && H.removeListener(ae), (ne = se(H)) ? (
|
|
4479
|
+
H.removeEventListener ? H.removeEventListener(ne, ae, N.capture) : H.detachEvent ? H.detachEvent(q(ne), ae) : H.addListener && H.removeListener && H.removeListener(ae), (ne = se(H)) ? (ot(ne, N), ne.b == 0 && (ne.src = null, H[Ze] = null)) : Wt(N);
|
|
4475
4480
|
}
|
|
4476
4481
|
}
|
|
4477
4482
|
}
|
|
4478
4483
|
function q(N) {
|
|
4479
|
-
return N in
|
|
4484
|
+
return N in kt ? kt[N] : kt[N] = "on" + N;
|
|
4480
4485
|
}
|
|
4481
4486
|
function ie(N, H) {
|
|
4482
4487
|
if (N.A)
|
|
4483
4488
|
N = !0;
|
|
4484
4489
|
else {
|
|
4485
|
-
H = new
|
|
4490
|
+
H = new ft(H, this);
|
|
4486
4491
|
var ne = N.listener, ae = N.H || N.src;
|
|
4487
4492
|
N.D && L(N), N = ne.call(ae, H);
|
|
4488
4493
|
}
|
|
4489
4494
|
return N;
|
|
4490
4495
|
}
|
|
4491
4496
|
function se(N) {
|
|
4492
|
-
return (N = N[
|
|
4497
|
+
return (N = N[Ze]) instanceof Qt ? N : null;
|
|
4493
4498
|
}
|
|
4494
4499
|
var ue = "__closure_events_fn_" + (1e9 * Math.random() >>> 0);
|
|
4495
4500
|
function fe(N) {
|
|
@@ -4498,14 +4503,14 @@ Found: `.concat(W.toString().split(`
|
|
|
4498
4503
|
}), N[ue]);
|
|
4499
4504
|
}
|
|
4500
4505
|
function Ue() {
|
|
4501
|
-
|
|
4506
|
+
_t.call(this), this.f = new Qt(this), this.U = this;
|
|
4502
4507
|
}
|
|
4503
4508
|
function ce(N, H) {
|
|
4504
4509
|
N = N.U;
|
|
4505
4510
|
var ne = H.type || H;
|
|
4506
4511
|
if (typeof H == "string")
|
|
4507
|
-
H = new
|
|
4508
|
-
else if (H instanceof
|
|
4512
|
+
H = new dt(H, N);
|
|
4513
|
+
else if (H instanceof dt)
|
|
4509
4514
|
H.target = H.target || N;
|
|
4510
4515
|
else {
|
|
4511
4516
|
var ae = H;
|
|
@@ -4516,7 +4521,7 @@ Found: `.concat(W.toString().split(`
|
|
|
4516
4521
|
for (var Te = 0; Te < ye.length; Te++)
|
|
4517
4522
|
de = ye[Te], Object.prototype.hasOwnProperty.call(Qe, de) && (pe[de] = Qe[de]);
|
|
4518
4523
|
}
|
|
4519
|
-
})(H = new
|
|
4524
|
+
})(H = new dt(ne, N), ae);
|
|
4520
4525
|
}
|
|
4521
4526
|
le(N = H.a = N, ne, !0, H), le(N, ne, !1, H);
|
|
4522
4527
|
}
|
|
@@ -4527,12 +4532,12 @@ Found: `.concat(W.toString().split(`
|
|
|
4527
4532
|
var de = H[Fe];
|
|
4528
4533
|
if (de && !de.A && de.capture == ne) {
|
|
4529
4534
|
var Qe = de.listener, Be = de.H || de.src;
|
|
4530
|
-
de.D &&
|
|
4535
|
+
de.D && ot(N.f, de), pe = Qe.call(Be, ae) !== !1 && pe;
|
|
4531
4536
|
}
|
|
4532
4537
|
}
|
|
4533
4538
|
}
|
|
4534
4539
|
}
|
|
4535
|
-
_(Ue,
|
|
4540
|
+
_(Ue, _t), Ue.prototype[rt] = !0, Ue.prototype.addEventListener = function(N, H, ne, ae) {
|
|
4536
4541
|
Re(this, N, H, ne, ae);
|
|
4537
4542
|
}, Ue.prototype.removeEventListener = function(N, H, ne, ae) {
|
|
4538
4543
|
(function pe(Fe, de, Qe, Be, Te) {
|
|
@@ -4540,7 +4545,7 @@ Found: `.concat(W.toString().split(`
|
|
|
4540
4545
|
for (var _e = 0; _e < de.length; _e++)
|
|
4541
4546
|
pe(Fe, de[_e], Qe, Be, Te);
|
|
4542
4547
|
else
|
|
4543
|
-
Be = F(Be) ? !!Be.capture : !!Be, Qe = fe(Qe), Fe && Fe[
|
|
4548
|
+
Be = F(Be) ? !!Be.capture : !!Be, Qe = fe(Qe), Fe && Fe[rt] ? Fe.f.remove(String(de), Qe, Be, Te) : Fe && (Fe = se(Fe)) && (de = Fe.a[de.toString()], Fe = -1, de && (Fe = Ct(de, Qe, Be, Te)), (Qe = -1 < Fe ? de[Fe] : null) && L(Qe));
|
|
4544
4549
|
})(this, N, H, ne, ae);
|
|
4545
4550
|
};
|
|
4546
4551
|
var me = T;
|
|
@@ -4554,56 +4559,56 @@ Found: `.concat(W.toString().split(`
|
|
|
4554
4559
|
}
|
|
4555
4560
|
return 2147483647 < Number(H) ? -1 : me.setTimeout(N, H || 0);
|
|
4556
4561
|
}
|
|
4557
|
-
function
|
|
4562
|
+
function ke(N, H) {
|
|
4558
4563
|
this.name = N, this.value = H;
|
|
4559
4564
|
}
|
|
4560
|
-
|
|
4565
|
+
ke.prototype.toString = function() {
|
|
4561
4566
|
return this.name;
|
|
4562
4567
|
};
|
|
4563
|
-
var
|
|
4564
|
-
function
|
|
4568
|
+
var Le, Xe, Ke, et = new ke("OFF", 1 / 0), ze = new ke("SEVERE", 1e3), De = new ke("CONFIG", 700), Ge = new ke("FINE", 500);
|
|
4569
|
+
function He() {
|
|
4565
4570
|
this.clear();
|
|
4566
4571
|
}
|
|
4567
|
-
function
|
|
4568
|
-
this.reset(N ||
|
|
4572
|
+
function $e(N, H, ne) {
|
|
4573
|
+
this.reset(N || et, H, ne, void 0, void 0);
|
|
4569
4574
|
}
|
|
4570
|
-
function
|
|
4575
|
+
function Bt(N, H) {
|
|
4571
4576
|
this.a = null, this.f = [], this.b = (H === void 0 ? null : H) || null, this.c = [], this.g = { getName: function() {
|
|
4572
4577
|
return N;
|
|
4573
4578
|
} };
|
|
4574
4579
|
}
|
|
4575
|
-
function
|
|
4576
|
-
return N.a ? N.a : N.b ?
|
|
4580
|
+
function qe(N) {
|
|
4581
|
+
return N.a ? N.a : N.b ? qe(N.b) : (function(H, ne) {
|
|
4577
4582
|
throw new z("Failure" + (H ? ": " + H : ""), Array.prototype.slice.call(arguments, 1));
|
|
4578
|
-
}("Root logger has no level set."),
|
|
4583
|
+
}("Root logger has no level set."), et);
|
|
4579
4584
|
}
|
|
4580
|
-
function
|
|
4585
|
+
function tt() {
|
|
4581
4586
|
this.entries = {};
|
|
4582
|
-
var N = new
|
|
4583
|
-
N.a =
|
|
4587
|
+
var N = new Bt("");
|
|
4588
|
+
N.a = De, this.entries[""] = N;
|
|
4584
4589
|
}
|
|
4585
|
-
function
|
|
4590
|
+
function gt(N, H, ne) {
|
|
4586
4591
|
var ae = N.entries[H];
|
|
4587
4592
|
if (ae)
|
|
4588
4593
|
return ne !== void 0 && (ae.a = ne), ae;
|
|
4589
|
-
ae =
|
|
4590
|
-
var pe = new
|
|
4594
|
+
ae = gt(N, H.substr(0, H.lastIndexOf(".")));
|
|
4595
|
+
var pe = new Bt(H, ae);
|
|
4591
4596
|
return N.entries[H] = pe, ae.c.push(pe), ne !== void 0 && (pe.a = ne), pe;
|
|
4592
4597
|
}
|
|
4593
|
-
function
|
|
4594
|
-
return
|
|
4598
|
+
function Vt() {
|
|
4599
|
+
return Xe || (Xe = new tt()), Xe;
|
|
4595
4600
|
}
|
|
4596
|
-
function
|
|
4601
|
+
function Mt(N, H, ne) {
|
|
4597
4602
|
var ae;
|
|
4598
|
-
(ae = N) && (ae = N && H) && (ae = (ae = H.value) >= (N ?
|
|
4603
|
+
(ae = N) && (ae = N && H) && (ae = (ae = H.value) >= (N ? qe(gt(Vt(), N.getName())) : et).value), ae && (H = H || et, ae = gt(Vt(), N.getName()), typeof ne == "function" && (ne = ne()), Le || (Le = new He()), function(pe, Fe) {
|
|
4599
4604
|
for (; pe; )
|
|
4600
4605
|
pe.f.forEach(function(de) {
|
|
4601
4606
|
de(Fe);
|
|
4602
4607
|
}), pe = pe.b;
|
|
4603
|
-
}(ae, N = new
|
|
4608
|
+
}(ae, N = new $e(H, ne, N = N.getName())));
|
|
4604
4609
|
}
|
|
4605
|
-
function
|
|
4606
|
-
N &&
|
|
4610
|
+
function it(N, H) {
|
|
4611
|
+
N && Mt(N, Ge, H);
|
|
4607
4612
|
}
|
|
4608
4613
|
function Xt() {
|
|
4609
4614
|
}
|
|
@@ -4629,39 +4634,39 @@ Found: `.concat(W.toString().split(`
|
|
|
4629
4634
|
}
|
|
4630
4635
|
return N.b;
|
|
4631
4636
|
}
|
|
4632
|
-
function
|
|
4637
|
+
function Pt(N, H) {
|
|
4633
4638
|
this.b = N[T.Symbol.iterator](), this.c = H, this.f = 0;
|
|
4634
4639
|
}
|
|
4635
|
-
|
|
4636
|
-
},
|
|
4637
|
-
}, Xt.prototype.a = null, _(qt, Xt),
|
|
4640
|
+
He.prototype.clear = function() {
|
|
4641
|
+
}, $e.prototype.reset = function() {
|
|
4642
|
+
}, Xt.prototype.a = null, _(qt, Xt), Ke = new qt(), u(), Q(), Pt.prototype[Symbol.iterator] = function() {
|
|
4638
4643
|
return this;
|
|
4639
|
-
},
|
|
4644
|
+
}, Pt.prototype.next = function() {
|
|
4640
4645
|
var N = this.b.next();
|
|
4641
4646
|
return { value: N.done ? void 0 : this.c.call(void 0, N.value, this.f++), done: N.done };
|
|
4642
4647
|
}, u(), Q(), u(), Q();
|
|
4643
|
-
var
|
|
4644
|
-
function
|
|
4648
|
+
var Zt = "StopIteration" in T ? T.StopIteration : { message: "StopIteration", stack: "" };
|
|
4649
|
+
function St() {
|
|
4645
4650
|
}
|
|
4646
4651
|
function tn(N) {
|
|
4647
|
-
if (N instanceof
|
|
4652
|
+
if (N instanceof pt || N instanceof Rt || N instanceof yt)
|
|
4648
4653
|
return N;
|
|
4649
4654
|
if (typeof N.next == "function")
|
|
4650
|
-
return new
|
|
4655
|
+
return new pt(function() {
|
|
4651
4656
|
return nn(N);
|
|
4652
4657
|
});
|
|
4653
4658
|
if (u(), Q(), typeof N[Symbol.iterator] == "function")
|
|
4654
|
-
return u(), Q(), new
|
|
4659
|
+
return u(), Q(), new pt(function() {
|
|
4655
4660
|
return N[Symbol.iterator]();
|
|
4656
4661
|
});
|
|
4657
4662
|
if (typeof N.u == "function")
|
|
4658
|
-
return new
|
|
4663
|
+
return new pt(function() {
|
|
4659
4664
|
return nn(N.u());
|
|
4660
4665
|
});
|
|
4661
4666
|
throw Error("Not an iterator or iterable.");
|
|
4662
4667
|
}
|
|
4663
4668
|
function nn(N) {
|
|
4664
|
-
if (!(N instanceof
|
|
4669
|
+
if (!(N instanceof St))
|
|
4665
4670
|
return N;
|
|
4666
4671
|
var H = !1;
|
|
4667
4672
|
return { next: function() {
|
|
@@ -4670,25 +4675,25 @@ Found: `.concat(W.toString().split(`
|
|
|
4670
4675
|
ne = N.a();
|
|
4671
4676
|
break;
|
|
4672
4677
|
} catch (ae) {
|
|
4673
|
-
if (ae !==
|
|
4678
|
+
if (ae !== Zt)
|
|
4674
4679
|
throw ae;
|
|
4675
4680
|
H = !0;
|
|
4676
4681
|
}
|
|
4677
4682
|
return { value: ne, done: H };
|
|
4678
4683
|
} };
|
|
4679
4684
|
}
|
|
4680
|
-
function
|
|
4685
|
+
function pt(N) {
|
|
4681
4686
|
this.b = N;
|
|
4682
4687
|
}
|
|
4683
|
-
function
|
|
4688
|
+
function Rt(N) {
|
|
4684
4689
|
this.b = N;
|
|
4685
4690
|
}
|
|
4686
|
-
function
|
|
4687
|
-
|
|
4691
|
+
function yt(N) {
|
|
4692
|
+
pt.call(this, function() {
|
|
4688
4693
|
return N;
|
|
4689
4694
|
}), this.f = N;
|
|
4690
4695
|
}
|
|
4691
|
-
function
|
|
4696
|
+
function jt(N, H) {
|
|
4692
4697
|
this.o = {}, this.j = [], this.B = this.size = 0;
|
|
4693
4698
|
var ne = arguments.length;
|
|
4694
4699
|
if (1 < ne) {
|
|
@@ -4699,65 +4704,65 @@ Found: `.concat(W.toString().split(`
|
|
|
4699
4704
|
} else
|
|
4700
4705
|
N && this.addAll(N);
|
|
4701
4706
|
}
|
|
4702
|
-
function
|
|
4707
|
+
function Gt(N) {
|
|
4703
4708
|
if (N.size != N.j.length) {
|
|
4704
4709
|
for (var H = 0, ne = 0; H < N.j.length; ) {
|
|
4705
4710
|
var ae = N.j[H];
|
|
4706
|
-
|
|
4711
|
+
Nt(N.o, ae) && (N.j[ne++] = ae), H++;
|
|
4707
4712
|
}
|
|
4708
4713
|
N.j.length = ne;
|
|
4709
4714
|
}
|
|
4710
4715
|
if (N.size != N.j.length) {
|
|
4711
4716
|
var pe = {};
|
|
4712
4717
|
for (ne = H = 0; H < N.j.length; )
|
|
4713
|
-
|
|
4718
|
+
Nt(pe, ae = N.j[H]) || (N.j[ne++] = ae, pe[ae] = 1), H++;
|
|
4714
4719
|
N.j.length = ne;
|
|
4715
4720
|
}
|
|
4716
4721
|
}
|
|
4717
|
-
function
|
|
4722
|
+
function Nt(N, H) {
|
|
4718
4723
|
return Object.prototype.hasOwnProperty.call(N, H);
|
|
4719
4724
|
}
|
|
4720
|
-
|
|
4721
|
-
return
|
|
4722
|
-
},
|
|
4723
|
-
throw
|
|
4724
|
-
},
|
|
4725
|
+
St.prototype.next = function() {
|
|
4726
|
+
return St.prototype.a.call(this);
|
|
4727
|
+
}, St.prototype.a = function() {
|
|
4728
|
+
throw Zt;
|
|
4729
|
+
}, St.prototype.u = function() {
|
|
4725
4730
|
return this;
|
|
4726
|
-
}, u(), Q(),
|
|
4727
|
-
return new
|
|
4728
|
-
},
|
|
4729
|
-
return new
|
|
4730
|
-
},
|
|
4731
|
-
return new
|
|
4732
|
-
}, u(), Q(), y(
|
|
4731
|
+
}, u(), Q(), pt.prototype.u = function() {
|
|
4732
|
+
return new Rt(this.b());
|
|
4733
|
+
}, pt.prototype[Symbol.iterator] = function() {
|
|
4734
|
+
return new yt(this.b());
|
|
4735
|
+
}, pt.prototype.c = function() {
|
|
4736
|
+
return new yt(this.b());
|
|
4737
|
+
}, u(), Q(), y(Rt, St), Rt.prototype.a = function() {
|
|
4733
4738
|
var N = this.b.next();
|
|
4734
4739
|
if (N.done)
|
|
4735
|
-
throw
|
|
4740
|
+
throw Zt;
|
|
4736
4741
|
return N.value;
|
|
4737
|
-
},
|
|
4738
|
-
return
|
|
4739
|
-
},
|
|
4740
|
-
return new
|
|
4741
|
-
},
|
|
4742
|
-
return new
|
|
4743
|
-
}, y(
|
|
4742
|
+
}, Rt.prototype.next = function() {
|
|
4743
|
+
return Rt.prototype.a.call(this);
|
|
4744
|
+
}, Rt.prototype[Symbol.iterator] = function() {
|
|
4745
|
+
return new yt(this.b);
|
|
4746
|
+
}, Rt.prototype.c = function() {
|
|
4747
|
+
return new yt(this.b);
|
|
4748
|
+
}, y(yt, pt), yt.prototype.next = function() {
|
|
4744
4749
|
return this.f.next();
|
|
4745
|
-
}, (o =
|
|
4746
|
-
return
|
|
4750
|
+
}, (o = jt.prototype).G = function() {
|
|
4751
|
+
return Gt(this), this.j.concat();
|
|
4747
4752
|
}, o.has = function(N) {
|
|
4748
|
-
return
|
|
4753
|
+
return Nt(this.o, N);
|
|
4749
4754
|
}, o.clear = function() {
|
|
4750
4755
|
this.o = {}, this.B = this.size = this.j.length = 0;
|
|
4751
4756
|
}, o.remove = function(N) {
|
|
4752
4757
|
return this.delete(N);
|
|
4753
4758
|
}, o.delete = function(N) {
|
|
4754
|
-
return !!
|
|
4759
|
+
return !!Nt(this.o, N) && (delete this.o[N], --this.size, this.B++, this.j.length > 2 * this.size && Gt(this), !0);
|
|
4755
4760
|
}, o.get = function(N, H) {
|
|
4756
|
-
return
|
|
4761
|
+
return Nt(this.o, N) ? this.o[N] : H;
|
|
4757
4762
|
}, o.set = function(N, H) {
|
|
4758
|
-
|
|
4763
|
+
Nt(this.o, N) || (this.size += 1, this.j.push(N), this.B++), this.o[N] = H;
|
|
4759
4764
|
}, o.addAll = function(N) {
|
|
4760
|
-
if (N instanceof
|
|
4765
|
+
if (N instanceof jt)
|
|
4761
4766
|
for (var H = N.G(), ne = 0; ne < H.length; ne++)
|
|
4762
4767
|
this.set(H[ne], N.get(H[ne]));
|
|
4763
4768
|
else
|
|
@@ -4769,7 +4774,7 @@ Found: `.concat(W.toString().split(`
|
|
|
4769
4774
|
N.call(H, Fe, pe, this);
|
|
4770
4775
|
}
|
|
4771
4776
|
}, o.clone = function() {
|
|
4772
|
-
return new
|
|
4777
|
+
return new jt(this);
|
|
4773
4778
|
}, o.keys = function() {
|
|
4774
4779
|
return tn(this.u(!0)).c();
|
|
4775
4780
|
}, o.values = function() {
|
|
@@ -4777,38 +4782,38 @@ Found: `.concat(W.toString().split(`
|
|
|
4777
4782
|
}, o.entries = function() {
|
|
4778
4783
|
var N = this;
|
|
4779
4784
|
return function(H, ne) {
|
|
4780
|
-
return new
|
|
4785
|
+
return new Pt(H, ne);
|
|
4781
4786
|
}(this.keys(), function(H) {
|
|
4782
4787
|
return [H, N.get(H)];
|
|
4783
4788
|
});
|
|
4784
4789
|
}, o.u = function(N) {
|
|
4785
|
-
|
|
4786
|
-
var H = 0, ne = this.B, ae = this, pe = new
|
|
4790
|
+
Gt(this);
|
|
4791
|
+
var H = 0, ne = this.B, ae = this, pe = new St();
|
|
4787
4792
|
return pe.a = function() {
|
|
4788
4793
|
if (ne != ae.B)
|
|
4789
4794
|
throw Error("The map has changed since the iterator was created");
|
|
4790
4795
|
if (H >= ae.j.length)
|
|
4791
|
-
throw
|
|
4796
|
+
throw Zt;
|
|
4792
4797
|
var Fe = ae.j[H++];
|
|
4793
4798
|
return N ? Fe : ae.o[Fe];
|
|
4794
4799
|
}, pe.next = pe.a.bind(pe), pe;
|
|
4795
4800
|
};
|
|
4796
4801
|
var pn = /^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;
|
|
4797
|
-
function
|
|
4798
|
-
Ue.call(this), this.headers = new
|
|
4802
|
+
function It(N) {
|
|
4803
|
+
Ue.call(this), this.headers = new jt(), this.C = N || null, this.c = !1, this.J = this.a = null, this.P = this.v = "", this.g = 0, this.l = "", this.i = this.N = this.s = this.L = !1, this.h = 0, this.w = null, this.m = rn, this.I = this.M = !1;
|
|
4799
4804
|
}
|
|
4800
|
-
_(
|
|
4805
|
+
_(It, Ue);
|
|
4801
4806
|
var rn = "";
|
|
4802
|
-
|
|
4807
|
+
It.prototype.b = gt(Vt(), "goog.net.XhrIo", void 0).g;
|
|
4803
4808
|
var hn = /^https?$/i, Un = ["POST", "PUT"];
|
|
4804
4809
|
function fn(N, H, ne) {
|
|
4805
4810
|
if (N.a)
|
|
4806
4811
|
throw Error("[goog.net.XhrIo] Object is active with another request=" + N.v + "; newUri=" + H);
|
|
4807
|
-
N.v = H, N.l = "", N.g = 0, N.P = "POST", N.L = !1, N.c = !0, N.a = N.C ? $t(N.C) : $t(
|
|
4812
|
+
N.v = H, N.l = "", N.g = 0, N.P = "POST", N.L = !1, N.c = !0, N.a = N.C ? $t(N.C) : $t(Ke), N.J = N.C ? Kt(N.C) : Kt(Ke), N.a.onreadystatechange = w(N.R, N);
|
|
4808
4813
|
try {
|
|
4809
|
-
|
|
4814
|
+
it(N.b, ht(N, "Opening Xhr")), N.N = !0, N.a.open("POST", String(H), !0), N.N = !1;
|
|
4810
4815
|
} catch (Fe) {
|
|
4811
|
-
return
|
|
4816
|
+
return it(N.b, ht(N, "Error opening Xhr: " + Fe.message)), void on(N, Fe);
|
|
4812
4817
|
}
|
|
4813
4818
|
H = ne || "";
|
|
4814
4819
|
var ae = (ne = N.headers.clone()).G().find(function(Fe) {
|
|
@@ -4819,26 +4824,26 @@ Found: `.concat(W.toString().split(`
|
|
|
4819
4824
|
}, N), N.m && (N.a.responseType = N.m), "withCredentials" in N.a && N.a.withCredentials !== N.M && (N.a.withCredentials = N.M);
|
|
4820
4825
|
try {
|
|
4821
4826
|
ln(N), 0 < N.h && (N.I = function(Fe) {
|
|
4822
|
-
return
|
|
4823
|
-
}(N.a),
|
|
4827
|
+
return Ae && Ut() && typeof Fe.timeout == "number" && Fe.ontimeout !== void 0;
|
|
4828
|
+
}(N.a), it(N.b, ht(N, "Will abort after " + N.h + "ms if incomplete, xhr2 " + N.I)), N.I ? (N.a.timeout = N.h, N.a.ontimeout = w(N.T, N)) : N.w = Ve(N.T, N.h, N)), it(N.b, ht(N, "Sending request")), N.s = !0, N.a.send(H), N.s = !1;
|
|
4824
4829
|
} catch (Fe) {
|
|
4825
|
-
|
|
4830
|
+
it(N.b, ht(N, "Send error: " + Fe.message)), on(N, Fe);
|
|
4826
4831
|
}
|
|
4827
4832
|
}
|
|
4828
4833
|
function on(N, H) {
|
|
4829
|
-
N.c = !1, N.a && (N.i = !0, N.a.abort(), N.i = !1), N.l = H, N.g = 5, an(N),
|
|
4834
|
+
N.c = !1, N.a && (N.i = !0, N.a.abort(), N.i = !1), N.l = H, N.g = 5, an(N), zt(N);
|
|
4830
4835
|
}
|
|
4831
4836
|
function an(N) {
|
|
4832
4837
|
N.L || (N.L = !0, ce(N, "complete"), ce(N, "error"));
|
|
4833
4838
|
}
|
|
4834
4839
|
function sn(N) {
|
|
4835
4840
|
if (N.c && h !== void 0) {
|
|
4836
|
-
if (N.J[1] &&
|
|
4837
|
-
|
|
4838
|
-
else if (N.s &&
|
|
4841
|
+
if (N.J[1] && mt(N) == 4 && N.getStatus() == 2)
|
|
4842
|
+
it(N.b, ht(N, "Local request error detected and ignored"));
|
|
4843
|
+
else if (N.s && mt(N) == 4)
|
|
4839
4844
|
Ve(N.R, 0, N);
|
|
4840
|
-
else if (ce(N, "readystatechange"),
|
|
4841
|
-
|
|
4845
|
+
else if (ce(N, "readystatechange"), mt(N) == 4) {
|
|
4846
|
+
it(N.b, ht(N, "Request complete")), N.c = !1;
|
|
4842
4847
|
try {
|
|
4843
4848
|
var H, ne = N.getStatus();
|
|
4844
4849
|
e:
|
|
@@ -4872,19 +4877,19 @@ Found: `.concat(W.toString().split(`
|
|
|
4872
4877
|
else {
|
|
4873
4878
|
N.g = 6;
|
|
4874
4879
|
try {
|
|
4875
|
-
var Qe = 2 <
|
|
4880
|
+
var Qe = 2 < mt(N) ? N.a.statusText : "";
|
|
4876
4881
|
} catch (Be) {
|
|
4877
|
-
|
|
4882
|
+
it(N.b, "Can not get status: " + Be.message), Qe = "";
|
|
4878
4883
|
}
|
|
4879
4884
|
N.l = Qe + " [" + N.getStatus() + "]", an(N);
|
|
4880
4885
|
}
|
|
4881
4886
|
} finally {
|
|
4882
|
-
|
|
4887
|
+
zt(N);
|
|
4883
4888
|
}
|
|
4884
4889
|
}
|
|
4885
4890
|
}
|
|
4886
4891
|
}
|
|
4887
|
-
function
|
|
4892
|
+
function zt(N) {
|
|
4888
4893
|
if (N.a) {
|
|
4889
4894
|
ln(N);
|
|
4890
4895
|
var H = N.a, ne = N.J[0] ? X : null;
|
|
@@ -4892,80 +4897,80 @@ Found: `.concat(W.toString().split(`
|
|
|
4892
4897
|
try {
|
|
4893
4898
|
H.onreadystatechange = ne;
|
|
4894
4899
|
} catch (ae) {
|
|
4895
|
-
(N = N.b) &&
|
|
4900
|
+
(N = N.b) && Mt(N, ze, "Problem encountered resetting onreadystatechange: " + ae.message);
|
|
4896
4901
|
}
|
|
4897
4902
|
}
|
|
4898
4903
|
}
|
|
4899
4904
|
function ln(N) {
|
|
4900
4905
|
N.a && N.I && (N.a.ontimeout = null), N.w && (me.clearTimeout(N.w), N.w = null);
|
|
4901
4906
|
}
|
|
4902
|
-
function
|
|
4907
|
+
function mt(N) {
|
|
4903
4908
|
return N.a ? N.a.readyState : 0;
|
|
4904
4909
|
}
|
|
4905
4910
|
function gn(N, H) {
|
|
4906
|
-
if (N.a &&
|
|
4911
|
+
if (N.a && mt(N) == 4)
|
|
4907
4912
|
return (N = N.a.getResponseHeader(H)) === null ? void 0 : N;
|
|
4908
4913
|
}
|
|
4909
|
-
function
|
|
4914
|
+
function ht(N, H) {
|
|
4910
4915
|
return H + " [" + N.P + " " + N.v + " " + N.getStatus() + "]";
|
|
4911
4916
|
}
|
|
4912
|
-
(o =
|
|
4913
|
-
h !== void 0 && this.a && (this.l = "Timed out after " + this.h + "ms, aborting", this.g = 8,
|
|
4917
|
+
(o = It.prototype).T = function() {
|
|
4918
|
+
h !== void 0 && this.a && (this.l = "Timed out after " + this.h + "ms, aborting", this.g = 8, it(this.b, ht(this, this.l)), ce(this, "timeout"), this.abort(8));
|
|
4914
4919
|
}, o.abort = function(N) {
|
|
4915
|
-
this.a && this.c && (
|
|
4920
|
+
this.a && this.c && (it(this.b, ht(this, "Aborting")), this.c = !1, this.i = !0, this.a.abort(), this.i = !1, this.g = N || 7, ce(this, "complete"), ce(this, "abort"), zt(this));
|
|
4916
4921
|
}, o.R = function() {
|
|
4917
4922
|
this.K || (this.N || this.s || this.i ? sn(this) : this.W());
|
|
4918
4923
|
}, o.W = function() {
|
|
4919
4924
|
sn(this);
|
|
4920
4925
|
}, o.getStatus = function() {
|
|
4921
4926
|
try {
|
|
4922
|
-
return 2 <
|
|
4927
|
+
return 2 < mt(this) ? this.a.status : -1;
|
|
4923
4928
|
} catch {
|
|
4924
4929
|
return -1;
|
|
4925
4930
|
}
|
|
4926
4931
|
};
|
|
4927
|
-
var un = {},
|
|
4932
|
+
var un = {}, Dt = null;
|
|
4928
4933
|
function Fn(N) {
|
|
4929
4934
|
var H = N.length, ne = 3 * H / 4;
|
|
4930
4935
|
ne % 3 ? ne = Math.floor(ne) : oe("=.", N[H - 1]) && (ne = oe("=.", N[H - 2]) ? ne - 2 : ne - 1);
|
|
4931
4936
|
var ae = new Uint8Array(ne), pe = 0;
|
|
4932
4937
|
return function(Fe, de) {
|
|
4933
|
-
function Qe(
|
|
4938
|
+
function Qe(Ie) {
|
|
4934
4939
|
for (; Be < Fe.length; ) {
|
|
4935
|
-
var
|
|
4936
|
-
if (
|
|
4937
|
-
return
|
|
4938
|
-
if (!/^[\s\xa0]*$/.test(
|
|
4939
|
-
throw Error("Unknown base64 encoding at char: " +
|
|
4940
|
+
var xe = Fe.charAt(Be++), we = Dt[xe];
|
|
4941
|
+
if (we != null)
|
|
4942
|
+
return we;
|
|
4943
|
+
if (!/^[\s\xa0]*$/.test(xe))
|
|
4944
|
+
throw Error("Unknown base64 encoding at char: " + xe);
|
|
4940
4945
|
}
|
|
4941
|
-
return
|
|
4946
|
+
return Ie;
|
|
4942
4947
|
}
|
|
4943
4948
|
cn();
|
|
4944
4949
|
for (var Be = 0; ; ) {
|
|
4945
|
-
var Te = Qe(-1), _e = Qe(0),
|
|
4946
|
-
if (
|
|
4950
|
+
var Te = Qe(-1), _e = Qe(0), Ce = Qe(64), Me = Qe(64);
|
|
4951
|
+
if (Me === 64 && Te === -1)
|
|
4947
4952
|
break;
|
|
4948
|
-
de(Te << 2 | _e >> 4),
|
|
4953
|
+
de(Te << 2 | _e >> 4), Ce != 64 && (de(_e << 4 & 240 | Ce >> 2), Me != 64 && de(Ce << 6 & 192 | Me));
|
|
4949
4954
|
}
|
|
4950
4955
|
}(N, function(Fe) {
|
|
4951
4956
|
ae[pe++] = Fe;
|
|
4952
4957
|
}), ae.subarray(0, pe);
|
|
4953
4958
|
}
|
|
4954
4959
|
function cn() {
|
|
4955
|
-
if (!
|
|
4956
|
-
|
|
4960
|
+
if (!Dt) {
|
|
4961
|
+
Dt = {};
|
|
4957
4962
|
for (var N = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""), H = ["+/=", "+/", "-_=", "-_.", "-_"], ne = 0; 5 > ne; ne++) {
|
|
4958
4963
|
var ae = N.concat(H[ne].split(""));
|
|
4959
4964
|
un[ne] = ae;
|
|
4960
4965
|
for (var pe = 0; pe < ae.length; pe++) {
|
|
4961
4966
|
var Fe = ae[pe];
|
|
4962
|
-
|
|
4967
|
+
Dt[Fe] === void 0 && (Dt[Fe] = pe);
|
|
4963
4968
|
}
|
|
4964
4969
|
}
|
|
4965
4970
|
}
|
|
4966
4971
|
}
|
|
4967
4972
|
var Qn = ["content-type", "grpc-status", "grpc-message"];
|
|
4968
|
-
function
|
|
4973
|
+
function ut(N) {
|
|
4969
4974
|
this.a = N.Z, this.m = null, this.b = [], this.h = [], this.g = [], this.f = [], this.c = [], this.l = !1, this.i = 0, this.s = new $();
|
|
4970
4975
|
var H = this;
|
|
4971
4976
|
Re(this.a, "readystatechange", function() {
|
|
@@ -4976,14 +4981,14 @@ Found: `.concat(W.toString().split(`
|
|
|
4976
4981
|
try {
|
|
4977
4982
|
var ae = ne.a ? ne.a.responseText : "";
|
|
4978
4983
|
} catch (Be) {
|
|
4979
|
-
|
|
4984
|
+
it(ne.b, "Can not get responseText: " + Be.message), ae = "";
|
|
4980
4985
|
}
|
|
4981
4986
|
if (ae = (ne = ae || "").length - ne.length % 4, (ne = ne.substr(H.i, ae - H.i)).length == 0)
|
|
4982
4987
|
return;
|
|
4983
4988
|
H.i = ae, ne = Fn(ne);
|
|
4984
4989
|
} else {
|
|
4985
4990
|
if (ne.lastIndexOf("application/grpc", 0) != 0)
|
|
4986
|
-
return void
|
|
4991
|
+
return void wt(H, new A(2, "Unknown Content-type received."));
|
|
4987
4992
|
ne = new Uint8Array(function(Be) {
|
|
4988
4993
|
try {
|
|
4989
4994
|
if (!Be.a)
|
|
@@ -4999,49 +5004,49 @@ Found: `.concat(W.toString().split(`
|
|
|
4999
5004
|
return Be.a.mozResponseArrayBuffer;
|
|
5000
5005
|
}
|
|
5001
5006
|
var Te = Be.b;
|
|
5002
|
-
return Te &&
|
|
5007
|
+
return Te && Mt(Te, ze, "Response type " + Be.m + " is not supported on this browser"), null;
|
|
5003
5008
|
} catch (_e) {
|
|
5004
|
-
return
|
|
5009
|
+
return it(Be.b, "Can not get response: " + _e.message), null;
|
|
5005
5010
|
}
|
|
5006
5011
|
}(H.a));
|
|
5007
5012
|
}
|
|
5008
5013
|
ae = null;
|
|
5009
5014
|
try {
|
|
5010
5015
|
ae = function(Be, Te) {
|
|
5011
|
-
function _e(
|
|
5012
|
-
|
|
5016
|
+
function _e(at) {
|
|
5017
|
+
we.f++, we.a = (we.a << 8) + at, we.f == 4 && (we.b = O, we.g = 0, typeof Uint8Array != "undefined" ? we.c = new Uint8Array(we.a) : we.c = Array(we.a), we.a == 0 && Me());
|
|
5013
5018
|
}
|
|
5014
|
-
function
|
|
5015
|
-
|
|
5019
|
+
function Ce(at) {
|
|
5020
|
+
we.c[we.g++] = at, we.g == we.a && Me();
|
|
5016
5021
|
}
|
|
5017
|
-
function
|
|
5018
|
-
var
|
|
5019
|
-
|
|
5022
|
+
function Me() {
|
|
5023
|
+
var at = {};
|
|
5024
|
+
at[we.h] = we.c, we.i.push(at), we.b = ee;
|
|
5020
5025
|
}
|
|
5021
|
-
var
|
|
5022
|
-
for (
|
|
5023
|
-
switch (
|
|
5026
|
+
var Ie, xe, we = Be, Ye = 0;
|
|
5027
|
+
for (Ie = Te instanceof Uint8Array || Te instanceof Array ? Te : new Uint8Array(Te); Ye < Ie.length; ) {
|
|
5028
|
+
switch (we.b) {
|
|
5024
5029
|
case k:
|
|
5025
|
-
G(
|
|
5030
|
+
G(we, Ie, Ye, "stream already broken");
|
|
5026
5031
|
break;
|
|
5027
5032
|
case ee:
|
|
5028
|
-
(
|
|
5033
|
+
(xe = Ie[Ye]) == S || xe == V ? we.h = xe : G(we, Ie, Ye, "invalid frame byte"), we.b = re, we.a = 0, we.f = 0;
|
|
5029
5034
|
break;
|
|
5030
5035
|
case re:
|
|
5031
|
-
_e(
|
|
5036
|
+
_e(Ie[Ye]);
|
|
5032
5037
|
break;
|
|
5033
5038
|
case O:
|
|
5034
|
-
|
|
5039
|
+
Ce(Ie[Ye]);
|
|
5035
5040
|
break;
|
|
5036
5041
|
default:
|
|
5037
|
-
throw Error("unexpected parser state: " +
|
|
5042
|
+
throw Error("unexpected parser state: " + we.b);
|
|
5038
5043
|
}
|
|
5039
|
-
|
|
5044
|
+
we.m++, Ye++;
|
|
5040
5045
|
}
|
|
5041
|
-
return Be =
|
|
5046
|
+
return Be = we.i, we.i = [], 0 < Be.length ? Be : null;
|
|
5042
5047
|
}(H.s, ne);
|
|
5043
5048
|
} catch {
|
|
5044
|
-
|
|
5049
|
+
wt(H, new A(2, "Error in parsing response body"));
|
|
5045
5050
|
}
|
|
5046
5051
|
if (ae)
|
|
5047
5052
|
for (ne = 0; ne < ae.length; ne++) {
|
|
@@ -5052,7 +5057,7 @@ Found: `.concat(W.toString().split(`
|
|
|
5052
5057
|
try {
|
|
5053
5058
|
de = H.m(pe), Fe = !0;
|
|
5054
5059
|
} catch (Be) {
|
|
5055
|
-
|
|
5060
|
+
wt(H, new A(13, "Error when deserializing response data; error: " + Be + ", response: " + de));
|
|
5056
5061
|
}
|
|
5057
5062
|
if (Fe)
|
|
5058
5063
|
for (pe = de, Fe = 0; Fe < H.b.length; Fe++)
|
|
@@ -5067,31 +5072,31 @@ Found: `.concat(W.toString().split(`
|
|
|
5067
5072
|
var Qe = pe[de].indexOf(":");
|
|
5068
5073
|
Fe[pe[de].substring(0, Qe).trim()] = pe[de].substring(Qe + 1).trim();
|
|
5069
5074
|
}
|
|
5070
|
-
pe = Fe, Fe = 0, de = "", "grpc-status" in pe && (Fe = Number(pe["grpc-status"]), delete pe["grpc-status"]), "grpc-message" in pe && (de = pe["grpc-message"], delete pe["grpc-message"]),
|
|
5075
|
+
pe = Fe, Fe = 0, de = "", "grpc-status" in pe && (Fe = Number(pe["grpc-status"]), delete pe["grpc-status"]), "grpc-message" in pe && (de = pe["grpc-message"], delete pe["grpc-message"]), wt(H, new A(Fe, de, pe));
|
|
5071
5076
|
}
|
|
5072
5077
|
}
|
|
5073
5078
|
}
|
|
5074
5079
|
}), Re(this.a, "complete", function() {
|
|
5075
5080
|
var ne = H.a.g, ae = 2, pe = "", Fe = {}, de = function(Be) {
|
|
5076
5081
|
var Te = {};
|
|
5077
|
-
Be = (Be.a &&
|
|
5082
|
+
Be = (Be.a && mt(Be) == 4 && Be.a.getAllResponseHeaders() || "").split(`\r
|
|
5078
5083
|
`);
|
|
5079
5084
|
for (var _e = 0; _e < Be.length; _e++)
|
|
5080
5085
|
if (!/^[\s\xa0]*$/.test(Be[_e])) {
|
|
5081
|
-
var
|
|
5082
|
-
if (typeof (
|
|
5083
|
-
|
|
5084
|
-
var
|
|
5085
|
-
Te[
|
|
5086
|
+
var Ce = We(Be[_e]), Me = Ce[0];
|
|
5087
|
+
if (typeof (Ce = Ce[1]) == "string") {
|
|
5088
|
+
Ce = Ce.trim();
|
|
5089
|
+
var Ie = Te[Me] || [];
|
|
5090
|
+
Te[Me] = Ie, Ie.push(Ce);
|
|
5086
5091
|
}
|
|
5087
5092
|
}
|
|
5088
|
-
return function(
|
|
5089
|
-
var
|
|
5090
|
-
for (
|
|
5091
|
-
|
|
5092
|
-
return
|
|
5093
|
-
}(Te, function(
|
|
5094
|
-
return
|
|
5093
|
+
return function(xe, we) {
|
|
5094
|
+
var Ye, at = {};
|
|
5095
|
+
for (Ye in xe)
|
|
5096
|
+
at[Ye] = we.call(void 0, xe[Ye], Ye, xe);
|
|
5097
|
+
return at;
|
|
5098
|
+
}(Te, function(xe) {
|
|
5099
|
+
return xe.join(", ");
|
|
5095
5100
|
});
|
|
5096
5101
|
}(H.a);
|
|
5097
5102
|
Object.keys(de).forEach(function(Be) {
|
|
@@ -5171,31 +5176,31 @@ Found: `.concat(W.toString().split(`
|
|
|
5171
5176
|
default:
|
|
5172
5177
|
return "Unrecognized error code";
|
|
5173
5178
|
}
|
|
5174
|
-
}(ne), Qe != -1 && (pe += ", http status code: " + Qe),
|
|
5179
|
+
}(ne), Qe != -1 && (pe += ", http status code: " + Qe), wt(H, new A(ae, pe)));
|
|
5175
5180
|
} else
|
|
5176
|
-
Qe = !1, "grpc-status" in de && (ae = Number(gn(H.a, "grpc-status")), "grpc-message" in de && (pe = gn(H.a, "grpc-message")), ae != 0 && (
|
|
5181
|
+
Qe = !1, "grpc-status" in de && (ae = Number(gn(H.a, "grpc-status")), "grpc-message" in de && (pe = gn(H.a, "grpc-message")), ae != 0 && (wt(H, new A(ae, pe || "", de)), Qe = !0)), Qe || function(Be) {
|
|
5177
5182
|
for (var Te = 0; Te < Be.c.length; Te++)
|
|
5178
5183
|
Be.c[Te]();
|
|
5179
5184
|
}(H);
|
|
5180
5185
|
});
|
|
5181
5186
|
}
|
|
5182
|
-
function
|
|
5187
|
+
function Ot(N, H) {
|
|
5183
5188
|
-1 < (H = N.indexOf(H)) && N.splice(H, 1);
|
|
5184
5189
|
}
|
|
5185
|
-
function
|
|
5190
|
+
function wt(N, H) {
|
|
5186
5191
|
if (H.code != 0)
|
|
5187
5192
|
for (var ne = new A(H.code, decodeURIComponent(H.message || ""), H.metadata), ae = 0; ae < N.f.length; ae++)
|
|
5188
5193
|
N.f[ae](ne);
|
|
5189
5194
|
for (H = { code: H.code, details: decodeURIComponent(H.message || ""), metadata: H.metadata }, ne = 0; ne < N.h.length; ne++)
|
|
5190
5195
|
N.h[ne](H);
|
|
5191
5196
|
}
|
|
5192
|
-
function
|
|
5197
|
+
function nt(N, H) {
|
|
5193
5198
|
N = N === void 0 ? {} : N, this.a = N.format || I("format", N) || "text", this.g = N.aa || I("suppressCorsPreflight", N) || !1, this.f = N.withCredentials || I("withCredentials", N) || !1, this.b = N.$ || I("streamInterceptors", N) || [], this.h = N.ba || I("unaryInterceptors", N) || [], this.c = H || null;
|
|
5194
5199
|
}
|
|
5195
|
-
function
|
|
5200
|
+
function Ht(N, H, ne) {
|
|
5196
5201
|
var ae = H.getMethodDescriptor(), pe = ne + ae.getName();
|
|
5197
|
-
(ne = N.c ? N.c : new
|
|
5198
|
-
var Fe = new
|
|
5202
|
+
(ne = N.c ? N.c : new It()).M = N.f;
|
|
5203
|
+
var Fe = new ut({ Z: ne });
|
|
5199
5204
|
Fe.m = ae.b;
|
|
5200
5205
|
var de = H.getMetadata();
|
|
5201
5206
|
for (Qe in de)
|
|
@@ -5216,31 +5221,31 @@ Found: `.concat(W.toString().split(`
|
|
|
5216
5221
|
}
|
|
5217
5222
|
_e = !0;
|
|
5218
5223
|
}
|
|
5219
|
-
_e || (Qe = function(
|
|
5220
|
-
var
|
|
5221
|
-
return function(
|
|
5222
|
-
for (var
|
|
5223
|
-
|
|
5224
|
-
}(
|
|
5225
|
-
|
|
5224
|
+
_e || (Qe = function(Ie) {
|
|
5225
|
+
var xe = "";
|
|
5226
|
+
return function(we, Ye) {
|
|
5227
|
+
for (var at in we)
|
|
5228
|
+
Ye.call(void 0, we[at], at, we);
|
|
5229
|
+
}(Ie, function(we, Ye) {
|
|
5230
|
+
xe += Ye, xe += ":", xe += we, xe += `\r
|
|
5226
5231
|
`;
|
|
5227
|
-
}),
|
|
5232
|
+
}), xe;
|
|
5228
5233
|
}(Qe), typeof pe == "string" ? (_e = encodeURIComponent("$httpHeaders"), (_e += Qe = Qe != null ? "=" + encodeURIComponent(String(Qe)) : "") && (0 > (Qe = pe.indexOf("#")) && (Qe = pe.length), 0 > (de = pe.indexOf("?")) || de > Qe ? (de = Qe, Be = "") : Be = pe.substring(de + 1, Qe), Qe = (pe = [pe.substr(0, de), Be, pe.substr(Qe)])[1], pe[1] = _e ? Qe ? Qe + "&" + _e : _e : Qe, pe = pe[0] + (pe[1] ? "?" + pe[1] : "") + pe[2])) : pe.a("$httpHeaders", Qe));
|
|
5229
5234
|
}
|
|
5230
5235
|
for (ae = (H = (0, ae.a)(H.getRequestMessage())).length, _e = [0, 0, 0, 0], Qe = new Uint8Array(5 + ae), de = 3; 0 <= de; de--)
|
|
5231
5236
|
_e[de] = ae % 256, ae >>>= 8;
|
|
5232
5237
|
if (Qe.set(new Uint8Array(_e), 1), Qe.set(H, 5), H = Qe, N.a == "text") {
|
|
5233
|
-
var
|
|
5234
|
-
for (N = H,
|
|
5238
|
+
var Ce;
|
|
5239
|
+
for (N = H, Ce === void 0 && (Ce = 0), cn(), Ce = un[Ce], H = Array(Math.floor(N.length / 3)), ae = Ce[64] || "", _e = Qe = 0; Qe < N.length - 2; Qe += 3) {
|
|
5235
5240
|
Te = N[Qe];
|
|
5236
|
-
var
|
|
5237
|
-
Be = N[Qe + 2], de =
|
|
5241
|
+
var Me = N[Qe + 1];
|
|
5242
|
+
Be = N[Qe + 2], de = Ce[Te >> 2], Te = Ce[(3 & Te) << 4 | Me >> 4], Me = Ce[(15 & Me) << 2 | Be >> 6], Be = Ce[63 & Be], H[_e++] = de + Te + Me + Be;
|
|
5238
5243
|
}
|
|
5239
5244
|
switch (de = 0, Be = ae, N.length - Qe) {
|
|
5240
5245
|
case 2:
|
|
5241
|
-
Be =
|
|
5246
|
+
Be = Ce[(15 & (de = N[Qe + 1])) << 2] || ae;
|
|
5242
5247
|
case 1:
|
|
5243
|
-
N = N[Qe], H[_e] =
|
|
5248
|
+
N = N[Qe], H[_e] = Ce[N >> 2] + Ce[(3 & N) << 4 | de >> 4] + Be + ae;
|
|
5244
5249
|
}
|
|
5245
5250
|
H = H.join("");
|
|
5246
5251
|
} else
|
|
@@ -5261,7 +5266,7 @@ Found: `.concat(W.toString().split(`
|
|
|
5261
5266
|
Fe || (ae ? ne ? H(null, pe, null, null, !0) : H(null, pe) : H({ code: 2, message: "Incomplete response" })), ne && H(null, null);
|
|
5262
5267
|
});
|
|
5263
5268
|
}
|
|
5264
|
-
function
|
|
5269
|
+
function Yt(N, H) {
|
|
5265
5270
|
var ne = N;
|
|
5266
5271
|
return H.forEach(function(ae) {
|
|
5267
5272
|
var pe = ne;
|
|
@@ -5270,37 +5275,37 @@ Found: `.concat(W.toString().split(`
|
|
|
5270
5275
|
};
|
|
5271
5276
|
}), ne;
|
|
5272
5277
|
}
|
|
5273
|
-
|
|
5278
|
+
ut.prototype.on = function(N, H) {
|
|
5274
5279
|
return N == "data" ? this.b.push(H) : N == "status" ? this.h.push(H) : N == "metadata" ? this.g.push(H) : N == "end" ? this.c.push(H) : N == "error" && this.f.push(H), this;
|
|
5275
|
-
},
|
|
5276
|
-
return N == "data" ?
|
|
5277
|
-
},
|
|
5280
|
+
}, ut.prototype.removeListener = function(N, H) {
|
|
5281
|
+
return N == "data" ? Ot(this.b, H) : N == "status" ? Ot(this.h, H) : N == "metadata" ? Ot(this.g, H) : N == "end" ? Ot(this.c, H) : N == "error" && Ot(this.f, H), this;
|
|
5282
|
+
}, ut.prototype.cancel = function() {
|
|
5278
5283
|
this.l = !0, this.a.abort();
|
|
5279
|
-
},
|
|
5284
|
+
}, ut.prototype.cancel = ut.prototype.cancel, ut.prototype.removeListener = ut.prototype.removeListener, ut.prototype.on = ut.prototype.on, nt.prototype.X = function(N, H, ne, ae, pe) {
|
|
5280
5285
|
var Fe = this, de = N.substr(0, N.length - ae.name.length);
|
|
5281
|
-
return dn(N =
|
|
5282
|
-
return
|
|
5286
|
+
return dn(N = Yt(function(Qe) {
|
|
5287
|
+
return Ht(Fe, Qe, de);
|
|
5283
5288
|
}, this.b).call(this, D(ae, H, ne)), pe, !1), new b(N);
|
|
5284
|
-
},
|
|
5289
|
+
}, nt.prototype.S = function(N, H, ne, ae) {
|
|
5285
5290
|
var pe = this, Fe = N.substr(0, N.length - ae.name.length);
|
|
5286
|
-
return
|
|
5291
|
+
return Yt(function(de) {
|
|
5287
5292
|
return new Promise(function(Qe, Be) {
|
|
5288
|
-
var Te, _e,
|
|
5289
|
-
dn(
|
|
5290
|
-
|
|
5293
|
+
var Te, _e, Ce;
|
|
5294
|
+
dn(Ht(pe, de, Fe), function(Me, Ie, xe, we, Ye) {
|
|
5295
|
+
Me ? Be(Me) : Ye ? Ce = Ie : xe ? _e = xe : we ? Te = we : (Me = de.getMethodDescriptor(), Qe(new J(Ce, Me, Ie = (Ie = Te) === void 0 ? {} : Ie, _e === void 0 ? null : _e)));
|
|
5291
5296
|
}, !0);
|
|
5292
5297
|
});
|
|
5293
5298
|
}, this.h).call(this, D(ae, H, ne)).then(function(de) {
|
|
5294
5299
|
return de.getResponseMessage();
|
|
5295
5300
|
});
|
|
5296
|
-
},
|
|
5301
|
+
}, nt.prototype.unaryCall = function(N, H, ne, ae) {
|
|
5297
5302
|
return this.S(N, H, ne, ae);
|
|
5298
|
-
},
|
|
5303
|
+
}, nt.prototype.Y = function(N, H, ne, ae) {
|
|
5299
5304
|
var pe = this, Fe = N.substr(0, N.length - ae.name.length);
|
|
5300
|
-
return
|
|
5301
|
-
return
|
|
5305
|
+
return Yt(function(de) {
|
|
5306
|
+
return Ht(pe, de, Fe);
|
|
5302
5307
|
}, this.b).call(this, D(ae, H, ne));
|
|
5303
|
-
},
|
|
5308
|
+
}, nt.prototype.serverStreaming = nt.prototype.Y, nt.prototype.unaryCall = nt.prototype.unaryCall, nt.prototype.thenableCall = nt.prototype.S, nt.prototype.rpcCall = nt.prototype.X, e.exports.CallOptions = j, e.exports.MethodDescriptor = v, e.exports.GrpcWebClientBase = nt, e.exports.RpcError = A, e.exports.StatusCode = { OK: 0, CANCELLED: 1, UNKNOWN: 2, INVALID_ARGUMENT: 3, DEADLINE_EXCEEDED: 4, NOT_FOUND: 5, ALREADY_EXISTS: 6, PERMISSION_DENIED: 7, UNAUTHENTICATED: 16, RESOURCE_EXHAUSTED: 8, FAILED_PRECONDITION: 9, ABORTED: 10, OUT_OF_RANGE: 11, UNIMPLEMENTED: 12, INTERNAL: 13, UNAVAILABLE: 14, DATA_LOSS: 15 }, e.exports.MethodType = { UNARY: "unary", SERVER_STREAMING: "server_streaming", BIDI_STREAMING: "bidi_streaming" }, me = typeof globalThis != "undefined" && globalThis || self;
|
|
5304
5309
|
}).call(this, n(6));
|
|
5305
5310
|
}, function(e, t, n) {
|
|
5306
5311
|
var r = n(57), o = n(60).warn;
|
|
@@ -8068,9 +8073,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8068
8073
|
V.pipes.push(O);
|
|
8069
8074
|
}
|
|
8070
8075
|
V.pipesCount += 1, d("pipe count=%d opts=%j", V.pipesCount, k);
|
|
8071
|
-
var G = (!k || k.end !== !1) && O !== o.stdout && O !== o.stderr ? Y :
|
|
8076
|
+
var G = (!k || k.end !== !1) && O !== o.stdout && O !== o.stderr ? Y : We;
|
|
8072
8077
|
function K(Ee, be) {
|
|
8073
|
-
d("onunpipe"), Ee === S && be && be.hasUnpiped === !1 && (be.hasUnpiped = !0, d("cleanup"), O.removeListener("close", ve), O.removeListener("finish", ye), O.removeListener("drain", te), O.removeListener("error", Se), O.removeListener("unpipe", K), S.removeListener("end", Y), S.removeListener("end",
|
|
8078
|
+
d("onunpipe"), Ee === S && be && be.hasUnpiped === !1 && (be.hasUnpiped = !0, d("cleanup"), O.removeListener("close", ve), O.removeListener("finish", ye), O.removeListener("drain", te), O.removeListener("error", Se), O.removeListener("unpipe", K), S.removeListener("end", Y), S.removeListener("end", We), S.removeListener("data", ge), oe = !0, !V.awaitDrain || O._writableState && !O._writableState.needDrain || te());
|
|
8074
8079
|
}
|
|
8075
8080
|
function Y() {
|
|
8076
8081
|
d("onend"), O.end();
|
|
@@ -8090,21 +8095,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8090
8095
|
d("dest.write", be), be === !1 && ((V.pipesCount === 1 && V.pipes === O || V.pipesCount > 1 && re(V.pipes, O) !== -1) && !oe && (d("false write response, pause", V.awaitDrain), V.awaitDrain++), S.pause());
|
|
8091
8096
|
}
|
|
8092
8097
|
function Se(Ee) {
|
|
8093
|
-
d("onerror", Ee),
|
|
8098
|
+
d("onerror", Ee), We(), O.removeListener("error", Se), g(O, "error") === 0 && I(O, Ee);
|
|
8094
8099
|
}
|
|
8095
8100
|
function ve() {
|
|
8096
|
-
O.removeListener("finish", ye),
|
|
8101
|
+
O.removeListener("finish", ye), We();
|
|
8097
8102
|
}
|
|
8098
8103
|
function ye() {
|
|
8099
|
-
d("onfinish"), O.removeListener("close", ve),
|
|
8104
|
+
d("onfinish"), O.removeListener("close", ve), We();
|
|
8100
8105
|
}
|
|
8101
|
-
function
|
|
8106
|
+
function We() {
|
|
8102
8107
|
d("unpipe"), S.unpipe(O);
|
|
8103
8108
|
}
|
|
8104
|
-
return S.on("data", ge), function(Ee, be,
|
|
8109
|
+
return S.on("data", ge), function(Ee, be, Je) {
|
|
8105
8110
|
if (typeof Ee.prependListener == "function")
|
|
8106
|
-
return Ee.prependListener(be,
|
|
8107
|
-
Ee._events && Ee._events[be] ? Array.isArray(Ee._events[be]) ? Ee._events[be].unshift(
|
|
8111
|
+
return Ee.prependListener(be, Je);
|
|
8112
|
+
Ee._events && Ee._events[be] ? Array.isArray(Ee._events[be]) ? Ee._events[be].unshift(Je) : Ee._events[be] = [Je, Ee._events[be]] : Ee.on(be, Je);
|
|
8108
8113
|
}(O, "error", Se), O.once("close", ve), O.once("finish", ye), O.emit("pipe", S), V.flowing || (d("pipe resume"), S.resume()), O;
|
|
8109
8114
|
}, R.prototype.unpipe = function(O) {
|
|
8110
8115
|
var k = this._readableState, S = { hasUnpiped: !1 };
|
|
@@ -15277,9 +15282,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
15277
15282
|
V.pipes.push(O);
|
|
15278
15283
|
}
|
|
15279
15284
|
V.pipesCount += 1, d("pipe count=%d opts=%j", V.pipesCount, k);
|
|
15280
|
-
var G = (!k || k.end !== !1) && O !== o.stdout && O !== o.stderr ? Y :
|
|
15285
|
+
var G = (!k || k.end !== !1) && O !== o.stdout && O !== o.stderr ? Y : We;
|
|
15281
15286
|
function K(Ee, be) {
|
|
15282
|
-
d("onunpipe"), Ee === S && be && be.hasUnpiped === !1 && (be.hasUnpiped = !0, d("cleanup"), O.removeListener("close", ve), O.removeListener("finish", ye), O.removeListener("drain", te), O.removeListener("error", Se), O.removeListener("unpipe", K), S.removeListener("end", Y), S.removeListener("end",
|
|
15287
|
+
d("onunpipe"), Ee === S && be && be.hasUnpiped === !1 && (be.hasUnpiped = !0, d("cleanup"), O.removeListener("close", ve), O.removeListener("finish", ye), O.removeListener("drain", te), O.removeListener("error", Se), O.removeListener("unpipe", K), S.removeListener("end", Y), S.removeListener("end", We), S.removeListener("data", ge), oe = !0, !V.awaitDrain || O._writableState && !O._writableState.needDrain || te());
|
|
15283
15288
|
}
|
|
15284
15289
|
function Y() {
|
|
15285
15290
|
d("onend"), O.end();
|
|
@@ -15299,21 +15304,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
15299
15304
|
d("dest.write", be), be === !1 && ((V.pipesCount === 1 && V.pipes === O || V.pipesCount > 1 && re(V.pipes, O) !== -1) && !oe && (d("false write response, pause", V.awaitDrain), V.awaitDrain++), S.pause());
|
|
15300
15305
|
}
|
|
15301
15306
|
function Se(Ee) {
|
|
15302
|
-
d("onerror", Ee),
|
|
15307
|
+
d("onerror", Ee), We(), O.removeListener("error", Se), g(O, "error") === 0 && I(O, Ee);
|
|
15303
15308
|
}
|
|
15304
15309
|
function ve() {
|
|
15305
|
-
O.removeListener("finish", ye),
|
|
15310
|
+
O.removeListener("finish", ye), We();
|
|
15306
15311
|
}
|
|
15307
15312
|
function ye() {
|
|
15308
|
-
d("onfinish"), O.removeListener("close", ve),
|
|
15313
|
+
d("onfinish"), O.removeListener("close", ve), We();
|
|
15309
15314
|
}
|
|
15310
|
-
function
|
|
15315
|
+
function We() {
|
|
15311
15316
|
d("unpipe"), S.unpipe(O);
|
|
15312
15317
|
}
|
|
15313
|
-
return S.on("data", ge), function(Ee, be,
|
|
15318
|
+
return S.on("data", ge), function(Ee, be, Je) {
|
|
15314
15319
|
if (typeof Ee.prependListener == "function")
|
|
15315
|
-
return Ee.prependListener(be,
|
|
15316
|
-
Ee._events && Ee._events[be] ? Array.isArray(Ee._events[be]) ? Ee._events[be].unshift(
|
|
15320
|
+
return Ee.prependListener(be, Je);
|
|
15321
|
+
Ee._events && Ee._events[be] ? Array.isArray(Ee._events[be]) ? Ee._events[be].unshift(Je) : Ee._events[be] = [Je, Ee._events[be]] : Ee.on(be, Je);
|
|
15317
15322
|
}(O, "error", Se), O.once("close", ve), O.once("finish", ye), O.emit("pipe", S), V.flowing || (d("pipe resume"), S.resume()), O;
|
|
15318
15323
|
}, R.prototype.unpipe = function(O) {
|
|
15319
15324
|
var k = this._readableState, S = { hasUnpiped: !1 };
|
|
@@ -16972,20 +16977,20 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
16972
16977
|
z = b.heap[1], b.heap[1] = b.heap[b.heap_len--], _(b, re, 1), $ = b.heap[1], b.heap[--b.heap_max] = z, b.heap[--b.heap_max] = $, re[2 * ee] = re[2 * z] + re[2 * $], b.depth[ee] = (b.depth[z] >= b.depth[$] ? b.depth[z] : b.depth[$]) + 1, re[2 * z + 1] = re[2 * $ + 1] = ee, b.heap[1] = ee++, _(b, re, 1);
|
|
16973
16978
|
while (b.heap_len >= 2);
|
|
16974
16979
|
b.heap[--b.heap_max] = b.heap[1], function(G, K) {
|
|
16975
|
-
var Y, te, oe, ge, Se, ve, ye = K.dyn_tree,
|
|
16980
|
+
var Y, te, oe, ge, Se, ve, ye = K.dyn_tree, We = K.max_code, Ee = K.stat_desc.static_tree, be = K.stat_desc.has_stree, Je = K.stat_desc.extra_bits, je = K.stat_desc.extra_base, Ae = K.stat_desc.max_length, st = 0;
|
|
16976
16981
|
for (ge = 0; ge <= 15; ge++)
|
|
16977
16982
|
G.bl_count[ge] = 0;
|
|
16978
16983
|
for (ye[2 * G.heap[G.heap_max] + 1] = 0, Y = G.heap_max + 1; Y < 573; Y++)
|
|
16979
|
-
(ge = ye[2 * ye[2 * (te = G.heap[Y]) + 1] + 1] + 1) >
|
|
16980
|
-
if (
|
|
16984
|
+
(ge = ye[2 * ye[2 * (te = G.heap[Y]) + 1] + 1] + 1) > Ae && (ge = Ae, st++), ye[2 * te + 1] = ge, te > We || (G.bl_count[ge]++, Se = 0, te >= je && (Se = Je[te - je]), ve = ye[2 * te], G.opt_len += ve * (ge + Se), be && (G.static_len += ve * (Ee[2 * te + 1] + Se)));
|
|
16985
|
+
if (st !== 0) {
|
|
16981
16986
|
do {
|
|
16982
|
-
for (ge =
|
|
16987
|
+
for (ge = Ae - 1; G.bl_count[ge] === 0; )
|
|
16983
16988
|
ge--;
|
|
16984
|
-
G.bl_count[ge]--, G.bl_count[ge + 1] += 2, G.bl_count[
|
|
16985
|
-
} while (
|
|
16986
|
-
for (ge =
|
|
16989
|
+
G.bl_count[ge]--, G.bl_count[ge + 1] += 2, G.bl_count[Ae]--, st -= 2;
|
|
16990
|
+
} while (st > 0);
|
|
16991
|
+
for (ge = Ae; ge !== 0; ge--)
|
|
16987
16992
|
for (te = G.bl_count[ge]; te !== 0; )
|
|
16988
|
-
(oe = G.heap[--Y]) >
|
|
16993
|
+
(oe = G.heap[--Y]) > We || (ye[2 * oe + 1] !== ge && (G.opt_len += (ge - ye[2 * oe + 1]) * ye[2 * oe], ye[2 * oe + 1] = ge), te--);
|
|
16989
16994
|
}
|
|
16990
16995
|
}(b, P), F(re, V, b.bl_count);
|
|
16991
16996
|
}
|
|
@@ -19266,11 +19271,11 @@ Found: ${s.toString().split(`
|
|
|
19266
19271
|
}), n.d(t, "SignalingPromiseClient", function() {
|
|
19267
19272
|
return J.SignalingPromiseClient;
|
|
19268
19273
|
}), n.d(t, "RtcClient", function() {
|
|
19269
|
-
return
|
|
19274
|
+
return xt;
|
|
19270
19275
|
}), n.d(t, "RtcClientV1", function() {
|
|
19271
|
-
return
|
|
19276
|
+
return kt;
|
|
19272
19277
|
}), n.d(t, "createRtcStreamMessage", function() {
|
|
19273
|
-
return
|
|
19278
|
+
return Jt;
|
|
19274
19279
|
});
|
|
19275
19280
|
var r = n(26), o = function(Re, Z, L, q) {
|
|
19276
19281
|
return new (L || (L = Promise))(function(ie, se) {
|
|
@@ -19887,36 +19892,36 @@ Found: ${s.toString().split(`
|
|
|
19887
19892
|
}
|
|
19888
19893
|
Y.grpcCallDeadlineSlopMs = 500 * u.a.millisecond;
|
|
19889
19894
|
var te = n(27);
|
|
19890
|
-
const oe = { ordered: !1, maxPacketLifeTime: 300 * u.a.millisecond }, ge = { ordered: !0 }, Se = { ordered: !0 }, ve = { ordered: !1, maxRetransmits: 0 }, ye = { ordered: !1, maxRetransmits: 0 },
|
|
19891
|
-
function
|
|
19892
|
-
const L = Array.from(Re.values()), q = L.filter(
|
|
19895
|
+
const oe = { ordered: !1, maxPacketLifeTime: 300 * u.a.millisecond }, ge = { ordered: !0 }, Se = { ordered: !0 }, ve = { ordered: !1, maxRetransmits: 0 }, ye = { ordered: !1, maxRetransmits: 0 }, We = (Re) => "received" in Re && Re.received !== void 0, Ee = (Re) => !("received" in Re) || Re.received === void 0, be = 2 * u.a.second, Je = 10 * u.a.second;
|
|
19896
|
+
function je(Re, Z = {}) {
|
|
19897
|
+
const L = Array.from(Re.values()), q = L.filter(We), ie = q.length > 0, se = Math.max(...L.map((le) => le.sent)), ue = Math.max(...q.map((le) => le.received));
|
|
19893
19898
|
let fe;
|
|
19894
19899
|
if (ie) {
|
|
19895
|
-
const le = Date.now() - se <= u.a.millisecond ? L.length - 1 : L.length, me = q.length > le ? le : q.length, Ve = q.map((
|
|
19896
|
-
const
|
|
19897
|
-
if (
|
|
19900
|
+
const le = Date.now() - se <= u.a.millisecond ? L.length - 1 : L.length, me = q.length > le ? le : q.length, Ve = q.map((De) => De.received - De.sent), { standardDeviation: ke, mean: Le, jitter: Xe } = function(De) {
|
|
19901
|
+
const Ge = De.length;
|
|
19902
|
+
if (Ge === 0)
|
|
19898
19903
|
return { mean: NaN, standardDeviation: -1, jitter: NaN };
|
|
19899
|
-
const
|
|
19900
|
-
if (
|
|
19901
|
-
return { mean:
|
|
19902
|
-
let
|
|
19903
|
-
for (let
|
|
19904
|
-
|
|
19905
|
-
return { mean:
|
|
19906
|
-
}(Ve),
|
|
19907
|
-
fe = { pingsSent: le, pongsReceived: me, average:
|
|
19904
|
+
const He = De.reduce((qe, tt) => qe + tt, 0) / Ge, $e = Math.sqrt(De.map((qe) => Math.pow(qe - He, 2)).reduce((qe, tt) => qe + tt) / Ge);
|
|
19905
|
+
if (Ge === 1)
|
|
19906
|
+
return { mean: He, standardDeviation: $e, jitter: NaN };
|
|
19907
|
+
let Bt = 0;
|
|
19908
|
+
for (let qe = 1; qe < Ge; qe++)
|
|
19909
|
+
Bt += Math.abs(De[qe] - De[qe - 1]);
|
|
19910
|
+
return { mean: He, standardDeviation: $e, jitter: Bt / (Ge - 1) };
|
|
19911
|
+
}(Ve), Ke = L.filter((De) => De.sent < ue - be), et = Ke.filter(Ee), ze = et.length === 0 ? 0 : et.length / Ke.length;
|
|
19912
|
+
fe = { pingsSent: le, pongsReceived: me, average: Le, standardDeviation: ke, jitter: Xe, max: Math.max(...Ve), min: Math.min(...Ve), loss: ze };
|
|
19908
19913
|
} else
|
|
19909
19914
|
fe = null;
|
|
19910
|
-
const { temporalNow: Ue = Date.now() } = Z, ce = (ie ? ue : Ue) -
|
|
19915
|
+
const { temporalNow: Ue = Date.now() } = Z, ce = (ie ? ue : Ue) - Je;
|
|
19911
19916
|
return Array.from(Re.entries()).forEach((le) => {
|
|
19912
19917
|
const [me, Ve] = le;
|
|
19913
19918
|
Ve.sent < ce && Re.delete(me);
|
|
19914
19919
|
}), fe;
|
|
19915
19920
|
}
|
|
19916
|
-
function
|
|
19921
|
+
function Ae({ entityId: Re, streamName: Z, streamType: L }) {
|
|
19917
19922
|
return `${Re}.${Z}.${L}`;
|
|
19918
19923
|
}
|
|
19919
|
-
var
|
|
19924
|
+
var st = function(Re, Z, L, q) {
|
|
19920
19925
|
return new (L || (L = Promise))(function(ie, se) {
|
|
19921
19926
|
function ue(ce) {
|
|
19922
19927
|
try {
|
|
@@ -19941,7 +19946,7 @@ Found: ${s.toString().split(`
|
|
|
19941
19946
|
Ue((q = q.apply(Re, Z || [])).next());
|
|
19942
19947
|
});
|
|
19943
19948
|
};
|
|
19944
|
-
class
|
|
19949
|
+
class bt {
|
|
19945
19950
|
constructor(Z, L) {
|
|
19946
19951
|
this.counts = { localSent: /* @__PURE__ */ new Map(), localReceived: /* @__PURE__ */ new Map(), remoteSent: /* @__PURE__ */ new Map(), remoteReceived: /* @__PURE__ */ new Map() }, this.sessionId = Z, this.connection = L;
|
|
19947
19952
|
}
|
|
@@ -19960,11 +19965,11 @@ Found: ${s.toString().split(`
|
|
|
19960
19965
|
}), timestamp: Z };
|
|
19961
19966
|
}
|
|
19962
19967
|
incrementLocalSent(Z) {
|
|
19963
|
-
const { localSent: L } = this.counts, q =
|
|
19968
|
+
const { localSent: L } = this.counts, q = Ae(Z.header.stream);
|
|
19964
19969
|
L.set(q, (L.get(q) || 0) + 1);
|
|
19965
19970
|
}
|
|
19966
19971
|
incrementLocalReceived(Z) {
|
|
19967
|
-
const { localReceived: L } = this.counts, q =
|
|
19972
|
+
const { localReceived: L } = this.counts, q = Ae(Z.header.stream), ie = L.get(q) || 0;
|
|
19968
19973
|
if (ie === 0) {
|
|
19969
19974
|
const { streamName: se, streamType: ue } = Z.header.stream;
|
|
19970
19975
|
U.a.debug("RTC client received first message for stream", { streamName: se, streamType: ue });
|
|
@@ -19972,28 +19977,28 @@ Found: ${s.toString().split(`
|
|
|
19972
19977
|
L.set(q, ie + 1);
|
|
19973
19978
|
}
|
|
19974
19979
|
uploadMetrics() {
|
|
19975
|
-
return
|
|
19980
|
+
return st(this, void 0, void 0, function* () {
|
|
19976
19981
|
const { sessionId: Z } = this, L = yield this.connection.peerConnection.getStats(), q = {};
|
|
19977
19982
|
L.forEach((ce) => q[ce.id] = ce), U.a.debug("rtc-stats", Object.assign(Object.assign({}, q), { sessionId: Z }));
|
|
19978
19983
|
const { localSent: ie, localReceived: se, remoteSent: ue, remoteReceived: fe } = this.counts, Ue = [.../* @__PURE__ */ new Set([...ie.keys(), ...se.keys()])].reduce((ce, le) => {
|
|
19979
|
-
const me = ie.get(le), Ve = se.get(le),
|
|
19980
|
-
return Object.assign(Object.assign({}, ce), { [`local-${le}-sent`]: me, [`local-${le}-received`]: Ve, [`remote-${le}-sent`]:
|
|
19984
|
+
const me = ie.get(le), Ve = se.get(le), ke = ue.get(le), Le = fe.get(le);
|
|
19985
|
+
return Object.assign(Object.assign({}, ce), { [`local-${le}-sent`]: me, [`local-${le}-received`]: Ve, [`remote-${le}-sent`]: ke, [`remote-${le}-received`]: Le });
|
|
19981
19986
|
}, { sessionId: Z });
|
|
19982
19987
|
U.a.debug("rtc-message-report", Object.assign({ deviceId: this.connection.getRemoteDeviceId() }, Ue));
|
|
19983
19988
|
});
|
|
19984
19989
|
}
|
|
19985
19990
|
}
|
|
19986
|
-
function
|
|
19991
|
+
function Jt(Re, Z, L) {
|
|
19987
19992
|
return { header: { stream: Re, created: Date.now(), frameId: L || "" }, payload: Z };
|
|
19988
19993
|
}
|
|
19989
|
-
function
|
|
19994
|
+
function Et(Re) {
|
|
19990
19995
|
const Z = Re.localCandidate.candidateType, L = Re.remoteCandidate.candidateType;
|
|
19991
19996
|
return Z === "host" && L === "host" ? "local" : Z === "relay" || L === "relay" ? "TURN" : "STUN";
|
|
19992
19997
|
}
|
|
19993
|
-
function
|
|
19998
|
+
function ct(Re) {
|
|
19994
19999
|
return (/* @__PURE__ */ new Set(["disconnected", "failed", "closed"])).has(Re.iceConnectionState);
|
|
19995
20000
|
}
|
|
19996
|
-
function
|
|
20001
|
+
function Tt(Re) {
|
|
19997
20002
|
switch (Re.header.stream.streamType) {
|
|
19998
20003
|
case "twist": {
|
|
19999
20004
|
const { twist: Z } = Re.payload;
|
|
@@ -20028,7 +20033,7 @@ Found: ${s.toString().split(`
|
|
|
20028
20033
|
return Re;
|
|
20029
20034
|
}
|
|
20030
20035
|
}
|
|
20031
|
-
var
|
|
20036
|
+
var lt = function(Re, Z, L, q) {
|
|
20032
20037
|
return new (L || (L = Promise))(function(ie, se) {
|
|
20033
20038
|
function ue(ce) {
|
|
20034
20039
|
try {
|
|
@@ -20053,7 +20058,7 @@ Found: ${s.toString().split(`
|
|
|
20053
20058
|
Ue((q = q.apply(Re, Z || [])).next());
|
|
20054
20059
|
});
|
|
20055
20060
|
};
|
|
20056
|
-
class
|
|
20061
|
+
class vt {
|
|
20057
20062
|
get peerConnection() {
|
|
20058
20063
|
return re(this._peerConnection, "RTCPeerConnection is closed!"), this._peerConnection;
|
|
20059
20064
|
}
|
|
@@ -20065,7 +20070,7 @@ Found: ${s.toString().split(`
|
|
|
20065
20070
|
const fe = (/* @__PURE__ */ new Date()).getTime(), Ue = Object(D.a)();
|
|
20066
20071
|
this.sendSystemMessage(ue, { type: "ping-v2", payload: { timestamp: fe, id: Ue } }), this.pingV2Map.set(Ue, { sent: fe });
|
|
20067
20072
|
}, this.gatherPingV2Metrics = () => {
|
|
20068
|
-
const ue =
|
|
20073
|
+
const ue = je(this.pingV2Map);
|
|
20069
20074
|
if (ue) {
|
|
20070
20075
|
const fe = this.getRemoteDeviceId();
|
|
20071
20076
|
this.pingInfo = ue, x.aggregate("rtc-ping-average", ue.average, Object.assign({}, fe ? { deviceId: fe } : {})), x.aggregate("rtc-ping-loss", ue.loss, Object.assign({}, fe ? { deviceId: fe } : {})), x.aggregate("rtc-jitter", ue.jitter, Object.assign({}, fe ? { deviceId: fe } : {}));
|
|
@@ -20109,7 +20114,7 @@ Found: ${s.toString().split(`
|
|
|
20109
20114
|
}, this.heartbeatTimeoutMs);
|
|
20110
20115
|
}
|
|
20111
20116
|
handleSignal(Z) {
|
|
20112
|
-
return
|
|
20117
|
+
return lt(this, void 0, void 0, function* () {
|
|
20113
20118
|
const { peerConnection: L } = this, { track: q } = this.config.baseConfig, ie = (() => {
|
|
20114
20119
|
try {
|
|
20115
20120
|
return JSON.parse(Z.getPayload());
|
|
@@ -20164,8 +20169,8 @@ Found: ${s.toString().split(`
|
|
|
20164
20169
|
}
|
|
20165
20170
|
close() {
|
|
20166
20171
|
var Z, L, q, ie, se, ue, fe;
|
|
20167
|
-
return
|
|
20168
|
-
this.closeCalled || (this.closeCalled = !0, yield (Z = this.sessionMetrics) === null || Z === void 0 ? void 0 : Z.uploadMetrics(),
|
|
20172
|
+
return lt(this, void 0, void 0, function* () {
|
|
20173
|
+
this.closeCalled || (this.closeCalled = !0, yield (Z = this.sessionMetrics) === null || Z === void 0 ? void 0 : Z.uploadMetrics(), Ut(this.pingUpdateTimeout), Ut(this.pingV2UpdateTimeout), Ut(this.pingV2MetricsGatherTimeout), Ut(this.reassemblyTableCleanupTimeout), Ut(this.streamsInfoUpdateTimeout), Ut(this.heartbeatTimeout), (L = this._peerConnection) === null || L === void 0 || L.close(), (q = this.heartbeatChannel) === null || q === void 0 || q.close(), (ie = this.latestReliableStreamChannel) === null || ie === void 0 || ie.close(), (se = this.latestTryOnceStreamChannel) === null || se === void 0 || se.close(), (ue = this.latestTtlStreamChannel) === null || ue === void 0 || ue.close(), (fe = this.reliableStreamChannel) === null || fe === void 0 || fe.close(), this._peerConnection = null, this.heartbeatChannel = null, this.latestReliableStreamChannel = null, this.latestTryOnceStreamChannel = null, this.latestTtlStreamChannel = null, this.reliableStreamChannel = null);
|
|
20169
20174
|
});
|
|
20170
20175
|
}
|
|
20171
20176
|
getPing() {
|
|
@@ -20189,7 +20194,7 @@ Found: ${s.toString().split(`
|
|
|
20189
20194
|
return (Z = this.config.remoteConfig) === null || Z === void 0 ? void 0 : Z.sessionId;
|
|
20190
20195
|
}
|
|
20191
20196
|
setSessionId(Z) {
|
|
20192
|
-
this.config.remoteConfig && (this.config.remoteConfig.sessionId = Z, this.sessionMetrics = new
|
|
20197
|
+
this.config.remoteConfig && (this.config.remoteConfig.sessionId = Z, this.sessionMetrics = new bt(Z, this));
|
|
20193
20198
|
}
|
|
20194
20199
|
getRemotePeerId() {
|
|
20195
20200
|
return this.config.baseConfig.remotePeerId;
|
|
@@ -20206,7 +20211,7 @@ Found: ${s.toString().split(`
|
|
|
20206
20211
|
return (Z = this.sessionMetrics) === null || Z === void 0 ? void 0 : Z.counts;
|
|
20207
20212
|
}
|
|
20208
20213
|
getConnectionStatsInfo() {
|
|
20209
|
-
return
|
|
20214
|
+
return lt(this, void 0, void 0, function* () {
|
|
20210
20215
|
const { peerConnection: Z } = this;
|
|
20211
20216
|
if (!Z)
|
|
20212
20217
|
return;
|
|
@@ -20229,55 +20234,55 @@ Found: ${s.toString().split(`
|
|
|
20229
20234
|
}
|
|
20230
20235
|
getOffer() {
|
|
20231
20236
|
var Z, L;
|
|
20232
|
-
return
|
|
20237
|
+
return lt(this, void 0, void 0, function* () {
|
|
20233
20238
|
const { gotOffer: q } = this, { peerConnection: ie, config: se } = this;
|
|
20234
20239
|
if (this.config.baseConfig.isLan)
|
|
20235
20240
|
throw new Error('"getOffer" method can only be called with internet connections. LAN connections should call the "getLanOffer" method.');
|
|
20236
20241
|
const ue = (Z = this.config.remoteConfig) === null || Z === void 0 ? void 0 : Z.sessionId;
|
|
20237
20242
|
if (q)
|
|
20238
20243
|
return void U.a.debug("Failed to generate offer because gotOffer was already called.");
|
|
20239
|
-
if (this.gotOffer = !0,
|
|
20244
|
+
if (this.gotOffer = !0, ct(this.peerConnection))
|
|
20240
20245
|
return void U.a.debug("Failed to generate offer because the peer connection was inactive.");
|
|
20241
20246
|
const fe = se.baseConfig.track;
|
|
20242
20247
|
ie.onicecandidate = () => {
|
|
20243
20248
|
this.hasIceCandidate = !0;
|
|
20244
|
-
}, ie.oniceconnectionstatechange = () =>
|
|
20245
|
-
const
|
|
20246
|
-
if (
|
|
20247
|
-
const
|
|
20248
|
-
U.a.info("ICE connection state changed to " +
|
|
20249
|
+
}, ie.oniceconnectionstatechange = () => lt(this, void 0, void 0, function* () {
|
|
20250
|
+
const ke = ie.iceConnectionState;
|
|
20251
|
+
if (ke === "connected" || ke === "completed") {
|
|
20252
|
+
const Le = yield this.getConnectionStatsInfo(), Xe = Le ? Et(Le) : void 0;
|
|
20253
|
+
U.a.info("ICE connection state changed to " + ke, { sessionId: ue, connectionStatsInfo: Le, iceMode: Xe }), fe == null || fe("ICE connection state change", { iceConnectionState: ke, sessionId: ue, connectionStatsInfo: Le, iceMode: Xe });
|
|
20249
20254
|
}
|
|
20250
20255
|
}), yield ie.setLocalDescription(yield ie.createOffer());
|
|
20251
20256
|
const Ue = ie.getConfiguration ? ie.getConfiguration().iceTransportPolicy : "all", ce = (/* @__PURE__ */ new Date()).getTime();
|
|
20252
20257
|
for (; ; ) {
|
|
20253
|
-
const
|
|
20254
|
-
if (
|
|
20258
|
+
const ke = (/* @__PURE__ */ new Date()).getTime() - ce;
|
|
20259
|
+
if (ke > this.connectTimeoutMs)
|
|
20255
20260
|
return void U.a.debug("Failed to generate offer because ICE gathering timed out.");
|
|
20256
|
-
if (
|
|
20257
|
-
U.a.debug("ICE gathering partially completed; proceeding", { iceTransportPolicy: Ue, waitTime:
|
|
20261
|
+
if (ke > this.iceGatheringTimeoutMs && this.hasIceCandidate) {
|
|
20262
|
+
U.a.debug("ICE gathering partially completed; proceeding", { iceTransportPolicy: Ue, waitTime: ke }), fe == null || fe("ICE gathering partially completed", { sessionId: ue, iceTransportPolicy: Ue, waitTime: ke });
|
|
20258
20263
|
break;
|
|
20259
20264
|
}
|
|
20260
20265
|
if (ie.iceGatheringState === "complete") {
|
|
20261
|
-
U.a.debug("ICE gathering complete", { iceTransportPolicy: Ue, waitTime:
|
|
20266
|
+
U.a.debug("ICE gathering complete", { iceTransportPolicy: Ue, waitTime: ke }), fe == null || fe("ICE gathering completed", { sessionId: ue, iceTransportPolicy: Ue, waitTime: ke });
|
|
20262
20267
|
break;
|
|
20263
20268
|
}
|
|
20264
20269
|
yield Object(c.a)(0.1 * u.a.second);
|
|
20265
20270
|
}
|
|
20266
20271
|
const le = (L = this.iceServers) !== null && L !== void 0 ? L : [];
|
|
20267
|
-
for (const
|
|
20268
|
-
"credentialType" in
|
|
20272
|
+
for (const ke of le)
|
|
20273
|
+
"credentialType" in ke && (ke.credentialType = void 0);
|
|
20269
20274
|
const me = JSON.stringify(le), Ve = new G.Signal();
|
|
20270
20275
|
return Ve.setPayload(JSON.stringify(ie.localDescription)), Ve.setSenderId(this.config.baseConfig.localPeerId), Ve.setReceiverId(this.config.baseConfig.remotePeerId), Ve.setIceServers(me), Ve.setIceTransportPolicy(Ue != null ? Ue : "all"), this.config.baseConfig.sessionType !== void 0 ? Ve.setSessionType(this.config.baseConfig.sessionType) : Ve.setSessionType(G.SessionType.TELEOP), U.a.debug("Sending offer signal with description", { description: Ve.getPayload() }), Ve;
|
|
20271
20276
|
});
|
|
20272
20277
|
}
|
|
20273
20278
|
getLanOffer() {
|
|
20274
|
-
return
|
|
20279
|
+
return lt(this, void 0, void 0, function* () {
|
|
20275
20280
|
const { peerConnection: Z, gotOffer: L } = this;
|
|
20276
20281
|
if (!this.config.baseConfig.isLan)
|
|
20277
20282
|
throw new Error('"getLanOffer" method can only be used with LAN connections. Internet connections should call the "getOffer" method.');
|
|
20278
20283
|
if (L)
|
|
20279
20284
|
return void U.a.debug("Failed to generate offer because gotOffer was already called.");
|
|
20280
|
-
if (this.gotOffer = !0,
|
|
20285
|
+
if (this.gotOffer = !0, ct(this.peerConnection))
|
|
20281
20286
|
return void U.a.debug("Failed to generate offer because the peer connection was inactive.");
|
|
20282
20287
|
yield Z.setLocalDescription(yield Z.createOffer());
|
|
20283
20288
|
const q = (/* @__PURE__ */ new Date()).getTime();
|
|
@@ -20295,7 +20300,7 @@ Found: ${s.toString().split(`
|
|
|
20295
20300
|
});
|
|
20296
20301
|
}
|
|
20297
20302
|
handleLanAnswer(Z) {
|
|
20298
|
-
return
|
|
20303
|
+
return lt(this, void 0, void 0, function* () {
|
|
20299
20304
|
const { peerConnection: L } = this;
|
|
20300
20305
|
if (!this.config.baseConfig.isLan)
|
|
20301
20306
|
throw new Error('"handleLanAnswer" method can only be used with LAN connections. Internet connections should call the "handleSignal" method.');
|
|
@@ -20354,7 +20359,7 @@ Found: ${s.toString().split(`
|
|
|
20354
20359
|
receiveChannelMessage(Z, L) {
|
|
20355
20360
|
var q;
|
|
20356
20361
|
const { config: ie } = this, { remotePeerId: se } = this.config.baseConfig;
|
|
20357
|
-
this.lastMessageTimestamp = (/* @__PURE__ */ new Date()).getTime(), L =
|
|
20362
|
+
this.lastMessageTimestamp = (/* @__PURE__ */ new Date()).getTime(), L = Tt(L), (q = this.sessionMetrics) === null || q === void 0 || q.incrementLocalReceived(L), !this.handleSystemMessage(Z, L) && ((Z === this.latestTryOnceStreamChannel || Z === this.latestTtlStreamChannel || Z === this.latestReliableStreamChannel) && !this.isLatestMessage(L) || ie.baseConfig.receive(se, L));
|
|
20358
20363
|
}
|
|
20359
20364
|
receiveChannelMessageChunk(Z, L) {
|
|
20360
20365
|
const q = this.reassemblyTable.get(L.id) || [];
|
|
@@ -20423,17 +20428,17 @@ Found: ${s.toString().split(`
|
|
|
20423
20428
|
case "streams-info":
|
|
20424
20429
|
fe = { streamsInfo: (q = this.sessionMetrics) === null || q === void 0 ? void 0 : q.getLocalStreamsInfo((/* @__PURE__ */ new Date()).getTime()) };
|
|
20425
20430
|
}
|
|
20426
|
-
this.sendOnChannel(Z,
|
|
20431
|
+
this.sendOnChannel(Z, Jt(ue, fe));
|
|
20427
20432
|
}
|
|
20428
20433
|
isLatestMessage(Z) {
|
|
20429
|
-
const L =
|
|
20434
|
+
const L = Ae(Z.header.stream), q = (this.streamLatestTimestamp.get(L) || 0) <= Z.header.created;
|
|
20430
20435
|
return q && this.streamLatestTimestamp.set(L, Z.header.created), q;
|
|
20431
20436
|
}
|
|
20432
20437
|
}
|
|
20433
|
-
function
|
|
20438
|
+
function Ut(Re) {
|
|
20434
20439
|
Re && clearInterval(Re);
|
|
20435
20440
|
}
|
|
20436
|
-
function
|
|
20441
|
+
function _t() {
|
|
20437
20442
|
U.a.debug("forceGarbageCollection() triggered"), queueMicrotask(() => {
|
|
20438
20443
|
let Re = document.createElement("img");
|
|
20439
20444
|
Re.src = window.URL.createObjectURL(new Blob([new ArrayBuffer(5e7)])), Re.onerror = function() {
|
|
@@ -20441,18 +20446,18 @@ Found: ${s.toString().split(`
|
|
|
20441
20446
|
};
|
|
20442
20447
|
});
|
|
20443
20448
|
}
|
|
20444
|
-
function
|
|
20449
|
+
function At(Re) {
|
|
20445
20450
|
try {
|
|
20446
20451
|
return Re instanceof Error ? `${Re.name}: ${Re.message}` : typeof Re == "object" ? JSON.stringify(Re) : String(Re);
|
|
20447
20452
|
} catch {
|
|
20448
20453
|
return "Unknown error";
|
|
20449
20454
|
}
|
|
20450
20455
|
}
|
|
20451
|
-
function
|
|
20456
|
+
function dt(Re) {
|
|
20452
20457
|
var Z, L;
|
|
20453
20458
|
return { userId: (Z = Re.getUserId()) === null || Z === void 0 ? void 0 : Z.getValue(), deviceId: (L = Re.getDeviceId()) === null || L === void 0 ? void 0 : L.getValue(), organizationId: Re.getOrganizationId(), id: Re.getPeerId(), capabilities: [], capabilitySet: {} };
|
|
20454
20459
|
}
|
|
20455
|
-
var
|
|
20460
|
+
var Oe = function(Re, Z, L, q) {
|
|
20456
20461
|
return new (L || (L = Promise))(function(ie, se) {
|
|
20457
20462
|
function ue(ce) {
|
|
20458
20463
|
try {
|
|
@@ -20477,12 +20482,12 @@ Found: ${s.toString().split(`
|
|
|
20477
20482
|
Ue((q = q.apply(Re, Z || [])).next());
|
|
20478
20483
|
});
|
|
20479
20484
|
};
|
|
20480
|
-
const
|
|
20481
|
-
class
|
|
20485
|
+
const ft = (Re) => Re.map((Z) => Object.assign(Object.assign(Object.assign({}, Z), Z.username ? { username: "<REDACTED>" } : null), Z.credential ? { credential: "<REDACTED>" } : null));
|
|
20486
|
+
class xt {
|
|
20482
20487
|
constructor(Z) {
|
|
20483
20488
|
this.config = Z, this.grpcCallDeadline = 5 * u.a.second, this.refreshIntervalDelayMs = 2 * u.a.second, this.iceServersTtl = 30 * u.a.minute, this.connections = [], this.localConnections = [], this.isConnectionInitiator = /* @__PURE__ */ new WeakSet(), this.isOutgoingConnection = /* @__PURE__ */ new Set(), this.peerDataChannelListeners = [], this.rtcInstancesConstructed = 0, this.statsLoopsExecuted = 0;
|
|
20484
20489
|
const { refreshIntervalDelayMs: L } = this;
|
|
20485
|
-
this.refreshInterval = T({ func: () =>
|
|
20490
|
+
this.refreshInterval = T({ func: () => Oe(this, void 0, void 0, function* () {
|
|
20486
20491
|
try {
|
|
20487
20492
|
yield this.update();
|
|
20488
20493
|
} catch (q) {
|
|
@@ -20499,15 +20504,15 @@ Found: ${s.toString().split(`
|
|
|
20499
20504
|
q ? q.isReady() ? q.controlRemoteStream(L) : U.a.warn("controlRemoteStream called with unready connection.") : U.a.warn("controlRemoteStream called with no connection.");
|
|
20500
20505
|
}
|
|
20501
20506
|
getLocalPeer() {
|
|
20502
|
-
return
|
|
20507
|
+
return Oe(this, void 0, void 0, function* () {
|
|
20503
20508
|
for (; !this.localPeer; )
|
|
20504
20509
|
yield Object(c.a)(0.1 * u.a.second);
|
|
20505
|
-
return
|
|
20510
|
+
return dt(this.localPeer);
|
|
20506
20511
|
});
|
|
20507
20512
|
}
|
|
20508
20513
|
connect(Z, L) {
|
|
20509
20514
|
var q, ie, se;
|
|
20510
|
-
return
|
|
20515
|
+
return Oe(this, void 0, void 0, function* () {
|
|
20511
20516
|
if (this.config.lanOnlyMode === !0)
|
|
20512
20517
|
throw new Error("connect method called in local only mode.");
|
|
20513
20518
|
const { track: ue, signalingClient: fe } = this.config, { localPeer: Ue, receiveSignalStream: ce, iceServers: le } = this;
|
|
@@ -20518,41 +20523,41 @@ Found: ${s.toString().split(`
|
|
|
20518
20523
|
if (this.isOutgoingConnection.has(Z))
|
|
20519
20524
|
return void U.a.warn("Connect called for peer with an existing outgoing connection offer.");
|
|
20520
20525
|
this.isOutgoingConnection.add(Z);
|
|
20521
|
-
const me = function(
|
|
20522
|
-
const { rtcIceTransportPolicies:
|
|
20523
|
-
const
|
|
20524
|
-
return
|
|
20525
|
-
}) })).filter(({ urls:
|
|
20526
|
-
return
|
|
20526
|
+
const me = function(ze, De, Ge) {
|
|
20527
|
+
const { rtcIceTransportPolicies: He, rtcIceServerProtocol: $e, useAllServers: Bt } = De || {}, qe = ze.map((tt) => Object.assign(Object.assign({}, tt), { urls: tt.urls.filter((gt) => {
|
|
20528
|
+
const Vt = (He === void 0 || He.some((Mt) => S(gt, Mt))) && ($e === void 0 || V(gt, $e));
|
|
20529
|
+
return Vt || U.a.debug("Ignoring ICE server: " + gt, { organizationId: Ge }), Vt;
|
|
20530
|
+
}) })).filter(({ urls: tt }) => tt.filter((gt) => gt).length > 0);
|
|
20531
|
+
return Bt ? qe : [k(qe, "stun"), k(qe, "turn")].filter((tt) => tt !== void 0).map((tt) => O(tt));
|
|
20527
20532
|
}(le, L);
|
|
20528
|
-
U.a.debug("Received ICE servers:",
|
|
20529
|
-
const Ve = new
|
|
20530
|
-
var
|
|
20531
|
-
return (
|
|
20532
|
-
} : void 0, track: this.config.lanOnlyMode ? void 0 : this.config.track, localUserId: (q = Ue.getUserId()) === null || q === void 0 ? void 0 : q.getValue(), localPeerId: Ue.getPeerId(), remotePeerId: Z, sessionType: this.config.sessionType }, remoteConfig: {} }, (
|
|
20533
|
-
if (!
|
|
20533
|
+
U.a.debug("Received ICE servers:", ft(le)), U.a.debug("Using ICE servers:", ft(me));
|
|
20534
|
+
const Ve = new vt(yield this.createRTCPeerConnection(me), me, { baseConfig: { isOffer: !0, isLan: !1, receive: (ze, De) => this.config.receive(ze, De), onStreamsInfoUpdate: this.config.onStreamsInfoUpdate ? (ze, De) => {
|
|
20535
|
+
var Ge, He;
|
|
20536
|
+
return (He = (Ge = this.config).onStreamsInfoUpdate) === null || He === void 0 ? void 0 : He.call(Ge, ze, De);
|
|
20537
|
+
} : void 0, track: this.config.lanOnlyMode ? void 0 : this.config.track, localUserId: (q = Ue.getUserId()) === null || q === void 0 ? void 0 : q.getValue(), localPeerId: Ue.getPeerId(), remotePeerId: Z, sessionType: this.config.sessionType }, remoteConfig: {} }, (ze) => this.onCustomDataChannel(Z, ze)), ke = yield Ve.getOffer();
|
|
20538
|
+
if (!ke)
|
|
20534
20539
|
return U.a.error("Failed to generate offer."), void this.isOutgoingConnection.delete(Z);
|
|
20535
|
-
U.a.debug("Sending offer."), ue == null || ue("Sending offer",
|
|
20536
|
-
const
|
|
20537
|
-
|
|
20538
|
-
const
|
|
20540
|
+
U.a.debug("Sending offer."), ue == null || ue("Sending offer", ke);
|
|
20541
|
+
const Le = new G.SendSignalRequest();
|
|
20542
|
+
Le.setSignal(ke);
|
|
20543
|
+
const Xe = yield (() => Oe(this, void 0, void 0, function* () {
|
|
20539
20544
|
try {
|
|
20540
|
-
return yield Y.withDeadline(fe.sendSignal(
|
|
20541
|
-
} catch (
|
|
20542
|
-
U.a.warn("Error when sending signal", { error:
|
|
20545
|
+
return yield Y.withDeadline(fe.sendSignal(Le, yield this.getMetadata()), this.grpcCallDeadline);
|
|
20546
|
+
} catch (ze) {
|
|
20547
|
+
U.a.warn("Error when sending signal", { error: ze });
|
|
20543
20548
|
}
|
|
20544
20549
|
}))();
|
|
20545
20550
|
if (!this.isOutgoingConnection.has(Z))
|
|
20546
20551
|
return void U.a.debug("No offer set after receiving offer signal response.");
|
|
20547
20552
|
U.a.debug("Offer sent.");
|
|
20548
|
-
const
|
|
20549
|
-
return
|
|
20553
|
+
const Ke = (ie = Xe == null ? void 0 : Xe.getSessionId()) === null || ie === void 0 ? void 0 : ie.getValue(), et = (se = Xe == null ? void 0 : Xe.getSessionCreatedTimestamp()) === null || se === void 0 ? void 0 : se.getValue();
|
|
20554
|
+
return Ke && et ? (Ve.setSessionId(Ke), Ve.setSessionCreatedTimestamp(et), this.isOutgoingConnection.delete(Z), this.connections.push(Ve), this.isConnectionInitiator.add(Ve), this.setupHandlers(Ve), Ke) : (U.a.warn("No session ID or no session created timestamp on send signal response."), void this.isOutgoingConnection.delete(Z));
|
|
20550
20555
|
});
|
|
20551
20556
|
}
|
|
20552
20557
|
connectLan(Z) {
|
|
20553
20558
|
var L, q;
|
|
20554
|
-
return
|
|
20555
|
-
const ie = new P(Z), se = new
|
|
20559
|
+
return Oe(this, void 0, void 0, function* () {
|
|
20560
|
+
const ie = new P(Z), se = new vt(yield this.createRTCPeerConnection([]), [], { baseConfig: { isOffer: !0, isLan: !0, receive: (ce, le) => this.config.receive(ce, le), onStreamsInfoUpdate: this.config.onStreamsInfoUpdate ? (ce, le) => {
|
|
20556
20561
|
var me, Ve;
|
|
20557
20562
|
return (Ve = (me = this.config).onStreamsInfoUpdate) === null || Ve === void 0 ? void 0 : Ve.call(me, ce, le);
|
|
20558
20563
|
} : void 0, track: this.config.lanOnlyMode ? void 0 : this.config.track, localUserId: (q = (L = this.localPeer) === null || L === void 0 ? void 0 : L.getUserId()) === null || q === void 0 ? void 0 : q.getValue(), localPeerId: "lan_client", remotePeerId: Z } }, (ce) => this.onCustomDataChannel(Z, ce)), ue = yield se.getLanOffer();
|
|
@@ -20589,23 +20594,23 @@ Found: ${s.toString().split(`
|
|
|
20589
20594
|
return L ? L.isReady() ? "connected" : "connecting" : "disconnected";
|
|
20590
20595
|
}
|
|
20591
20596
|
getConnectionStatsInfo(Z) {
|
|
20592
|
-
return
|
|
20597
|
+
return Oe(this, void 0, void 0, function* () {
|
|
20593
20598
|
const L = this.getActiveConnection(Z);
|
|
20594
20599
|
if (L)
|
|
20595
20600
|
return yield L.getConnectionStatsInfo();
|
|
20596
20601
|
});
|
|
20597
20602
|
}
|
|
20598
20603
|
disconnect(Z) {
|
|
20599
|
-
return
|
|
20604
|
+
return Oe(this, void 0, void 0, function* () {
|
|
20600
20605
|
const L = this.getActiveConnection(Z);
|
|
20601
20606
|
L && (yield L.close(), this.connections = this.connections.filter((q) => q !== L), this.localConnections = this.localConnections.filter((q) => q !== L));
|
|
20602
20607
|
});
|
|
20603
20608
|
}
|
|
20604
20609
|
getPeers() {
|
|
20605
|
-
return
|
|
20610
|
+
return Oe(this, void 0, void 0, function* () {
|
|
20606
20611
|
if (this.config.lanOnlyMode)
|
|
20607
20612
|
throw new Error("getPeers method cannot be used in local-only mode.");
|
|
20608
|
-
const { signalingClient: Z } = this.config, L = yield (() =>
|
|
20613
|
+
const { signalingClient: Z } = this.config, L = yield (() => Oe(this, void 0, void 0, function* () {
|
|
20609
20614
|
try {
|
|
20610
20615
|
return yield Y.withDeadline(Z.getPeers(new G.GetPeersRequest(), yield this.getMetadata()), this.grpcCallDeadline);
|
|
20611
20616
|
} catch (se) {
|
|
@@ -20621,14 +20626,14 @@ Found: ${s.toString().split(`
|
|
|
20621
20626
|
var ue, fe;
|
|
20622
20627
|
return (fe = (ue = se.getPeerCreatedTimestamp()) === null || ue === void 0 ? void 0 : ue.getValue()) !== null && fe !== void 0 ? fe : 0;
|
|
20623
20628
|
};
|
|
20624
|
-
return q.sort((se, ue) => ie(ue) - ie(se)).map((se) =>
|
|
20629
|
+
return q.sort((se, ue) => ie(ue) - ie(se)).map((se) => dt(se));
|
|
20625
20630
|
});
|
|
20626
20631
|
}
|
|
20627
20632
|
getSessions() {
|
|
20628
|
-
return
|
|
20633
|
+
return Oe(this, void 0, void 0, function* () {
|
|
20629
20634
|
if (this.config.lanOnlyMode)
|
|
20630
20635
|
throw new Error("getPeers method cannot be used in local-only mode.");
|
|
20631
|
-
const { signalingClient: Z } = this.config, L = yield (() =>
|
|
20636
|
+
const { signalingClient: Z } = this.config, L = yield (() => Oe(this, void 0, void 0, function* () {
|
|
20632
20637
|
try {
|
|
20633
20638
|
return yield Y.withDeadline(Z.getPeers(new G.GetPeersRequest(), yield this.getMetadata()), this.grpcCallDeadline);
|
|
20634
20639
|
} catch (se) {
|
|
@@ -20674,7 +20679,7 @@ Found: ${s.toString().split(`
|
|
|
20674
20679
|
return !!(Z && L && q);
|
|
20675
20680
|
}
|
|
20676
20681
|
shutdown() {
|
|
20677
|
-
return
|
|
20682
|
+
return Oe(this, void 0, void 0, function* () {
|
|
20678
20683
|
yield this.refreshInterval.stop(), this.receiveSignalStream && this.receiveSignalStream.cancel();
|
|
20679
20684
|
const Z = this.connections;
|
|
20680
20685
|
this.connections = [], yield this.closeConnections(Z);
|
|
@@ -20684,7 +20689,7 @@ Found: ${s.toString().split(`
|
|
|
20684
20689
|
if (!q || this.config.lanOnlyMode)
|
|
20685
20690
|
return;
|
|
20686
20691
|
const { signalingClient: ie } = this.config;
|
|
20687
|
-
yield (() =>
|
|
20692
|
+
yield (() => Oe(this, void 0, void 0, function* () {
|
|
20688
20693
|
try {
|
|
20689
20694
|
const se = new G.DeletePeerRequest();
|
|
20690
20695
|
se.setPeerId(q.getPeerId()), yield Y.withDeadline(ie.deletePeer(se, yield this.getMetadata()), this.grpcCallDeadline);
|
|
@@ -20695,16 +20700,16 @@ Found: ${s.toString().split(`
|
|
|
20695
20700
|
});
|
|
20696
20701
|
}
|
|
20697
20702
|
createPeer() {
|
|
20698
|
-
return
|
|
20703
|
+
return Oe(this, void 0, void 0, function* () {
|
|
20699
20704
|
if (this.config.lanOnlyMode)
|
|
20700
20705
|
throw new Error("createPeer method cannot be used in local-only mode.");
|
|
20701
|
-
const { signalingClient: Z } = this.config, L = yield (() =>
|
|
20706
|
+
const { signalingClient: Z } = this.config, L = yield (() => Oe(this, void 0, void 0, function* () {
|
|
20702
20707
|
try {
|
|
20703
20708
|
return yield Y.withDeadline(Z.createPeer(new G.CreatePeerRequest(), yield this.getMetadata()), this.grpcCallDeadline);
|
|
20704
20709
|
} catch (ie) {
|
|
20705
20710
|
const se = ie;
|
|
20706
20711
|
U.a.debug("createPeer failed", { error: se });
|
|
20707
|
-
const ue =
|
|
20712
|
+
const ue = At(se);
|
|
20708
20713
|
throw new Error("Was not able to create peer: " + ue);
|
|
20709
20714
|
}
|
|
20710
20715
|
}))(), q = L == null ? void 0 : L.getPeer();
|
|
@@ -20714,7 +20719,7 @@ Found: ${s.toString().split(`
|
|
|
20714
20719
|
});
|
|
20715
20720
|
}
|
|
20716
20721
|
createReceiveSignalStream() {
|
|
20717
|
-
return
|
|
20722
|
+
return Oe(this, void 0, void 0, function* () {
|
|
20718
20723
|
if (this.config.lanOnlyMode)
|
|
20719
20724
|
throw new Error("createReceiveSignalStream method cannot be used in local-only mode.");
|
|
20720
20725
|
const { signalingClient: Z } = this.config, { localPeer: L, iceServers: q } = this;
|
|
@@ -20724,41 +20729,41 @@ Found: ${s.toString().split(`
|
|
|
20724
20729
|
ie && ie.cancel();
|
|
20725
20730
|
const se = new G.ReceiveSignalStreamRequest();
|
|
20726
20731
|
se.setPeerId(L.getPeerId());
|
|
20727
|
-
const ue = yield (() =>
|
|
20732
|
+
const ue = yield (() => Oe(this, void 0, void 0, function* () {
|
|
20728
20733
|
try {
|
|
20729
20734
|
return Z.receiveSignalStream(se, yield this.getMetadata({ hasDeadline: !1 }));
|
|
20730
20735
|
} catch (fe) {
|
|
20731
20736
|
U.a.debug("createReceiveSignalStream failed", { error: fe });
|
|
20732
|
-
const Ue =
|
|
20737
|
+
const Ue = At(fe);
|
|
20733
20738
|
throw new Error("Unable to create receive signal stream: " + Ue);
|
|
20734
20739
|
}
|
|
20735
20740
|
}))();
|
|
20736
20741
|
if (!ue)
|
|
20737
20742
|
throw new Error("Response did not provide stream.");
|
|
20738
|
-
return ue.on("data", (fe) =>
|
|
20743
|
+
return ue.on("data", (fe) => Oe(this, void 0, void 0, function* () {
|
|
20739
20744
|
var Ue, ce, le, me;
|
|
20740
|
-
const Ve = fe.getSignal(),
|
|
20741
|
-
if (!(Ve &&
|
|
20745
|
+
const Ve = fe.getSignal(), ke = (Ue = Ve == null ? void 0 : Ve.getSessionId()) === null || Ue === void 0 ? void 0 : Ue.getValue(), Le = Ve == null ? void 0 : Ve.getSenderId(), Xe = Ve == null ? void 0 : Ve.getReceiverId(), Ke = (ce = Ve == null ? void 0 : Ve.getSessionCreatedTimestamp()) === null || ce === void 0 ? void 0 : ce.getValue();
|
|
20746
|
+
if (!(Ve && ke && Le && Xe && Ke))
|
|
20742
20747
|
return void U.a.warn("Received signal with missing information.");
|
|
20743
|
-
const
|
|
20744
|
-
if (
|
|
20745
|
-
if (
|
|
20746
|
-
if (U.a.debug("Received signal: different session for a peer we're already connected to."), (
|
|
20748
|
+
const et = this.getActiveConnection(Le);
|
|
20749
|
+
if (et)
|
|
20750
|
+
if (et.getSessionId() !== ke) {
|
|
20751
|
+
if (U.a.debug("Received signal: different session for a peer we're already connected to."), (et.getSessionCreatedTimestamp() || 0) > Ke)
|
|
20747
20752
|
return;
|
|
20748
|
-
const
|
|
20749
|
-
var
|
|
20750
|
-
return (
|
|
20751
|
-
} : void 0, track: this.config.lanOnlyMode ? void 0 : this.config.track, localPeerId: L.getPeerId(), localUserId: (me = L.getUserId()) === null || me === void 0 ? void 0 : me.getValue(), remotePeerId:
|
|
20752
|
-
yield
|
|
20753
|
+
const ze = new vt(yield this.createRTCPeerConnection(q), q, { baseConfig: { isOffer: !1, isLan: !1, receive: (De, Ge) => this.config.receive(De, Ge), onStreamsInfoUpdate: this.config.onStreamsInfoUpdate ? (De, Ge) => {
|
|
20754
|
+
var He, $e;
|
|
20755
|
+
return ($e = (He = this.config).onStreamsInfoUpdate) === null || $e === void 0 ? void 0 : $e.call(He, De, Ge);
|
|
20756
|
+
} : void 0, track: this.config.lanOnlyMode ? void 0 : this.config.track, localPeerId: L.getPeerId(), localUserId: (me = L.getUserId()) === null || me === void 0 ? void 0 : me.getValue(), remotePeerId: Le }, remoteConfig: { sessionId: ke, sessionCreatedTimestamp: Ke } }, (De) => this.onCustomDataChannel(Le, De));
|
|
20757
|
+
yield ze.handleSignal(Ve), this.connections.push(ze);
|
|
20753
20758
|
} else
|
|
20754
|
-
U.a.debug("Received signal: for an existing connection."), yield
|
|
20759
|
+
U.a.debug("Received signal: for an existing connection."), yield et.handleSignal(Ve);
|
|
20755
20760
|
else {
|
|
20756
20761
|
U.a.debug("Received signal: new connection.");
|
|
20757
|
-
const
|
|
20758
|
-
var
|
|
20759
|
-
return (
|
|
20760
|
-
} : void 0, track: this.config.lanOnlyMode ? void 0 : this.config.track, localPeerId: L.getPeerId(), localUserId: (le = L.getUserId()) === null || le === void 0 ? void 0 : le.getValue(), remotePeerId:
|
|
20761
|
-
yield
|
|
20762
|
+
const ze = new vt(yield this.createRTCPeerConnection(q), q, { baseConfig: { isOffer: !1, isLan: !1, receive: (De, Ge) => this.config.receive(De, Ge), onStreamsInfoUpdate: this.config.onStreamsInfoUpdate ? (De, Ge) => {
|
|
20763
|
+
var He, $e;
|
|
20764
|
+
return ($e = (He = this.config).onStreamsInfoUpdate) === null || $e === void 0 ? void 0 : $e.call(He, De, Ge);
|
|
20765
|
+
} : void 0, track: this.config.lanOnlyMode ? void 0 : this.config.track, localPeerId: L.getPeerId(), localUserId: (le = L.getUserId()) === null || le === void 0 ? void 0 : le.getValue(), remotePeerId: Le }, remoteConfig: { sessionId: ke, sessionCreatedTimestamp: Ke } }, (De) => this.onCustomDataChannel(Le, De));
|
|
20766
|
+
yield ze.handleSignal(Ve), this.connections.push(ze);
|
|
20762
20767
|
}
|
|
20763
20768
|
})), ue.on("end", () => {
|
|
20764
20769
|
ue.cancel(), this.receiveSignalStream = void 0;
|
|
@@ -20781,7 +20786,7 @@ Found: ${s.toString().split(`
|
|
|
20781
20786
|
}
|
|
20782
20787
|
createRTCPeerConnection(Z) {
|
|
20783
20788
|
var L;
|
|
20784
|
-
return
|
|
20789
|
+
return Oe(this, void 0, void 0, function* () {
|
|
20785
20790
|
const q = (L = this.config.alternateRTCPeerConnection) !== null && L !== void 0 ? L : window.RTCPeerConnection;
|
|
20786
20791
|
if (!q)
|
|
20787
20792
|
throw function() {
|
|
@@ -20790,7 +20795,7 @@ Found: ${s.toString().split(`
|
|
|
20790
20795
|
const { userAgent: ie } = navigator;
|
|
20791
20796
|
return ie.includes("Firefox/") ? "Firefox" : ie.includes("Edg/") ? "Edge" : ie.includes("Chrome/") ? "Chrome" : ie.includes("Safari/") ? "Safari" : ie.includes("MSIE/") || ie.includes("Trident/") ? "IE" : "Other";
|
|
20792
20797
|
}() !== "Chrome" ? new Error("WebRTC is not enabled. Please try again with the latest version of Google Chrome.") : new Error("WebRTC is not enabled. Please ensure WebRTC is not disabled by ad blocking software.");
|
|
20793
|
-
this.rtcInstancesConstructed++, this.rtcInstancesConstructed % 20 ||
|
|
20798
|
+
this.rtcInstancesConstructed++, this.rtcInstancesConstructed % 20 || _t();
|
|
20794
20799
|
try {
|
|
20795
20800
|
return new q({ iceServers: Z });
|
|
20796
20801
|
} catch (ie) {
|
|
@@ -20799,8 +20804,8 @@ Found: ${s.toString().split(`
|
|
|
20799
20804
|
});
|
|
20800
20805
|
}
|
|
20801
20806
|
closeConnections(Z) {
|
|
20802
|
-
return
|
|
20803
|
-
const L = yield $(Z.map((q) =>
|
|
20807
|
+
return Oe(this, void 0, void 0, function* () {
|
|
20808
|
+
const L = yield $(Z.map((q) => Oe(this, void 0, void 0, function* () {
|
|
20804
20809
|
yield q.close();
|
|
20805
20810
|
})));
|
|
20806
20811
|
for (const q of L)
|
|
@@ -20812,7 +20817,7 @@ Found: ${s.toString().split(`
|
|
|
20812
20817
|
}
|
|
20813
20818
|
update() {
|
|
20814
20819
|
var Z;
|
|
20815
|
-
return
|
|
20820
|
+
return Oe(this, void 0, void 0, function* () {
|
|
20816
20821
|
if (this.localConnections = this.localConnections.filter((me) => me.isActive()), this.config.lanOnlyMode)
|
|
20817
20822
|
return;
|
|
20818
20823
|
const { signalingClient: L } = this.config;
|
|
@@ -20820,9 +20825,9 @@ Found: ${s.toString().split(`
|
|
|
20820
20825
|
const me = [];
|
|
20821
20826
|
return this.localPeer || me.push(this.createPeer()), this.iceServers || me.push(this.updateIceServers()), yield Promise.all(me), void (this.receiveSignalStream || (yield this.createReceiveSignalStream()));
|
|
20822
20827
|
}
|
|
20823
|
-
const [q, ie] = (se = this.connections, ue = (me) => me.isActive(), se.reduce((me, Ve,
|
|
20824
|
-
const [
|
|
20825
|
-
return (ue(Ve,
|
|
20828
|
+
const [q, ie] = (se = this.connections, ue = (me) => me.isActive(), se.reduce((me, Ve, ke, Le) => {
|
|
20829
|
+
const [Xe, Ke] = me;
|
|
20830
|
+
return (ue(Ve, ke, Le) ? Xe : Ke).push(Ve), me;
|
|
20826
20831
|
}, [[], []]));
|
|
20827
20832
|
var se, ue;
|
|
20828
20833
|
yield this.closeConnections(ie), this.connections = q, this.gatherConnectionStats().catch((me) => {
|
|
@@ -20843,20 +20848,20 @@ Found: ${s.toString().split(`
|
|
|
20843
20848
|
});
|
|
20844
20849
|
}
|
|
20845
20850
|
gatherConnectionStats() {
|
|
20846
|
-
return
|
|
20851
|
+
return Oe(this, void 0, void 0, function* () {
|
|
20847
20852
|
if (this.statsLoopsExecuted % 10 != 0 || this.connections.length !== 1)
|
|
20848
20853
|
return;
|
|
20849
|
-
const Z = yield this.connections[0].getConnectionStatsInfo(), L = Z ?
|
|
20854
|
+
const Z = yield this.connections[0].getConnectionStatsInfo(), L = Z ? Et(Z) : void 0;
|
|
20850
20855
|
L ? x.setTag("rtc-connection-type", L) : x.setTag("rtc-connection-type", "unknown");
|
|
20851
20856
|
});
|
|
20852
20857
|
}
|
|
20853
20858
|
reset() {
|
|
20854
|
-
return
|
|
20859
|
+
return Oe(this, void 0, void 0, function* () {
|
|
20855
20860
|
yield this.closeConnections(this.connections), this.connections = [], this.isOutgoingConnection.clear(), yield this.createPeer(), yield this.createReceiveSignalStream();
|
|
20856
20861
|
});
|
|
20857
20862
|
}
|
|
20858
20863
|
updateIceServers() {
|
|
20859
|
-
return
|
|
20864
|
+
return Oe(this, void 0, void 0, function* () {
|
|
20860
20865
|
if (this.config.lanOnlyMode)
|
|
20861
20866
|
return;
|
|
20862
20867
|
const { iceServersLastUpdate: Z, iceServersTtl: L } = this, q = (/* @__PURE__ */ new Date()).getTime();
|
|
@@ -20871,7 +20876,7 @@ Found: ${s.toString().split(`
|
|
|
20871
20876
|
}
|
|
20872
20877
|
setupHandlers(Z) {
|
|
20873
20878
|
const { peerConnection: L } = Z, q = Z.getSessionCreatedTimestamp();
|
|
20874
|
-
L.onconnectionstatechange = () =>
|
|
20879
|
+
L.onconnectionstatechange = () => Oe(this, void 0, void 0, function* () {
|
|
20875
20880
|
const ie = L.connectionState;
|
|
20876
20881
|
if (!q)
|
|
20877
20882
|
return;
|
|
@@ -20886,7 +20891,7 @@ Found: ${s.toString().split(`
|
|
|
20886
20891
|
});
|
|
20887
20892
|
}
|
|
20888
20893
|
getMetadata(Z = {}) {
|
|
20889
|
-
return
|
|
20894
|
+
return Oe(this, void 0, void 0, function* () {
|
|
20890
20895
|
if (this.config.lanOnlyMode)
|
|
20891
20896
|
throw new Error("getMetadata method cannot be called in local-only mode");
|
|
20892
20897
|
const { getToken: L } = this.config, { grpcCallDeadline: q } = this, { hasDeadline: ie = !0 } = Z, se = ie ? { deadline: (Date.now() + q).toString(10) } : null;
|
|
@@ -20899,7 +20904,7 @@ Found: ${s.toString().split(`
|
|
|
20899
20904
|
});
|
|
20900
20905
|
}
|
|
20901
20906
|
}
|
|
20902
|
-
var
|
|
20907
|
+
var rt = n(12), Ft = n(11), Lt = function(Re, Z, L, q) {
|
|
20903
20908
|
return new (L || (L = Promise))(function(ie, se) {
|
|
20904
20909
|
function ue(ce) {
|
|
20905
20910
|
try {
|
|
@@ -20924,20 +20929,20 @@ Found: ${s.toString().split(`
|
|
|
20924
20929
|
Ue((q = q.apply(Re, Z || [])).next());
|
|
20925
20930
|
});
|
|
20926
20931
|
};
|
|
20927
|
-
class
|
|
20932
|
+
class Wt {
|
|
20928
20933
|
constructor(Z, L) {
|
|
20929
20934
|
this.sentMessagesCounts = /* @__PURE__ */ new Map(), this.receivedMessagesCounts = /* @__PURE__ */ new Map(), this.sessionId = Z, this.connection = L;
|
|
20930
20935
|
}
|
|
20931
20936
|
incrementMessageSent(Z) {
|
|
20932
|
-
const L =
|
|
20937
|
+
const L = Ae(Z.header.stream);
|
|
20933
20938
|
this.sentMessagesCounts.set(L, (this.sentMessagesCounts.get(L) || 0) + 1);
|
|
20934
20939
|
}
|
|
20935
20940
|
incrementMessageReceived(Z) {
|
|
20936
|
-
const L =
|
|
20941
|
+
const L = Ae(Z.header.stream);
|
|
20937
20942
|
this.receivedMessagesCounts.set(L, (this.receivedMessagesCounts.get(L) || 0) + 1);
|
|
20938
20943
|
}
|
|
20939
20944
|
uploadMetrics() {
|
|
20940
|
-
return
|
|
20945
|
+
return Lt(this, void 0, void 0, function* () {
|
|
20941
20946
|
const { sessionId: Z } = this, L = yield this.connection.peerConnection.getStats(), q = {};
|
|
20942
20947
|
L.forEach((se) => q[se.id] = se), U.a.debug("rtc-stats", Object.assign(Object.assign({}, q), { sessionId: Z }));
|
|
20943
20948
|
const ie = [...new Set(Array.from(this.sentMessagesCounts.keys()).concat(Array.from(this.receivedMessagesCounts.keys())))].reduce((se, ue) => {
|
|
@@ -20948,10 +20953,10 @@ Found: ${s.toString().split(`
|
|
|
20948
20953
|
});
|
|
20949
20954
|
}
|
|
20950
20955
|
}
|
|
20951
|
-
function
|
|
20952
|
-
return
|
|
20956
|
+
function Qt(Re, Z) {
|
|
20957
|
+
return Ae(Re) === Ae(Z);
|
|
20953
20958
|
}
|
|
20954
|
-
var
|
|
20959
|
+
var ot = function(Re, Z, L, q) {
|
|
20955
20960
|
return new (L || (L = Promise))(function(ie, se) {
|
|
20956
20961
|
function ue(ce) {
|
|
20957
20962
|
try {
|
|
@@ -20976,7 +20981,7 @@ Found: ${s.toString().split(`
|
|
|
20976
20981
|
Ue((q = q.apply(Re, Z || [])).next());
|
|
20977
20982
|
});
|
|
20978
20983
|
};
|
|
20979
|
-
class
|
|
20984
|
+
class Ct {
|
|
20980
20985
|
constructor(Z, L) {
|
|
20981
20986
|
this.peerConnection = Z, this.config = L, this.connectTimeoutMs = 10 * u.a.second, this.gatherIceTimeoutMs = 5 * u.a.second, this.pingUpdateTimeoutMs = 2 * u.a.second, this.streamLatestTimestamp = /* @__PURE__ */ new Map(), this.closeCalled = !1, this.connectCalled = !1, this.sentOffer = !1, this.receivedIceCandidate = !1;
|
|
20982
20987
|
const { isOffer: q } = L;
|
|
@@ -20995,16 +21000,16 @@ Found: ${s.toString().split(`
|
|
|
20995
21000
|
this.latestTryOnceStreamChannel = ie.channel;
|
|
20996
21001
|
}
|
|
20997
21002
|
this.setupChannel(ie.channel);
|
|
20998
|
-
}, this.sessionMetrics = new
|
|
21003
|
+
}, this.sessionMetrics = new Wt(this.getSessionId(), this);
|
|
20999
21004
|
}
|
|
21000
21005
|
connect() {
|
|
21001
|
-
return
|
|
21006
|
+
return ot(this, void 0, void 0, function* () {
|
|
21002
21007
|
if (this.connectCalled)
|
|
21003
21008
|
return;
|
|
21004
21009
|
this.connectCalled = !0, this.pingUpdateTimeout = setInterval(() => {
|
|
21005
21010
|
const { reliableStreamChannel: ie } = this;
|
|
21006
21011
|
ie && this.sendSystemMessage(ie, { type: "ping" });
|
|
21007
|
-
}, this.pingUpdateTimeoutMs), this.connectTimeout = setTimeout(() =>
|
|
21012
|
+
}, this.pingUpdateTimeoutMs), this.connectTimeout = setTimeout(() => ot(this, void 0, void 0, function* () {
|
|
21008
21013
|
this.isReady() || (U.a.warn("RTC connect timed out, closing connection"), yield this.close());
|
|
21009
21014
|
}), this.connectTimeoutMs);
|
|
21010
21015
|
const { peerConnection: Z, config: { isOffer: L, sessionId: q } } = this;
|
|
@@ -21012,11 +21017,11 @@ Found: ${s.toString().split(`
|
|
|
21012
21017
|
const ie = yield Z.createOffer();
|
|
21013
21018
|
yield Z.setLocalDescription(ie);
|
|
21014
21019
|
}
|
|
21015
|
-
L && (this.gatherIceTimeout = setTimeout(() =>
|
|
21020
|
+
L && (this.gatherIceTimeout = setTimeout(() => ot(this, void 0, void 0, function* () {
|
|
21016
21021
|
this.sentOffer || (U.a.warn("ICE gathering timed out"), this.receivedIceCandidate ? (U.a.warn("Attempting to connect with partial ICE candidate pool"), yield this.sendOffer()) : yield this.close());
|
|
21017
|
-
}), this.gatherIceTimeoutMs), Z.onicecandidate = (ie) =>
|
|
21022
|
+
}), this.gatherIceTimeoutMs), Z.onicecandidate = (ie) => ot(this, void 0, void 0, function* () {
|
|
21018
21023
|
ie.candidate ? this.receivedIceCandidate = !0 : yield this.sendOffer();
|
|
21019
|
-
}), Z.onicegatheringstatechange = () =>
|
|
21024
|
+
}), Z.onicegatheringstatechange = () => ot(this, void 0, void 0, function* () {
|
|
21020
21025
|
Z.iceGatheringState === "complete" && (yield this.sendOffer());
|
|
21021
21026
|
}), Z.onnegotiationneeded = () => {
|
|
21022
21027
|
U.a.debug("Negotiation needed", { sessionId: q });
|
|
@@ -21024,7 +21029,7 @@ Found: ${s.toString().split(`
|
|
|
21024
21029
|
});
|
|
21025
21030
|
}
|
|
21026
21031
|
handleSignal(Z) {
|
|
21027
|
-
return
|
|
21032
|
+
return ot(this, void 0, void 0, function* () {
|
|
21028
21033
|
const { peerConnection: L, config: { sessionId: q, sendSignal: ie } } = this, { description: se } = JSON.parse(Z.payload);
|
|
21029
21034
|
if (U.a.debug("Handling signal", { sessionId: q, description: JSON.stringify(se) }), se)
|
|
21030
21035
|
if (L.signalingState !== "stable" || L.connectionState !== "connected")
|
|
@@ -21065,10 +21070,10 @@ Found: ${s.toString().split(`
|
|
|
21065
21070
|
if (this.isClosed())
|
|
21066
21071
|
return !1;
|
|
21067
21072
|
const se = /* @__PURE__ */ new Set(["closing", "closed"]), ue = (fe) => fe && se.has(fe.readyState);
|
|
21068
|
-
return
|
|
21073
|
+
return ct(Z) || ue(L) || ue(q) || ue(ie);
|
|
21069
21074
|
}
|
|
21070
21075
|
close() {
|
|
21071
|
-
return
|
|
21076
|
+
return ot(this, void 0, void 0, function* () {
|
|
21072
21077
|
this.closeCalled || (this.closeCalled = !0, yield this.sessionMetrics.uploadMetrics(), this.pingUpdateTimeout && clearInterval(this.pingUpdateTimeout), this.connectTimeout && clearTimeout(this.connectTimeout), this.gatherIceTimeout && clearTimeout(this.gatherIceTimeout), this.peerConnection.close());
|
|
21073
21078
|
});
|
|
21074
21079
|
}
|
|
@@ -21088,8 +21093,8 @@ Found: ${s.toString().split(`
|
|
|
21088
21093
|
this.latestTtlStreamChannel = Z.createDataChannel("stream.latest-ttl", oe), this.reliableStreamChannel = Z.createDataChannel("stream.reliable", ge), this.latestReliableStreamChannel = Z.createDataChannel("stream.latest-reliable", Se), this.latestTryOnceStreamChannel = Z.createDataChannel("stream.latest-try-once", ve), this.setupChannel(this.latestTtlStreamChannel), this.setupChannel(this.reliableStreamChannel), this.setupChannel(this.latestReliableStreamChannel), this.setupChannel(this.latestTryOnceStreamChannel);
|
|
21089
21094
|
}
|
|
21090
21095
|
sendOffer() {
|
|
21091
|
-
return
|
|
21092
|
-
if (this.sentOffer || (this.sentOffer = !0,
|
|
21096
|
+
return ot(this, void 0, void 0, function* () {
|
|
21097
|
+
if (this.sentOffer || (this.sentOffer = !0, ct(this.peerConnection)))
|
|
21093
21098
|
return;
|
|
21094
21099
|
const { peerConnection: Z, config: { sendSignal: L } } = this, q = yield Z.createOffer();
|
|
21095
21100
|
yield Z.setLocalDescription(q);
|
|
@@ -21135,7 +21140,7 @@ Found: ${s.toString().split(`
|
|
|
21135
21140
|
} catch (ie) {
|
|
21136
21141
|
return void U.a.warn("Received unparseable RTC message", { error: ie, channel: Z.label });
|
|
21137
21142
|
}
|
|
21138
|
-
if (this.lastMessageTimestamp = (/* @__PURE__ */ new Date()).getTime(), q =
|
|
21143
|
+
if (this.lastMessageTimestamp = (/* @__PURE__ */ new Date()).getTime(), q = Tt(q), this.sessionMetrics.incrementMessageReceived(q), !this.handleSystemMessage(Z, q)) {
|
|
21139
21144
|
if (!this.hasCapabilities(q))
|
|
21140
21145
|
return void U.a.warn("Received RTC message that was not within the capability scope of the connection.");
|
|
21141
21146
|
(Z === this.latestTryOnceStreamChannel || Z === this.latestTtlStreamChannel || Z === this.latestReliableStreamChannel) && !this.isLatestMessage(q) || this.config.receive(this.config.remotePeer.id, q);
|
|
@@ -21178,19 +21183,19 @@ Found: ${s.toString().split(`
|
|
|
21178
21183
|
case "stream-control":
|
|
21179
21184
|
ie = { streamControl: L.streamControl };
|
|
21180
21185
|
}
|
|
21181
|
-
this.sendOnChannel(Z,
|
|
21186
|
+
this.sendOnChannel(Z, Jt(q, ie));
|
|
21182
21187
|
}
|
|
21183
21188
|
hasCapabilities(Z) {
|
|
21184
21189
|
var L, q;
|
|
21185
|
-
const { localPeer: ie, remotePeer: se } = this.config, ue = (L = ie.capabilitySet.streaming) === null || L === void 0 ? void 0 : L.streams, fe = ue && ue.some((le) => le.receive &&
|
|
21190
|
+
const { localPeer: ie, remotePeer: se } = this.config, ue = (L = ie.capabilitySet.streaming) === null || L === void 0 ? void 0 : L.streams, fe = ue && ue.some((le) => le.receive && Qt(le.stream, Z.header.stream)), Ue = (q = se.capabilitySet.streaming) === null || q === void 0 ? void 0 : q.streams, ce = Ue && Ue.some((le) => le.send && Qt(le.stream, Z.header.stream));
|
|
21186
21191
|
return fe || ce;
|
|
21187
21192
|
}
|
|
21188
21193
|
isLatestMessage(Z) {
|
|
21189
|
-
const L =
|
|
21194
|
+
const L = Ae(Z.header.stream), q = (this.streamLatestTimestamp.get(L) || 0) <= Z.header.created;
|
|
21190
21195
|
return q && this.streamLatestTimestamp.set(L, Z.header.created), q;
|
|
21191
21196
|
}
|
|
21192
21197
|
}
|
|
21193
|
-
var
|
|
21198
|
+
var Ze = function(Re, Z, L, q) {
|
|
21194
21199
|
return new (L || (L = Promise))(function(ie, se) {
|
|
21195
21200
|
function ue(ce) {
|
|
21196
21201
|
try {
|
|
@@ -21215,9 +21220,9 @@ Found: ${s.toString().split(`
|
|
|
21215
21220
|
Ue((q = q.apply(Re, Z || [])).next());
|
|
21216
21221
|
});
|
|
21217
21222
|
};
|
|
21218
|
-
class
|
|
21223
|
+
class kt {
|
|
21219
21224
|
constructor(Z) {
|
|
21220
|
-
this.config = Z, this.connections = [], this.connectingSessions = /* @__PURE__ */ new Map(), this.rtcInstancesConstructed = 0, this.updateInterval = T({ func: () =>
|
|
21225
|
+
this.config = Z, this.connections = [], this.connectingSessions = /* @__PURE__ */ new Map(), this.rtcInstancesConstructed = 0, this.updateInterval = T({ func: () => Ze(this, void 0, void 0, function* () {
|
|
21221
21226
|
try {
|
|
21222
21227
|
yield this.update();
|
|
21223
21228
|
} catch (L) {
|
|
@@ -21234,7 +21239,7 @@ Found: ${s.toString().split(`
|
|
|
21234
21239
|
q ? q.isReady() ? q.controlRemoteStream(L) : U.a.warn("Attempted to control remote stream with an active connection to that peer which was not yet ready.") : U.a.warn("Attempted to control remote stream with no active connection to that peer.");
|
|
21235
21240
|
}
|
|
21236
21241
|
connect(Z) {
|
|
21237
|
-
return
|
|
21242
|
+
return Ze(this, void 0, void 0, function* () {
|
|
21238
21243
|
const L = yield this.getLocalPeer();
|
|
21239
21244
|
if (this.getActiveConnection(Z))
|
|
21240
21245
|
return void U.a.warn("Attempted to connect to peer with an already active connection.");
|
|
@@ -21242,7 +21247,7 @@ Found: ${s.toString().split(`
|
|
|
21242
21247
|
try {
|
|
21243
21248
|
q = yield this.config.signalingClient.createSession(yield this.config.getToken(), { offerPeerId: L.id, answerPeerId: Z });
|
|
21244
21249
|
} catch (ie) {
|
|
21245
|
-
Object(
|
|
21250
|
+
Object(rt.a)(ie, Ft.a, (se) => se.statusCode === 404), U.a.warn("Attempted to connect to peer that does not exist.");
|
|
21246
21251
|
}
|
|
21247
21252
|
if (q)
|
|
21248
21253
|
for (this.connectingSessions.set(q.id, (/* @__PURE__ */ new Date()).getTime()), yield this.connectToSession(q); ; )
|
|
@@ -21266,18 +21271,18 @@ Found: ${s.toString().split(`
|
|
|
21266
21271
|
return L.iceMode;
|
|
21267
21272
|
}
|
|
21268
21273
|
disconnect(Z) {
|
|
21269
|
-
return
|
|
21274
|
+
return Ze(this, void 0, void 0, function* () {
|
|
21270
21275
|
const L = this.getActiveConnection(Z);
|
|
21271
21276
|
L && (yield this.closeConnection(L));
|
|
21272
21277
|
});
|
|
21273
21278
|
}
|
|
21274
21279
|
getLocalPeer() {
|
|
21275
|
-
return
|
|
21280
|
+
return Ze(this, void 0, void 0, function* () {
|
|
21276
21281
|
return yield this.localPeer;
|
|
21277
21282
|
});
|
|
21278
21283
|
}
|
|
21279
21284
|
getPeers() {
|
|
21280
|
-
return
|
|
21285
|
+
return Ze(this, void 0, void 0, function* () {
|
|
21281
21286
|
return yield this.config.signalingClient.getPeers(yield this.config.getToken());
|
|
21282
21287
|
});
|
|
21283
21288
|
}
|
|
@@ -21294,37 +21299,37 @@ Found: ${s.toString().split(`
|
|
|
21294
21299
|
U.a.warn("Attempted to get ping time from inactive peer.");
|
|
21295
21300
|
}
|
|
21296
21301
|
shutdown() {
|
|
21297
|
-
return
|
|
21302
|
+
return Ze(this, void 0, void 0, function* () {
|
|
21298
21303
|
yield this.updateInterval.stop();
|
|
21299
21304
|
const Z = this.connections;
|
|
21300
21305
|
this.connections = [], yield this.closeConnections(Z);
|
|
21301
21306
|
});
|
|
21302
21307
|
}
|
|
21303
21308
|
closeConnection(Z) {
|
|
21304
|
-
return
|
|
21309
|
+
return Ze(this, void 0, void 0, function* () {
|
|
21305
21310
|
this.connectingSessions.delete(Z.getSessionId()), yield Z.close();
|
|
21306
21311
|
try {
|
|
21307
21312
|
yield this.config.signalingClient.deleteSession(yield this.config.getToken(), Z.getSessionId());
|
|
21308
21313
|
} catch (L) {
|
|
21309
|
-
Object(
|
|
21314
|
+
Object(rt.a)(L, Ft.a, (q) => q.statusCode === 404);
|
|
21310
21315
|
}
|
|
21311
21316
|
});
|
|
21312
21317
|
}
|
|
21313
21318
|
getSessions() {
|
|
21314
|
-
return
|
|
21319
|
+
return Ze(this, void 0, void 0, function* () {
|
|
21315
21320
|
const Z = yield this.getLocalPeer();
|
|
21316
21321
|
return (yield this.config.signalingClient.getSessions(yield this.config.getToken())).filter((L) => L.offer.peer.id === Z.id || L.answer.peer.id === Z.id);
|
|
21317
21322
|
});
|
|
21318
21323
|
}
|
|
21319
21324
|
createPeer() {
|
|
21320
|
-
return
|
|
21325
|
+
return Ze(this, void 0, void 0, function* () {
|
|
21321
21326
|
return yield this.config.signalingClient.createPeer(yield this.config.getToken(), { capabilitySet: this.config.capabilitySet || {} });
|
|
21322
21327
|
});
|
|
21323
21328
|
}
|
|
21324
21329
|
createRTCPeerConnection(Z = {}) {
|
|
21325
|
-
return
|
|
21330
|
+
return Ze(this, void 0, void 0, function* () {
|
|
21326
21331
|
const L = this.config.alternateRTCPeerConnection || RTCPeerConnection;
|
|
21327
|
-
this.rtcInstancesConstructed++, this.rtcInstancesConstructed % 20 ||
|
|
21332
|
+
this.rtcInstancesConstructed++, this.rtcInstancesConstructed % 20 || _t();
|
|
21328
21333
|
try {
|
|
21329
21334
|
return new L(Object.assign({ iceServers: yield this.config.signalingClient.getIceServers(yield this.config.getToken()) }, Z));
|
|
21330
21335
|
} catch (q) {
|
|
@@ -21333,8 +21338,8 @@ Found: ${s.toString().split(`
|
|
|
21333
21338
|
});
|
|
21334
21339
|
}
|
|
21335
21340
|
closeConnections(Z) {
|
|
21336
|
-
return
|
|
21337
|
-
const L = yield $(Z.map((q) =>
|
|
21341
|
+
return Ze(this, void 0, void 0, function* () {
|
|
21342
|
+
const L = yield $(Z.map((q) => Ze(this, void 0, void 0, function* () {
|
|
21338
21343
|
yield this.closeConnection(q);
|
|
21339
21344
|
})));
|
|
21340
21345
|
for (const q of L)
|
|
@@ -21342,7 +21347,7 @@ Found: ${s.toString().split(`
|
|
|
21342
21347
|
});
|
|
21343
21348
|
}
|
|
21344
21349
|
reset() {
|
|
21345
|
-
return
|
|
21350
|
+
return Ze(this, void 0, void 0, function* () {
|
|
21346
21351
|
yield this.closeConnections(this.connections), this.connections = [], this.connectingSessions = /* @__PURE__ */ new Map(), this.localPeer = this.createPeer(), yield this.localPeer;
|
|
21347
21352
|
});
|
|
21348
21353
|
}
|
|
@@ -21350,44 +21355,44 @@ Found: ${s.toString().split(`
|
|
|
21350
21355
|
return this.connections.find((L) => L.getRemotePeer().id === Z && L.isActive());
|
|
21351
21356
|
}
|
|
21352
21357
|
update() {
|
|
21353
|
-
return
|
|
21358
|
+
return Ze(this, void 0, void 0, function* () {
|
|
21354
21359
|
const Z = yield this.getLocalPeer();
|
|
21355
21360
|
try {
|
|
21356
21361
|
yield this.config.signalingClient.refreshPeer(yield this.config.getToken(), Z.id);
|
|
21357
21362
|
} catch (L) {
|
|
21358
|
-
Object(
|
|
21363
|
+
Object(rt.a)(L, Ft.a, (q) => q.statusCode === 404), U.a.warn("Peer expired, creating new peer", { peerId: Z.id }), yield this.reset();
|
|
21359
21364
|
}
|
|
21360
21365
|
yield this.handleSessions(yield this.getSessions());
|
|
21361
21366
|
});
|
|
21362
21367
|
}
|
|
21363
21368
|
handleSessions(Z) {
|
|
21364
|
-
return
|
|
21369
|
+
return Ze(this, void 0, void 0, function* () {
|
|
21365
21370
|
yield this.syncConnectionsAndSessions(Z);
|
|
21366
21371
|
const L = Z.map((q) => ({ session: q, connection: this.connections.find((ie) => ie.getSessionId() === q.id) }));
|
|
21367
|
-
yield Promise.all(L.map(({ session: q, connection: ie }) =>
|
|
21372
|
+
yield Promise.all(L.map(({ session: q, connection: ie }) => Ze(this, void 0, void 0, function* () {
|
|
21368
21373
|
return yield this.maintainConnection(q, ie);
|
|
21369
21374
|
})));
|
|
21370
21375
|
});
|
|
21371
21376
|
}
|
|
21372
21377
|
syncConnectionsAndSessions(Z) {
|
|
21373
|
-
return
|
|
21378
|
+
return Ze(this, void 0, void 0, function* () {
|
|
21374
21379
|
const L = new Set(Z.map((se) => se.id)), q = (se) => L.has(se.getSessionId()) || this.connectingSessions.has(se.getSessionId());
|
|
21375
21380
|
this.connections = this.connections.filter((se) => q(se));
|
|
21376
21381
|
const ie = this.connections.filter((se) => !q(se) || se.needsClosing());
|
|
21377
|
-
yield Promise.all(ie.map((se) =>
|
|
21382
|
+
yield Promise.all(ie.map((se) => Ze(this, void 0, void 0, function* () {
|
|
21378
21383
|
yield this.closeConnection(se);
|
|
21379
21384
|
})));
|
|
21380
21385
|
});
|
|
21381
21386
|
}
|
|
21382
21387
|
maintainConnection(Z, L) {
|
|
21383
|
-
return
|
|
21388
|
+
return Ze(this, void 0, void 0, function* () {
|
|
21384
21389
|
const q = yield this.getLocalPeer(), ie = Z.offer.peer.id === q.id;
|
|
21385
21390
|
if (L) {
|
|
21386
21391
|
if (L.isReady())
|
|
21387
21392
|
try {
|
|
21388
21393
|
yield this.config.signalingClient.refreshSession(yield this.config.getToken(), Z.id);
|
|
21389
21394
|
} catch (se) {
|
|
21390
|
-
Object(
|
|
21395
|
+
Object(rt.a)(se, Ft.a, (ue) => ue.statusCode === 404), U.a.debug("Refresh session not found", { sessionId: Z.id });
|
|
21391
21396
|
}
|
|
21392
21397
|
else if (L.isActive())
|
|
21393
21398
|
try {
|
|
@@ -21403,8 +21408,8 @@ Found: ${s.toString().split(`
|
|
|
21403
21408
|
});
|
|
21404
21409
|
}
|
|
21405
21410
|
connectToSession(Z) {
|
|
21406
|
-
return
|
|
21407
|
-
const L = yield this.getLocalPeer(), q = Z.offer.peer.id === L.id, ie = yield this.createRTCPeerConnection(), se = new
|
|
21411
|
+
return Ze(this, void 0, void 0, function* () {
|
|
21412
|
+
const L = yield this.getLocalPeer(), q = Z.offer.peer.id === L.id, ie = yield this.createRTCPeerConnection(), se = new Ct(ie, { localPeer: q ? Z.offer.peer : Z.answer.peer, remotePeer: q ? Z.answer.peer : Z.offer.peer, sessionId: Z.id, isOffer: q, sendSignal: (ue) => this.sendSignal(Z.id, ue), receive: (ue, fe) => this.config.receive(ue, fe) });
|
|
21408
21413
|
if (this.connections.find((ue) => ue.getSessionId() === Z.id))
|
|
21409
21414
|
return U.a.warn("connectToSession called on a session that already has a connection.", { sessionId: Z.id }), void (yield se.close());
|
|
21410
21415
|
this.setupHandlers(se), this.connections.push(se);
|
|
@@ -21417,12 +21422,12 @@ Found: ${s.toString().split(`
|
|
|
21417
21422
|
}
|
|
21418
21423
|
setupHandlers(Z) {
|
|
21419
21424
|
const { peerConnection: L } = Z, q = Z.getSessionId();
|
|
21420
|
-
L.onconnectionstatechange = () =>
|
|
21425
|
+
L.onconnectionstatechange = () => Ze(this, void 0, void 0, function* () {
|
|
21421
21426
|
const ie = this.connectingSessions.get(q);
|
|
21422
21427
|
if (ie === void 0)
|
|
21423
21428
|
return;
|
|
21424
21429
|
const se = L.connectionState;
|
|
21425
|
-
switch (
|
|
21430
|
+
switch (ct(L) && this.connectingSessions.delete(q), se) {
|
|
21426
21431
|
case "connected": {
|
|
21427
21432
|
this.connectingSessions.delete(q);
|
|
21428
21433
|
const ue = (/* @__PURE__ */ new Date()).getTime() - ie;
|
|
@@ -21435,23 +21440,23 @@ Found: ${s.toString().split(`
|
|
|
21435
21440
|
});
|
|
21436
21441
|
}
|
|
21437
21442
|
consumeSignals(Z) {
|
|
21438
|
-
return
|
|
21443
|
+
return Ze(this, void 0, void 0, function* () {
|
|
21439
21444
|
let L = [];
|
|
21440
21445
|
try {
|
|
21441
21446
|
L = yield this.config.signalingClient.takeSignals(yield this.config.getToken(), Z.getSessionId());
|
|
21442
21447
|
} catch (q) {
|
|
21443
|
-
Object(
|
|
21448
|
+
Object(rt.a)(q, Ft.a, (ie) => ie.statusCode === 404);
|
|
21444
21449
|
}
|
|
21445
21450
|
for (const q of L)
|
|
21446
21451
|
yield Z.handleSignal(q);
|
|
21447
21452
|
});
|
|
21448
21453
|
}
|
|
21449
21454
|
sendSignal(Z, L) {
|
|
21450
|
-
return
|
|
21455
|
+
return Ze(this, void 0, void 0, function* () {
|
|
21451
21456
|
try {
|
|
21452
21457
|
yield this.config.signalingClient.addSignals(yield this.config.getToken(), Z, { signals: [L] });
|
|
21453
21458
|
} catch (q) {
|
|
21454
|
-
Object(
|
|
21459
|
+
Object(rt.a)(q, Ft.a, (ie) => ie.statusCode === 404);
|
|
21455
21460
|
}
|
|
21456
21461
|
});
|
|
21457
21462
|
}
|
|
@@ -25190,14 +25195,14 @@ async function patchEventTriggerGroup(e, t) {
|
|
|
25190
25195
|
}
|
|
25191
25196
|
)).json();
|
|
25192
25197
|
}
|
|
25193
|
-
const
|
|
25198
|
+
const Ne = class Ne {
|
|
25194
25199
|
static async setDefaultDevice(t) {
|
|
25195
|
-
|
|
25200
|
+
Ne.defaultDeviceId = t;
|
|
25196
25201
|
}
|
|
25197
25202
|
static async getCurrentDevice() {
|
|
25198
25203
|
if (!Authentication.token)
|
|
25199
25204
|
throw new Error("Not authenticated");
|
|
25200
|
-
if (!
|
|
25205
|
+
if (!Ne.defaultDeviceId)
|
|
25201
25206
|
throw new Error("No known default device");
|
|
25202
25207
|
const r = (await (await fetch(
|
|
25203
25208
|
`${FORMANT_API_URL}/v1/admin/device-details/query`,
|
|
@@ -25209,14 +25214,14 @@ const Qt = class {
|
|
|
25209
25214
|
}
|
|
25210
25215
|
}
|
|
25211
25216
|
)).json()).items.find(
|
|
25212
|
-
(g) => g.id ===
|
|
25217
|
+
(g) => g.id === Ne.defaultDeviceId
|
|
25213
25218
|
), o = r.name, s = new Device(
|
|
25214
|
-
|
|
25219
|
+
Ne.defaultDeviceId,
|
|
25215
25220
|
o,
|
|
25216
25221
|
defined$1(Authentication.currentOrganization),
|
|
25217
25222
|
r.tags
|
|
25218
25223
|
);
|
|
25219
|
-
return
|
|
25224
|
+
return Ne.knownContext.push(new WeakRef(s)), s;
|
|
25220
25225
|
}
|
|
25221
25226
|
static async getPeerDevice(t) {
|
|
25222
25227
|
const n = new PeerDevice(t);
|
|
@@ -25224,11 +25229,11 @@ const Qt = class {
|
|
|
25224
25229
|
}
|
|
25225
25230
|
static async getDevice(t) {
|
|
25226
25231
|
const n = await getDevice(t);
|
|
25227
|
-
return
|
|
25232
|
+
return Ne.knownContext.push(new WeakRef(n)), n;
|
|
25228
25233
|
}
|
|
25229
25234
|
};
|
|
25230
|
-
|
|
25231
|
-
|
|
25235
|
+
he(Ne, "defaultDeviceId"), he(Ne, "knownContext", []), he(Ne, "createFleet", createFleet), he(Ne, "listFleets", listFleets), he(Ne, "getFleet", getFleet), he(Ne, "patchFleet", patchFleet), he(Ne, "deleteFleet", deleteFleet), he(Ne, "addDeviceToFleet", addDeviceToFleet), he(Ne, "getFleetDevices", getFleetDevices), he(Ne, "aggregateTelemetry", aggregateTelemetry), he(Ne, "createShareLink", createShareLink), he(Ne, "eventsCounter", eventsCounter), he(Ne, "getAnalyticStreams", getAnalyticStreams), he(Ne, "getAnalyticsModules", getAnalyticsModules), he(Ne, "getAnalyticsRows", getAnalyticsRows), he(Ne, "getAnnotationCount", getAnnotationCount), he(Ne, "getAnnotationCountByIntervals", getAnnotationCountByIntervals), he(Ne, "getCurrentGroup", getCurrentGroup), he(Ne, "getDevices", getDevices), he(Ne, "getEvent", getEvent), he(Ne, "getFileUrl", getFileUrl), he(Ne, "getInterventions", getInterventions), he(Ne, "getLatestTelemetry", getLatestTelemetry), he(Ne, "getOnlineDevices", getOnlineDevices), he(Ne, "getPeers", getPeers), he(Ne, "getRealtimeDevices", getRealtimeDevices), he(Ne, "getRealtimeSessions", getRealtimeSessions), he(Ne, "getStreams", getStreams), he(Ne, "getTaskReportRows", getTaskReportRows), he(Ne, "getTaskReportTables", getTaskReportTables), he(Ne, "getTelemetry", getTelemetry), he(Ne, "getViews", getViews), he(Ne, "patchStream", patchStream), he(Ne, "patchView", patchView), he(Ne, "queryAnalytics", queryAnalytics), he(Ne, "queryDevices", queryDevices), he(Ne, "queryEvents", queryEvents), he(Ne, "queryTelemetry", queryTelemetry), he(Ne, "getAllEventTriggerGroup", getAllEventTriggerGroup), he(Ne, "getEventTriggerGroup", getEventTriggerGroup), he(Ne, "patchEventTriggergroup", patchEventTriggerGroup);
|
|
25236
|
+
let Fleet = Ne;
|
|
25232
25237
|
class KeyValue {
|
|
25233
25238
|
static async set(t, n, r) {
|
|
25234
25239
|
try {
|
|
@@ -31911,7 +31916,7 @@ function defined(e, t) {
|
|
|
31911
31916
|
return e;
|
|
31912
31917
|
throw new Error(t || "Value is undefined");
|
|
31913
31918
|
}
|
|
31914
|
-
const encodedJs$1 = "dmFyIFI9T2JqZWN0LmRlZmluZVByb3BlcnR5O3ZhciBHPShNLGIseCk9PmIgaW4gTT9SKE0sYix7ZW51bWVyYWJsZTohMCxjb25maWd1cmFibGU6ITAsd3JpdGFibGU6ITAsdmFsdWU6eH0pOk1bYl09eDt2YXIgST0oTSxiLHgpPT4oRyhNLHR5cGVvZiBiIT0ic3ltYm9sIj9iKyIiOmIseCkseCk7KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IFM9e21pbGxpc2Vjb25kOjEsc2Vjb25kOjFlMyxtaW51dGU6NmU0LGhvdXI6MzZlNSxkYXk6ODY0ZTUsd2Vlazo2MDQ4ZTUsbW9udGg6MjU5MmU2LHllYXI6MzE1MzZlNn07ZnVuY3Rpb24gcShvKXt9Y2xhc3MgX3tjb25zdHJ1Y3Rvcih7Y2FwYWNpdHk6dCx0aW1lb3V0Om59PXt9KXtJKHRoaXMsImVudHJpZXMiLG5ldyBNYXApO0kodGhpcywibWV0YWRhdGEiLG5ldyBNYXApO0kodGhpcywiY2FwYWNpdHkiKTtJKHRoaXMsInRpbWVvdXQiKTt0aGlzLmNhcGFjaXR5PXR8fDFlNCx0aGlzLnRpbWVvdXQ9bnx8Uy5taW51dGV9Z2V0KHQsbil7Y29uc3QgZT10aG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tkKzI8PXMuYnl0ZUxlbmd0aCYmKHJbYSo0KzBdPXMuZ2V0VWludDgoZCsyKS8yNTUsclthKjQrMV09cy5nZXRVaW50OChkKzEpLzI1NSxyW2EqNCsyXT1zLmdldFVpbnQ4KGQrMCkvMjU1LHJbYSo0KzNdPTEpfWYhPT12b2lkIDAmJihmW2FdPXMuZ2V0RmxvYXQzMigoZS5pbnRlbnNpdHl8fDApK2EqNCxBKSl9KX1yZXR1cm57Y29sb3JzOnIsaGVhZGVyOnQsaW50ZW5zaXR5OmYscG9zaXRpb25zOml9fWZ1bmN0aW9uIFgobyl7cmV0dXJuIEQoSChvKSl9Y29uc3QgWj1uZXcgXyh7Y2FwYWNpdHk6MWUzLHRpbWVvdXQ6MSpTLm1pbnV0ZX0pO29ubWVzc2FnZT1hc3luYyBvPT57Y29uc3R7dXJsOnQsaWQ6bixwb2ludENsb3VkOmV9PW8uZGF0YTtpZih0KXtjb25zdCBjPVouZ2V0KHQsYXN5bmMoKT0+RChhd2FpdCBmZXRjaCh0LHttb2RlOiJjb3JzIn0pLnRoZW4ocj0+ci5hcnJheUJ1ZmZlcigpKSkpO2MmJnBvc3RNZXNzYWdlKHt1cmw6dCxwY2Q6Y30pfWlmKG4mJmUpe2NvbnN0IGM9WChlKTtwb3N0TWVzc2FnZSh7aWQ6bixwY2Q6Y30pfX19KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1QY2RMb2FkZXJXb3JrZXItNmZlMGRhMjkuanMubWFwCg==", blob$1 = typeof window != "undefined" && window.Blob && new Blob([atob(encodedJs$1)], { type: "text/javascript;charset=utf-8" });
|
|
31915
31920
|
function WorkerWrapper$1() {
|
|
31916
31921
|
let e;
|
|
31917
31922
|
try {
|