@ikonai/sdk 1.0.36 → 1.0.37
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 +726 -721
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const Bs = {
|
|
2
2
|
Compressed: 8
|
|
3
3
|
};
|
|
4
|
-
function
|
|
4
|
+
function Wf(t) {
|
|
5
5
|
return t;
|
|
6
6
|
}
|
|
7
7
|
function Se(t) {
|
|
@@ -1445,23 +1445,23 @@ function Io(t, e) {
|
|
|
1445
1445
|
}
|
|
1446
1446
|
}
|
|
1447
1447
|
}
|
|
1448
|
-
const _o = 65537, To = 166277978, wo = 1482635149, So = 1559330978, go = 2802434353, Co = 3085883711, Ao = 3669484338, yo = 3707543140, bo = 3712281496, Ro = 3823842552;
|
|
1449
|
-
function
|
|
1448
|
+
const _o = 65537, To = 166277978, wo = 1482635149, So = 1559330978, go = 2802434353, Co = 3085883711, Ao = 3669484338, yo = 3707543140, bo = 3712281496, Ro = 3823842552, No = 3914217035;
|
|
1449
|
+
function ko(t) {
|
|
1450
1450
|
const e = {};
|
|
1451
1451
|
return kn(e), e;
|
|
1452
1452
|
}
|
|
1453
1453
|
function kn(t) {
|
|
1454
|
-
return t.ClientContext = tt(), t.ServerContext = tt(), t.CertHash = "", t.Entrypoints = [], t.FeatureFlags = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelId = "", t.ChannelInstanceId = "", t.PrimaryUserId = "", t;
|
|
1455
|
-
}
|
|
1456
|
-
function ko(t, e) {
|
|
1457
|
-
const n = V.create(t);
|
|
1458
|
-
return Do(n, e);
|
|
1454
|
+
return t.ClientContext = tt(), t.ServerContext = tt(), t.CertHash = "", t.Entrypoints = [], t.FeatureFlags = /* @__PURE__ */ Object.create(null), t.SpaceId = "", t.ChannelId = "", t.ChannelInstanceId = "", t.PrimaryUserId = "", t.ServerSessionId = "", t;
|
|
1459
1455
|
}
|
|
1460
1456
|
function Do(t, e) {
|
|
1461
|
-
const n =
|
|
1462
|
-
return
|
|
1457
|
+
const n = V.create(t);
|
|
1458
|
+
return vo(n, e);
|
|
1463
1459
|
}
|
|
1464
1460
|
function vo(t, e) {
|
|
1461
|
+
const n = e ?? ko();
|
|
1462
|
+
return kn(n), Uo(t, n), n;
|
|
1463
|
+
}
|
|
1464
|
+
function Uo(t, e) {
|
|
1465
1465
|
let n;
|
|
1466
1466
|
for (; (n = t.next()) !== null; )
|
|
1467
1467
|
switch (n.fieldId) {
|
|
@@ -1472,7 +1472,7 @@ function vo(t, e) {
|
|
|
1472
1472
|
}
|
|
1473
1473
|
case wo: {
|
|
1474
1474
|
if (n.isNull) throw new Error();
|
|
1475
|
-
e.Entrypoints =
|
|
1475
|
+
e.Entrypoints = Mo(n.asArray());
|
|
1476
1476
|
break;
|
|
1477
1477
|
}
|
|
1478
1478
|
case So: {
|
|
@@ -1492,7 +1492,7 @@ function vo(t, e) {
|
|
|
1492
1492
|
}
|
|
1493
1493
|
case Ao: {
|
|
1494
1494
|
if (n.isNull) throw new Error();
|
|
1495
|
-
e.FeatureFlags =
|
|
1495
|
+
e.FeatureFlags = Po(n.asDictionary());
|
|
1496
1496
|
break;
|
|
1497
1497
|
}
|
|
1498
1498
|
case yo: {
|
|
@@ -1510,20 +1510,25 @@ function vo(t, e) {
|
|
|
1510
1510
|
e.ChannelInstanceId = n.asString();
|
|
1511
1511
|
break;
|
|
1512
1512
|
}
|
|
1513
|
+
case No: {
|
|
1514
|
+
if (n.isNull) throw new Error();
|
|
1515
|
+
e.ServerSessionId = n.asString();
|
|
1516
|
+
break;
|
|
1517
|
+
}
|
|
1513
1518
|
}
|
|
1514
1519
|
}
|
|
1515
|
-
async function
|
|
1520
|
+
async function Oo(t, e) {
|
|
1516
1521
|
const n = await ft(t, _o);
|
|
1517
|
-
return
|
|
1522
|
+
return Do(n, e);
|
|
1518
1523
|
}
|
|
1519
|
-
function
|
|
1524
|
+
function Mo(t) {
|
|
1520
1525
|
const e = [];
|
|
1521
1526
|
let n;
|
|
1522
1527
|
for (; (n = t.next()) !== null; )
|
|
1523
1528
|
e.push(Eo(n.asObject()));
|
|
1524
1529
|
return e;
|
|
1525
1530
|
}
|
|
1526
|
-
function
|
|
1531
|
+
function Po(t) {
|
|
1527
1532
|
const e = /* @__PURE__ */ Object.create(null);
|
|
1528
1533
|
let n;
|
|
1529
1534
|
for (; (n = t.next()) !== null; ) {
|
|
@@ -1532,31 +1537,31 @@ function Mo(t) {
|
|
|
1532
1537
|
}
|
|
1533
1538
|
return e;
|
|
1534
1539
|
}
|
|
1535
|
-
function
|
|
1540
|
+
function Lo(t) {
|
|
1536
1541
|
const e = {};
|
|
1537
|
-
return
|
|
1542
|
+
return Fo(e), t && Object.assign(e, t), e;
|
|
1538
1543
|
}
|
|
1539
|
-
function
|
|
1544
|
+
function Fo(t) {
|
|
1540
1545
|
return t.ServerSessionId = "", t.ContextType = de.Unknown, t.UserType = fe.Unknown, t.PayloadType = he.Unknown, t.IsInternal = !1, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.OpcodeGroupsFromServer = g.NONE, t.OpcodeGroupsToServer = g.NONE, t.ProtocolVersion = 0, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.UserAgent = "", t.ClientType = ne.Unknown, t.Parameters = /* @__PURE__ */ Object.create(null), t.SdkType = wt.Unknown, t.ViewportWidth = 0, t.ViewportHeight = 0, t.Theme = "", t.Timezone = "", t.IsTouchDevice = !1, t.InitialPath = "", t;
|
|
1541
1546
|
}
|
|
1542
|
-
const Dn = 1,
|
|
1543
|
-
function
|
|
1547
|
+
const Dn = 1, Bo = 1048632, xo = 3748161056, Wo = 4289118421;
|
|
1548
|
+
function Go(t) {
|
|
1544
1549
|
const e = {};
|
|
1545
|
-
return
|
|
1550
|
+
return Vo(e), t && Object.assign(e, t), e;
|
|
1546
1551
|
}
|
|
1547
|
-
function
|
|
1552
|
+
function Vo(t) {
|
|
1548
1553
|
return t.CallId = w.fromBytes(new Uint8Array(16)), t.InstanceId = w.fromBytes(new Uint8Array(16)), t;
|
|
1549
1554
|
}
|
|
1550
|
-
function
|
|
1555
|
+
function Ho(t) {
|
|
1551
1556
|
const e = new U(Dn);
|
|
1552
|
-
return
|
|
1557
|
+
return $o(t, e), e.finish();
|
|
1553
1558
|
}
|
|
1554
|
-
function
|
|
1555
|
-
e.writeGuidField(
|
|
1559
|
+
function $o(t, e) {
|
|
1560
|
+
e.writeGuidField(xo, t.CallId), e.writeGuidField(Wo, t.InstanceId);
|
|
1556
1561
|
}
|
|
1557
|
-
function
|
|
1558
|
-
const r =
|
|
1559
|
-
return M(
|
|
1562
|
+
function Ko(t, e, n) {
|
|
1563
|
+
const r = Ho(t);
|
|
1564
|
+
return M(Bo, r, Dn, e, n);
|
|
1560
1565
|
}
|
|
1561
1566
|
const vn = 1, Un = 1048601, On = 112005851, Mn = 814454131, Pn = 976255570, Ln = 2610786289, Fn = 2885165957, Bn = 3748161056, xn = 4289118421;
|
|
1562
1567
|
function Wn(t) {
|
|
@@ -1566,15 +1571,15 @@ function Wn(t) {
|
|
|
1566
1571
|
function Gn(t) {
|
|
1567
1572
|
return t.FunctionId = w.fromBytes(new Uint8Array(16)), t.CallId = w.fromBytes(new Uint8Array(16)), t.InstanceId = w.fromBytes(new Uint8Array(16)), t.FunctionName = "", t.Parameters = [], t.Scopes = [], t.Version = "", t;
|
|
1568
1573
|
}
|
|
1569
|
-
function
|
|
1574
|
+
function Yo(t) {
|
|
1570
1575
|
const e = new U(vn);
|
|
1571
|
-
return
|
|
1576
|
+
return jo(t, e), e.finish();
|
|
1572
1577
|
}
|
|
1573
|
-
function
|
|
1578
|
+
function jo(t, e) {
|
|
1574
1579
|
e.writeArrayField(On, O.Object, (n) => {
|
|
1575
1580
|
for (const r of t.Scopes)
|
|
1576
|
-
n.writeObject(
|
|
1577
|
-
|
|
1581
|
+
n.writeObject(ta, (s) => {
|
|
1582
|
+
ra(r, s);
|
|
1578
1583
|
});
|
|
1579
1584
|
}), e.writeStringField(Mn, t.FunctionName), e.writeGuidField(Pn, t.FunctionId), e.writeStringField(Ln, t.Version), e.writeArrayField(Fn, O.Object, (n) => {
|
|
1580
1585
|
for (const r of t.Parameters)
|
|
@@ -1583,21 +1588,21 @@ function Yo(t, e) {
|
|
|
1583
1588
|
});
|
|
1584
1589
|
}), e.writeGuidField(Bn, t.CallId), e.writeGuidField(xn, t.InstanceId);
|
|
1585
1590
|
}
|
|
1586
|
-
function
|
|
1591
|
+
function zo(t, e) {
|
|
1587
1592
|
const n = V.create(t);
|
|
1588
|
-
return
|
|
1593
|
+
return Xo(n, e);
|
|
1589
1594
|
}
|
|
1590
|
-
function
|
|
1595
|
+
function Xo(t, e) {
|
|
1591
1596
|
const n = e ?? Wn();
|
|
1592
|
-
return Gn(n),
|
|
1597
|
+
return Gn(n), Jo(t, n), n;
|
|
1593
1598
|
}
|
|
1594
|
-
function
|
|
1599
|
+
function Jo(t, e) {
|
|
1595
1600
|
let n;
|
|
1596
1601
|
for (; (n = t.next()) !== null; )
|
|
1597
1602
|
switch (n.fieldId) {
|
|
1598
1603
|
case On: {
|
|
1599
1604
|
if (n.isNull) throw new Error();
|
|
1600
|
-
e.Scopes =
|
|
1605
|
+
e.Scopes = qo(n.asArray());
|
|
1601
1606
|
break;
|
|
1602
1607
|
}
|
|
1603
1608
|
case Mn: {
|
|
@@ -1617,7 +1622,7 @@ function Xo(t, e) {
|
|
|
1617
1622
|
}
|
|
1618
1623
|
case Fn: {
|
|
1619
1624
|
if (n.isNull) throw new Error();
|
|
1620
|
-
e.Parameters =
|
|
1625
|
+
e.Parameters = ea(n.asArray());
|
|
1621
1626
|
break;
|
|
1622
1627
|
}
|
|
1623
1628
|
case Bn: {
|
|
@@ -1632,44 +1637,44 @@ function Xo(t, e) {
|
|
|
1632
1637
|
}
|
|
1633
1638
|
}
|
|
1634
1639
|
}
|
|
1635
|
-
function
|
|
1636
|
-
const r =
|
|
1640
|
+
function Qo(t, e, n) {
|
|
1641
|
+
const r = Yo(t);
|
|
1637
1642
|
return M(Un, r, vn, e, n);
|
|
1638
1643
|
}
|
|
1639
|
-
async function
|
|
1644
|
+
async function Zo(t, e) {
|
|
1640
1645
|
const n = await ft(t, Un);
|
|
1641
|
-
return
|
|
1646
|
+
return zo(n, e);
|
|
1642
1647
|
}
|
|
1643
|
-
function
|
|
1648
|
+
function qo(t) {
|
|
1644
1649
|
const e = [];
|
|
1645
1650
|
let n;
|
|
1646
1651
|
for (; (n = t.next()) !== null; )
|
|
1647
|
-
e.push(
|
|
1652
|
+
e.push(sa(n.asObject()));
|
|
1648
1653
|
return e;
|
|
1649
1654
|
}
|
|
1650
|
-
function
|
|
1655
|
+
function ea(t) {
|
|
1651
1656
|
const e = [];
|
|
1652
1657
|
let n;
|
|
1653
1658
|
for (; (n = t.next()) !== null; )
|
|
1654
1659
|
e.push(ti(n.asObject()));
|
|
1655
1660
|
return e;
|
|
1656
1661
|
}
|
|
1657
|
-
const
|
|
1658
|
-
function
|
|
1662
|
+
const ta = 1, Vn = 2994044322, Hn = 3167053791;
|
|
1663
|
+
function na(t) {
|
|
1659
1664
|
const e = {};
|
|
1660
1665
|
return $n(e), e;
|
|
1661
1666
|
}
|
|
1662
1667
|
function $n(t) {
|
|
1663
1668
|
return t.Type = "", t.Id = "", t;
|
|
1664
1669
|
}
|
|
1665
|
-
function na(t, e) {
|
|
1666
|
-
e.writeStringField(Vn, t.Id), e.writeStringField(Hn, t.Type);
|
|
1667
|
-
}
|
|
1668
1670
|
function ra(t, e) {
|
|
1669
|
-
|
|
1670
|
-
return $n(n), sa(t, n), n;
|
|
1671
|
+
e.writeStringField(Vn, t.Id), e.writeStringField(Hn, t.Type);
|
|
1671
1672
|
}
|
|
1672
1673
|
function sa(t, e) {
|
|
1674
|
+
const n = e ?? na();
|
|
1675
|
+
return $n(n), ia(t, n), n;
|
|
1676
|
+
}
|
|
1677
|
+
function ia(t, e) {
|
|
1673
1678
|
let n;
|
|
1674
1679
|
for (; (n = t.next()) !== null; )
|
|
1675
1680
|
switch (n.fieldId) {
|
|
@@ -1685,24 +1690,24 @@ function sa(t, e) {
|
|
|
1685
1690
|
}
|
|
1686
1691
|
}
|
|
1687
1692
|
}
|
|
1688
|
-
const Kn = 1,
|
|
1689
|
-
function
|
|
1693
|
+
const Kn = 1, oa = 1048630, aa = 3748161056, ca = 4289118421;
|
|
1694
|
+
function la(t) {
|
|
1690
1695
|
const e = {};
|
|
1691
|
-
return
|
|
1696
|
+
return ua(e), t && Object.assign(e, t), e;
|
|
1692
1697
|
}
|
|
1693
|
-
function
|
|
1698
|
+
function ua(t) {
|
|
1694
1699
|
return t.CallId = w.fromBytes(new Uint8Array(16)), t.InstanceId = w.fromBytes(new Uint8Array(16)), t;
|
|
1695
1700
|
}
|
|
1696
|
-
function
|
|
1701
|
+
function da(t) {
|
|
1697
1702
|
const e = new U(Kn);
|
|
1698
|
-
return
|
|
1703
|
+
return ha(t, e), e.finish();
|
|
1699
1704
|
}
|
|
1700
|
-
function
|
|
1701
|
-
e.writeGuidField(
|
|
1705
|
+
function ha(t, e) {
|
|
1706
|
+
e.writeGuidField(aa, t.CallId), e.writeGuidField(ca, t.InstanceId);
|
|
1702
1707
|
}
|
|
1703
|
-
function
|
|
1704
|
-
const r =
|
|
1705
|
-
return M(
|
|
1708
|
+
function fa(t, e, n) {
|
|
1709
|
+
const r = da(t);
|
|
1710
|
+
return M(oa, r, Kn, e, n);
|
|
1706
1711
|
}
|
|
1707
1712
|
const Yn = 1, jn = 1048631, zn = 2205234621, Xn = 2838554230, Jn = 3748161056, Qn = 4194102057, Zn = 4289118421;
|
|
1708
1713
|
function qn(t) {
|
|
@@ -1712,22 +1717,22 @@ function qn(t) {
|
|
|
1712
1717
|
function er(t) {
|
|
1713
1718
|
return t.CallId = w.fromBytes(new Uint8Array(16)), t.InstanceId = w.fromBytes(new Uint8Array(16)), t.ErrorMessage = "", t.ErrorTypeName = "", t.StackTrace = "", t;
|
|
1714
1719
|
}
|
|
1715
|
-
function
|
|
1720
|
+
function pa(t) {
|
|
1716
1721
|
const e = new U(Yn);
|
|
1717
|
-
return
|
|
1722
|
+
return ma(t, e), e.finish();
|
|
1718
1723
|
}
|
|
1719
|
-
function
|
|
1724
|
+
function ma(t, e) {
|
|
1720
1725
|
e.writeStringField(zn, t.ErrorTypeName), e.writeStringField(Xn, t.ErrorMessage), e.writeGuidField(Jn, t.CallId), e.writeStringField(Qn, t.StackTrace), e.writeGuidField(Zn, t.InstanceId);
|
|
1721
1726
|
}
|
|
1722
|
-
function
|
|
1727
|
+
function Ea(t, e) {
|
|
1723
1728
|
const n = V.create(t);
|
|
1724
|
-
return
|
|
1729
|
+
return Ia(n, e);
|
|
1725
1730
|
}
|
|
1726
|
-
function
|
|
1731
|
+
function Ia(t, e) {
|
|
1727
1732
|
const n = e ?? qn();
|
|
1728
|
-
return er(n),
|
|
1733
|
+
return er(n), _a(t, n), n;
|
|
1729
1734
|
}
|
|
1730
|
-
function
|
|
1735
|
+
function _a(t, e) {
|
|
1731
1736
|
let n;
|
|
1732
1737
|
for (; (n = t.next()) !== null; )
|
|
1733
1738
|
switch (n.fieldId) {
|
|
@@ -1758,23 +1763,23 @@ function Ia(t, e) {
|
|
|
1758
1763
|
}
|
|
1759
1764
|
}
|
|
1760
1765
|
}
|
|
1761
|
-
function
|
|
1762
|
-
const r =
|
|
1766
|
+
function Ta(t, e, n) {
|
|
1767
|
+
const r = pa(t);
|
|
1763
1768
|
return M(jn, r, Yn, e, n);
|
|
1764
1769
|
}
|
|
1765
|
-
function
|
|
1770
|
+
function wa(t, e) {
|
|
1766
1771
|
const n = le(t, jn);
|
|
1767
|
-
return
|
|
1772
|
+
return Ea(n, e);
|
|
1768
1773
|
}
|
|
1769
|
-
const St = 1,
|
|
1770
|
-
function
|
|
1774
|
+
const St = 1, Sa = 1048600, tr = 703025676, nr = 814454131, rr = 972460562, sr = 976255570, ir = 1368629611, or = 1479280922, ar = 1533537016, cr = 1909301063, lr = 2274386296, ur = 2603556958, dr = 2885165957, hr = 3568439632;
|
|
1775
|
+
function ga(t) {
|
|
1771
1776
|
const e = {};
|
|
1772
1777
|
return fr(e), e;
|
|
1773
1778
|
}
|
|
1774
1779
|
function fr(t) {
|
|
1775
1780
|
return t.FunctionId = w.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.Versions = [], t;
|
|
1776
1781
|
}
|
|
1777
|
-
function
|
|
1782
|
+
function Ca(t) {
|
|
1778
1783
|
const e = new U(St);
|
|
1779
1784
|
return pr(t, e), e.finish();
|
|
1780
1785
|
}
|
|
@@ -1784,16 +1789,16 @@ function pr(t, e) {
|
|
|
1784
1789
|
n.writeString(r);
|
|
1785
1790
|
}), e.writeBoolField(lr, t.LlmInlineResult), e.writeBoolField(ur, t.IsEnumerable), e.writeArrayField(dr, O.Object, (n) => {
|
|
1786
1791
|
for (const r of t.Parameters)
|
|
1787
|
-
n.writeObject(
|
|
1788
|
-
|
|
1792
|
+
n.writeObject(ka, (s) => {
|
|
1793
|
+
va(r, s);
|
|
1789
1794
|
});
|
|
1790
1795
|
}), e.writeBoolField(hr, t.LlmCallOnlyOnce);
|
|
1791
1796
|
}
|
|
1792
|
-
function Ca(t, e) {
|
|
1793
|
-
const n = e ?? Sa();
|
|
1794
|
-
return fr(n), Aa(t, n), n;
|
|
1795
|
-
}
|
|
1796
1797
|
function Aa(t, e) {
|
|
1798
|
+
const n = e ?? ga();
|
|
1799
|
+
return fr(n), ya(t, n), n;
|
|
1800
|
+
}
|
|
1801
|
+
function ya(t, e) {
|
|
1797
1802
|
let n;
|
|
1798
1803
|
for (; (n = t.next()) !== null; )
|
|
1799
1804
|
switch (n.fieldId) {
|
|
@@ -1834,7 +1839,7 @@ function Aa(t, e) {
|
|
|
1834
1839
|
}
|
|
1835
1840
|
case cr: {
|
|
1836
1841
|
if (n.isNull) throw new Error();
|
|
1837
|
-
e.Versions =
|
|
1842
|
+
e.Versions = Ra(n.asArray());
|
|
1838
1843
|
break;
|
|
1839
1844
|
}
|
|
1840
1845
|
case lr: {
|
|
@@ -1849,7 +1854,7 @@ function Aa(t, e) {
|
|
|
1849
1854
|
}
|
|
1850
1855
|
case dr: {
|
|
1851
1856
|
if (n.isNull) throw new Error();
|
|
1852
|
-
e.Parameters =
|
|
1857
|
+
e.Parameters = Na(n.asArray());
|
|
1853
1858
|
break;
|
|
1854
1859
|
}
|
|
1855
1860
|
case hr: {
|
|
@@ -1859,40 +1864,40 @@ function Aa(t, e) {
|
|
|
1859
1864
|
}
|
|
1860
1865
|
}
|
|
1861
1866
|
}
|
|
1862
|
-
function
|
|
1863
|
-
const r =
|
|
1864
|
-
return M(
|
|
1867
|
+
function ba(t, e, n) {
|
|
1868
|
+
const r = Ca(t);
|
|
1869
|
+
return M(Sa, r, St, e, n);
|
|
1865
1870
|
}
|
|
1866
|
-
function
|
|
1871
|
+
function Ra(t) {
|
|
1867
1872
|
const e = [];
|
|
1868
1873
|
let n;
|
|
1869
1874
|
for (; (n = t.next()) !== null; )
|
|
1870
1875
|
e.push(n.asString());
|
|
1871
1876
|
return e;
|
|
1872
1877
|
}
|
|
1873
|
-
function
|
|
1878
|
+
function Na(t) {
|
|
1874
1879
|
const e = [];
|
|
1875
1880
|
let n;
|
|
1876
1881
|
for (; (n = t.next()) !== null; )
|
|
1877
|
-
e.push(
|
|
1882
|
+
e.push(Ua(n.asObject()));
|
|
1878
1883
|
return e;
|
|
1879
1884
|
}
|
|
1880
|
-
const
|
|
1881
|
-
function
|
|
1885
|
+
const ka = 1, mr = 607861992, Er = 894485888, Ir = 972460562, _r = 1368629611, Tr = 1883521406, wr = 2603556958, Sr = 3609695522, gr = 4075263697, Cr = 4257460908;
|
|
1886
|
+
function Da(t) {
|
|
1882
1887
|
const e = {};
|
|
1883
1888
|
return Ar(e), e;
|
|
1884
1889
|
}
|
|
1885
1890
|
function Ar(t) {
|
|
1886
1891
|
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;
|
|
1887
1892
|
}
|
|
1888
|
-
function Da(t, e) {
|
|
1889
|
-
e.writeBoolField(mr, t.HasDefaultValue), e.writeStringField(Er, t.DefaultValueJson), e.writeStringField(Ir, t.EnumerableItemTypeName), e.writeStringField(_r, t.Description), e.writeBinaryField(Tr, t.DefaultValueData), e.writeBoolField(wr, t.IsEnumerable), e.writeStringField(Sr, t.TypeName), e.writeStringField(gr, t.ParameterName), e.writeInt32Field(Cr, t.ParameterIndex | 0);
|
|
1890
|
-
}
|
|
1891
1893
|
function va(t, e) {
|
|
1892
|
-
|
|
1893
|
-
return Ar(n), Ua(t, n), n;
|
|
1894
|
+
e.writeBoolField(mr, t.HasDefaultValue), e.writeStringField(Er, t.DefaultValueJson), e.writeStringField(Ir, t.EnumerableItemTypeName), e.writeStringField(_r, t.Description), e.writeBinaryField(Tr, t.DefaultValueData), e.writeBoolField(wr, t.IsEnumerable), e.writeStringField(Sr, t.TypeName), e.writeStringField(gr, t.ParameterName), e.writeInt32Field(Cr, t.ParameterIndex | 0);
|
|
1894
1895
|
}
|
|
1895
1896
|
function Ua(t, e) {
|
|
1897
|
+
const n = e ?? Da();
|
|
1898
|
+
return Ar(n), Oa(t, n), n;
|
|
1899
|
+
}
|
|
1900
|
+
function Oa(t, e) {
|
|
1896
1901
|
let n;
|
|
1897
1902
|
for (; (n = t.next()) !== null; )
|
|
1898
1903
|
switch (n.fieldId) {
|
|
@@ -1943,29 +1948,29 @@ function Ua(t, e) {
|
|
|
1943
1948
|
}
|
|
1944
1949
|
}
|
|
1945
1950
|
}
|
|
1946
|
-
const yr = 1,
|
|
1947
|
-
function
|
|
1951
|
+
const yr = 1, Ma = 1048638, Pa = 3678477544;
|
|
1952
|
+
function La(t) {
|
|
1948
1953
|
const e = {};
|
|
1949
|
-
return
|
|
1954
|
+
return Fa(e), t && Object.assign(e, t), e;
|
|
1950
1955
|
}
|
|
1951
|
-
function
|
|
1956
|
+
function Fa(t) {
|
|
1952
1957
|
return t.Functions = [], t;
|
|
1953
1958
|
}
|
|
1954
|
-
function
|
|
1959
|
+
function Ba(t) {
|
|
1955
1960
|
const e = new U(yr);
|
|
1956
|
-
return
|
|
1961
|
+
return xa(t, e), e.finish();
|
|
1957
1962
|
}
|
|
1958
|
-
function
|
|
1959
|
-
e.writeArrayField(
|
|
1963
|
+
function xa(t, e) {
|
|
1964
|
+
e.writeArrayField(Pa, O.Object, (n) => {
|
|
1960
1965
|
for (const r of t.Functions)
|
|
1961
1966
|
n.writeObject(St, (s) => {
|
|
1962
1967
|
pr(r, s);
|
|
1963
1968
|
});
|
|
1964
1969
|
});
|
|
1965
1970
|
}
|
|
1966
|
-
function
|
|
1967
|
-
const r =
|
|
1968
|
-
return M(
|
|
1971
|
+
function Wa(t, e, n) {
|
|
1972
|
+
const r = Ba(t);
|
|
1973
|
+
return M(Ma, r, yr, e, n);
|
|
1969
1974
|
}
|
|
1970
1975
|
const br = 1, Rr = 1048602, Nr = 349453957, kr = 703025676, Dr = 3403385840, vr = 3748161056, Ur = 4289118421;
|
|
1971
1976
|
function Or(t) {
|
|
@@ -1975,22 +1980,22 @@ function Or(t) {
|
|
|
1975
1980
|
function Mr(t) {
|
|
1976
1981
|
return t.CallId = w.fromBytes(new Uint8Array(16)), t.InstanceId = w.fromBytes(new Uint8Array(16)), t.ResultTypeName = "", t.ResultJson = "", t.ResultData = new Uint8Array(0), t;
|
|
1977
1982
|
}
|
|
1978
|
-
function
|
|
1983
|
+
function Ga(t) {
|
|
1979
1984
|
const e = new U(br);
|
|
1980
|
-
return
|
|
1985
|
+
return Va(t, e), e.finish();
|
|
1981
1986
|
}
|
|
1982
|
-
function
|
|
1987
|
+
function Va(t, e) {
|
|
1983
1988
|
e.writeBinaryField(Nr, t.ResultData), e.writeStringField(kr, t.ResultTypeName), e.writeStringField(Dr, t.ResultJson), e.writeGuidField(vr, t.CallId), e.writeGuidField(Ur, t.InstanceId);
|
|
1984
1989
|
}
|
|
1985
|
-
function
|
|
1990
|
+
function Ha(t, e) {
|
|
1986
1991
|
const n = V.create(t);
|
|
1987
|
-
return
|
|
1992
|
+
return $a(n, e);
|
|
1988
1993
|
}
|
|
1989
|
-
function
|
|
1994
|
+
function $a(t, e) {
|
|
1990
1995
|
const n = e ?? Or();
|
|
1991
|
-
return Mr(n),
|
|
1996
|
+
return Mr(n), Ka(t, n), n;
|
|
1992
1997
|
}
|
|
1993
|
-
function
|
|
1998
|
+
function Ka(t, e) {
|
|
1994
1999
|
let n;
|
|
1995
2000
|
for (; (n = t.next()) !== null; )
|
|
1996
2001
|
switch (n.fieldId) {
|
|
@@ -2021,26 +2026,26 @@ function $a(t, e) {
|
|
|
2021
2026
|
}
|
|
2022
2027
|
}
|
|
2023
2028
|
}
|
|
2024
|
-
function
|
|
2025
|
-
const r =
|
|
2029
|
+
function Ya(t, e, n) {
|
|
2030
|
+
const r = Ga(t);
|
|
2026
2031
|
return M(Rr, r, br, e, n);
|
|
2027
2032
|
}
|
|
2028
|
-
function
|
|
2033
|
+
function ja(t, e) {
|
|
2029
2034
|
const n = le(t, Rr);
|
|
2030
|
-
return
|
|
2035
|
+
return Ha(n, e);
|
|
2031
2036
|
}
|
|
2032
|
-
const Pr = 1,
|
|
2037
|
+
const Pr = 1, za = 65549;
|
|
2033
2038
|
function Ft(t) {
|
|
2034
2039
|
return {};
|
|
2035
2040
|
}
|
|
2036
|
-
function
|
|
2041
|
+
function Xa(t) {
|
|
2037
2042
|
return new U(Pr).finish();
|
|
2038
2043
|
}
|
|
2039
2044
|
function Bt(t, e, n) {
|
|
2040
|
-
const r =
|
|
2041
|
-
return M(
|
|
2045
|
+
const r = Xa();
|
|
2046
|
+
return M(za, r, Pr, e, n);
|
|
2042
2047
|
}
|
|
2043
|
-
const
|
|
2048
|
+
const Ja = 3167053791, Qa = 3342364356, Za = 3612929027;
|
|
2044
2049
|
function Lr(t) {
|
|
2045
2050
|
const e = {};
|
|
2046
2051
|
return Fr(e), e;
|
|
@@ -2048,39 +2053,39 @@ function Lr(t) {
|
|
|
2048
2053
|
function Fr(t) {
|
|
2049
2054
|
return t.Category = "", t.Type = un.Face, t.FaceBlendshapes = [], t;
|
|
2050
2055
|
}
|
|
2051
|
-
function
|
|
2056
|
+
function qa(t, e) {
|
|
2052
2057
|
const n = e ?? Lr();
|
|
2053
|
-
return Fr(n),
|
|
2058
|
+
return Fr(n), ec(t, n), n;
|
|
2054
2059
|
}
|
|
2055
|
-
function
|
|
2060
|
+
function ec(t, e) {
|
|
2056
2061
|
let n;
|
|
2057
2062
|
for (; (n = t.next()) !== null; )
|
|
2058
2063
|
switch (n.fieldId) {
|
|
2059
|
-
case
|
|
2064
|
+
case Ja: {
|
|
2060
2065
|
if (n.isNull) throw new Error();
|
|
2061
2066
|
e.Type = n.asInt32();
|
|
2062
2067
|
break;
|
|
2063
2068
|
}
|
|
2064
|
-
case
|
|
2069
|
+
case Qa: {
|
|
2065
2070
|
if (n.isNull) throw new Error();
|
|
2066
|
-
e.FaceBlendshapes =
|
|
2071
|
+
e.FaceBlendshapes = tc(n.asArray());
|
|
2067
2072
|
break;
|
|
2068
2073
|
}
|
|
2069
|
-
case
|
|
2074
|
+
case Za: {
|
|
2070
2075
|
if (n.isNull) throw new Error();
|
|
2071
2076
|
e.Category = n.asString();
|
|
2072
2077
|
break;
|
|
2073
2078
|
}
|
|
2074
2079
|
}
|
|
2075
2080
|
}
|
|
2076
|
-
function
|
|
2081
|
+
function tc(t) {
|
|
2077
2082
|
const e = [];
|
|
2078
2083
|
let n;
|
|
2079
2084
|
for (; (n = t.next()) !== null; )
|
|
2080
2085
|
e.push(n.asString());
|
|
2081
2086
|
return e;
|
|
2082
2087
|
}
|
|
2083
|
-
const
|
|
2088
|
+
const nc = 3612929027;
|
|
2084
2089
|
function Br(t) {
|
|
2085
2090
|
const e = {};
|
|
2086
2091
|
return xr(e), e;
|
|
@@ -2088,22 +2093,22 @@ function Br(t) {
|
|
|
2088
2093
|
function xr(t) {
|
|
2089
2094
|
return t.Category = "", t;
|
|
2090
2095
|
}
|
|
2091
|
-
function
|
|
2096
|
+
function rc(t, e) {
|
|
2092
2097
|
const n = e ?? Br();
|
|
2093
|
-
return xr(n),
|
|
2098
|
+
return xr(n), sc(t, n), n;
|
|
2094
2099
|
}
|
|
2095
|
-
function
|
|
2100
|
+
function sc(t, e) {
|
|
2096
2101
|
let n;
|
|
2097
2102
|
for (; (n = t.next()) !== null; )
|
|
2098
2103
|
switch (n.fieldId) {
|
|
2099
|
-
case
|
|
2104
|
+
case nc: {
|
|
2100
2105
|
if (n.isNull) throw new Error();
|
|
2101
2106
|
e.Category = n.asString();
|
|
2102
2107
|
break;
|
|
2103
2108
|
}
|
|
2104
2109
|
}
|
|
2105
2110
|
}
|
|
2106
|
-
const
|
|
2111
|
+
const ic = 161083277, oc = 164808083, ac = 1368629611, cc = 2745379226, lc = 2950031986, uc = 3282782683, dc = 3284746250, hc = 4065070594;
|
|
2107
2112
|
function Wr(t) {
|
|
2108
2113
|
const e = {};
|
|
2109
2114
|
return Gr(e), e;
|
|
@@ -2111,183 +2116,183 @@ function Wr(t) {
|
|
|
2111
2116
|
function Gr(t) {
|
|
2112
2117
|
return t.StreamId = "", t.Description = "", t.SourceType = "", t.Codec = dn.H264, t.CodecDetails = "", t.Width = 0, t.Height = 0, t.Framerate = 30, t;
|
|
2113
2118
|
}
|
|
2114
|
-
function
|
|
2119
|
+
function fc(t, e) {
|
|
2115
2120
|
const n = e ?? Wr();
|
|
2116
|
-
return Gr(n),
|
|
2121
|
+
return Gr(n), pc(t, n), n;
|
|
2117
2122
|
}
|
|
2118
|
-
function
|
|
2123
|
+
function pc(t, e) {
|
|
2119
2124
|
let n;
|
|
2120
2125
|
for (; (n = t.next()) !== null; )
|
|
2121
2126
|
switch (n.fieldId) {
|
|
2122
|
-
case
|
|
2127
|
+
case ic: {
|
|
2123
2128
|
if (n.isNull) throw new Error();
|
|
2124
2129
|
e.StreamId = n.asString();
|
|
2125
2130
|
break;
|
|
2126
2131
|
}
|
|
2127
|
-
case
|
|
2132
|
+
case oc: {
|
|
2128
2133
|
if (n.isNull) throw new Error();
|
|
2129
2134
|
e.Framerate = n.asFloat64();
|
|
2130
2135
|
break;
|
|
2131
2136
|
}
|
|
2132
|
-
case
|
|
2137
|
+
case ac: {
|
|
2133
2138
|
if (n.isNull) throw new Error();
|
|
2134
2139
|
e.Description = n.asString();
|
|
2135
2140
|
break;
|
|
2136
2141
|
}
|
|
2137
|
-
case
|
|
2142
|
+
case cc: {
|
|
2138
2143
|
if (n.isNull) throw new Error();
|
|
2139
2144
|
e.CodecDetails = n.asString();
|
|
2140
2145
|
break;
|
|
2141
2146
|
}
|
|
2142
|
-
case
|
|
2147
|
+
case lc: {
|
|
2143
2148
|
if (n.isNull) throw new Error();
|
|
2144
2149
|
e.Height = n.asInt32();
|
|
2145
2150
|
break;
|
|
2146
2151
|
}
|
|
2147
|
-
case
|
|
2152
|
+
case uc: {
|
|
2148
2153
|
if (n.isNull) throw new Error();
|
|
2149
2154
|
e.SourceType = n.asString();
|
|
2150
2155
|
break;
|
|
2151
2156
|
}
|
|
2152
|
-
case
|
|
2157
|
+
case dc: {
|
|
2153
2158
|
if (n.isNull) throw new Error();
|
|
2154
2159
|
e.Codec = n.asInt32();
|
|
2155
2160
|
break;
|
|
2156
2161
|
}
|
|
2157
|
-
case
|
|
2162
|
+
case hc: {
|
|
2158
2163
|
if (n.isNull) throw new Error();
|
|
2159
2164
|
e.Width = n.asInt32();
|
|
2160
2165
|
break;
|
|
2161
2166
|
}
|
|
2162
2167
|
}
|
|
2163
2168
|
}
|
|
2164
|
-
const
|
|
2165
|
-
function
|
|
2169
|
+
const mc = 65539, Ec = 693643444, Ic = 1144553441, _c = 1497620243, Tc = 1559330978, wc = 1976546434, Sc = 1999510636, gc = 2271236852, Cc = 2277643855, Ac = 2469008121, yc = 3042922213, bc = 3064612128, Rc = 3219210453, Nc = 3504054055, kc = 3678477544, Dc = 3696445035, vc = 3707543140, Uc = 3712281496, Oc = 3895362455, Mc = 3897397815, Pc = 4225107827;
|
|
2170
|
+
function Lc(t) {
|
|
2166
2171
|
const e = {};
|
|
2167
2172
|
return Vr(e), e;
|
|
2168
2173
|
}
|
|
2169
2174
|
function Vr(t) {
|
|
2170
2175
|
return t.Clients = /* @__PURE__ */ Object.create(null), t.Functions = /* @__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.ChannelId = "", t.SessionId = "", t.ChannelUrl = "", t.SessionChannelUrl = "", t.FirstUserId = "", t.PrimaryUserId = "", t.OrganisationName = "", t.SpaceName = "", t.ChannelName = "", t.ServerRunType = hn.Local, t.AppSourceType = fn.Bundle, t.PublicAccess = !1, t.DebugMode = !1, t;
|
|
2171
2176
|
}
|
|
2172
|
-
function Lc(t, e) {
|
|
2173
|
-
const n = V.create(t);
|
|
2174
|
-
return Fc(n, e);
|
|
2175
|
-
}
|
|
2176
2177
|
function Fc(t, e) {
|
|
2177
|
-
const n =
|
|
2178
|
-
return
|
|
2178
|
+
const n = V.create(t);
|
|
2179
|
+
return Bc(n, e);
|
|
2179
2180
|
}
|
|
2180
2181
|
function Bc(t, e) {
|
|
2182
|
+
const n = e ?? Lc();
|
|
2183
|
+
return Vr(n), xc(t, n), n;
|
|
2184
|
+
}
|
|
2185
|
+
function xc(t, e) {
|
|
2181
2186
|
let n;
|
|
2182
2187
|
for (; (n = t.next()) !== null; )
|
|
2183
2188
|
switch (n.fieldId) {
|
|
2184
|
-
case mc: {
|
|
2185
|
-
if (n.isNull) throw new Error();
|
|
2186
|
-
e.FirstUserId = n.asString();
|
|
2187
|
-
break;
|
|
2188
|
-
}
|
|
2189
2189
|
case Ec: {
|
|
2190
2190
|
if (n.isNull) throw new Error();
|
|
2191
|
-
e.
|
|
2191
|
+
e.FirstUserId = n.asString();
|
|
2192
2192
|
break;
|
|
2193
2193
|
}
|
|
2194
2194
|
case Ic: {
|
|
2195
2195
|
if (n.isNull) throw new Error();
|
|
2196
|
-
e.
|
|
2196
|
+
e.Clients = Gc(n.asDictionary());
|
|
2197
2197
|
break;
|
|
2198
2198
|
}
|
|
2199
2199
|
case _c: {
|
|
2200
2200
|
if (n.isNull) throw new Error();
|
|
2201
|
-
e.
|
|
2201
|
+
e.TrackingStreams = Vc(n.asDictionary());
|
|
2202
2202
|
break;
|
|
2203
2203
|
}
|
|
2204
2204
|
case Tc: {
|
|
2205
2205
|
if (n.isNull) throw new Error();
|
|
2206
|
-
e.
|
|
2206
|
+
e.ChannelId = n.asString();
|
|
2207
2207
|
break;
|
|
2208
2208
|
}
|
|
2209
2209
|
case wc: {
|
|
2210
2210
|
if (n.isNull) throw new Error();
|
|
2211
|
-
e.
|
|
2211
|
+
e.AppSourceType = n.asInt32();
|
|
2212
2212
|
break;
|
|
2213
2213
|
}
|
|
2214
2214
|
case Sc: {
|
|
2215
2215
|
if (n.isNull) throw new Error();
|
|
2216
|
-
e.
|
|
2216
|
+
e.SessionId = n.asString();
|
|
2217
2217
|
break;
|
|
2218
2218
|
}
|
|
2219
2219
|
case gc: {
|
|
2220
2220
|
if (n.isNull) throw new Error();
|
|
2221
|
-
e.
|
|
2221
|
+
e.SessionChannelUrl = n.asString();
|
|
2222
2222
|
break;
|
|
2223
2223
|
}
|
|
2224
2224
|
case Cc: {
|
|
2225
2225
|
if (n.isNull) throw new Error();
|
|
2226
|
-
e.
|
|
2226
|
+
e.ChannelUrl = n.asString();
|
|
2227
2227
|
break;
|
|
2228
2228
|
}
|
|
2229
2229
|
case Ac: {
|
|
2230
2230
|
if (n.isNull) throw new Error();
|
|
2231
|
-
e.
|
|
2231
|
+
e.ChannelName = n.asString();
|
|
2232
2232
|
break;
|
|
2233
2233
|
}
|
|
2234
2234
|
case yc: {
|
|
2235
2235
|
if (n.isNull) throw new Error();
|
|
2236
|
-
e.
|
|
2236
|
+
e.PublicAccess = n.asBool();
|
|
2237
2237
|
break;
|
|
2238
2238
|
}
|
|
2239
2239
|
case bc: {
|
|
2240
2240
|
if (n.isNull) throw new Error();
|
|
2241
|
-
e.
|
|
2241
|
+
e.ServerRunType = n.asInt32();
|
|
2242
2242
|
break;
|
|
2243
2243
|
}
|
|
2244
2244
|
case Rc: {
|
|
2245
2245
|
if (n.isNull) throw new Error();
|
|
2246
|
-
e.
|
|
2246
|
+
e.OrganisationName = n.asString();
|
|
2247
2247
|
break;
|
|
2248
2248
|
}
|
|
2249
2249
|
case Nc: {
|
|
2250
2250
|
if (n.isNull) throw new Error();
|
|
2251
|
-
e.
|
|
2251
|
+
e.DebugMode = n.asBool();
|
|
2252
2252
|
break;
|
|
2253
2253
|
}
|
|
2254
2254
|
case kc: {
|
|
2255
2255
|
if (n.isNull) throw new Error();
|
|
2256
|
-
e.
|
|
2256
|
+
e.Functions = Hc(n.asDictionary());
|
|
2257
2257
|
break;
|
|
2258
2258
|
}
|
|
2259
2259
|
case Dc: {
|
|
2260
2260
|
if (n.isNull) throw new Error();
|
|
2261
|
-
e.
|
|
2261
|
+
e.UIStreams = $c(n.asDictionary());
|
|
2262
2262
|
break;
|
|
2263
2263
|
}
|
|
2264
2264
|
case vc: {
|
|
2265
2265
|
if (n.isNull) throw new Error();
|
|
2266
|
-
e.
|
|
2266
|
+
e.SpaceId = n.asString();
|
|
2267
2267
|
break;
|
|
2268
2268
|
}
|
|
2269
2269
|
case Uc: {
|
|
2270
2270
|
if (n.isNull) throw new Error();
|
|
2271
|
-
e.
|
|
2271
|
+
e.PrimaryUserId = n.asString();
|
|
2272
2272
|
break;
|
|
2273
2273
|
}
|
|
2274
2274
|
case Oc: {
|
|
2275
2275
|
if (n.isNull) throw new Error();
|
|
2276
|
-
e.
|
|
2276
|
+
e.AudioStreams = Kc(n.asDictionary());
|
|
2277
2277
|
break;
|
|
2278
2278
|
}
|
|
2279
2279
|
case Mc: {
|
|
2280
|
+
if (n.isNull) throw new Error();
|
|
2281
|
+
e.VideoStreams = Yc(n.asDictionary());
|
|
2282
|
+
break;
|
|
2283
|
+
}
|
|
2284
|
+
case Pc: {
|
|
2280
2285
|
if (n.isNull) throw new Error();
|
|
2281
2286
|
e.SpaceName = n.asString();
|
|
2282
2287
|
break;
|
|
2283
2288
|
}
|
|
2284
2289
|
}
|
|
2285
2290
|
}
|
|
2286
|
-
async function
|
|
2287
|
-
const n = await ft(t,
|
|
2288
|
-
return
|
|
2291
|
+
async function Wc(t, e) {
|
|
2292
|
+
const n = await ft(t, mc);
|
|
2293
|
+
return Fc(n, e);
|
|
2289
2294
|
}
|
|
2290
|
-
function
|
|
2295
|
+
function Gc(t) {
|
|
2291
2296
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2292
2297
|
let n;
|
|
2293
2298
|
for (; (n = t.next()) !== null; ) {
|
|
@@ -2296,300 +2301,300 @@ function Wc(t) {
|
|
|
2296
2301
|
}
|
|
2297
2302
|
return e;
|
|
2298
2303
|
}
|
|
2299
|
-
function
|
|
2304
|
+
function Vc(t) {
|
|
2300
2305
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2301
2306
|
let n;
|
|
2302
2307
|
for (; (n = t.next()) !== null; ) {
|
|
2303
2308
|
const r = n.key.asString();
|
|
2304
|
-
e[r] =
|
|
2309
|
+
e[r] = wl(n.value.asObject());
|
|
2305
2310
|
}
|
|
2306
2311
|
return e;
|
|
2307
2312
|
}
|
|
2308
|
-
function
|
|
2313
|
+
function Hc(t) {
|
|
2309
2314
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2310
2315
|
let n;
|
|
2311
2316
|
for (; (n = t.next()) !== null; ) {
|
|
2312
2317
|
const r = n.key.asInt32();
|
|
2313
|
-
e[r] =
|
|
2318
|
+
e[r] = jc(n.value.asArray());
|
|
2314
2319
|
}
|
|
2315
2320
|
return e;
|
|
2316
2321
|
}
|
|
2317
|
-
function
|
|
2322
|
+
function $c(t) {
|
|
2318
2323
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2319
2324
|
let n;
|
|
2320
2325
|
for (; (n = t.next()) !== null; ) {
|
|
2321
2326
|
const r = n.key.asString();
|
|
2322
|
-
e[r] =
|
|
2327
|
+
e[r] = qc(n.value.asObject());
|
|
2323
2328
|
}
|
|
2324
2329
|
return e;
|
|
2325
2330
|
}
|
|
2326
|
-
function
|
|
2331
|
+
function Kc(t) {
|
|
2327
2332
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2328
2333
|
let n;
|
|
2329
2334
|
for (; (n = t.next()) !== null; ) {
|
|
2330
2335
|
const r = n.key.asString();
|
|
2331
|
-
e[r] =
|
|
2336
|
+
e[r] = ol(n.value.asObject());
|
|
2332
2337
|
}
|
|
2333
2338
|
return e;
|
|
2334
2339
|
}
|
|
2335
|
-
function
|
|
2340
|
+
function Yc(t) {
|
|
2336
2341
|
const e = /* @__PURE__ */ Object.create(null);
|
|
2337
2342
|
let n;
|
|
2338
2343
|
for (; (n = t.next()) !== null; ) {
|
|
2339
2344
|
const r = n.key.asString();
|
|
2340
|
-
e[r] =
|
|
2345
|
+
e[r] = fl(n.value.asObject());
|
|
2341
2346
|
}
|
|
2342
2347
|
return e;
|
|
2343
2348
|
}
|
|
2344
|
-
function
|
|
2349
|
+
function jc(t) {
|
|
2345
2350
|
const e = [];
|
|
2346
2351
|
let n;
|
|
2347
2352
|
for (; (n = t.next()) !== null; )
|
|
2348
|
-
e.push(
|
|
2353
|
+
e.push(Aa(n.asObject()));
|
|
2349
2354
|
return e;
|
|
2350
2355
|
}
|
|
2351
|
-
const
|
|
2352
|
-
function
|
|
2356
|
+
const zc = 161083277, Xc = 325678206, Jc = 3469892363, Qc = 3645544153;
|
|
2357
|
+
function Zc(t) {
|
|
2353
2358
|
const e = {};
|
|
2354
2359
|
return Hr(e), e;
|
|
2355
2360
|
}
|
|
2356
2361
|
function Hr(t) {
|
|
2357
2362
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Br(), t;
|
|
2358
2363
|
}
|
|
2359
|
-
function Zc(t, e) {
|
|
2360
|
-
const n = e ?? Qc();
|
|
2361
|
-
return Hr(n), qc(t, n), n;
|
|
2362
|
-
}
|
|
2363
2364
|
function qc(t, e) {
|
|
2365
|
+
const n = e ?? Zc();
|
|
2366
|
+
return Hr(n), el(t, n), n;
|
|
2367
|
+
}
|
|
2368
|
+
function el(t, e) {
|
|
2364
2369
|
let n;
|
|
2365
2370
|
for (; (n = t.next()) !== null; )
|
|
2366
2371
|
switch (n.fieldId) {
|
|
2367
|
-
case
|
|
2372
|
+
case zc: {
|
|
2368
2373
|
if (n.isNull) throw new Error();
|
|
2369
2374
|
e.StreamId = n.asString();
|
|
2370
2375
|
break;
|
|
2371
2376
|
}
|
|
2372
|
-
case
|
|
2377
|
+
case Xc: {
|
|
2373
2378
|
if (n.isNull) throw new Error();
|
|
2374
2379
|
e.ClientSessionId = n.asInt32();
|
|
2375
2380
|
break;
|
|
2376
2381
|
}
|
|
2377
|
-
case
|
|
2382
|
+
case Jc: {
|
|
2378
2383
|
if (n.isNull) throw new Error();
|
|
2379
2384
|
e.TrackId = n.asInt32();
|
|
2380
2385
|
break;
|
|
2381
2386
|
}
|
|
2382
|
-
case
|
|
2387
|
+
case Qc: {
|
|
2383
2388
|
if (n.isNull) throw new Error();
|
|
2384
|
-
e.Info =
|
|
2389
|
+
e.Info = rc(n.asObject());
|
|
2385
2390
|
break;
|
|
2386
2391
|
}
|
|
2387
2392
|
}
|
|
2388
2393
|
}
|
|
2389
|
-
const
|
|
2390
|
-
function
|
|
2394
|
+
const tl = 161083277, nl = 325678206, rl = 3469892363, sl = 3645544153;
|
|
2395
|
+
function il(t) {
|
|
2391
2396
|
const e = {};
|
|
2392
2397
|
return $r(e), e;
|
|
2393
2398
|
}
|
|
2394
2399
|
function $r(t) {
|
|
2395
2400
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = An(), t;
|
|
2396
2401
|
}
|
|
2397
|
-
function il(t, e) {
|
|
2398
|
-
const n = e ?? sl();
|
|
2399
|
-
return $r(n), ol(t, n), n;
|
|
2400
|
-
}
|
|
2401
2402
|
function ol(t, e) {
|
|
2403
|
+
const n = e ?? il();
|
|
2404
|
+
return $r(n), al(t, n), n;
|
|
2405
|
+
}
|
|
2406
|
+
function al(t, e) {
|
|
2402
2407
|
let n;
|
|
2403
2408
|
for (; (n = t.next()) !== null; )
|
|
2404
2409
|
switch (n.fieldId) {
|
|
2405
|
-
case
|
|
2410
|
+
case tl: {
|
|
2406
2411
|
if (n.isNull) throw new Error();
|
|
2407
2412
|
e.StreamId = n.asString();
|
|
2408
2413
|
break;
|
|
2409
2414
|
}
|
|
2410
|
-
case
|
|
2415
|
+
case nl: {
|
|
2411
2416
|
if (n.isNull) throw new Error();
|
|
2412
2417
|
e.ClientSessionId = n.asInt32();
|
|
2413
2418
|
break;
|
|
2414
2419
|
}
|
|
2415
|
-
case
|
|
2420
|
+
case rl: {
|
|
2416
2421
|
if (n.isNull) throw new Error();
|
|
2417
2422
|
e.TrackId = n.asInt32();
|
|
2418
2423
|
break;
|
|
2419
2424
|
}
|
|
2420
|
-
case
|
|
2425
|
+
case sl: {
|
|
2421
2426
|
if (n.isNull) throw new Error();
|
|
2422
2427
|
e.Info = _i(n.asObject());
|
|
2423
2428
|
break;
|
|
2424
2429
|
}
|
|
2425
2430
|
}
|
|
2426
2431
|
}
|
|
2427
|
-
const
|
|
2428
|
-
function
|
|
2432
|
+
const cl = 161083277, ll = 325678206, ul = 3469892363, dl = 3645544153;
|
|
2433
|
+
function hl(t) {
|
|
2429
2434
|
const e = {};
|
|
2430
2435
|
return Kr(e), e;
|
|
2431
2436
|
}
|
|
2432
2437
|
function Kr(t) {
|
|
2433
2438
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Wr(), t;
|
|
2434
2439
|
}
|
|
2435
|
-
function hl(t, e) {
|
|
2436
|
-
const n = e ?? dl();
|
|
2437
|
-
return Kr(n), fl(t, n), n;
|
|
2438
|
-
}
|
|
2439
2440
|
function fl(t, e) {
|
|
2441
|
+
const n = e ?? hl();
|
|
2442
|
+
return Kr(n), pl(t, n), n;
|
|
2443
|
+
}
|
|
2444
|
+
function pl(t, e) {
|
|
2440
2445
|
let n;
|
|
2441
2446
|
for (; (n = t.next()) !== null; )
|
|
2442
2447
|
switch (n.fieldId) {
|
|
2443
|
-
case
|
|
2448
|
+
case cl: {
|
|
2444
2449
|
if (n.isNull) throw new Error();
|
|
2445
2450
|
e.StreamId = n.asString();
|
|
2446
2451
|
break;
|
|
2447
2452
|
}
|
|
2448
|
-
case
|
|
2453
|
+
case ll: {
|
|
2449
2454
|
if (n.isNull) throw new Error();
|
|
2450
2455
|
e.ClientSessionId = n.asInt32();
|
|
2451
2456
|
break;
|
|
2452
2457
|
}
|
|
2453
|
-
case
|
|
2458
|
+
case ul: {
|
|
2454
2459
|
if (n.isNull) throw new Error();
|
|
2455
2460
|
e.TrackId = n.asInt32();
|
|
2456
2461
|
break;
|
|
2457
2462
|
}
|
|
2458
|
-
case
|
|
2463
|
+
case dl: {
|
|
2459
2464
|
if (n.isNull) throw new Error();
|
|
2460
|
-
e.Info =
|
|
2465
|
+
e.Info = fc(n.asObject());
|
|
2461
2466
|
break;
|
|
2462
2467
|
}
|
|
2463
2468
|
}
|
|
2464
2469
|
}
|
|
2465
|
-
const
|
|
2466
|
-
function
|
|
2470
|
+
const ml = 161083277, El = 325678206, Il = 3469892363, _l = 3645544153;
|
|
2471
|
+
function Tl(t) {
|
|
2467
2472
|
const e = {};
|
|
2468
2473
|
return Yr(e), e;
|
|
2469
2474
|
}
|
|
2470
2475
|
function Yr(t) {
|
|
2471
2476
|
return t.StreamId = "", t.ClientSessionId = 0, t.TrackId = 0, t.Info = Lr(), t;
|
|
2472
2477
|
}
|
|
2473
|
-
function Tl(t, e) {
|
|
2474
|
-
const n = e ?? _l();
|
|
2475
|
-
return Yr(n), wl(t, n), n;
|
|
2476
|
-
}
|
|
2477
2478
|
function wl(t, e) {
|
|
2479
|
+
const n = e ?? Tl();
|
|
2480
|
+
return Yr(n), Sl(t, n), n;
|
|
2481
|
+
}
|
|
2482
|
+
function Sl(t, e) {
|
|
2478
2483
|
let n;
|
|
2479
2484
|
for (; (n = t.next()) !== null; )
|
|
2480
2485
|
switch (n.fieldId) {
|
|
2481
|
-
case
|
|
2486
|
+
case ml: {
|
|
2482
2487
|
if (n.isNull) throw new Error();
|
|
2483
2488
|
e.StreamId = n.asString();
|
|
2484
2489
|
break;
|
|
2485
2490
|
}
|
|
2486
|
-
case
|
|
2491
|
+
case El: {
|
|
2487
2492
|
if (n.isNull) throw new Error();
|
|
2488
2493
|
e.ClientSessionId = n.asInt32();
|
|
2489
2494
|
break;
|
|
2490
2495
|
}
|
|
2491
|
-
case
|
|
2496
|
+
case Il: {
|
|
2492
2497
|
if (n.isNull) throw new Error();
|
|
2493
2498
|
e.TrackId = n.asInt32();
|
|
2494
2499
|
break;
|
|
2495
2500
|
}
|
|
2496
|
-
case
|
|
2501
|
+
case _l: {
|
|
2497
2502
|
if (n.isNull) throw new Error();
|
|
2498
|
-
e.Info =
|
|
2503
|
+
e.Info = qa(n.asObject());
|
|
2499
2504
|
break;
|
|
2500
2505
|
}
|
|
2501
2506
|
}
|
|
2502
2507
|
}
|
|
2503
|
-
const jr = 1,
|
|
2508
|
+
const jr = 1, gl = 131074;
|
|
2504
2509
|
function zr(t) {
|
|
2505
2510
|
return {};
|
|
2506
2511
|
}
|
|
2507
|
-
function
|
|
2512
|
+
function Cl(t) {
|
|
2508
2513
|
return new U(jr).finish();
|
|
2509
2514
|
}
|
|
2510
2515
|
function Xr(t, e, n) {
|
|
2511
|
-
const r =
|
|
2512
|
-
return M(
|
|
2516
|
+
const r = Cl();
|
|
2517
|
+
return M(gl, r, jr, e, n);
|
|
2513
2518
|
}
|
|
2514
|
-
const Jr = 1,
|
|
2515
|
-
function
|
|
2519
|
+
const Jr = 1, Al = 65558, yl = 250031587, bl = 1286979607, Rl = 2033288346, Nl = 3542818975;
|
|
2520
|
+
function kl(t) {
|
|
2516
2521
|
const e = {};
|
|
2517
|
-
return
|
|
2522
|
+
return Dl(e), t && Object.assign(e, t), e;
|
|
2518
2523
|
}
|
|
2519
|
-
function
|
|
2524
|
+
function Dl(t) {
|
|
2520
2525
|
return t.ViewportWidth = 0, t.ViewportHeight = 0, t.Theme = "", t.Timezone = "", t;
|
|
2521
2526
|
}
|
|
2522
|
-
function
|
|
2527
|
+
function vl(t) {
|
|
2523
2528
|
const e = new U(Jr);
|
|
2524
|
-
return
|
|
2529
|
+
return Ul(t, e), e.finish();
|
|
2525
2530
|
}
|
|
2526
|
-
function
|
|
2527
|
-
e.writeStringField(
|
|
2531
|
+
function Ul(t, e) {
|
|
2532
|
+
e.writeStringField(yl, t.Theme), e.writeInt32Field(bl, t.ViewportHeight | 0), e.writeInt32Field(Rl, t.ViewportWidth | 0), e.writeStringField(Nl, t.Timezone);
|
|
2528
2533
|
}
|
|
2529
|
-
function
|
|
2530
|
-
const r =
|
|
2531
|
-
return M(
|
|
2534
|
+
function Ol(t, e, n) {
|
|
2535
|
+
const r = vl(t);
|
|
2536
|
+
return M(Al, r, Jr, e, n);
|
|
2532
2537
|
}
|
|
2533
|
-
const Qr = 1,
|
|
2534
|
-
function
|
|
2538
|
+
const Qr = 1, Ml = 8388612;
|
|
2539
|
+
function Pl(t) {
|
|
2535
2540
|
return {};
|
|
2536
2541
|
}
|
|
2537
|
-
function
|
|
2542
|
+
function Ll(t) {
|
|
2538
2543
|
return new U(Qr).finish();
|
|
2539
2544
|
}
|
|
2540
|
-
function
|
|
2541
|
-
const r =
|
|
2542
|
-
return M(
|
|
2545
|
+
function Fl(t, e, n) {
|
|
2546
|
+
const r = Ll();
|
|
2547
|
+
return M(Ml, r, Qr, e, n);
|
|
2543
2548
|
}
|
|
2544
|
-
const Zr = 65567,
|
|
2545
|
-
function
|
|
2549
|
+
const Zr = 65567, Bl = 1455877031;
|
|
2550
|
+
function xl(t) {
|
|
2546
2551
|
const e = {};
|
|
2547
2552
|
return qr(e), e;
|
|
2548
2553
|
}
|
|
2549
2554
|
function qr(t) {
|
|
2550
2555
|
return t.Sdp = "", t;
|
|
2551
2556
|
}
|
|
2552
|
-
function xl(t, e) {
|
|
2553
|
-
const n = V.create(t);
|
|
2554
|
-
return Wl(n, e);
|
|
2555
|
-
}
|
|
2556
2557
|
function Wl(t, e) {
|
|
2557
|
-
const n =
|
|
2558
|
-
return
|
|
2558
|
+
const n = V.create(t);
|
|
2559
|
+
return Gl(n, e);
|
|
2559
2560
|
}
|
|
2560
2561
|
function Gl(t, e) {
|
|
2562
|
+
const n = e ?? xl();
|
|
2563
|
+
return qr(n), Vl(t, n), n;
|
|
2564
|
+
}
|
|
2565
|
+
function Vl(t, e) {
|
|
2561
2566
|
let n;
|
|
2562
2567
|
for (; (n = t.next()) !== null; )
|
|
2563
2568
|
switch (n.fieldId) {
|
|
2564
|
-
case
|
|
2569
|
+
case Bl: {
|
|
2565
2570
|
if (n.isNull) throw new Error();
|
|
2566
2571
|
e.Sdp = n.asString();
|
|
2567
2572
|
break;
|
|
2568
2573
|
}
|
|
2569
2574
|
}
|
|
2570
2575
|
}
|
|
2571
|
-
function
|
|
2576
|
+
function Hl(t, e) {
|
|
2572
2577
|
const n = le(t, Zr);
|
|
2573
|
-
return
|
|
2578
|
+
return Wl(n, e);
|
|
2574
2579
|
}
|
|
2575
|
-
const es = 1,
|
|
2580
|
+
const es = 1, $l = 65570, Kl = 2677673673;
|
|
2576
2581
|
function xt(t) {
|
|
2577
2582
|
const e = {};
|
|
2578
|
-
return
|
|
2583
|
+
return Yl(e), t && Object.assign(e, t), e;
|
|
2579
2584
|
}
|
|
2580
|
-
function
|
|
2585
|
+
function Yl(t) {
|
|
2581
2586
|
return t.IsStart = !1, t;
|
|
2582
2587
|
}
|
|
2583
|
-
function
|
|
2588
|
+
function jl(t) {
|
|
2584
2589
|
const e = new U(es);
|
|
2585
|
-
return
|
|
2590
|
+
return zl(t, e), e.finish();
|
|
2586
2591
|
}
|
|
2587
|
-
function
|
|
2588
|
-
e.writeBoolField(
|
|
2592
|
+
function zl(t, e) {
|
|
2593
|
+
e.writeBoolField(Kl, t.IsStart);
|
|
2589
2594
|
}
|
|
2590
2595
|
function Wt(t, e, n) {
|
|
2591
|
-
const r =
|
|
2592
|
-
return M(
|
|
2596
|
+
const r = jl(t);
|
|
2597
|
+
return M($l, r, es, e, n);
|
|
2593
2598
|
}
|
|
2594
2599
|
const ts = 1, gt = 65568, ns = 646075140, rs = 2324511977, ss = 4002097439;
|
|
2595
2600
|
function is(t) {
|
|
@@ -2599,22 +2604,22 @@ function is(t) {
|
|
|
2599
2604
|
function os(t) {
|
|
2600
2605
|
return t.Candidate = "", t.SdpMid = "", t.SdpMLineIndex = 0, t;
|
|
2601
2606
|
}
|
|
2602
|
-
function
|
|
2607
|
+
function Xl(t) {
|
|
2603
2608
|
const e = new U(ts);
|
|
2604
|
-
return
|
|
2609
|
+
return Jl(t, e), e.finish();
|
|
2605
2610
|
}
|
|
2606
|
-
function
|
|
2611
|
+
function Jl(t, e) {
|
|
2607
2612
|
e.writeStringField(ns, t.Candidate), e.writeStringField(rs, t.SdpMid), e.writeInt32Field(ss, t.SdpMLineIndex | 0);
|
|
2608
2613
|
}
|
|
2609
|
-
function
|
|
2614
|
+
function Ql(t, e) {
|
|
2610
2615
|
const n = V.create(t);
|
|
2611
|
-
return
|
|
2616
|
+
return Zl(n, e);
|
|
2612
2617
|
}
|
|
2613
|
-
function
|
|
2618
|
+
function Zl(t, e) {
|
|
2614
2619
|
const n = e ?? is();
|
|
2615
|
-
return os(n),
|
|
2620
|
+
return os(n), ql(t, n), n;
|
|
2616
2621
|
}
|
|
2617
|
-
function
|
|
2622
|
+
function ql(t, e) {
|
|
2618
2623
|
let n;
|
|
2619
2624
|
for (; (n = t.next()) !== null; )
|
|
2620
2625
|
switch (n.fieldId) {
|
|
@@ -2635,129 +2640,129 @@ function Zl(t, e) {
|
|
|
2635
2640
|
}
|
|
2636
2641
|
}
|
|
2637
2642
|
}
|
|
2638
|
-
function
|
|
2639
|
-
const r =
|
|
2643
|
+
function eu(t, e, n) {
|
|
2644
|
+
const r = Xl(t);
|
|
2640
2645
|
return M(gt, r, ts, e, n);
|
|
2641
2646
|
}
|
|
2642
|
-
function
|
|
2647
|
+
function tu(t, e) {
|
|
2643
2648
|
const n = le(t, gt);
|
|
2644
|
-
return
|
|
2649
|
+
return Ql(n, e);
|
|
2645
2650
|
}
|
|
2646
|
-
const as = 1,
|
|
2647
|
-
function
|
|
2651
|
+
const as = 1, nu = 65566, ru = 407060584, su = 1175184220, iu = 1241248827, ou = 1455877031, au = 3419353826, cu = 3686066300;
|
|
2652
|
+
function lu(t) {
|
|
2648
2653
|
const e = {};
|
|
2649
|
-
return
|
|
2654
|
+
return uu(e), t && Object.assign(e, t), e;
|
|
2650
2655
|
}
|
|
2651
|
-
function
|
|
2656
|
+
function uu(t) {
|
|
2652
2657
|
return t.Sdp = "", t.OpcodeGroupsFromServer = g.NONE, t.OpcodeGroupsToServer = g.NONE, t.UseAudioTrack = !1, t.UseVideoTrack = !1, t.UseDataChannel = !1, t;
|
|
2653
2658
|
}
|
|
2654
|
-
function
|
|
2659
|
+
function du(t) {
|
|
2655
2660
|
const e = new U(as);
|
|
2656
|
-
return
|
|
2661
|
+
return hu(t, e), e.finish();
|
|
2657
2662
|
}
|
|
2658
|
-
function
|
|
2659
|
-
e.writeBoolField(
|
|
2663
|
+
function hu(t, e) {
|
|
2664
|
+
e.writeBoolField(ru, t.UseVideoTrack), e.writeInt32Field(su, t.OpcodeGroupsFromServer), e.writeBoolField(iu, t.UseAudioTrack), e.writeStringField(ou, t.Sdp), e.writeBoolField(au, t.UseDataChannel), e.writeInt32Field(cu, t.OpcodeGroupsToServer);
|
|
2660
2665
|
}
|
|
2661
|
-
function
|
|
2662
|
-
const r =
|
|
2663
|
-
return M(
|
|
2666
|
+
function fu(t, e, n) {
|
|
2667
|
+
const r = du(t);
|
|
2668
|
+
return M(nu, r, as, e, n);
|
|
2664
2669
|
}
|
|
2665
|
-
const cs = 65569,
|
|
2666
|
-
function
|
|
2670
|
+
const cs = 65569, pu = 2838554230, mu = 3673535008;
|
|
2671
|
+
function Eu(t) {
|
|
2667
2672
|
const e = {};
|
|
2668
2673
|
return ls(e), e;
|
|
2669
2674
|
}
|
|
2670
2675
|
function ls(t) {
|
|
2671
2676
|
return t.Success = !0, t.ErrorMessage = "", t;
|
|
2672
2677
|
}
|
|
2673
|
-
function Eu(t, e) {
|
|
2674
|
-
const n = V.create(t);
|
|
2675
|
-
return Iu(n, e);
|
|
2676
|
-
}
|
|
2677
2678
|
function Iu(t, e) {
|
|
2678
|
-
const n =
|
|
2679
|
-
return
|
|
2679
|
+
const n = V.create(t);
|
|
2680
|
+
return _u(n, e);
|
|
2680
2681
|
}
|
|
2681
2682
|
function _u(t, e) {
|
|
2683
|
+
const n = e ?? Eu();
|
|
2684
|
+
return ls(n), Tu(t, n), n;
|
|
2685
|
+
}
|
|
2686
|
+
function Tu(t, e) {
|
|
2682
2687
|
let n;
|
|
2683
2688
|
for (; (n = t.next()) !== null; )
|
|
2684
2689
|
switch (n.fieldId) {
|
|
2685
|
-
case
|
|
2690
|
+
case pu: {
|
|
2686
2691
|
if (n.isNull) throw new Error();
|
|
2687
2692
|
e.ErrorMessage = n.asString();
|
|
2688
2693
|
break;
|
|
2689
2694
|
}
|
|
2690
|
-
case
|
|
2695
|
+
case mu: {
|
|
2691
2696
|
if (n.isNull) throw new Error();
|
|
2692
2697
|
e.Success = n.asBool();
|
|
2693
2698
|
break;
|
|
2694
2699
|
}
|
|
2695
2700
|
}
|
|
2696
2701
|
}
|
|
2697
|
-
function
|
|
2702
|
+
function wu(t, e) {
|
|
2698
2703
|
const n = le(t, cs);
|
|
2699
|
-
return
|
|
2704
|
+
return Iu(n, e);
|
|
2700
2705
|
}
|
|
2701
|
-
const us = 65571,
|
|
2702
|
-
function
|
|
2706
|
+
const us = 65571, Su = 161083277, gu = 317031266, Cu = 1093174542, Au = 1970024675, yu = 2481928696, bu = 2762891795, Ru = 3282782683;
|
|
2707
|
+
function Nu(t) {
|
|
2703
2708
|
const e = {};
|
|
2704
2709
|
return ds(e), e;
|
|
2705
2710
|
}
|
|
2706
2711
|
function ds(t) {
|
|
2707
2712
|
return t.Kind = "", t.TrackIndex = 0, t.SenderId = 0, t.SenderTrackId = 0, t.StreamId = "", t.SourceType = "", t.Active = !0, t;
|
|
2708
2713
|
}
|
|
2709
|
-
function Nu(t, e) {
|
|
2710
|
-
const n = V.create(t);
|
|
2711
|
-
return ku(n, e);
|
|
2712
|
-
}
|
|
2713
2714
|
function ku(t, e) {
|
|
2714
|
-
const n =
|
|
2715
|
-
return
|
|
2715
|
+
const n = V.create(t);
|
|
2716
|
+
return Du(n, e);
|
|
2716
2717
|
}
|
|
2717
2718
|
function Du(t, e) {
|
|
2719
|
+
const n = e ?? Nu();
|
|
2720
|
+
return ds(n), vu(t, n), n;
|
|
2721
|
+
}
|
|
2722
|
+
function vu(t, e) {
|
|
2718
2723
|
let n;
|
|
2719
2724
|
for (; (n = t.next()) !== null; )
|
|
2720
2725
|
switch (n.fieldId) {
|
|
2721
|
-
case
|
|
2726
|
+
case Su: {
|
|
2722
2727
|
if (n.isNull) throw new Error();
|
|
2723
2728
|
e.StreamId = n.asString();
|
|
2724
2729
|
break;
|
|
2725
2730
|
}
|
|
2726
|
-
case
|
|
2731
|
+
case gu: {
|
|
2727
2732
|
if (n.isNull) throw new Error();
|
|
2728
2733
|
e.Kind = n.asString();
|
|
2729
2734
|
break;
|
|
2730
2735
|
}
|
|
2731
|
-
case
|
|
2736
|
+
case Cu: {
|
|
2732
2737
|
if (n.isNull) throw new Error();
|
|
2733
2738
|
e.SenderTrackId = n.asInt32();
|
|
2734
2739
|
break;
|
|
2735
2740
|
}
|
|
2736
|
-
case
|
|
2741
|
+
case Au: {
|
|
2737
2742
|
if (n.isNull) throw new Error();
|
|
2738
2743
|
e.SenderId = n.asInt32();
|
|
2739
2744
|
break;
|
|
2740
2745
|
}
|
|
2741
|
-
case
|
|
2746
|
+
case yu: {
|
|
2742
2747
|
if (n.isNull) throw new Error();
|
|
2743
2748
|
e.Active = n.asBool();
|
|
2744
2749
|
break;
|
|
2745
2750
|
}
|
|
2746
|
-
case
|
|
2751
|
+
case bu: {
|
|
2747
2752
|
if (n.isNull) throw new Error();
|
|
2748
2753
|
e.TrackIndex = n.asInt32();
|
|
2749
2754
|
break;
|
|
2750
2755
|
}
|
|
2751
|
-
case
|
|
2756
|
+
case Ru: {
|
|
2752
2757
|
if (n.isNull) throw new Error();
|
|
2753
2758
|
e.SourceType = n.asString();
|
|
2754
2759
|
break;
|
|
2755
2760
|
}
|
|
2756
2761
|
}
|
|
2757
2762
|
}
|
|
2758
|
-
function
|
|
2763
|
+
function Uu(t, e) {
|
|
2759
2764
|
const n = le(t, us);
|
|
2760
|
-
return
|
|
2765
|
+
return ku(n, e);
|
|
2761
2766
|
}
|
|
2762
2767
|
class Ct extends Error {
|
|
2763
2768
|
constructor(e, n) {
|
|
@@ -2779,27 +2784,27 @@ class At extends q {
|
|
|
2779
2784
|
super(`No keepalive received within ${e}ms`), this.name = "KeepaliveTimeoutError";
|
|
2780
2785
|
}
|
|
2781
2786
|
}
|
|
2782
|
-
class
|
|
2787
|
+
class Ou extends Ct {
|
|
2783
2788
|
constructor(e) {
|
|
2784
2789
|
super(`Maximum reconnection attempts (${e}) exceeded`), this.name = "MaxRetriesExceededError";
|
|
2785
2790
|
}
|
|
2786
2791
|
}
|
|
2787
|
-
class
|
|
2792
|
+
class Mu extends R {
|
|
2788
2793
|
constructor(e) {
|
|
2789
2794
|
super(`Channel provisioning timeout after ${e}ms`), this.name = "ProvisioningTimeoutError";
|
|
2790
2795
|
}
|
|
2791
2796
|
}
|
|
2792
|
-
class
|
|
2797
|
+
class Gf extends R {
|
|
2793
2798
|
constructor(e) {
|
|
2794
2799
|
super(`Channel not found: ${e}`), this.name = "ChannelNotFoundError";
|
|
2795
2800
|
}
|
|
2796
2801
|
}
|
|
2797
|
-
class
|
|
2802
|
+
class Vf extends R {
|
|
2798
2803
|
constructor(e) {
|
|
2799
2804
|
super(`Space not found for domain: ${e}`), this.name = "SpaceNotFoundError";
|
|
2800
2805
|
}
|
|
2801
2806
|
}
|
|
2802
|
-
class
|
|
2807
|
+
class Hf extends R {
|
|
2803
2808
|
constructor() {
|
|
2804
2809
|
super("No channels available in this space"), this.name = "NoChannelsError";
|
|
2805
2810
|
}
|
|
@@ -2824,16 +2829,16 @@ const rt = /* @__PURE__ */ new Map();
|
|
|
2824
2829
|
function hs(t) {
|
|
2825
2830
|
bt = t;
|
|
2826
2831
|
}
|
|
2827
|
-
function
|
|
2832
|
+
function $f() {
|
|
2828
2833
|
return bt;
|
|
2829
2834
|
}
|
|
2830
|
-
function
|
|
2835
|
+
function Pu(t) {
|
|
2831
2836
|
Fe = t;
|
|
2832
2837
|
}
|
|
2833
|
-
function
|
|
2838
|
+
function Kf() {
|
|
2834
2839
|
return Fe;
|
|
2835
2840
|
}
|
|
2836
|
-
function
|
|
2841
|
+
function Yf(t, e) {
|
|
2837
2842
|
return rt.set(t, e ?? {
|
|
2838
2843
|
minLevel: 2
|
|
2839
2844
|
/* WARN */
|
|
@@ -2841,18 +2846,18 @@ function Kf(t, e) {
|
|
|
2841
2846
|
rt.delete(t);
|
|
2842
2847
|
};
|
|
2843
2848
|
}
|
|
2844
|
-
const
|
|
2849
|
+
const Lu = {
|
|
2845
2850
|
0: "DEBUG",
|
|
2846
2851
|
1: "INFO",
|
|
2847
2852
|
2: "WARN",
|
|
2848
2853
|
3: "ERROR",
|
|
2849
2854
|
4: "NONE"
|
|
2850
2855
|
};
|
|
2851
|
-
function
|
|
2856
|
+
function Fu(t, e) {
|
|
2852
2857
|
return `[${t}] ${e}`;
|
|
2853
2858
|
}
|
|
2854
2859
|
function Re(t, e, n, r) {
|
|
2855
|
-
const s = (/* @__PURE__ */ new Date()).toISOString(), i =
|
|
2860
|
+
const s = (/* @__PURE__ */ new Date()).toISOString(), i = Lu[t], o = {
|
|
2856
2861
|
timestamp: s,
|
|
2857
2862
|
level: t,
|
|
2858
2863
|
levelName: i,
|
|
@@ -2870,7 +2875,7 @@ function Re(t, e, n, r) {
|
|
|
2870
2875
|
}
|
|
2871
2876
|
}
|
|
2872
2877
|
if (bt <= t) {
|
|
2873
|
-
const a =
|
|
2878
|
+
const a = Fu(e, n);
|
|
2874
2879
|
switch (t) {
|
|
2875
2880
|
case 0:
|
|
2876
2881
|
console.debug(a, ...r);
|
|
@@ -2903,8 +2908,8 @@ function P(t) {
|
|
|
2903
2908
|
}
|
|
2904
2909
|
};
|
|
2905
2910
|
}
|
|
2906
|
-
const Ye = P("WebSocketTransport"),
|
|
2907
|
-
class
|
|
2911
|
+
const Ye = P("WebSocketTransport"), Bu = 1e4;
|
|
2912
|
+
class xu {
|
|
2908
2913
|
ws = null;
|
|
2909
2914
|
keepaliveTimeout = null;
|
|
2910
2915
|
isClosed = !1;
|
|
@@ -2932,7 +2937,7 @@ class Bu {
|
|
|
2932
2937
|
clearTimeout(c), this.ws && (this.ws.onopen = null, this.ws.onerror = null, this.ws.onclose = null, this.ws.onmessage = null);
|
|
2933
2938
|
}, c = setTimeout(() => {
|
|
2934
2939
|
o || (o = !0, a(), this.ws?.close(), s(new q("WebSocket connection timeout")));
|
|
2935
|
-
},
|
|
2940
|
+
}, Bu);
|
|
2936
2941
|
this.ws.onopen = () => {
|
|
2937
2942
|
i = !0, clearTimeout(c), this.ws.send(n), this.resetKeepaliveTimeout(), o || (o = !0, r());
|
|
2938
2943
|
}, this.ws.onerror = () => {
|
|
@@ -2983,11 +2988,11 @@ class Bu {
|
|
|
2983
2988
|
this.keepaliveTimeout && (clearTimeout(this.keepaliveTimeout), this.keepaliveTimeout = null);
|
|
2984
2989
|
}
|
|
2985
2990
|
}
|
|
2986
|
-
const j = P("WebTransportTransport"), Gt = 4,
|
|
2991
|
+
const j = P("WebTransportTransport"), Gt = 4, Wu = 65536;
|
|
2987
2992
|
function fs() {
|
|
2988
2993
|
return typeof WebTransport < "u";
|
|
2989
2994
|
}
|
|
2990
|
-
class
|
|
2995
|
+
class Gu {
|
|
2991
2996
|
transport = null;
|
|
2992
2997
|
stream = null;
|
|
2993
2998
|
reader = null;
|
|
@@ -2996,7 +3001,7 @@ class Wu {
|
|
|
2996
3001
|
readLoopActive = !1;
|
|
2997
3002
|
isClosed = !1;
|
|
2998
3003
|
// Grow-only receive buffer with offset/length tracking to minimize allocations
|
|
2999
|
-
receiveBuffer = new Uint8Array(
|
|
3004
|
+
receiveBuffer = new Uint8Array(Wu);
|
|
3000
3005
|
receiveBufferOffset = 0;
|
|
3001
3006
|
receiveBufferLength = 0;
|
|
3002
3007
|
// Cached DataView to avoid allocation per message
|
|
@@ -3153,7 +3158,7 @@ class Wu {
|
|
|
3153
3158
|
}
|
|
3154
3159
|
}
|
|
3155
3160
|
const je = P("Channel");
|
|
3156
|
-
class
|
|
3161
|
+
class Vu {
|
|
3157
3162
|
state = "disconnected";
|
|
3158
3163
|
transport = null;
|
|
3159
3164
|
config;
|
|
@@ -3237,13 +3242,13 @@ class Gu {
|
|
|
3237
3242
|
switch (e.Type) {
|
|
3238
3243
|
case N.WebSocket:
|
|
3239
3244
|
case N.WebSocketProxy:
|
|
3240
|
-
this.transport = new
|
|
3245
|
+
this.transport = new xu(n);
|
|
3241
3246
|
break;
|
|
3242
3247
|
case N.WebTransport:
|
|
3243
3248
|
case N.WebTransportProxy:
|
|
3244
3249
|
if (!fs())
|
|
3245
3250
|
throw new Error("WebTransport is not supported in this browser");
|
|
3246
|
-
this.transport = new
|
|
3251
|
+
this.transport = new Gu(n);
|
|
3247
3252
|
break;
|
|
3248
3253
|
default:
|
|
3249
3254
|
throw new Error(`Unsupported entrypoint type: ${N[e.Type]}`);
|
|
@@ -3285,7 +3290,7 @@ class Gu {
|
|
|
3285
3290
|
}
|
|
3286
3291
|
}
|
|
3287
3292
|
const B = P("ChannelManager");
|
|
3288
|
-
class
|
|
3293
|
+
class Hu {
|
|
3289
3294
|
channels = /* @__PURE__ */ new Map();
|
|
3290
3295
|
// keyed by opcode group
|
|
3291
3296
|
activeType = null;
|
|
@@ -3425,7 +3430,7 @@ class Vu {
|
|
|
3425
3430
|
* Connect a single channel.
|
|
3426
3431
|
*/
|
|
3427
3432
|
async connectChannel(e) {
|
|
3428
|
-
const n = new
|
|
3433
|
+
const n = new Vu({
|
|
3429
3434
|
entrypoint: e,
|
|
3430
3435
|
sessionId: this.config.sessionId,
|
|
3431
3436
|
keepaliveTimeoutMs: this.config.keepaliveTimeoutMs,
|
|
@@ -3480,7 +3485,7 @@ class Vu {
|
|
|
3480
3485
|
async attemptReconnect() {
|
|
3481
3486
|
if (this.shouldReconnect) {
|
|
3482
3487
|
if (this.reconnectAttempts >= this.config.maxReconnectAttempts) {
|
|
3483
|
-
B.warn(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new
|
|
3488
|
+
B.warn(`Max reconnect attempts (${this.config.maxReconnectAttempts}) reached`), this.setState("offline"), this.config.onError?.(new Ou(this.config.maxReconnectAttempts));
|
|
3484
3489
|
return;
|
|
3485
3490
|
}
|
|
3486
3491
|
if (this.setState("reconnecting"), this.reconnectAttempts++, this.reconnectAttempts > 1 ? (B.info(`Reconnecting in ${this.config.reconnectBackoffMs}ms (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), await yt(this.config.reconnectBackoffMs, this.abortController?.signal)) : B.info(`Reconnecting immediately (attempt ${this.reconnectAttempts}/${this.config.maxReconnectAttempts})`), !!this.shouldReconnect)
|
|
@@ -3522,8 +3527,8 @@ class Vu {
|
|
|
3522
3527
|
this.state !== e && (this.state = e, this.config.onStateChange?.(e));
|
|
3523
3528
|
}
|
|
3524
3529
|
}
|
|
3525
|
-
const
|
|
3526
|
-
class
|
|
3530
|
+
const jf = "opus", zf = 48e3, Xf = 2, Jf = 64e3, $u = 150, Qf = "VP8", Ku = 5e6, Zf = 30, Yu = 0.05, ju = "max-bundle", zu = "require", Xu = [], Ju = 16, Qu = 16, Zu = "ikon-data", qu = !1, ed = 0, G = P("WebRTCConnection");
|
|
3531
|
+
class td {
|
|
3527
3532
|
pc = null;
|
|
3528
3533
|
dataChannel = null;
|
|
3529
3534
|
_state = "new";
|
|
@@ -3545,20 +3550,20 @@ class ed {
|
|
|
3545
3550
|
return this.dataChannel?.readyState === "open";
|
|
3546
3551
|
}
|
|
3547
3552
|
async initialize() {
|
|
3548
|
-
const e =
|
|
3553
|
+
const e = Xu;
|
|
3549
3554
|
if (this.pc = new RTCPeerConnection({
|
|
3550
3555
|
iceServers: e,
|
|
3551
|
-
bundlePolicy:
|
|
3552
|
-
rtcpMuxPolicy:
|
|
3556
|
+
bundlePolicy: ju,
|
|
3557
|
+
rtcpMuxPolicy: zu
|
|
3553
3558
|
}), this.setupEventHandlers(), this.config.useAudioTrack)
|
|
3554
|
-
for (let n = 0; n <
|
|
3559
|
+
for (let n = 0; n < Ju; n++)
|
|
3555
3560
|
this.pc.addTransceiver("audio", { direction: "sendrecv" });
|
|
3556
3561
|
if (this.config.useVideoTrack)
|
|
3557
|
-
for (let n = 0; n <
|
|
3562
|
+
for (let n = 0; n < Qu; n++)
|
|
3558
3563
|
this.pc.addTransceiver("video", { direction: "sendrecv" });
|
|
3559
|
-
this.config.useDataChannel && (this.dataChannel = this.pc.createDataChannel(
|
|
3560
|
-
ordered:
|
|
3561
|
-
maxRetransmits:
|
|
3564
|
+
this.config.useDataChannel && (this.dataChannel = this.pc.createDataChannel(Zu, {
|
|
3565
|
+
ordered: qu,
|
|
3566
|
+
maxRetransmits: ed
|
|
3562
3567
|
}), this.setupDataChannelHandlers(this.dataChannel));
|
|
3563
3568
|
}
|
|
3564
3569
|
async createOffer() {
|
|
@@ -3645,7 +3650,7 @@ class ed {
|
|
|
3645
3650
|
}, this.pc.ontrack = (e) => {
|
|
3646
3651
|
const n = e.track;
|
|
3647
3652
|
if (n.kind === "audio") {
|
|
3648
|
-
const r =
|
|
3653
|
+
const r = $u;
|
|
3649
3654
|
try {
|
|
3650
3655
|
e.receiver.jitterBufferTarget = r;
|
|
3651
3656
|
} catch (o) {
|
|
@@ -3655,7 +3660,7 @@ class ed {
|
|
|
3655
3660
|
this.config.onAudioTrack?.(i, n, s);
|
|
3656
3661
|
} else if (n.kind === "video") {
|
|
3657
3662
|
try {
|
|
3658
|
-
e.receiver.playoutDelayHint =
|
|
3663
|
+
e.receiver.playoutDelayHint = Yu;
|
|
3659
3664
|
} catch (i) {
|
|
3660
3665
|
G.warn("Failed to set playoutDelayHint:", i);
|
|
3661
3666
|
}
|
|
@@ -3682,7 +3687,7 @@ class ed {
|
|
|
3682
3687
|
}
|
|
3683
3688
|
}
|
|
3684
3689
|
const y = P("WebRTCSignaling");
|
|
3685
|
-
class
|
|
3690
|
+
class nd {
|
|
3686
3691
|
config;
|
|
3687
3692
|
connection = null;
|
|
3688
3693
|
sendMessage = null;
|
|
@@ -3726,7 +3731,7 @@ class td {
|
|
|
3726
3731
|
this.videoTrackCount++, this.config.onVideoTrack?.(s, i, o);
|
|
3727
3732
|
}
|
|
3728
3733
|
};
|
|
3729
|
-
this.connection = new
|
|
3734
|
+
this.connection = new td(n), await this.connection.initialize();
|
|
3730
3735
|
const r = await this.connection.createOffer();
|
|
3731
3736
|
this.sendOffer(r);
|
|
3732
3737
|
} catch (n) {
|
|
@@ -3841,7 +3846,7 @@ class td {
|
|
|
3841
3846
|
}
|
|
3842
3847
|
async applyEncodingParams(e, n) {
|
|
3843
3848
|
try {
|
|
3844
|
-
const r = n ??
|
|
3849
|
+
const r = n ?? Ku, s = e.getParameters();
|
|
3845
3850
|
s.encodings?.length || (s.encodings = [{}]), s.encodings[0].maxBitrate = r, s.degradationPreference = "balanced", await e.setParameters(s);
|
|
3846
3851
|
} catch (r) {
|
|
3847
3852
|
y.warn("Failed to set encoding params:", r);
|
|
@@ -3852,19 +3857,19 @@ class td {
|
|
|
3852
3857
|
y.error("Cannot send offer: no send function");
|
|
3853
3858
|
return;
|
|
3854
3859
|
}
|
|
3855
|
-
const n =
|
|
3860
|
+
const n = lu({
|
|
3856
3861
|
Sdp: e,
|
|
3857
3862
|
OpcodeGroupsFromServer: this.config.opcodeGroupsFromServer,
|
|
3858
3863
|
OpcodeGroupsToServer: this.config.opcodeGroupsToServer,
|
|
3859
3864
|
UseAudioTrack: this.config.useAudioTrack,
|
|
3860
3865
|
UseVideoTrack: this.config.useVideoTrack,
|
|
3861
3866
|
UseDataChannel: this.config.useDataChannel
|
|
3862
|
-
}), r =
|
|
3867
|
+
}), r = fu(n, this.config.sessionId);
|
|
3863
3868
|
this.sendMessage(r), y.debug("Sent WebRTC offer");
|
|
3864
3869
|
}
|
|
3865
3870
|
async handleAnswer(e) {
|
|
3866
3871
|
try {
|
|
3867
|
-
const n =
|
|
3872
|
+
const n = Hl(e);
|
|
3868
3873
|
await this.connection?.setRemoteDescription(n.Sdp, "answer"), y.debug("WebRTC answer received and applied");
|
|
3869
3874
|
} catch (n) {
|
|
3870
3875
|
y.error("Failed to handle WebRTC answer:", n);
|
|
@@ -3877,12 +3882,12 @@ class td {
|
|
|
3877
3882
|
Candidate: e.candidate,
|
|
3878
3883
|
SdpMid: e.sdpMid ?? "",
|
|
3879
3884
|
SdpMLineIndex: e.sdpMLineIndex ?? 0
|
|
3880
|
-
}), r =
|
|
3885
|
+
}), r = eu(n, this.config.sessionId);
|
|
3881
3886
|
this.sendMessage(r);
|
|
3882
3887
|
}
|
|
3883
3888
|
async handleRemoteIceCandidate(e) {
|
|
3884
3889
|
try {
|
|
3885
|
-
const n =
|
|
3890
|
+
const n = tu(e);
|
|
3886
3891
|
if (n.Candidate) {
|
|
3887
3892
|
const r = n.Candidate.startsWith("candidate:") ? n.Candidate : `candidate:${n.Candidate}`, s = n.SdpMid || String(n.SdpMLineIndex);
|
|
3888
3893
|
await this.connection?.addIceCandidate({
|
|
@@ -3897,7 +3902,7 @@ class td {
|
|
|
3897
3902
|
}
|
|
3898
3903
|
handleReady(e) {
|
|
3899
3904
|
try {
|
|
3900
|
-
const n =
|
|
3905
|
+
const n = wu(e);
|
|
3901
3906
|
n.Success ? (y.debug("WebRTC connection ready"), this.isConnecting = !1) : (y.error(`WebRTC connection failed (server): ${n.ErrorMessage}`), this.disconnect());
|
|
3902
3907
|
} catch (n) {
|
|
3903
3908
|
y.error("Failed to handle WebRTC ready:", n);
|
|
@@ -3905,14 +3910,14 @@ class td {
|
|
|
3905
3910
|
}
|
|
3906
3911
|
handleTrackMap(e) {
|
|
3907
3912
|
try {
|
|
3908
|
-
const n =
|
|
3913
|
+
const n = Uu(e);
|
|
3909
3914
|
this.config.onTrackMap?.(n);
|
|
3910
3915
|
} catch (n) {
|
|
3911
3916
|
y.error("Failed to handle WebRTC track map:", n);
|
|
3912
3917
|
}
|
|
3913
3918
|
}
|
|
3914
3919
|
}
|
|
3915
|
-
const
|
|
3920
|
+
const rd = 5e3, sd = 3e5, Vt = 15e3, Ht = 2e3, $t = 2, ps = 6e4, id = 5 * 60 * 1e3, od = 10 * 1e3, ge = "ikon.theme", Ce = "ikon.theme-user", ad = "ikon.theme-change", cd = {
|
|
3916
3921
|
slate: ["#475569", "#334155", "#64748b", "#f1f5f9"],
|
|
3917
3922
|
gray: ["#4b5563", "#374151", "#6b7280", "#f3f4f6"],
|
|
3918
3923
|
zinc: ["#52525b", "#3f3f46", "#71717a", "#f4f4f5"],
|
|
@@ -3935,7 +3940,7 @@ const nd = 5e3, rd = 3e5, Vt = 15e3, Ht = 2e3, $t = 2, ps = 6e4, sd = 5 * 60 * 1
|
|
|
3935
3940
|
fuchsia: ["#c026d3", "#a21caf", "#d946ef", "#fae8ff"],
|
|
3936
3941
|
pink: ["#db2777", "#be185d", "#ec4899", "#fce7f3"],
|
|
3937
3942
|
rose: ["#e11d48", "#be123c", "#f43f5e", "#ffe4e6"]
|
|
3938
|
-
},
|
|
3943
|
+
}, ld = [
|
|
3939
3944
|
"--bg-brand-solid",
|
|
3940
3945
|
"--bg-brand-solid-hover",
|
|
3941
3946
|
"--bg-brand-primary",
|
|
@@ -3956,21 +3961,21 @@ const nd = 5e3, rd = 3e5, Vt = 15e3, Ht = 2e3, $t = 2, ps = 6e4, sd = 5 * 60 * 1
|
|
|
3956
3961
|
"--text-brand-secondary-hover",
|
|
3957
3962
|
"--text-brand-tertiary"
|
|
3958
3963
|
];
|
|
3959
|
-
function
|
|
3960
|
-
const n =
|
|
3964
|
+
function ud(t, e) {
|
|
3965
|
+
const n = cd[e];
|
|
3961
3966
|
if (!n)
|
|
3962
3967
|
return;
|
|
3963
3968
|
const [r, s, i, o] = n;
|
|
3964
3969
|
t.setProperty("--bg-brand-solid", r), t.setProperty("--bg-brand-solid-hover", s), t.setProperty("--bg-brand-primary", r), t.setProperty("--bg-brand-primary-alt", o), t.setProperty("--bg-brand-secondary", o), t.setProperty("--border-brand", r), t.setProperty("--border-brand-alt", s), t.setProperty("--border-brand-secondary", o), t.setProperty("--border-brand-solid", r), t.setProperty("--border-focus-ring", i), t.setProperty("--border-ring", i), t.setProperty("--fg-brand-primary", r), t.setProperty("--fg-brand-primary-alt", s), t.setProperty("--fg-brand-secondary", r), t.setProperty("--fg-brand-secondary-hover", s), t.setProperty("--text-brand-primary", s), t.setProperty("--text-brand-secondary", r), t.setProperty("--text-brand-secondary-hover", s), t.setProperty("--text-brand-tertiary", i);
|
|
3965
3970
|
}
|
|
3966
|
-
function
|
|
3967
|
-
for (const e of
|
|
3971
|
+
function dd(t) {
|
|
3972
|
+
for (const e of ld)
|
|
3968
3973
|
t.removeProperty(e);
|
|
3969
3974
|
}
|
|
3970
3975
|
function st(t) {
|
|
3971
3976
|
if (typeof document < "u" && document.documentElement) {
|
|
3972
3977
|
const e = /* @__PURE__ */ new Set(["dark", "light"]), n = t.trim().split(/\s+/).filter((o) => o.length > 0), r = n.find((o) => e.has(o)), s = n.find((o) => !e.has(o)), i = document.documentElement.style;
|
|
3973
|
-
r !== void 0 ? (document.documentElement.setAttribute("data-theme", r), s !== void 0 ? (document.documentElement.setAttribute("data-brand", s),
|
|
3978
|
+
r !== void 0 ? (document.documentElement.setAttribute("data-theme", r), s !== void 0 ? (document.documentElement.setAttribute("data-brand", s), ud(i, s)) : (document.documentElement.removeAttribute("data-brand"), dd(i))) : document.documentElement.setAttribute("data-theme", t);
|
|
3974
3979
|
}
|
|
3975
3980
|
}
|
|
3976
3981
|
function ms() {
|
|
@@ -3987,7 +3992,7 @@ function He() {
|
|
|
3987
3992
|
function Rt() {
|
|
3988
3993
|
return typeof window > "u" ? { width: 0, height: 0 } : { width: window.innerWidth, height: window.innerHeight };
|
|
3989
3994
|
}
|
|
3990
|
-
function
|
|
3995
|
+
function hd() {
|
|
3991
3996
|
if (typeof window > "u" || !window.localStorage)
|
|
3992
3997
|
return "light";
|
|
3993
3998
|
const t = window.localStorage.getItem(Ce), e = window.localStorage.getItem(ge);
|
|
@@ -3998,18 +4003,18 @@ function dd() {
|
|
|
3998
4003
|
const n = ms();
|
|
3999
4004
|
return window.localStorage.setItem(ge, n), st(n), n;
|
|
4000
4005
|
}
|
|
4001
|
-
const
|
|
4006
|
+
const fd = {
|
|
4002
4007
|
name: "ikon.client.getTheme",
|
|
4003
4008
|
description: "Get the currently selected client theme",
|
|
4004
4009
|
returnType: { kind: "string", nullable: !0 }
|
|
4005
4010
|
};
|
|
4006
|
-
function
|
|
4011
|
+
function pd() {
|
|
4007
4012
|
if (typeof window > "u" || !window.localStorage)
|
|
4008
4013
|
return null;
|
|
4009
4014
|
const t = window.localStorage.getItem(Ce), e = window.localStorage.getItem(ge);
|
|
4010
4015
|
return t ?? e ?? null;
|
|
4011
4016
|
}
|
|
4012
|
-
const
|
|
4017
|
+
const md = {
|
|
4013
4018
|
name: "ikon.client.setTheme",
|
|
4014
4019
|
description: "Update the client UI theme",
|
|
4015
4020
|
returnType: { kind: "boolean" },
|
|
@@ -4018,7 +4023,7 @@ const pd = {
|
|
|
4018
4023
|
{ name: "persist", type: { kind: "boolean", nullable: !0 }, description: "Whether to persist as user preference" }
|
|
4019
4024
|
]
|
|
4020
4025
|
};
|
|
4021
|
-
function
|
|
4026
|
+
function Ed(t, e) {
|
|
4022
4027
|
if (typeof window > "u" || !window.localStorage || typeof t != "string")
|
|
4023
4028
|
return !1;
|
|
4024
4029
|
const n = t.trim().toLowerCase();
|
|
@@ -4027,25 +4032,25 @@ function md(t, e) {
|
|
|
4027
4032
|
const r = e === void 0 ? !0 : !!e, s = window.localStorage;
|
|
4028
4033
|
r ? s.setItem(Ce, n) : s.removeItem(Ce), s.setItem(ge, n);
|
|
4029
4034
|
try {
|
|
4030
|
-
window.dispatchEvent(new CustomEvent(
|
|
4035
|
+
window.dispatchEvent(new CustomEvent(ad, { detail: { mode: n } }));
|
|
4031
4036
|
} catch {
|
|
4032
4037
|
}
|
|
4033
4038
|
return st(n), !0;
|
|
4034
4039
|
}
|
|
4035
|
-
const
|
|
4040
|
+
const Id = {
|
|
4036
4041
|
name: "ikon.client.getLanguage",
|
|
4037
4042
|
description: "Get the browser language preference",
|
|
4038
4043
|
returnType: { kind: "string" }
|
|
4039
4044
|
};
|
|
4040
|
-
function
|
|
4045
|
+
function _d() {
|
|
4041
4046
|
return typeof navigator > "u" ? "en-US" : navigator.language || "en-US";
|
|
4042
4047
|
}
|
|
4043
|
-
const
|
|
4048
|
+
const Td = {
|
|
4044
4049
|
name: "ikon.client.getTimezone",
|
|
4045
4050
|
description: "Get the browser timezone (IANA format)",
|
|
4046
4051
|
returnType: { kind: "string" }
|
|
4047
4052
|
};
|
|
4048
|
-
function
|
|
4053
|
+
function wd() {
|
|
4049
4054
|
try {
|
|
4050
4055
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
4051
4056
|
} catch {
|
|
@@ -4070,15 +4075,15 @@ function Dt() {
|
|
|
4070
4075
|
const t = navigator.maxTouchPoints > 0, e = window.innerWidth <= 1024;
|
|
4071
4076
|
return t && e ? ne.MobileWeb : ne.DesktopWeb;
|
|
4072
4077
|
}
|
|
4073
|
-
const
|
|
4078
|
+
const Sd = {
|
|
4074
4079
|
name: "ikon.client.getUrl",
|
|
4075
4080
|
description: "Get the current browser URL path and query string",
|
|
4076
4081
|
returnType: { kind: "string", nullable: !0 }
|
|
4077
4082
|
};
|
|
4078
|
-
function
|
|
4083
|
+
function gd() {
|
|
4079
4084
|
return typeof window > "u" ? null : window.location.pathname + window.location.search;
|
|
4080
4085
|
}
|
|
4081
|
-
const
|
|
4086
|
+
const Cd = {
|
|
4082
4087
|
name: "ikon.client.setUrl",
|
|
4083
4088
|
description: "Update the browser URL without triggering a page reload",
|
|
4084
4089
|
returnType: { kind: "boolean" },
|
|
@@ -4088,7 +4093,7 @@ const gd = {
|
|
|
4088
4093
|
{ name: "preserveQueryParams", type: { kind: "boolean", nullable: !0 }, description: "If true, preserves existing query parameters when the URL does not contain a query string" }
|
|
4089
4094
|
]
|
|
4090
4095
|
};
|
|
4091
|
-
function
|
|
4096
|
+
function Ad(t, e, n) {
|
|
4092
4097
|
if (typeof window > "u" || !window.history || typeof t != "string")
|
|
4093
4098
|
return !1;
|
|
4094
4099
|
const r = t.trim();
|
|
@@ -4101,13 +4106,13 @@ function Cd(t, e, n) {
|
|
|
4101
4106
|
return !1;
|
|
4102
4107
|
}
|
|
4103
4108
|
}
|
|
4104
|
-
const
|
|
4109
|
+
const yd = {
|
|
4105
4110
|
name: "ikon.client.vibrate",
|
|
4106
4111
|
description: "Trigger haptic feedback on supported devices",
|
|
4107
4112
|
returnType: { kind: "boolean" },
|
|
4108
4113
|
parameters: [{ name: "pattern", type: { kind: "string" }, description: 'Duration in ms, or comma-separated pattern (e.g., "200" or "100,50,100")' }]
|
|
4109
4114
|
};
|
|
4110
|
-
function
|
|
4115
|
+
function bd(t) {
|
|
4111
4116
|
if (typeof navigator > "u" || !navigator.vibrate || typeof t != "string")
|
|
4112
4117
|
return !1;
|
|
4113
4118
|
try {
|
|
@@ -4118,7 +4123,7 @@ function yd(t) {
|
|
|
4118
4123
|
}
|
|
4119
4124
|
}
|
|
4120
4125
|
let Z = null, it = !1, Ne = !1;
|
|
4121
|
-
async function
|
|
4126
|
+
async function Rd() {
|
|
4122
4127
|
if (!(typeof navigator > "u" || !("wakeLock" in navigator)))
|
|
4123
4128
|
try {
|
|
4124
4129
|
Z = await navigator.wakeLock.request("screen");
|
|
@@ -4126,15 +4131,15 @@ async function bd() {
|
|
|
4126
4131
|
}
|
|
4127
4132
|
}
|
|
4128
4133
|
function Kt() {
|
|
4129
|
-
document.visibilityState === "visible" && it && !Z &&
|
|
4134
|
+
document.visibilityState === "visible" && it && !Z && Rd();
|
|
4130
4135
|
}
|
|
4131
|
-
const
|
|
4136
|
+
const Nd = {
|
|
4132
4137
|
name: "ikon.client.keepScreenAwake",
|
|
4133
4138
|
description: "Prevent or allow the screen to sleep",
|
|
4134
4139
|
returnType: { kind: "boolean" },
|
|
4135
4140
|
parameters: [{ name: "enabled", type: { kind: "boolean" }, description: "Whether to keep the screen awake" }]
|
|
4136
4141
|
};
|
|
4137
|
-
async function
|
|
4142
|
+
async function kd(t) {
|
|
4138
4143
|
if (typeof navigator > "u" || !("wakeLock" in navigator))
|
|
4139
4144
|
return !1;
|
|
4140
4145
|
try {
|
|
@@ -4143,15 +4148,15 @@ async function Nd(t) {
|
|
|
4143
4148
|
return !1;
|
|
4144
4149
|
}
|
|
4145
4150
|
}
|
|
4146
|
-
const
|
|
4151
|
+
const Dd = {
|
|
4147
4152
|
name: "ikon.client.getVisibility",
|
|
4148
4153
|
description: "Get the current page visibility state",
|
|
4149
4154
|
returnType: { kind: "string", nullable: !0 }
|
|
4150
4155
|
};
|
|
4151
|
-
function
|
|
4156
|
+
function vd() {
|
|
4152
4157
|
return typeof document > "u" ? null : document.visibilityState || null;
|
|
4153
4158
|
}
|
|
4154
|
-
const
|
|
4159
|
+
const Ud = {
|
|
4155
4160
|
name: "ikon.client.scrollTo",
|
|
4156
4161
|
description: "Scroll the page to a specific position",
|
|
4157
4162
|
returnType: { kind: "boolean" },
|
|
@@ -4161,7 +4166,7 @@ const vd = {
|
|
|
4161
4166
|
{ name: "smooth", type: { kind: "boolean", nullable: !0 }, description: "Whether to animate the scroll" }
|
|
4162
4167
|
]
|
|
4163
4168
|
};
|
|
4164
|
-
function
|
|
4169
|
+
function Od(t, e, n) {
|
|
4165
4170
|
if (typeof window > "u" || typeof t != "number" || typeof e != "number")
|
|
4166
4171
|
return !1;
|
|
4167
4172
|
try {
|
|
@@ -4174,12 +4179,12 @@ function Ud(t, e, n) {
|
|
|
4174
4179
|
return !1;
|
|
4175
4180
|
}
|
|
4176
4181
|
}
|
|
4177
|
-
const
|
|
4182
|
+
const Md = {
|
|
4178
4183
|
name: "ikon.client.getBatteryLevel",
|
|
4179
4184
|
description: "Get the current battery level (0-100)",
|
|
4180
4185
|
returnType: { kind: "number", nullable: !0 }
|
|
4181
4186
|
};
|
|
4182
|
-
async function
|
|
4187
|
+
async function Pd() {
|
|
4183
4188
|
if (typeof navigator > "u" || !("getBattery" in navigator))
|
|
4184
4189
|
return null;
|
|
4185
4190
|
try {
|
|
@@ -4189,23 +4194,23 @@ async function Md() {
|
|
|
4189
4194
|
return null;
|
|
4190
4195
|
}
|
|
4191
4196
|
}
|
|
4192
|
-
const
|
|
4197
|
+
const Ld = {
|
|
4193
4198
|
name: "ikon.client.getNetworkType",
|
|
4194
4199
|
description: "Get the current network connection type",
|
|
4195
4200
|
returnType: { kind: "string", nullable: !0 }
|
|
4196
4201
|
};
|
|
4197
|
-
function
|
|
4202
|
+
function Fd() {
|
|
4198
4203
|
if (typeof navigator > "u")
|
|
4199
4204
|
return null;
|
|
4200
4205
|
const t = navigator.connection;
|
|
4201
4206
|
return t && (t.effectiveType || t.type) || null;
|
|
4202
4207
|
}
|
|
4203
|
-
const
|
|
4208
|
+
const Bd = {
|
|
4204
4209
|
name: "ikon.client.requestFullscreen",
|
|
4205
4210
|
description: "Request the browser to enter fullscreen mode",
|
|
4206
4211
|
returnType: { kind: "boolean" }
|
|
4207
4212
|
};
|
|
4208
|
-
async function
|
|
4213
|
+
async function xd() {
|
|
4209
4214
|
if (typeof document > "u" || !document.documentElement)
|
|
4210
4215
|
return !1;
|
|
4211
4216
|
try {
|
|
@@ -4215,12 +4220,12 @@ async function Bd() {
|
|
|
4215
4220
|
return !1;
|
|
4216
4221
|
}
|
|
4217
4222
|
}
|
|
4218
|
-
const
|
|
4223
|
+
const Wd = {
|
|
4219
4224
|
name: "ikon.client.exitFullscreen",
|
|
4220
4225
|
description: "Exit browser fullscreen mode",
|
|
4221
4226
|
returnType: { kind: "boolean" }
|
|
4222
4227
|
};
|
|
4223
|
-
function
|
|
4228
|
+
function Gd() {
|
|
4224
4229
|
if (typeof document > "u")
|
|
4225
4230
|
return !1;
|
|
4226
4231
|
try {
|
|
@@ -4230,12 +4235,12 @@ function Wd() {
|
|
|
4230
4235
|
return !1;
|
|
4231
4236
|
}
|
|
4232
4237
|
}
|
|
4233
|
-
const
|
|
4238
|
+
const Vd = {
|
|
4234
4239
|
name: "ikon.client.logout",
|
|
4235
4240
|
description: "Clear the auth session and reload the page to return to the login screen",
|
|
4236
4241
|
returnType: { kind: "boolean" }
|
|
4237
4242
|
};
|
|
4238
|
-
function
|
|
4243
|
+
function Hd() {
|
|
4239
4244
|
if (typeof window > "u" || !window.localStorage)
|
|
4240
4245
|
return !1;
|
|
4241
4246
|
try {
|
|
@@ -4244,25 +4249,25 @@ function Vd() {
|
|
|
4244
4249
|
return !1;
|
|
4245
4250
|
}
|
|
4246
4251
|
}
|
|
4247
|
-
const
|
|
4248
|
-
{ definition:
|
|
4249
|
-
{ definition:
|
|
4250
|
-
{ definition:
|
|
4251
|
-
{ definition:
|
|
4252
|
-
{ definition:
|
|
4253
|
-
{ definition:
|
|
4254
|
-
{ definition:
|
|
4255
|
-
{ definition:
|
|
4256
|
-
{ definition:
|
|
4257
|
-
{ definition:
|
|
4258
|
-
{ definition:
|
|
4259
|
-
{ definition:
|
|
4260
|
-
{ definition:
|
|
4261
|
-
{ definition:
|
|
4262
|
-
{ definition:
|
|
4252
|
+
const $d = [
|
|
4253
|
+
{ definition: fd, handler: pd },
|
|
4254
|
+
{ definition: md, handler: Ed },
|
|
4255
|
+
{ definition: Id, handler: _d },
|
|
4256
|
+
{ definition: Td, handler: wd },
|
|
4257
|
+
{ definition: Sd, handler: gd },
|
|
4258
|
+
{ definition: Cd, handler: Ad },
|
|
4259
|
+
{ definition: yd, handler: bd },
|
|
4260
|
+
{ definition: Nd, handler: kd },
|
|
4261
|
+
{ definition: Dd, handler: vd },
|
|
4262
|
+
{ definition: Ud, handler: Od },
|
|
4263
|
+
{ definition: Md, handler: Pd },
|
|
4264
|
+
{ definition: Ld, handler: Fd },
|
|
4265
|
+
{ definition: Bd, handler: xd },
|
|
4266
|
+
{ definition: Wd, handler: Gd },
|
|
4267
|
+
{ definition: Vd, handler: Hd }
|
|
4263
4268
|
];
|
|
4264
|
-
function
|
|
4265
|
-
const e =
|
|
4269
|
+
function Kd(t) {
|
|
4270
|
+
const e = $d.map(({ definition: n, handler: r }) => t.register(n, r));
|
|
4266
4271
|
return () => e.forEach((n) => n());
|
|
4267
4272
|
}
|
|
4268
4273
|
function ze() {
|
|
@@ -4279,14 +4284,14 @@ function $e() {
|
|
|
4279
4284
|
return crypto.randomUUID();
|
|
4280
4285
|
}
|
|
4281
4286
|
}
|
|
4282
|
-
function
|
|
4287
|
+
function qf() {
|
|
4283
4288
|
if (!(typeof localStorage > "u"))
|
|
4284
4289
|
try {
|
|
4285
4290
|
localStorage.removeItem(ot);
|
|
4286
4291
|
} catch {
|
|
4287
4292
|
}
|
|
4288
4293
|
}
|
|
4289
|
-
function
|
|
4294
|
+
function Yd(t) {
|
|
4290
4295
|
try {
|
|
4291
4296
|
const e = t.split(".");
|
|
4292
4297
|
return e.length !== 3 ? null : JSON.parse(atob(e[1])).id ?? null;
|
|
@@ -4294,7 +4299,7 @@ function Kd(t) {
|
|
|
4294
4299
|
return null;
|
|
4295
4300
|
}
|
|
4296
4301
|
}
|
|
4297
|
-
const Be = {}, at = "https://api.prod.ikon.live", ct = "https://api.dev.ikon.live", Yt = "https://auth.ikonai.com", jt = "https://auth.dev.ikonai.com",
|
|
4302
|
+
const Be = {}, at = "https://api.prod.ikon.live", ct = "https://api.dev.ikon.live", Yt = "https://auth.ikonai.com", jt = "https://auth.dev.ikonai.com", ep = "https://auth.ikonai.com";
|
|
4298
4303
|
function Es(t) {
|
|
4299
4304
|
return t === "development" ? ct : at;
|
|
4300
4305
|
}
|
|
@@ -4303,14 +4308,14 @@ function zt(t) {
|
|
|
4303
4308
|
const e = typeof import.meta < "u" ? Be.VITE_IKON_BACKEND_URL : void 0;
|
|
4304
4309
|
return e || (typeof window > "u" ? at : !vt() || window.location.hostname.includes(".dev.") ? ct : at);
|
|
4305
4310
|
}
|
|
4306
|
-
function
|
|
4311
|
+
function tp() {
|
|
4307
4312
|
const t = typeof import.meta < "u" ? Be.VITE_IKON_BACKEND_TYPE : void 0;
|
|
4308
4313
|
if (t === "development" || t === "production")
|
|
4309
4314
|
return t;
|
|
4310
4315
|
const e = typeof import.meta < "u" ? Be.VITE_IKON_BACKEND_URL : void 0;
|
|
4311
4316
|
return e ? e.includes(".dev.") ? "development" : "production" : typeof window > "u" ? "production" : vt() ? window.location.hostname.includes(".dev.") ? "development" : "production" : "development";
|
|
4312
4317
|
}
|
|
4313
|
-
function
|
|
4318
|
+
function jd(t) {
|
|
4314
4319
|
if (t) return t;
|
|
4315
4320
|
const e = typeof import.meta < "u" ? Be.VITE_IKON_AUTH_URL : void 0;
|
|
4316
4321
|
return e || (typeof window > "u" ? Yt : !vt() || window.location.hostname.includes(".dev.") ? jt : Yt);
|
|
@@ -4323,8 +4328,8 @@ function Ke() {
|
|
|
4323
4328
|
e[n] = r;
|
|
4324
4329
|
return e;
|
|
4325
4330
|
}
|
|
4326
|
-
const
|
|
4327
|
-
function
|
|
4331
|
+
const zd = ["ikon_token", "ikon_provider", "error"];
|
|
4332
|
+
function np() {
|
|
4328
4333
|
if (typeof window > "u")
|
|
4329
4334
|
return { parameters: {} };
|
|
4330
4335
|
const t = window.location.pathname;
|
|
@@ -4336,7 +4341,7 @@ function tp() {
|
|
|
4336
4341
|
throw new Error("URL cannot contain both /s/[sessionId] and /c/[channelKey]");
|
|
4337
4342
|
const i = Ke(), o = {};
|
|
4338
4343
|
for (const [a, c] of Object.entries(i))
|
|
4339
|
-
|
|
4344
|
+
zd.includes(a) || (o[a] = c);
|
|
4340
4345
|
return { sessionId: e, channelKey: n, parameters: o };
|
|
4341
4346
|
}
|
|
4342
4347
|
function vt() {
|
|
@@ -4354,7 +4359,7 @@ function vt() {
|
|
|
4354
4359
|
function Ut() {
|
|
4355
4360
|
return typeof window > "u" ? "" : window.location.pathname.replace(/^\/(s|c)\/[^/]+/, "") || "/";
|
|
4356
4361
|
}
|
|
4357
|
-
function
|
|
4362
|
+
function rp() {
|
|
4358
4363
|
if (typeof window > "u") return;
|
|
4359
4364
|
const t = window.location.pathname, e = t.match(/^\/s\/[^/]+/), n = t.match(/^\/c\/[^/]+/);
|
|
4360
4365
|
if (e || n) {
|
|
@@ -4362,8 +4367,8 @@ function np() {
|
|
|
4362
4367
|
window.history.replaceState(null, "", r + window.location.search);
|
|
4363
4368
|
}
|
|
4364
4369
|
}
|
|
4365
|
-
const Y = P("Authenticator"), oe = g.GROUP_CORE | g.GROUP_KEEPALIVE | g.GROUP_EVENTS | g.GROUP_ACTIONS | g.GROUP_UI | g.GROUP_AUDIO | g.GROUP_VIDEO | g.GROUP_ANALYTICS,
|
|
4366
|
-
async function
|
|
4370
|
+
const Y = P("Authenticator"), oe = g.GROUP_CORE | g.GROUP_KEEPALIVE | g.GROUP_EVENTS | g.GROUP_ACTIONS | g.GROUP_UI | g.GROUP_AUDIO | g.GROUP_VIDEO | g.GROUP_ANALYTICS, Xd = 1e3, Jd = 2, Qd = 6e4, Zd = 2e3, qd = 1e4, re = 3;
|
|
4371
|
+
async function eh(t, e, n, r) {
|
|
4367
4372
|
if (t)
|
|
4368
4373
|
try {
|
|
4369
4374
|
const s = await fetch(`${n}/anonymous`, {
|
|
@@ -4377,13 +4382,13 @@ async function qd(t, e, n, r) {
|
|
|
4377
4382
|
const i = await s.json();
|
|
4378
4383
|
if (!i.token)
|
|
4379
4384
|
return;
|
|
4380
|
-
const o =
|
|
4385
|
+
const o = Yd(i.token);
|
|
4381
4386
|
return o ? { userId: o, token: i.token } : void 0;
|
|
4382
4387
|
} catch {
|
|
4383
4388
|
return;
|
|
4384
4389
|
}
|
|
4385
4390
|
}
|
|
4386
|
-
async function
|
|
4391
|
+
async function th(t, e, n, r) {
|
|
4387
4392
|
try {
|
|
4388
4393
|
const s = await fetch(`${t}/profiles/me?space=${encodeURIComponent(e)}`, {
|
|
4389
4394
|
method: "GET",
|
|
@@ -4420,7 +4425,7 @@ async function _s(t, e, n, r, s, i, o) {
|
|
|
4420
4425
|
}
|
|
4421
4426
|
return await l.json();
|
|
4422
4427
|
}
|
|
4423
|
-
async function
|
|
4428
|
+
async function nh(t, e, n, r) {
|
|
4424
4429
|
const s = `${t}/rooms/connect`, i = await fetch(s, Is(e, n, r));
|
|
4425
4430
|
if (!i.ok) {
|
|
4426
4431
|
const o = await i.text().catch(() => "Unknown error");
|
|
@@ -4434,25 +4439,25 @@ async function Ts(t, e, n, r, s) {
|
|
|
4434
4439
|
if (s?.aborted)
|
|
4435
4440
|
throw new R("Connection aborted");
|
|
4436
4441
|
if (Date.now() - i >= n)
|
|
4437
|
-
throw new
|
|
4438
|
-
const a = await
|
|
4442
|
+
throw new Mu(n);
|
|
4443
|
+
const a = await nh(t, e, r, s), c = a.state?.toLowerCase();
|
|
4439
4444
|
if (c === "running")
|
|
4440
4445
|
return a;
|
|
4441
4446
|
if (c === "provisioning") {
|
|
4442
|
-
await yt(
|
|
4447
|
+
await yt(Xd, s);
|
|
4443
4448
|
continue;
|
|
4444
4449
|
}
|
|
4445
4450
|
throw new R(`Unexpected channel state: ${a.state}`);
|
|
4446
4451
|
}
|
|
4447
4452
|
}
|
|
4448
4453
|
async function xe(t, e) {
|
|
4449
|
-
const n = AbortSignal.timeout(
|
|
4454
|
+
const n = AbortSignal.timeout(qd), r = e ? AbortSignal.any([e, n]) : n, s = await fetch(t, { signal: r });
|
|
4450
4455
|
if (!s.ok) {
|
|
4451
4456
|
const c = await s.text().catch(() => "Unknown error");
|
|
4452
4457
|
throw new R(`Failed to connect: ${s.status} ${c}`);
|
|
4453
4458
|
}
|
|
4454
4459
|
const i = await s.arrayBuffer(), o = new Uint8Array(i);
|
|
4455
|
-
return { authResponse: await
|
|
4460
|
+
return { authResponse: await Oo(o) };
|
|
4456
4461
|
}
|
|
4457
4462
|
async function ws(t, e, n, r, s) {
|
|
4458
4463
|
const i = [];
|
|
@@ -4460,7 +4465,7 @@ async function ws(t, e, n, r, s) {
|
|
|
4460
4465
|
throw new R("No connect URL available");
|
|
4461
4466
|
const o = Date.now();
|
|
4462
4467
|
let a = 0;
|
|
4463
|
-
for (; a <
|
|
4468
|
+
for (; a < Jd || Date.now() - o < Qd; ) {
|
|
4464
4469
|
for (const c of i)
|
|
4465
4470
|
try {
|
|
4466
4471
|
const l = await xe(c.url, s);
|
|
@@ -4468,13 +4473,13 @@ async function ws(t, e, n, r, s) {
|
|
|
4468
4473
|
} catch (l) {
|
|
4469
4474
|
Y.warn(`Auth via ${c.isProxy ? "proxy" : "direct"} URL failed (round ${a + 1}): ${l}`);
|
|
4470
4475
|
}
|
|
4471
|
-
a++, await yt(
|
|
4476
|
+
a++, await yt(Zd, s);
|
|
4472
4477
|
}
|
|
4473
4478
|
throw new R("Failed to connect after exhausting all URL attempts");
|
|
4474
4479
|
}
|
|
4475
|
-
function
|
|
4480
|
+
function rh(t, e) {
|
|
4476
4481
|
const n = Rt();
|
|
4477
|
-
return
|
|
4482
|
+
return Lo({
|
|
4478
4483
|
ServerSessionId: "",
|
|
4479
4484
|
// Server will fill this in
|
|
4480
4485
|
ContextType: de.Browser,
|
|
@@ -4507,7 +4512,7 @@ function nh(t, e) {
|
|
|
4507
4512
|
InitialPath: Ut()
|
|
4508
4513
|
});
|
|
4509
4514
|
}
|
|
4510
|
-
function
|
|
4515
|
+
function sh(t) {
|
|
4511
4516
|
return {
|
|
4512
4517
|
ServerSessionId: t.ServerSessionId,
|
|
4513
4518
|
ContextType: t.ContextType,
|
|
@@ -4540,13 +4545,13 @@ function rh(t) {
|
|
|
4540
4545
|
InitialPath: t.InitialPath
|
|
4541
4546
|
};
|
|
4542
4547
|
}
|
|
4543
|
-
async function
|
|
4548
|
+
async function ih(t, e) {
|
|
4544
4549
|
const n = `https://${t.host}:${t.httpsPort}`;
|
|
4545
4550
|
Y.debug(`Authenticating with local server: ${n}`);
|
|
4546
4551
|
const s = { ...Ke(), ...t.parameters }, i = t.deviceId ?? $e();
|
|
4547
4552
|
let o = t.userId, a = t.token;
|
|
4548
4553
|
if (!o) {
|
|
4549
|
-
const S = await
|
|
4554
|
+
const S = await eh(t.spaceId, i, jd(t.authUrl), e);
|
|
4550
4555
|
S && (o = S.userId, a = S.token);
|
|
4551
4556
|
}
|
|
4552
4557
|
if (o || (o = i, Y.debug("Using deviceId as userId fallback")), t.spaceId && a)
|
|
@@ -4561,8 +4566,8 @@ async function sh(t, e) {
|
|
|
4561
4566
|
throw new R(`Failed to get or create profile: ${T.status} ${E}`);
|
|
4562
4567
|
}
|
|
4563
4568
|
} else
|
|
4564
|
-
await
|
|
4565
|
-
const c =
|
|
4569
|
+
await th(zt(t.backendUrl), t.spaceId, a, e);
|
|
4570
|
+
const c = rh({ ...t, parameters: s }, o), l = sh(c), p = await fetch(`${n}/connect-token`, {
|
|
4566
4571
|
method: "POST",
|
|
4567
4572
|
headers: {
|
|
4568
4573
|
"Content-Type": "application/json"
|
|
@@ -4580,7 +4585,7 @@ async function sh(t, e) {
|
|
|
4580
4585
|
const m = `${n}/connect?token=${encodeURIComponent(d)}`;
|
|
4581
4586
|
return xe(m, e);
|
|
4582
4587
|
}
|
|
4583
|
-
async function
|
|
4588
|
+
async function oh(t, e, n = "auto", r = !1) {
|
|
4584
4589
|
if (t.sessionId && t.channelKey)
|
|
4585
4590
|
throw new R("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
|
|
4586
4591
|
const s = Es(t.backendType);
|
|
@@ -4659,7 +4664,7 @@ async function ih(t, e, n = "auto", r = !1) {
|
|
|
4659
4664
|
}
|
|
4660
4665
|
throw new R("Failed to provision after all attempts");
|
|
4661
4666
|
}
|
|
4662
|
-
async function
|
|
4667
|
+
async function ah(t, e, n = "auto", r = !1) {
|
|
4663
4668
|
if (t.sessionId && t.channelKey)
|
|
4664
4669
|
throw new R("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
|
|
4665
4670
|
const s = Es(t.backendType), i = t.token;
|
|
@@ -4719,7 +4724,7 @@ async function oh(t, e, n = "auto", r = !1) {
|
|
|
4719
4724
|
}
|
|
4720
4725
|
throw new R("Failed to provision after all attempts");
|
|
4721
4726
|
}
|
|
4722
|
-
const
|
|
4727
|
+
const ch = "ikon-proxy", lh = "ikon-websocket", uh = "ikon-webtransport", Ss = "ikon-debug", dh = "ikon-lang", hh = "ikon-server-url", sp = "ikon-git-source", ip = "ikon-git-branch", fh = "ikon-audio", ph = "ikon-video", mh = "ikon-webrtc";
|
|
4723
4728
|
function Ot(t, e) {
|
|
4724
4729
|
if (typeof window > "u")
|
|
4725
4730
|
return null;
|
|
@@ -4733,15 +4738,12 @@ function te(t, e) {
|
|
|
4733
4738
|
const n = Ot(t);
|
|
4734
4739
|
return n === "true" ? !0 : n === "false" ? !1 : null;
|
|
4735
4740
|
}
|
|
4736
|
-
function
|
|
4741
|
+
function Eh(t, e) {
|
|
4737
4742
|
if (typeof window > "u")
|
|
4738
4743
|
return;
|
|
4739
4744
|
const n = new URL(window.location.href);
|
|
4740
4745
|
n.searchParams.get(t) !== e && (n.searchParams.set(t, e), window.history.replaceState(null, "", n.toString()));
|
|
4741
4746
|
}
|
|
4742
|
-
function Eh() {
|
|
4743
|
-
return te(ah);
|
|
4744
|
-
}
|
|
4745
4747
|
function Ih() {
|
|
4746
4748
|
return te(ch);
|
|
4747
4749
|
}
|
|
@@ -4749,16 +4751,16 @@ function _h() {
|
|
|
4749
4751
|
return te(lh);
|
|
4750
4752
|
}
|
|
4751
4753
|
function Th() {
|
|
4752
|
-
return te(
|
|
4753
|
-
}
|
|
4754
|
-
function ip() {
|
|
4755
|
-
return Ot(uh);
|
|
4754
|
+
return te(uh);
|
|
4756
4755
|
}
|
|
4757
4756
|
function wh() {
|
|
4757
|
+
return te(Ss) === !0;
|
|
4758
|
+
}
|
|
4759
|
+
function op() {
|
|
4758
4760
|
return Ot(dh);
|
|
4759
4761
|
}
|
|
4760
4762
|
function Sh() {
|
|
4761
|
-
return
|
|
4763
|
+
return Ot(hh);
|
|
4762
4764
|
}
|
|
4763
4765
|
function gh() {
|
|
4764
4766
|
return te(fh);
|
|
@@ -4766,7 +4768,10 @@ function gh() {
|
|
|
4766
4768
|
function Ch() {
|
|
4767
4769
|
return te(ph);
|
|
4768
4770
|
}
|
|
4769
|
-
|
|
4771
|
+
function Ah() {
|
|
4772
|
+
return te(mh);
|
|
4773
|
+
}
|
|
4774
|
+
const yh = new Uint8Array(0);
|
|
4770
4775
|
function We(t) {
|
|
4771
4776
|
switch (t.kind) {
|
|
4772
4777
|
case "array":
|
|
@@ -4826,7 +4831,7 @@ function gs(t, e) {
|
|
|
4826
4831
|
}
|
|
4827
4832
|
return JSON.stringify(t);
|
|
4828
4833
|
}
|
|
4829
|
-
function
|
|
4834
|
+
function bh(t, e) {
|
|
4830
4835
|
const n = (t.parameters ?? []).map((i) => {
|
|
4831
4836
|
const o = We(i.type), a = Object.prototype.hasOwnProperty.call(i, "defaultValue"), c = a ? gs(i.defaultValue, o) : "";
|
|
4832
4837
|
return {
|
|
@@ -4854,7 +4859,7 @@ function yh(t, e) {
|
|
|
4854
4859
|
TypeName: Ae(i.descriptor),
|
|
4855
4860
|
HasDefaultValue: i.hasDefaultValue,
|
|
4856
4861
|
DefaultValueJson: i.defaultValueJson,
|
|
4857
|
-
DefaultValueData:
|
|
4862
|
+
DefaultValueData: yh,
|
|
4858
4863
|
IsEnumerable: !1,
|
|
4859
4864
|
EnumerableItemTypeName: "",
|
|
4860
4865
|
Description: i.description ?? ""
|
|
@@ -4868,19 +4873,19 @@ function yh(t, e) {
|
|
|
4868
4873
|
returnType: r
|
|
4869
4874
|
};
|
|
4870
4875
|
}
|
|
4871
|
-
function
|
|
4876
|
+
function Rh(t, e) {
|
|
4872
4877
|
return { value: t, data: e };
|
|
4873
4878
|
}
|
|
4874
|
-
class
|
|
4879
|
+
class Nh extends Error {
|
|
4875
4880
|
constructor(e, n, r) {
|
|
4876
4881
|
super(e), this.remoteErrorType = n, this.remoteStackTrace = r, this.name = "FunctionCallError";
|
|
4877
4882
|
}
|
|
4878
4883
|
}
|
|
4879
4884
|
const Ee = P("FunctionRegistry"), Jt = new Uint8Array(0), Qt = 3e4;
|
|
4880
|
-
function
|
|
4885
|
+
function kh(t) {
|
|
4881
4886
|
return !t || typeof t != "object" ? !1 : t.data instanceof Uint8Array;
|
|
4882
4887
|
}
|
|
4883
|
-
class
|
|
4888
|
+
class Dh {
|
|
4884
4889
|
functions = /* @__PURE__ */ new Map();
|
|
4885
4890
|
remoteFunctions = /* @__PURE__ */ new Map();
|
|
4886
4891
|
pendingCalls = /* @__PURE__ */ new Map();
|
|
@@ -4907,7 +4912,7 @@ class kh {
|
|
|
4907
4912
|
* If already connected, sends registration to server immediately.
|
|
4908
4913
|
*/
|
|
4909
4914
|
register(e, n) {
|
|
4910
|
-
const r =
|
|
4915
|
+
const r = bh(e, n);
|
|
4911
4916
|
return this.functions.set(e.name, r), this.isConnected && this.config && this.sendRegistration(r), () => this.unregister(e.name);
|
|
4912
4917
|
}
|
|
4913
4918
|
/**
|
|
@@ -4987,7 +4992,7 @@ class kh {
|
|
|
4987
4992
|
Parameters: a,
|
|
4988
4993
|
Scopes: [],
|
|
4989
4994
|
Version: ""
|
|
4990
|
-
}), p =
|
|
4995
|
+
}), p = Qo(l, this.config.sessionId, {
|
|
4991
4996
|
targetIds: [s.clientSessionId]
|
|
4992
4997
|
});
|
|
4993
4998
|
return new Promise((h, d) => {
|
|
@@ -5007,10 +5012,10 @@ class kh {
|
|
|
5007
5012
|
disposeInstance(e, n) {
|
|
5008
5013
|
if (!this.isConnected || !this.config)
|
|
5009
5014
|
throw new Error("Not connected");
|
|
5010
|
-
const r =
|
|
5015
|
+
const r = la({
|
|
5011
5016
|
CallId: w.createZero(),
|
|
5012
5017
|
InstanceId: w.fromString(e)
|
|
5013
|
-
}), s =
|
|
5018
|
+
}), s = fa(r, this.config.sessionId, {
|
|
5014
5019
|
targetIds: [n]
|
|
5015
5020
|
});
|
|
5016
5021
|
this.config.sendProtocolMessage(s);
|
|
@@ -5068,7 +5073,7 @@ class kh {
|
|
|
5068
5073
|
return n === g.ACTION_FUNCTION_RESULT ? (this.handleFunctionResult(e), !0) : n === g.ACTION_FUNCTION_ERROR ? (this.handleFunctionError(e), !0) : !1;
|
|
5069
5074
|
}
|
|
5070
5075
|
handleFunctionResult(e) {
|
|
5071
|
-
const n =
|
|
5076
|
+
const n = ja(e), r = n.CallId.toString(), s = this.pendingCalls.get(r);
|
|
5072
5077
|
if (!s) {
|
|
5073
5078
|
Ee.warn(`Received result for unknown call: ${r}`);
|
|
5074
5079
|
return;
|
|
@@ -5081,12 +5086,12 @@ class kh {
|
|
|
5081
5086
|
s.resolve(i);
|
|
5082
5087
|
}
|
|
5083
5088
|
handleFunctionError(e) {
|
|
5084
|
-
const n =
|
|
5089
|
+
const n = wa(e), r = n.CallId.toString(), s = this.pendingCalls.get(r);
|
|
5085
5090
|
if (!s) {
|
|
5086
5091
|
Ee.warn(`Received error for unknown call: ${r}`);
|
|
5087
5092
|
return;
|
|
5088
5093
|
}
|
|
5089
|
-
this.pendingCalls.delete(r), clearTimeout(s.timeout), s.reject(new
|
|
5094
|
+
this.pendingCalls.delete(r), clearTimeout(s.timeout), s.reject(new Nh(n.ErrorMessage, n.ErrorTypeName, n.StackTrace));
|
|
5090
5095
|
}
|
|
5091
5096
|
inferTypeName(e) {
|
|
5092
5097
|
if (e == null)
|
|
@@ -5111,7 +5116,7 @@ class kh {
|
|
|
5111
5116
|
sendAllRegistrations() {
|
|
5112
5117
|
if (!this.config || this.functions.size === 0)
|
|
5113
5118
|
return;
|
|
5114
|
-
const e = Array.from(this.functions.values()).map((s) => s.registerPayload), n =
|
|
5119
|
+
const e = Array.from(this.functions.values()).map((s) => s.registerPayload), n = La({ Functions: e }), r = Wa(n, this.config.sessionId);
|
|
5115
5120
|
this.config.sendProtocolMessage(r);
|
|
5116
5121
|
}
|
|
5117
5122
|
/**
|
|
@@ -5120,14 +5125,14 @@ class kh {
|
|
|
5120
5125
|
sendRegistration(e) {
|
|
5121
5126
|
if (!this.config)
|
|
5122
5127
|
return;
|
|
5123
|
-
const n =
|
|
5128
|
+
const n = ba(e.registerPayload, this.config.sessionId);
|
|
5124
5129
|
this.config.sendProtocolMessage(n);
|
|
5125
5130
|
}
|
|
5126
5131
|
/**
|
|
5127
5132
|
* Handle an incoming function call.
|
|
5128
5133
|
*/
|
|
5129
5134
|
async handleFunctionCall(e, n) {
|
|
5130
|
-
const r = await
|
|
5135
|
+
const r = await Zo(e), s = this.functions.get(r.FunctionName);
|
|
5131
5136
|
if (!s) {
|
|
5132
5137
|
Ee.warn(`Received call for unknown function: ${r.FunctionName}`), this.sendError(r.CallId, r.InstanceId, n, new Error(`Unknown function: ${r.FunctionName}`));
|
|
5133
5138
|
return;
|
|
@@ -5151,7 +5156,7 @@ class kh {
|
|
|
5151
5156
|
}
|
|
5152
5157
|
const i = await e.handler(...s);
|
|
5153
5158
|
let o = i, a = Jt;
|
|
5154
|
-
|
|
5159
|
+
kh(i) && (o = i.value, a = new Uint8Array(i.data));
|
|
5155
5160
|
const c = gs(o, e.returnType);
|
|
5156
5161
|
this.sendResult(n.CallId, n.InstanceId, r, e, c, a);
|
|
5157
5162
|
} catch (s) {
|
|
@@ -5164,7 +5169,7 @@ class kh {
|
|
|
5164
5169
|
sendAck(e, n, r) {
|
|
5165
5170
|
if (!this.config)
|
|
5166
5171
|
return;
|
|
5167
|
-
const s =
|
|
5172
|
+
const s = Ko(Go({ CallId: e, InstanceId: n }), this.config.sessionId, { targetIds: [r] });
|
|
5168
5173
|
this.config.sendProtocolMessage(s);
|
|
5169
5174
|
}
|
|
5170
5175
|
/**
|
|
@@ -5173,7 +5178,7 @@ class kh {
|
|
|
5173
5178
|
sendResult(e, n, r, s, i, o) {
|
|
5174
5179
|
if (!this.config)
|
|
5175
5180
|
return;
|
|
5176
|
-
const a =
|
|
5181
|
+
const a = Ya(
|
|
5177
5182
|
Or({
|
|
5178
5183
|
CallId: e,
|
|
5179
5184
|
InstanceId: n,
|
|
@@ -5192,7 +5197,7 @@ class kh {
|
|
|
5192
5197
|
sendError(e, n, r, s) {
|
|
5193
5198
|
if (!this.config)
|
|
5194
5199
|
return;
|
|
5195
|
-
const i =
|
|
5200
|
+
const i = Ta(
|
|
5196
5201
|
qn({
|
|
5197
5202
|
CallId: e,
|
|
5198
5203
|
InstanceId: n,
|
|
@@ -5220,7 +5225,7 @@ const ye = {
|
|
|
5220
5225
|
StopCapture: "ikon.client.stopCapture",
|
|
5221
5226
|
CaptureImage: "ikon.client.captureImage",
|
|
5222
5227
|
GetMediaDevices: "ikon.client.getMediaDevices"
|
|
5223
|
-
},
|
|
5228
|
+
}, vh = {
|
|
5224
5229
|
name: ye.StartVideoCapture,
|
|
5225
5230
|
description: "Start camera or screen capture and stream video frames to the server",
|
|
5226
5231
|
returnType: { kind: "string" },
|
|
@@ -5228,31 +5233,31 @@ const ye = {
|
|
|
5228
5233
|
{ name: "source", type: { kind: "string", nullable: !0 }, description: "camera or screen" },
|
|
5229
5234
|
{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }
|
|
5230
5235
|
]
|
|
5231
|
-
},
|
|
5236
|
+
}, Uh = {
|
|
5232
5237
|
name: ye.StartAudioCapture,
|
|
5233
5238
|
description: "Start microphone capture and stream audio frames to the server",
|
|
5234
5239
|
returnType: { kind: "string" },
|
|
5235
5240
|
parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
|
|
5236
|
-
},
|
|
5241
|
+
}, Oh = {
|
|
5237
5242
|
name: ye.StopCapture,
|
|
5238
5243
|
description: "Stop a previously started capture by streamId",
|
|
5239
5244
|
returnType: { kind: "boolean" },
|
|
5240
5245
|
parameters: [{ name: "streamId", type: { kind: "string" }, description: "Stream ID to stop" }]
|
|
5241
|
-
},
|
|
5246
|
+
}, Mh = {
|
|
5242
5247
|
name: ye.CaptureImage,
|
|
5243
5248
|
description: "Capture a single image from the camera and return metadata (JSON) plus binary image data",
|
|
5244
5249
|
returnType: { kind: "string" },
|
|
5245
5250
|
parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
|
|
5246
|
-
},
|
|
5251
|
+
}, Ph = {
|
|
5247
5252
|
name: ye.GetMediaDevices,
|
|
5248
5253
|
description: "Get list of available media input devices",
|
|
5249
5254
|
returnType: { kind: "string" },
|
|
5250
5255
|
parameters: []
|
|
5251
5256
|
};
|
|
5252
|
-
function
|
|
5257
|
+
function Lh(t, e) {
|
|
5253
5258
|
const n = [];
|
|
5254
5259
|
return n.push(
|
|
5255
|
-
t.register(
|
|
5260
|
+
t.register(vh, async (r, s) => {
|
|
5256
5261
|
if (e.isWebRtcEnabled) {
|
|
5257
5262
|
const l = e.webRtcSignaling;
|
|
5258
5263
|
if (!l)
|
|
@@ -5267,7 +5272,7 @@ function Ph(t, e) {
|
|
|
5267
5272
|
return ((typeof r == "string" && r.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 })).streamId;
|
|
5268
5273
|
})
|
|
5269
5274
|
), n.push(
|
|
5270
|
-
t.register(
|
|
5275
|
+
t.register(Uh, async (r) => {
|
|
5271
5276
|
if (e.isWebRtcEnabled) {
|
|
5272
5277
|
const a = e.webRtcSignaling;
|
|
5273
5278
|
if (!a)
|
|
@@ -5282,7 +5287,7 @@ function Ph(t, e) {
|
|
|
5282
5287
|
return (await s.audio.startMic({ userGesture: !1, options: i, constraints: i?.constraints })).streamId;
|
|
5283
5288
|
})
|
|
5284
5289
|
), n.push(
|
|
5285
|
-
t.register(
|
|
5290
|
+
t.register(Oh, async (r) => {
|
|
5286
5291
|
if (e.isWebRtcEnabled) {
|
|
5287
5292
|
const a = e.webRtcSignaling;
|
|
5288
5293
|
return a && await a.stopCapture(), !0;
|
|
@@ -5294,7 +5299,7 @@ function Ph(t, e) {
|
|
|
5294
5299
|
return i || o;
|
|
5295
5300
|
})
|
|
5296
5301
|
), n.push(
|
|
5297
|
-
t.register(
|
|
5302
|
+
t.register(Mh, async (r) => {
|
|
5298
5303
|
const s = e.mediaCapture;
|
|
5299
5304
|
if (!s)
|
|
5300
5305
|
throw new Error("Media capture is not available in this environment");
|
|
@@ -5306,10 +5311,10 @@ function Ph(t, e) {
|
|
|
5306
5311
|
width: i.width,
|
|
5307
5312
|
height: i.height
|
|
5308
5313
|
}), a = JSON.stringify({ mime: o.mime, width: o.width, height: o.height });
|
|
5309
|
-
return
|
|
5314
|
+
return Rh(a, o.data);
|
|
5310
5315
|
})
|
|
5311
5316
|
), n.push(
|
|
5312
|
-
t.register(
|
|
5317
|
+
t.register(Ph, async () => {
|
|
5313
5318
|
if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices)
|
|
5314
5319
|
return JSON.stringify([]);
|
|
5315
5320
|
const s = (await navigator.mediaDevices.enumerateDevices()).filter((i) => i.kind === "audioinput" || i.kind === "videoinput").map((i) => ({
|
|
@@ -5329,8 +5334,8 @@ const Cs = {
|
|
|
5329
5334
|
PlaySound: "ikon.client.playSound",
|
|
5330
5335
|
StopSound: "ikon.client.stopSound"
|
|
5331
5336
|
}, lt = /* @__PURE__ */ new Map(), ae = /* @__PURE__ */ new Map();
|
|
5332
|
-
let
|
|
5333
|
-
const
|
|
5337
|
+
let Fh = 1;
|
|
5338
|
+
const Bh = {
|
|
5334
5339
|
name: Cs.PlaySound,
|
|
5335
5340
|
description: "Play a sound effect",
|
|
5336
5341
|
returnType: { kind: "string", nullable: !0 },
|
|
@@ -5341,7 +5346,7 @@ const Fh = {
|
|
|
5341
5346
|
{ name: "loop", type: { kind: "boolean", nullable: !0 }, description: "Loop the sound" }
|
|
5342
5347
|
]
|
|
5343
5348
|
};
|
|
5344
|
-
function
|
|
5349
|
+
function xh(t, e, n, r) {
|
|
5345
5350
|
if (typeof window > "u" || typeof Audio > "u" || typeof t != "string" || !t.trim())
|
|
5346
5351
|
return Promise.resolve(null);
|
|
5347
5352
|
let s = t;
|
|
@@ -5355,7 +5360,7 @@ function Bh(t, e, n, r) {
|
|
|
5355
5360
|
try {
|
|
5356
5361
|
const o = new Audio(s), a = typeof n == "number" ? Math.max(0, Math.min(1, n)) : 1;
|
|
5357
5362
|
o.volume = a, r === !0 && (o.loop = !0);
|
|
5358
|
-
const c = `sound-${
|
|
5363
|
+
const c = `sound-${Fh++}`, l = () => {
|
|
5359
5364
|
ae.delete(c), o.removeEventListener("ended", l), o.removeEventListener("error", l);
|
|
5360
5365
|
};
|
|
5361
5366
|
o.addEventListener("ended", l), o.addEventListener("error", l), ae.set(c, o), o.play().then(
|
|
@@ -5369,13 +5374,13 @@ function Bh(t, e, n, r) {
|
|
|
5369
5374
|
}
|
|
5370
5375
|
});
|
|
5371
5376
|
}
|
|
5372
|
-
const
|
|
5377
|
+
const Wh = {
|
|
5373
5378
|
name: Cs.StopSound,
|
|
5374
5379
|
description: "Stop a playing sound by ID",
|
|
5375
5380
|
returnType: { kind: "boolean" },
|
|
5376
5381
|
parameters: [{ name: "playbackId", type: { kind: "string" }, description: "Playback ID from playSound" }]
|
|
5377
5382
|
};
|
|
5378
|
-
function
|
|
5383
|
+
function Gh(t) {
|
|
5379
5384
|
if (typeof t != "string")
|
|
5380
5385
|
return !1;
|
|
5381
5386
|
const e = ae.get(t);
|
|
@@ -5387,7 +5392,7 @@ function Wh(t) {
|
|
|
5387
5392
|
return !1;
|
|
5388
5393
|
}
|
|
5389
5394
|
}
|
|
5390
|
-
function
|
|
5395
|
+
function Vh() {
|
|
5391
5396
|
lt.clear();
|
|
5392
5397
|
for (const [t, e] of ae) {
|
|
5393
5398
|
try {
|
|
@@ -5397,14 +5402,14 @@ function Gh() {
|
|
|
5397
5402
|
ae.delete(t);
|
|
5398
5403
|
}
|
|
5399
5404
|
}
|
|
5400
|
-
const
|
|
5401
|
-
{ definition:
|
|
5402
|
-
{ definition:
|
|
5405
|
+
const Hh = [
|
|
5406
|
+
{ definition: Bh, handler: xh },
|
|
5407
|
+
{ definition: Wh, handler: Gh }
|
|
5403
5408
|
];
|
|
5404
|
-
function
|
|
5405
|
-
const e =
|
|
5409
|
+
function $h(t) {
|
|
5410
|
+
const e = Hh.map(({ definition: n, handler: r }) => t.register(n, r));
|
|
5406
5411
|
return () => {
|
|
5407
|
-
e.forEach((n) => n()),
|
|
5412
|
+
e.forEach((n) => n()), Vh();
|
|
5408
5413
|
};
|
|
5409
5414
|
}
|
|
5410
5415
|
const As = () => {
|
|
@@ -5412,13 +5417,13 @@ const As = () => {
|
|
|
5412
5417
|
return !1;
|
|
5413
5418
|
const t = navigator.userAgent, e = /iPad|iPhone|iPod/.test(t), n = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
|
|
5414
5419
|
return e || n;
|
|
5415
|
-
}, ke = P("Capabilities"),
|
|
5420
|
+
}, ke = P("Capabilities"), Kh = globalThis;
|
|
5416
5421
|
function Me() {
|
|
5417
5422
|
if (typeof SharedArrayBuffer > "u")
|
|
5418
5423
|
return ke.debug("SharedArrayBuffer not supported: SharedArrayBuffer is undefined"), !1;
|
|
5419
5424
|
if (typeof Atomics > "u")
|
|
5420
5425
|
return ke.debug("SharedArrayBuffer not supported: Atomics is undefined"), !1;
|
|
5421
|
-
if (
|
|
5426
|
+
if (Kh.crossOriginIsolated === !1)
|
|
5422
5427
|
return ke.debug("SharedArrayBuffer not supported: crossOriginIsolated is false (missing COOP/COEP headers)"), !1;
|
|
5423
5428
|
try {
|
|
5424
5429
|
new SharedArrayBuffer(1);
|
|
@@ -5430,7 +5435,7 @@ function Me() {
|
|
|
5430
5435
|
function ys(t) {
|
|
5431
5436
|
return typeof AudioWorkletNode != "function" ? !1 : typeof t.audioWorklet?.addModule == "function";
|
|
5432
5437
|
}
|
|
5433
|
-
function
|
|
5438
|
+
function Yh() {
|
|
5434
5439
|
const r = new ArrayBuffer(882044), s = new DataView(r), i = (a, c) => {
|
|
5435
5440
|
for (let l = 0; l < c.length; l++)
|
|
5436
5441
|
s.setUint8(a + l, c.charCodeAt(l));
|
|
@@ -5445,7 +5450,7 @@ class bs {
|
|
|
5445
5450
|
return this._silentAudioElement;
|
|
5446
5451
|
}
|
|
5447
5452
|
setup(e, n) {
|
|
5448
|
-
if (!(typeof document > "u") && (this._silentAudioElement || (this._silentAudioElement = document.createElement("audio"), this._silentAudioElement.src =
|
|
5453
|
+
if (!(typeof document > "u") && (this._silentAudioElement || (this._silentAudioElement = document.createElement("audio"), this._silentAudioElement.src = Yh(), this._silentAudioElement.loop = !0, this._silentAudioElement.volume = 0.01, this._silentAudioElement.play().catch(() => {
|
|
5449
5454
|
})), typeof navigator < "u" && "mediaSession" in navigator)) {
|
|
5450
5455
|
const r = e ?? {};
|
|
5451
5456
|
navigator.mediaSession.metadata = new MediaMetadata({
|
|
@@ -5483,7 +5488,7 @@ class bs {
|
|
|
5483
5488
|
}
|
|
5484
5489
|
}
|
|
5485
5490
|
}
|
|
5486
|
-
function
|
|
5491
|
+
function jh(t) {
|
|
5487
5492
|
return new Worker(
|
|
5488
5493
|
"" + new URL("assets/audio-playback-worker-Box5TifN.js", import.meta.url).href,
|
|
5489
5494
|
{
|
|
@@ -5492,7 +5497,7 @@ function Yh(t) {
|
|
|
5492
5497
|
}
|
|
5493
5498
|
);
|
|
5494
5499
|
}
|
|
5495
|
-
const De = 48e3, x = 2, Rs = 1500, Zt = 512, qt = "playback",
|
|
5500
|
+
const De = 48e3, x = 2, Rs = 1500, Zt = 512, qt = "playback", zh = 120, Xh = 300, Jh = 4, Qh = 200, Zh = 100, qh = 8e3, ef = 10, Ns = 100, ut = 50, ks = 128, tf = 20, nf = !0, J = 1500, rf = -20, sf = -100, of = 200, D = P("IkonAudioPlayback"), af = () => {
|
|
5496
5501
|
if (typeof navigator > "u" || typeof window > "u")
|
|
5497
5502
|
return !1;
|
|
5498
5503
|
const t = navigator.userAgent, e = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t), n = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
|
|
@@ -5504,19 +5509,19 @@ const De = 48e3, x = 2, Rs = 1500, Zt = 512, qt = "playback", jh = 120, zh = 300
|
|
|
5504
5509
|
function Q(t) {
|
|
5505
5510
|
return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
|
|
5506
5511
|
}
|
|
5507
|
-
function
|
|
5512
|
+
function cf(t) {
|
|
5508
5513
|
return `
|
|
5509
5514
|
// Audio buffer constants
|
|
5510
5515
|
const OUTPUT_SAMPLE_RATE_HZ = ${t.outputSampleRateHz};
|
|
5511
5516
|
const DEFAULT_FRAME_SAMPLES_PER_CHANNEL = Math.max(1, Math.round(OUTPUT_SAMPLE_RATE_HZ * 0.02));
|
|
5512
|
-
const BUFFER_TARGET_MIN_MS = ${
|
|
5513
|
-
const BUFFER_TARGET_MAX_MS = ${
|
|
5514
|
-
const JITTER_MULTIPLIER = ${
|
|
5517
|
+
const BUFFER_TARGET_MIN_MS = ${zh};
|
|
5518
|
+
const BUFFER_TARGET_MAX_MS = ${Xh};
|
|
5519
|
+
const JITTER_MULTIPLIER = ${Jh};
|
|
5515
5520
|
const LOCAL_BUFFER_MAX_MS = ${Rs};
|
|
5516
|
-
const CONTROL_PERIOD_MS = ${
|
|
5517
|
-
const UNDERRUN_JUMP_MS = ${
|
|
5518
|
-
const STABLE_TIME_TO_DECREASE_MS = ${
|
|
5519
|
-
const DECREASE_STEP_MS = ${
|
|
5521
|
+
const CONTROL_PERIOD_MS = ${Qh};
|
|
5522
|
+
const UNDERRUN_JUMP_MS = ${Zh};
|
|
5523
|
+
const STABLE_TIME_TO_DECREASE_MS = ${qh};
|
|
5524
|
+
const DECREASE_STEP_MS = ${ef};
|
|
5520
5525
|
const DEFAULT_STATS_INTERVAL_SAMPLES = OUTPUT_SAMPLE_RATE_HZ;
|
|
5521
5526
|
|
|
5522
5527
|
// Pre-computed reciprocals for division-free calculations
|
|
@@ -5535,7 +5540,7 @@ const FADE_OUT_INCREMENT = 1.0 / FADE_OUT_DURATION_SAMPLES;
|
|
|
5535
5540
|
const RENDER_QUANTUM_SIZE = ${ks};
|
|
5536
5541
|
|
|
5537
5542
|
// Buffer reduction crossfade constants (align to quantum boundary to avoid partial quanta)
|
|
5538
|
-
const BUFFER_REDUCTION_CROSSFADE_MS = ${
|
|
5543
|
+
const BUFFER_REDUCTION_CROSSFADE_MS = ${tf};
|
|
5539
5544
|
const BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW = Math.round(OUTPUT_SAMPLE_RATE_HZ * BUFFER_REDUCTION_CROSSFADE_MS / 1000);
|
|
5540
5545
|
const BUFFER_REDUCTION_CROSSFADE_SAMPLES = Math.ceil(BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW / RENDER_QUANTUM_SIZE) * RENDER_QUANTUM_SIZE;
|
|
5541
5546
|
|
|
@@ -5746,7 +5751,7 @@ class IkonAudioPlayerProcessor extends AudioWorkletProcessor {
|
|
|
5746
5751
|
this.statsIntervalSamples = Math.max(1, Math.round((OUTPUT_SAMPLE_RATE_HZ * statusIntervalMs) / 1000));
|
|
5747
5752
|
|
|
5748
5753
|
// Normalization config (hardcoded)
|
|
5749
|
-
this.normalizationEnabled = ${
|
|
5754
|
+
this.normalizationEnabled = ${nf};
|
|
5750
5755
|
|
|
5751
5756
|
// Stream states for audio buffer
|
|
5752
5757
|
this.streams = new Map();
|
|
@@ -6476,7 +6481,7 @@ class Mt {
|
|
|
6476
6481
|
config;
|
|
6477
6482
|
enabled = !1;
|
|
6478
6483
|
stateUnsubscribe = null;
|
|
6479
|
-
isMobile =
|
|
6484
|
+
isMobile = af();
|
|
6480
6485
|
boundVisibilityChange = null;
|
|
6481
6486
|
boundPageHide = null;
|
|
6482
6487
|
unlockHandler = null;
|
|
@@ -6880,7 +6885,7 @@ class Mt {
|
|
|
6880
6885
|
URL.revokeObjectURL(this.workletModuleUrl);
|
|
6881
6886
|
} catch {
|
|
6882
6887
|
}
|
|
6883
|
-
this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([
|
|
6888
|
+
this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([cf({ outputSampleRateHz: this.outputSampleRateHz, outputChannels: x })], { type: "text/javascript" }));
|
|
6884
6889
|
}
|
|
6885
6890
|
this.workletReady || (this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl).catch((p) => {
|
|
6886
6891
|
throw D.warn(`Failed to load AudioWorklet module, falling back: ${Q(p)}`), p;
|
|
@@ -7131,7 +7136,7 @@ class Mt {
|
|
|
7131
7136
|
}
|
|
7132
7137
|
this.protocolPort = e;
|
|
7133
7138
|
try {
|
|
7134
|
-
this.audioWorker = new
|
|
7139
|
+
this.audioWorker = new jh();
|
|
7135
7140
|
} catch (h) {
|
|
7136
7141
|
D.warn(`Failed to create audio worker: ${Q(h)}`), this.protocolPort.close(), this.protocolPort = null;
|
|
7137
7142
|
return;
|
|
@@ -7215,7 +7220,7 @@ class Mt {
|
|
|
7215
7220
|
s.epochTimestampSamples = e.timestampInterleavedSamples;
|
|
7216
7221
|
const c = this.audioContext;
|
|
7217
7222
|
if (c) {
|
|
7218
|
-
const l = (c.outputLatency ?? 0) + (c.baseLatency ?? 0), p =
|
|
7223
|
+
const l = (c.outputLatency ?? 0) + (c.baseLatency ?? 0), p = rf + l * 1e3, h = Math.min(of, Math.max(sf, p));
|
|
7219
7224
|
s.playbackStartContextTime = c.currentTime + h / 1e3;
|
|
7220
7225
|
}
|
|
7221
7226
|
s.timingEstablished = !0;
|
|
@@ -7338,7 +7343,7 @@ class Mt {
|
|
|
7338
7343
|
}));
|
|
7339
7344
|
}
|
|
7340
7345
|
}
|
|
7341
|
-
function
|
|
7346
|
+
function lf(t) {
|
|
7342
7347
|
return new Worker(
|
|
7343
7348
|
"" + new URL("assets/video-playback-worker-CpHuZKgE.js", import.meta.url).href,
|
|
7344
7349
|
{
|
|
@@ -7351,7 +7356,7 @@ const z = P("IkonVideoPlayback");
|
|
|
7351
7356
|
function Xe(t) {
|
|
7352
7357
|
return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
|
|
7353
7358
|
}
|
|
7354
|
-
class
|
|
7359
|
+
class uf {
|
|
7355
7360
|
client;
|
|
7356
7361
|
config;
|
|
7357
7362
|
enabled = !0;
|
|
@@ -7426,7 +7431,7 @@ class lf {
|
|
|
7426
7431
|
}
|
|
7427
7432
|
let e;
|
|
7428
7433
|
try {
|
|
7429
|
-
e = new
|
|
7434
|
+
e = new lf();
|
|
7430
7435
|
} catch (n) {
|
|
7431
7436
|
z.warn(`Failed to create video worker: ${Xe(n)}`);
|
|
7432
7437
|
return;
|
|
@@ -7512,7 +7517,7 @@ class lf {
|
|
|
7512
7517
|
}
|
|
7513
7518
|
}
|
|
7514
7519
|
requestIdrForStream(e, n) {
|
|
7515
|
-
const r =
|
|
7520
|
+
const r = Fl(Pl(), this.client.sessionId ?? 0, {
|
|
7516
7521
|
trackId: n,
|
|
7517
7522
|
targetIds: [e]
|
|
7518
7523
|
});
|
|
@@ -7565,11 +7570,11 @@ class lf {
|
|
|
7565
7570
|
}));
|
|
7566
7571
|
}
|
|
7567
7572
|
}
|
|
7568
|
-
class
|
|
7573
|
+
class df {
|
|
7569
7574
|
audio;
|
|
7570
7575
|
video;
|
|
7571
7576
|
constructor(e, n) {
|
|
7572
|
-
this.audio = new Mt(e, n?.audio), this.video = new
|
|
7577
|
+
this.audio = new Mt(e, n?.audio), this.video = new uf(e, n?.video), n?.mediaSession && this.audio.setMediaSession(n.mediaSession);
|
|
7573
7578
|
}
|
|
7574
7579
|
/**
|
|
7575
7580
|
* Releases media resources (workers, audio graph, decoders).
|
|
@@ -7580,7 +7585,7 @@ class uf {
|
|
|
7580
7585
|
this.audio.dispose(), this.video.dispose();
|
|
7581
7586
|
}
|
|
7582
7587
|
}
|
|
7583
|
-
class
|
|
7588
|
+
class hf {
|
|
7584
7589
|
static getStorageForCapacity(e, n) {
|
|
7585
7590
|
const r = Int32Array.BYTES_PER_ELEMENT * 2, s = n.BYTES_PER_ELEMENT * e;
|
|
7586
7591
|
return new SharedArrayBuffer(r + s);
|
|
@@ -7634,7 +7639,7 @@ class df {
|
|
|
7634
7639
|
return r = (r + n) % this.capacity, Atomics.store(this.readWrite, 0, r), n;
|
|
7635
7640
|
}
|
|
7636
7641
|
}
|
|
7637
|
-
function
|
|
7642
|
+
function ff(t) {
|
|
7638
7643
|
return new Worker(
|
|
7639
7644
|
"" + new URL("assets/audio-capture-worker-DuKZS6HJ.js", import.meta.url).href,
|
|
7640
7645
|
{
|
|
@@ -7643,11 +7648,11 @@ function hf(t) {
|
|
|
7643
7648
|
}
|
|
7644
7649
|
);
|
|
7645
7650
|
}
|
|
7646
|
-
const b = P("IkonAudioCapture"), ve = 3,
|
|
7647
|
-
function
|
|
7651
|
+
const b = P("IkonAudioCapture"), ve = 3, pf = 200, mf = 2e3, Ef = 5e3, tn = 3e3;
|
|
7652
|
+
function If(t) {
|
|
7648
7653
|
return new Promise((e) => setTimeout(e, t));
|
|
7649
7654
|
}
|
|
7650
|
-
function
|
|
7655
|
+
function _f(t) {
|
|
7651
7656
|
switch (t.name) {
|
|
7652
7657
|
// Transient errors - worth retrying
|
|
7653
7658
|
case "NotReadableError":
|
|
@@ -7672,11 +7677,11 @@ function If(t) {
|
|
|
7672
7677
|
return { action: "fail", reason: "unknown", canRetry: !1 };
|
|
7673
7678
|
}
|
|
7674
7679
|
}
|
|
7675
|
-
function
|
|
7680
|
+
function Tf() {
|
|
7676
7681
|
const t = globalThis.crypto;
|
|
7677
7682
|
return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
|
|
7678
7683
|
}
|
|
7679
|
-
function
|
|
7684
|
+
function wf() {
|
|
7680
7685
|
return `
|
|
7681
7686
|
class RingBuffer {
|
|
7682
7687
|
static getStorageForCapacity(capacity, type) {
|
|
@@ -7805,7 +7810,7 @@ class IkonAudioCaptureProcessor extends AudioWorkletProcessor {
|
|
|
7805
7810
|
registerProcessor('ikon-audio-capture', IkonAudioCaptureProcessor);
|
|
7806
7811
|
`;
|
|
7807
7812
|
}
|
|
7808
|
-
class
|
|
7813
|
+
class Sf {
|
|
7809
7814
|
constructor(e, n) {
|
|
7810
7815
|
this.client = e, this.config = n ?? {}, this.setupDeviceChangeListener();
|
|
7811
7816
|
}
|
|
@@ -7896,7 +7901,7 @@ class wf {
|
|
|
7896
7901
|
if (e.stopped)
|
|
7897
7902
|
return;
|
|
7898
7903
|
const i = Date.now(), o = n.name;
|
|
7899
|
-
if (e.lastErrorReason === r && e.lastErrorName === o && i - e.lastErrorTime <
|
|
7904
|
+
if (e.lastErrorReason === r && e.lastErrorName === o && i - e.lastErrorTime < Ef)
|
|
7900
7905
|
return;
|
|
7901
7906
|
e.lastErrorTime = i, e.lastErrorReason = r, e.lastErrorName = o;
|
|
7902
7907
|
const a = this.config.autoRestartPolicy;
|
|
@@ -8132,7 +8137,7 @@ class wf {
|
|
|
8132
8137
|
ensureWorker() {
|
|
8133
8138
|
if (this.worker)
|
|
8134
8139
|
return this.worker;
|
|
8135
|
-
const e = new
|
|
8140
|
+
const e = new ff();
|
|
8136
8141
|
return this.worker = e, e.addEventListener("message", (n) => {
|
|
8137
8142
|
const r = n.data;
|
|
8138
8143
|
if (r?.type === "error") {
|
|
@@ -8216,7 +8221,7 @@ class wf {
|
|
|
8216
8221
|
try {
|
|
8217
8222
|
return { stream: await navigator.mediaDevices.getUserMedia({ audio: e }), error: n, errorInfo: r };
|
|
8218
8223
|
} catch (i) {
|
|
8219
|
-
if (n = i instanceof Error ? i : new Error(String(i)), r =
|
|
8224
|
+
if (n = i instanceof Error ? i : new Error(String(i)), r = _f(n), b.debug(
|
|
8220
8225
|
`getUserMedia attempt ${s + 1}/${ve} failed: ${n.name} (action: ${r.action})`
|
|
8221
8226
|
), this.emitDiagnostic({
|
|
8222
8227
|
event: "retry",
|
|
@@ -8229,8 +8234,8 @@ class wf {
|
|
|
8229
8234
|
}), r.action !== "retry")
|
|
8230
8235
|
break;
|
|
8231
8236
|
if (s < ve - 1) {
|
|
8232
|
-
const o =
|
|
8233
|
-
b.debug(`Retrying getUserMedia in ${o}ms`), await
|
|
8237
|
+
const o = pf * (s + 1);
|
|
8238
|
+
b.debug(`Retrying getUserMedia in ${o}ms`), await If(o);
|
|
8234
8239
|
}
|
|
8235
8240
|
}
|
|
8236
8241
|
return { stream: null, error: n, errorInfo: r };
|
|
@@ -8242,7 +8247,7 @@ class wf {
|
|
|
8242
8247
|
async ensureWorklet(e) {
|
|
8243
8248
|
if (!ys(e))
|
|
8244
8249
|
throw new Error("AudioWorklet is not supported in this browser");
|
|
8245
|
-
if (this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([
|
|
8250
|
+
if (this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([wf()], { type: "text/javascript" }))), this.workletReady && this.workletContext === e)
|
|
8246
8251
|
try {
|
|
8247
8252
|
await this.workletReady;
|
|
8248
8253
|
return;
|
|
@@ -8264,7 +8269,7 @@ class wf {
|
|
|
8264
8269
|
throw new Error("Cannot start audio capture before client is connected");
|
|
8265
8270
|
if (this.client.isWebRtcEnabled)
|
|
8266
8271
|
return this.startMicWebRtc(e);
|
|
8267
|
-
const r =
|
|
8272
|
+
const r = Tf(), s = {
|
|
8268
8273
|
captureId: r,
|
|
8269
8274
|
aborted: !1,
|
|
8270
8275
|
stream: null,
|
|
@@ -8307,7 +8312,7 @@ class wf {
|
|
|
8307
8312
|
let E;
|
|
8308
8313
|
if (T === "sab") {
|
|
8309
8314
|
const A = Math.floor(o.sampleRate * 10);
|
|
8310
|
-
E =
|
|
8315
|
+
E = hf.getStorageForCapacity(A, Float32Array);
|
|
8311
8316
|
}
|
|
8312
8317
|
const f = "microphone", u = this.ensureWorker(), v = e.onStopped;
|
|
8313
8318
|
u.postMessage({
|
|
@@ -8442,7 +8447,7 @@ class wf {
|
|
|
8442
8447
|
};
|
|
8443
8448
|
this.setupAudioContextStateListener(o, _), this.setupVisibilityChangeListener(_), this.setupBFCacheHandlers(_), _.healthCheckTimer = setInterval(() => {
|
|
8444
8449
|
this.performHealthCheck(_);
|
|
8445
|
-
},
|
|
8450
|
+
}, mf);
|
|
8446
8451
|
const X = () => {
|
|
8447
8452
|
_.stopped || (b.warn(`Microphone track ended unexpectedly, captureId=${r.substring(0, 8)}`), this.handleRecoverableError(_, new Error("Microphone track ended unexpectedly"), "track-ended"));
|
|
8448
8453
|
};
|
|
@@ -8653,9 +8658,9 @@ class wf {
|
|
|
8653
8658
|
return !n || n.stopped ? !1 : this.attemptResumeAsync(n, "userGesture", !0);
|
|
8654
8659
|
}
|
|
8655
8660
|
}
|
|
8656
|
-
const Te = 1280, we = 720,
|
|
8657
|
-
async function
|
|
8658
|
-
const n = e.mime ?? Ds, r = e.quality ??
|
|
8661
|
+
const Te = 1280, we = 720, gf = 30, Ds = "image/jpeg", Cf = 0.92;
|
|
8662
|
+
async function Af(t, e) {
|
|
8663
|
+
const n = e.mime ?? Ds, r = e.quality ?? Cf;
|
|
8659
8664
|
if (typeof OffscreenCanvas < "u" && t instanceof OffscreenCanvas)
|
|
8660
8665
|
try {
|
|
8661
8666
|
return await t.convertToBlob({ type: n, quality: r });
|
|
@@ -8672,7 +8677,7 @@ async function Cf(t, e) {
|
|
|
8672
8677
|
);
|
|
8673
8678
|
});
|
|
8674
8679
|
}
|
|
8675
|
-
class
|
|
8680
|
+
class yf {
|
|
8676
8681
|
async acquireCameraStream(e) {
|
|
8677
8682
|
if (!navigator.mediaDevices)
|
|
8678
8683
|
throw new Error("Media devices are not available in this environment");
|
|
@@ -8714,7 +8719,7 @@ class Af {
|
|
|
8714
8719
|
if (!p)
|
|
8715
8720
|
throw new Error("2D canvas context unavailable");
|
|
8716
8721
|
p.drawImage(s, 0, 0, a, c);
|
|
8717
|
-
const h = await
|
|
8722
|
+
const h = await Af(l, e), d = await h.arrayBuffer();
|
|
8718
8723
|
return {
|
|
8719
8724
|
mime: h.type || e.mime || Ds,
|
|
8720
8725
|
width: a,
|
|
@@ -8741,7 +8746,7 @@ class Af {
|
|
|
8741
8746
|
}
|
|
8742
8747
|
}
|
|
8743
8748
|
}
|
|
8744
|
-
function
|
|
8749
|
+
function bf(t) {
|
|
8745
8750
|
return new Worker(
|
|
8746
8751
|
"" + new URL("assets/video-capture-worker-reG7QGzz.js", import.meta.url).href,
|
|
8747
8752
|
{
|
|
@@ -8751,17 +8756,17 @@ function yf(t) {
|
|
|
8751
8756
|
);
|
|
8752
8757
|
}
|
|
8753
8758
|
const _e = P("IkonVideoCapture");
|
|
8754
|
-
function
|
|
8759
|
+
function Rf() {
|
|
8755
8760
|
const t = globalThis.crypto;
|
|
8756
8761
|
return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
|
|
8757
8762
|
}
|
|
8758
|
-
function
|
|
8763
|
+
function Nf() {
|
|
8759
8764
|
const t = globalThis.MediaStreamTrackProcessor;
|
|
8760
8765
|
if (!t)
|
|
8761
8766
|
throw new Error("MediaStreamTrackProcessor is not available in this browser");
|
|
8762
8767
|
return t;
|
|
8763
8768
|
}
|
|
8764
|
-
class
|
|
8769
|
+
class kf {
|
|
8765
8770
|
constructor(e) {
|
|
8766
8771
|
this.client = e;
|
|
8767
8772
|
}
|
|
@@ -8777,7 +8782,7 @@ class Nf {
|
|
|
8777
8782
|
ensureWorker() {
|
|
8778
8783
|
if (this.worker)
|
|
8779
8784
|
return this.worker;
|
|
8780
|
-
const e = new
|
|
8785
|
+
const e = new bf();
|
|
8781
8786
|
return this.worker = e, e.addEventListener("message", (n) => {
|
|
8782
8787
|
const r = n.data;
|
|
8783
8788
|
if (r?.type === "error") {
|
|
@@ -8804,7 +8809,7 @@ class Nf {
|
|
|
8804
8809
|
async getMediaStream(e) {
|
|
8805
8810
|
if (!navigator.mediaDevices)
|
|
8806
8811
|
throw new Error("Media devices are not available in this environment");
|
|
8807
|
-
const n = e.constraints ?? {}, r = e.options?.framerate ??
|
|
8812
|
+
const n = e.constraints ?? {}, r = e.options?.framerate ?? gf;
|
|
8808
8813
|
if (e.sourceType === "screen") {
|
|
8809
8814
|
const a = {
|
|
8810
8815
|
...n,
|
|
@@ -8883,11 +8888,11 @@ class Nf {
|
|
|
8883
8888
|
if (this.client.isWebRtcEnabled && e.sourceType === "screen")
|
|
8884
8889
|
return this.startScreenWebRtc(e);
|
|
8885
8890
|
this.ensurePorts();
|
|
8886
|
-
const r =
|
|
8891
|
+
const r = Rf(), s = await this.getMediaStream(e), i = s.getVideoTracks()[0];
|
|
8887
8892
|
if (!i)
|
|
8888
8893
|
throw s.getTracks().forEach((f) => f.stop()), new Error("No video track available");
|
|
8889
8894
|
e.sourceType === "screen" && await new Promise((f) => setTimeout(f, 200));
|
|
8890
|
-
const o = i.getSettings(), a = e.sourceType === "screen" ? o.width ?? Te : e.options?.width ?? o.width ?? Te, c = e.sourceType === "screen" ? o.height ?? we : e.options?.height ?? o.height ?? we, l =
|
|
8895
|
+
const o = i.getSettings(), a = e.sourceType === "screen" ? o.width ?? Te : e.options?.width ?? o.width ?? Te, c = e.sourceType === "screen" ? o.height ?? we : e.options?.height ?? o.height ?? we, l = Nf(), h = new l({ track: i }).readable, d = this.allocateTrackId(), m = this.ensureWorker(), S = e.sourceType, T = e.onStopped;
|
|
8891
8896
|
m.postMessage(
|
|
8892
8897
|
{
|
|
8893
8898
|
type: "start",
|
|
@@ -9003,12 +9008,12 @@ class Nf {
|
|
|
9003
9008
|
this.protocolPort?.close(), this.protocolPort = null, this.sendPort?.close(), this.sendPort = null;
|
|
9004
9009
|
}
|
|
9005
9010
|
}
|
|
9006
|
-
class
|
|
9011
|
+
class Df {
|
|
9007
9012
|
audio;
|
|
9008
9013
|
video;
|
|
9009
9014
|
image;
|
|
9010
9015
|
constructor(e, n) {
|
|
9011
|
-
this.audio = new
|
|
9016
|
+
this.audio = new Sf(e, n?.audio), this.video = new kf(e), this.image = new yf();
|
|
9012
9017
|
}
|
|
9013
9018
|
dispose() {
|
|
9014
9019
|
this.audio.dispose(), this.video.dispose();
|
|
@@ -9016,16 +9021,16 @@ class kf {
|
|
|
9016
9021
|
}
|
|
9017
9022
|
const vs = P("DebugMode");
|
|
9018
9023
|
let se = !1;
|
|
9019
|
-
function Df() {
|
|
9020
|
-
return se = Th(), se && (hs(Ve.DEBUG), vs.warn("Debug mode enabled")), se;
|
|
9021
|
-
}
|
|
9022
9024
|
function vf() {
|
|
9023
|
-
return se;
|
|
9025
|
+
return se = wh(), se && (hs(Ve.DEBUG), vs.warn("Debug mode enabled")), se;
|
|
9024
9026
|
}
|
|
9025
9027
|
function Uf() {
|
|
9026
|
-
|
|
9028
|
+
return se;
|
|
9027
9029
|
}
|
|
9028
|
-
function Of(
|
|
9030
|
+
function Of() {
|
|
9031
|
+
se || (se = !0, hs(Ve.DEBUG), vs.warn("Debug mode enabled"), Eh(Ss, "true"));
|
|
9032
|
+
}
|
|
9033
|
+
function Mf(t) {
|
|
9029
9034
|
return new Worker(
|
|
9030
9035
|
"" + new URL("assets/protocol-worker-C3oOno6C.js", import.meta.url).href,
|
|
9031
9036
|
{
|
|
@@ -9040,7 +9045,7 @@ const nn = {
|
|
|
9040
9045
|
[N.WebTransportProxy]: 2,
|
|
9041
9046
|
[N.WebSocketProxy]: 3
|
|
9042
9047
|
}, Je = /* @__PURE__ */ new Set([N.WebTransportProxy, N.WebSocketProxy]), Qe = /* @__PURE__ */ new Set([N.WebTransport, N.WebSocket]), rn = /* @__PURE__ */ new Set([N.WebSocket, N.WebSocketProxy]), sn = /* @__PURE__ */ new Set([N.WebTransport, N.WebTransportProxy]), Ze = "ikon_endpoint_type", Ue = "ikon_proxy_preferred";
|
|
9043
|
-
class
|
|
9048
|
+
class Pf {
|
|
9044
9049
|
isLocal;
|
|
9045
9050
|
_proxyMode;
|
|
9046
9051
|
_websocket;
|
|
@@ -9153,10 +9158,10 @@ class Mf {
|
|
|
9153
9158
|
}
|
|
9154
9159
|
}
|
|
9155
9160
|
const I = P("IkonClient");
|
|
9156
|
-
function
|
|
9161
|
+
function Lf() {
|
|
9157
9162
|
return typeof __IKON_WAIT_FOR_EXTERNAL_CONNECT_URL__ < "u" && __IKON_WAIT_FOR_EXTERNAL_CONNECT_URL__;
|
|
9158
9163
|
}
|
|
9159
|
-
class
|
|
9164
|
+
class ap {
|
|
9160
9165
|
channelManager = null;
|
|
9161
9166
|
protocolWorker = null;
|
|
9162
9167
|
workerManagerState = null;
|
|
@@ -9215,7 +9220,7 @@ class op {
|
|
|
9215
9220
|
_reconnectTimer = null;
|
|
9216
9221
|
_serverStopped = !1;
|
|
9217
9222
|
// External connect URL mode
|
|
9218
|
-
_waitForExternalConnectUrl =
|
|
9223
|
+
_waitForExternalConnectUrl = Lf();
|
|
9219
9224
|
_externalConnectUrlCleanup = null;
|
|
9220
9225
|
/**
|
|
9221
9226
|
* SDK-provided media pipelines (audio/video).
|
|
@@ -9287,34 +9292,34 @@ class op {
|
|
|
9287
9292
|
return this._webRtcSignaling;
|
|
9288
9293
|
}
|
|
9289
9294
|
constructor(e) {
|
|
9290
|
-
this.config = e, this.slowConnectionThresholdMs = e.timeouts?.slowConnectionThresholdMs ??
|
|
9295
|
+
this.config = e, this.slowConnectionThresholdMs = e.timeouts?.slowConnectionThresholdMs ?? rd, this.connectionTimeoutMs = e.timeouts?.connectionTimeoutMs ?? sd;
|
|
9291
9296
|
const n = [e.local, e.apiKey, e.sessionToken].filter(Boolean).length;
|
|
9292
9297
|
if (n === 0)
|
|
9293
9298
|
throw new Error('IkonClient requires one of: "local", "apiKey", or "sessionToken" configuration');
|
|
9294
9299
|
if (n > 1)
|
|
9295
9300
|
throw new Error('IkonClient accepts only one of: "local", "apiKey", or "sessionToken" configuration');
|
|
9296
|
-
ze() &&
|
|
9297
|
-
const r = e.local ? null :
|
|
9298
|
-
this.endpointSelector = new
|
|
9301
|
+
ze() && hd();
|
|
9302
|
+
const r = e.local ? null : Ih() ?? e.proxy ?? null, s = r === !0 ? "force-proxy" : r === !1 ? "force-direct" : "auto", i = e.local ? null : _h(), o = e.local ? null : Th(), a = i ?? e.websocket, c = o ?? e.webtransport;
|
|
9303
|
+
this.endpointSelector = new Pf({
|
|
9299
9304
|
local: e.local,
|
|
9300
9305
|
proxyMode: s,
|
|
9301
9306
|
websocket: a,
|
|
9302
9307
|
webtransport: c
|
|
9303
|
-
}), s !== "auto" ? I.info(`Proxy mode: ${s}`) : this.endpointSelector.proxyPreferred && I.info("Proxy preferred (from previous session)"), (a !== void 0 || c !== void 0) && I.info(`Transport filter: websocket=${a ?? "auto"}, webtransport=${c ?? "auto"}`), this._functionRegistry = new
|
|
9304
|
-
const l =
|
|
9308
|
+
}), s !== "auto" ? I.info(`Proxy mode: ${s}`) : this.endpointSelector.proxyPreferred && I.info("Proxy preferred (from previous session)"), (a !== void 0 || c !== void 0) && I.info(`Transport filter: websocket=${a ?? "auto"}, webtransport=${c ?? "auto"}`), this._functionRegistry = new Dh(), ze() && !e.disableBrowserFunctions && (this.unregisterBrowserFunctions = Kd(this._functionRegistry), this.unregisterSoundFunctions = $h(this._functionRegistry));
|
|
9309
|
+
const l = gh(), p = Ch(), h = Ah();
|
|
9305
9310
|
this._audioEnabled = l ?? e.audio?.enabled ?? !0, this._videoEnabled = p ?? e.video?.enabled ?? !0;
|
|
9306
9311
|
const d = e.audio ? {
|
|
9307
9312
|
performance: e.audio.performance,
|
|
9308
9313
|
background: e.audio.background,
|
|
9309
9314
|
diagnostics: e.audio.diagnostics
|
|
9310
9315
|
} : void 0, m = e.video ? { performance: e.video.performance } : void 0;
|
|
9311
|
-
this._media = new
|
|
9316
|
+
this._media = new df(this, { audio: d, video: m, mediaSession: e.mediaSession }), (h ?? e.webRtc?.enabled) || (this._audioEnabled && this._media.audio.setEnabled(!0), this._videoEnabled && this._media.video.setEnabled(!0)), ze() && (this._mediaCapture = new Df(this, {
|
|
9312
9317
|
audio: {
|
|
9313
9318
|
performance: {
|
|
9314
9319
|
preferWebCodecs: e.audio?.performance?.preferWebCodecs
|
|
9315
9320
|
}
|
|
9316
9321
|
}
|
|
9317
|
-
}), this.unregisterMediaCaptureFunctions =
|
|
9322
|
+
}), this.unregisterMediaCaptureFunctions = Lh(this._functionRegistry, this));
|
|
9318
9323
|
}
|
|
9319
9324
|
_lastError = void 0;
|
|
9320
9325
|
/**
|
|
@@ -9359,7 +9364,7 @@ class op {
|
|
|
9359
9364
|
if (this.currentState !== "idle")
|
|
9360
9365
|
throw new Error(`Cannot connect: already in state ${this.currentState}`);
|
|
9361
9366
|
this.setupLifecycleHandlers();
|
|
9362
|
-
const e =
|
|
9367
|
+
const e = Sh();
|
|
9363
9368
|
if (e) {
|
|
9364
9369
|
I.info("Found external connect URL in query parameter"), await this.executeConnection(() => xe(e, this.abortController.signal));
|
|
9365
9370
|
return;
|
|
@@ -9381,7 +9386,7 @@ class op {
|
|
|
9381
9386
|
}, this.connectionTimeoutMs);
|
|
9382
9387
|
try {
|
|
9383
9388
|
const n = await e();
|
|
9384
|
-
this.authResponse = n.authResponse, this._sessionId = n.authResponse.ClientContext.SessionId, I.info(
|
|
9389
|
+
this.authResponse = n.authResponse, this._sessionId = n.authResponse.ClientContext.SessionId, I.info(`Authenticated to Ikon server (${n.authResponse.ServerSessionId})`), await this.connectProtocol(this.authResponse.Entrypoints);
|
|
9385
9390
|
} catch (n) {
|
|
9386
9391
|
if (n instanceof DOMException && n.name === "AbortError")
|
|
9387
9392
|
return;
|
|
@@ -9437,8 +9442,8 @@ class op {
|
|
|
9437
9442
|
I.warn("Cannot send UpdateClientContext: not connected");
|
|
9438
9443
|
return;
|
|
9439
9444
|
}
|
|
9440
|
-
const n =
|
|
9441
|
-
|
|
9445
|
+
const n = Ol(
|
|
9446
|
+
kl({
|
|
9442
9447
|
ViewportWidth: e.viewportWidth ?? 0,
|
|
9443
9448
|
ViewportHeight: e.viewportHeight ?? 0,
|
|
9444
9449
|
Theme: e.theme ?? "",
|
|
@@ -9599,13 +9604,13 @@ class op {
|
|
|
9599
9604
|
async authenticate() {
|
|
9600
9605
|
const e = this.abortController?.signal;
|
|
9601
9606
|
if (this.config.local)
|
|
9602
|
-
return
|
|
9607
|
+
return ih(this.config.local, e);
|
|
9603
9608
|
const n = this.endpointSelector.proxyMode, r = this.endpointSelector.proxyPreferred;
|
|
9604
9609
|
let s;
|
|
9605
9610
|
if (this.config.apiKey)
|
|
9606
|
-
s = await
|
|
9611
|
+
s = await oh(this.config.apiKey, e, n, r);
|
|
9607
9612
|
else if (this.config.sessionToken)
|
|
9608
|
-
s = await
|
|
9613
|
+
s = await ah(this.config.sessionToken, e, n, r);
|
|
9609
9614
|
else
|
|
9610
9615
|
throw new Error("No connection configuration provided (need local, apiKey, or sessionToken)");
|
|
9611
9616
|
return s.usedProxyUrl && n === "auto" && this.endpointSelector.markProxyPreferred(), s;
|
|
@@ -9621,8 +9626,8 @@ class op {
|
|
|
9621
9626
|
this.notifyMessageSubscribers(e, n, r);
|
|
9622
9627
|
return;
|
|
9623
9628
|
}
|
|
9624
|
-
n === g.CORE_GLOBAL_STATE &&
|
|
9625
|
-
this._globalState = s, this._sessionId !== void 0 && this._functionRegistry.syncFromGlobalState(s, this._sessionId), this._globalState.DebugMode &&
|
|
9629
|
+
n === g.CORE_GLOBAL_STATE && Wc(e).then((s) => {
|
|
9630
|
+
this._globalState = s, this._sessionId !== void 0 && this._functionRegistry.syncFromGlobalState(s, this._sessionId), this._globalState.DebugMode && Of(), Uf() && this.protocolWorker && this.protocolWorker.postMessage({ type: "enableDevtools", enabled: !0 }), this._globalStateReceived || (this._globalStateReceived = !0, this.tryHandleJoined());
|
|
9626
9631
|
}).catch((s) => {
|
|
9627
9632
|
I.error("Failed to parse GlobalState:", s);
|
|
9628
9633
|
}), this.notifyMessageSubscribers(e, n, r);
|
|
@@ -9725,7 +9730,7 @@ class op {
|
|
|
9725
9730
|
}
|
|
9726
9731
|
let r;
|
|
9727
9732
|
try {
|
|
9728
|
-
r = new
|
|
9733
|
+
r = new Mf();
|
|
9729
9734
|
} catch (h) {
|
|
9730
9735
|
I.warn(`Failed to create protocol worker, falling back to main thread: ${h}`), await this.connectProtocolOnMainThread(e, n);
|
|
9731
9736
|
return;
|
|
@@ -9761,7 +9766,7 @@ class op {
|
|
|
9761
9766
|
d(new Error(`Protocol worker failed: ${E.join(" ")}`.trim()));
|
|
9762
9767
|
});
|
|
9763
9768
|
}), i = this.computeOrderedEndpointTypes(e), o = this.config.timeouts?.keepaliveTimeoutMs ?? Vt, a = this.config.timeouts?.reconnectBackoffMs ?? Ht, c = this.config.timeouts?.maxReconnectAttempts ?? $t;
|
|
9764
|
-
this.updateWorkerInterestMask(),
|
|
9769
|
+
this.updateWorkerInterestMask(), vf() && r.postMessage({ type: "enableDevtools", enabled: !0 });
|
|
9765
9770
|
const p = this.config.webRtc?.enabled ?? !1;
|
|
9766
9771
|
r.postMessage({
|
|
9767
9772
|
type: "connect",
|
|
@@ -9823,7 +9828,7 @@ class op {
|
|
|
9823
9828
|
this.onWebRtcTrackMapChanged?.(s);
|
|
9824
9829
|
}
|
|
9825
9830
|
};
|
|
9826
|
-
this._webRtcSignaling = new
|
|
9831
|
+
this._webRtcSignaling = new nd(n);
|
|
9827
9832
|
try {
|
|
9828
9833
|
await this._webRtcSignaling.connect((r) => {
|
|
9829
9834
|
this.sendProtocolMessage(r);
|
|
@@ -9882,7 +9887,7 @@ class op {
|
|
|
9882
9887
|
async connectProtocolOnMainThread(e, n = !1) {
|
|
9883
9888
|
this.workerManagerState = null, this.protocolWorker = null;
|
|
9884
9889
|
const r = this.config.webRtc?.enabled ?? !1;
|
|
9885
|
-
I.info(`Connecting on main thread (webRtcEnabled=${r}, entrypoints=${e.length})`), this.channelManager = new
|
|
9890
|
+
I.info(`Connecting on main thread (webRtcEnabled=${r}, entrypoints=${e.length})`), this.channelManager = new Hu({
|
|
9886
9891
|
sessionId: this._sessionId,
|
|
9887
9892
|
keepaliveTimeoutMs: this.config.timeouts?.keepaliveTimeoutMs ?? Vt,
|
|
9888
9893
|
reconnectBackoffMs: this.config.timeouts?.reconnectBackoffMs ?? Ht,
|
|
@@ -9977,7 +9982,7 @@ class op {
|
|
|
9977
9982
|
if (this._reauthInProgress)
|
|
9978
9983
|
return;
|
|
9979
9984
|
this.clearReconnectTimer();
|
|
9980
|
-
const n = (this._disconnectedAt !== null ? Date.now() - this._disconnectedAt : 1 / 0) >
|
|
9985
|
+
const n = (this._disconnectedAt !== null ? Date.now() - this._disconnectedAt : 1 / 0) > id;
|
|
9981
9986
|
if (!n && !this._softReconnectAttempted && !this._fullReauthAttempted && this.authResponse) {
|
|
9982
9987
|
I.info("Attempting soft reconnect with cached entrypoints"), this._softReconnectAttempted = !0, this._channelsConnected = !1, this._globalStateReceived = !1, this._joinedHandled = !1, this.disconnectProtocol(), this.connectProtocol(this.authResponse.Entrypoints, !0);
|
|
9983
9988
|
return;
|
|
@@ -9991,7 +9996,7 @@ class op {
|
|
|
9991
9996
|
scheduleReconnectRetry() {
|
|
9992
9997
|
this.clearReconnectTimer(), I.info("Scheduling reconnect retry in 10 seconds"), this._reconnectTimer = setTimeout(() => {
|
|
9993
9998
|
this._reconnectTimer = null, this.attemptReconnect();
|
|
9994
|
-
},
|
|
9999
|
+
}, od);
|
|
9995
10000
|
}
|
|
9996
10001
|
clearReconnectTimer() {
|
|
9997
10002
|
this._reconnectTimer && (clearTimeout(this._reconnectTimer), this._reconnectTimer = null);
|
|
@@ -10145,165 +10150,165 @@ class op {
|
|
|
10145
10150
|
}
|
|
10146
10151
|
}
|
|
10147
10152
|
}
|
|
10148
|
-
function
|
|
10153
|
+
function cp(t) {
|
|
10149
10154
|
return t === "waitingForExternalConnectUrl" || t === "connecting" || t === "connectingSlow" || t === "reconnecting";
|
|
10150
10155
|
}
|
|
10151
|
-
function
|
|
10156
|
+
function lp(t) {
|
|
10152
10157
|
return t === "connected";
|
|
10153
10158
|
}
|
|
10154
|
-
function
|
|
10159
|
+
function up(t) {
|
|
10155
10160
|
return t === "offline" || t === "offlineError" || t === "idle";
|
|
10156
10161
|
}
|
|
10157
|
-
function
|
|
10162
|
+
function dp(t) {
|
|
10158
10163
|
return t === "offlineError";
|
|
10159
10164
|
}
|
|
10160
10165
|
const Us = /* @__PURE__ */ new Map();
|
|
10161
10166
|
for (const [t, e] of Object.entries(g))
|
|
10162
10167
|
typeof e == "number" && Us.set(e, t);
|
|
10163
|
-
function
|
|
10168
|
+
function hp(t) {
|
|
10164
10169
|
return Us.get(t) ?? `UNKNOWN_${t}`;
|
|
10165
10170
|
}
|
|
10166
10171
|
const Os = 1e3, Ms = Ve.INFO;
|
|
10167
10172
|
let H = [], dt = Os, Ps = Ms, ht = null;
|
|
10168
|
-
function
|
|
10173
|
+
function Ff(t) {
|
|
10169
10174
|
t.level < Ps || (H.push(t), H.length > dt && (H = H.slice(-dt)));
|
|
10170
10175
|
}
|
|
10171
|
-
function
|
|
10172
|
-
dt = t?.maxBufferSize ?? Os, Ps = t?.minLevel ?? Ms, H = [],
|
|
10176
|
+
function Bf(t) {
|
|
10177
|
+
dt = t?.maxBufferSize ?? Os, Ps = t?.minLevel ?? Ms, H = [], Pu(Ff);
|
|
10173
10178
|
}
|
|
10174
|
-
function
|
|
10179
|
+
function fp(t) {
|
|
10175
10180
|
ht = t;
|
|
10176
10181
|
}
|
|
10177
|
-
function
|
|
10182
|
+
function pp() {
|
|
10178
10183
|
return H;
|
|
10179
10184
|
}
|
|
10180
|
-
function
|
|
10185
|
+
function xf() {
|
|
10181
10186
|
const t = H;
|
|
10182
10187
|
return H = [], t;
|
|
10183
10188
|
}
|
|
10184
|
-
function
|
|
10189
|
+
function mp() {
|
|
10185
10190
|
if (!ht || H.length === 0)
|
|
10186
10191
|
return 0;
|
|
10187
|
-
const t =
|
|
10192
|
+
const t = xf();
|
|
10188
10193
|
return ht(t), t.length;
|
|
10189
10194
|
}
|
|
10190
|
-
function
|
|
10195
|
+
function Ep() {
|
|
10191
10196
|
H = [];
|
|
10192
10197
|
}
|
|
10193
|
-
function
|
|
10198
|
+
function Ip() {
|
|
10194
10199
|
return H.length;
|
|
10195
10200
|
}
|
|
10196
|
-
|
|
10201
|
+
Bf();
|
|
10197
10202
|
export {
|
|
10198
10203
|
R as AuthenticationError,
|
|
10199
|
-
|
|
10200
|
-
|
|
10201
|
-
|
|
10204
|
+
Vu as Channel,
|
|
10205
|
+
Hu as ChannelManager,
|
|
10206
|
+
Gf as ChannelNotFoundError,
|
|
10202
10207
|
ne as ClientType,
|
|
10203
10208
|
Ct as ConnectionError,
|
|
10204
10209
|
de as ContextType,
|
|
10205
|
-
|
|
10210
|
+
Pf as EndpointSelector,
|
|
10206
10211
|
N as EntrypointType,
|
|
10207
|
-
|
|
10208
|
-
|
|
10209
|
-
|
|
10212
|
+
Nh as FunctionCallError,
|
|
10213
|
+
Dh as FunctionRegistry,
|
|
10214
|
+
ep as IKON_AUTH_BASE_URL,
|
|
10210
10215
|
jt as IKON_AUTH_URL_DEV,
|
|
10211
10216
|
Yt as IKON_AUTH_URL_PROD,
|
|
10212
10217
|
ct as IKON_BACKEND_URL_DEV,
|
|
10213
10218
|
at as IKON_BACKEND_URL_PROD,
|
|
10214
|
-
|
|
10219
|
+
fh as IKON_PARAM_AUDIO,
|
|
10215
10220
|
Ss as IKON_PARAM_DEBUG,
|
|
10216
|
-
|
|
10217
|
-
|
|
10218
|
-
|
|
10219
|
-
|
|
10220
|
-
|
|
10221
|
-
|
|
10222
|
-
|
|
10223
|
-
|
|
10224
|
-
|
|
10225
|
-
|
|
10221
|
+
ip as IKON_PARAM_GIT_BRANCH,
|
|
10222
|
+
sp as IKON_PARAM_GIT_SOURCE,
|
|
10223
|
+
dh as IKON_PARAM_LANG,
|
|
10224
|
+
ch as IKON_PARAM_PROXY,
|
|
10225
|
+
hh as IKON_PARAM_SERVER_URL,
|
|
10226
|
+
ph as IKON_PARAM_VIDEO,
|
|
10227
|
+
mh as IKON_PARAM_WEBRTC,
|
|
10228
|
+
lh as IKON_PARAM_WEBSOCKET,
|
|
10229
|
+
uh as IKON_PARAM_WEBTRANSPORT,
|
|
10230
|
+
Sf as IkonAudioCapture,
|
|
10226
10231
|
Mt as IkonAudioPlayback,
|
|
10227
|
-
|
|
10228
|
-
|
|
10229
|
-
|
|
10230
|
-
|
|
10231
|
-
|
|
10232
|
-
|
|
10232
|
+
ap as IkonClient,
|
|
10233
|
+
yf as IkonImageCapture,
|
|
10234
|
+
df as IkonMedia,
|
|
10235
|
+
Df as IkonMediaCapture,
|
|
10236
|
+
kf as IkonVideoCapture,
|
|
10237
|
+
uf as IkonVideoPlayback,
|
|
10233
10238
|
At as KeepaliveTimeoutError,
|
|
10234
10239
|
Ve as LogLevel,
|
|
10235
|
-
|
|
10236
|
-
|
|
10240
|
+
Ou as MaxRetriesExceededError,
|
|
10241
|
+
Hf as NoChannelsError,
|
|
10237
10242
|
g as Opcode,
|
|
10238
|
-
|
|
10239
|
-
|
|
10243
|
+
Mu as ProvisioningTimeoutError,
|
|
10244
|
+
Vf as SpaceNotFoundError,
|
|
10240
10245
|
q as TransportError,
|
|
10241
10246
|
fe as UserType,
|
|
10242
|
-
|
|
10243
|
-
|
|
10244
|
-
|
|
10245
|
-
|
|
10246
|
-
|
|
10247
|
-
|
|
10248
|
-
|
|
10249
|
-
|
|
10250
|
-
|
|
10251
|
-
|
|
10252
|
-
|
|
10253
|
-
|
|
10254
|
-
|
|
10255
|
-
|
|
10256
|
-
|
|
10257
|
-
|
|
10258
|
-
|
|
10259
|
-
|
|
10260
|
-
|
|
10261
|
-
|
|
10262
|
-
|
|
10263
|
-
|
|
10247
|
+
Jf as WEBRTC_AUDIO_BITRATE,
|
|
10248
|
+
Xf as WEBRTC_AUDIO_CHANNELS,
|
|
10249
|
+
jf as WEBRTC_AUDIO_CODEC,
|
|
10250
|
+
$u as WEBRTC_AUDIO_JITTER_BUFFER_TARGET_MS,
|
|
10251
|
+
zf as WEBRTC_AUDIO_SAMPLE_RATE,
|
|
10252
|
+
ju as WEBRTC_BUNDLE_POLICY,
|
|
10253
|
+
Zu as WEBRTC_DATA_CHANNEL_LABEL,
|
|
10254
|
+
ed as WEBRTC_DATA_CHANNEL_MAX_RETRANSMITS,
|
|
10255
|
+
qu as WEBRTC_DATA_CHANNEL_ORDERED,
|
|
10256
|
+
Xu as WEBRTC_ICE_SERVERS,
|
|
10257
|
+
Ju as WEBRTC_MAX_AUDIO_TRACKS,
|
|
10258
|
+
Qu as WEBRTC_MAX_VIDEO_TRACKS,
|
|
10259
|
+
zu as WEBRTC_RTCP_MUX_POLICY,
|
|
10260
|
+
Qf as WEBRTC_VIDEO_CODEC,
|
|
10261
|
+
Ku as WEBRTC_VIDEO_MAX_BITRATE,
|
|
10262
|
+
Zf as WEBRTC_VIDEO_MAX_FRAMERATE,
|
|
10263
|
+
td as WebRTCConnection,
|
|
10264
|
+
nd as WebRTCSignaling,
|
|
10265
|
+
Wf as asProtocolMessage,
|
|
10266
|
+
qf as clearDeviceId,
|
|
10267
|
+
Ep as clearLogBuffer,
|
|
10268
|
+
rp as clearSessionParamsFromUrl,
|
|
10264
10269
|
P as createLogger,
|
|
10265
|
-
|
|
10266
|
-
|
|
10270
|
+
jd as deriveAuthUrl,
|
|
10271
|
+
tp as deriveBackendType,
|
|
10267
10272
|
zt as deriveBackendUrl,
|
|
10268
|
-
|
|
10269
|
-
|
|
10270
|
-
|
|
10271
|
-
|
|
10272
|
-
|
|
10273
|
-
|
|
10274
|
-
|
|
10275
|
-
|
|
10276
|
-
|
|
10277
|
-
|
|
10273
|
+
Yd as extractUserIdFromToken,
|
|
10274
|
+
mp as flushLogs,
|
|
10275
|
+
gh as getAudioParam,
|
|
10276
|
+
pp as getBufferedLogs,
|
|
10277
|
+
wh as getDebugParam,
|
|
10278
|
+
op as getLangParam,
|
|
10279
|
+
Ip as getLogBufferSize,
|
|
10280
|
+
$f as getLogLevel,
|
|
10281
|
+
Kf as getLogSink,
|
|
10282
|
+
hp as getOpcodeName,
|
|
10278
10283
|
$e as getOrCreateDeviceId,
|
|
10279
|
-
|
|
10280
|
-
|
|
10281
|
-
|
|
10282
|
-
|
|
10283
|
-
|
|
10284
|
-
|
|
10285
|
-
|
|
10286
|
-
|
|
10284
|
+
Ih as getProxyParam,
|
|
10285
|
+
Sh as getServerUrlParam,
|
|
10286
|
+
Ch as getVideoParam,
|
|
10287
|
+
Ah as getWebRtcParam,
|
|
10288
|
+
_h as getWebSocketParam,
|
|
10289
|
+
Th as getWebTransportParam,
|
|
10290
|
+
vf as initializeDebugMode,
|
|
10291
|
+
Bf as initializeLogSink,
|
|
10287
10292
|
ys as isAudioWorkletSupported,
|
|
10288
10293
|
ze as isBrowserEnvironment,
|
|
10289
10294
|
vt as isCloudEnvironment,
|
|
10290
|
-
|
|
10291
|
-
|
|
10292
|
-
|
|
10293
|
-
|
|
10294
|
-
|
|
10295
|
+
lp as isConnected,
|
|
10296
|
+
cp as isConnecting,
|
|
10297
|
+
Uf as isDebugModeEnabled,
|
|
10298
|
+
dp as isError,
|
|
10299
|
+
up as isOffline,
|
|
10295
10300
|
Me as isSharedArrayBufferSupported,
|
|
10296
10301
|
fs as isWebTransportSupported,
|
|
10297
|
-
|
|
10302
|
+
np as parseUrlParams,
|
|
10298
10303
|
Se as readOpcode,
|
|
10299
10304
|
Oe as readOpcodeGroup,
|
|
10300
10305
|
ce as readProtocolMessageHeaders,
|
|
10301
|
-
|
|
10306
|
+
Kd as registerBrowserFunctions,
|
|
10302
10307
|
hs as setLogLevel,
|
|
10303
|
-
|
|
10304
|
-
|
|
10305
|
-
|
|
10306
|
-
|
|
10307
|
-
|
|
10308
|
-
|
|
10308
|
+
Pu as setLogSink,
|
|
10309
|
+
Eh as setSdkUrlParam,
|
|
10310
|
+
fp as setSendLogsCallback,
|
|
10311
|
+
Yf as subscribeToLogEvents,
|
|
10312
|
+
xf as takeBufferedLogs,
|
|
10313
|
+
Rh as withResultData
|
|
10309
10314
|
};
|