@ikonai/sdk 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function pl(t) {
|
|
2
2
|
return t;
|
|
3
3
|
}
|
|
4
4
|
function ue(t) {
|
|
@@ -32,12 +32,10 @@ function ne(t) {
|
|
|
32
32
|
flags: d
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function Me(t, e, r) {
|
|
36
36
|
const n = se(t), s = ne(n);
|
|
37
37
|
if (e !== void 0 && s.opcode !== e)
|
|
38
38
|
throw new Error(`Unexpected opcode ${s.opcode}`);
|
|
39
|
-
if (r !== void 0 && s.payloadVersion !== r)
|
|
40
|
-
throw new Error(`Unexpected payload version ${s.payloadVersion}`);
|
|
41
39
|
if (s.payloadType !== 8)
|
|
42
40
|
throw new Error(`Unexpected payload type ${s.payloadType}`);
|
|
43
41
|
const i = 27 + s.targetIds.length * 4;
|
|
@@ -51,7 +49,7 @@ function F(t, e, r, n, s) {
|
|
|
51
49
|
E.setUint32(m, c[I] >>> 0, !0), m += 4;
|
|
52
50
|
return h.set(e, f), h;
|
|
53
51
|
}
|
|
54
|
-
var
|
|
52
|
+
var b = /* @__PURE__ */ ((t) => (t[t.Null = 1] = "Null", t[t.Bool = 2] = "Bool", t[t.Int32 = 3] = "Int32", t[t.Int64 = 4] = "Int64", t[t.UInt32 = 5] = "UInt32", t[t.UInt64 = 6] = "UInt64", t[t.Float32 = 7] = "Float32", t[t.Float64 = 8] = "Float64", t[t.Array = 9] = "Array", t[t.Dict = 10] = "Dict", t[t.Object = 11] = "Object", t[t.String = 12] = "String", t[t.Binary = 13] = "Binary", t[t.Guid = 14] = "Guid", t))(b || {});
|
|
55
53
|
const ht = 161, dt = 162, he = new TextEncoder(), xr = new TextDecoder("utf-8", { fatal: !0 });
|
|
56
54
|
class D {
|
|
57
55
|
constructor(e = 1) {
|
|
@@ -107,7 +105,7 @@ class D {
|
|
|
107
105
|
this.writeVariableField(e, 9, i);
|
|
108
106
|
}
|
|
109
107
|
writeDictionaryField(e, r, n, s) {
|
|
110
|
-
const i = new
|
|
108
|
+
const i = new Oe(r, n);
|
|
111
109
|
s(i);
|
|
112
110
|
const o = i.finish();
|
|
113
111
|
this.writeVariableField(e, 10, o);
|
|
@@ -222,7 +220,7 @@ class _e {
|
|
|
222
220
|
10
|
|
223
221
|
/* Dict */
|
|
224
222
|
), this.count++;
|
|
225
|
-
const s = new
|
|
223
|
+
const s = new Oe(e, r);
|
|
226
224
|
n(s);
|
|
227
225
|
const i = s.finish();
|
|
228
226
|
this.payload.writeBytes(i);
|
|
@@ -233,10 +231,10 @@ class _e {
|
|
|
233
231
|
}
|
|
234
232
|
ensureElementType(e) {
|
|
235
233
|
if (this.elementType !== e)
|
|
236
|
-
throw new Error(`Array element type is ${
|
|
234
|
+
throw new Error(`Array element type is ${b[this.elementType]}, expected ${b[e]}`);
|
|
237
235
|
}
|
|
238
236
|
}
|
|
239
|
-
class
|
|
237
|
+
class Oe {
|
|
240
238
|
constructor(e, r) {
|
|
241
239
|
this.keyType = e, this.valueType = r, Pe(e);
|
|
242
240
|
}
|
|
@@ -427,7 +425,7 @@ class Vr {
|
|
|
427
425
|
10
|
|
428
426
|
/* Dict */
|
|
429
427
|
);
|
|
430
|
-
const s = new
|
|
428
|
+
const s = new Oe(e, r);
|
|
431
429
|
n(s);
|
|
432
430
|
const i = s.finish();
|
|
433
431
|
this.payload.writeBytes(i), this.valueWritten = !0;
|
|
@@ -441,11 +439,11 @@ class Vr {
|
|
|
441
439
|
}
|
|
442
440
|
ensureKeyType(e) {
|
|
443
441
|
if (this.keyType !== e)
|
|
444
|
-
throw new Error(`Dictionary key type is ${
|
|
442
|
+
throw new Error(`Dictionary key type is ${b[this.keyType]}, expected ${b[e]}`);
|
|
445
443
|
}
|
|
446
444
|
ensureValueType(e) {
|
|
447
445
|
if (this.valueType !== e)
|
|
448
|
-
throw new Error(`Dictionary value type is ${
|
|
446
|
+
throw new Error(`Dictionary value type is ${b[this.valueType]}, expected ${b[e]}`);
|
|
449
447
|
}
|
|
450
448
|
}
|
|
451
449
|
class z {
|
|
@@ -574,7 +572,7 @@ class P {
|
|
|
574
572
|
}
|
|
575
573
|
ensureType(e) {
|
|
576
574
|
if (this.type !== e)
|
|
577
|
-
throw new Error(`Teleport value has type ${
|
|
575
|
+
throw new Error(`Teleport value has type ${b[this.type]}, expected ${b[e]}`);
|
|
578
576
|
}
|
|
579
577
|
}
|
|
580
578
|
class Wr extends P {
|
|
@@ -649,7 +647,7 @@ class Le {
|
|
|
649
647
|
return this.offset += e, new q(10, r);
|
|
650
648
|
}
|
|
651
649
|
default:
|
|
652
|
-
throw new Error(`Unsupported array element type ${
|
|
650
|
+
throw new Error(`Unsupported array element type ${b[this.elementType]}`);
|
|
653
651
|
}
|
|
654
652
|
}
|
|
655
653
|
}
|
|
@@ -739,7 +737,7 @@ class ve {
|
|
|
739
737
|
return this.offset += e, new P(this.valueType, r);
|
|
740
738
|
}
|
|
741
739
|
default:
|
|
742
|
-
throw new Error(`Unsupported dictionary value type ${
|
|
740
|
+
throw new Error(`Unsupported dictionary value type ${b[this.valueType]}`);
|
|
743
741
|
}
|
|
744
742
|
}
|
|
745
743
|
}
|
|
@@ -976,7 +974,7 @@ function ye(t, e, r, n) {
|
|
|
976
974
|
case 10:
|
|
977
975
|
return r + Be(e, r);
|
|
978
976
|
default:
|
|
979
|
-
throw new Error(`Unsupported Teleport type ${
|
|
977
|
+
throw new Error(`Unsupported Teleport type ${b[t]}`);
|
|
980
978
|
}
|
|
981
979
|
}
|
|
982
980
|
function ze(t) {
|
|
@@ -1149,7 +1147,7 @@ function gn(t) {
|
|
|
1149
1147
|
e.push(r.asString());
|
|
1150
1148
|
return e;
|
|
1151
1149
|
}
|
|
1152
|
-
const Cn = 76337612,
|
|
1150
|
+
const Cn = 76337612, bn = 185396121, Rn = 388632637, kn = 417197284, Un = 469070965, Dn = 470595159, Mn = 781727218, On = 834078886, Ln = 1043273762, vn = 1236999138, Pn = 1368629611, Fn = 1715899485, Bn = 1942830531, Gn = 1999510636, xn = 2079864626, Vn = 2142346422, Wn = 2598291686, Hn = 2719718823, $n = 2810953526, Kn = 2840065720, Yn = 2885165957, jn = 3586157513, zn = 3717933110, Xn = 4062655306;
|
|
1153
1151
|
function Ne(t) {
|
|
1154
1152
|
const e = {};
|
|
1155
1153
|
return wt(e), e;
|
|
@@ -1170,12 +1168,12 @@ function Jn(t, e) {
|
|
|
1170
1168
|
e.DeviceId = r.asString();
|
|
1171
1169
|
break;
|
|
1172
1170
|
}
|
|
1173
|
-
case
|
|
1171
|
+
case bn: {
|
|
1174
1172
|
if (r.isNull) throw new Error();
|
|
1175
1173
|
e.InstallId = r.asString();
|
|
1176
1174
|
break;
|
|
1177
1175
|
}
|
|
1178
|
-
case
|
|
1176
|
+
case Rn: {
|
|
1179
1177
|
if (r.isNull) throw new Error();
|
|
1180
1178
|
e.UserAgent = r.asString();
|
|
1181
1179
|
break;
|
|
@@ -1195,12 +1193,12 @@ function Jn(t, e) {
|
|
|
1195
1193
|
e.UserType = r.asInt32();
|
|
1196
1194
|
break;
|
|
1197
1195
|
}
|
|
1198
|
-
case
|
|
1196
|
+
case Mn: {
|
|
1199
1197
|
if (r.isNull) throw new Error();
|
|
1200
1198
|
e.UserId = r.asString();
|
|
1201
1199
|
break;
|
|
1202
1200
|
}
|
|
1203
|
-
case
|
|
1201
|
+
case On: {
|
|
1204
1202
|
if (r.isNull) throw new Error();
|
|
1205
1203
|
e.ProductId = r.asString();
|
|
1206
1204
|
break;
|
|
@@ -1349,85 +1347,85 @@ function as(t, e) {
|
|
|
1349
1347
|
}
|
|
1350
1348
|
}
|
|
1351
1349
|
}
|
|
1352
|
-
const cs =
|
|
1353
|
-
function
|
|
1350
|
+
const cs = 65537, ls = 166277978, us = 1482635149, hs = 1559330978, ds = 2802434353, fs = 3085883711, Es = 3669484338, ps = 3707543140, Is = 3712281496, ms = 4160646707;
|
|
1351
|
+
function _s(t) {
|
|
1354
1352
|
const e = {};
|
|
1355
1353
|
return yt(e), e;
|
|
1356
1354
|
}
|
|
1357
1355
|
function yt(t) {
|
|
1358
1356
|
return t.ClientContext = Ne(), t.ServerContext = Ne(), t.CertHash = "", t.Entrypoints = [], t.FeatureFlags = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelId = "", t.PrimaryUserId = "", t.ChannelTemplateId = "", t;
|
|
1359
1357
|
}
|
|
1360
|
-
function
|
|
1358
|
+
function Ts(t, e) {
|
|
1361
1359
|
const r = z.create(t);
|
|
1362
|
-
return
|
|
1360
|
+
return Ss(r, e);
|
|
1363
1361
|
}
|
|
1364
|
-
function
|
|
1365
|
-
const r = e ??
|
|
1366
|
-
return yt(r),
|
|
1362
|
+
function Ss(t, e) {
|
|
1363
|
+
const r = e ?? _s();
|
|
1364
|
+
return yt(r), ws(t, r), r;
|
|
1367
1365
|
}
|
|
1368
|
-
function
|
|
1366
|
+
function ws(t, e) {
|
|
1369
1367
|
let r;
|
|
1370
1368
|
for (; (r = t.next()) !== null; )
|
|
1371
1369
|
switch (r.fieldId) {
|
|
1372
|
-
case
|
|
1370
|
+
case ls: {
|
|
1373
1371
|
if (r.isNull) throw new Error();
|
|
1374
1372
|
e.CertHash = r.asString();
|
|
1375
1373
|
break;
|
|
1376
1374
|
}
|
|
1377
|
-
case
|
|
1375
|
+
case us: {
|
|
1378
1376
|
if (r.isNull) throw new Error();
|
|
1379
|
-
e.Entrypoints =
|
|
1377
|
+
e.Entrypoints = ys(r.asArray());
|
|
1380
1378
|
break;
|
|
1381
1379
|
}
|
|
1382
|
-
case
|
|
1380
|
+
case hs: {
|
|
1383
1381
|
if (r.isNull) throw new Error();
|
|
1384
1382
|
e.ChannelId = r.asString();
|
|
1385
1383
|
break;
|
|
1386
1384
|
}
|
|
1387
|
-
case
|
|
1385
|
+
case ds: {
|
|
1388
1386
|
if (r.isNull) throw new Error();
|
|
1389
1387
|
e.ClientContext = ge(r.asObject());
|
|
1390
1388
|
break;
|
|
1391
1389
|
}
|
|
1392
|
-
case
|
|
1390
|
+
case fs: {
|
|
1393
1391
|
if (r.isNull) throw new Error();
|
|
1394
1392
|
e.ServerContext = ge(r.asObject());
|
|
1395
1393
|
break;
|
|
1396
1394
|
}
|
|
1397
|
-
case
|
|
1395
|
+
case Es: {
|
|
1398
1396
|
if (r.isNull) throw new Error();
|
|
1399
|
-
e.FeatureFlags =
|
|
1397
|
+
e.FeatureFlags = Ns(r.asDictionary());
|
|
1400
1398
|
break;
|
|
1401
1399
|
}
|
|
1402
|
-
case
|
|
1400
|
+
case ps: {
|
|
1403
1401
|
if (r.isNull) throw new Error();
|
|
1404
1402
|
e.SpaceId = r.asString();
|
|
1405
1403
|
break;
|
|
1406
1404
|
}
|
|
1407
|
-
case
|
|
1405
|
+
case Is: {
|
|
1408
1406
|
if (r.isNull) throw new Error();
|
|
1409
1407
|
e.PrimaryUserId = r.asString();
|
|
1410
1408
|
break;
|
|
1411
1409
|
}
|
|
1412
|
-
case
|
|
1410
|
+
case ms: {
|
|
1413
1411
|
if (r.isNull) throw new Error();
|
|
1414
1412
|
e.ChannelTemplateId = r.asString();
|
|
1415
1413
|
break;
|
|
1416
1414
|
}
|
|
1417
1415
|
}
|
|
1418
1416
|
}
|
|
1419
|
-
function
|
|
1420
|
-
const r =
|
|
1421
|
-
return
|
|
1417
|
+
function As(t, e) {
|
|
1418
|
+
const r = Me(t, cs);
|
|
1419
|
+
return Ts(r, e);
|
|
1422
1420
|
}
|
|
1423
|
-
function
|
|
1421
|
+
function ys(t) {
|
|
1424
1422
|
const e = [];
|
|
1425
1423
|
let r;
|
|
1426
1424
|
for (; (r = t.next()) !== null; )
|
|
1427
1425
|
e.push(os(r.asObject()));
|
|
1428
1426
|
return e;
|
|
1429
1427
|
}
|
|
1430
|
-
function
|
|
1428
|
+
function Ns(t) {
|
|
1431
1429
|
const e = /* @__PURE__ */ Object.create(null);
|
|
1432
1430
|
let r;
|
|
1433
1431
|
for (; (r = t.next()) !== null; ) {
|
|
@@ -1436,183 +1434,183 @@ function gs(t) {
|
|
|
1436
1434
|
}
|
|
1437
1435
|
return e;
|
|
1438
1436
|
}
|
|
1439
|
-
function
|
|
1437
|
+
function gs(t) {
|
|
1440
1438
|
const e = {};
|
|
1441
|
-
return
|
|
1439
|
+
return Cs(e), t && Object.assign(e, t), e;
|
|
1442
1440
|
}
|
|
1443
|
-
function
|
|
1441
|
+
function Cs(t) {
|
|
1444
1442
|
return t.ServerSessionId = "", t.ContextType = J.Unknown, t.UserType = Z.Unknown, t.PayloadType = Q.Unknown, t.IsInternal = !1, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.OpcodeGroupsFromServer = S.NONE, t.OpcodeGroupsToServer = S.NONE, t.ProtocolVersion = 0, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.UserAgent = "", t.ClientType = X.Unknown, t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = Ge.Unknown, t;
|
|
1445
1443
|
}
|
|
1446
|
-
const Nt = 1, bs = 1048632,
|
|
1447
|
-
function
|
|
1444
|
+
const Nt = 1, bs = 1048632, Rs = 3748161056, ks = 4289118421;
|
|
1445
|
+
function Us(t) {
|
|
1448
1446
|
const e = {};
|
|
1449
|
-
return
|
|
1447
|
+
return Ds(e), t && Object.assign(e, t), e;
|
|
1450
1448
|
}
|
|
1451
|
-
function
|
|
1449
|
+
function Ds(t) {
|
|
1452
1450
|
return t.CallId = _.fromBytes(new Uint8Array(16)), t.InstanceId = _.fromBytes(new Uint8Array(16)), t;
|
|
1453
1451
|
}
|
|
1454
1452
|
function Ms(t) {
|
|
1455
1453
|
const e = new D(Nt);
|
|
1456
|
-
return
|
|
1454
|
+
return Os(t, e), e.finish();
|
|
1457
1455
|
}
|
|
1458
|
-
function
|
|
1459
|
-
e.writeGuidField(
|
|
1456
|
+
function Os(t, e) {
|
|
1457
|
+
e.writeGuidField(Rs, t.CallId), e.writeGuidField(ks, t.InstanceId);
|
|
1460
1458
|
}
|
|
1461
|
-
function
|
|
1459
|
+
function Ls(t, e, r) {
|
|
1462
1460
|
const n = Ms(t);
|
|
1463
1461
|
return F(bs, n, Nt, e, r);
|
|
1464
1462
|
}
|
|
1465
|
-
const
|
|
1466
|
-
function
|
|
1463
|
+
const vs = 1048601, Ps = 112005851, Fs = 814454131, Bs = 976255570, Gs = 1123310456, xs = 2885165957, Vs = 3748161056, Ws = 4289118421;
|
|
1464
|
+
function Hs(t) {
|
|
1467
1465
|
const e = {};
|
|
1468
1466
|
return gt(e), e;
|
|
1469
1467
|
}
|
|
1470
1468
|
function gt(t) {
|
|
1471
1469
|
return t.FunctionId = _.fromBytes(new Uint8Array(16)), t.CallId = _.fromBytes(new Uint8Array(16)), t.InstanceId = _.fromBytes(new Uint8Array(16)), t.FunctionName = "", t.Parameters = [], t.ClientBackendToken = "", t.Scopes = [], t;
|
|
1472
1470
|
}
|
|
1473
|
-
function
|
|
1471
|
+
function $s(t, e) {
|
|
1474
1472
|
const r = z.create(t);
|
|
1475
|
-
return
|
|
1473
|
+
return Ks(r, e);
|
|
1476
1474
|
}
|
|
1477
|
-
function
|
|
1478
|
-
const r = e ??
|
|
1479
|
-
return gt(r),
|
|
1475
|
+
function Ks(t, e) {
|
|
1476
|
+
const r = e ?? Hs();
|
|
1477
|
+
return gt(r), Ys(t, r), r;
|
|
1480
1478
|
}
|
|
1481
|
-
function
|
|
1479
|
+
function Ys(t, e) {
|
|
1482
1480
|
let r;
|
|
1483
1481
|
for (; (r = t.next()) !== null; )
|
|
1484
1482
|
switch (r.fieldId) {
|
|
1485
|
-
case
|
|
1483
|
+
case Ps: {
|
|
1486
1484
|
if (r.isNull) throw new Error();
|
|
1487
|
-
e.Scopes =
|
|
1485
|
+
e.Scopes = zs(r.asArray());
|
|
1488
1486
|
break;
|
|
1489
1487
|
}
|
|
1490
|
-
case
|
|
1488
|
+
case Fs: {
|
|
1491
1489
|
if (r.isNull) throw new Error();
|
|
1492
1490
|
e.FunctionName = r.asString();
|
|
1493
1491
|
break;
|
|
1494
1492
|
}
|
|
1495
|
-
case
|
|
1493
|
+
case Bs: {
|
|
1496
1494
|
if (r.isNull) throw new Error();
|
|
1497
1495
|
e.FunctionId = r.asGuid();
|
|
1498
1496
|
break;
|
|
1499
1497
|
}
|
|
1500
|
-
case
|
|
1498
|
+
case Gs: {
|
|
1501
1499
|
if (r.isNull) throw new Error();
|
|
1502
1500
|
e.ClientBackendToken = r.asString();
|
|
1503
1501
|
break;
|
|
1504
1502
|
}
|
|
1505
|
-
case
|
|
1503
|
+
case xs: {
|
|
1506
1504
|
if (r.isNull) throw new Error();
|
|
1507
|
-
e.Parameters =
|
|
1505
|
+
e.Parameters = Xs(r.asArray());
|
|
1508
1506
|
break;
|
|
1509
1507
|
}
|
|
1510
|
-
case
|
|
1508
|
+
case Vs: {
|
|
1511
1509
|
if (r.isNull) throw new Error();
|
|
1512
1510
|
e.CallId = r.asGuid();
|
|
1513
1511
|
break;
|
|
1514
1512
|
}
|
|
1515
|
-
case
|
|
1513
|
+
case Ws: {
|
|
1516
1514
|
if (r.isNull) throw new Error();
|
|
1517
1515
|
e.InstanceId = r.asGuid();
|
|
1518
1516
|
break;
|
|
1519
1517
|
}
|
|
1520
1518
|
}
|
|
1521
1519
|
}
|
|
1522
|
-
function
|
|
1523
|
-
const r =
|
|
1524
|
-
return
|
|
1520
|
+
function js(t, e) {
|
|
1521
|
+
const r = Me(t, vs);
|
|
1522
|
+
return $s(r, e);
|
|
1525
1523
|
}
|
|
1526
|
-
function
|
|
1524
|
+
function zs(t) {
|
|
1527
1525
|
const e = [];
|
|
1528
1526
|
let r;
|
|
1529
1527
|
for (; (r = t.next()) !== null; )
|
|
1530
|
-
e.push(
|
|
1528
|
+
e.push(qs(r.asObject()));
|
|
1531
1529
|
return e;
|
|
1532
1530
|
}
|
|
1533
|
-
function
|
|
1531
|
+
function Xs(t) {
|
|
1534
1532
|
const e = [];
|
|
1535
1533
|
let r;
|
|
1536
1534
|
for (; (r = t.next()) !== null; )
|
|
1537
1535
|
e.push(cn(r.asObject()));
|
|
1538
1536
|
return e;
|
|
1539
1537
|
}
|
|
1540
|
-
const
|
|
1541
|
-
function
|
|
1538
|
+
const Js = 2994044322, Qs = 3167053791;
|
|
1539
|
+
function Zs(t) {
|
|
1542
1540
|
const e = {};
|
|
1543
1541
|
return Ct(e), e;
|
|
1544
1542
|
}
|
|
1545
1543
|
function Ct(t) {
|
|
1546
1544
|
return t.Type = "", t.Id = "", t;
|
|
1547
1545
|
}
|
|
1548
|
-
function
|
|
1549
|
-
const r = e ??
|
|
1550
|
-
return Ct(r),
|
|
1546
|
+
function qs(t, e) {
|
|
1547
|
+
const r = e ?? Zs();
|
|
1548
|
+
return Ct(r), ei(t, r), r;
|
|
1551
1549
|
}
|
|
1552
|
-
function
|
|
1550
|
+
function ei(t, e) {
|
|
1553
1551
|
let r;
|
|
1554
1552
|
for (; (r = t.next()) !== null; )
|
|
1555
1553
|
switch (r.fieldId) {
|
|
1556
|
-
case
|
|
1554
|
+
case Js: {
|
|
1557
1555
|
if (r.isNull) throw new Error();
|
|
1558
1556
|
e.Id = r.asString();
|
|
1559
1557
|
break;
|
|
1560
1558
|
}
|
|
1561
|
-
case
|
|
1559
|
+
case Qs: {
|
|
1562
1560
|
if (r.isNull) throw new Error();
|
|
1563
1561
|
e.Type = r.asString();
|
|
1564
1562
|
break;
|
|
1565
1563
|
}
|
|
1566
1564
|
}
|
|
1567
1565
|
}
|
|
1568
|
-
const
|
|
1569
|
-
function
|
|
1566
|
+
const bt = 1, ti = 1048631, ri = 2205234621, ni = 2838554230, si = 3748161056, ii = 4194102057, oi = 4289118421;
|
|
1567
|
+
function ai(t) {
|
|
1570
1568
|
const e = {};
|
|
1571
|
-
return
|
|
1569
|
+
return ci(e), t && Object.assign(e, t), e;
|
|
1572
1570
|
}
|
|
1573
|
-
function
|
|
1571
|
+
function ci(t) {
|
|
1574
1572
|
return t.CallId = _.fromBytes(new Uint8Array(16)), t.InstanceId = _.fromBytes(new Uint8Array(16)), t.ErrorMessage = "", t.ErrorTypeName = "", t.StackTrace = "", t;
|
|
1575
1573
|
}
|
|
1576
|
-
function
|
|
1577
|
-
const e = new D(
|
|
1578
|
-
return
|
|
1574
|
+
function li(t) {
|
|
1575
|
+
const e = new D(bt);
|
|
1576
|
+
return ui(t, e), e.finish();
|
|
1579
1577
|
}
|
|
1580
|
-
function
|
|
1581
|
-
e.writeStringField(
|
|
1578
|
+
function ui(t, e) {
|
|
1579
|
+
e.writeStringField(ri, t.ErrorTypeName), e.writeStringField(ni, t.ErrorMessage), e.writeGuidField(si, t.CallId), e.writeStringField(ii, t.StackTrace), e.writeGuidField(oi, t.InstanceId);
|
|
1582
1580
|
}
|
|
1583
|
-
function
|
|
1584
|
-
const n =
|
|
1585
|
-
return F(
|
|
1581
|
+
function hi(t, e, r) {
|
|
1582
|
+
const n = li(t);
|
|
1583
|
+
return F(ti, n, bt, e, r);
|
|
1586
1584
|
}
|
|
1587
|
-
const xe = 1,
|
|
1588
|
-
function
|
|
1585
|
+
const xe = 1, di = 1048600, Rt = 703025676, kt = 814454131, Ut = 972460562, Dt = 976255570, Mt = 1368629611, Ot = 1479280922, Lt = 1533537016, vt = 2274386296, Pt = 2603556958, Ft = 2885165957, Bt = 3568439632;
|
|
1586
|
+
function fi(t) {
|
|
1589
1587
|
const e = {};
|
|
1590
1588
|
return Gt(e), e;
|
|
1591
1589
|
}
|
|
1592
1590
|
function Gt(t) {
|
|
1593
1591
|
return t.FunctionId = _.fromBytes(new Uint8Array(16)), t.FunctionName = "", t.Parameters = [], t.ResultTypeName = "", t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.IsCancellable = !1, t.Description = "", t.LlmInlineResult = !1, t.LlmCallOnlyOnce = !1, t.RequiresInstance = !1, t;
|
|
1594
1592
|
}
|
|
1595
|
-
function
|
|
1593
|
+
function Ei(t) {
|
|
1596
1594
|
const e = new D(xe);
|
|
1597
1595
|
return xt(t, e), e.finish();
|
|
1598
1596
|
}
|
|
1599
1597
|
function xt(t, e) {
|
|
1600
|
-
e.writeStringField(
|
|
1598
|
+
e.writeStringField(Rt, t.ResultTypeName), e.writeStringField(kt, t.FunctionName), e.writeStringField(Ut, t.EnumerableItemTypeName), e.writeGuidField(Dt, t.FunctionId), e.writeStringField(Mt, t.Description), e.writeBoolField(Ot, t.IsCancellable), e.writeBoolField(Lt, t.RequiresInstance), e.writeBoolField(vt, t.LlmInlineResult), e.writeBoolField(Pt, t.IsEnumerable), e.writeArrayField(Ft, b.Object, (r) => {
|
|
1601
1599
|
for (const n of t.Parameters)
|
|
1602
|
-
r.writeObject(
|
|
1603
|
-
|
|
1600
|
+
r.writeObject(Ti, (s) => {
|
|
1601
|
+
wi(n, s);
|
|
1604
1602
|
});
|
|
1605
1603
|
}), e.writeBoolField(Bt, t.LlmCallOnlyOnce);
|
|
1606
1604
|
}
|
|
1607
|
-
function
|
|
1608
|
-
const r = e ??
|
|
1609
|
-
return Gt(r),
|
|
1605
|
+
function pi(t, e) {
|
|
1606
|
+
const r = e ?? fi();
|
|
1607
|
+
return Gt(r), Ii(t, r), r;
|
|
1610
1608
|
}
|
|
1611
|
-
function
|
|
1609
|
+
function Ii(t, e) {
|
|
1612
1610
|
let r;
|
|
1613
1611
|
for (; (r = t.next()) !== null; )
|
|
1614
1612
|
switch (r.fieldId) {
|
|
1615
|
-
case
|
|
1613
|
+
case Rt: {
|
|
1616
1614
|
if (r.isNull) throw new Error();
|
|
1617
1615
|
e.ResultTypeName = r.asString();
|
|
1618
1616
|
break;
|
|
@@ -1632,12 +1630,12 @@ function _i(t, e) {
|
|
|
1632
1630
|
e.FunctionId = r.asGuid();
|
|
1633
1631
|
break;
|
|
1634
1632
|
}
|
|
1635
|
-
case
|
|
1633
|
+
case Mt: {
|
|
1636
1634
|
if (r.isNull) throw new Error();
|
|
1637
1635
|
e.Description = r.asString();
|
|
1638
1636
|
break;
|
|
1639
1637
|
}
|
|
1640
|
-
case
|
|
1638
|
+
case Ot: {
|
|
1641
1639
|
if (r.isNull) throw new Error();
|
|
1642
1640
|
e.IsCancellable = r.asBool();
|
|
1643
1641
|
break;
|
|
@@ -1659,7 +1657,7 @@ function _i(t, e) {
|
|
|
1659
1657
|
}
|
|
1660
1658
|
case Ft: {
|
|
1661
1659
|
if (r.isNull) throw new Error();
|
|
1662
|
-
e.Parameters =
|
|
1660
|
+
e.Parameters = _i(r.asArray());
|
|
1663
1661
|
break;
|
|
1664
1662
|
}
|
|
1665
1663
|
case Bt: {
|
|
@@ -1669,33 +1667,33 @@ function _i(t, e) {
|
|
|
1669
1667
|
}
|
|
1670
1668
|
}
|
|
1671
1669
|
}
|
|
1672
|
-
function
|
|
1673
|
-
const n =
|
|
1674
|
-
return F(
|
|
1670
|
+
function mi(t, e, r) {
|
|
1671
|
+
const n = Ei(t);
|
|
1672
|
+
return F(di, n, xe, e, r);
|
|
1675
1673
|
}
|
|
1676
|
-
function
|
|
1674
|
+
function _i(t) {
|
|
1677
1675
|
const e = [];
|
|
1678
1676
|
let r;
|
|
1679
1677
|
for (; (r = t.next()) !== null; )
|
|
1680
|
-
e.push(
|
|
1678
|
+
e.push(Ai(r.asObject()));
|
|
1681
1679
|
return e;
|
|
1682
1680
|
}
|
|
1683
|
-
const
|
|
1684
|
-
function
|
|
1681
|
+
const Ti = 1, Vt = 607861992, Wt = 894485888, Ht = 972460562, $t = 1368629611, Kt = 1883521406, Yt = 2603556958, jt = 3609695522, zt = 4075263697, Xt = 4257460908;
|
|
1682
|
+
function Si(t) {
|
|
1685
1683
|
const e = {};
|
|
1686
1684
|
return Jt(e), e;
|
|
1687
1685
|
}
|
|
1688
1686
|
function Jt(t) {
|
|
1689
1687
|
return t.ParameterIndex = 0, t.ParameterName = "", t.TypeName = "", t.HasDefaultValue = !1, t.DefaultValueJson = "", t.DefaultValueData = new Uint8Array(0), t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.Description = "", t;
|
|
1690
1688
|
}
|
|
1691
|
-
function
|
|
1689
|
+
function wi(t, e) {
|
|
1692
1690
|
e.writeBoolField(Vt, t.HasDefaultValue), e.writeStringField(Wt, t.DefaultValueJson), e.writeStringField(Ht, t.EnumerableItemTypeName), e.writeStringField($t, t.Description), e.writeBinaryField(Kt, t.DefaultValueData), e.writeBoolField(Yt, t.IsEnumerable), e.writeStringField(jt, t.TypeName), e.writeStringField(zt, t.ParameterName), e.writeInt32Field(Xt, t.ParameterIndex | 0);
|
|
1693
1691
|
}
|
|
1694
|
-
function
|
|
1695
|
-
const r = e ??
|
|
1696
|
-
return Jt(r),
|
|
1692
|
+
function Ai(t, e) {
|
|
1693
|
+
const r = e ?? Si();
|
|
1694
|
+
return Jt(r), yi(t, r), r;
|
|
1697
1695
|
}
|
|
1698
|
-
function
|
|
1696
|
+
function yi(t, e) {
|
|
1699
1697
|
let r;
|
|
1700
1698
|
for (; (r = t.next()) !== null; )
|
|
1701
1699
|
switch (r.fieldId) {
|
|
@@ -1746,61 +1744,61 @@ function gi(t, e) {
|
|
|
1746
1744
|
}
|
|
1747
1745
|
}
|
|
1748
1746
|
}
|
|
1749
|
-
const Qt = 1,
|
|
1750
|
-
function
|
|
1747
|
+
const Qt = 1, Ni = 1048638, gi = 3678477544;
|
|
1748
|
+
function Ci(t) {
|
|
1751
1749
|
const e = {};
|
|
1752
|
-
return
|
|
1750
|
+
return bi(e), t && Object.assign(e, t), e;
|
|
1753
1751
|
}
|
|
1754
|
-
function
|
|
1752
|
+
function bi(t) {
|
|
1755
1753
|
return t.Functions = [], t;
|
|
1756
1754
|
}
|
|
1757
|
-
function
|
|
1755
|
+
function Ri(t) {
|
|
1758
1756
|
const e = new D(Qt);
|
|
1759
|
-
return
|
|
1757
|
+
return ki(t, e), e.finish();
|
|
1760
1758
|
}
|
|
1761
|
-
function
|
|
1762
|
-
e.writeArrayField(
|
|
1759
|
+
function ki(t, e) {
|
|
1760
|
+
e.writeArrayField(gi, b.Object, (r) => {
|
|
1763
1761
|
for (const n of t.Functions)
|
|
1764
1762
|
r.writeObject(xe, (s) => {
|
|
1765
1763
|
xt(n, s);
|
|
1766
1764
|
});
|
|
1767
1765
|
});
|
|
1768
1766
|
}
|
|
1769
|
-
function
|
|
1770
|
-
const n =
|
|
1771
|
-
return F(
|
|
1767
|
+
function Ui(t, e, r) {
|
|
1768
|
+
const n = Ri(t);
|
|
1769
|
+
return F(Ni, n, Qt, e, r);
|
|
1772
1770
|
}
|
|
1773
|
-
const Zt = 1,
|
|
1774
|
-
function
|
|
1771
|
+
const Zt = 1, Di = 1048602, Mi = 349453957, Oi = 703025676, Li = 3403385840, vi = 3748161056, Pi = 4289118421;
|
|
1772
|
+
function Fi(t) {
|
|
1775
1773
|
const e = {};
|
|
1776
|
-
return
|
|
1774
|
+
return Bi(e), t && Object.assign(e, t), e;
|
|
1777
1775
|
}
|
|
1778
|
-
function
|
|
1776
|
+
function Bi(t) {
|
|
1779
1777
|
return t.CallId = _.fromBytes(new Uint8Array(16)), t.InstanceId = _.fromBytes(new Uint8Array(16)), t.ResultTypeName = "", t.ResultJson = "", t.ResultData = new Uint8Array(0), t;
|
|
1780
1778
|
}
|
|
1781
|
-
function
|
|
1779
|
+
function Gi(t) {
|
|
1782
1780
|
const e = new D(Zt);
|
|
1783
|
-
return
|
|
1781
|
+
return xi(t, e), e.finish();
|
|
1784
1782
|
}
|
|
1785
|
-
function
|
|
1786
|
-
e.writeBinaryField(
|
|
1783
|
+
function xi(t, e) {
|
|
1784
|
+
e.writeBinaryField(Mi, t.ResultData), e.writeStringField(Oi, t.ResultTypeName), e.writeStringField(Li, t.ResultJson), e.writeGuidField(vi, t.CallId), e.writeGuidField(Pi, t.InstanceId);
|
|
1787
1785
|
}
|
|
1788
|
-
function
|
|
1789
|
-
const n =
|
|
1790
|
-
return F(
|
|
1786
|
+
function Vi(t, e, r) {
|
|
1787
|
+
const n = Gi(t);
|
|
1788
|
+
return F(Di, n, Zt, e, r);
|
|
1791
1789
|
}
|
|
1792
|
-
const qt = 1,
|
|
1790
|
+
const qt = 1, Wi = 65549;
|
|
1793
1791
|
function Xe(t) {
|
|
1794
1792
|
return {};
|
|
1795
1793
|
}
|
|
1796
|
-
function
|
|
1794
|
+
function Hi(t) {
|
|
1797
1795
|
return new D(qt).finish();
|
|
1798
1796
|
}
|
|
1799
1797
|
function Je(t, e, r) {
|
|
1800
|
-
const n =
|
|
1801
|
-
return F(
|
|
1798
|
+
const n = Hi();
|
|
1799
|
+
return F(Wi, n, qt, e, r);
|
|
1802
1800
|
}
|
|
1803
|
-
const
|
|
1801
|
+
const $i = 3167053791, Ki = 3342364356, Yi = 3612929027;
|
|
1804
1802
|
function er(t) {
|
|
1805
1803
|
const e = {};
|
|
1806
1804
|
return tr(e), e;
|
|
@@ -1808,39 +1806,39 @@ function er(t) {
|
|
|
1808
1806
|
function tr(t) {
|
|
1809
1807
|
return t.Category = "", t.Type = Et.Face, t.FaceBlendshapes = [], t;
|
|
1810
1808
|
}
|
|
1811
|
-
function
|
|
1809
|
+
function ji(t, e) {
|
|
1812
1810
|
const r = e ?? er();
|
|
1813
|
-
return tr(r),
|
|
1811
|
+
return tr(r), zi(t, r), r;
|
|
1814
1812
|
}
|
|
1815
|
-
function
|
|
1813
|
+
function zi(t, e) {
|
|
1816
1814
|
let r;
|
|
1817
1815
|
for (; (r = t.next()) !== null; )
|
|
1818
1816
|
switch (r.fieldId) {
|
|
1819
|
-
case
|
|
1817
|
+
case $i: {
|
|
1820
1818
|
if (r.isNull) throw new Error();
|
|
1821
1819
|
e.Type = r.asInt32();
|
|
1822
1820
|
break;
|
|
1823
1821
|
}
|
|
1824
|
-
case
|
|
1822
|
+
case Ki: {
|
|
1825
1823
|
if (r.isNull) throw new Error();
|
|
1826
|
-
e.FaceBlendshapes =
|
|
1824
|
+
e.FaceBlendshapes = Xi(r.asArray());
|
|
1827
1825
|
break;
|
|
1828
1826
|
}
|
|
1829
|
-
case
|
|
1827
|
+
case Yi: {
|
|
1830
1828
|
if (r.isNull) throw new Error();
|
|
1831
1829
|
e.Category = r.asString();
|
|
1832
1830
|
break;
|
|
1833
1831
|
}
|
|
1834
1832
|
}
|
|
1835
1833
|
}
|
|
1836
|
-
function
|
|
1834
|
+
function Xi(t) {
|
|
1837
1835
|
const e = [];
|
|
1838
1836
|
let r;
|
|
1839
1837
|
for (; (r = t.next()) !== null; )
|
|
1840
1838
|
e.push(r.asString());
|
|
1841
1839
|
return e;
|
|
1842
1840
|
}
|
|
1843
|
-
const
|
|
1841
|
+
const Ji = 3612929027;
|
|
1844
1842
|
function rr(t) {
|
|
1845
1843
|
const e = {};
|
|
1846
1844
|
return nr(e), e;
|
|
@@ -1848,22 +1846,22 @@ function rr(t) {
|
|
|
1848
1846
|
function nr(t) {
|
|
1849
1847
|
return t.Category = "", t;
|
|
1850
1848
|
}
|
|
1851
|
-
function
|
|
1849
|
+
function Qi(t, e) {
|
|
1852
1850
|
const r = e ?? rr();
|
|
1853
|
-
return nr(r),
|
|
1851
|
+
return nr(r), Zi(t, r), r;
|
|
1854
1852
|
}
|
|
1855
|
-
function
|
|
1853
|
+
function Zi(t, e) {
|
|
1856
1854
|
let r;
|
|
1857
1855
|
for (; (r = t.next()) !== null; )
|
|
1858
1856
|
switch (r.fieldId) {
|
|
1859
|
-
case
|
|
1857
|
+
case Ji: {
|
|
1860
1858
|
if (r.isNull) throw new Error();
|
|
1861
1859
|
e.Category = r.asString();
|
|
1862
1860
|
break;
|
|
1863
1861
|
}
|
|
1864
1862
|
}
|
|
1865
1863
|
}
|
|
1866
|
-
const
|
|
1864
|
+
const qi = 164808083, eo = 1368629611, to = 2739413426, ro = 2768375929, no = 2950031986, so = 3284746250, io = 4065070594;
|
|
1867
1865
|
function sr(t) {
|
|
1868
1866
|
const e = {};
|
|
1869
1867
|
return ir(e), e;
|
|
@@ -1871,183 +1869,183 @@ function sr(t) {
|
|
|
1871
1869
|
function ir(t) {
|
|
1872
1870
|
return t.Description = "", t.Codec = pt.H264, t.Width = 0, t.Height = 0, t.Framerate = 30, t.Bitrate = 0, t.IsHardwareAccelerated = !1, t;
|
|
1873
1871
|
}
|
|
1874
|
-
function
|
|
1872
|
+
function oo(t, e) {
|
|
1875
1873
|
const r = e ?? sr();
|
|
1876
|
-
return ir(r),
|
|
1874
|
+
return ir(r), ao(t, r), r;
|
|
1877
1875
|
}
|
|
1878
|
-
function
|
|
1876
|
+
function ao(t, e) {
|
|
1879
1877
|
let r;
|
|
1880
1878
|
for (; (r = t.next()) !== null; )
|
|
1881
1879
|
switch (r.fieldId) {
|
|
1882
|
-
case
|
|
1880
|
+
case qi: {
|
|
1883
1881
|
if (r.isNull) throw new Error();
|
|
1884
1882
|
e.Framerate = r.asInt32();
|
|
1885
1883
|
break;
|
|
1886
1884
|
}
|
|
1887
|
-
case
|
|
1885
|
+
case eo: {
|
|
1888
1886
|
if (r.isNull) throw new Error();
|
|
1889
1887
|
e.Description = r.asString();
|
|
1890
1888
|
break;
|
|
1891
1889
|
}
|
|
1892
|
-
case
|
|
1890
|
+
case to: {
|
|
1893
1891
|
if (r.isNull) throw new Error();
|
|
1894
1892
|
e.IsHardwareAccelerated = r.asBool();
|
|
1895
1893
|
break;
|
|
1896
1894
|
}
|
|
1897
|
-
case
|
|
1895
|
+
case ro: {
|
|
1898
1896
|
if (r.isNull) throw new Error();
|
|
1899
1897
|
e.Bitrate = r.asInt32();
|
|
1900
1898
|
break;
|
|
1901
1899
|
}
|
|
1902
|
-
case
|
|
1900
|
+
case no: {
|
|
1903
1901
|
if (r.isNull) throw new Error();
|
|
1904
1902
|
e.Height = r.asInt32();
|
|
1905
1903
|
break;
|
|
1906
1904
|
}
|
|
1907
|
-
case
|
|
1905
|
+
case so: {
|
|
1908
1906
|
if (r.isNull) throw new Error();
|
|
1909
1907
|
e.Codec = r.asInt32();
|
|
1910
1908
|
break;
|
|
1911
1909
|
}
|
|
1912
|
-
case
|
|
1910
|
+
case io: {
|
|
1913
1911
|
if (r.isNull) throw new Error();
|
|
1914
1912
|
e.Width = r.asInt32();
|
|
1915
1913
|
break;
|
|
1916
1914
|
}
|
|
1917
1915
|
}
|
|
1918
1916
|
}
|
|
1919
|
-
const
|
|
1920
|
-
function
|
|
1917
|
+
const co = 65539, lo = 414670648, uo = 693643444, ho = 1144553441, fo = 1497620243, Eo = 1559330978, po = 1999510636, Io = 2277643855, mo = 2469008121, _o = 3042922213, To = 3219210453, So = 3504054055, wo = 3642827795, Ao = 3678477544, yo = 3696445035, No = 3707543140, go = 3712281496, Co = 3748214980, bo = 3823842552, Ro = 3895362455, ko = 3897397815, Uo = 4225107827;
|
|
1918
|
+
function Do(t) {
|
|
1921
1919
|
const e = {};
|
|
1922
1920
|
return or(e), e;
|
|
1923
1921
|
}
|
|
1924
1922
|
function or(t) {
|
|
1925
1923
|
return t.Clients = /* @__PURE__ */ Object.create(null), t.UIStreams = /* @__PURE__ */ Object.create(null), t.AudioStreams = /* @__PURE__ */ Object.create(null), t.VideoStreams = /* @__PURE__ */ Object.create(null), t.TrackingStreams = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelInstanceId = "", t.FirstUserId = "", t.ChannelUrl = "", t.ChannelId = "", t.PrimaryUserId = "", t.OrganisationName = "", t.SpaceName = "", t.ChannelName = "", t.SessionId = "", t.RunnerType = "", t.BootType = "", t.PublicAccess = !1, t.DebugMode = !1, t.IsGitSource = !1, t.Functions = /* @__PURE__ */ Object.create(null), t;
|
|
1926
1924
|
}
|
|
1927
|
-
function
|
|
1925
|
+
function Mo(t, e) {
|
|
1928
1926
|
const r = z.create(t);
|
|
1929
|
-
return
|
|
1927
|
+
return Oo(r, e);
|
|
1930
1928
|
}
|
|
1931
|
-
function
|
|
1932
|
-
const r = e ??
|
|
1933
|
-
return or(r),
|
|
1929
|
+
function Oo(t, e) {
|
|
1930
|
+
const r = e ?? Do();
|
|
1931
|
+
return or(r), Lo(t, r), r;
|
|
1934
1932
|
}
|
|
1935
|
-
function
|
|
1933
|
+
function Lo(t, e) {
|
|
1936
1934
|
let r;
|
|
1937
1935
|
for (; (r = t.next()) !== null; )
|
|
1938
1936
|
switch (r.fieldId) {
|
|
1939
|
-
case
|
|
1937
|
+
case lo: {
|
|
1940
1938
|
if (r.isNull) throw new Error();
|
|
1941
1939
|
e.IsGitSource = r.asBool();
|
|
1942
1940
|
break;
|
|
1943
1941
|
}
|
|
1944
|
-
case
|
|
1942
|
+
case uo: {
|
|
1945
1943
|
if (r.isNull) throw new Error();
|
|
1946
1944
|
e.FirstUserId = r.asString();
|
|
1947
1945
|
break;
|
|
1948
1946
|
}
|
|
1949
|
-
case
|
|
1947
|
+
case ho: {
|
|
1950
1948
|
if (r.isNull) throw new Error();
|
|
1951
|
-
e.Clients =
|
|
1949
|
+
e.Clients = Po(r.asDictionary());
|
|
1952
1950
|
break;
|
|
1953
1951
|
}
|
|
1954
|
-
case
|
|
1952
|
+
case fo: {
|
|
1955
1953
|
if (r.isNull) throw new Error();
|
|
1956
|
-
e.TrackingStreams =
|
|
1954
|
+
e.TrackingStreams = Fo(r.asDictionary());
|
|
1957
1955
|
break;
|
|
1958
1956
|
}
|
|
1959
|
-
case
|
|
1957
|
+
case Eo: {
|
|
1960
1958
|
if (r.isNull) throw new Error();
|
|
1961
1959
|
e.ChannelId = r.asString();
|
|
1962
1960
|
break;
|
|
1963
1961
|
}
|
|
1964
|
-
case
|
|
1962
|
+
case po: {
|
|
1965
1963
|
if (r.isNull) throw new Error();
|
|
1966
1964
|
e.SessionId = r.asString();
|
|
1967
1965
|
break;
|
|
1968
1966
|
}
|
|
1969
|
-
case
|
|
1967
|
+
case Io: {
|
|
1970
1968
|
if (r.isNull) throw new Error();
|
|
1971
1969
|
e.ChannelUrl = r.asString();
|
|
1972
1970
|
break;
|
|
1973
1971
|
}
|
|
1974
|
-
case
|
|
1972
|
+
case mo: {
|
|
1975
1973
|
if (r.isNull) throw new Error();
|
|
1976
1974
|
e.ChannelName = r.asString();
|
|
1977
1975
|
break;
|
|
1978
1976
|
}
|
|
1979
|
-
case
|
|
1977
|
+
case _o: {
|
|
1980
1978
|
if (r.isNull) throw new Error();
|
|
1981
1979
|
e.PublicAccess = r.asBool();
|
|
1982
1980
|
break;
|
|
1983
1981
|
}
|
|
1984
|
-
case
|
|
1982
|
+
case To: {
|
|
1985
1983
|
if (r.isNull) throw new Error();
|
|
1986
1984
|
e.OrganisationName = r.asString();
|
|
1987
1985
|
break;
|
|
1988
1986
|
}
|
|
1989
|
-
case
|
|
1987
|
+
case So: {
|
|
1990
1988
|
if (r.isNull) throw new Error();
|
|
1991
1989
|
e.DebugMode = r.asBool();
|
|
1992
1990
|
break;
|
|
1993
1991
|
}
|
|
1994
|
-
case
|
|
1992
|
+
case wo: {
|
|
1995
1993
|
if (r.isNull) throw new Error();
|
|
1996
1994
|
e.RunnerType = r.asString();
|
|
1997
1995
|
break;
|
|
1998
1996
|
}
|
|
1999
|
-
case
|
|
1997
|
+
case Ao: {
|
|
2000
1998
|
if (r.isNull) throw new Error();
|
|
2001
|
-
e.Functions =
|
|
1999
|
+
e.Functions = Bo(r.asDictionary());
|
|
2002
2000
|
break;
|
|
2003
2001
|
}
|
|
2004
|
-
case
|
|
2002
|
+
case yo: {
|
|
2005
2003
|
if (r.isNull) throw new Error();
|
|
2006
|
-
e.UIStreams =
|
|
2004
|
+
e.UIStreams = Go(r.asDictionary());
|
|
2007
2005
|
break;
|
|
2008
2006
|
}
|
|
2009
|
-
case
|
|
2007
|
+
case No: {
|
|
2010
2008
|
if (r.isNull) throw new Error();
|
|
2011
2009
|
e.SpaceId = r.asString();
|
|
2012
2010
|
break;
|
|
2013
2011
|
}
|
|
2014
|
-
case
|
|
2012
|
+
case go: {
|
|
2015
2013
|
if (r.isNull) throw new Error();
|
|
2016
2014
|
e.PrimaryUserId = r.asString();
|
|
2017
2015
|
break;
|
|
2018
2016
|
}
|
|
2019
|
-
case
|
|
2017
|
+
case Co: {
|
|
2020
2018
|
if (r.isNull) throw new Error();
|
|
2021
2019
|
e.BootType = r.asString();
|
|
2022
2020
|
break;
|
|
2023
2021
|
}
|
|
2024
|
-
case
|
|
2022
|
+
case bo: {
|
|
2025
2023
|
if (r.isNull) throw new Error();
|
|
2026
2024
|
e.ChannelInstanceId = r.asString();
|
|
2027
2025
|
break;
|
|
2028
2026
|
}
|
|
2029
|
-
case
|
|
2027
|
+
case Ro: {
|
|
2030
2028
|
if (r.isNull) throw new Error();
|
|
2031
|
-
e.AudioStreams =
|
|
2029
|
+
e.AudioStreams = xo(r.asDictionary());
|
|
2032
2030
|
break;
|
|
2033
2031
|
}
|
|
2034
|
-
case
|
|
2032
|
+
case ko: {
|
|
2035
2033
|
if (r.isNull) throw new Error();
|
|
2036
|
-
e.VideoStreams =
|
|
2034
|
+
e.VideoStreams = Vo(r.asDictionary());
|
|
2037
2035
|
break;
|
|
2038
2036
|
}
|
|
2039
|
-
case
|
|
2037
|
+
case Uo: {
|
|
2040
2038
|
if (r.isNull) throw new Error();
|
|
2041
2039
|
e.SpaceName = r.asString();
|
|
2042
2040
|
break;
|
|
2043
2041
|
}
|
|
2044
2042
|
}
|
|
2045
2043
|
}
|
|
2046
|
-
function
|
|
2047
|
-
const r =
|
|
2048
|
-
return
|
|
2044
|
+
function vo(t, e) {
|
|
2045
|
+
const r = Me(t, co);
|
|
2046
|
+
return Mo(r, e);
|
|
2049
2047
|
}
|
|
2050
|
-
function
|
|
2048
|
+
function Po(t) {
|
|
2051
2049
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2052
2050
|
let r;
|
|
2053
2051
|
for (; (r = t.next()) !== null; ) {
|
|
@@ -2056,233 +2054,233 @@ function Go(t) {
|
|
|
2056
2054
|
}
|
|
2057
2055
|
return e;
|
|
2058
2056
|
}
|
|
2059
|
-
function
|
|
2057
|
+
function Fo(t) {
|
|
2060
2058
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2061
2059
|
let r;
|
|
2062
2060
|
for (; (r = t.next()) !== null; ) {
|
|
2063
2061
|
const n = r.key.asString();
|
|
2064
|
-
e[n] =
|
|
2062
|
+
e[n] = pa(r.value.asObject());
|
|
2065
2063
|
}
|
|
2066
2064
|
return e;
|
|
2067
2065
|
}
|
|
2068
|
-
function
|
|
2066
|
+
function Bo(t) {
|
|
2069
2067
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2070
2068
|
let r;
|
|
2071
2069
|
for (; (r = t.next()) !== null; ) {
|
|
2072
2070
|
const n = r.key.asInt32();
|
|
2073
|
-
e[n] =
|
|
2071
|
+
e[n] = Wo(r.value.asArray());
|
|
2074
2072
|
}
|
|
2075
2073
|
return e;
|
|
2076
2074
|
}
|
|
2077
|
-
function
|
|
2075
|
+
function Go(t) {
|
|
2078
2076
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2079
2077
|
let r;
|
|
2080
2078
|
for (; (r = t.next()) !== null; ) {
|
|
2081
2079
|
const n = r.key.asString();
|
|
2082
|
-
e[n] =
|
|
2080
|
+
e[n] = zo(r.value.asObject());
|
|
2083
2081
|
}
|
|
2084
2082
|
return e;
|
|
2085
2083
|
}
|
|
2086
|
-
function
|
|
2084
|
+
function xo(t) {
|
|
2087
2085
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2088
2086
|
let r;
|
|
2089
2087
|
for (; (r = t.next()) !== null; ) {
|
|
2090
2088
|
const n = r.key.asString();
|
|
2091
|
-
e[n] =
|
|
2089
|
+
e[n] = ta(r.value.asObject());
|
|
2092
2090
|
}
|
|
2093
2091
|
return e;
|
|
2094
2092
|
}
|
|
2095
|
-
function
|
|
2093
|
+
function Vo(t) {
|
|
2096
2094
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2097
2095
|
let r;
|
|
2098
2096
|
for (; (r = t.next()) !== null; ) {
|
|
2099
2097
|
const n = r.key.asString();
|
|
2100
|
-
e[n] =
|
|
2098
|
+
e[n] = ca(r.value.asObject());
|
|
2101
2099
|
}
|
|
2102
2100
|
return e;
|
|
2103
2101
|
}
|
|
2104
|
-
function
|
|
2102
|
+
function Wo(t) {
|
|
2105
2103
|
const e = [];
|
|
2106
2104
|
let r;
|
|
2107
2105
|
for (; (r = t.next()) !== null; )
|
|
2108
|
-
e.push(
|
|
2106
|
+
e.push(pi(r.asObject()));
|
|
2109
2107
|
return e;
|
|
2110
2108
|
}
|
|
2111
|
-
const
|
|
2112
|
-
function
|
|
2109
|
+
const Ho = 161083277, $o = 325678206, Ko = 3469892363, Yo = 3645544153;
|
|
2110
|
+
function jo(t) {
|
|
2113
2111
|
const e = {};
|
|
2114
2112
|
return ar(e), e;
|
|
2115
2113
|
}
|
|
2116
2114
|
function ar(t) {
|
|
2117
2115
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = rr(), t;
|
|
2118
2116
|
}
|
|
2119
|
-
function
|
|
2120
|
-
const r = e ??
|
|
2121
|
-
return ar(r),
|
|
2117
|
+
function zo(t, e) {
|
|
2118
|
+
const r = e ?? jo();
|
|
2119
|
+
return ar(r), Xo(t, r), r;
|
|
2122
2120
|
}
|
|
2123
|
-
function
|
|
2121
|
+
function Xo(t, e) {
|
|
2124
2122
|
let r;
|
|
2125
2123
|
for (; (r = t.next()) !== null; )
|
|
2126
2124
|
switch (r.fieldId) {
|
|
2127
|
-
case
|
|
2125
|
+
case Ho: {
|
|
2128
2126
|
if (r.isNull) throw new Error();
|
|
2129
2127
|
e.StreamId = r.asString();
|
|
2130
2128
|
break;
|
|
2131
2129
|
}
|
|
2132
|
-
case
|
|
2130
|
+
case $o: {
|
|
2133
2131
|
if (r.isNull) throw new Error();
|
|
2134
2132
|
e.ClientSessionId = r.asInt32();
|
|
2135
2133
|
break;
|
|
2136
2134
|
}
|
|
2137
|
-
case
|
|
2135
|
+
case Ko: {
|
|
2138
2136
|
if (r.isNull) throw new Error();
|
|
2139
2137
|
e.TrackId = r.asInt32();
|
|
2140
2138
|
break;
|
|
2141
2139
|
}
|
|
2142
|
-
case
|
|
2140
|
+
case Yo: {
|
|
2143
2141
|
if (r.isNull) throw new Error();
|
|
2144
|
-
e.Info =
|
|
2142
|
+
e.Info = Qi(r.asObject());
|
|
2145
2143
|
break;
|
|
2146
2144
|
}
|
|
2147
2145
|
}
|
|
2148
2146
|
}
|
|
2149
|
-
const
|
|
2150
|
-
function
|
|
2147
|
+
const Jo = 161083277, Qo = 325678206, Zo = 3469892363, qo = 3645544153;
|
|
2148
|
+
function ea(t) {
|
|
2151
2149
|
const e = {};
|
|
2152
2150
|
return cr(e), e;
|
|
2153
2151
|
}
|
|
2154
2152
|
function cr(t) {
|
|
2155
2153
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = _t(), t;
|
|
2156
2154
|
}
|
|
2157
|
-
function
|
|
2158
|
-
const r = e ??
|
|
2159
|
-
return cr(r),
|
|
2155
|
+
function ta(t, e) {
|
|
2156
|
+
const r = e ?? ea();
|
|
2157
|
+
return cr(r), ra(t, r), r;
|
|
2160
2158
|
}
|
|
2161
|
-
function
|
|
2159
|
+
function ra(t, e) {
|
|
2162
2160
|
let r;
|
|
2163
2161
|
for (; (r = t.next()) !== null; )
|
|
2164
2162
|
switch (r.fieldId) {
|
|
2165
|
-
case
|
|
2163
|
+
case Jo: {
|
|
2166
2164
|
if (r.isNull) throw new Error();
|
|
2167
2165
|
e.StreamId = r.asString();
|
|
2168
2166
|
break;
|
|
2169
2167
|
}
|
|
2170
|
-
case
|
|
2168
|
+
case Qo: {
|
|
2171
2169
|
if (r.isNull) throw new Error();
|
|
2172
2170
|
e.ClientSessionId = r.asInt32();
|
|
2173
2171
|
break;
|
|
2174
2172
|
}
|
|
2175
|
-
case
|
|
2173
|
+
case Zo: {
|
|
2176
2174
|
if (r.isNull) throw new Error();
|
|
2177
2175
|
e.TrackId = r.asInt32();
|
|
2178
2176
|
break;
|
|
2179
2177
|
}
|
|
2180
|
-
case
|
|
2178
|
+
case qo: {
|
|
2181
2179
|
if (r.isNull) throw new Error();
|
|
2182
2180
|
e.Info = In(r.asObject());
|
|
2183
2181
|
break;
|
|
2184
2182
|
}
|
|
2185
2183
|
}
|
|
2186
2184
|
}
|
|
2187
|
-
const
|
|
2188
|
-
function
|
|
2185
|
+
const na = 161083277, sa = 325678206, ia = 3469892363, oa = 3645544153;
|
|
2186
|
+
function aa(t) {
|
|
2189
2187
|
const e = {};
|
|
2190
2188
|
return lr(e), e;
|
|
2191
2189
|
}
|
|
2192
2190
|
function lr(t) {
|
|
2193
2191
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = sr(), t;
|
|
2194
2192
|
}
|
|
2195
|
-
function
|
|
2196
|
-
const r = e ??
|
|
2197
|
-
return lr(r),
|
|
2193
|
+
function ca(t, e) {
|
|
2194
|
+
const r = e ?? aa();
|
|
2195
|
+
return lr(r), la(t, r), r;
|
|
2198
2196
|
}
|
|
2199
|
-
function
|
|
2197
|
+
function la(t, e) {
|
|
2200
2198
|
let r;
|
|
2201
2199
|
for (; (r = t.next()) !== null; )
|
|
2202
2200
|
switch (r.fieldId) {
|
|
2203
|
-
case
|
|
2201
|
+
case na: {
|
|
2204
2202
|
if (r.isNull) throw new Error();
|
|
2205
2203
|
e.StreamId = r.asString();
|
|
2206
2204
|
break;
|
|
2207
2205
|
}
|
|
2208
|
-
case
|
|
2206
|
+
case sa: {
|
|
2209
2207
|
if (r.isNull) throw new Error();
|
|
2210
2208
|
e.ClientSessionId = r.asInt32();
|
|
2211
2209
|
break;
|
|
2212
2210
|
}
|
|
2213
|
-
case
|
|
2211
|
+
case ia: {
|
|
2214
2212
|
if (r.isNull) throw new Error();
|
|
2215
2213
|
e.TrackId = r.asInt32();
|
|
2216
2214
|
break;
|
|
2217
2215
|
}
|
|
2218
|
-
case
|
|
2216
|
+
case oa: {
|
|
2219
2217
|
if (r.isNull) throw new Error();
|
|
2220
|
-
e.Info =
|
|
2218
|
+
e.Info = oo(r.asObject());
|
|
2221
2219
|
break;
|
|
2222
2220
|
}
|
|
2223
2221
|
}
|
|
2224
2222
|
}
|
|
2225
|
-
const
|
|
2226
|
-
function
|
|
2223
|
+
const ua = 161083277, ha = 325678206, da = 3469892363, fa = 3645544153;
|
|
2224
|
+
function Ea(t) {
|
|
2227
2225
|
const e = {};
|
|
2228
2226
|
return ur(e), e;
|
|
2229
2227
|
}
|
|
2230
2228
|
function ur(t) {
|
|
2231
2229
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = er(), t;
|
|
2232
2230
|
}
|
|
2233
|
-
function
|
|
2234
|
-
const r = e ??
|
|
2235
|
-
return ur(r),
|
|
2231
|
+
function pa(t, e) {
|
|
2232
|
+
const r = e ?? Ea();
|
|
2233
|
+
return ur(r), Ia(t, r), r;
|
|
2236
2234
|
}
|
|
2237
|
-
function
|
|
2235
|
+
function Ia(t, e) {
|
|
2238
2236
|
let r;
|
|
2239
2237
|
for (; (r = t.next()) !== null; )
|
|
2240
2238
|
switch (r.fieldId) {
|
|
2241
|
-
case
|
|
2239
|
+
case ua: {
|
|
2242
2240
|
if (r.isNull) throw new Error();
|
|
2243
2241
|
e.StreamId = r.asString();
|
|
2244
2242
|
break;
|
|
2245
2243
|
}
|
|
2246
|
-
case
|
|
2244
|
+
case ha: {
|
|
2247
2245
|
if (r.isNull) throw new Error();
|
|
2248
2246
|
e.ClientSessionId = r.asInt32();
|
|
2249
2247
|
break;
|
|
2250
2248
|
}
|
|
2251
|
-
case
|
|
2249
|
+
case da: {
|
|
2252
2250
|
if (r.isNull) throw new Error();
|
|
2253
2251
|
e.TrackId = r.asInt32();
|
|
2254
2252
|
break;
|
|
2255
2253
|
}
|
|
2256
|
-
case
|
|
2254
|
+
case fa: {
|
|
2257
2255
|
if (r.isNull) throw new Error();
|
|
2258
|
-
e.Info =
|
|
2256
|
+
e.Info = ji(r.asObject());
|
|
2259
2257
|
break;
|
|
2260
2258
|
}
|
|
2261
2259
|
}
|
|
2262
2260
|
}
|
|
2263
|
-
const hr = 1,
|
|
2261
|
+
const hr = 1, ma = 131074;
|
|
2264
2262
|
function dr(t) {
|
|
2265
2263
|
return {};
|
|
2266
2264
|
}
|
|
2267
|
-
function
|
|
2265
|
+
function _a(t) {
|
|
2268
2266
|
return new D(hr).finish();
|
|
2269
2267
|
}
|
|
2270
2268
|
function fr(t, e, r) {
|
|
2271
|
-
const n =
|
|
2272
|
-
return F(
|
|
2269
|
+
const n = _a();
|
|
2270
|
+
return F(ma, n, hr, e, r);
|
|
2273
2271
|
}
|
|
2274
|
-
const Er = 1,
|
|
2275
|
-
function
|
|
2272
|
+
const Er = 1, Ta = 8388612;
|
|
2273
|
+
function Sa(t) {
|
|
2276
2274
|
return {};
|
|
2277
2275
|
}
|
|
2278
|
-
function
|
|
2276
|
+
function wa(t) {
|
|
2279
2277
|
return new D(Er).finish();
|
|
2280
2278
|
}
|
|
2281
|
-
function
|
|
2282
|
-
const n =
|
|
2283
|
-
return F(
|
|
2279
|
+
function Aa(t, e, r) {
|
|
2280
|
+
const n = wa();
|
|
2281
|
+
return F(Ta, n, Er, e, r);
|
|
2284
2282
|
}
|
|
2285
|
-
function
|
|
2283
|
+
function ya(t) {
|
|
2286
2284
|
return new Worker(
|
|
2287
2285
|
"" + new URL("assets/protocol-worker-BnPqA34K.js", import.meta.url).href,
|
|
2288
2286
|
{
|
|
@@ -2311,27 +2309,27 @@ class We extends W {
|
|
|
2311
2309
|
super(`No keepalive received within ${e}ms`), this.name = "KeepaliveTimeoutError";
|
|
2312
2310
|
}
|
|
2313
2311
|
}
|
|
2314
|
-
class
|
|
2312
|
+
class Na extends Ve {
|
|
2315
2313
|
constructor(e) {
|
|
2316
2314
|
super(`Maximum reconnection attempts (${e}) exceeded`), this.name = "MaxRetriesExceededError";
|
|
2317
2315
|
}
|
|
2318
2316
|
}
|
|
2319
|
-
class
|
|
2317
|
+
class ga extends y {
|
|
2320
2318
|
constructor(e) {
|
|
2321
2319
|
super(`Channel provisioning timeout after ${e}ms`), this.name = "ProvisioningTimeoutError";
|
|
2322
2320
|
}
|
|
2323
2321
|
}
|
|
2324
|
-
class
|
|
2322
|
+
class Il extends y {
|
|
2325
2323
|
constructor(e) {
|
|
2326
2324
|
super(`Channel not found: ${e}`), this.name = "ChannelNotFoundError";
|
|
2327
2325
|
}
|
|
2328
2326
|
}
|
|
2329
|
-
class
|
|
2327
|
+
class ml extends y {
|
|
2330
2328
|
constructor(e) {
|
|
2331
2329
|
super(`Space not found for domain: ${e}`), this.name = "SpaceNotFoundError";
|
|
2332
2330
|
}
|
|
2333
2331
|
}
|
|
2334
|
-
class
|
|
2332
|
+
class _l extends y {
|
|
2335
2333
|
constructor() {
|
|
2336
2334
|
super("No channels available in this space"), this.name = "NoChannelsError";
|
|
2337
2335
|
}
|
|
@@ -2352,30 +2350,30 @@ function pr(t, e) {
|
|
|
2352
2350
|
}
|
|
2353
2351
|
var Ir = /* @__PURE__ */ ((t) => (t[t.DEBUG = 0] = "DEBUG", t[t.INFO = 1] = "INFO", t[t.WARN = 2] = "WARN", t[t.ERROR = 3] = "ERROR", t[t.NONE = 4] = "NONE", t))(Ir || {});
|
|
2354
2352
|
let He = 1, fe = null;
|
|
2355
|
-
function
|
|
2353
|
+
function Tl(t) {
|
|
2356
2354
|
He = t;
|
|
2357
2355
|
}
|
|
2358
|
-
function
|
|
2356
|
+
function Sl() {
|
|
2359
2357
|
return He;
|
|
2360
2358
|
}
|
|
2361
|
-
function
|
|
2359
|
+
function Ca(t) {
|
|
2362
2360
|
fe = t;
|
|
2363
2361
|
}
|
|
2364
|
-
function
|
|
2362
|
+
function wl() {
|
|
2365
2363
|
return fe;
|
|
2366
2364
|
}
|
|
2367
|
-
const
|
|
2365
|
+
const ba = {
|
|
2368
2366
|
0: "DEBUG",
|
|
2369
2367
|
1: "INFO",
|
|
2370
2368
|
2: "WARN",
|
|
2371
2369
|
3: "ERROR",
|
|
2372
2370
|
4: "NONE"
|
|
2373
2371
|
};
|
|
2374
|
-
function
|
|
2372
|
+
function Ra(t, e) {
|
|
2375
2373
|
return `[${t}] ${e}`;
|
|
2376
2374
|
}
|
|
2377
2375
|
function ie(t, e, r, n) {
|
|
2378
|
-
const s = (/* @__PURE__ */ new Date()).toISOString(), i =
|
|
2376
|
+
const s = (/* @__PURE__ */ new Date()).toISOString(), i = ba[t];
|
|
2379
2377
|
if (fe && fe({
|
|
2380
2378
|
timestamp: s,
|
|
2381
2379
|
level: t,
|
|
@@ -2384,7 +2382,7 @@ function ie(t, e, r, n) {
|
|
|
2384
2382
|
message: r,
|
|
2385
2383
|
args: n
|
|
2386
2384
|
}), He <= t) {
|
|
2387
|
-
const o =
|
|
2385
|
+
const o = Ra(e, r);
|
|
2388
2386
|
switch (t) {
|
|
2389
2387
|
case 0:
|
|
2390
2388
|
console.debug(o, ...n);
|
|
@@ -2417,8 +2415,8 @@ function L(t) {
|
|
|
2417
2415
|
}
|
|
2418
2416
|
};
|
|
2419
2417
|
}
|
|
2420
|
-
const oe = L("WebSocketTransport"),
|
|
2421
|
-
class
|
|
2418
|
+
const oe = L("WebSocketTransport"), ka = 1e4;
|
|
2419
|
+
class Ua {
|
|
2422
2420
|
ws = null;
|
|
2423
2421
|
keepaliveTimeout = null;
|
|
2424
2422
|
// Pre-allocated keepalive response message to avoid allocation per keepalive
|
|
@@ -2445,7 +2443,7 @@ class Ma {
|
|
|
2445
2443
|
clearTimeout(c), this.ws && (this.ws.onopen = null, this.ws.onerror = null, this.ws.onclose = null, this.ws.onmessage = null);
|
|
2446
2444
|
}, c = setTimeout(() => {
|
|
2447
2445
|
o || (o = !0, a(), this.ws?.close(), s(new W("WebSocket connection timeout")));
|
|
2448
|
-
},
|
|
2446
|
+
}, ka);
|
|
2449
2447
|
this.ws.onopen = () => {
|
|
2450
2448
|
i = !0, clearTimeout(c), this.ws.send(r), this.resetKeepaliveTimeout(), o || (o = !0, n());
|
|
2451
2449
|
}, this.ws.onerror = () => {
|
|
@@ -2494,11 +2492,11 @@ class Ma {
|
|
|
2494
2492
|
this.keepaliveTimeout && (clearTimeout(this.keepaliveTimeout), this.keepaliveTimeout = null);
|
|
2495
2493
|
}
|
|
2496
2494
|
}
|
|
2497
|
-
const B = L("WebTransportTransport"), Qe = 4,
|
|
2495
|
+
const B = L("WebTransportTransport"), Qe = 4, Da = 65536;
|
|
2498
2496
|
function mr() {
|
|
2499
2497
|
return typeof WebTransport < "u";
|
|
2500
2498
|
}
|
|
2501
|
-
class
|
|
2499
|
+
class Ma {
|
|
2502
2500
|
transport = null;
|
|
2503
2501
|
stream = null;
|
|
2504
2502
|
reader = null;
|
|
@@ -2506,7 +2504,7 @@ class va {
|
|
|
2506
2504
|
keepaliveTimeout = null;
|
|
2507
2505
|
readLoopActive = !1;
|
|
2508
2506
|
// Grow-only receive buffer with offset/length tracking to minimize allocations
|
|
2509
|
-
receiveBuffer = new Uint8Array(
|
|
2507
|
+
receiveBuffer = new Uint8Array(Da);
|
|
2510
2508
|
receiveBufferOffset = 0;
|
|
2511
2509
|
receiveBufferLength = 0;
|
|
2512
2510
|
// Cached DataView to avoid allocation per message
|
|
@@ -2661,7 +2659,7 @@ class va {
|
|
|
2661
2659
|
}
|
|
2662
2660
|
}
|
|
2663
2661
|
const ee = L("Channel");
|
|
2664
|
-
class
|
|
2662
|
+
class Oa {
|
|
2665
2663
|
state = "disconnected";
|
|
2666
2664
|
transport = null;
|
|
2667
2665
|
config;
|
|
@@ -2738,13 +2736,13 @@ class Pa {
|
|
|
2738
2736
|
switch (e.Type) {
|
|
2739
2737
|
case k.WebSocket:
|
|
2740
2738
|
case k.WebSocketProxy:
|
|
2741
|
-
this.transport = new
|
|
2739
|
+
this.transport = new Ua(r);
|
|
2742
2740
|
break;
|
|
2743
2741
|
case k.WebTransport:
|
|
2744
2742
|
case k.WebTransportProxy:
|
|
2745
2743
|
if (!mr())
|
|
2746
2744
|
throw new Error("WebTransport is not supported in this browser");
|
|
2747
|
-
this.transport = new
|
|
2745
|
+
this.transport = new Ma(r);
|
|
2748
2746
|
break;
|
|
2749
2747
|
default:
|
|
2750
2748
|
throw new Error(`Unsupported entrypoint type: ${k[e.Type]}`);
|
|
@@ -2786,7 +2784,7 @@ class Pa {
|
|
|
2786
2784
|
}
|
|
2787
2785
|
}
|
|
2788
2786
|
const G = L("ChannelManager");
|
|
2789
|
-
class
|
|
2787
|
+
class La {
|
|
2790
2788
|
channels = /* @__PURE__ */ new Map();
|
|
2791
2789
|
// keyed by opcode group
|
|
2792
2790
|
activeType = null;
|
|
@@ -2888,7 +2886,7 @@ class Fa {
|
|
|
2888
2886
|
* Connect a single channel.
|
|
2889
2887
|
*/
|
|
2890
2888
|
async connectChannel(e) {
|
|
2891
|
-
const r = new
|
|
2889
|
+
const r = new Oa({
|
|
2892
2890
|
entrypoint: e,
|
|
2893
2891
|
sessionId: this.config.sessionId,
|
|
2894
2892
|
keepaliveTimeoutMs: this.config.keepaliveTimeoutMs,
|
|
@@ -2943,7 +2941,7 @@ class Fa {
|
|
|
2943
2941
|
if (!this.shouldReconnect)
|
|
2944
2942
|
return;
|
|
2945
2943
|
if (this.reconnectAttempts >= this.config.maxReconnectAttempts) {
|
|
2946
|
-
G.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new
|
|
2944
|
+
G.error(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new Na(this.config.maxReconnectAttempts));
|
|
2947
2945
|
return;
|
|
2948
2946
|
}
|
|
2949
2947
|
this.setState("reconnecting"), this.reconnectAttempts++;
|
|
@@ -2970,7 +2968,7 @@ class Fa {
|
|
|
2970
2968
|
this.state !== e && (this.state = e, this.config.onStateChange?.(e));
|
|
2971
2969
|
}
|
|
2972
2970
|
}
|
|
2973
|
-
const
|
|
2971
|
+
const va = 5e3, Pa = 3e4, Ze = 35e3, qe = 500, et = 6, _r = 6e4, Ce = "ikon_device_id";
|
|
2974
2972
|
function $e() {
|
|
2975
2973
|
if (typeof window > "u" || typeof localStorage > "u")
|
|
2976
2974
|
return crypto.randomUUID();
|
|
@@ -2981,14 +2979,14 @@ function $e() {
|
|
|
2981
2979
|
return crypto.randomUUID();
|
|
2982
2980
|
}
|
|
2983
2981
|
}
|
|
2984
|
-
function
|
|
2982
|
+
function Al() {
|
|
2985
2983
|
if (!(typeof localStorage > "u"))
|
|
2986
2984
|
try {
|
|
2987
2985
|
localStorage.removeItem(Ce);
|
|
2988
2986
|
} catch {
|
|
2989
2987
|
}
|
|
2990
2988
|
}
|
|
2991
|
-
function
|
|
2989
|
+
function yl(t) {
|
|
2992
2990
|
try {
|
|
2993
2991
|
const e = t.split(".");
|
|
2994
2992
|
return e.length !== 3 ? null : JSON.parse(atob(e[1])).id ?? null;
|
|
@@ -2996,22 +2994,22 @@ function Cl(t) {
|
|
|
2996
2994
|
return null;
|
|
2997
2995
|
}
|
|
2998
2996
|
}
|
|
2999
|
-
const Ee = {},
|
|
2997
|
+
const Ee = {}, be = "https://api.prod.ikon.live", pe = "https://api.dev.ikon.live", tt = "https://auth.ikonai.com", rt = "https://auth.dev.ikonai.com", Nl = "https://auth.ikonai.com";
|
|
3000
2998
|
function Tr(t) {
|
|
3001
|
-
return t === "development" ? pe :
|
|
2999
|
+
return t === "development" ? pe : be;
|
|
3002
3000
|
}
|
|
3003
|
-
function
|
|
3001
|
+
function gl() {
|
|
3004
3002
|
const t = typeof import.meta < "u" ? Ee?.VITE_IKON_BACKEND_URL : void 0;
|
|
3005
|
-
return t || (typeof window > "u" ?
|
|
3003
|
+
return t || (typeof window > "u" ? be : !Ke() || window.location.hostname.includes(".dev.") ? pe : be);
|
|
3006
3004
|
}
|
|
3007
|
-
function
|
|
3005
|
+
function Cl() {
|
|
3008
3006
|
const t = typeof import.meta < "u" ? Ee?.VITE_IKON_BACKEND_TYPE : void 0;
|
|
3009
3007
|
if (t === "development" || t === "production")
|
|
3010
3008
|
return t;
|
|
3011
3009
|
const e = typeof import.meta < "u" ? Ee?.VITE_IKON_BACKEND_URL : void 0;
|
|
3012
3010
|
return e ? e.includes(".dev.") ? "development" : "production" : typeof window > "u" ? "production" : Ke() ? window.location.hostname.includes(".dev.") ? "development" : "production" : "development";
|
|
3013
3011
|
}
|
|
3014
|
-
function
|
|
3012
|
+
function bl() {
|
|
3015
3013
|
const t = typeof import.meta < "u" ? Ee?.VITE_IKON_AUTH_URL : void 0;
|
|
3016
3014
|
return t || (typeof window > "u" ? tt : !Ke() || window.location.hostname.includes(".dev.") ? rt : tt);
|
|
3017
3015
|
}
|
|
@@ -3023,8 +3021,8 @@ function Sr() {
|
|
|
3023
3021
|
e[r] = n;
|
|
3024
3022
|
return e;
|
|
3025
3023
|
}
|
|
3026
|
-
const
|
|
3027
|
-
function
|
|
3024
|
+
const Fa = ["ikon_token", "ikon_provider", "error"];
|
|
3025
|
+
function Rl() {
|
|
3028
3026
|
if (typeof window > "u")
|
|
3029
3027
|
return { parameters: {} };
|
|
3030
3028
|
const t = window.location.pathname;
|
|
@@ -3036,7 +3034,7 @@ function Dl() {
|
|
|
3036
3034
|
throw new Error("URL cannot contain both /s/[sessionId] and /c/[channelKey]");
|
|
3037
3035
|
const i = Sr(), o = {};
|
|
3038
3036
|
for (const [a, c] of Object.entries(i))
|
|
3039
|
-
|
|
3037
|
+
Fa.includes(a) || (o[a] = c);
|
|
3040
3038
|
return { sessionId: e, channelKey: r, parameters: o };
|
|
3041
3039
|
}
|
|
3042
3040
|
function Ke() {
|
|
@@ -3051,8 +3049,8 @@ function Ke() {
|
|
|
3051
3049
|
}
|
|
3052
3050
|
return !0;
|
|
3053
3051
|
}
|
|
3054
|
-
const Ie = L("Authenticator"), j = S.GROUP_CORE | S.GROUP_KEEPALIVE | S.GROUP_EVENTS | S.GROUP_ACTIONS | S.GROUP_UI | S.GROUP_AUDIO | S.GROUP_VIDEO,
|
|
3055
|
-
async function
|
|
3052
|
+
const Ie = L("Authenticator"), j = S.GROUP_CORE | S.GROUP_KEEPALIVE | S.GROUP_EVENTS | S.GROUP_ACTIONS | S.GROUP_UI | S.GROUP_AUDIO | S.GROUP_VIDEO, Ba = 1e3, Ga = 5e3;
|
|
3053
|
+
async function xa(t) {
|
|
3056
3054
|
try {
|
|
3057
3055
|
const e = await fetch(`${pe}/users/me`, {
|
|
3058
3056
|
credentials: "include",
|
|
@@ -3088,7 +3086,7 @@ async function Ar(t, e, r, n, s, i, o) {
|
|
|
3088
3086
|
}
|
|
3089
3087
|
return await u.json();
|
|
3090
3088
|
}
|
|
3091
|
-
async function
|
|
3089
|
+
async function Va(t, e, r, n) {
|
|
3092
3090
|
const s = `${t}/rooms/connect`, i = await fetch(s, wr(e, r, n));
|
|
3093
3091
|
if (!i.ok) {
|
|
3094
3092
|
const o = await i.text().catch(() => "Unknown error");
|
|
@@ -3098,17 +3096,17 @@ async function $a(t, e, r, n) {
|
|
|
3098
3096
|
}
|
|
3099
3097
|
async function yr(t, e, r, n, s) {
|
|
3100
3098
|
const i = Date.now();
|
|
3101
|
-
let o =
|
|
3099
|
+
let o = Ba;
|
|
3102
3100
|
for (; ; ) {
|
|
3103
3101
|
if (s?.aborted)
|
|
3104
3102
|
throw new y("Connection aborted");
|
|
3105
3103
|
if (Date.now() - i >= r)
|
|
3106
|
-
throw new
|
|
3107
|
-
const c = await
|
|
3104
|
+
throw new ga(r);
|
|
3105
|
+
const c = await Va(t, e, n, s), u = c.state?.toLowerCase();
|
|
3108
3106
|
if (u === "running")
|
|
3109
3107
|
return c;
|
|
3110
3108
|
if (u === "provisioning") {
|
|
3111
|
-
await pr(o, s), o = Math.min(o * 1.5,
|
|
3109
|
+
await pr(o, s), o = Math.min(o * 1.5, Ga);
|
|
3112
3110
|
continue;
|
|
3113
3111
|
}
|
|
3114
3112
|
throw new y(`Unexpected channel state: ${c.state}`);
|
|
@@ -3121,10 +3119,10 @@ async function Ye(t, e) {
|
|
|
3121
3119
|
throw new y(`Failed to connect: ${r.status} ${o}`);
|
|
3122
3120
|
}
|
|
3123
3121
|
const n = await r.arrayBuffer(), s = new Uint8Array(n);
|
|
3124
|
-
return { authResponse:
|
|
3122
|
+
return { authResponse: As(s) };
|
|
3125
3123
|
}
|
|
3126
|
-
function
|
|
3127
|
-
return
|
|
3124
|
+
function Wa(t, e) {
|
|
3125
|
+
return gs({
|
|
3128
3126
|
ServerSessionId: "",
|
|
3129
3127
|
// Server will fill this in
|
|
3130
3128
|
ContextType: J.Browser,
|
|
@@ -3151,7 +3149,7 @@ function Ka(t, e) {
|
|
|
3151
3149
|
Parameters: t.parameters ?? {}
|
|
3152
3150
|
});
|
|
3153
3151
|
}
|
|
3154
|
-
function
|
|
3152
|
+
function Ha(t) {
|
|
3155
3153
|
return {
|
|
3156
3154
|
ServerSessionId: t.ServerSessionId,
|
|
3157
3155
|
ContextType: t.ContextType,
|
|
@@ -3178,13 +3176,13 @@ function Ya(t) {
|
|
|
3178
3176
|
Parameters: t.Parameters
|
|
3179
3177
|
};
|
|
3180
3178
|
}
|
|
3181
|
-
async function
|
|
3179
|
+
async function $a(t, e) {
|
|
3182
3180
|
const r = `https://${t.host}:${t.httpsPort}`;
|
|
3183
3181
|
Ie.debug(`Authenticating with local server: ${r}`);
|
|
3184
3182
|
const s = { ...Sr(), ...t.parameters };
|
|
3185
3183
|
let i = t.userId;
|
|
3186
|
-
i || (i = await
|
|
3187
|
-
const o =
|
|
3184
|
+
i || (i = await xa(e), i || (i = "local", Ie.warn('Could not determine user ID. Using fallback "local". To fix: either provide userId in config, or log in to the Ikon portal at https://portal.dev.ikon.live')));
|
|
3185
|
+
const o = Wa({ ...t, parameters: s }, i), a = Ha(o), c = await fetch(`${r}/connect-token`, {
|
|
3188
3186
|
method: "POST",
|
|
3189
3187
|
headers: {
|
|
3190
3188
|
"Content-Type": "application/json"
|
|
@@ -3202,7 +3200,7 @@ async function ja(t, e) {
|
|
|
3202
3200
|
const d = `${r}/connect?token=${encodeURIComponent(f)}`;
|
|
3203
3201
|
return Ye(d, e);
|
|
3204
3202
|
}
|
|
3205
|
-
async function
|
|
3203
|
+
async function Ka(t, e) {
|
|
3206
3204
|
if (t.sessionId && t.channelKey)
|
|
3207
3205
|
throw new y("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
|
|
3208
3206
|
const r = Tr(t.backendType);
|
|
@@ -3262,7 +3260,7 @@ async function za(t, e) {
|
|
|
3262
3260
|
const d = f.configuration.url;
|
|
3263
3261
|
return Ye(d, e);
|
|
3264
3262
|
}
|
|
3265
|
-
async function
|
|
3263
|
+
async function Ya(t, e) {
|
|
3266
3264
|
if (t.sessionId && t.channelKey)
|
|
3267
3265
|
throw new y("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
|
|
3268
3266
|
const r = Tr(t.backendType), n = t.token;
|
|
@@ -3303,22 +3301,22 @@ async function Xa(t, e) {
|
|
|
3303
3301
|
const u = c.configuration.url;
|
|
3304
3302
|
return Ye(u, e);
|
|
3305
3303
|
}
|
|
3306
|
-
const Nr = "ikon.theme",
|
|
3304
|
+
const Nr = "ikon.theme", Re = "ikon.theme-user", ja = "ikon.theme-change";
|
|
3307
3305
|
function gr(t) {
|
|
3308
3306
|
typeof document < "u" && document.documentElement && document.documentElement.setAttribute("data-theme", t);
|
|
3309
3307
|
}
|
|
3310
|
-
const
|
|
3308
|
+
const za = {
|
|
3311
3309
|
name: "ikon.client.getTheme",
|
|
3312
3310
|
description: "Get the currently selected client theme",
|
|
3313
3311
|
returnType: { kind: "string", nullable: !0 }
|
|
3314
3312
|
};
|
|
3315
|
-
function
|
|
3313
|
+
function Xa() {
|
|
3316
3314
|
if (typeof window > "u" || !window.localStorage)
|
|
3317
3315
|
return null;
|
|
3318
|
-
const t = window.localStorage.getItem(
|
|
3316
|
+
const t = window.localStorage.getItem(Re) ?? window.localStorage.getItem(Nr) ?? "light";
|
|
3319
3317
|
return gr(t), t;
|
|
3320
3318
|
}
|
|
3321
|
-
const
|
|
3319
|
+
const Ja = {
|
|
3322
3320
|
name: "ikon.client.setTheme",
|
|
3323
3321
|
description: "Update the client UI theme",
|
|
3324
3322
|
returnType: { kind: "boolean" },
|
|
@@ -3327,49 +3325,49 @@ const qa = {
|
|
|
3327
3325
|
{ name: "persist", type: { kind: "boolean", nullable: !0 }, description: "Whether to persist as user preference" }
|
|
3328
3326
|
]
|
|
3329
3327
|
};
|
|
3330
|
-
function
|
|
3328
|
+
function Qa(t, e) {
|
|
3331
3329
|
if (typeof window > "u" || !window.localStorage || typeof t != "string")
|
|
3332
3330
|
return !1;
|
|
3333
3331
|
const r = t.trim().toLowerCase();
|
|
3334
3332
|
if (!r)
|
|
3335
3333
|
return !1;
|
|
3336
3334
|
const n = e === void 0 ? !0 : !!e, s = window.localStorage;
|
|
3337
|
-
n ? s.setItem(
|
|
3335
|
+
n ? s.setItem(Re, r) : s.removeItem(Re), s.setItem(Nr, r);
|
|
3338
3336
|
try {
|
|
3339
|
-
window.dispatchEvent(new CustomEvent(
|
|
3337
|
+
window.dispatchEvent(new CustomEvent(ja, { detail: { mode: r } }));
|
|
3340
3338
|
} catch {
|
|
3341
3339
|
}
|
|
3342
3340
|
return gr(r), !0;
|
|
3343
3341
|
}
|
|
3344
|
-
const
|
|
3342
|
+
const Za = {
|
|
3345
3343
|
name: "ikon.client.getLanguage",
|
|
3346
3344
|
description: "Get the browser language preference",
|
|
3347
3345
|
returnType: { kind: "string" }
|
|
3348
3346
|
};
|
|
3349
|
-
function
|
|
3347
|
+
function qa() {
|
|
3350
3348
|
return typeof navigator > "u" ? "en-US" : navigator.language || "en-US";
|
|
3351
3349
|
}
|
|
3352
|
-
const
|
|
3350
|
+
const ec = {
|
|
3353
3351
|
name: "ikon.client.getTimezone",
|
|
3354
3352
|
description: "Get the browser timezone (IANA format)",
|
|
3355
3353
|
returnType: { kind: "string" }
|
|
3356
3354
|
};
|
|
3357
|
-
function
|
|
3355
|
+
function tc() {
|
|
3358
3356
|
try {
|
|
3359
3357
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
3360
3358
|
} catch {
|
|
3361
3359
|
return "UTC";
|
|
3362
3360
|
}
|
|
3363
3361
|
}
|
|
3364
|
-
const
|
|
3362
|
+
const rc = {
|
|
3365
3363
|
name: "ikon.client.getUrl",
|
|
3366
3364
|
description: "Get the current browser URL path and query string",
|
|
3367
3365
|
returnType: { kind: "string", nullable: !0 }
|
|
3368
3366
|
};
|
|
3369
|
-
function
|
|
3367
|
+
function nc() {
|
|
3370
3368
|
return typeof window > "u" ? null : window.location.pathname + window.location.search;
|
|
3371
3369
|
}
|
|
3372
|
-
const
|
|
3370
|
+
const sc = {
|
|
3373
3371
|
name: "ikon.client.setUrl",
|
|
3374
3372
|
description: "Update the browser URL without triggering a page reload",
|
|
3375
3373
|
returnType: { kind: "boolean" },
|
|
@@ -3378,7 +3376,7 @@ const ac = {
|
|
|
3378
3376
|
{ name: "replace", type: { kind: "boolean", nullable: !0 }, description: "If true, replaces current history entry instead of adding new one" }
|
|
3379
3377
|
]
|
|
3380
3378
|
};
|
|
3381
|
-
function
|
|
3379
|
+
function ic(t, e) {
|
|
3382
3380
|
if (typeof window > "u" || !window.history || typeof t != "string")
|
|
3383
3381
|
return !1;
|
|
3384
3382
|
const r = t.trim();
|
|
@@ -3390,13 +3388,13 @@ function cc(t, e) {
|
|
|
3390
3388
|
return !1;
|
|
3391
3389
|
}
|
|
3392
3390
|
}
|
|
3393
|
-
const
|
|
3391
|
+
const oc = {
|
|
3394
3392
|
name: "ikon.client.vibrate",
|
|
3395
3393
|
description: "Trigger haptic feedback on supported devices",
|
|
3396
3394
|
returnType: { kind: "boolean" },
|
|
3397
3395
|
parameters: [{ name: "pattern", type: { kind: "string" }, description: 'Duration in ms, or comma-separated pattern (e.g., "200" or "100,50,100")' }]
|
|
3398
3396
|
};
|
|
3399
|
-
function
|
|
3397
|
+
function ac(t) {
|
|
3400
3398
|
if (typeof navigator > "u" || !navigator.vibrate || typeof t != "string")
|
|
3401
3399
|
return !1;
|
|
3402
3400
|
try {
|
|
@@ -3407,13 +3405,13 @@ function uc(t) {
|
|
|
3407
3405
|
}
|
|
3408
3406
|
}
|
|
3409
3407
|
let te = null;
|
|
3410
|
-
const
|
|
3408
|
+
const cc = {
|
|
3411
3409
|
name: "ikon.client.keepScreenAwake",
|
|
3412
3410
|
description: "Prevent or allow the screen to sleep",
|
|
3413
3411
|
returnType: { kind: "boolean" },
|
|
3414
3412
|
parameters: [{ name: "enabled", type: { kind: "boolean" }, description: "Whether to keep the screen awake" }]
|
|
3415
3413
|
};
|
|
3416
|
-
async function
|
|
3414
|
+
async function lc(t) {
|
|
3417
3415
|
if (typeof navigator > "u" || !("wakeLock" in navigator))
|
|
3418
3416
|
return !1;
|
|
3419
3417
|
try {
|
|
@@ -3422,15 +3420,15 @@ async function dc(t) {
|
|
|
3422
3420
|
return !1;
|
|
3423
3421
|
}
|
|
3424
3422
|
}
|
|
3425
|
-
const
|
|
3423
|
+
const uc = {
|
|
3426
3424
|
name: "ikon.client.getVisibility",
|
|
3427
3425
|
description: "Get the current page visibility state",
|
|
3428
3426
|
returnType: { kind: "string", nullable: !0 }
|
|
3429
3427
|
};
|
|
3430
|
-
function
|
|
3428
|
+
function hc() {
|
|
3431
3429
|
return typeof document > "u" ? null : document.visibilityState || null;
|
|
3432
3430
|
}
|
|
3433
|
-
const
|
|
3431
|
+
const dc = {
|
|
3434
3432
|
name: "ikon.client.scrollTo",
|
|
3435
3433
|
description: "Scroll the page to a specific position",
|
|
3436
3434
|
returnType: { kind: "boolean" },
|
|
@@ -3440,7 +3438,7 @@ const pc = {
|
|
|
3440
3438
|
{ name: "smooth", type: { kind: "boolean", nullable: !0 }, description: "Whether to animate the scroll" }
|
|
3441
3439
|
]
|
|
3442
3440
|
};
|
|
3443
|
-
function
|
|
3441
|
+
function fc(t, e, r) {
|
|
3444
3442
|
if (typeof window > "u" || typeof t != "number" || typeof e != "number")
|
|
3445
3443
|
return !1;
|
|
3446
3444
|
try {
|
|
@@ -3453,12 +3451,12 @@ function Ic(t, e, r) {
|
|
|
3453
3451
|
return !1;
|
|
3454
3452
|
}
|
|
3455
3453
|
}
|
|
3456
|
-
const
|
|
3454
|
+
const Ec = {
|
|
3457
3455
|
name: "ikon.client.getBatteryLevel",
|
|
3458
3456
|
description: "Get the current battery level (0-100)",
|
|
3459
3457
|
returnType: { kind: "number", nullable: !0 }
|
|
3460
3458
|
};
|
|
3461
|
-
async function
|
|
3459
|
+
async function pc() {
|
|
3462
3460
|
if (typeof navigator > "u" || !("getBattery" in navigator))
|
|
3463
3461
|
return null;
|
|
3464
3462
|
try {
|
|
@@ -3468,39 +3466,39 @@ async function _c() {
|
|
|
3468
3466
|
return null;
|
|
3469
3467
|
}
|
|
3470
3468
|
}
|
|
3471
|
-
const
|
|
3469
|
+
const Ic = {
|
|
3472
3470
|
name: "ikon.client.getNetworkType",
|
|
3473
3471
|
description: "Get the current network connection type",
|
|
3474
3472
|
returnType: { kind: "string", nullable: !0 }
|
|
3475
3473
|
};
|
|
3476
|
-
function
|
|
3474
|
+
function mc() {
|
|
3477
3475
|
if (typeof navigator > "u")
|
|
3478
3476
|
return null;
|
|
3479
3477
|
const t = navigator.connection;
|
|
3480
3478
|
return t && (t.effectiveType || t.type) || null;
|
|
3481
3479
|
}
|
|
3482
|
-
const
|
|
3483
|
-
{ definition:
|
|
3484
|
-
{ definition:
|
|
3485
|
-
{ definition:
|
|
3486
|
-
{ definition:
|
|
3487
|
-
{ definition:
|
|
3488
|
-
{ definition:
|
|
3489
|
-
{ definition:
|
|
3490
|
-
{ definition:
|
|
3491
|
-
{ definition:
|
|
3492
|
-
{ definition:
|
|
3493
|
-
{ definition:
|
|
3494
|
-
{ definition:
|
|
3480
|
+
const _c = [
|
|
3481
|
+
{ definition: za, handler: Xa },
|
|
3482
|
+
{ definition: Ja, handler: Qa },
|
|
3483
|
+
{ definition: Za, handler: qa },
|
|
3484
|
+
{ definition: ec, handler: tc },
|
|
3485
|
+
{ definition: rc, handler: nc },
|
|
3486
|
+
{ definition: sc, handler: ic },
|
|
3487
|
+
{ definition: oc, handler: ac },
|
|
3488
|
+
{ definition: cc, handler: lc },
|
|
3489
|
+
{ definition: uc, handler: hc },
|
|
3490
|
+
{ definition: dc, handler: fc },
|
|
3491
|
+
{ definition: Ec, handler: pc },
|
|
3492
|
+
{ definition: Ic, handler: mc }
|
|
3495
3493
|
];
|
|
3496
|
-
function
|
|
3497
|
-
const e =
|
|
3494
|
+
function Tc(t) {
|
|
3495
|
+
const e = _c.map(({ definition: r, handler: n }) => t.register(r, n));
|
|
3498
3496
|
return () => e.forEach((r) => r());
|
|
3499
3497
|
}
|
|
3500
3498
|
function nt() {
|
|
3501
3499
|
return typeof window < "u" && typeof navigator < "u";
|
|
3502
3500
|
}
|
|
3503
|
-
const
|
|
3501
|
+
const Sc = new Uint8Array(0);
|
|
3504
3502
|
function me(t) {
|
|
3505
3503
|
switch (t.kind) {
|
|
3506
3504
|
case "array":
|
|
@@ -3560,7 +3558,7 @@ function Cr(t, e) {
|
|
|
3560
3558
|
}
|
|
3561
3559
|
return JSON.stringify(t);
|
|
3562
3560
|
}
|
|
3563
|
-
function
|
|
3561
|
+
function wc(t, e) {
|
|
3564
3562
|
const r = (t.parameters ?? []).map((i) => {
|
|
3565
3563
|
const o = me(i.type), a = Object.prototype.hasOwnProperty.call(i, "defaultValue"), c = a ? Cr(i.defaultValue, o) : "";
|
|
3566
3564
|
return {
|
|
@@ -3587,7 +3585,7 @@ function Nc(t, e) {
|
|
|
3587
3585
|
TypeName: re(i.descriptor),
|
|
3588
3586
|
HasDefaultValue: i.hasDefaultValue,
|
|
3589
3587
|
DefaultValueJson: i.defaultValueJson,
|
|
3590
|
-
DefaultValueData:
|
|
3588
|
+
DefaultValueData: Sc,
|
|
3591
3589
|
IsEnumerable: !1,
|
|
3592
3590
|
EnumerableItemTypeName: "",
|
|
3593
3591
|
Description: i.description ?? ""
|
|
@@ -3601,11 +3599,11 @@ function Nc(t, e) {
|
|
|
3601
3599
|
returnType: n
|
|
3602
3600
|
};
|
|
3603
3601
|
}
|
|
3604
|
-
const it = L("FunctionRegistry"),
|
|
3605
|
-
function
|
|
3602
|
+
const it = L("FunctionRegistry"), Ac = new Uint8Array(0);
|
|
3603
|
+
function yc(t) {
|
|
3606
3604
|
return !t || typeof t != "object" ? !1 : t.data instanceof Uint8Array;
|
|
3607
3605
|
}
|
|
3608
|
-
class
|
|
3606
|
+
class Nc {
|
|
3609
3607
|
functions = /* @__PURE__ */ new Map();
|
|
3610
3608
|
config = null;
|
|
3611
3609
|
isConnected = !1;
|
|
@@ -3627,7 +3625,7 @@ class Rc {
|
|
|
3627
3625
|
* If already connected, sends registration to server immediately.
|
|
3628
3626
|
*/
|
|
3629
3627
|
register(e, r) {
|
|
3630
|
-
const n =
|
|
3628
|
+
const n = wc(e, r);
|
|
3631
3629
|
return this.functions.set(e.name, n), this.isConnected && this.config && this.sendRegistration(n), () => this.unregister(e.name);
|
|
3632
3630
|
}
|
|
3633
3631
|
/**
|
|
@@ -3672,7 +3670,7 @@ class Rc {
|
|
|
3672
3670
|
sendAllRegistrations() {
|
|
3673
3671
|
if (!this.config || this.functions.size === 0)
|
|
3674
3672
|
return;
|
|
3675
|
-
const e = Array.from(this.functions.values()).map((s) => s.registerPayload), r =
|
|
3673
|
+
const e = Array.from(this.functions.values()).map((s) => s.registerPayload), r = Ci({ Functions: e }), n = Ui(r, this.config.sessionId);
|
|
3676
3674
|
this.config.sendProtocolMessage(n);
|
|
3677
3675
|
}
|
|
3678
3676
|
/**
|
|
@@ -3681,14 +3679,14 @@ class Rc {
|
|
|
3681
3679
|
sendRegistration(e) {
|
|
3682
3680
|
if (!this.config)
|
|
3683
3681
|
return;
|
|
3684
|
-
const r =
|
|
3682
|
+
const r = mi(e.registerPayload, this.config.sessionId);
|
|
3685
3683
|
this.config.sendProtocolMessage(r);
|
|
3686
3684
|
}
|
|
3687
3685
|
/**
|
|
3688
3686
|
* Handle an incoming function call.
|
|
3689
3687
|
*/
|
|
3690
3688
|
handleFunctionCall(e, r) {
|
|
3691
|
-
const n =
|
|
3689
|
+
const n = js(e), s = this.functions.get(n.FunctionName);
|
|
3692
3690
|
if (!s) {
|
|
3693
3691
|
it.warn(`Received call for unknown function: ${n.FunctionName}`), this.sendError(n.CallId, n.InstanceId, r, new Error(`Unknown function: ${n.FunctionName}`));
|
|
3694
3692
|
return;
|
|
@@ -3706,8 +3704,8 @@ class Rc {
|
|
|
3706
3704
|
h === void 0 || h === "" ? f.hasDefaultValue ? s.push(st(f.defaultValueJson, f.descriptor)) : s.push(void 0) : s.push(st(h, f.descriptor));
|
|
3707
3705
|
}
|
|
3708
3706
|
const i = await e.handler(...s);
|
|
3709
|
-
let o = i, a =
|
|
3710
|
-
|
|
3707
|
+
let o = i, a = Ac;
|
|
3708
|
+
yc(i) && (o = i.value, a = new Uint8Array(i.data));
|
|
3711
3709
|
const c = Cr(o, e.returnType);
|
|
3712
3710
|
this.sendResult(r.CallId, r.InstanceId, n, e, c, a);
|
|
3713
3711
|
} catch (s) {
|
|
@@ -3720,7 +3718,7 @@ class Rc {
|
|
|
3720
3718
|
sendAck(e, r, n) {
|
|
3721
3719
|
if (!this.config)
|
|
3722
3720
|
return;
|
|
3723
|
-
const s =
|
|
3721
|
+
const s = Ls(Us({ CallId: e, InstanceId: r }), this.config.sessionId, { targetIds: [n] });
|
|
3724
3722
|
this.config.sendProtocolMessage(s);
|
|
3725
3723
|
}
|
|
3726
3724
|
/**
|
|
@@ -3729,8 +3727,8 @@ class Rc {
|
|
|
3729
3727
|
sendResult(e, r, n, s, i, o) {
|
|
3730
3728
|
if (!this.config)
|
|
3731
3729
|
return;
|
|
3732
|
-
const a =
|
|
3733
|
-
|
|
3730
|
+
const a = Vi(
|
|
3731
|
+
Fi({
|
|
3734
3732
|
CallId: e,
|
|
3735
3733
|
InstanceId: r,
|
|
3736
3734
|
ResultTypeName: re(s.returnType),
|
|
@@ -3748,8 +3746,8 @@ class Rc {
|
|
|
3748
3746
|
sendError(e, r, n, s) {
|
|
3749
3747
|
if (!this.config)
|
|
3750
3748
|
return;
|
|
3751
|
-
const i =
|
|
3752
|
-
|
|
3749
|
+
const i = hi(
|
|
3750
|
+
ai({
|
|
3753
3751
|
CallId: e,
|
|
3754
3752
|
InstanceId: r,
|
|
3755
3753
|
ErrorMessage: s.message,
|
|
@@ -3762,7 +3760,7 @@ class Rc {
|
|
|
3762
3760
|
this.config.sendProtocolMessage(i);
|
|
3763
3761
|
}
|
|
3764
3762
|
}
|
|
3765
|
-
function
|
|
3763
|
+
function gc(t, e) {
|
|
3766
3764
|
return { value: t, data: e };
|
|
3767
3765
|
}
|
|
3768
3766
|
function Se(t) {
|
|
@@ -3778,7 +3776,7 @@ const Te = {
|
|
|
3778
3776
|
StartAudioCapture: "ikon.client.startAudioCapture",
|
|
3779
3777
|
StopCapture: "ikon.client.stopCapture",
|
|
3780
3778
|
CaptureImage: "ikon.client.captureImage"
|
|
3781
|
-
},
|
|
3779
|
+
}, Cc = {
|
|
3782
3780
|
name: Te.StartVideoCapture,
|
|
3783
3781
|
description: "Start camera or screen capture and stream video frames to the server",
|
|
3784
3782
|
returnType: { kind: "string" },
|
|
@@ -3786,26 +3784,26 @@ const Te = {
|
|
|
3786
3784
|
{ name: "source", type: { kind: "string", nullable: !0 }, description: "camera or screen" },
|
|
3787
3785
|
{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }
|
|
3788
3786
|
]
|
|
3789
|
-
},
|
|
3787
|
+
}, bc = {
|
|
3790
3788
|
name: Te.StartAudioCapture,
|
|
3791
3789
|
description: "Start microphone capture and stream audio frames to the server",
|
|
3792
3790
|
returnType: { kind: "string" },
|
|
3793
3791
|
parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
|
|
3794
|
-
},
|
|
3792
|
+
}, Rc = {
|
|
3795
3793
|
name: Te.StopCapture,
|
|
3796
3794
|
description: "Stop a previously started capture by captureId",
|
|
3797
3795
|
returnType: { kind: "boolean" },
|
|
3798
3796
|
parameters: [{ name: "captureId", type: { kind: "string" }, description: "Capture ID to stop" }]
|
|
3799
|
-
},
|
|
3797
|
+
}, kc = {
|
|
3800
3798
|
name: Te.CaptureImage,
|
|
3801
3799
|
description: "Capture a single image from the camera and return metadata (JSON) plus binary image data",
|
|
3802
3800
|
returnType: { kind: "string" },
|
|
3803
3801
|
parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
|
|
3804
3802
|
};
|
|
3805
|
-
function
|
|
3803
|
+
function Uc(t, e) {
|
|
3806
3804
|
const r = [];
|
|
3807
3805
|
return r.push(
|
|
3808
|
-
t.register(
|
|
3806
|
+
t.register(Cc, async (n, s) => {
|
|
3809
3807
|
const i = e.mediaCapture;
|
|
3810
3808
|
if (!i)
|
|
3811
3809
|
throw new Error("Media capture is not available in this environment");
|
|
@@ -3813,7 +3811,7 @@ function Mc(t, e) {
|
|
|
3813
3811
|
return ((typeof n == "string" && n.trim().toLowerCase() === "screen" ? "screen" : "camera") === "screen" ? await i.video.startScreen({ userGesture: !1, options: o, constraints: o?.constraints }) : await i.video.startCamera({ userGesture: !1, options: o, constraints: o?.constraints })).captureId;
|
|
3814
3812
|
})
|
|
3815
3813
|
), r.push(
|
|
3816
|
-
t.register(
|
|
3814
|
+
t.register(bc, async (n) => {
|
|
3817
3815
|
const s = e.mediaCapture;
|
|
3818
3816
|
if (!s)
|
|
3819
3817
|
throw new Error("Media capture is not available in this environment");
|
|
@@ -3821,7 +3819,7 @@ function Mc(t, e) {
|
|
|
3821
3819
|
return (await s.audio.startMic({ userGesture: !1, options: i, constraints: i?.constraints })).captureId;
|
|
3822
3820
|
})
|
|
3823
3821
|
), r.push(
|
|
3824
|
-
t.register(
|
|
3822
|
+
t.register(Rc, async (n) => {
|
|
3825
3823
|
const s = e.mediaCapture;
|
|
3826
3824
|
if (!s || typeof n != "string" || !n.trim())
|
|
3827
3825
|
return !1;
|
|
@@ -3829,7 +3827,7 @@ function Mc(t, e) {
|
|
|
3829
3827
|
return i || o;
|
|
3830
3828
|
})
|
|
3831
3829
|
), r.push(
|
|
3832
|
-
t.register(
|
|
3830
|
+
t.register(kc, async (n) => {
|
|
3833
3831
|
const s = e.mediaCapture;
|
|
3834
3832
|
if (!s)
|
|
3835
3833
|
throw new Error("Media capture is not available in this environment");
|
|
@@ -3841,21 +3839,21 @@ function Mc(t, e) {
|
|
|
3841
3839
|
width: i.width,
|
|
3842
3840
|
height: i.height
|
|
3843
3841
|
}), a = JSON.stringify({ mime: o.mime, width: o.width, height: o.height });
|
|
3844
|
-
return
|
|
3842
|
+
return gc(a, o.data);
|
|
3845
3843
|
})
|
|
3846
3844
|
), () => {
|
|
3847
3845
|
for (const n of r)
|
|
3848
3846
|
n();
|
|
3849
3847
|
};
|
|
3850
3848
|
}
|
|
3851
|
-
const
|
|
3849
|
+
const br = () => {
|
|
3852
3850
|
if (typeof navigator > "u")
|
|
3853
3851
|
return !1;
|
|
3854
3852
|
const t = navigator.userAgent, e = /iPad|iPhone|iPod/.test(t), r = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
|
|
3855
3853
|
return e || r;
|
|
3856
|
-
},
|
|
3854
|
+
}, Dc = globalThis;
|
|
3857
3855
|
function le() {
|
|
3858
|
-
if (typeof SharedArrayBuffer > "u" || typeof Atomics > "u" ||
|
|
3856
|
+
if (typeof SharedArrayBuffer > "u" || typeof Atomics > "u" || Dc.crossOriginIsolated === !1)
|
|
3859
3857
|
return !1;
|
|
3860
3858
|
try {
|
|
3861
3859
|
new SharedArrayBuffer(1);
|
|
@@ -3864,19 +3862,19 @@ function le() {
|
|
|
3864
3862
|
}
|
|
3865
3863
|
return !0;
|
|
3866
3864
|
}
|
|
3867
|
-
function
|
|
3865
|
+
function Rr(t) {
|
|
3868
3866
|
return typeof AudioWorkletNode != "function" ? !1 : typeof t.audioWorklet?.addModule == "function";
|
|
3869
3867
|
}
|
|
3870
|
-
function
|
|
3868
|
+
function Mc(t) {
|
|
3871
3869
|
return new Worker(
|
|
3872
|
-
"" + new URL("assets/audio-playback-worker-
|
|
3870
|
+
"" + new URL("assets/audio-playback-worker-CGBVb9zd.js", import.meta.url).href,
|
|
3873
3871
|
{
|
|
3874
3872
|
type: "module",
|
|
3875
3873
|
name: t?.name
|
|
3876
3874
|
}
|
|
3877
3875
|
);
|
|
3878
3876
|
}
|
|
3879
|
-
const ae = 48e3,
|
|
3877
|
+
const ae = 48e3, R = 2, kr = 1500, ot = 512, at = "playback", Oc = 120, Lc = 300, vc = 4, Pc = 200, Fc = 100, Bc = 8e3, Gc = 10, Ur = 100, ke = 50, Dr = 128, xc = 20, Vc = !0, x = 1500, Wc = -20, Hc = -100, $c = 200, g = L("IkonAudioPlayback"), Kc = () => {
|
|
3880
3878
|
if (typeof navigator > "u" || typeof window > "u")
|
|
3881
3879
|
return !1;
|
|
3882
3880
|
const t = navigator.userAgent, e = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t), r = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
|
|
@@ -3888,19 +3886,19 @@ const ae = 48e3, b = 2, kr = 1500, ot = 512, at = "playback", Pc = 120, Fc = 300
|
|
|
3888
3886
|
function K(t) {
|
|
3889
3887
|
return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
|
|
3890
3888
|
}
|
|
3891
|
-
function
|
|
3889
|
+
function Yc(t) {
|
|
3892
3890
|
return `
|
|
3893
3891
|
// Audio buffer constants
|
|
3894
3892
|
const OUTPUT_SAMPLE_RATE_HZ = ${t.outputSampleRateHz};
|
|
3895
3893
|
const DEFAULT_FRAME_SAMPLES_PER_CHANNEL = Math.max(1, Math.round(OUTPUT_SAMPLE_RATE_HZ * 0.02));
|
|
3896
|
-
const BUFFER_TARGET_MIN_MS = ${
|
|
3897
|
-
const BUFFER_TARGET_MAX_MS = ${
|
|
3898
|
-
const JITTER_MULTIPLIER = ${
|
|
3894
|
+
const BUFFER_TARGET_MIN_MS = ${Oc};
|
|
3895
|
+
const BUFFER_TARGET_MAX_MS = ${Lc};
|
|
3896
|
+
const JITTER_MULTIPLIER = ${vc};
|
|
3899
3897
|
const LOCAL_BUFFER_MAX_MS = ${kr};
|
|
3900
|
-
const CONTROL_PERIOD_MS = ${
|
|
3901
|
-
const UNDERRUN_JUMP_MS = ${
|
|
3902
|
-
const STABLE_TIME_TO_DECREASE_MS = ${
|
|
3903
|
-
const DECREASE_STEP_MS = ${
|
|
3898
|
+
const CONTROL_PERIOD_MS = ${Pc};
|
|
3899
|
+
const UNDERRUN_JUMP_MS = ${Fc};
|
|
3900
|
+
const STABLE_TIME_TO_DECREASE_MS = ${Bc};
|
|
3901
|
+
const DECREASE_STEP_MS = ${Gc};
|
|
3904
3902
|
const DEFAULT_STATS_INTERVAL_SAMPLES = OUTPUT_SAMPLE_RATE_HZ;
|
|
3905
3903
|
|
|
3906
3904
|
// Pre-computed reciprocals for division-free calculations
|
|
@@ -3919,7 +3917,7 @@ const FADE_OUT_INCREMENT = 1.0 / FADE_OUT_DURATION_SAMPLES;
|
|
|
3919
3917
|
const RENDER_QUANTUM_SIZE = ${Dr};
|
|
3920
3918
|
|
|
3921
3919
|
// Buffer reduction crossfade constants (align to quantum boundary to avoid partial quanta)
|
|
3922
|
-
const BUFFER_REDUCTION_CROSSFADE_MS = ${
|
|
3920
|
+
const BUFFER_REDUCTION_CROSSFADE_MS = ${xc};
|
|
3923
3921
|
const BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW = Math.round(OUTPUT_SAMPLE_RATE_HZ * BUFFER_REDUCTION_CROSSFADE_MS / 1000);
|
|
3924
3922
|
const BUFFER_REDUCTION_CROSSFADE_SAMPLES = Math.ceil(BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW / RENDER_QUANTUM_SIZE) * RENDER_QUANTUM_SIZE;
|
|
3925
3923
|
|
|
@@ -4130,7 +4128,7 @@ class IkonAudioPlayerProcessor extends AudioWorkletProcessor {
|
|
|
4130
4128
|
this.statsIntervalSamples = Math.max(1, Math.round((OUTPUT_SAMPLE_RATE_HZ * statusIntervalMs) / 1000));
|
|
4131
4129
|
|
|
4132
4130
|
// Normalization config (hardcoded)
|
|
4133
|
-
this.normalizationEnabled = ${
|
|
4131
|
+
this.normalizationEnabled = ${Vc};
|
|
4134
4132
|
|
|
4135
4133
|
// Stream states for audio buffer
|
|
4136
4134
|
this.streams = new Map();
|
|
@@ -4806,7 +4804,7 @@ class je {
|
|
|
4806
4804
|
config;
|
|
4807
4805
|
enabled = !1;
|
|
4808
4806
|
stateUnsubscribe = null;
|
|
4809
|
-
isMobile =
|
|
4807
|
+
isMobile = Kc();
|
|
4810
4808
|
boundVisibilityChange = null;
|
|
4811
4809
|
boundPageHide = null;
|
|
4812
4810
|
unlockHandler = null;
|
|
@@ -4917,7 +4915,7 @@ class je {
|
|
|
4917
4915
|
* (e.g., button click/release) to ensure the AudioContext can be recreated.
|
|
4918
4916
|
*/
|
|
4919
4917
|
requestRecovery() {
|
|
4920
|
-
if (this.enabled &&
|
|
4918
|
+
if (this.enabled && br() && this.audioContext) {
|
|
4921
4919
|
this.stopAudioGraph();
|
|
4922
4920
|
try {
|
|
4923
4921
|
const e = new AudioContext({
|
|
@@ -5011,7 +5009,7 @@ class je {
|
|
|
5011
5009
|
const e = this.audioContext;
|
|
5012
5010
|
if (!e)
|
|
5013
5011
|
return null;
|
|
5014
|
-
const r = e.currentTime, n = e.sampleRate, s =
|
|
5012
|
+
const r = e.currentTime, n = e.sampleRate, s = R;
|
|
5015
5013
|
for (const i of this.visemeBuffers.values()) {
|
|
5016
5014
|
if (!i.timingEstablished || i.count === 0)
|
|
5017
5015
|
continue;
|
|
@@ -5080,7 +5078,7 @@ class je {
|
|
|
5080
5078
|
this.outputSampleRateHz = this.audioContext.sampleRate || ae, this.outputSampleRateHz !== a && g.debug(`AudioContext running at ${this.outputSampleRateHz}Hz (requested ${a}Hz)`), this.attachAudioContextHealthHandlers(this.audioContext);
|
|
5081
5079
|
}
|
|
5082
5080
|
const n = this.audioContext, s = this.resolveDiagnosticsConfig();
|
|
5083
|
-
if ((this.config.performance?.preferAudioWorklet ?? !0) &&
|
|
5081
|
+
if ((this.config.performance?.preferAudioWorklet ?? !0) && Rr(n)) {
|
|
5084
5082
|
await this.ensureAudioWorklet(n, s, e, r);
|
|
5085
5083
|
return;
|
|
5086
5084
|
}
|
|
@@ -5233,14 +5231,14 @@ class je {
|
|
|
5233
5231
|
await this.resumeWithTimeout(e), this.getContextState(e) === "running" && this.removeUnlockHandler();
|
|
5234
5232
|
} catch {
|
|
5235
5233
|
}
|
|
5236
|
-
const i = `${this.outputSampleRateHz}_${
|
|
5234
|
+
const i = `${this.outputSampleRateHz}_${R}`;
|
|
5237
5235
|
if (!this.workletModuleUrl || this.workletModuleKey !== i) {
|
|
5238
5236
|
if (this.workletModuleUrl)
|
|
5239
5237
|
try {
|
|
5240
5238
|
URL.revokeObjectURL(this.workletModuleUrl);
|
|
5241
5239
|
} catch {
|
|
5242
5240
|
}
|
|
5243
|
-
this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([
|
|
5241
|
+
this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([Yc({ outputSampleRateHz: this.outputSampleRateHz, outputChannels: R })], { type: "text/javascript" }));
|
|
5244
5242
|
}
|
|
5245
5243
|
this.workletReady || (this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl).catch((f) => {
|
|
5246
5244
|
throw g.warn(`Failed to load AudioWorklet module, falling back: ${K(f)}`), f;
|
|
@@ -5256,11 +5254,11 @@ class je {
|
|
|
5256
5254
|
this.audioWorkletNode = new AudioWorkletNode(e, "ikon-audio-player", {
|
|
5257
5255
|
numberOfInputs: 0,
|
|
5258
5256
|
numberOfOutputs: 1,
|
|
5259
|
-
outputChannelCount: [
|
|
5257
|
+
outputChannelCount: [R],
|
|
5260
5258
|
processorOptions: {
|
|
5261
5259
|
outputAudioConfig: { diagnostics: r },
|
|
5262
5260
|
useSharedArrayBuffer: a,
|
|
5263
|
-
outputChannels:
|
|
5261
|
+
outputChannels: R
|
|
5264
5262
|
}
|
|
5265
5263
|
}), this.audioWorkletNode.port.onmessage = (f) => {
|
|
5266
5264
|
const d = f.data;
|
|
@@ -5289,7 +5287,7 @@ class je {
|
|
|
5289
5287
|
if (this.scriptProcessorNode)
|
|
5290
5288
|
return;
|
|
5291
5289
|
this.stopAudioWorklet(), this.pendingWorkletMessages = [];
|
|
5292
|
-
const n = 1024, s = new Float32Array(n *
|
|
5290
|
+
const n = 1024, s = new Float32Array(n * R), i = Math.round(this.outputSampleRateHz * Ur / 1e3), o = Math.round(this.outputSampleRateHz * ke / 1e3), a = 1 / i, c = 1 / o, u = new Array(R), f = [], d = e.createScriptProcessor(n, 0, R);
|
|
5293
5291
|
d.onaudioprocess = (h) => {
|
|
5294
5292
|
const E = h.outputBuffer, m = E.numberOfChannels, I = E.length;
|
|
5295
5293
|
for (let p = 0; p < m; p++) {
|
|
@@ -5303,8 +5301,8 @@ class je {
|
|
|
5303
5301
|
for (let w = 0; w < I; w++) {
|
|
5304
5302
|
l.fadeDirection === "in" ? (l.fadeGain = Math.min(1, l.fadeGain + a), l.fadeGain >= 1 && (l.fadeDirection = "none")) : l.fadeDirection === "out" && (l.fadeGain = Math.max(0, l.fadeGain - c), l.fadeGain <= 0 && (l.fadeDirection = "none"));
|
|
5305
5303
|
for (let v = 0; v < m; v++) {
|
|
5306
|
-
const
|
|
5307
|
-
u[v][w] +=
|
|
5304
|
+
const M = s[w * m + v];
|
|
5305
|
+
u[v][w] += M * l.fadeGain;
|
|
5308
5306
|
}
|
|
5309
5307
|
}
|
|
5310
5308
|
const N = l.ending || l.inputDrained;
|
|
@@ -5320,11 +5318,11 @@ class je {
|
|
|
5320
5318
|
} else if (!N && l.totalSamples <= 0 && l.hasLastOut && l.lastOut && l.fadeGain > 1e-3) {
|
|
5321
5319
|
l.fadeDirection = "out", l.underrunPending = !0;
|
|
5322
5320
|
const w = l.lastOut, v = I - 1;
|
|
5323
|
-
for (let
|
|
5321
|
+
for (let M = 0; M < I; M++) {
|
|
5324
5322
|
l.fadeGain = Math.max(0, l.fadeGain - c), l.fadeGain <= 0 && (l.fadeDirection = "none");
|
|
5325
5323
|
for (let $ = 0; $ < m; $++) {
|
|
5326
5324
|
const Gr = w[v * m + $];
|
|
5327
|
-
u[$][
|
|
5325
|
+
u[$][M] += Gr * l.fadeGain;
|
|
5328
5326
|
}
|
|
5329
5327
|
}
|
|
5330
5328
|
}
|
|
@@ -5365,7 +5363,7 @@ class je {
|
|
|
5365
5363
|
e.totalSamples < 0 && (e.totalSamples = 0), this.compactFallbackQueue(e);
|
|
5366
5364
|
}
|
|
5367
5365
|
trimFallbackQueue(e) {
|
|
5368
|
-
const r = Math.floor(this.outputSampleRateHz *
|
|
5366
|
+
const r = Math.floor(this.outputSampleRateHz * R * kr / 1e3), n = e.totalSamples - r;
|
|
5369
5367
|
n <= 0 || this.skipFromFallbackQueue(e, n);
|
|
5370
5368
|
}
|
|
5371
5369
|
stopScriptProcessorDiagnostics() {
|
|
@@ -5384,7 +5382,7 @@ class je {
|
|
|
5384
5382
|
for (const [n, s] of this.fallbackQueues.entries()) {
|
|
5385
5383
|
if (s.totalSamples <= 0)
|
|
5386
5384
|
continue;
|
|
5387
|
-
const o = s.totalSamples /
|
|
5385
|
+
const o = s.totalSamples / R * 1e3 / this.outputSampleRateHz;
|
|
5388
5386
|
g.debug(`[Audio] stream=${n.substring(0, 8)} buffer=${o.toFixed(0)}ms renderer=ScriptProcessor`);
|
|
5389
5387
|
}
|
|
5390
5388
|
}, r);
|
|
@@ -5467,7 +5465,7 @@ class je {
|
|
|
5467
5465
|
type: "rebind",
|
|
5468
5466
|
transport: s,
|
|
5469
5467
|
outputSampleRate: this.outputSampleRateHz,
|
|
5470
|
-
outputChannels:
|
|
5468
|
+
outputChannels: R
|
|
5471
5469
|
});
|
|
5472
5470
|
} catch {
|
|
5473
5471
|
}
|
|
@@ -5486,7 +5484,7 @@ class je {
|
|
|
5486
5484
|
}
|
|
5487
5485
|
this.protocolPort = e;
|
|
5488
5486
|
try {
|
|
5489
|
-
this.audioWorker = new
|
|
5487
|
+
this.audioWorker = new Mc();
|
|
5490
5488
|
} catch (d) {
|
|
5491
5489
|
g.warn(`Failed to create audio worker: ${K(d)}`), this.protocolPort.close(), this.protocolPort = null;
|
|
5492
5490
|
return;
|
|
@@ -5500,12 +5498,12 @@ class je {
|
|
|
5500
5498
|
type: "configure",
|
|
5501
5499
|
transport: s ? "sab" : "pcm",
|
|
5502
5500
|
outputSampleRate: this.outputSampleRateHz,
|
|
5503
|
-
outputChannels:
|
|
5501
|
+
outputChannels: R,
|
|
5504
5502
|
preferWebCodecs: i
|
|
5505
5503
|
};
|
|
5506
5504
|
r.postMessage(o), r.postMessage({ type: "attachProtocolPort", port: e.port }, [e.port]);
|
|
5507
5505
|
const a = this.audioWorkletNode ? "AudioWorklet" : "ScriptProcessor", c = s ? "SharedArrayBuffer" : "MessagePort", f = i && typeof AudioDecoder < "u" ? "WebCodecs" : "WASM Opus";
|
|
5508
|
-
g.debug(`Audio initialized: renderer=${a}, transport=${c}, decoder=${f}, output=${this.outputSampleRateHz}Hz/${
|
|
5506
|
+
g.debug(`Audio initialized: renderer=${a}, transport=${c}, decoder=${f}, output=${this.outputSampleRateHz}Hz/${R}ch`);
|
|
5509
5507
|
}
|
|
5510
5508
|
onAudioWorkerMessage(e) {
|
|
5511
5509
|
if (e.type === "streamBegin") {
|
|
@@ -5570,7 +5568,7 @@ class je {
|
|
|
5570
5568
|
s.epochTimestampSamples = e.timestampInterleavedSamples;
|
|
5571
5569
|
const c = this.audioContext;
|
|
5572
5570
|
if (c) {
|
|
5573
|
-
const u = (c.outputLatency ?? 0) + (c.baseLatency ?? 0), f =
|
|
5571
|
+
const u = (c.outputLatency ?? 0) + (c.baseLatency ?? 0), f = Wc + u * 1e3, d = Math.min($c, Math.max(Hc, f));
|
|
5574
5572
|
s.playbackStartContextTime = c.currentTime + d / 1e3;
|
|
5575
5573
|
}
|
|
5576
5574
|
s.timingEstablished = !0;
|
|
@@ -5693,9 +5691,9 @@ class je {
|
|
|
5693
5691
|
}));
|
|
5694
5692
|
}
|
|
5695
5693
|
}
|
|
5696
|
-
function
|
|
5694
|
+
function jc(t) {
|
|
5697
5695
|
return new Worker(
|
|
5698
|
-
"" + new URL("assets/video-playback-worker-
|
|
5696
|
+
"" + new URL("assets/video-playback-worker-Dylqg54c.js", import.meta.url).href,
|
|
5699
5697
|
{
|
|
5700
5698
|
type: "module",
|
|
5701
5699
|
name: t?.name
|
|
@@ -5706,7 +5704,7 @@ const V = L("IkonVideoPlayback");
|
|
|
5706
5704
|
function we(t) {
|
|
5707
5705
|
return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
|
|
5708
5706
|
}
|
|
5709
|
-
class
|
|
5707
|
+
class zc {
|
|
5710
5708
|
client;
|
|
5711
5709
|
config;
|
|
5712
5710
|
enabled = !0;
|
|
@@ -5781,7 +5779,7 @@ class Qc {
|
|
|
5781
5779
|
}
|
|
5782
5780
|
let e;
|
|
5783
5781
|
try {
|
|
5784
|
-
e = new
|
|
5782
|
+
e = new jc();
|
|
5785
5783
|
} catch (r) {
|
|
5786
5784
|
V.warn(`Failed to create video worker: ${we(r)}`);
|
|
5787
5785
|
return;
|
|
@@ -5870,7 +5868,7 @@ class Qc {
|
|
|
5870
5868
|
const r = this.parseStreamId(e);
|
|
5871
5869
|
if (!r)
|
|
5872
5870
|
return;
|
|
5873
|
-
const n =
|
|
5871
|
+
const n = Aa(Sa(), this.client.sessionId ?? 0, {
|
|
5874
5872
|
trackId: r.trackId,
|
|
5875
5873
|
targetIds: [r.senderId]
|
|
5876
5874
|
});
|
|
@@ -5930,11 +5928,11 @@ class Qc {
|
|
|
5930
5928
|
}));
|
|
5931
5929
|
}
|
|
5932
5930
|
}
|
|
5933
|
-
class
|
|
5931
|
+
class Xc {
|
|
5934
5932
|
audio;
|
|
5935
5933
|
video;
|
|
5936
5934
|
constructor(e, r) {
|
|
5937
|
-
this.audio = new je(e, r?.audio), this.video = new
|
|
5935
|
+
this.audio = new je(e, r?.audio), this.video = new zc(e, r?.video), r?.mediaSession && this.audio.setMediaSession(r.mediaSession);
|
|
5938
5936
|
}
|
|
5939
5937
|
/**
|
|
5940
5938
|
* Releases media resources (workers, audio graph, decoders).
|
|
@@ -5945,7 +5943,7 @@ class Zc {
|
|
|
5945
5943
|
this.audio.dispose(), this.video.dispose();
|
|
5946
5944
|
}
|
|
5947
5945
|
}
|
|
5948
|
-
class
|
|
5946
|
+
class Jc {
|
|
5949
5947
|
static getStorageForCapacity(e, r) {
|
|
5950
5948
|
const n = Int32Array.BYTES_PER_ELEMENT * 2, s = r.BYTES_PER_ELEMENT * e;
|
|
5951
5949
|
return new SharedArrayBuffer(n + s);
|
|
@@ -5999,7 +5997,7 @@ class qc {
|
|
|
5999
5997
|
return n = (n + r) % this.capacity, Atomics.store(this.readWrite, 0, n), r;
|
|
6000
5998
|
}
|
|
6001
5999
|
}
|
|
6002
|
-
function
|
|
6000
|
+
function Qc(t) {
|
|
6003
6001
|
return new Worker(
|
|
6004
6002
|
"" + new URL("assets/audio-capture-worker-kpORDYGU.js", import.meta.url).href,
|
|
6005
6003
|
{
|
|
@@ -6008,12 +6006,12 @@ function el(t) {
|
|
|
6008
6006
|
}
|
|
6009
6007
|
);
|
|
6010
6008
|
}
|
|
6011
|
-
const
|
|
6012
|
-
function
|
|
6009
|
+
const Zc = L("IkonAudioCapture");
|
|
6010
|
+
function qc() {
|
|
6013
6011
|
const t = globalThis.crypto;
|
|
6014
6012
|
return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
|
|
6015
6013
|
}
|
|
6016
|
-
function
|
|
6014
|
+
function el() {
|
|
6017
6015
|
return `
|
|
6018
6016
|
class RingBuffer {
|
|
6019
6017
|
static getStorageForCapacity(capacity, type) {
|
|
@@ -6142,7 +6140,7 @@ class IkonAudioCaptureProcessor extends AudioWorkletProcessor {
|
|
|
6142
6140
|
registerProcessor('ikon-audio-capture', IkonAudioCaptureProcessor);
|
|
6143
6141
|
`;
|
|
6144
6142
|
}
|
|
6145
|
-
class
|
|
6143
|
+
class tl {
|
|
6146
6144
|
constructor(e, r) {
|
|
6147
6145
|
this.client = e, this.config = r ?? {};
|
|
6148
6146
|
}
|
|
@@ -6162,12 +6160,12 @@ class sl {
|
|
|
6162
6160
|
ensureWorker() {
|
|
6163
6161
|
if (this.worker)
|
|
6164
6162
|
return this.worker;
|
|
6165
|
-
const e = new
|
|
6163
|
+
const e = new Qc();
|
|
6166
6164
|
return this.worker = e, e.addEventListener("message", (r) => {
|
|
6167
6165
|
const n = r.data;
|
|
6168
6166
|
if (n?.type === "error") {
|
|
6169
6167
|
const s = n.error;
|
|
6170
|
-
|
|
6168
|
+
Zc.warn(`Audio capture worker error: ${s?.name ?? "Error"} ${s?.message ?? ""}`);
|
|
6171
6169
|
}
|
|
6172
6170
|
}), e;
|
|
6173
6171
|
}
|
|
@@ -6203,9 +6201,9 @@ class sl {
|
|
|
6203
6201
|
return await navigator.mediaDevices.getUserMedia({ audio: n });
|
|
6204
6202
|
}
|
|
6205
6203
|
async ensureWorklet(e) {
|
|
6206
|
-
if (!
|
|
6204
|
+
if (!Rr(e))
|
|
6207
6205
|
throw new Error("AudioWorklet is not supported in this browser");
|
|
6208
|
-
this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([
|
|
6206
|
+
this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([el()], { type: "text/javascript" }))), (!this.workletReady || this.workletContext !== e) && (this.workletContext = e, this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl));
|
|
6209
6207
|
try {
|
|
6210
6208
|
await this.workletReady;
|
|
6211
6209
|
} catch (r) {
|
|
@@ -6221,13 +6219,13 @@ class sl {
|
|
|
6221
6219
|
if (!i)
|
|
6222
6220
|
throw s.getTracks().forEach((p) => p.stop()), new Error("No audio track available");
|
|
6223
6221
|
await this.ensureWorklet(n);
|
|
6224
|
-
const o =
|
|
6222
|
+
const o = qc(), a = this.allocateTrackId(), c = n.createMediaStreamSource(s), u = n.createGain();
|
|
6225
6223
|
u.gain.value = 0, u.connect(n.destination);
|
|
6226
6224
|
const h = le() ? "sab" : "pcm";
|
|
6227
6225
|
let E;
|
|
6228
6226
|
if (h === "sab") {
|
|
6229
6227
|
const p = Math.floor(n.sampleRate * 2);
|
|
6230
|
-
E =
|
|
6228
|
+
E = Jc.getStorageForCapacity(p, Float32Array);
|
|
6231
6229
|
}
|
|
6232
6230
|
const m = this.ensureWorker();
|
|
6233
6231
|
m.postMessage({
|
|
@@ -6247,12 +6245,12 @@ class sl {
|
|
|
6247
6245
|
const N = setTimeout(() => {
|
|
6248
6246
|
m.removeEventListener("message", w), l(new Error("Audio capture worker start timeout"));
|
|
6249
6247
|
}, 1e4), w = (v) => {
|
|
6250
|
-
const
|
|
6251
|
-
if (
|
|
6248
|
+
const M = v.data;
|
|
6249
|
+
if (M?.type === "started" && M.captureId === o)
|
|
6252
6250
|
clearTimeout(N), m.removeEventListener("message", w), p();
|
|
6253
|
-
else if (
|
|
6251
|
+
else if (M?.type === "error" && M.captureId === o) {
|
|
6254
6252
|
clearTimeout(N), m.removeEventListener("message", w);
|
|
6255
|
-
const $ =
|
|
6253
|
+
const $ = M.error;
|
|
6256
6254
|
l(new Error($?.message ?? "Audio capture failed to start"));
|
|
6257
6255
|
}
|
|
6258
6256
|
};
|
|
@@ -6289,7 +6287,7 @@ class sl {
|
|
|
6289
6287
|
T.stopped || m.postMessage({ type: "startSegment", captureId: o });
|
|
6290
6288
|
},
|
|
6291
6289
|
endSegment: () => {
|
|
6292
|
-
T.stopped || (m.postMessage({ type: "endSegment", captureId: o }),
|
|
6290
|
+
T.stopped || (m.postMessage({ type: "endSegment", captureId: o }), br() && T.stop());
|
|
6293
6291
|
},
|
|
6294
6292
|
stop: async () => {
|
|
6295
6293
|
if (!T.stopped) {
|
|
@@ -6368,9 +6366,9 @@ class sl {
|
|
|
6368
6366
|
}
|
|
6369
6367
|
}
|
|
6370
6368
|
}
|
|
6371
|
-
const
|
|
6372
|
-
async function
|
|
6373
|
-
const r = e.mime ?? Lr, n = e.quality ??
|
|
6369
|
+
const Mr = 1280, Or = 720, rl = 30, Lr = "image/jpeg", nl = 0.92;
|
|
6370
|
+
async function sl(t, e) {
|
|
6371
|
+
const r = e.mime ?? Lr, n = e.quality ?? nl;
|
|
6374
6372
|
if (typeof OffscreenCanvas < "u" && t instanceof OffscreenCanvas)
|
|
6375
6373
|
try {
|
|
6376
6374
|
return await t.convertToBlob({ type: r, quality: n });
|
|
@@ -6387,7 +6385,7 @@ async function al(t, e) {
|
|
|
6387
6385
|
);
|
|
6388
6386
|
});
|
|
6389
6387
|
}
|
|
6390
|
-
class
|
|
6388
|
+
class il {
|
|
6391
6389
|
async acquireCameraStream(e) {
|
|
6392
6390
|
if (!navigator.mediaDevices)
|
|
6393
6391
|
throw new Error("Media devices are not available in this environment");
|
|
@@ -6412,7 +6410,7 @@ class cl {
|
|
|
6412
6410
|
await s.play();
|
|
6413
6411
|
} catch {
|
|
6414
6412
|
}
|
|
6415
|
-
const i = s.videoWidth || (n.getSettings().width ??
|
|
6413
|
+
const i = s.videoWidth || (n.getSettings().width ?? Mr), o = s.videoHeight || (n.getSettings().height ?? Or), a = e.width ? Math.max(1, Math.floor(e.width)) : i, c = e.height ? Math.max(1, Math.floor(e.height)) : o;
|
|
6416
6414
|
let u;
|
|
6417
6415
|
if (typeof OffscreenCanvas < "u")
|
|
6418
6416
|
u = new OffscreenCanvas(a, c);
|
|
@@ -6424,7 +6422,7 @@ class cl {
|
|
|
6424
6422
|
if (!f)
|
|
6425
6423
|
throw new Error("2D canvas context unavailable");
|
|
6426
6424
|
f.drawImage(s, 0, 0, a, c);
|
|
6427
|
-
const d = await
|
|
6425
|
+
const d = await sl(u, e), h = await d.arrayBuffer();
|
|
6428
6426
|
return {
|
|
6429
6427
|
mime: d.type || e.mime || Lr,
|
|
6430
6428
|
width: a,
|
|
@@ -6451,7 +6449,7 @@ class cl {
|
|
|
6451
6449
|
}
|
|
6452
6450
|
}
|
|
6453
6451
|
}
|
|
6454
|
-
function
|
|
6452
|
+
function ol(t) {
|
|
6455
6453
|
return new Worker(
|
|
6456
6454
|
"" + new URL("assets/video-capture-worker-y4Nlx7f9.js", import.meta.url).href,
|
|
6457
6455
|
{
|
|
@@ -6461,17 +6459,17 @@ function ll(t) {
|
|
|
6461
6459
|
);
|
|
6462
6460
|
}
|
|
6463
6461
|
const lt = L("IkonVideoCapture");
|
|
6464
|
-
function
|
|
6462
|
+
function al() {
|
|
6465
6463
|
const t = globalThis.crypto;
|
|
6466
6464
|
return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
|
|
6467
6465
|
}
|
|
6468
|
-
function
|
|
6466
|
+
function cl() {
|
|
6469
6467
|
const t = globalThis.MediaStreamTrackProcessor;
|
|
6470
6468
|
if (!t)
|
|
6471
6469
|
throw new Error("MediaStreamTrackProcessor is not available in this browser");
|
|
6472
6470
|
return t;
|
|
6473
6471
|
}
|
|
6474
|
-
class
|
|
6472
|
+
class ll {
|
|
6475
6473
|
constructor(e) {
|
|
6476
6474
|
this.client = e;
|
|
6477
6475
|
}
|
|
@@ -6487,7 +6485,7 @@ class dl {
|
|
|
6487
6485
|
ensureWorker() {
|
|
6488
6486
|
if (this.worker)
|
|
6489
6487
|
return this.worker;
|
|
6490
|
-
const e = new
|
|
6488
|
+
const e = new ol();
|
|
6491
6489
|
return this.worker = e, e.addEventListener("message", (r) => {
|
|
6492
6490
|
const n = r.data;
|
|
6493
6491
|
if (n?.type === "error") {
|
|
@@ -6514,7 +6512,7 @@ class dl {
|
|
|
6514
6512
|
async getMediaStream(e) {
|
|
6515
6513
|
if (!navigator.mediaDevices)
|
|
6516
6514
|
throw new Error("Media devices are not available in this environment");
|
|
6517
|
-
const r = e.constraints ?? {}, n = e.options?.framerate ??
|
|
6515
|
+
const r = e.constraints ?? {}, n = e.options?.framerate ?? rl, s = {
|
|
6518
6516
|
...r,
|
|
6519
6517
|
frameRate: r.frameRate ?? { ideal: n }
|
|
6520
6518
|
};
|
|
@@ -6525,10 +6523,10 @@ class dl {
|
|
|
6525
6523
|
if (!r)
|
|
6526
6524
|
throw new Error("Cannot start video capture before client is connected");
|
|
6527
6525
|
this.ensurePorts();
|
|
6528
|
-
const n =
|
|
6526
|
+
const n = al(), s = await this.getMediaStream(e), i = s.getVideoTracks()[0];
|
|
6529
6527
|
if (!i)
|
|
6530
6528
|
throw s.getTracks().forEach((I) => I.stop()), new Error("No video track available");
|
|
6531
|
-
const o = i.getSettings(), a = e.options?.width ?? o.width ??
|
|
6529
|
+
const o = i.getSettings(), a = e.options?.width ?? o.width ?? Mr, c = e.options?.height ?? o.height ?? Or, u = cl(), d = new u({ track: i }).readable, h = this.allocateTrackId(), E = this.ensureWorker();
|
|
6532
6530
|
E.postMessage(
|
|
6533
6531
|
{
|
|
6534
6532
|
type: "start",
|
|
@@ -6596,12 +6594,12 @@ class dl {
|
|
|
6596
6594
|
this.protocolPort?.close(), this.protocolPort = null, this.sendPort?.close(), this.sendPort = null;
|
|
6597
6595
|
}
|
|
6598
6596
|
}
|
|
6599
|
-
class
|
|
6597
|
+
class ul {
|
|
6600
6598
|
audio;
|
|
6601
6599
|
video;
|
|
6602
6600
|
image;
|
|
6603
6601
|
constructor(e, r) {
|
|
6604
|
-
this.audio = new
|
|
6602
|
+
this.audio = new tl(e, r?.audio), this.video = new ll(e), this.image = new il();
|
|
6605
6603
|
}
|
|
6606
6604
|
dispose() {
|
|
6607
6605
|
this.audio.dispose(), this.video.dispose();
|
|
@@ -6613,7 +6611,7 @@ const ut = {
|
|
|
6613
6611
|
[k.WebTransportProxy]: 2,
|
|
6614
6612
|
[k.WebSocketProxy]: 3
|
|
6615
6613
|
}, Ae = "ikon_endpoint_type";
|
|
6616
|
-
class
|
|
6614
|
+
class hl {
|
|
6617
6615
|
isLocal;
|
|
6618
6616
|
workingEndpointType = null;
|
|
6619
6617
|
constructor(e) {
|
|
@@ -6675,7 +6673,7 @@ class El {
|
|
|
6675
6673
|
}
|
|
6676
6674
|
}
|
|
6677
6675
|
const A = L("IkonClient");
|
|
6678
|
-
class
|
|
6676
|
+
class kl {
|
|
6679
6677
|
channelManager = null;
|
|
6680
6678
|
protocolWorker = null;
|
|
6681
6679
|
workerManagerState = null;
|
|
@@ -6730,27 +6728,27 @@ class Ol {
|
|
|
6730
6728
|
return this._mediaCapture;
|
|
6731
6729
|
}
|
|
6732
6730
|
constructor(e) {
|
|
6733
|
-
this.config = e, this.slowConnectionThresholdMs = e.timeouts?.slowConnectionThresholdMs ??
|
|
6731
|
+
this.config = e, this.slowConnectionThresholdMs = e.timeouts?.slowConnectionThresholdMs ?? va, this.connectionTimeoutMs = e.timeouts?.connectionTimeoutMs ?? Pa;
|
|
6734
6732
|
const r = [e.local, e.apiKey, e.sessionToken].filter(Boolean).length;
|
|
6735
6733
|
if (r === 0)
|
|
6736
6734
|
throw new Error('IkonClient requires one of: "local", "apiKey", or "sessionToken" configuration');
|
|
6737
6735
|
if (r > 1)
|
|
6738
6736
|
throw new Error('IkonClient accepts only one of: "local", "apiKey", or "sessionToken" configuration');
|
|
6739
|
-
this.endpointSelector = new
|
|
6737
|
+
this.endpointSelector = new hl({
|
|
6740
6738
|
local: e.local
|
|
6741
|
-
}), this._functionRegistry = new
|
|
6739
|
+
}), this._functionRegistry = new Nc(), nt() && !e.disableBrowserFunctions && (this.unregisterBrowserFunctions = Tc(this._functionRegistry));
|
|
6742
6740
|
const n = e.audio ? {
|
|
6743
6741
|
performance: e.audio.performance,
|
|
6744
6742
|
background: e.audio.background,
|
|
6745
6743
|
diagnostics: e.audio.diagnostics
|
|
6746
6744
|
} : void 0, s = e.video ? { performance: e.video.performance } : void 0;
|
|
6747
|
-
this._media = new
|
|
6745
|
+
this._media = new Xc(this, { audio: n, video: s, mediaSession: e.mediaSession }), this._media.audio.setEnabled(!0), this._media.video.setEnabled(!0), nt() && (this._mediaCapture = new ul(this, {
|
|
6748
6746
|
audio: {
|
|
6749
6747
|
performance: {
|
|
6750
6748
|
preferWebCodecs: e.audio?.performance?.preferWebCodecs
|
|
6751
6749
|
}
|
|
6752
6750
|
}
|
|
6753
|
-
}), this.unregisterMediaCaptureFunctions =
|
|
6751
|
+
}), this.unregisterMediaCaptureFunctions = Uc(this._functionRegistry, this));
|
|
6754
6752
|
}
|
|
6755
6753
|
_lastError = void 0;
|
|
6756
6754
|
/**
|
|
@@ -6991,11 +6989,11 @@ class Ol {
|
|
|
6991
6989
|
async authenticate() {
|
|
6992
6990
|
const e = this.abortController?.signal;
|
|
6993
6991
|
if (this.config.local)
|
|
6994
|
-
return
|
|
6992
|
+
return $a(this.config.local, e);
|
|
6995
6993
|
if (this.config.apiKey)
|
|
6996
|
-
return
|
|
6994
|
+
return Ka(this.config.apiKey, e);
|
|
6997
6995
|
if (this.config.sessionToken)
|
|
6998
|
-
return
|
|
6996
|
+
return Ya(this.config.sessionToken, e);
|
|
6999
6997
|
throw new Error("No connection configuration provided (need local, apiKey, or sessionToken)");
|
|
7000
6998
|
}
|
|
7001
6999
|
/**
|
|
@@ -7009,7 +7007,7 @@ class Ol {
|
|
|
7009
7007
|
}
|
|
7010
7008
|
if (r === S.CORE_GLOBAL_STATE)
|
|
7011
7009
|
try {
|
|
7012
|
-
this._globalState =
|
|
7010
|
+
this._globalState = vo(e), this._globalState.DebugMode && this.protocolWorker && this.protocolWorker.postMessage({ type: "enableDevtools", enabled: !0 }), this._globalStateReceived || (this._globalStateReceived = !0, this.tryHandleJoined());
|
|
7013
7011
|
} catch (s) {
|
|
7014
7012
|
A.error("Failed to parse GlobalState:", s);
|
|
7015
7013
|
}
|
|
@@ -7097,7 +7095,7 @@ class Ol {
|
|
|
7097
7095
|
}
|
|
7098
7096
|
let r;
|
|
7099
7097
|
try {
|
|
7100
|
-
r = new
|
|
7098
|
+
r = new ya();
|
|
7101
7099
|
} catch (h) {
|
|
7102
7100
|
A.warn(`Failed to create protocol worker, falling back to main thread: ${h}`), await this.connectProtocolOnMainThread(e);
|
|
7103
7101
|
return;
|
|
@@ -7148,7 +7146,7 @@ class Ol {
|
|
|
7148
7146
|
}
|
|
7149
7147
|
}
|
|
7150
7148
|
async connectProtocolOnMainThread(e) {
|
|
7151
|
-
this.workerManagerState = null, this.protocolWorker = null, this.channelManager = new
|
|
7149
|
+
this.workerManagerState = null, this.protocolWorker = null, this.channelManager = new La({
|
|
7152
7150
|
sessionId: this._sessionId,
|
|
7153
7151
|
keepaliveTimeoutMs: this.config.timeouts?.keepaliveTimeoutMs ?? Ze,
|
|
7154
7152
|
reconnectBackoffMs: this.config.timeouts?.reconnectBackoffMs ?? qe,
|
|
@@ -7279,121 +7277,121 @@ class Ol {
|
|
|
7279
7277
|
}
|
|
7280
7278
|
}
|
|
7281
7279
|
}
|
|
7282
|
-
function
|
|
7280
|
+
function Ul(t) {
|
|
7283
7281
|
return t === "connecting" || t === "connectingSlow" || t === "reconnecting";
|
|
7284
7282
|
}
|
|
7285
|
-
function
|
|
7283
|
+
function Dl(t) {
|
|
7286
7284
|
return t === "connected";
|
|
7287
7285
|
}
|
|
7288
|
-
function
|
|
7286
|
+
function Ml(t) {
|
|
7289
7287
|
return t === "offline" || t === "offlineError" || t === "idle";
|
|
7290
7288
|
}
|
|
7291
|
-
function
|
|
7289
|
+
function Ol(t) {
|
|
7292
7290
|
return t === "offlineError";
|
|
7293
7291
|
}
|
|
7294
7292
|
const vr = /* @__PURE__ */ new Map();
|
|
7295
7293
|
for (const [t, e] of Object.entries(S))
|
|
7296
7294
|
typeof e == "number" && vr.set(e, t);
|
|
7297
|
-
function
|
|
7295
|
+
function Ll(t) {
|
|
7298
7296
|
return vr.get(t) ?? `UNKNOWN_${t}`;
|
|
7299
7297
|
}
|
|
7300
7298
|
const Pr = 1e3, Fr = Ir.INFO;
|
|
7301
|
-
let
|
|
7302
|
-
function
|
|
7303
|
-
t.level < Br || (
|
|
7299
|
+
let O = [], Ue = Pr, Br = Fr, De = null;
|
|
7300
|
+
function dl(t) {
|
|
7301
|
+
t.level < Br || (O.push(t), O.length > Ue && (O = O.slice(-Ue)));
|
|
7304
7302
|
}
|
|
7305
|
-
function
|
|
7306
|
-
Ue = t?.maxBufferSize ?? Pr, Br = t?.minLevel ?? Fr,
|
|
7303
|
+
function fl(t) {
|
|
7304
|
+
Ue = t?.maxBufferSize ?? Pr, Br = t?.minLevel ?? Fr, O = [], Ca(dl);
|
|
7307
7305
|
}
|
|
7308
|
-
function
|
|
7306
|
+
function vl(t) {
|
|
7309
7307
|
De = t;
|
|
7310
7308
|
}
|
|
7311
|
-
function
|
|
7312
|
-
return
|
|
7309
|
+
function Pl() {
|
|
7310
|
+
return O;
|
|
7313
7311
|
}
|
|
7314
|
-
function
|
|
7315
|
-
const t =
|
|
7316
|
-
return
|
|
7312
|
+
function El() {
|
|
7313
|
+
const t = O;
|
|
7314
|
+
return O = [], t;
|
|
7317
7315
|
}
|
|
7318
|
-
function
|
|
7319
|
-
if (!De ||
|
|
7316
|
+
function Fl() {
|
|
7317
|
+
if (!De || O.length === 0)
|
|
7320
7318
|
return 0;
|
|
7321
|
-
const t =
|
|
7319
|
+
const t = El();
|
|
7322
7320
|
return De(t), t.length;
|
|
7323
7321
|
}
|
|
7324
|
-
function
|
|
7325
|
-
|
|
7322
|
+
function Bl() {
|
|
7323
|
+
O = [];
|
|
7326
7324
|
}
|
|
7327
|
-
function
|
|
7328
|
-
return
|
|
7325
|
+
function Gl() {
|
|
7326
|
+
return O.length;
|
|
7329
7327
|
}
|
|
7330
|
-
|
|
7328
|
+
fl();
|
|
7331
7329
|
export {
|
|
7332
7330
|
y as AuthenticationError,
|
|
7333
|
-
|
|
7334
|
-
|
|
7335
|
-
|
|
7331
|
+
Oa as Channel,
|
|
7332
|
+
La as ChannelManager,
|
|
7333
|
+
Il as ChannelNotFoundError,
|
|
7336
7334
|
X as ClientType,
|
|
7337
7335
|
Ve as ConnectionError,
|
|
7338
7336
|
J as ContextType,
|
|
7339
|
-
|
|
7337
|
+
hl as EndpointSelector,
|
|
7340
7338
|
k as EntrypointType,
|
|
7341
|
-
|
|
7342
|
-
|
|
7339
|
+
Nc as FunctionRegistry,
|
|
7340
|
+
Nl as IKON_AUTH_BASE_URL,
|
|
7343
7341
|
rt as IKON_AUTH_URL_DEV,
|
|
7344
7342
|
tt as IKON_AUTH_URL_PROD,
|
|
7345
7343
|
pe as IKON_BACKEND_URL_DEV,
|
|
7346
|
-
|
|
7347
|
-
|
|
7344
|
+
be as IKON_BACKEND_URL_PROD,
|
|
7345
|
+
tl as IkonAudioCapture,
|
|
7348
7346
|
je as IkonAudioPlayback,
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7347
|
+
kl as IkonClient,
|
|
7348
|
+
il as IkonImageCapture,
|
|
7349
|
+
Xc as IkonMedia,
|
|
7350
|
+
ul as IkonMediaCapture,
|
|
7351
|
+
ll as IkonVideoCapture,
|
|
7352
|
+
zc as IkonVideoPlayback,
|
|
7355
7353
|
We as KeepaliveTimeoutError,
|
|
7356
7354
|
Ir as LogLevel,
|
|
7357
|
-
|
|
7358
|
-
|
|
7355
|
+
Na as MaxRetriesExceededError,
|
|
7356
|
+
_l as NoChannelsError,
|
|
7359
7357
|
S as Opcode,
|
|
7360
|
-
|
|
7361
|
-
|
|
7358
|
+
ga as ProvisioningTimeoutError,
|
|
7359
|
+
ml as SpaceNotFoundError,
|
|
7362
7360
|
W as TransportError,
|
|
7363
7361
|
Z as UserType,
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7362
|
+
pl as asProtocolMessage,
|
|
7363
|
+
Al as clearDeviceId,
|
|
7364
|
+
Bl as clearLogBuffer,
|
|
7367
7365
|
L as createLogger,
|
|
7368
|
-
|
|
7369
|
-
|
|
7370
|
-
|
|
7371
|
-
|
|
7372
|
-
|
|
7373
|
-
|
|
7374
|
-
|
|
7375
|
-
|
|
7376
|
-
|
|
7377
|
-
|
|
7366
|
+
bl as deriveAuthUrl,
|
|
7367
|
+
Cl as deriveBackendType,
|
|
7368
|
+
gl as deriveBackendUrl,
|
|
7369
|
+
yl as extractUserIdFromToken,
|
|
7370
|
+
Fl as flushLogs,
|
|
7371
|
+
Pl as getBufferedLogs,
|
|
7372
|
+
Gl as getLogBufferSize,
|
|
7373
|
+
Sl as getLogLevel,
|
|
7374
|
+
wl as getLogSink,
|
|
7375
|
+
Ll as getOpcodeName,
|
|
7378
7376
|
$e as getOrCreateDeviceId,
|
|
7379
|
-
|
|
7380
|
-
|
|
7377
|
+
fl as initializeLogSink,
|
|
7378
|
+
Rr as isAudioWorkletSupported,
|
|
7381
7379
|
nt as isBrowserEnvironment,
|
|
7382
7380
|
Ke as isCloudEnvironment,
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
7381
|
+
Dl as isConnected,
|
|
7382
|
+
Ul as isConnecting,
|
|
7383
|
+
Ol as isError,
|
|
7384
|
+
Ml as isOffline,
|
|
7387
7385
|
le as isSharedArrayBufferSupported,
|
|
7388
7386
|
mr as isWebTransportSupported,
|
|
7389
|
-
|
|
7387
|
+
Rl as parseUrlParams,
|
|
7390
7388
|
ue as readOpcode,
|
|
7391
7389
|
ce as readOpcodeGroup,
|
|
7392
7390
|
ne as readProtocolMessageHeaders,
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7391
|
+
Tc as registerBrowserFunctions,
|
|
7392
|
+
Tl as setLogLevel,
|
|
7393
|
+
Ca as setLogSink,
|
|
7394
|
+
vl as setSendLogsCallback,
|
|
7395
|
+
El as takeBufferedLogs,
|
|
7396
|
+
gc as withResultData
|
|
7399
7397
|
};
|