@ikonai/sdk 1.0.35 → 1.0.36

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.
Files changed (2) hide show
  1. package/index.js +588 -531
  2. 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 Mf(t) {
4
+ function xf(t) {
5
5
  return t;
6
6
  }
7
7
  function Se(t) {
@@ -19,17 +19,17 @@ function ce(t) {
19
19
  const r = n.getUint32(0, !0), s = n.getUint32(4, !0), i = n.getUint32(8, !0), o = n.getUint32(12, !0), a = n.getUint32(16, !0), c = n.getUint32(20, !0), l = n.getUint8(24), p = n.getUint8(25), h = n.getUint8(26);
20
20
  if (27 + c * 4 > e.length)
21
21
  throw new Error("Protocol header exceeds payload length");
22
- const E = [];
22
+ const m = [];
23
23
  let S = 27;
24
24
  for (let T = 0; T < c; T++)
25
- E.push(n.getUint32(S, !0)), S += 4;
25
+ m.push(n.getUint32(S, !0)), S += 4;
26
26
  return {
27
27
  length: r,
28
28
  opcode: s,
29
29
  senderId: i,
30
30
  trackId: o,
31
31
  sequenceId: a,
32
- targetIds: E,
32
+ targetIds: m,
33
33
  payloadVersion: l,
34
34
  payloadType: p,
35
35
  flags: h
@@ -55,11 +55,11 @@ async function ft(t, e, n) {
55
55
  return (s.flags & Bs.Compressed) !== 0 && (o = await xs(o)), o;
56
56
  }
57
57
  function M(t, e, n, r, s) {
58
- const i = s?.trackId ?? 0, o = s?.sequenceId ?? 0, a = s?.flags ?? 0, c = s?.targetIds ?? [], l = s?.payloadType ?? 8, p = 27 + c.length * 4, h = p + e.length, d = new Uint8Array(h), E = new DataView(d.buffer);
59
- E.setUint32(0, h, !0), E.setUint32(4, t >>> 0, !0), E.setUint32(8, r >>> 0, !0), E.setUint32(12, i >>> 0, !0), E.setUint32(16, o >>> 0, !0), E.setUint32(20, c.length >>> 0, !0), E.setUint8(24, n & 255), E.setUint8(25, l & 255), E.setUint8(26, a & 255);
58
+ const i = s?.trackId ?? 0, o = s?.sequenceId ?? 0, a = s?.flags ?? 0, c = s?.targetIds ?? [], l = s?.payloadType ?? 8, p = 27 + c.length * 4, h = p + e.length, d = new Uint8Array(h), m = new DataView(d.buffer);
59
+ m.setUint32(0, h, !0), m.setUint32(4, t >>> 0, !0), m.setUint32(8, r >>> 0, !0), m.setUint32(12, i >>> 0, !0), m.setUint32(16, o >>> 0, !0), m.setUint32(20, c.length >>> 0, !0), m.setUint8(24, n & 255), m.setUint8(25, l & 255), m.setUint8(26, a & 255);
60
60
  let S = 27;
61
61
  for (let T = 0; T < c.length; T++)
62
- E.setUint32(S, c[T] >>> 0, !0), S += 4;
62
+ m.setUint32(S, c[T] >>> 0, !0), S += 4;
63
63
  return d.set(e, p), d;
64
64
  }
65
65
  async function xs(t) {
@@ -593,13 +593,13 @@ class K {
593
593
  return this.ensureType(
594
594
  9
595
595
  /* Array */
596
- ), Et.create(this.payload);
596
+ ), mt.create(this.payload);
597
597
  }
598
598
  asDictionary() {
599
599
  return this.ensureType(
600
600
  10
601
601
  /* Dict */
602
- ), mt.create(this.payload);
602
+ ), Et.create(this.payload);
603
603
  }
604
604
  ensureType(e) {
605
605
  if (this.type !== e)
@@ -614,7 +614,7 @@ class Vs extends K {
614
614
  return this.type === 1;
615
615
  }
616
616
  }
617
- class Et {
617
+ class mt {
618
618
  payload;
619
619
  elementType;
620
620
  count;
@@ -630,7 +630,7 @@ class Et {
630
630
  this.count = W(e, r, "ArrayMalformed"), this.offset = r.offset;
631
631
  }
632
632
  static create(e) {
633
- return new Et(ue(e));
633
+ return new mt(ue(e));
634
634
  }
635
635
  next() {
636
636
  if (this.index >= this.count) {
@@ -654,40 +654,40 @@ class Et {
654
654
  const e = ie(this.elementType);
655
655
  L(this.payload, this.offset, e);
656
656
  const n = this.payload.subarray(this.offset, this.offset + e);
657
- return this.offset += e, new Ee(this.elementType, n);
657
+ return this.offset += e, new me(this.elementType, n);
658
658
  }
659
659
  case 12:
660
660
  case 13: {
661
661
  const e = { offset: this.offset }, n = W(this.payload, e, "ArrayMalformed");
662
662
  L(this.payload, e.offset, n);
663
663
  const r = this.payload.subarray(e.offset, e.offset + n);
664
- return this.offset = e.offset + n, new Ee(this.elementType, r);
664
+ return this.offset = e.offset + n, new me(this.elementType, r);
665
665
  }
666
666
  case 11: {
667
667
  const e = { offset: this.offset }, n = W(this.payload, e, "ArrayMalformed");
668
668
  L(this.payload, e.offset, n);
669
669
  const r = this.payload.subarray(e.offset, e.offset + n);
670
- return this.offset = e.offset + n, new Ee(11, r);
670
+ return this.offset = e.offset + n, new me(11, r);
671
671
  }
672
672
  case 9: {
673
673
  const e = _t(this.payload, this.offset), n = this.payload.subarray(this.offset, this.offset + e);
674
- return this.offset += e, new Ee(9, n);
674
+ return this.offset += e, new me(9, n);
675
675
  }
676
676
  case 10: {
677
677
  const e = Tt(this.payload, this.offset), n = this.payload.subarray(this.offset, this.offset + e);
678
- return this.offset += e, new Ee(10, n);
678
+ return this.offset += e, new me(10, n);
679
679
  }
680
680
  default:
681
681
  throw new Error(`Unsupported array element type ${O[this.elementType]}`);
682
682
  }
683
683
  }
684
684
  }
685
- class Ee extends K {
685
+ class me extends K {
686
686
  constructor(e, n) {
687
687
  super(e, n);
688
688
  }
689
689
  }
690
- class mt {
690
+ class Et {
691
691
  payload;
692
692
  keyType;
693
693
  valueType;
@@ -704,7 +704,7 @@ class mt {
704
704
  this.count = W(e, n, "DictMalformed"), this.offset = n.offset;
705
705
  }
706
706
  static create(e) {
707
- return new mt(ue(e));
707
+ return new Et(ue(e));
708
708
  }
709
709
  next() {
710
710
  if (this.index >= this.count) {
@@ -1027,7 +1027,7 @@ function Zs(t, e, n) {
1027
1027
  const r = Js(t);
1028
1028
  return M(js, r, pn, e, n);
1029
1029
  }
1030
- const qs = 1, En = 467348717, mn = 972460562, In = 1911490601, _n = 2603556958, Tn = 3609695522, wn = 4094837378, Sn = 4257460908;
1030
+ const qs = 1, mn = 467348717, En = 972460562, In = 1911490601, _n = 2603556958, Tn = 3609695522, wn = 4094837378, Sn = 4257460908;
1031
1031
  function et(t) {
1032
1032
  const e = {};
1033
1033
  return gn(e), t && Object.assign(e, t), e;
@@ -1036,7 +1036,7 @@ function gn(t) {
1036
1036
  return t.ParameterIndex = 0, t.TypeName = "", t.ValueJson = "", t.ValueData = new Uint8Array(0), t.IsEnumerable = !1, t.EnumerableItemTypeName = "", t.EnumerationId = w.fromBytes(new Uint8Array(16)), t;
1037
1037
  }
1038
1038
  function ei(t, e) {
1039
- e.writeGuidField(En, t.EnumerationId), e.writeStringField(mn, t.EnumerableItemTypeName), e.writeStringField(In, t.ValueJson), e.writeBoolField(_n, t.IsEnumerable), e.writeStringField(Tn, t.TypeName), e.writeBinaryField(wn, t.ValueData), e.writeInt32Field(Sn, t.ParameterIndex | 0);
1039
+ e.writeGuidField(mn, t.EnumerationId), e.writeStringField(En, t.EnumerableItemTypeName), e.writeStringField(In, t.ValueJson), e.writeBoolField(_n, t.IsEnumerable), e.writeStringField(Tn, t.TypeName), e.writeBinaryField(wn, t.ValueData), e.writeInt32Field(Sn, t.ParameterIndex | 0);
1040
1040
  }
1041
1041
  function ti(t, e) {
1042
1042
  const n = e ?? et();
@@ -1046,12 +1046,12 @@ function ni(t, e) {
1046
1046
  let n;
1047
1047
  for (; (n = t.next()) !== null; )
1048
1048
  switch (n.fieldId) {
1049
- case En: {
1049
+ case mn: {
1050
1050
  if (n.isNull) throw new Error();
1051
1051
  e.EnumerationId = n.asGuid();
1052
1052
  break;
1053
1053
  }
1054
- case mn: {
1054
+ case En: {
1055
1055
  if (n.isNull) throw new Error();
1056
1056
  e.EnumerableItemTypeName = n.asString();
1057
1057
  break;
@@ -1102,7 +1102,7 @@ function li(t, e, n) {
1102
1102
  const r = ai(t);
1103
1103
  return M(ri, r, Cn, e, n);
1104
1104
  }
1105
- const ui = 161083277, di = 265814330, hi = 1368629611, fi = 2431514951, pi = 2745379226, Ei = 3282782683, mi = 3284746250, Ii = 4101844078;
1105
+ const ui = 161083277, di = 265814330, hi = 1368629611, fi = 2431514951, pi = 2745379226, mi = 3282782683, Ei = 3284746250, Ii = 4101844078;
1106
1106
  function An(t) {
1107
1107
  const e = {};
1108
1108
  return yn(e), e;
@@ -1146,12 +1146,12 @@ function Ti(t, e) {
1146
1146
  e.CodecDetails = n.asString();
1147
1147
  break;
1148
1148
  }
1149
- case Ei: {
1149
+ case mi: {
1150
1150
  if (n.isNull) throw new Error();
1151
1151
  e.SourceType = n.asString();
1152
1152
  break;
1153
1153
  }
1154
- case mi: {
1154
+ case Ei: {
1155
1155
  if (n.isNull) throw new Error();
1156
1156
  e.Codec = n.asInt32();
1157
1157
  break;
@@ -1173,16 +1173,16 @@ function wi(t) {
1173
1173
  const Si = 1107713536, gi = 1154362099, Ci = 1185721362;
1174
1174
  function Ai(t) {
1175
1175
  const e = {};
1176
- return Rn(e), e;
1176
+ return bn(e), e;
1177
1177
  }
1178
- function Rn(t) {
1178
+ function bn(t) {
1179
1179
  return t.SetId = 0, t.Name = "", t.ShapeNames = [], t;
1180
1180
  }
1181
1181
  function yi(t, e) {
1182
1182
  const n = e ?? Ai();
1183
- return Rn(n), Ri(t, n), n;
1183
+ return bn(n), bi(t, n), n;
1184
1184
  }
1185
- function Ri(t, e) {
1185
+ function bi(t, e) {
1186
1186
  let n;
1187
1187
  for (; (n = t.next()) !== null; )
1188
1188
  switch (n.fieldId) {
@@ -1198,12 +1198,12 @@ function Ri(t, e) {
1198
1198
  }
1199
1199
  case Ci: {
1200
1200
  if (n.isNull) throw new Error();
1201
- e.ShapeNames = bi(n.asArray());
1201
+ e.ShapeNames = Ri(n.asArray());
1202
1202
  break;
1203
1203
  }
1204
1204
  }
1205
1205
  }
1206
- function bi(t) {
1206
+ function Ri(t) {
1207
1207
  const e = [];
1208
1208
  let n;
1209
1209
  for (; (n = t.next()) !== null; )
@@ -1213,14 +1213,14 @@ function bi(t) {
1213
1213
  const Ni = 76337612, ki = 185396121, Di = 250031587, vi = 388632637, Ui = 417197284, Oi = 469070965, Mi = 470595159, Pi = 594855258, Li = 781727218, Fi = 834078886, Bi = 1043273762, xi = 1236999138, Wi = 1286979607, Gi = 1368629611, Vi = 1715899485, Hi = 1942830531, $i = 1999510636, Ki = 2033288346, Yi = 2079864626, ji = 2142346422, zi = 2232517119, Xi = 2598291686, Ji = 2719718823, Qi = 2810953526, Zi = 2840065720, qi = 2885165957, eo = 3542818975, to = 3586157513, no = 3717933110, ro = 4062655306;
1214
1214
  function tt(t) {
1215
1215
  const e = {};
1216
- return bn(e), e;
1216
+ return Rn(e), e;
1217
1217
  }
1218
- function bn(t) {
1218
+ function Rn(t) {
1219
1219
  return t.ContextType = de.Unknown, t.UserType = fe.Unknown, t.PayloadType = he.Unknown, t.Description = "", t.UserId = "", t.DeviceId = "", t.ProductId = "", t.VersionId = "", t.InstallId = "", t.Locale = "", t.SessionId = -1, t.IsInternal = !1, t.IsReady = !1, t.HasInput = !1, t.ChannelLocale = "", t.EmbeddedSpaceId = "", t.AuthSessionId = "", t.ReceiveAllMessages = !1, t.PreciseJoinedAt = 0n, t.UserAgent = "", t.ClientType = ne.Unknown, t.UniqueSessionId = "", 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;
1220
1220
  }
1221
1221
  function nt(t, e) {
1222
1222
  const n = e ?? tt();
1223
- return bn(n), so(t, n), n;
1223
+ return Rn(n), so(t, n), n;
1224
1224
  }
1225
1225
  function so(t, e) {
1226
1226
  let n;
@@ -1388,15 +1388,15 @@ function io(t) {
1388
1388
  return e;
1389
1389
  }
1390
1390
  const oo = 746516514, ao = 877841741, co = 1175184220, lo = 1368629611, uo = 2341021724, ho = 3167053791, fo = 3632106223, po = 3686066300;
1391
- function Eo(t) {
1391
+ function mo(t) {
1392
1392
  const e = {};
1393
1393
  return Nn(e), e;
1394
1394
  }
1395
1395
  function Nn(t) {
1396
1396
  return t.Type = N.None, t.Uri = "", t.OpcodeGroupsFromServer = g.NONE, t.OpcodeGroupsToServer = g.NONE, t.Priority = 0, t.Description = "", t.AuthTicket = new Uint8Array(0), t.IsUnreliable = !1, t;
1397
1397
  }
1398
- function mo(t, e) {
1399
- const n = e ?? Eo();
1398
+ function Eo(t, e) {
1399
+ const n = e ?? mo();
1400
1400
  return Nn(n), Io(t, n), n;
1401
1401
  }
1402
1402
  function Io(t, e) {
@@ -1445,7 +1445,7 @@ 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, Ro = 3712281496, bo = 3823842552;
1448
+ const _o = 65537, To = 166277978, wo = 1482635149, So = 1559330978, go = 2802434353, Co = 3085883711, Ao = 3669484338, yo = 3707543140, bo = 3712281496, Ro = 3823842552;
1449
1449
  function No(t) {
1450
1450
  const e = {};
1451
1451
  return kn(e), e;
@@ -1500,12 +1500,12 @@ function vo(t, e) {
1500
1500
  e.SpaceId = n.asString();
1501
1501
  break;
1502
1502
  }
1503
- case Ro: {
1503
+ case bo: {
1504
1504
  if (n.isNull) throw new Error();
1505
1505
  e.PrimaryUserId = n.asString();
1506
1506
  break;
1507
1507
  }
1508
- case bo: {
1508
+ case Ro: {
1509
1509
  if (n.isNull) throw new Error();
1510
1510
  e.ChannelInstanceId = n.asString();
1511
1511
  break;
@@ -1520,7 +1520,7 @@ function Oo(t) {
1520
1520
  const e = [];
1521
1521
  let n;
1522
1522
  for (; (n = t.next()) !== null; )
1523
- e.push(mo(n.asObject()));
1523
+ e.push(Eo(n.asObject()));
1524
1524
  return e;
1525
1525
  }
1526
1526
  function Mo(t) {
@@ -1719,11 +1719,11 @@ function fa(t) {
1719
1719
  function pa(t, e) {
1720
1720
  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
1721
  }
1722
- function Ea(t, e) {
1722
+ function ma(t, e) {
1723
1723
  const n = V.create(t);
1724
- return ma(n, e);
1724
+ return Ea(n, e);
1725
1725
  }
1726
- function ma(t, e) {
1726
+ function Ea(t, e) {
1727
1727
  const n = e ?? qn();
1728
1728
  return er(n), Ia(t, n), n;
1729
1729
  }
@@ -1764,7 +1764,7 @@ function _a(t, e, n) {
1764
1764
  }
1765
1765
  function Ta(t, e) {
1766
1766
  const n = le(t, jn);
1767
- return Ea(n, e);
1767
+ return ma(n, e);
1768
1768
  }
1769
1769
  const St = 1, wa = 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;
1770
1770
  function Sa(t) {
@@ -1834,7 +1834,7 @@ function Aa(t, e) {
1834
1834
  }
1835
1835
  case cr: {
1836
1836
  if (n.isNull) throw new Error();
1837
- e.Versions = Ra(n.asArray());
1837
+ e.Versions = ba(n.asArray());
1838
1838
  break;
1839
1839
  }
1840
1840
  case lr: {
@@ -1849,7 +1849,7 @@ function Aa(t, e) {
1849
1849
  }
1850
1850
  case dr: {
1851
1851
  if (n.isNull) throw new Error();
1852
- e.Parameters = ba(n.asArray());
1852
+ e.Parameters = Ra(n.asArray());
1853
1853
  break;
1854
1854
  }
1855
1855
  case hr: {
@@ -1863,21 +1863,21 @@ function ya(t, e, n) {
1863
1863
  const r = ga(t);
1864
1864
  return M(wa, r, St, e, n);
1865
1865
  }
1866
- function Ra(t) {
1866
+ function ba(t) {
1867
1867
  const e = [];
1868
1868
  let n;
1869
1869
  for (; (n = t.next()) !== null; )
1870
1870
  e.push(n.asString());
1871
1871
  return e;
1872
1872
  }
1873
- function ba(t) {
1873
+ function Ra(t) {
1874
1874
  const e = [];
1875
1875
  let n;
1876
1876
  for (; (n = t.next()) !== null; )
1877
1877
  e.push(va(n.asObject()));
1878
1878
  return e;
1879
1879
  }
1880
- const Na = 1, Er = 607861992, mr = 894485888, Ir = 972460562, _r = 1368629611, Tr = 1883521406, wr = 2603556958, Sr = 3609695522, gr = 4075263697, Cr = 4257460908;
1880
+ const Na = 1, mr = 607861992, Er = 894485888, Ir = 972460562, _r = 1368629611, Tr = 1883521406, wr = 2603556958, Sr = 3609695522, gr = 4075263697, Cr = 4257460908;
1881
1881
  function ka(t) {
1882
1882
  const e = {};
1883
1883
  return Ar(e), e;
@@ -1886,7 +1886,7 @@ function Ar(t) {
1886
1886
  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
1887
  }
1888
1888
  function Da(t, e) {
1889
- e.writeBoolField(Er, t.HasDefaultValue), e.writeStringField(mr, 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);
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
1890
  }
1891
1891
  function va(t, e) {
1892
1892
  const n = e ?? ka();
@@ -1896,12 +1896,12 @@ function Ua(t, e) {
1896
1896
  let n;
1897
1897
  for (; (n = t.next()) !== null; )
1898
1898
  switch (n.fieldId) {
1899
- case Er: {
1899
+ case mr: {
1900
1900
  if (n.isNull) throw new Error();
1901
1901
  e.HasDefaultValue = n.asBool();
1902
1902
  break;
1903
1903
  }
1904
- case mr: {
1904
+ case Er: {
1905
1905
  if (n.isNull) throw new Error();
1906
1906
  e.DefaultValueJson = n.asString();
1907
1907
  break;
@@ -1967,7 +1967,7 @@ function xa(t, e, n) {
1967
1967
  const r = Fa(t);
1968
1968
  return M(Oa, r, yr, e, n);
1969
1969
  }
1970
- const Rr = 1, br = 1048602, Nr = 349453957, kr = 703025676, Dr = 3403385840, vr = 3748161056, Ur = 4289118421;
1970
+ const br = 1, Rr = 1048602, Nr = 349453957, kr = 703025676, Dr = 3403385840, vr = 3748161056, Ur = 4289118421;
1971
1971
  function Or(t) {
1972
1972
  const e = {};
1973
1973
  return Mr(e), t && Object.assign(e, t), e;
@@ -1976,7 +1976,7 @@ function Mr(t) {
1976
1976
  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
1977
  }
1978
1978
  function Wa(t) {
1979
- const e = new U(Rr);
1979
+ const e = new U(br);
1980
1980
  return Ga(t, e), e.finish();
1981
1981
  }
1982
1982
  function Ga(t, e) {
@@ -2023,10 +2023,10 @@ function $a(t, e) {
2023
2023
  }
2024
2024
  function Ka(t, e, n) {
2025
2025
  const r = Wa(t);
2026
- return M(br, r, Rr, e, n);
2026
+ return M(Rr, r, br, e, n);
2027
2027
  }
2028
2028
  function Ya(t, e) {
2029
- const n = le(t, br);
2029
+ const n = le(t, Rr);
2030
2030
  return Va(n, e);
2031
2031
  }
2032
2032
  const Pr = 1, ja = 65549;
@@ -2161,7 +2161,7 @@ function fc(t, e) {
2161
2161
  }
2162
2162
  }
2163
2163
  }
2164
- const pc = 65539, Ec = 693643444, mc = 1144553441, Ic = 1497620243, _c = 1559330978, Tc = 1976546434, wc = 1999510636, Sc = 2271236852, gc = 2277643855, Cc = 2469008121, Ac = 3042922213, yc = 3064612128, Rc = 3219210453, bc = 3504054055, Nc = 3678477544, kc = 3696445035, Dc = 3707543140, vc = 3712281496, Uc = 3895362455, Oc = 3897397815, Mc = 4225107827;
2164
+ const pc = 65539, mc = 693643444, Ec = 1144553441, Ic = 1497620243, _c = 1559330978, Tc = 1976546434, wc = 1999510636, Sc = 2271236852, gc = 2277643855, Cc = 2469008121, Ac = 3042922213, yc = 3064612128, bc = 3219210453, Rc = 3504054055, Nc = 3678477544, kc = 3696445035, Dc = 3707543140, vc = 3712281496, Uc = 3895362455, Oc = 3897397815, Mc = 4225107827;
2165
2165
  function Pc(t) {
2166
2166
  const e = {};
2167
2167
  return Vr(e), e;
@@ -2181,12 +2181,12 @@ function Bc(t, e) {
2181
2181
  let n;
2182
2182
  for (; (n = t.next()) !== null; )
2183
2183
  switch (n.fieldId) {
2184
- case Ec: {
2184
+ case mc: {
2185
2185
  if (n.isNull) throw new Error();
2186
2186
  e.FirstUserId = n.asString();
2187
2187
  break;
2188
2188
  }
2189
- case mc: {
2189
+ case Ec: {
2190
2190
  if (n.isNull) throw new Error();
2191
2191
  e.Clients = Wc(n.asDictionary());
2192
2192
  break;
@@ -2236,12 +2236,12 @@ function Bc(t, e) {
2236
2236
  e.ServerRunType = n.asInt32();
2237
2237
  break;
2238
2238
  }
2239
- case Rc: {
2239
+ case bc: {
2240
2240
  if (n.isNull) throw new Error();
2241
2241
  e.OrganisationName = n.asString();
2242
2242
  break;
2243
2243
  }
2244
- case bc: {
2244
+ case Rc: {
2245
2245
  if (n.isNull) throw new Error();
2246
2246
  e.DebugMode = n.asBool();
2247
2247
  break;
@@ -2462,7 +2462,7 @@ function fl(t, e) {
2462
2462
  }
2463
2463
  }
2464
2464
  }
2465
- const pl = 161083277, El = 325678206, ml = 3469892363, Il = 3645544153;
2465
+ const pl = 161083277, ml = 325678206, El = 3469892363, Il = 3645544153;
2466
2466
  function _l(t) {
2467
2467
  const e = {};
2468
2468
  return Yr(e), e;
@@ -2483,12 +2483,12 @@ function wl(t, e) {
2483
2483
  e.StreamId = n.asString();
2484
2484
  break;
2485
2485
  }
2486
- case El: {
2486
+ case ml: {
2487
2487
  if (n.isNull) throw new Error();
2488
2488
  e.ClientSessionId = n.asInt32();
2489
2489
  break;
2490
2490
  }
2491
- case ml: {
2491
+ case El: {
2492
2492
  if (n.isNull) throw new Error();
2493
2493
  e.TrackId = n.asInt32();
2494
2494
  break;
@@ -2511,7 +2511,7 @@ function Xr(t, e, n) {
2511
2511
  const r = gl();
2512
2512
  return M(Sl, r, jr, e, n);
2513
2513
  }
2514
- const Jr = 1, Cl = 65558, Al = 250031587, yl = 1286979607, Rl = 2033288346, bl = 3542818975;
2514
+ const Jr = 1, Cl = 65558, Al = 250031587, yl = 1286979607, bl = 2033288346, Rl = 3542818975;
2515
2515
  function Nl(t) {
2516
2516
  const e = {};
2517
2517
  return kl(e), t && Object.assign(e, t), e;
@@ -2524,7 +2524,7 @@ function Dl(t) {
2524
2524
  return vl(t, e), e.finish();
2525
2525
  }
2526
2526
  function vl(t, e) {
2527
- e.writeStringField(Al, t.Theme), e.writeInt32Field(yl, t.ViewportHeight | 0), e.writeInt32Field(Rl, t.ViewportWidth | 0), e.writeStringField(bl, t.Timezone);
2527
+ e.writeStringField(Al, t.Theme), e.writeInt32Field(yl, t.ViewportHeight | 0), e.writeInt32Field(bl, t.ViewportWidth | 0), e.writeStringField(Rl, t.Timezone);
2528
2528
  }
2529
2529
  function Ul(t, e, n) {
2530
2530
  const r = Dl(t);
@@ -2663,19 +2663,19 @@ function hu(t, e, n) {
2663
2663
  return M(tu, r, as, e, n);
2664
2664
  }
2665
2665
  const cs = 65569, fu = 2838554230, pu = 3673535008;
2666
- function Eu(t) {
2666
+ function mu(t) {
2667
2667
  const e = {};
2668
2668
  return ls(e), e;
2669
2669
  }
2670
2670
  function ls(t) {
2671
2671
  return t.Success = !0, t.ErrorMessage = "", t;
2672
2672
  }
2673
- function mu(t, e) {
2673
+ function Eu(t, e) {
2674
2674
  const n = V.create(t);
2675
2675
  return Iu(n, e);
2676
2676
  }
2677
2677
  function Iu(t, e) {
2678
- const n = e ?? Eu();
2678
+ const n = e ?? mu();
2679
2679
  return ls(n), _u(t, n), n;
2680
2680
  }
2681
2681
  function _u(t, e) {
@@ -2696,10 +2696,10 @@ function _u(t, e) {
2696
2696
  }
2697
2697
  function Tu(t, e) {
2698
2698
  const n = le(t, cs);
2699
- return mu(n, e);
2699
+ return Eu(n, e);
2700
2700
  }
2701
- const us = 65571, wu = 161083277, Su = 317031266, gu = 1093174542, Cu = 1970024675, Au = 2481928696, yu = 2762891795, Ru = 3282782683;
2702
- function bu(t) {
2701
+ const us = 65571, wu = 161083277, Su = 317031266, gu = 1093174542, Cu = 1970024675, Au = 2481928696, yu = 2762891795, bu = 3282782683;
2702
+ function Ru(t) {
2703
2703
  const e = {};
2704
2704
  return ds(e), e;
2705
2705
  }
@@ -2711,7 +2711,7 @@ function Nu(t, e) {
2711
2711
  return ku(n, e);
2712
2712
  }
2713
2713
  function ku(t, e) {
2714
- const n = e ?? bu();
2714
+ const n = e ?? Ru();
2715
2715
  return ds(n), Du(t, n), n;
2716
2716
  }
2717
2717
  function Du(t, e) {
@@ -2748,7 +2748,7 @@ function Du(t, e) {
2748
2748
  e.TrackIndex = n.asInt32();
2749
2749
  break;
2750
2750
  }
2751
- case Ru: {
2751
+ case bu: {
2752
2752
  if (n.isNull) throw new Error();
2753
2753
  e.SourceType = n.asString();
2754
2754
  break;
@@ -2764,7 +2764,7 @@ class Ct extends Error {
2764
2764
  super(e), this.cause = n, this.name = "ConnectionError";
2765
2765
  }
2766
2766
  }
2767
- class b extends Ct {
2767
+ class R extends Ct {
2768
2768
  constructor(e, n) {
2769
2769
  super(e, n), this.name = "AuthenticationError";
2770
2770
  }
@@ -2784,22 +2784,22 @@ class Uu extends Ct {
2784
2784
  super(`Maximum reconnection attempts (${e}) exceeded`), this.name = "MaxRetriesExceededError";
2785
2785
  }
2786
2786
  }
2787
- class Ou extends b {
2787
+ class Ou extends R {
2788
2788
  constructor(e) {
2789
2789
  super(`Channel provisioning timeout after ${e}ms`), this.name = "ProvisioningTimeoutError";
2790
2790
  }
2791
2791
  }
2792
- class Pf extends b {
2792
+ class Wf extends R {
2793
2793
  constructor(e) {
2794
2794
  super(`Channel not found: ${e}`), this.name = "ChannelNotFoundError";
2795
2795
  }
2796
2796
  }
2797
- class Lf extends b {
2797
+ class Gf extends R {
2798
2798
  constructor(e) {
2799
2799
  super(`Space not found for domain: ${e}`), this.name = "SpaceNotFoundError";
2800
2800
  }
2801
2801
  }
2802
- class Ff extends b {
2802
+ class Vf extends R {
2803
2803
  constructor() {
2804
2804
  super("No channels available in this space"), this.name = "NoChannelsError";
2805
2805
  }
@@ -2819,21 +2819,21 @@ function yt(t, e) {
2819
2819
  });
2820
2820
  }
2821
2821
  var Ve = /* @__PURE__ */ ((t) => (t[t.DEBUG = 0] = "DEBUG", t[t.INFO = 1] = "INFO", t[t.WARN = 2] = "WARN", t[t.ERROR = 3] = "ERROR", t[t.NONE = 4] = "NONE", t))(Ve || {});
2822
- let Rt = 1, Fe = null;
2822
+ let bt = 1, Fe = null;
2823
2823
  const rt = /* @__PURE__ */ new Map();
2824
2824
  function hs(t) {
2825
- Rt = t;
2825
+ bt = t;
2826
2826
  }
2827
- function Bf() {
2828
- return Rt;
2827
+ function Hf() {
2828
+ return bt;
2829
2829
  }
2830
2830
  function Mu(t) {
2831
2831
  Fe = t;
2832
2832
  }
2833
- function xf() {
2833
+ function $f() {
2834
2834
  return Fe;
2835
2835
  }
2836
- function Wf(t, e) {
2836
+ function Kf(t, e) {
2837
2837
  return rt.set(t, e ?? {
2838
2838
  minLevel: 2
2839
2839
  /* WARN */
@@ -2851,7 +2851,7 @@ const Pu = {
2851
2851
  function Lu(t, e) {
2852
2852
  return `[${t}] ${e}`;
2853
2853
  }
2854
- function be(t, e, n, r) {
2854
+ function Re(t, e, n, r) {
2855
2855
  const s = (/* @__PURE__ */ new Date()).toISOString(), i = Pu[t], o = {
2856
2856
  timestamp: s,
2857
2857
  level: t,
@@ -2869,7 +2869,7 @@ function be(t, e, n, r) {
2869
2869
  } catch {
2870
2870
  }
2871
2871
  }
2872
- if (Rt <= t) {
2872
+ if (bt <= t) {
2873
2873
  const a = Lu(e, n);
2874
2874
  switch (t) {
2875
2875
  case 0:
@@ -2890,16 +2890,16 @@ function be(t, e, n, r) {
2890
2890
  function P(t) {
2891
2891
  return {
2892
2892
  debug(e, ...n) {
2893
- be(0, t, e, n);
2893
+ Re(0, t, e, n);
2894
2894
  },
2895
2895
  info(e, ...n) {
2896
- be(1, t, e, n);
2896
+ Re(1, t, e, n);
2897
2897
  },
2898
2898
  warn(e, ...n) {
2899
- be(2, t, e, n);
2899
+ Re(2, t, e, n);
2900
2900
  },
2901
2901
  error(e, ...n) {
2902
- be(3, t, e, n);
2902
+ Re(3, t, e, n);
2903
2903
  }
2904
2904
  };
2905
2905
  }
@@ -3522,7 +3522,7 @@ class Vu {
3522
3522
  this.state !== e && (this.state = e, this.config.onStateChange?.(e));
3523
3523
  }
3524
3524
  }
3525
- const Gf = "opus", Vf = 48e3, Hf = 2, $f = 64e3, Hu = 150, Kf = "VP8", $u = 5e6, Yf = 30, Ku = 0.05, Yu = "max-bundle", ju = "require", zu = [], Xu = 16, Ju = 16, Qu = "ikon-data", Zu = !1, qu = 0, G = P("WebRTCConnection");
3525
+ const Yf = "opus", jf = 48e3, zf = 2, Xf = 64e3, Hu = 150, Jf = "VP8", $u = 5e6, Qf = 30, Ku = 0.05, Yu = "max-bundle", ju = "require", zu = [], Xu = 16, Ju = 16, Qu = "ikon-data", Zu = !1, qu = 0, G = P("WebRTCConnection");
3526
3526
  class ed {
3527
3527
  pc = null;
3528
3528
  dataChannel = null;
@@ -3912,11 +3912,68 @@ class td {
3912
3912
  }
3913
3913
  }
3914
3914
  }
3915
- const nd = 5e3, rd = 3e5, Vt = 15e3, Ht = 2e3, $t = 2, ps = 6e4, sd = 5 * 60 * 1e3, id = 10 * 1e3, ge = "ikon.theme", Ce = "ikon.theme-user", od = "ikon.theme-change";
3915
+ const nd = 5e3, rd = 3e5, Vt = 15e3, Ht = 2e3, $t = 2, ps = 6e4, sd = 5 * 60 * 1e3, id = 10 * 1e3, ge = "ikon.theme", Ce = "ikon.theme-user", od = "ikon.theme-change", ad = {
3916
+ slate: ["#475569", "#334155", "#64748b", "#f1f5f9"],
3917
+ gray: ["#4b5563", "#374151", "#6b7280", "#f3f4f6"],
3918
+ zinc: ["#52525b", "#3f3f46", "#71717a", "#f4f4f5"],
3919
+ neutral: ["#525252", "#404040", "#737373", "#f5f5f5"],
3920
+ stone: ["#57534e", "#44403c", "#78716c", "#f5f5f4"],
3921
+ red: ["#dc2626", "#b91c1c", "#ef4444", "#fee2e2"],
3922
+ orange: ["#ea580c", "#c2410c", "#f97316", "#ffedd5"],
3923
+ amber: ["#d97706", "#b45309", "#f59e0b", "#fef3c7"],
3924
+ yellow: ["#ca8a04", "#a16207", "#eab308", "#fef9c3"],
3925
+ lime: ["#65a30d", "#4d7c0f", "#84cc16", "#ecfccb"],
3926
+ green: ["#16a34a", "#15803d", "#22c55e", "#dcfce7"],
3927
+ emerald: ["#059669", "#047857", "#10b981", "#d1fae5"],
3928
+ teal: ["#0d9488", "#0f766e", "#14b8a6", "#ccfbf1"],
3929
+ cyan: ["#0891b2", "#0e7490", "#06b6d4", "#cffafe"],
3930
+ sky: ["#0284c7", "#0369a1", "#0ea5e9", "#e0f2fe"],
3931
+ blue: ["#2563eb", "#1d4ed8", "#3b82f6", "#dbeafe"],
3932
+ indigo: ["#4f46e5", "#4338ca", "#6366f1", "#e0e7ff"],
3933
+ violet: ["#7c3aed", "#6d28d9", "#8b5cf6", "#ede9fe"],
3934
+ purple: ["#9333ea", "#7e22ce", "#a855f7", "#f3e8ff"],
3935
+ fuchsia: ["#c026d3", "#a21caf", "#d946ef", "#fae8ff"],
3936
+ pink: ["#db2777", "#be185d", "#ec4899", "#fce7f3"],
3937
+ rose: ["#e11d48", "#be123c", "#f43f5e", "#ffe4e6"]
3938
+ }, cd = [
3939
+ "--bg-brand-solid",
3940
+ "--bg-brand-solid-hover",
3941
+ "--bg-brand-primary",
3942
+ "--bg-brand-primary-alt",
3943
+ "--bg-brand-secondary",
3944
+ "--border-brand",
3945
+ "--border-brand-alt",
3946
+ "--border-brand-secondary",
3947
+ "--border-brand-solid",
3948
+ "--border-focus-ring",
3949
+ "--border-ring",
3950
+ "--fg-brand-primary",
3951
+ "--fg-brand-primary-alt",
3952
+ "--fg-brand-secondary",
3953
+ "--fg-brand-secondary-hover",
3954
+ "--text-brand-primary",
3955
+ "--text-brand-secondary",
3956
+ "--text-brand-secondary-hover",
3957
+ "--text-brand-tertiary"
3958
+ ];
3959
+ function ld(t, e) {
3960
+ const n = ad[e];
3961
+ if (!n)
3962
+ return;
3963
+ const [r, s, i, o] = n;
3964
+ 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
+ }
3966
+ function ud(t) {
3967
+ for (const e of cd)
3968
+ t.removeProperty(e);
3969
+ }
3916
3970
  function st(t) {
3917
- typeof document < "u" && document.documentElement && document.documentElement.setAttribute("data-theme", t);
3971
+ if (typeof document < "u" && document.documentElement) {
3972
+ 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), ld(i, s)) : (document.documentElement.removeAttribute("data-brand"), ud(i))) : document.documentElement.setAttribute("data-theme", t);
3974
+ }
3918
3975
  }
3919
- function Es() {
3976
+ function ms() {
3920
3977
  return typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
3921
3978
  }
3922
3979
  function He() {
@@ -3925,12 +3982,12 @@ function He() {
3925
3982
  const t = window.localStorage.getItem(Ce);
3926
3983
  if (t) return t;
3927
3984
  const e = window.localStorage.getItem(ge);
3928
- return e || Es();
3985
+ return e || ms();
3929
3986
  }
3930
- function bt() {
3987
+ function Rt() {
3931
3988
  return typeof window > "u" ? { width: 0, height: 0 } : { width: window.innerWidth, height: window.innerHeight };
3932
3989
  }
3933
- function ad() {
3990
+ function dd() {
3934
3991
  if (typeof window > "u" || !window.localStorage)
3935
3992
  return "light";
3936
3993
  const t = window.localStorage.getItem(Ce), e = window.localStorage.getItem(ge);
@@ -3938,21 +3995,21 @@ function ad() {
3938
3995
  const r = t ?? e;
3939
3996
  return st(r), r;
3940
3997
  }
3941
- const n = Es();
3998
+ const n = ms();
3942
3999
  return window.localStorage.setItem(ge, n), st(n), n;
3943
4000
  }
3944
- const cd = {
4001
+ const hd = {
3945
4002
  name: "ikon.client.getTheme",
3946
4003
  description: "Get the currently selected client theme",
3947
4004
  returnType: { kind: "string", nullable: !0 }
3948
4005
  };
3949
- function ld() {
4006
+ function fd() {
3950
4007
  if (typeof window > "u" || !window.localStorage)
3951
4008
  return null;
3952
4009
  const t = window.localStorage.getItem(Ce), e = window.localStorage.getItem(ge);
3953
4010
  return t ?? e ?? null;
3954
4011
  }
3955
- const ud = {
4012
+ const pd = {
3956
4013
  name: "ikon.client.setTheme",
3957
4014
  description: "Update the client UI theme",
3958
4015
  returnType: { kind: "boolean" },
@@ -3961,7 +4018,7 @@ const ud = {
3961
4018
  { name: "persist", type: { kind: "boolean", nullable: !0 }, description: "Whether to persist as user preference" }
3962
4019
  ]
3963
4020
  };
3964
- function dd(t, e) {
4021
+ function md(t, e) {
3965
4022
  if (typeof window > "u" || !window.localStorage || typeof t != "string")
3966
4023
  return !1;
3967
4024
  const n = t.trim().toLowerCase();
@@ -3975,20 +4032,20 @@ function dd(t, e) {
3975
4032
  }
3976
4033
  return st(n), !0;
3977
4034
  }
3978
- const hd = {
4035
+ const Ed = {
3979
4036
  name: "ikon.client.getLanguage",
3980
4037
  description: "Get the browser language preference",
3981
4038
  returnType: { kind: "string" }
3982
4039
  };
3983
- function fd() {
4040
+ function Id() {
3984
4041
  return typeof navigator > "u" ? "en-US" : navigator.language || "en-US";
3985
4042
  }
3986
- const pd = {
4043
+ const _d = {
3987
4044
  name: "ikon.client.getTimezone",
3988
4045
  description: "Get the browser timezone (IANA format)",
3989
4046
  returnType: { kind: "string" }
3990
4047
  };
3991
- function Ed() {
4048
+ function Td() {
3992
4049
  try {
3993
4050
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
3994
4051
  } catch {
@@ -4013,15 +4070,15 @@ function Dt() {
4013
4070
  const t = navigator.maxTouchPoints > 0, e = window.innerWidth <= 1024;
4014
4071
  return t && e ? ne.MobileWeb : ne.DesktopWeb;
4015
4072
  }
4016
- const md = {
4073
+ const wd = {
4017
4074
  name: "ikon.client.getUrl",
4018
4075
  description: "Get the current browser URL path and query string",
4019
4076
  returnType: { kind: "string", nullable: !0 }
4020
4077
  };
4021
- function Id() {
4078
+ function Sd() {
4022
4079
  return typeof window > "u" ? null : window.location.pathname + window.location.search;
4023
4080
  }
4024
- const _d = {
4081
+ const gd = {
4025
4082
  name: "ikon.client.setUrl",
4026
4083
  description: "Update the browser URL without triggering a page reload",
4027
4084
  returnType: { kind: "boolean" },
@@ -4031,7 +4088,7 @@ const _d = {
4031
4088
  { name: "preserveQueryParams", type: { kind: "boolean", nullable: !0 }, description: "If true, preserves existing query parameters when the URL does not contain a query string" }
4032
4089
  ]
4033
4090
  };
4034
- function Td(t, e, n) {
4091
+ function Cd(t, e, n) {
4035
4092
  if (typeof window > "u" || !window.history || typeof t != "string")
4036
4093
  return !1;
4037
4094
  const r = t.trim();
@@ -4044,13 +4101,13 @@ function Td(t, e, n) {
4044
4101
  return !1;
4045
4102
  }
4046
4103
  }
4047
- const wd = {
4104
+ const Ad = {
4048
4105
  name: "ikon.client.vibrate",
4049
4106
  description: "Trigger haptic feedback on supported devices",
4050
4107
  returnType: { kind: "boolean" },
4051
4108
  parameters: [{ name: "pattern", type: { kind: "string" }, description: 'Duration in ms, or comma-separated pattern (e.g., "200" or "100,50,100")' }]
4052
4109
  };
4053
- function Sd(t) {
4110
+ function yd(t) {
4054
4111
  if (typeof navigator > "u" || !navigator.vibrate || typeof t != "string")
4055
4112
  return !1;
4056
4113
  try {
@@ -4061,7 +4118,7 @@ function Sd(t) {
4061
4118
  }
4062
4119
  }
4063
4120
  let Z = null, it = !1, Ne = !1;
4064
- async function gd() {
4121
+ async function bd() {
4065
4122
  if (!(typeof navigator > "u" || !("wakeLock" in navigator)))
4066
4123
  try {
4067
4124
  Z = await navigator.wakeLock.request("screen");
@@ -4069,15 +4126,15 @@ async function gd() {
4069
4126
  }
4070
4127
  }
4071
4128
  function Kt() {
4072
- document.visibilityState === "visible" && it && !Z && gd();
4129
+ document.visibilityState === "visible" && it && !Z && bd();
4073
4130
  }
4074
- const Cd = {
4131
+ const Rd = {
4075
4132
  name: "ikon.client.keepScreenAwake",
4076
4133
  description: "Prevent or allow the screen to sleep",
4077
4134
  returnType: { kind: "boolean" },
4078
4135
  parameters: [{ name: "enabled", type: { kind: "boolean" }, description: "Whether to keep the screen awake" }]
4079
4136
  };
4080
- async function Ad(t) {
4137
+ async function Nd(t) {
4081
4138
  if (typeof navigator > "u" || !("wakeLock" in navigator))
4082
4139
  return !1;
4083
4140
  try {
@@ -4086,15 +4143,15 @@ async function Ad(t) {
4086
4143
  return !1;
4087
4144
  }
4088
4145
  }
4089
- const yd = {
4146
+ const kd = {
4090
4147
  name: "ikon.client.getVisibility",
4091
4148
  description: "Get the current page visibility state",
4092
4149
  returnType: { kind: "string", nullable: !0 }
4093
4150
  };
4094
- function Rd() {
4151
+ function Dd() {
4095
4152
  return typeof document > "u" ? null : document.visibilityState || null;
4096
4153
  }
4097
- const bd = {
4154
+ const vd = {
4098
4155
  name: "ikon.client.scrollTo",
4099
4156
  description: "Scroll the page to a specific position",
4100
4157
  returnType: { kind: "boolean" },
@@ -4104,7 +4161,7 @@ const bd = {
4104
4161
  { name: "smooth", type: { kind: "boolean", nullable: !0 }, description: "Whether to animate the scroll" }
4105
4162
  ]
4106
4163
  };
4107
- function Nd(t, e, n) {
4164
+ function Ud(t, e, n) {
4108
4165
  if (typeof window > "u" || typeof t != "number" || typeof e != "number")
4109
4166
  return !1;
4110
4167
  try {
@@ -4117,12 +4174,12 @@ function Nd(t, e, n) {
4117
4174
  return !1;
4118
4175
  }
4119
4176
  }
4120
- const kd = {
4177
+ const Od = {
4121
4178
  name: "ikon.client.getBatteryLevel",
4122
4179
  description: "Get the current battery level (0-100)",
4123
4180
  returnType: { kind: "number", nullable: !0 }
4124
4181
  };
4125
- async function Dd() {
4182
+ async function Md() {
4126
4183
  if (typeof navigator > "u" || !("getBattery" in navigator))
4127
4184
  return null;
4128
4185
  try {
@@ -4132,23 +4189,23 @@ async function Dd() {
4132
4189
  return null;
4133
4190
  }
4134
4191
  }
4135
- const vd = {
4192
+ const Pd = {
4136
4193
  name: "ikon.client.getNetworkType",
4137
4194
  description: "Get the current network connection type",
4138
4195
  returnType: { kind: "string", nullable: !0 }
4139
4196
  };
4140
- function Ud() {
4197
+ function Ld() {
4141
4198
  if (typeof navigator > "u")
4142
4199
  return null;
4143
4200
  const t = navigator.connection;
4144
4201
  return t && (t.effectiveType || t.type) || null;
4145
4202
  }
4146
- const Od = {
4203
+ const Fd = {
4147
4204
  name: "ikon.client.requestFullscreen",
4148
4205
  description: "Request the browser to enter fullscreen mode",
4149
4206
  returnType: { kind: "boolean" }
4150
4207
  };
4151
- async function Md() {
4208
+ async function Bd() {
4152
4209
  if (typeof document > "u" || !document.documentElement)
4153
4210
  return !1;
4154
4211
  try {
@@ -4158,12 +4215,12 @@ async function Md() {
4158
4215
  return !1;
4159
4216
  }
4160
4217
  }
4161
- const Pd = {
4218
+ const xd = {
4162
4219
  name: "ikon.client.exitFullscreen",
4163
4220
  description: "Exit browser fullscreen mode",
4164
4221
  returnType: { kind: "boolean" }
4165
4222
  };
4166
- function Ld() {
4223
+ function Wd() {
4167
4224
  if (typeof document > "u")
4168
4225
  return !1;
4169
4226
  try {
@@ -4173,12 +4230,12 @@ function Ld() {
4173
4230
  return !1;
4174
4231
  }
4175
4232
  }
4176
- const Fd = {
4233
+ const Gd = {
4177
4234
  name: "ikon.client.logout",
4178
4235
  description: "Clear the auth session and reload the page to return to the login screen",
4179
4236
  returnType: { kind: "boolean" }
4180
4237
  };
4181
- function Bd() {
4238
+ function Vd() {
4182
4239
  if (typeof window > "u" || !window.localStorage)
4183
4240
  return !1;
4184
4241
  try {
@@ -4187,25 +4244,25 @@ function Bd() {
4187
4244
  return !1;
4188
4245
  }
4189
4246
  }
4190
- const xd = [
4191
- { definition: cd, handler: ld },
4192
- { definition: ud, handler: dd },
4247
+ const Hd = [
4193
4248
  { definition: hd, handler: fd },
4194
- { definition: pd, handler: Ed },
4195
- { definition: md, handler: Id },
4249
+ { definition: pd, handler: md },
4250
+ { definition: Ed, handler: Id },
4196
4251
  { definition: _d, handler: Td },
4197
4252
  { definition: wd, handler: Sd },
4198
- { definition: Cd, handler: Ad },
4199
- { definition: yd, handler: Rd },
4200
- { definition: bd, handler: Nd },
4253
+ { definition: gd, handler: Cd },
4254
+ { definition: Ad, handler: yd },
4255
+ { definition: Rd, handler: Nd },
4201
4256
  { definition: kd, handler: Dd },
4202
4257
  { definition: vd, handler: Ud },
4203
4258
  { definition: Od, handler: Md },
4204
4259
  { definition: Pd, handler: Ld },
4205
- { definition: Fd, handler: Bd }
4260
+ { definition: Fd, handler: Bd },
4261
+ { definition: xd, handler: Wd },
4262
+ { definition: Gd, handler: Vd }
4206
4263
  ];
4207
- function Wd(t) {
4208
- const e = xd.map(({ definition: n, handler: r }) => t.register(n, r));
4264
+ function $d(t) {
4265
+ const e = Hd.map(({ definition: n, handler: r }) => t.register(n, r));
4209
4266
  return () => e.forEach((n) => n());
4210
4267
  }
4211
4268
  function ze() {
@@ -4222,14 +4279,14 @@ function $e() {
4222
4279
  return crypto.randomUUID();
4223
4280
  }
4224
4281
  }
4225
- function jf() {
4282
+ function Zf() {
4226
4283
  if (!(typeof localStorage > "u"))
4227
4284
  try {
4228
4285
  localStorage.removeItem(ot);
4229
4286
  } catch {
4230
4287
  }
4231
4288
  }
4232
- function Gd(t) {
4289
+ function Kd(t) {
4233
4290
  try {
4234
4291
  const e = t.split(".");
4235
4292
  return e.length !== 3 ? null : JSON.parse(atob(e[1])).id ?? null;
@@ -4237,8 +4294,8 @@ function Gd(t) {
4237
4294
  return null;
4238
4295
  }
4239
4296
  }
4240
- 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", zf = "https://auth.ikonai.com";
4241
- function ms(t) {
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", qf = "https://auth.ikonai.com";
4298
+ function Es(t) {
4242
4299
  return t === "development" ? ct : at;
4243
4300
  }
4244
4301
  function zt(t) {
@@ -4246,14 +4303,14 @@ function zt(t) {
4246
4303
  const e = typeof import.meta < "u" ? Be.VITE_IKON_BACKEND_URL : void 0;
4247
4304
  return e || (typeof window > "u" ? at : !vt() || window.location.hostname.includes(".dev.") ? ct : at);
4248
4305
  }
4249
- function Xf() {
4306
+ function ep() {
4250
4307
  const t = typeof import.meta < "u" ? Be.VITE_IKON_BACKEND_TYPE : void 0;
4251
4308
  if (t === "development" || t === "production")
4252
4309
  return t;
4253
4310
  const e = typeof import.meta < "u" ? Be.VITE_IKON_BACKEND_URL : void 0;
4254
4311
  return e ? e.includes(".dev.") ? "development" : "production" : typeof window > "u" ? "production" : vt() ? window.location.hostname.includes(".dev.") ? "development" : "production" : "development";
4255
4312
  }
4256
- function Vd(t) {
4313
+ function Yd(t) {
4257
4314
  if (t) return t;
4258
4315
  const e = typeof import.meta < "u" ? Be.VITE_IKON_AUTH_URL : void 0;
4259
4316
  return e || (typeof window > "u" ? Yt : !vt() || window.location.hostname.includes(".dev.") ? jt : Yt);
@@ -4266,8 +4323,8 @@ function Ke() {
4266
4323
  e[n] = r;
4267
4324
  return e;
4268
4325
  }
4269
- const Hd = ["ikon_token", "ikon_provider", "error"];
4270
- function Jf() {
4326
+ const jd = ["ikon_token", "ikon_provider", "error"];
4327
+ function tp() {
4271
4328
  if (typeof window > "u")
4272
4329
  return { parameters: {} };
4273
4330
  const t = window.location.pathname;
@@ -4279,7 +4336,7 @@ function Jf() {
4279
4336
  throw new Error("URL cannot contain both /s/[sessionId] and /c/[channelKey]");
4280
4337
  const i = Ke(), o = {};
4281
4338
  for (const [a, c] of Object.entries(i))
4282
- Hd.includes(a) || (o[a] = c);
4339
+ jd.includes(a) || (o[a] = c);
4283
4340
  return { sessionId: e, channelKey: n, parameters: o };
4284
4341
  }
4285
4342
  function vt() {
@@ -4297,7 +4354,7 @@ function vt() {
4297
4354
  function Ut() {
4298
4355
  return typeof window > "u" ? "" : window.location.pathname.replace(/^\/(s|c)\/[^/]+/, "") || "/";
4299
4356
  }
4300
- function Qf() {
4357
+ function np() {
4301
4358
  if (typeof window > "u") return;
4302
4359
  const t = window.location.pathname, e = t.match(/^\/s\/[^/]+/), n = t.match(/^\/c\/[^/]+/);
4303
4360
  if (e || n) {
@@ -4305,8 +4362,8 @@ function Qf() {
4305
4362
  window.history.replaceState(null, "", r + window.location.search);
4306
4363
  }
4307
4364
  }
4308
- 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, $d = 1e3, Kd = 2, Yd = 6e4, jd = 2e3, re = 3;
4309
- async function zd(t, e, n, r) {
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, zd = 1e3, Xd = 2, Jd = 6e4, Qd = 2e3, Zd = 1e4, re = 3;
4366
+ async function qd(t, e, n, r) {
4310
4367
  if (t)
4311
4368
  try {
4312
4369
  const s = await fetch(`${n}/anonymous`, {
@@ -4320,13 +4377,13 @@ async function zd(t, e, n, r) {
4320
4377
  const i = await s.json();
4321
4378
  if (!i.token)
4322
4379
  return;
4323
- const o = Gd(i.token);
4380
+ const o = Kd(i.token);
4324
4381
  return o ? { userId: o, token: i.token } : void 0;
4325
4382
  } catch {
4326
4383
  return;
4327
4384
  }
4328
4385
  }
4329
- async function Xd(t, e, n, r) {
4386
+ async function eh(t, e, n, r) {
4330
4387
  try {
4331
4388
  const s = await fetch(`${t}/profiles/me?space=${encodeURIComponent(e)}`, {
4332
4389
  method: "GET",
@@ -4359,15 +4416,15 @@ async function _s(t, e, n, r, s, i, o) {
4359
4416
  }, l = await fetch(a, Is(c, i, o));
4360
4417
  if (!l.ok) {
4361
4418
  const h = await l.text().catch(() => "Unknown error");
4362
- throw new b(`Failed to request channel: ${l.status} ${h}`);
4419
+ throw new R(`Failed to request channel: ${l.status} ${h}`);
4363
4420
  }
4364
4421
  return await l.json();
4365
4422
  }
4366
- async function Jd(t, e, n, r) {
4423
+ async function th(t, e, n, r) {
4367
4424
  const s = `${t}/rooms/connect`, i = await fetch(s, Is(e, n, r));
4368
4425
  if (!i.ok) {
4369
4426
  const o = await i.text().catch(() => "Unknown error");
4370
- throw new b(`Backend connect failed: ${i.status} ${o}`);
4427
+ throw new R(`Backend connect failed: ${i.status} ${o}`);
4371
4428
  }
4372
4429
  return i.json();
4373
4430
  }
@@ -4375,35 +4432,35 @@ async function Ts(t, e, n, r, s) {
4375
4432
  const i = Date.now();
4376
4433
  for (; ; ) {
4377
4434
  if (s?.aborted)
4378
- throw new b("Connection aborted");
4435
+ throw new R("Connection aborted");
4379
4436
  if (Date.now() - i >= n)
4380
4437
  throw new Ou(n);
4381
- const a = await Jd(t, e, r, s), c = a.state?.toLowerCase();
4438
+ const a = await th(t, e, r, s), c = a.state?.toLowerCase();
4382
4439
  if (c === "running")
4383
4440
  return a;
4384
4441
  if (c === "provisioning") {
4385
- await yt($d, s);
4442
+ await yt(zd, s);
4386
4443
  continue;
4387
4444
  }
4388
- throw new b(`Unexpected channel state: ${a.state}`);
4445
+ throw new R(`Unexpected channel state: ${a.state}`);
4389
4446
  }
4390
4447
  }
4391
4448
  async function xe(t, e) {
4392
- const n = await fetch(t, { signal: e });
4393
- if (!n.ok) {
4394
- const o = await n.text().catch(() => "Unknown error");
4395
- throw new b(`Failed to connect: ${n.status} ${o}`);
4449
+ const n = AbortSignal.timeout(Zd), r = e ? AbortSignal.any([e, n]) : n, s = await fetch(t, { signal: r });
4450
+ if (!s.ok) {
4451
+ const c = await s.text().catch(() => "Unknown error");
4452
+ throw new R(`Failed to connect: ${s.status} ${c}`);
4396
4453
  }
4397
- const r = await n.arrayBuffer(), s = new Uint8Array(r);
4398
- return { authResponse: await Uo(s) };
4454
+ const i = await s.arrayBuffer(), o = new Uint8Array(i);
4455
+ return { authResponse: await Uo(o) };
4399
4456
  }
4400
4457
  async function ws(t, e, n, r, s) {
4401
4458
  const i = [];
4402
4459
  if (n === "force-proxy" ? e && i.push({ url: e, isProxy: !0 }) : n === "force-direct" ? i.push({ url: t, isProxy: !1 }) : r ? (e && i.push({ url: e, isProxy: !0 }), i.push({ url: t, isProxy: !1 })) : (i.push({ url: t, isProxy: !1 }), e && i.push({ url: e, isProxy: !0 })), i.length === 0)
4403
- throw new b("No connect URL available");
4460
+ throw new R("No connect URL available");
4404
4461
  const o = Date.now();
4405
4462
  let a = 0;
4406
- for (; a < Kd || Date.now() - o < Yd; ) {
4463
+ for (; a < Xd || Date.now() - o < Jd; ) {
4407
4464
  for (const c of i)
4408
4465
  try {
4409
4466
  const l = await xe(c.url, s);
@@ -4411,12 +4468,12 @@ async function ws(t, e, n, r, s) {
4411
4468
  } catch (l) {
4412
4469
  Y.warn(`Auth via ${c.isProxy ? "proxy" : "direct"} URL failed (round ${a + 1}): ${l}`);
4413
4470
  }
4414
- a++, await yt(jd, s);
4471
+ a++, await yt(Qd, s);
4415
4472
  }
4416
- throw new b("Failed to connect after exhausting all URL attempts");
4473
+ throw new R("Failed to connect after exhausting all URL attempts");
4417
4474
  }
4418
- function Qd(t, e) {
4419
- const n = bt();
4475
+ function nh(t, e) {
4476
+ const n = Rt();
4420
4477
  return Po({
4421
4478
  ServerSessionId: "",
4422
4479
  // Server will fill this in
@@ -4450,7 +4507,7 @@ function Qd(t, e) {
4450
4507
  InitialPath: Ut()
4451
4508
  });
4452
4509
  }
4453
- function Zd(t) {
4510
+ function rh(t) {
4454
4511
  return {
4455
4512
  ServerSessionId: t.ServerSessionId,
4456
4513
  ContextType: t.ContextType,
@@ -4483,13 +4540,13 @@ function Zd(t) {
4483
4540
  InitialPath: t.InitialPath
4484
4541
  };
4485
4542
  }
4486
- async function qd(t, e) {
4543
+ async function sh(t, e) {
4487
4544
  const n = `https://${t.host}:${t.httpsPort}`;
4488
4545
  Y.debug(`Authenticating with local server: ${n}`);
4489
4546
  const s = { ...Ke(), ...t.parameters }, i = t.deviceId ?? $e();
4490
4547
  let o = t.userId, a = t.token;
4491
4548
  if (!o) {
4492
- const S = await zd(t.spaceId, i, Vd(t.authUrl), e);
4549
+ const S = await qd(t.spaceId, i, Yd(t.authUrl), e);
4493
4550
  S && (o = S.userId, a = S.token);
4494
4551
  }
4495
4552
  if (o || (o = i, Y.debug("Using deviceId as userId fallback")), t.spaceId && a)
@@ -4500,12 +4557,12 @@ async function qd(t, e) {
4500
4557
  signal: e
4501
4558
  });
4502
4559
  if (!T.ok) {
4503
- const m = await T.text().catch(() => "Unknown error");
4504
- throw new b(`Failed to get or create profile: ${T.status} ${m}`);
4560
+ const E = await T.text().catch(() => "Unknown error");
4561
+ throw new R(`Failed to get or create profile: ${T.status} ${E}`);
4505
4562
  }
4506
4563
  } else
4507
- await Xd(zt(t.backendUrl), t.spaceId, a, e);
4508
- const c = Qd({ ...t, parameters: s }, o), l = Zd(c), p = await fetch(`${n}/connect-token`, {
4564
+ await eh(zt(t.backendUrl), t.spaceId, a, e);
4565
+ const c = nh({ ...t, parameters: s }, o), l = rh(c), p = await fetch(`${n}/connect-token`, {
4509
4566
  method: "POST",
4510
4567
  headers: {
4511
4568
  "Content-Type": "application/json"
@@ -4515,18 +4572,18 @@ async function qd(t, e) {
4515
4572
  });
4516
4573
  if (!p.ok) {
4517
4574
  const S = await p.text().catch(() => "Unknown error");
4518
- throw new b(`Failed to get connect token: ${p.status} ${S}`);
4575
+ throw new R(`Failed to get connect token: ${p.status} ${S}`);
4519
4576
  }
4520
4577
  const d = (await p.json()).token;
4521
4578
  if (!d)
4522
- throw new b("Server did not return a token");
4523
- const E = `${n}/connect?token=${encodeURIComponent(d)}`;
4524
- return xe(E, e);
4579
+ throw new R("Server did not return a token");
4580
+ const m = `${n}/connect?token=${encodeURIComponent(d)}`;
4581
+ return xe(m, e);
4525
4582
  }
4526
- async function eh(t, e, n = "auto", r = !1) {
4583
+ async function ih(t, e, n = "auto", r = !1) {
4527
4584
  if (t.sessionId && t.channelKey)
4528
- throw new b("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
4529
- const s = ms(t.backendType);
4585
+ throw new R("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
4586
+ const s = Es(t.backendType);
4530
4587
  Y.debug(`Authenticating with cloud server: ${s}, space ID: ${t.spaceId}`);
4531
4588
  const i = await fetch(`${s}/auth/api-key`, {
4532
4589
  method: "POST",
@@ -4542,11 +4599,11 @@ async function eh(t, e, n = "auto", r = !1) {
4542
4599
  });
4543
4600
  if (!i.ok) {
4544
4601
  const l = await i.text().catch(() => "Unknown error");
4545
- throw new b(`API key authentication failed: ${i.status} ${l}`);
4602
+ throw new R(`API key authentication failed: ${i.status} ${l}`);
4546
4603
  }
4547
4604
  const a = (await i.json()).token;
4548
4605
  if (!a)
4549
- throw new b("Backend did not return a token");
4606
+ throw new R("Backend did not return a token");
4550
4607
  const c = await fetch(`${s}/profiles/me?space=${encodeURIComponent(t.spaceId)}`, {
4551
4608
  method: "GET",
4552
4609
  headers: {
@@ -4556,11 +4613,11 @@ async function eh(t, e, n = "auto", r = !1) {
4556
4613
  });
4557
4614
  if (!c.ok) {
4558
4615
  const l = await c.text().catch(() => "Unknown error");
4559
- throw new b(`Failed to get or create profile: ${c.status} ${l}`);
4616
+ throw new R(`Failed to get or create profile: ${c.status} ${l}`);
4560
4617
  }
4561
4618
  for (let l = 0; l < re; l++)
4562
4619
  try {
4563
- const p = await _s(s, t.spaceId, t.channelKey, t.parameters, t.sessionId, a, e), h = Ke(), d = bt(), E = {
4620
+ const p = await _s(s, t.spaceId, t.channelKey, t.parameters, t.sessionId, a, e), h = Ke(), d = Rt(), m = {
4564
4621
  code: p.code,
4565
4622
  contextType: de.Plugin,
4566
4623
  userType: t.userType ?? fe.Human,
@@ -4585,9 +4642,9 @@ async function eh(t, e, n = "auto", r = !1) {
4585
4642
  timezone: Nt(),
4586
4643
  isTouchDevice: kt(),
4587
4644
  initialPath: Ut()
4588
- }, S = t.provisioningTimeoutMs ?? ps, T = await Ts(s, E, S, a, e);
4645
+ }, S = t.provisioningTimeoutMs ?? ps, T = await Ts(s, m, S, a, e);
4589
4646
  if (!T.configuration?.url)
4590
- throw new b("Backend did not return a connect URL");
4647
+ throw new R("Backend did not return a connect URL");
4591
4648
  return await ws(
4592
4649
  T.configuration.url,
4593
4650
  T.configuration.proxyUrl,
@@ -4600,12 +4657,12 @@ async function eh(t, e, n = "auto", r = !1) {
4600
4657
  throw p;
4601
4658
  Y.warn(`Provision attempt ${l + 1}/${re} failed, retrying: ${p}`);
4602
4659
  }
4603
- throw new b("Failed to provision after all attempts");
4660
+ throw new R("Failed to provision after all attempts");
4604
4661
  }
4605
- async function th(t, e, n = "auto", r = !1) {
4662
+ async function oh(t, e, n = "auto", r = !1) {
4606
4663
  if (t.sessionId && t.channelKey)
4607
- throw new b("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
4608
- const s = ms(t.backendType), i = t.token;
4664
+ throw new R("Cannot specify both sessionId and channelKey. Use sessionId for precomputed sessions or channelKey to select a channel.");
4665
+ const s = Es(t.backendType), i = t.token;
4609
4666
  Y.debug(`Authenticating with session token to: ${s}, space ID: ${t.spaceId}`);
4610
4667
  const o = await fetch(`${s}/profiles/me?space=${encodeURIComponent(t.spaceId)}`, {
4611
4668
  method: "GET",
@@ -4616,11 +4673,11 @@ async function th(t, e, n = "auto", r = !1) {
4616
4673
  });
4617
4674
  if (!o.ok) {
4618
4675
  const a = await o.text().catch(() => "Unknown error");
4619
- throw new b(`Failed to get or create profile: ${o.status} ${a}`);
4676
+ throw new R(`Failed to get or create profile: ${o.status} ${a}`);
4620
4677
  }
4621
4678
  for (let a = 0; a < re; a++)
4622
4679
  try {
4623
- const c = await _s(s, t.spaceId, t.channelKey, t.parameters, t.sessionId, i, e), l = Ke(), p = bt(), h = {
4680
+ const c = await _s(s, t.spaceId, t.channelKey, t.parameters, t.sessionId, i, e), l = Ke(), p = Rt(), h = {
4624
4681
  code: c.code,
4625
4682
  contextType: de.Browser,
4626
4683
  userType: fe.Human,
@@ -4645,12 +4702,12 @@ async function th(t, e, n = "auto", r = !1) {
4645
4702
  timezone: Nt(),
4646
4703
  isTouchDevice: kt(),
4647
4704
  initialPath: Ut()
4648
- }, d = t.provisioningTimeoutMs ?? ps, E = await Ts(s, h, d, i, e);
4649
- if (!E.configuration?.url)
4650
- throw new b("Backend did not return a connect URL");
4705
+ }, d = t.provisioningTimeoutMs ?? ps, m = await Ts(s, h, d, i, e);
4706
+ if (!m.configuration?.url)
4707
+ throw new R("Backend did not return a connect URL");
4651
4708
  return await ws(
4652
- E.configuration.url,
4653
- E.configuration.proxyUrl,
4709
+ m.configuration.url,
4710
+ m.configuration.proxyUrl,
4654
4711
  n,
4655
4712
  r,
4656
4713
  e
@@ -4660,9 +4717,9 @@ async function th(t, e, n = "auto", r = !1) {
4660
4717
  throw c;
4661
4718
  Y.warn(`Provision attempt ${a + 1}/${re} failed, retrying: ${c}`);
4662
4719
  }
4663
- throw new b("Failed to provision after all attempts");
4720
+ throw new R("Failed to provision after all attempts");
4664
4721
  }
4665
- const nh = "ikon-proxy", rh = "ikon-websocket", sh = "ikon-webtransport", Ss = "ikon-debug", ih = "ikon-lang", oh = "ikon-server-url", Zf = "ikon-git-source", qf = "ikon-git-branch", ah = "ikon-audio", ch = "ikon-video", lh = "ikon-webrtc";
4722
+ const ah = "ikon-proxy", ch = "ikon-websocket", lh = "ikon-webtransport", Ss = "ikon-debug", uh = "ikon-lang", dh = "ikon-server-url", rp = "ikon-git-source", sp = "ikon-git-branch", hh = "ikon-audio", fh = "ikon-video", ph = "ikon-webrtc";
4666
4723
  function Ot(t, e) {
4667
4724
  if (typeof window > "u")
4668
4725
  return null;
@@ -4676,40 +4733,40 @@ function te(t, e) {
4676
4733
  const n = Ot(t);
4677
4734
  return n === "true" ? !0 : n === "false" ? !1 : null;
4678
4735
  }
4679
- function uh(t, e) {
4736
+ function mh(t, e) {
4680
4737
  if (typeof window > "u")
4681
4738
  return;
4682
4739
  const n = new URL(window.location.href);
4683
4740
  n.searchParams.get(t) !== e && (n.searchParams.set(t, e), window.history.replaceState(null, "", n.toString()));
4684
4741
  }
4685
- function dh() {
4686
- return te(nh);
4742
+ function Eh() {
4743
+ return te(ah);
4687
4744
  }
4688
- function hh() {
4689
- return te(rh);
4745
+ function Ih() {
4746
+ return te(ch);
4690
4747
  }
4691
- function fh() {
4692
- return te(sh);
4748
+ function _h() {
4749
+ return te(lh);
4693
4750
  }
4694
- function ph() {
4751
+ function Th() {
4695
4752
  return te(Ss) === !0;
4696
4753
  }
4697
- function ep() {
4698
- return Ot(ih);
4754
+ function ip() {
4755
+ return Ot(uh);
4699
4756
  }
4700
- function Eh() {
4701
- return Ot(oh);
4757
+ function wh() {
4758
+ return Ot(dh);
4702
4759
  }
4703
- function mh() {
4704
- return te(ah);
4760
+ function Sh() {
4761
+ return te(hh);
4705
4762
  }
4706
- function Ih() {
4707
- return te(ch);
4763
+ function gh() {
4764
+ return te(fh);
4708
4765
  }
4709
- function _h() {
4710
- return te(lh);
4766
+ function Ch() {
4767
+ return te(ph);
4711
4768
  }
4712
- const Th = new Uint8Array(0);
4769
+ const Ah = new Uint8Array(0);
4713
4770
  function We(t) {
4714
4771
  switch (t.kind) {
4715
4772
  case "array":
@@ -4769,7 +4826,7 @@ function gs(t, e) {
4769
4826
  }
4770
4827
  return JSON.stringify(t);
4771
4828
  }
4772
- function wh(t, e) {
4829
+ function yh(t, e) {
4773
4830
  const n = (t.parameters ?? []).map((i) => {
4774
4831
  const o = We(i.type), a = Object.prototype.hasOwnProperty.call(i, "defaultValue"), c = a ? gs(i.defaultValue, o) : "";
4775
4832
  return {
@@ -4797,7 +4854,7 @@ function wh(t, e) {
4797
4854
  TypeName: Ae(i.descriptor),
4798
4855
  HasDefaultValue: i.hasDefaultValue,
4799
4856
  DefaultValueJson: i.defaultValueJson,
4800
- DefaultValueData: Th,
4857
+ DefaultValueData: Ah,
4801
4858
  IsEnumerable: !1,
4802
4859
  EnumerableItemTypeName: "",
4803
4860
  Description: i.description ?? ""
@@ -4811,19 +4868,19 @@ function wh(t, e) {
4811
4868
  returnType: r
4812
4869
  };
4813
4870
  }
4814
- function Sh(t, e) {
4871
+ function bh(t, e) {
4815
4872
  return { value: t, data: e };
4816
4873
  }
4817
- class gh extends Error {
4874
+ class Rh extends Error {
4818
4875
  constructor(e, n, r) {
4819
4876
  super(e), this.remoteErrorType = n, this.remoteStackTrace = r, this.name = "FunctionCallError";
4820
4877
  }
4821
4878
  }
4822
- const me = P("FunctionRegistry"), Jt = new Uint8Array(0), Qt = 3e4;
4823
- function Ch(t) {
4879
+ const Ee = P("FunctionRegistry"), Jt = new Uint8Array(0), Qt = 3e4;
4880
+ function Nh(t) {
4824
4881
  return !t || typeof t != "object" ? !1 : t.data instanceof Uint8Array;
4825
4882
  }
4826
- class Ah {
4883
+ class kh {
4827
4884
  functions = /* @__PURE__ */ new Map();
4828
4885
  remoteFunctions = /* @__PURE__ */ new Map();
4829
4886
  pendingCalls = /* @__PURE__ */ new Map();
@@ -4850,7 +4907,7 @@ class Ah {
4850
4907
  * If already connected, sends registration to server immediately.
4851
4908
  */
4852
4909
  register(e, n) {
4853
- const r = wh(e, n);
4910
+ const r = yh(e, n);
4854
4911
  return this.functions.set(e.name, r), this.isConnected && this.config && this.sendRegistration(r), () => this.unregister(e.name);
4855
4912
  }
4856
4913
  /**
@@ -4915,7 +4972,7 @@ class Ah {
4915
4972
  ValueJson: "",
4916
4973
  ValueData: h
4917
4974
  });
4918
- const E = s.parameters[d], S = E ? E.TypeName : this.inferTypeName(h);
4975
+ const m = s.parameters[d], S = m ? m.TypeName : this.inferTypeName(h);
4919
4976
  return et({
4920
4977
  ParameterIndex: d,
4921
4978
  TypeName: S,
@@ -4934,13 +4991,13 @@ class Ah {
4934
4991
  targetIds: [s.clientSessionId]
4935
4992
  });
4936
4993
  return new Promise((h, d) => {
4937
- const E = setTimeout(() => {
4994
+ const m = setTimeout(() => {
4938
4995
  this.pendingCalls.delete(o.toString()), d(new Error(`Function call '${e}' timed out after ${Qt}ms`));
4939
4996
  }, Qt);
4940
4997
  this.pendingCalls.set(o.toString(), {
4941
4998
  resolve: h,
4942
4999
  reject: d,
4943
- timeout: E
5000
+ timeout: m
4944
5001
  }), this.config.sendProtocolMessage(p);
4945
5002
  });
4946
5003
  }
@@ -5005,7 +5062,7 @@ class Ah {
5005
5062
  if (n === g.ACTION_FUNCTION_CALL) {
5006
5063
  const r = ce(e);
5007
5064
  return this.handleFunctionCall(e, r.senderId).catch((s) => {
5008
- me.error("Failed to handle function call:", s);
5065
+ Ee.error("Failed to handle function call:", s);
5009
5066
  }), !0;
5010
5067
  }
5011
5068
  return n === g.ACTION_FUNCTION_RESULT ? (this.handleFunctionResult(e), !0) : n === g.ACTION_FUNCTION_ERROR ? (this.handleFunctionError(e), !0) : !1;
@@ -5013,7 +5070,7 @@ class Ah {
5013
5070
  handleFunctionResult(e) {
5014
5071
  const n = Ya(e), r = n.CallId.toString(), s = this.pendingCalls.get(r);
5015
5072
  if (!s) {
5016
- me.warn(`Received result for unknown call: ${r}`);
5073
+ Ee.warn(`Received result for unknown call: ${r}`);
5017
5074
  return;
5018
5075
  }
5019
5076
  if (this.pendingCalls.delete(r), clearTimeout(s.timeout), n.ResultData && n.ResultData.length > 0 && !n.ResultJson) {
@@ -5026,10 +5083,10 @@ class Ah {
5026
5083
  handleFunctionError(e) {
5027
5084
  const n = Ta(e), r = n.CallId.toString(), s = this.pendingCalls.get(r);
5028
5085
  if (!s) {
5029
- me.warn(`Received error for unknown call: ${r}`);
5086
+ Ee.warn(`Received error for unknown call: ${r}`);
5030
5087
  return;
5031
5088
  }
5032
- this.pendingCalls.delete(r), clearTimeout(s.timeout), s.reject(new gh(n.ErrorMessage, n.ErrorTypeName, n.StackTrace));
5089
+ this.pendingCalls.delete(r), clearTimeout(s.timeout), s.reject(new Rh(n.ErrorMessage, n.ErrorTypeName, n.StackTrace));
5033
5090
  }
5034
5091
  inferTypeName(e) {
5035
5092
  if (e == null)
@@ -5072,7 +5129,7 @@ class Ah {
5072
5129
  async handleFunctionCall(e, n) {
5073
5130
  const r = await Qo(e), s = this.functions.get(r.FunctionName);
5074
5131
  if (!s) {
5075
- me.warn(`Received call for unknown function: ${r.FunctionName}`), this.sendError(r.CallId, r.InstanceId, n, new Error(`Unknown function: ${r.FunctionName}`));
5132
+ Ee.warn(`Received call for unknown function: ${r.FunctionName}`), this.sendError(r.CallId, r.InstanceId, n, new Error(`Unknown function: ${r.FunctionName}`));
5076
5133
  return;
5077
5134
  }
5078
5135
  this.sendAck(r.CallId, r.InstanceId, n), this.executeFunction(s, r, n);
@@ -5094,11 +5151,11 @@ class Ah {
5094
5151
  }
5095
5152
  const i = await e.handler(...s);
5096
5153
  let o = i, a = Jt;
5097
- Ch(i) && (o = i.value, a = new Uint8Array(i.data));
5154
+ Nh(i) && (o = i.value, a = new Uint8Array(i.data));
5098
5155
  const c = gs(o, e.returnType);
5099
5156
  this.sendResult(n.CallId, n.InstanceId, r, e, c, a);
5100
5157
  } catch (s) {
5101
- me.error(`Function ${n.FunctionName} execution failed:`, s), this.sendError(n.CallId, n.InstanceId, r, s instanceof Error ? s : new Error(String(s)));
5158
+ Ee.error(`Function ${n.FunctionName} execution failed:`, s), this.sendError(n.CallId, n.InstanceId, r, s instanceof Error ? s : new Error(String(s)));
5102
5159
  }
5103
5160
  }
5104
5161
  /**
@@ -5163,7 +5220,7 @@ const ye = {
5163
5220
  StopCapture: "ikon.client.stopCapture",
5164
5221
  CaptureImage: "ikon.client.captureImage",
5165
5222
  GetMediaDevices: "ikon.client.getMediaDevices"
5166
- }, yh = {
5223
+ }, Dh = {
5167
5224
  name: ye.StartVideoCapture,
5168
5225
  description: "Start camera or screen capture and stream video frames to the server",
5169
5226
  returnType: { kind: "string" },
@@ -5171,31 +5228,31 @@ const ye = {
5171
5228
  { name: "source", type: { kind: "string", nullable: !0 }, description: "camera or screen" },
5172
5229
  { name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }
5173
5230
  ]
5174
- }, Rh = {
5231
+ }, vh = {
5175
5232
  name: ye.StartAudioCapture,
5176
5233
  description: "Start microphone capture and stream audio frames to the server",
5177
5234
  returnType: { kind: "string" },
5178
5235
  parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
5179
- }, bh = {
5236
+ }, Uh = {
5180
5237
  name: ye.StopCapture,
5181
5238
  description: "Stop a previously started capture by streamId",
5182
5239
  returnType: { kind: "boolean" },
5183
5240
  parameters: [{ name: "streamId", type: { kind: "string" }, description: "Stream ID to stop" }]
5184
- }, Nh = {
5241
+ }, Oh = {
5185
5242
  name: ye.CaptureImage,
5186
5243
  description: "Capture a single image from the camera and return metadata (JSON) plus binary image data",
5187
5244
  returnType: { kind: "string" },
5188
5245
  parameters: [{ name: "optionsJson", type: { kind: "string", nullable: !0 }, description: "JSON encoded capture options" }]
5189
- }, kh = {
5246
+ }, Mh = {
5190
5247
  name: ye.GetMediaDevices,
5191
5248
  description: "Get list of available media input devices",
5192
5249
  returnType: { kind: "string" },
5193
5250
  parameters: []
5194
5251
  };
5195
- function Dh(t, e) {
5252
+ function Ph(t, e) {
5196
5253
  const n = [];
5197
5254
  return n.push(
5198
- t.register(yh, async (r, s) => {
5255
+ t.register(Dh, async (r, s) => {
5199
5256
  if (e.isWebRtcEnabled) {
5200
5257
  const l = e.webRtcSignaling;
5201
5258
  if (!l)
@@ -5210,7 +5267,7 @@ function Dh(t, e) {
5210
5267
  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;
5211
5268
  })
5212
5269
  ), n.push(
5213
- t.register(Rh, async (r) => {
5270
+ t.register(vh, async (r) => {
5214
5271
  if (e.isWebRtcEnabled) {
5215
5272
  const a = e.webRtcSignaling;
5216
5273
  if (!a)
@@ -5225,7 +5282,7 @@ function Dh(t, e) {
5225
5282
  return (await s.audio.startMic({ userGesture: !1, options: i, constraints: i?.constraints })).streamId;
5226
5283
  })
5227
5284
  ), n.push(
5228
- t.register(bh, async (r) => {
5285
+ t.register(Uh, async (r) => {
5229
5286
  if (e.isWebRtcEnabled) {
5230
5287
  const a = e.webRtcSignaling;
5231
5288
  return a && await a.stopCapture(), !0;
@@ -5237,7 +5294,7 @@ function Dh(t, e) {
5237
5294
  return i || o;
5238
5295
  })
5239
5296
  ), n.push(
5240
- t.register(Nh, async (r) => {
5297
+ t.register(Oh, async (r) => {
5241
5298
  const s = e.mediaCapture;
5242
5299
  if (!s)
5243
5300
  throw new Error("Media capture is not available in this environment");
@@ -5249,10 +5306,10 @@ function Dh(t, e) {
5249
5306
  width: i.width,
5250
5307
  height: i.height
5251
5308
  }), a = JSON.stringify({ mime: o.mime, width: o.width, height: o.height });
5252
- return Sh(a, o.data);
5309
+ return bh(a, o.data);
5253
5310
  })
5254
5311
  ), n.push(
5255
- t.register(kh, async () => {
5312
+ t.register(Mh, async () => {
5256
5313
  if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices)
5257
5314
  return JSON.stringify([]);
5258
5315
  const s = (await navigator.mediaDevices.enumerateDevices()).filter((i) => i.kind === "audioinput" || i.kind === "videoinput").map((i) => ({
@@ -5272,8 +5329,8 @@ const Cs = {
5272
5329
  PlaySound: "ikon.client.playSound",
5273
5330
  StopSound: "ikon.client.stopSound"
5274
5331
  }, lt = /* @__PURE__ */ new Map(), ae = /* @__PURE__ */ new Map();
5275
- let vh = 1;
5276
- const Uh = {
5332
+ let Lh = 1;
5333
+ const Fh = {
5277
5334
  name: Cs.PlaySound,
5278
5335
  description: "Play a sound effect",
5279
5336
  returnType: { kind: "string", nullable: !0 },
@@ -5284,7 +5341,7 @@ const Uh = {
5284
5341
  { name: "loop", type: { kind: "boolean", nullable: !0 }, description: "Loop the sound" }
5285
5342
  ]
5286
5343
  };
5287
- function Oh(t, e, n, r) {
5344
+ function Bh(t, e, n, r) {
5288
5345
  if (typeof window > "u" || typeof Audio > "u" || typeof t != "string" || !t.trim())
5289
5346
  return Promise.resolve(null);
5290
5347
  let s = t;
@@ -5298,7 +5355,7 @@ function Oh(t, e, n, r) {
5298
5355
  try {
5299
5356
  const o = new Audio(s), a = typeof n == "number" ? Math.max(0, Math.min(1, n)) : 1;
5300
5357
  o.volume = a, r === !0 && (o.loop = !0);
5301
- const c = `sound-${vh++}`, l = () => {
5358
+ const c = `sound-${Lh++}`, l = () => {
5302
5359
  ae.delete(c), o.removeEventListener("ended", l), o.removeEventListener("error", l);
5303
5360
  };
5304
5361
  o.addEventListener("ended", l), o.addEventListener("error", l), ae.set(c, o), o.play().then(
@@ -5312,13 +5369,13 @@ function Oh(t, e, n, r) {
5312
5369
  }
5313
5370
  });
5314
5371
  }
5315
- const Mh = {
5372
+ const xh = {
5316
5373
  name: Cs.StopSound,
5317
5374
  description: "Stop a playing sound by ID",
5318
5375
  returnType: { kind: "boolean" },
5319
5376
  parameters: [{ name: "playbackId", type: { kind: "string" }, description: "Playback ID from playSound" }]
5320
5377
  };
5321
- function Ph(t) {
5378
+ function Wh(t) {
5322
5379
  if (typeof t != "string")
5323
5380
  return !1;
5324
5381
  const e = ae.get(t);
@@ -5330,7 +5387,7 @@ function Ph(t) {
5330
5387
  return !1;
5331
5388
  }
5332
5389
  }
5333
- function Lh() {
5390
+ function Gh() {
5334
5391
  lt.clear();
5335
5392
  for (const [t, e] of ae) {
5336
5393
  try {
@@ -5340,14 +5397,14 @@ function Lh() {
5340
5397
  ae.delete(t);
5341
5398
  }
5342
5399
  }
5343
- const Fh = [
5344
- { definition: Uh, handler: Oh },
5345
- { definition: Mh, handler: Ph }
5400
+ const Vh = [
5401
+ { definition: Fh, handler: Bh },
5402
+ { definition: xh, handler: Wh }
5346
5403
  ];
5347
- function Bh(t) {
5348
- const e = Fh.map(({ definition: n, handler: r }) => t.register(n, r));
5404
+ function Hh(t) {
5405
+ const e = Vh.map(({ definition: n, handler: r }) => t.register(n, r));
5349
5406
  return () => {
5350
- e.forEach((n) => n()), Lh();
5407
+ e.forEach((n) => n()), Gh();
5351
5408
  };
5352
5409
  }
5353
5410
  const As = () => {
@@ -5355,13 +5412,13 @@ const As = () => {
5355
5412
  return !1;
5356
5413
  const t = navigator.userAgent, e = /iPad|iPhone|iPod/.test(t), n = t.includes("Macintosh") && typeof navigator.maxTouchPoints == "number" && navigator.maxTouchPoints > 1;
5357
5414
  return e || n;
5358
- }, ke = P("Capabilities"), xh = globalThis;
5415
+ }, ke = P("Capabilities"), $h = globalThis;
5359
5416
  function Me() {
5360
5417
  if (typeof SharedArrayBuffer > "u")
5361
5418
  return ke.debug("SharedArrayBuffer not supported: SharedArrayBuffer is undefined"), !1;
5362
5419
  if (typeof Atomics > "u")
5363
5420
  return ke.debug("SharedArrayBuffer not supported: Atomics is undefined"), !1;
5364
- if (xh.crossOriginIsolated === !1)
5421
+ if ($h.crossOriginIsolated === !1)
5365
5422
  return ke.debug("SharedArrayBuffer not supported: crossOriginIsolated is false (missing COOP/COEP headers)"), !1;
5366
5423
  try {
5367
5424
  new SharedArrayBuffer(1);
@@ -5373,7 +5430,7 @@ function Me() {
5373
5430
  function ys(t) {
5374
5431
  return typeof AudioWorkletNode != "function" ? !1 : typeof t.audioWorklet?.addModule == "function";
5375
5432
  }
5376
- function Wh() {
5433
+ function Kh() {
5377
5434
  const r = new ArrayBuffer(882044), s = new DataView(r), i = (a, c) => {
5378
5435
  for (let l = 0; l < c.length; l++)
5379
5436
  s.setUint8(a + l, c.charCodeAt(l));
@@ -5382,13 +5439,13 @@ function Wh() {
5382
5439
  const o = new Blob([r], { type: "audio/wav" });
5383
5440
  return URL.createObjectURL(o);
5384
5441
  }
5385
- class Rs {
5442
+ class bs {
5386
5443
  _silentAudioElement = null;
5387
5444
  get silentAudioElement() {
5388
5445
  return this._silentAudioElement;
5389
5446
  }
5390
5447
  setup(e, n) {
5391
- if (!(typeof document > "u") && (this._silentAudioElement || (this._silentAudioElement = document.createElement("audio"), this._silentAudioElement.src = Wh(), this._silentAudioElement.loop = !0, this._silentAudioElement.volume = 0.01, this._silentAudioElement.play().catch(() => {
5448
+ if (!(typeof document > "u") && (this._silentAudioElement || (this._silentAudioElement = document.createElement("audio"), this._silentAudioElement.src = Kh(), this._silentAudioElement.loop = !0, this._silentAudioElement.volume = 0.01, this._silentAudioElement.play().catch(() => {
5392
5449
  })), typeof navigator < "u" && "mediaSession" in navigator)) {
5393
5450
  const r = e ?? {};
5394
5451
  navigator.mediaSession.metadata = new MediaMetadata({
@@ -5426,7 +5483,7 @@ class Rs {
5426
5483
  }
5427
5484
  }
5428
5485
  }
5429
- function Gh(t) {
5486
+ function Yh(t) {
5430
5487
  return new Worker(
5431
5488
  "" + new URL("assets/audio-playback-worker-Box5TifN.js", import.meta.url).href,
5432
5489
  {
@@ -5435,7 +5492,7 @@ function Gh(t) {
5435
5492
  }
5436
5493
  );
5437
5494
  }
5438
- const De = 48e3, x = 2, bs = 1500, Zt = 512, qt = "playback", Vh = 120, Hh = 300, $h = 4, Kh = 200, Yh = 100, jh = 8e3, zh = 10, Ns = 100, ut = 50, ks = 128, Xh = 20, Jh = !0, J = 1500, Qh = -20, Zh = -100, qh = 200, D = P("IkonAudioPlayback"), ef = () => {
5495
+ const De = 48e3, x = 2, Rs = 1500, Zt = 512, qt = "playback", jh = 120, zh = 300, Xh = 4, Jh = 200, Qh = 100, Zh = 8e3, qh = 10, Ns = 100, ut = 50, ks = 128, ef = 20, tf = !0, J = 1500, nf = -20, rf = -100, sf = 200, D = P("IkonAudioPlayback"), of = () => {
5439
5496
  if (typeof navigator > "u" || typeof window > "u")
5440
5497
  return !1;
5441
5498
  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;
@@ -5447,19 +5504,19 @@ const De = 48e3, x = 2, bs = 1500, Zt = 512, qt = "playback", Vh = 120, Hh = 300
5447
5504
  function Q(t) {
5448
5505
  return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
5449
5506
  }
5450
- function tf(t) {
5507
+ function af(t) {
5451
5508
  return `
5452
5509
  // Audio buffer constants
5453
5510
  const OUTPUT_SAMPLE_RATE_HZ = ${t.outputSampleRateHz};
5454
5511
  const DEFAULT_FRAME_SAMPLES_PER_CHANNEL = Math.max(1, Math.round(OUTPUT_SAMPLE_RATE_HZ * 0.02));
5455
- const BUFFER_TARGET_MIN_MS = ${Vh};
5456
- const BUFFER_TARGET_MAX_MS = ${Hh};
5457
- const JITTER_MULTIPLIER = ${$h};
5458
- const LOCAL_BUFFER_MAX_MS = ${bs};
5459
- const CONTROL_PERIOD_MS = ${Kh};
5460
- const UNDERRUN_JUMP_MS = ${Yh};
5461
- const STABLE_TIME_TO_DECREASE_MS = ${jh};
5462
- const DECREASE_STEP_MS = ${zh};
5512
+ const BUFFER_TARGET_MIN_MS = ${jh};
5513
+ const BUFFER_TARGET_MAX_MS = ${zh};
5514
+ const JITTER_MULTIPLIER = ${Xh};
5515
+ const LOCAL_BUFFER_MAX_MS = ${Rs};
5516
+ const CONTROL_PERIOD_MS = ${Jh};
5517
+ const UNDERRUN_JUMP_MS = ${Qh};
5518
+ const STABLE_TIME_TO_DECREASE_MS = ${Zh};
5519
+ const DECREASE_STEP_MS = ${qh};
5463
5520
  const DEFAULT_STATS_INTERVAL_SAMPLES = OUTPUT_SAMPLE_RATE_HZ;
5464
5521
 
5465
5522
  // Pre-computed reciprocals for division-free calculations
@@ -5478,7 +5535,7 @@ const FADE_OUT_INCREMENT = 1.0 / FADE_OUT_DURATION_SAMPLES;
5478
5535
  const RENDER_QUANTUM_SIZE = ${ks};
5479
5536
 
5480
5537
  // Buffer reduction crossfade constants (align to quantum boundary to avoid partial quanta)
5481
- const BUFFER_REDUCTION_CROSSFADE_MS = ${Xh};
5538
+ const BUFFER_REDUCTION_CROSSFADE_MS = ${ef};
5482
5539
  const BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW = Math.round(OUTPUT_SAMPLE_RATE_HZ * BUFFER_REDUCTION_CROSSFADE_MS / 1000);
5483
5540
  const BUFFER_REDUCTION_CROSSFADE_SAMPLES = Math.ceil(BUFFER_REDUCTION_CROSSFADE_SAMPLES_RAW / RENDER_QUANTUM_SIZE) * RENDER_QUANTUM_SIZE;
5484
5541
 
@@ -5689,7 +5746,7 @@ class IkonAudioPlayerProcessor extends AudioWorkletProcessor {
5689
5746
  this.statsIntervalSamples = Math.max(1, Math.round((OUTPUT_SAMPLE_RATE_HZ * statusIntervalMs) / 1000));
5690
5747
 
5691
5748
  // Normalization config (hardcoded)
5692
- this.normalizationEnabled = ${Jh};
5749
+ this.normalizationEnabled = ${tf};
5693
5750
 
5694
5751
  // Stream states for audio buffer
5695
5752
  this.streams = new Map();
@@ -6419,7 +6476,7 @@ class Mt {
6419
6476
  config;
6420
6477
  enabled = !1;
6421
6478
  stateUnsubscribe = null;
6422
- isMobile = ef();
6479
+ isMobile = of();
6423
6480
  boundVisibilityChange = null;
6424
6481
  boundPageHide = null;
6425
6482
  unlockHandler = null;
@@ -6438,7 +6495,7 @@ class Mt {
6438
6495
  pendingWorkletMessages = [];
6439
6496
  audioWorker = null;
6440
6497
  protocolPort = null;
6441
- mediaSessionHelper = new Rs();
6498
+ mediaSessionHelper = new bs();
6442
6499
  fallbackQueues = /* @__PURE__ */ new Map();
6443
6500
  activeStreams = /* @__PURE__ */ new Set();
6444
6501
  mediaSessionConfig = null;
@@ -6632,23 +6689,23 @@ class Mt {
6632
6689
  if (o < 0)
6633
6690
  continue;
6634
6691
  const a = o * r * s, c = i.frames, l = i.count, h = (i.head - l + J) % J;
6635
- let d = null, E = null;
6692
+ let d = null, m = null;
6636
6693
  for (let u = 0; u < l; u++) {
6637
6694
  const v = (h + u) % J, C = c[v], k = C.samplePosition + Math.max(C.frameSamples, 1);
6638
- if (C.samplePosition <= a && (d = C), k > a && !E && (E = C, C.samplePosition <= a))
6695
+ if (C.samplePosition <= a && (d = C), k > a && !m && (m = C, C.samplePosition <= a))
6639
6696
  break;
6640
6697
  }
6641
6698
  if (!d)
6642
6699
  continue;
6643
6700
  const S = d.samplePosition + Math.max(d.frameSamples, 1);
6644
- if (a > S && !E)
6701
+ if (a > S && !m)
6645
6702
  continue;
6646
- if (!E)
6703
+ if (!m)
6647
6704
  return this._visemeResult.mouthOpenY = d.mouthOpenY, this._visemeResult.mouthForm = d.mouthForm, this._visemeResult;
6648
- const T = d.samplePosition, m = Math.max(d.frameSamples, 1), f = T + m;
6649
- if (d !== E && E.samplePosition > d.samplePosition && f > T) {
6705
+ const T = d.samplePosition, E = Math.max(d.frameSamples, 1), f = T + E;
6706
+ if (d !== m && m.samplePosition > d.samplePosition && f > T) {
6650
6707
  const u = Math.min(1, Math.max(0, (a - T) / (f - T)));
6651
- this._visemeResult.mouthOpenY = d.mouthOpenY + u * (E.mouthOpenY - d.mouthOpenY), this._visemeResult.mouthForm = d.mouthForm + u * (E.mouthForm - d.mouthForm);
6708
+ this._visemeResult.mouthOpenY = d.mouthOpenY + u * (m.mouthOpenY - d.mouthOpenY), this._visemeResult.mouthForm = d.mouthForm + u * (m.mouthForm - d.mouthForm);
6652
6709
  } else
6653
6710
  this._visemeResult.mouthOpenY = d.mouthOpenY, this._visemeResult.mouthForm = d.mouthForm;
6654
6711
  return this._visemeResult;
@@ -6823,7 +6880,7 @@ class Mt {
6823
6880
  URL.revokeObjectURL(this.workletModuleUrl);
6824
6881
  } catch {
6825
6882
  }
6826
- this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([tf({ outputSampleRateHz: this.outputSampleRateHz, outputChannels: x })], { type: "text/javascript" }));
6883
+ this.workletModuleKey = i, this.workletReady = null, this.workletModuleUrl = URL.createObjectURL(new Blob([af({ outputSampleRateHz: this.outputSampleRateHz, outputChannels: x })], { type: "text/javascript" }));
6827
6884
  }
6828
6885
  this.workletReady || (this.workletReady = e.audioWorklet.addModule(this.workletModuleUrl).catch((p) => {
6829
6886
  throw D.warn(`Failed to load AudioWorklet module, falling back: ${Q(p)}`), p;
@@ -6849,8 +6906,8 @@ class Mt {
6849
6906
  const h = p.data;
6850
6907
  if (!(!h || typeof h != "object")) {
6851
6908
  if (h.type === "log") {
6852
- const d = h, E = d.streamId ? ` [stream=${d.streamId.substring(0, 8)}]` : "";
6853
- d.level === "error" ? D.error(`[Worklet]${E} ${d.message}`) : d.level === "warn" ? D.warn(`[Worklet]${E} ${d.message}`) : D.info(`[Worklet]${E} ${d.message}`);
6909
+ const d = h, m = d.streamId ? ` [stream=${d.streamId.substring(0, 8)}]` : "";
6910
+ d.level === "error" ? D.error(`[Worklet]${m} ${d.message}`) : d.level === "warn" ? D.warn(`[Worklet]${m} ${d.message}`) : D.info(`[Worklet]${m} ${d.message}`);
6854
6911
  return;
6855
6912
  }
6856
6913
  if (h.type === "stats") {
@@ -6879,15 +6936,15 @@ class Mt {
6879
6936
  this.stopAudioWorklet(), this.pendingWorkletMessages = [];
6880
6937
  const r = 1024, s = new Float32Array(r * x), i = Math.round(this.outputSampleRateHz * Ns / 1e3), o = Math.round(this.outputSampleRateHz * ut / 1e3), a = 1 / i, c = 1 / o, l = new Array(x), p = [], h = e.createScriptProcessor(r, 0, x);
6881
6938
  h.onaudioprocess = (d) => {
6882
- const E = d.outputBuffer, S = E.numberOfChannels, T = E.length;
6939
+ const m = d.outputBuffer, S = m.numberOfChannels, T = m.length;
6883
6940
  for (let f = 0; f < S; f++) {
6884
- const u = E.getChannelData(f);
6941
+ const u = m.getChannelData(f);
6885
6942
  u.fill(0), l[f] = u;
6886
6943
  }
6887
- let m = 0;
6944
+ let E = 0;
6888
6945
  p.length = 0;
6889
6946
  for (const [f, u] of this.fallbackQueues.entries()) {
6890
- u.totalSamples > 0 && (m += 1), (u.ending || u.inputDrained) && u.fadeDirection !== "out" && u.totalSamples / S * 1e3 / this.outputSampleRateHz <= ut * 2 && (u.fadeDirection = "out"), this.readFromFallbackQueue(u, s), (u.totalSamples > 0 || !u.hasLastOut) && ((!u.lastOut || u.lastOut.length !== s.length) && (u.lastOut = new Float32Array(s.length)), u.lastOut.set(s), u.hasLastOut = !0);
6947
+ u.totalSamples > 0 && (E += 1), (u.ending || u.inputDrained) && u.fadeDirection !== "out" && u.totalSamples / S * 1e3 / this.outputSampleRateHz <= ut * 2 && (u.fadeDirection = "out"), this.readFromFallbackQueue(u, s), (u.totalSamples > 0 || !u.hasLastOut) && ((!u.lastOut || u.lastOut.length !== s.length) && (u.lastOut = new Float32Array(s.length)), u.lastOut.set(s), u.hasLastOut = !0);
6891
6948
  for (let C = 0; C < T; C++) {
6892
6949
  u.fadeDirection === "in" ? (u.fadeGain = Math.min(1, u.fadeGain + a), u.fadeGain >= 1 && (u.fadeDirection = "none")) : u.fadeDirection === "out" && (u.fadeGain = Math.max(0, u.fadeGain - c), u.fadeGain <= 0 && (u.fadeDirection = "none"));
6893
6950
  for (let k = 0; k < S; k++) {
@@ -6922,8 +6979,8 @@ class Mt {
6922
6979
  this.fallbackQueues.delete(f), this.activeStreams.delete(f);
6923
6980
  this.activeStreams.size === 0 && this.removeUnlockHandler();
6924
6981
  }
6925
- if (m > 1) {
6926
- const f = 1 / Math.sqrt(m);
6982
+ if (E > 1) {
6983
+ const f = 1 / Math.sqrt(E);
6927
6984
  for (let u = 0; u < T; u++)
6928
6985
  for (let v = 0; v < S; v++)
6929
6986
  l[v][u] *= f;
@@ -6953,7 +7010,7 @@ class Mt {
6953
7010
  e.totalSamples < 0 && (e.totalSamples = 0), this.compactFallbackQueue(e);
6954
7011
  }
6955
7012
  trimFallbackQueue(e) {
6956
- const n = Math.floor(this.outputSampleRateHz * x * bs / 1e3), r = e.totalSamples - n;
7013
+ const n = Math.floor(this.outputSampleRateHz * x * Rs / 1e3), r = e.totalSamples - n;
6957
7014
  r <= 0 || this.skipFromFallbackQueue(e, r);
6958
7015
  }
6959
7016
  stopScriptProcessorDiagnostics() {
@@ -7074,14 +7131,14 @@ class Mt {
7074
7131
  }
7075
7132
  this.protocolPort = e;
7076
7133
  try {
7077
- this.audioWorker = new Gh();
7134
+ this.audioWorker = new Yh();
7078
7135
  } catch (h) {
7079
7136
  D.warn(`Failed to create audio worker: ${Q(h)}`), this.protocolPort.close(), this.protocolPort = null;
7080
7137
  return;
7081
7138
  }
7082
7139
  const n = this.audioWorker;
7083
7140
  n.addEventListener("message", (h) => this.onAudioWorkerMessage(h.data)), n.addEventListener("error", (h) => {
7084
- const d = [h.message, h.filename, h.lineno, h.colno].filter((E) => E != null && String(E).length > 0);
7141
+ const d = [h.message, h.filename, h.lineno, h.colno].filter((m) => m != null && String(m).length > 0);
7085
7142
  D.error(`Audio worker failed: ${d.join(" ")}`.trim());
7086
7143
  });
7087
7144
  const s = (this.config.performance?.preferSharedArrayBuffer ?? !0) && !!this.audioWorkletNode && Me(), i = this.config.performance?.preferWebCodecs ?? !0, o = {
@@ -7158,7 +7215,7 @@ class Mt {
7158
7215
  s.epochTimestampSamples = e.timestampInterleavedSamples;
7159
7216
  const c = this.audioContext;
7160
7217
  if (c) {
7161
- const l = (c.outputLatency ?? 0) + (c.baseLatency ?? 0), p = Qh + l * 1e3, h = Math.min(qh, Math.max(Zh, p));
7218
+ const l = (c.outputLatency ?? 0) + (c.baseLatency ?? 0), p = nf + l * 1e3, h = Math.min(sf, Math.max(rf, p));
7162
7219
  s.playbackStartContextTime = c.currentTime + h / 1e3;
7163
7220
  }
7164
7221
  s.timingEstablished = !0;
@@ -7281,7 +7338,7 @@ class Mt {
7281
7338
  }));
7282
7339
  }
7283
7340
  }
7284
- function nf(t) {
7341
+ function cf(t) {
7285
7342
  return new Worker(
7286
7343
  "" + new URL("assets/video-playback-worker-CpHuZKgE.js", import.meta.url).href,
7287
7344
  {
@@ -7294,7 +7351,7 @@ const z = P("IkonVideoPlayback");
7294
7351
  function Xe(t) {
7295
7352
  return t instanceof Error ? `${t.name}: ${t.message}` : String(t);
7296
7353
  }
7297
- class rf {
7354
+ class lf {
7298
7355
  client;
7299
7356
  config;
7300
7357
  enabled = !0;
@@ -7369,7 +7426,7 @@ class rf {
7369
7426
  }
7370
7427
  let e;
7371
7428
  try {
7372
- e = new nf();
7429
+ e = new cf();
7373
7430
  } catch (n) {
7374
7431
  z.warn(`Failed to create video worker: ${Xe(n)}`);
7375
7432
  return;
@@ -7508,11 +7565,11 @@ class rf {
7508
7565
  }));
7509
7566
  }
7510
7567
  }
7511
- class sf {
7568
+ class uf {
7512
7569
  audio;
7513
7570
  video;
7514
7571
  constructor(e, n) {
7515
- this.audio = new Mt(e, n?.audio), this.video = new rf(e, n?.video), n?.mediaSession && this.audio.setMediaSession(n.mediaSession);
7572
+ this.audio = new Mt(e, n?.audio), this.video = new lf(e, n?.video), n?.mediaSession && this.audio.setMediaSession(n.mediaSession);
7516
7573
  }
7517
7574
  /**
7518
7575
  * Releases media resources (workers, audio graph, decoders).
@@ -7523,7 +7580,7 @@ class sf {
7523
7580
  this.audio.dispose(), this.video.dispose();
7524
7581
  }
7525
7582
  }
7526
- class of {
7583
+ class df {
7527
7584
  static getStorageForCapacity(e, n) {
7528
7585
  const r = Int32Array.BYTES_PER_ELEMENT * 2, s = n.BYTES_PER_ELEMENT * e;
7529
7586
  return new SharedArrayBuffer(r + s);
@@ -7577,7 +7634,7 @@ class of {
7577
7634
  return r = (r + n) % this.capacity, Atomics.store(this.readWrite, 0, r), n;
7578
7635
  }
7579
7636
  }
7580
- function af(t) {
7637
+ function hf(t) {
7581
7638
  return new Worker(
7582
7639
  "" + new URL("assets/audio-capture-worker-DuKZS6HJ.js", import.meta.url).href,
7583
7640
  {
@@ -7586,11 +7643,11 @@ function af(t) {
7586
7643
  }
7587
7644
  );
7588
7645
  }
7589
- const R = P("IkonAudioCapture"), ve = 3, cf = 200, lf = 2e3, uf = 5e3, tn = 3e3;
7590
- function df(t) {
7646
+ const b = P("IkonAudioCapture"), ve = 3, ff = 200, pf = 2e3, mf = 5e3, tn = 3e3;
7647
+ function Ef(t) {
7591
7648
  return new Promise((e) => setTimeout(e, t));
7592
7649
  }
7593
- function hf(t) {
7650
+ function If(t) {
7594
7651
  switch (t.name) {
7595
7652
  // Transient errors - worth retrying
7596
7653
  case "NotReadableError":
@@ -7615,11 +7672,11 @@ function hf(t) {
7615
7672
  return { action: "fail", reason: "unknown", canRetry: !1 };
7616
7673
  }
7617
7674
  }
7618
- function ff() {
7675
+ function _f() {
7619
7676
  const t = globalThis.crypto;
7620
7677
  return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
7621
7678
  }
7622
- function pf() {
7679
+ function Tf() {
7623
7680
  return `
7624
7681
  class RingBuffer {
7625
7682
  static getStorageForCapacity(capacity, type) {
@@ -7748,7 +7805,7 @@ class IkonAudioCaptureProcessor extends AudioWorkletProcessor {
7748
7805
  registerProcessor('ikon-audio-capture', IkonAudioCaptureProcessor);
7749
7806
  `;
7750
7807
  }
7751
- class Ef {
7808
+ class wf {
7752
7809
  constructor(e, n) {
7753
7810
  this.client = e, this.config = n ?? {}, this.setupDeviceChangeListener();
7754
7811
  }
@@ -7827,7 +7884,7 @@ class Ef {
7827
7884
  if (n.stopped)
7828
7885
  continue;
7829
7886
  const r = n.intendedDeviceId ?? n.track.getSettings().deviceId, s = await this.isMicrophoneAvailable(r ?? void 0);
7830
- n.stopped || s || (R.warn(`Microphone device disconnected, deviceId=${r?.substring(0, 8) ?? "default"}`), this.config.deviceDisconnectPolicy?.autoStop ?? !0 ? this.handleRecoverableError(n, new Error("Microphone device disconnected"), "device-disconnected") : this.notifyError(n, new Error("Microphone device disconnected"), "device-disconnected", !0));
7887
+ n.stopped || s || (b.warn(`Microphone device disconnected, deviceId=${r?.substring(0, 8) ?? "default"}`), this.config.deviceDisconnectPolicy?.autoStop ?? !0 ? this.handleRecoverableError(n, new Error("Microphone device disconnected"), "device-disconnected") : this.notifyError(n, new Error("Microphone device disconnected"), "device-disconnected", !0));
7831
7888
  }
7832
7889
  }
7833
7890
  /**
@@ -7839,7 +7896,7 @@ class Ef {
7839
7896
  if (e.stopped)
7840
7897
  return;
7841
7898
  const i = Date.now(), o = n.name;
7842
- if (e.lastErrorReason === r && e.lastErrorName === o && i - e.lastErrorTime < uf)
7899
+ if (e.lastErrorReason === r && e.lastErrorName === o && i - e.lastErrorTime < mf)
7843
7900
  return;
7844
7901
  e.lastErrorTime = i, e.lastErrorReason = r, e.lastErrorName = o;
7845
7902
  const a = this.config.autoRestartPolicy;
@@ -7847,7 +7904,7 @@ class Ef {
7847
7904
  const c = a.restartableReasons ?? ["track-ended", "device-disconnected"], l = a.maxRestarts ?? 3, p = a.backoffMs ?? [500, 1e3, 2e3];
7848
7905
  if (i - e.lastStableTime > 3e4 && (e.restartCount = 0), c.includes(r) && e.restartCount < l) {
7849
7906
  const d = p[Math.min(e.restartCount, p.length - 1)];
7850
- if (e.restartCount++, R.info(`Auto-restarting capture (attempt ${e.restartCount}/${l}) in ${d}ms, reason=${r}`), this.emitDiagnostic({
7907
+ if (e.restartCount++, b.info(`Auto-restarting capture (attempt ${e.restartCount}/${l}) in ${d}ms, reason=${r}`), this.emitDiagnostic({
7851
7908
  event: "auto-restart",
7852
7909
  captureId: e.captureId,
7853
7910
  details: {
@@ -7862,7 +7919,7 @@ class Ef {
7862
7919
  } catch {
7863
7920
  }
7864
7921
  e.pendingRestartTimer && clearTimeout(e.pendingRestartTimer);
7865
- const E = e.restartCount, S = e.onError, T = {
7922
+ const m = e.restartCount, S = e.onError, T = {
7866
7923
  ...e.originalRequest,
7867
7924
  constraints: e.currentConstraints,
7868
7925
  options: e.currentOptions,
@@ -7870,19 +7927,19 @@ class Ef {
7870
7927
  onStateChange: e.onStateChange
7871
7928
  };
7872
7929
  e.pendingRestartTimer = setTimeout(() => {
7873
- e.pendingRestartTimer = null, !(!e.stopped || e.stoppedReason !== "recoverable-error") && this.startMic(T).then((m) => {
7874
- const f = this.captures.get(m.captureId);
7875
- f && (f.restartCount = E, f.lastStableTime = Date.now());
7876
- }).catch((m) => {
7877
- R.warn(`Auto-restart failed: ${m}`);
7878
- const f = m instanceof Error ? m : new Error(String(m));
7930
+ e.pendingRestartTimer = null, !(!e.stopped || e.stoppedReason !== "recoverable-error") && this.startMic(T).then((E) => {
7931
+ const f = this.captures.get(E.captureId);
7932
+ f && (f.restartCount = m, f.lastStableTime = Date.now());
7933
+ }).catch((E) => {
7934
+ b.warn(`Auto-restart failed: ${E}`);
7935
+ const f = E instanceof Error ? E : new Error(String(E));
7879
7936
  let u = "unknown";
7880
7937
  if (f.name === "NotAllowedError" && (u = "permission-revoked"), S)
7881
7938
  try {
7882
7939
  S(
7883
7940
  new Error(`Auto-restart failed: ${f.message}`),
7884
7941
  u,
7885
- E < l && u !== "permission-revoked"
7942
+ m < l && u !== "permission-revoked"
7886
7943
  );
7887
7944
  } catch {
7888
7945
  }
@@ -7921,7 +7978,7 @@ class Ef {
7921
7978
  return !1;
7922
7979
  const s = Date.now();
7923
7980
  if (!r && s - e.lastResumeAttemptTime < tn)
7924
- return R.debug(`Resume attempt from ${n} skipped (cooldown)`), !1;
7981
+ return b.debug(`Resume attempt from ${n} skipped (cooldown)`), !1;
7925
7982
  e.lastResumeAttemptTime = s, this.emitDiagnostic({
7926
7983
  event: "resume-attempt",
7927
7984
  captureId: e.captureId,
@@ -7936,7 +7993,7 @@ class Ef {
7936
7993
  details: { source: n, success: o, state: i }
7937
7994
  }), o;
7938
7995
  } catch (i) {
7939
- return R.warn(`Failed to resume AudioContext from ${n}: ${i}`), this.emitDiagnostic({
7996
+ return b.warn(`Failed to resume AudioContext from ${n}: ${i}`), this.emitDiagnostic({
7940
7997
  event: "resume-result",
7941
7998
  captureId: e.captureId,
7942
7999
  details: { source: n, success: !1, error: String(i) }
@@ -7956,13 +8013,13 @@ class Ef {
7956
8013
  return;
7957
8014
  const s = Date.now();
7958
8015
  if (!r && s - e.lastResumeAttemptTime < tn) {
7959
- R.debug(`Resume attempt from ${n} skipped (cooldown)`);
8016
+ b.debug(`Resume attempt from ${n} skipped (cooldown)`);
7960
8017
  return;
7961
8018
  }
7962
- e.lastResumeAttemptTime = s, R.info(`Attempting AudioContext resume from ${n}`), e.ctx.resume().then(() => {
7963
- R.debug("AudioContext resumed successfully");
8019
+ e.lastResumeAttemptTime = s, b.info(`Attempting AudioContext resume from ${n}`), e.ctx.resume().then(() => {
8020
+ b.debug("AudioContext resumed successfully");
7964
8021
  }).catch((i) => {
7965
- R.warn(`Failed to resume AudioContext: ${i}`), r && this.notifyError(
8022
+ b.warn(`Failed to resume AudioContext: ${i}`), r && this.notifyError(
7966
8023
  e,
7967
8024
  new Error("AudioContext suspended - user gesture required"),
7968
8025
  "context-suspended",
@@ -7975,7 +8032,7 @@ class Ef {
7975
8032
  if (n.stopped)
7976
8033
  return;
7977
8034
  const s = e.state;
7978
- if (R.debug(`AudioContext state changed to: ${s}`), this.emitDiagnostic({
8035
+ if (b.debug(`AudioContext state changed to: ${s}`), this.emitDiagnostic({
7979
8036
  event: "state-change",
7980
8037
  captureId: n.captureId,
7981
8038
  details: { state: s }
@@ -7989,7 +8046,7 @@ class Ef {
7989
8046
  new Error("AudioContext suspended - user gesture may be required"),
7990
8047
  "context-suspended",
7991
8048
  !0
7992
- )), s === "interrupted" && (R.info("AudioContext interrupted (iOS), waiting for user to return"), this.notifyError(
8049
+ )), s === "interrupted" && (b.info("AudioContext interrupted (iOS), waiting for user to return"), this.notifyError(
7993
8050
  n,
7994
8051
  new Error("Audio interrupted - waiting for user to return"),
7995
8052
  "context-interrupted",
@@ -8003,7 +8060,7 @@ class Ef {
8003
8060
  }
8004
8061
  setupVisibilityChangeListener(e) {
8005
8062
  const n = () => {
8006
- document.visibilityState === "hidden" && !e.stopped ? R.debug("Page hidden - audio may be suspended soon") : document.visibilityState === "visible" && !e.stopped && this.attemptResume(e, "visibilitychange");
8063
+ document.visibilityState === "hidden" && !e.stopped ? b.debug("Page hidden - audio may be suspended soon") : document.visibilityState === "visible" && !e.stopped && this.attemptResume(e, "visibilitychange");
8007
8064
  };
8008
8065
  document.addEventListener("visibilitychange", n), e.visibilityHandler = n;
8009
8066
  }
@@ -8016,9 +8073,9 @@ class Ef {
8016
8073
  */
8017
8074
  setupBFCacheHandlers(e) {
8018
8075
  const n = () => {
8019
- e.stopped || R.debug("Page hiding (BFCache) - audio may be suspended");
8076
+ e.stopped || b.debug("Page hiding (BFCache) - audio may be suspended");
8020
8077
  }, r = (s) => {
8021
- s.persisted && !e.stopped && (R.info("Page restored from BFCache - checking audio state"), e.ctx.state === "suspended" && this.attemptResume(e, "bfcache"));
8078
+ s.persisted && !e.stopped && (b.info("Page restored from BFCache - checking audio state"), e.ctx.state === "suspended" && this.attemptResume(e, "bfcache"));
8022
8079
  };
8023
8080
  window.addEventListener("pagehide", n), window.addEventListener("pageshow", r), e.pagehideHandler = n, e.pageshowHandler = r;
8024
8081
  }
@@ -8075,12 +8132,12 @@ class Ef {
8075
8132
  ensureWorker() {
8076
8133
  if (this.worker)
8077
8134
  return this.worker;
8078
- const e = new af();
8135
+ const e = new hf();
8079
8136
  return this.worker = e, e.addEventListener("message", (n) => {
8080
8137
  const r = n.data;
8081
8138
  if (r?.type === "error") {
8082
8139
  const s = r.error;
8083
- R.warn(`Audio capture worker error: ${s?.name ?? "Error"} ${s?.message ?? ""}`);
8140
+ b.warn(`Audio capture worker error: ${s?.name ?? "Error"} ${s?.message ?? ""}`);
8084
8141
  }
8085
8142
  }), e;
8086
8143
  }
@@ -8122,7 +8179,7 @@ class Ef {
8122
8179
  if (i.stream)
8123
8180
  return { stream: i.stream, constraints: r };
8124
8181
  if (i.errorInfo.action === "fallback-constraints") {
8125
- R.info(`Constraints failed (${i.error.name}), trying fallback constraints`), this.emitDiagnostic({
8182
+ b.info(`Constraints failed (${i.error.name}), trying fallback constraints`), this.emitDiagnostic({
8126
8183
  event: "fallback",
8127
8184
  details: {
8128
8185
  errorName: i.error.name,
@@ -8131,7 +8188,7 @@ class Ef {
8131
8188
  });
8132
8189
  const a = await this.tryGetUserMediaWithRetries(s);
8133
8190
  if (a.stream)
8134
- return R.info("getUserMedia succeeded with fallback constraints"), { stream: a.stream, constraints: s };
8191
+ return b.info("getUserMedia succeeded with fallback constraints"), { stream: a.stream, constraints: s };
8135
8192
  const c = a.error;
8136
8193
  throw c.captureReason = "constraints-failed", c;
8137
8194
  }
@@ -8159,7 +8216,7 @@ class Ef {
8159
8216
  try {
8160
8217
  return { stream: await navigator.mediaDevices.getUserMedia({ audio: e }), error: n, errorInfo: r };
8161
8218
  } catch (i) {
8162
- if (n = i instanceof Error ? i : new Error(String(i)), r = hf(n), R.debug(
8219
+ if (n = i instanceof Error ? i : new Error(String(i)), r = If(n), b.debug(
8163
8220
  `getUserMedia attempt ${s + 1}/${ve} failed: ${n.name} (action: ${r.action})`
8164
8221
  ), this.emitDiagnostic({
8165
8222
  event: "retry",
@@ -8172,8 +8229,8 @@ class Ef {
8172
8229
  }), r.action !== "retry")
8173
8230
  break;
8174
8231
  if (s < ve - 1) {
8175
- const o = cf * (s + 1);
8176
- R.debug(`Retrying getUserMedia in ${o}ms`), await df(o);
8232
+ const o = ff * (s + 1);
8233
+ b.debug(`Retrying getUserMedia in ${o}ms`), await Ef(o);
8177
8234
  }
8178
8235
  }
8179
8236
  return { stream: null, error: n, errorInfo: r };
@@ -8185,7 +8242,7 @@ class Ef {
8185
8242
  async ensureWorklet(e) {
8186
8243
  if (!ys(e))
8187
8244
  throw new Error("AudioWorklet is not supported in this browser");
8188
- if (this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([pf()], { type: "text/javascript" }))), this.workletReady && this.workletContext === e)
8245
+ if (this.workletModuleUrl || (this.workletModuleUrl = URL.createObjectURL(new Blob([Tf()], { type: "text/javascript" }))), this.workletReady && this.workletContext === e)
8189
8246
  try {
8190
8247
  await this.workletReady;
8191
8248
  return;
@@ -8207,7 +8264,7 @@ class Ef {
8207
8264
  throw new Error("Cannot start audio capture before client is connected");
8208
8265
  if (this.client.isWebRtcEnabled)
8209
8266
  return this.startMicWebRtc(e);
8210
- const r = ff(), s = {
8267
+ const r = _f(), s = {
8211
8268
  captureId: r,
8212
8269
  aborted: !1,
8213
8270
  stream: null,
@@ -8247,10 +8304,10 @@ class Ef {
8247
8304
  const d = o.createGain();
8248
8305
  d.gain.value = 0, d.connect(o.destination), s.gain = d;
8249
8306
  const T = Me() ? "sab" : "pcm";
8250
- let m;
8307
+ let E;
8251
8308
  if (T === "sab") {
8252
8309
  const A = Math.floor(o.sampleRate * 10);
8253
- m = of.getStorageForCapacity(A, Float32Array);
8310
+ E = df.getStorageForCapacity(A, Float32Array);
8254
8311
  }
8255
8312
  const f = "microphone", u = this.ensureWorker(), v = e.onStopped;
8256
8313
  u.postMessage({
@@ -8267,21 +8324,21 @@ class Ef {
8267
8324
  preferWebCodecs: this.config.performance?.preferWebCodecs
8268
8325
  },
8269
8326
  transport: T,
8270
- sharedArrayBuffer: m
8327
+ sharedArrayBuffer: E
8271
8328
  }), await new Promise((A, F) => {
8272
8329
  const $ = setTimeout(() => {
8273
- u.removeEventListener("message", Re), F(new Error("Audio capture worker start timeout"));
8274
- }, 1e4), Re = (Ls) => {
8330
+ u.removeEventListener("message", be), F(new Error("Audio capture worker start timeout"));
8331
+ }, 1e4), be = (Ls) => {
8275
8332
  const pe = Ls.data;
8276
8333
  if (pe?.type === "started" && pe.captureId === r)
8277
- clearTimeout($), u.removeEventListener("message", Re), A();
8334
+ clearTimeout($), u.removeEventListener("message", be), A();
8278
8335
  else if (pe?.type === "error" && pe.captureId === r) {
8279
- clearTimeout($), u.removeEventListener("message", Re);
8336
+ clearTimeout($), u.removeEventListener("message", be);
8280
8337
  const Fs = pe.error;
8281
8338
  F(new Error(Fs?.message ?? "Audio capture failed to start"));
8282
8339
  }
8283
8340
  };
8284
- u.addEventListener("message", Re);
8341
+ u.addEventListener("message", be);
8285
8342
  }), i();
8286
8343
  const C = new AudioWorkletNode(o, "ikon-audio-capture", {
8287
8344
  numberOfInputs: 1,
@@ -8290,7 +8347,7 @@ class Ef {
8290
8347
  processorOptions: {
8291
8348
  transport: T,
8292
8349
  channels: 1,
8293
- sharedArrayBuffer: m
8350
+ sharedArrayBuffer: E
8294
8351
  }
8295
8352
  });
8296
8353
  s.worklet = C, h.connect(C), C.connect(d), T === "pcm" && (C.port.onmessage = (A) => {
@@ -8385,9 +8442,9 @@ class Ef {
8385
8442
  };
8386
8443
  this.setupAudioContextStateListener(o, _), this.setupVisibilityChangeListener(_), this.setupBFCacheHandlers(_), _.healthCheckTimer = setInterval(() => {
8387
8444
  this.performHealthCheck(_);
8388
- }, lf);
8445
+ }, pf);
8389
8446
  const X = () => {
8390
- _.stopped || (R.warn(`Microphone track ended unexpectedly, captureId=${r.substring(0, 8)}`), this.handleRecoverableError(_, new Error("Microphone track ended unexpectedly"), "track-ended"));
8447
+ _.stopped || (b.warn(`Microphone track ended unexpectedly, captureId=${r.substring(0, 8)}`), this.handleRecoverableError(_, new Error("Microphone track ended unexpectedly"), "track-ended"));
8391
8448
  };
8392
8449
  return _.trackEndedHandler = X, l.addEventListener("ended", X), this.captures.set(r, _), this.pendingCaptures.delete(r), {
8393
8450
  captureId: r,
@@ -8508,7 +8565,7 @@ class Ef {
8508
8565
  if (e.stopped)
8509
8566
  return;
8510
8567
  if (e.track.readyState !== "live") {
8511
- R.warn(`Health check: track is ${e.track.readyState}, captureId=${e.captureId.substring(0, 8)}`), this.handleRecoverableError(
8568
+ b.warn(`Health check: track is ${e.track.readyState}, captureId=${e.captureId.substring(0, 8)}`), this.handleRecoverableError(
8512
8569
  e,
8513
8570
  new Error(`Microphone track is ${e.track.readyState}`),
8514
8571
  "track-ended"
@@ -8517,19 +8574,19 @@ class Ef {
8517
8574
  }
8518
8575
  const n = e.ctx.state;
8519
8576
  if (n === "closed") {
8520
- R.warn(`Health check: AudioContext closed, captureId=${e.captureId.substring(0, 8)}`), this.notifyError(e, new Error("AudioContext was closed"), "context-closed", !1), e.stop("dispose");
8577
+ b.warn(`Health check: AudioContext closed, captureId=${e.captureId.substring(0, 8)}`), this.notifyError(e, new Error("AudioContext was closed"), "context-closed", !1), e.stop("dispose");
8521
8578
  return;
8522
8579
  }
8523
8580
  n === "suspended" && this.attemptResume(e, "healthcheck"), e.track.readyState === "live" && n === "running" && (e.lastStableTime = Date.now());
8524
8581
  const r = this.config.mutedInputDetection;
8525
8582
  if (e.track.muted) {
8526
- if (R.debug(`Health check: track is muted, captureId=${e.captureId.substring(0, 8)}`), r?.enabled) {
8583
+ if (b.debug(`Health check: track is muted, captureId=${e.captureId.substring(0, 8)}`), r?.enabled) {
8527
8584
  const s = Date.now();
8528
8585
  if (e.mutedSinceTime === null)
8529
8586
  e.mutedSinceTime = s;
8530
8587
  else {
8531
8588
  const i = s - e.mutedSinceTime, o = r.durationMs ?? 5e3;
8532
- i >= o && (R.warn(`Health check: input muted for ${i}ms, captureId=${e.captureId.substring(0, 8)}`), this.notifyError(
8589
+ i >= o && (b.warn(`Health check: input muted for ${i}ms, captureId=${e.captureId.substring(0, 8)}`), this.notifyError(
8533
8590
  e,
8534
8591
  new Error(`Microphone input muted for ${Math.round(i / 1e3)}s`),
8535
8592
  "input-muted",
@@ -8596,9 +8653,9 @@ class Ef {
8596
8653
  return !n || n.stopped ? !1 : this.attemptResumeAsync(n, "userGesture", !0);
8597
8654
  }
8598
8655
  }
8599
- const Te = 1280, we = 720, mf = 30, Ds = "image/jpeg", If = 0.92;
8600
- async function _f(t, e) {
8601
- const n = e.mime ?? Ds, r = e.quality ?? If;
8656
+ const Te = 1280, we = 720, Sf = 30, Ds = "image/jpeg", gf = 0.92;
8657
+ async function Cf(t, e) {
8658
+ const n = e.mime ?? Ds, r = e.quality ?? gf;
8602
8659
  if (typeof OffscreenCanvas < "u" && t instanceof OffscreenCanvas)
8603
8660
  try {
8604
8661
  return await t.convertToBlob({ type: n, quality: r });
@@ -8615,7 +8672,7 @@ async function _f(t, e) {
8615
8672
  );
8616
8673
  });
8617
8674
  }
8618
- class Tf {
8675
+ class Af {
8619
8676
  async acquireCameraStream(e) {
8620
8677
  if (!navigator.mediaDevices)
8621
8678
  throw new Error("Media devices are not available in this environment");
@@ -8637,9 +8694,9 @@ class Tf {
8637
8694
  } catch {
8638
8695
  }
8639
8696
  try {
8640
- await new Promise((E, S) => {
8641
- const T = () => E(), m = () => S(new Error("Failed to load video element"));
8642
- s.addEventListener("loadedmetadata", T, { once: !0 }), s.addEventListener("error", m, { once: !0 });
8697
+ await new Promise((m, S) => {
8698
+ const T = () => m(), E = () => S(new Error("Failed to load video element"));
8699
+ s.addEventListener("loadedmetadata", T, { once: !0 }), s.addEventListener("error", E, { once: !0 });
8643
8700
  });
8644
8701
  try {
8645
8702
  await s.play();
@@ -8650,14 +8707,14 @@ class Tf {
8650
8707
  if (typeof OffscreenCanvas < "u")
8651
8708
  l = new OffscreenCanvas(a, c);
8652
8709
  else {
8653
- const E = document.createElement("canvas");
8654
- E.width = a, E.height = c, l = E;
8710
+ const m = document.createElement("canvas");
8711
+ m.width = a, m.height = c, l = m;
8655
8712
  }
8656
8713
  const p = l.getContext("2d", { alpha: !1 });
8657
8714
  if (!p)
8658
8715
  throw new Error("2D canvas context unavailable");
8659
8716
  p.drawImage(s, 0, 0, a, c);
8660
- const h = await _f(l, e), d = await h.arrayBuffer();
8717
+ const h = await Cf(l, e), d = await h.arrayBuffer();
8661
8718
  return {
8662
8719
  mime: h.type || e.mime || Ds,
8663
8720
  width: a,
@@ -8684,7 +8741,7 @@ class Tf {
8684
8741
  }
8685
8742
  }
8686
8743
  }
8687
- function wf(t) {
8744
+ function yf(t) {
8688
8745
  return new Worker(
8689
8746
  "" + new URL("assets/video-capture-worker-reG7QGzz.js", import.meta.url).href,
8690
8747
  {
@@ -8694,17 +8751,17 @@ function wf(t) {
8694
8751
  );
8695
8752
  }
8696
8753
  const _e = P("IkonVideoCapture");
8697
- function Sf() {
8754
+ function bf() {
8698
8755
  const t = globalThis.crypto;
8699
8756
  return t?.randomUUID ? t.randomUUID() : `cap_${Date.now()}_${Math.floor(Math.random() * 1e9)}`;
8700
8757
  }
8701
- function gf() {
8758
+ function Rf() {
8702
8759
  const t = globalThis.MediaStreamTrackProcessor;
8703
8760
  if (!t)
8704
8761
  throw new Error("MediaStreamTrackProcessor is not available in this browser");
8705
8762
  return t;
8706
8763
  }
8707
- class Cf {
8764
+ class Nf {
8708
8765
  constructor(e) {
8709
8766
  this.client = e;
8710
8767
  }
@@ -8720,7 +8777,7 @@ class Cf {
8720
8777
  ensureWorker() {
8721
8778
  if (this.worker)
8722
8779
  return this.worker;
8723
- const e = new wf();
8780
+ const e = new yf();
8724
8781
  return this.worker = e, e.addEventListener("message", (n) => {
8725
8782
  const r = n.data;
8726
8783
  if (r?.type === "error") {
@@ -8747,7 +8804,7 @@ class Cf {
8747
8804
  async getMediaStream(e) {
8748
8805
  if (!navigator.mediaDevices)
8749
8806
  throw new Error("Media devices are not available in this environment");
8750
- const n = e.constraints ?? {}, r = e.options?.framerate ?? mf;
8807
+ const n = e.constraints ?? {}, r = e.options?.framerate ?? Sf;
8751
8808
  if (e.sourceType === "screen") {
8752
8809
  const a = {
8753
8810
  ...n,
@@ -8826,12 +8883,12 @@ class Cf {
8826
8883
  if (this.client.isWebRtcEnabled && e.sourceType === "screen")
8827
8884
  return this.startScreenWebRtc(e);
8828
8885
  this.ensurePorts();
8829
- const r = Sf(), s = await this.getMediaStream(e), i = s.getVideoTracks()[0];
8886
+ const r = bf(), s = await this.getMediaStream(e), i = s.getVideoTracks()[0];
8830
8887
  if (!i)
8831
8888
  throw s.getTracks().forEach((f) => f.stop()), new Error("No video track available");
8832
8889
  e.sourceType === "screen" && await new Promise((f) => setTimeout(f, 200));
8833
- 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 = gf(), h = new l({ track: i }).readable, d = this.allocateTrackId(), E = this.ensureWorker(), S = e.sourceType, T = e.onStopped;
8834
- E.postMessage(
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 = Rf(), h = new l({ track: i }).readable, d = this.allocateTrackId(), m = this.ensureWorker(), S = e.sourceType, T = e.onStopped;
8891
+ m.postMessage(
8835
8892
  {
8836
8893
  type: "start",
8837
8894
  captureId: r,
@@ -8852,7 +8909,7 @@ class Cf {
8852
8909
  },
8853
8910
  [h]
8854
8911
  );
8855
- const m = {
8912
+ const E = {
8856
8913
  captureId: r,
8857
8914
  trackId: d,
8858
8915
  stream: s,
@@ -8861,13 +8918,13 @@ class Cf {
8861
8918
  stopped: !1,
8862
8919
  currentOptions: e.options,
8863
8920
  stop: async () => {
8864
- if (!m.stopped) {
8865
- m.stopped = !0, this.captures.delete(r), m.dimensionCheckInterval && (clearInterval(m.dimensionCheckInterval), m.dimensionCheckInterval = void 0);
8921
+ if (!E.stopped) {
8922
+ E.stopped = !0, this.captures.delete(r), E.dimensionCheckInterval && (clearInterval(E.dimensionCheckInterval), E.dimensionCheckInterval = void 0);
8866
8923
  try {
8867
8924
  s.getTracks().forEach((f) => f.stop());
8868
8925
  } catch {
8869
8926
  }
8870
- if (E.postMessage({ type: "stop", captureId: r }), T)
8927
+ if (m.postMessage({ type: "stop", captureId: r }), T)
8871
8928
  try {
8872
8929
  T();
8873
8930
  } catch {
@@ -8875,9 +8932,9 @@ class Cf {
8875
8932
  }
8876
8933
  },
8877
8934
  updateOptions: async (f) => {
8878
- if (!m.stopped) {
8879
- if (m.sourceType === "camera") {
8880
- const u = f.width !== void 0 && f.width !== m.currentOptions?.width, v = f.height !== void 0 && f.height !== m.currentOptions?.height, C = f.framerate !== void 0 && f.framerate !== m.currentOptions?.framerate;
8935
+ if (!E.stopped) {
8936
+ if (E.sourceType === "camera") {
8937
+ const u = f.width !== void 0 && f.width !== E.currentOptions?.width, v = f.height !== void 0 && f.height !== E.currentOptions?.height, C = f.framerate !== void 0 && f.framerate !== E.currentOptions?.framerate;
8881
8938
  if (u || v || C)
8882
8939
  try {
8883
8940
  const k = {};
@@ -8886,19 +8943,19 @@ class Cf {
8886
8943
  _e.warn(`Failed to apply camera constraints: ${k}`);
8887
8944
  }
8888
8945
  }
8889
- m.currentOptions = f, E.postMessage({ type: "updateOptions", captureId: r, options: f });
8946
+ E.currentOptions = f, m.postMessage({ type: "updateOptions", captureId: r, options: f });
8890
8947
  }
8891
8948
  }
8892
8949
  };
8893
8950
  if (e.sourceType === "screen") {
8894
8951
  let f = a, u = c;
8895
- m.dimensionCheckInterval = setInterval(() => {
8896
- if (m.stopped) {
8897
- m.dimensionCheckInterval && (clearInterval(m.dimensionCheckInterval), m.dimensionCheckInterval = void 0);
8952
+ E.dimensionCheckInterval = setInterval(() => {
8953
+ if (E.stopped) {
8954
+ E.dimensionCheckInterval && (clearInterval(E.dimensionCheckInterval), E.dimensionCheckInterval = void 0);
8898
8955
  return;
8899
8956
  }
8900
8957
  const v = i.getSettings(), C = v.width ?? f, k = v.height ?? u;
8901
- (C !== f || k !== u) && (f = C, u = k, E.postMessage({
8958
+ (C !== f || k !== u) && (f = C, u = k, m.postMessage({
8902
8959
  type: "updateDimensions",
8903
8960
  captureId: r,
8904
8961
  width: C,
@@ -8907,16 +8964,16 @@ class Cf {
8907
8964
  }, 1e3);
8908
8965
  }
8909
8966
  return i.addEventListener("ended", () => {
8910
- m.stop();
8911
- }), this.captures.set(r, m), {
8967
+ E.stop();
8968
+ }), this.captures.set(r, E), {
8912
8969
  captureId: r,
8913
8970
  streamId: r,
8914
8971
  sourceType: e.sourceType,
8915
8972
  get currentOptions() {
8916
- return m.currentOptions;
8973
+ return E.currentOptions;
8917
8974
  },
8918
- stop: m.stop,
8919
- updateOptions: m.updateOptions
8975
+ stop: E.stop,
8976
+ updateOptions: E.updateOptions
8920
8977
  };
8921
8978
  }
8922
8979
  async startCamera(e) {
@@ -8946,12 +9003,12 @@ class Cf {
8946
9003
  this.protocolPort?.close(), this.protocolPort = null, this.sendPort?.close(), this.sendPort = null;
8947
9004
  }
8948
9005
  }
8949
- class Af {
9006
+ class kf {
8950
9007
  audio;
8951
9008
  video;
8952
9009
  image;
8953
9010
  constructor(e, n) {
8954
- this.audio = new Ef(e, n?.audio), this.video = new Cf(e), this.image = new Tf();
9011
+ this.audio = new wf(e, n?.audio), this.video = new Nf(e), this.image = new Af();
8955
9012
  }
8956
9013
  dispose() {
8957
9014
  this.audio.dispose(), this.video.dispose();
@@ -8959,16 +9016,16 @@ class Af {
8959
9016
  }
8960
9017
  const vs = P("DebugMode");
8961
9018
  let se = !1;
8962
- function yf() {
8963
- return se = ph(), se && (hs(Ve.DEBUG), vs.warn("Debug mode enabled")), se;
9019
+ function Df() {
9020
+ return se = Th(), se && (hs(Ve.DEBUG), vs.warn("Debug mode enabled")), se;
8964
9021
  }
8965
- function Rf() {
9022
+ function vf() {
8966
9023
  return se;
8967
9024
  }
8968
- function bf() {
8969
- se || (se = !0, hs(Ve.DEBUG), vs.warn("Debug mode enabled"), uh(Ss, "true"));
9025
+ function Uf() {
9026
+ se || (se = !0, hs(Ve.DEBUG), vs.warn("Debug mode enabled"), mh(Ss, "true"));
8970
9027
  }
8971
- function Nf(t) {
9028
+ function Of(t) {
8972
9029
  return new Worker(
8973
9030
  "" + new URL("assets/protocol-worker-C3oOno6C.js", import.meta.url).href,
8974
9031
  {
@@ -8983,7 +9040,7 @@ const nn = {
8983
9040
  [N.WebTransportProxy]: 2,
8984
9041
  [N.WebSocketProxy]: 3
8985
9042
  }, 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";
8986
- class kf {
9043
+ class Mf {
8987
9044
  isLocal;
8988
9045
  _proxyMode;
8989
9046
  _websocket;
@@ -9096,10 +9153,10 @@ class kf {
9096
9153
  }
9097
9154
  }
9098
9155
  const I = P("IkonClient");
9099
- function Df() {
9156
+ function Pf() {
9100
9157
  return typeof __IKON_WAIT_FOR_EXTERNAL_CONNECT_URL__ < "u" && __IKON_WAIT_FOR_EXTERNAL_CONNECT_URL__;
9101
9158
  }
9102
- class tp {
9159
+ class op {
9103
9160
  channelManager = null;
9104
9161
  protocolWorker = null;
9105
9162
  workerManagerState = null;
@@ -9158,7 +9215,7 @@ class tp {
9158
9215
  _reconnectTimer = null;
9159
9216
  _serverStopped = !1;
9160
9217
  // External connect URL mode
9161
- _waitForExternalConnectUrl = Df();
9218
+ _waitForExternalConnectUrl = Pf();
9162
9219
  _externalConnectUrlCleanup = null;
9163
9220
  /**
9164
9221
  * SDK-provided media pipelines (audio/video).
@@ -9236,28 +9293,28 @@ class tp {
9236
9293
  throw new Error('IkonClient requires one of: "local", "apiKey", or "sessionToken" configuration');
9237
9294
  if (n > 1)
9238
9295
  throw new Error('IkonClient accepts only one of: "local", "apiKey", or "sessionToken" configuration');
9239
- ze() && ad();
9240
- const r = e.local ? null : dh() ?? e.proxy ?? null, s = r === !0 ? "force-proxy" : r === !1 ? "force-direct" : "auto", i = e.local ? null : hh(), o = e.local ? null : fh(), a = i ?? e.websocket, c = o ?? e.webtransport;
9241
- this.endpointSelector = new kf({
9296
+ ze() && dd();
9297
+ const r = e.local ? null : Eh() ?? e.proxy ?? null, s = r === !0 ? "force-proxy" : r === !1 ? "force-direct" : "auto", i = e.local ? null : Ih(), o = e.local ? null : _h(), a = i ?? e.websocket, c = o ?? e.webtransport;
9298
+ this.endpointSelector = new Mf({
9242
9299
  local: e.local,
9243
9300
  proxyMode: s,
9244
9301
  websocket: a,
9245
9302
  webtransport: c
9246
- }), 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 Ah(), ze() && !e.disableBrowserFunctions && (this.unregisterBrowserFunctions = Wd(this._functionRegistry), this.unregisterSoundFunctions = Bh(this._functionRegistry));
9247
- const l = mh(), p = Ih(), h = _h();
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 kh(), ze() && !e.disableBrowserFunctions && (this.unregisterBrowserFunctions = $d(this._functionRegistry), this.unregisterSoundFunctions = Hh(this._functionRegistry));
9304
+ const l = Sh(), p = gh(), h = Ch();
9248
9305
  this._audioEnabled = l ?? e.audio?.enabled ?? !0, this._videoEnabled = p ?? e.video?.enabled ?? !0;
9249
9306
  const d = e.audio ? {
9250
9307
  performance: e.audio.performance,
9251
9308
  background: e.audio.background,
9252
9309
  diagnostics: e.audio.diagnostics
9253
- } : void 0, E = e.video ? { performance: e.video.performance } : void 0;
9254
- this._media = new sf(this, { audio: d, video: E, 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 Af(this, {
9310
+ } : void 0, m = e.video ? { performance: e.video.performance } : void 0;
9311
+ this._media = new uf(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 kf(this, {
9255
9312
  audio: {
9256
9313
  performance: {
9257
9314
  preferWebCodecs: e.audio?.performance?.preferWebCodecs
9258
9315
  }
9259
9316
  }
9260
- }), this.unregisterMediaCaptureFunctions = Dh(this._functionRegistry, this));
9317
+ }), this.unregisterMediaCaptureFunctions = Ph(this._functionRegistry, this));
9261
9318
  }
9262
9319
  _lastError = void 0;
9263
9320
  /**
@@ -9302,7 +9359,7 @@ class tp {
9302
9359
  if (this.currentState !== "idle")
9303
9360
  throw new Error(`Cannot connect: already in state ${this.currentState}`);
9304
9361
  this.setupLifecycleHandlers();
9305
- const e = Eh();
9362
+ const e = wh();
9306
9363
  if (e) {
9307
9364
  I.info("Found external connect URL in query parameter"), await this.executeConnection(() => xe(e, this.abortController.signal));
9308
9365
  return;
@@ -9542,13 +9599,13 @@ class tp {
9542
9599
  async authenticate() {
9543
9600
  const e = this.abortController?.signal;
9544
9601
  if (this.config.local)
9545
- return qd(this.config.local, e);
9602
+ return sh(this.config.local, e);
9546
9603
  const n = this.endpointSelector.proxyMode, r = this.endpointSelector.proxyPreferred;
9547
9604
  let s;
9548
9605
  if (this.config.apiKey)
9549
- s = await eh(this.config.apiKey, e, n, r);
9606
+ s = await ih(this.config.apiKey, e, n, r);
9550
9607
  else if (this.config.sessionToken)
9551
- s = await th(this.config.sessionToken, e, n, r);
9608
+ s = await oh(this.config.sessionToken, e, n, r);
9552
9609
  else
9553
9610
  throw new Error("No connection configuration provided (need local, apiKey, or sessionToken)");
9554
9611
  return s.usedProxyUrl && n === "auto" && this.endpointSelector.markProxyPreferred(), s;
@@ -9565,7 +9622,7 @@ class tp {
9565
9622
  return;
9566
9623
  }
9567
9624
  n === g.CORE_GLOBAL_STATE && xc(e).then((s) => {
9568
- this._globalState = s, this._sessionId !== void 0 && this._functionRegistry.syncFromGlobalState(s, this._sessionId), this._globalState.DebugMode && bf(), Rf() && this.protocolWorker && this.protocolWorker.postMessage({ type: "enableDevtools", enabled: !0 }), this._globalStateReceived || (this._globalStateReceived = !0, this.tryHandleJoined());
9625
+ this._globalState = s, this._sessionId !== void 0 && this._functionRegistry.syncFromGlobalState(s, this._sessionId), this._globalState.DebugMode && Uf(), vf() && this.protocolWorker && this.protocolWorker.postMessage({ type: "enableDevtools", enabled: !0 }), this._globalStateReceived || (this._globalStateReceived = !0, this.tryHandleJoined());
9569
9626
  }).catch((s) => {
9570
9627
  I.error("Failed to parse GlobalState:", s);
9571
9628
  }), this.notifyMessageSubscribers(e, n, r);
@@ -9668,43 +9725,43 @@ class tp {
9668
9725
  }
9669
9726
  let r;
9670
9727
  try {
9671
- r = new Nf();
9728
+ r = new Of();
9672
9729
  } catch (h) {
9673
9730
  I.warn(`Failed to create protocol worker, falling back to main thread: ${h}`), await this.connectProtocolOnMainThread(e, n);
9674
9731
  return;
9675
9732
  }
9676
9733
  this.channelManager = null, this.protocolWorker = r, this.workerManagerState = "idle";
9677
9734
  const s = new Promise((h, d) => {
9678
- let E = !1;
9735
+ let m = !1;
9679
9736
  const S = (T) => {
9680
- const m = T.data;
9681
- if (m?.type === "protocol" && m.message instanceof ArrayBuffer) {
9682
- const f = new Uint8Array(m.message);
9737
+ const E = T.data;
9738
+ if (E?.type === "protocol" && E.message instanceof ArrayBuffer) {
9739
+ const f = new Uint8Array(E.message);
9683
9740
  this.handleProtocolMessage(f);
9684
9741
  return;
9685
9742
  }
9686
- if (m?.type === "state") {
9687
- const f = m.state;
9743
+ if (E?.type === "state") {
9744
+ const f = E.state;
9688
9745
  this.workerManagerState = f;
9689
- const u = m.activeType;
9690
- u !== void 0 && this.endpointSelector.rememberWorkingType(u), this.handleChannelManagerStateChange(f), f === "connected" && !E && (E = !0, h());
9746
+ const u = E.activeType;
9747
+ u !== void 0 && this.endpointSelector.rememberWorkingType(u), this.handleChannelManagerStateChange(f), f === "connected" && !m && (m = !0, h());
9691
9748
  return;
9692
9749
  }
9693
- if (m?.type === "error") {
9694
- const f = m.error, u = new Error(String(f?.message ?? "Worker error"));
9750
+ if (E?.type === "error") {
9751
+ const f = E.error, u = new Error(String(f?.message ?? "Worker error"));
9695
9752
  u.name = String(f?.name ?? "Error"), d(u);
9696
9753
  }
9697
9754
  };
9698
9755
  r.addEventListener("message", S), r.addEventListener("error", (T) => {
9699
- const m = [T.message, T.filename, T.lineno, T.colno].filter((f) => f != null && String(f).length > 0);
9700
- if (E) {
9756
+ const E = [T.message, T.filename, T.lineno, T.colno].filter((f) => f != null && String(f).length > 0);
9757
+ if (m) {
9701
9758
  I.error("Protocol worker crashed after connect"), this.workerManagerState = "offline", this.handleChannelManagerStateChange("offline");
9702
9759
  return;
9703
9760
  }
9704
- d(new Error(`Protocol worker failed: ${m.join(" ")}`.trim()));
9761
+ d(new Error(`Protocol worker failed: ${E.join(" ")}`.trim()));
9705
9762
  });
9706
9763
  }), i = this.computeOrderedEndpointTypes(e), o = this.config.timeouts?.keepaliveTimeoutMs ?? Vt, a = this.config.timeouts?.reconnectBackoffMs ?? Ht, c = this.config.timeouts?.maxReconnectAttempts ?? $t;
9707
- this.updateWorkerInterestMask(), yf() && r.postMessage({ type: "enableDevtools", enabled: !0 });
9764
+ this.updateWorkerInterestMask(), Df() && r.postMessage({ type: "enableDevtools", enabled: !0 });
9708
9765
  const p = this.config.webRtc?.enabled ?? !1;
9709
9766
  r.postMessage({
9710
9767
  type: "connect",
@@ -9776,7 +9833,7 @@ class tp {
9776
9833
  }
9777
9834
  }
9778
9835
  _webRtcAudioUnlockHandler = null;
9779
- _webRtcMediaSession = new Rs();
9836
+ _webRtcMediaSession = new bs();
9780
9837
  playWebRtcAudioTrack(e, n) {
9781
9838
  if (typeof document > "u")
9782
9839
  return;
@@ -10088,105 +10145,105 @@ class tp {
10088
10145
  }
10089
10146
  }
10090
10147
  }
10091
- function np(t) {
10148
+ function ap(t) {
10092
10149
  return t === "waitingForExternalConnectUrl" || t === "connecting" || t === "connectingSlow" || t === "reconnecting";
10093
10150
  }
10094
- function rp(t) {
10151
+ function cp(t) {
10095
10152
  return t === "connected";
10096
10153
  }
10097
- function sp(t) {
10154
+ function lp(t) {
10098
10155
  return t === "offline" || t === "offlineError" || t === "idle";
10099
10156
  }
10100
- function ip(t) {
10157
+ function up(t) {
10101
10158
  return t === "offlineError";
10102
10159
  }
10103
10160
  const Us = /* @__PURE__ */ new Map();
10104
10161
  for (const [t, e] of Object.entries(g))
10105
10162
  typeof e == "number" && Us.set(e, t);
10106
- function op(t) {
10163
+ function dp(t) {
10107
10164
  return Us.get(t) ?? `UNKNOWN_${t}`;
10108
10165
  }
10109
10166
  const Os = 1e3, Ms = Ve.INFO;
10110
10167
  let H = [], dt = Os, Ps = Ms, ht = null;
10111
- function vf(t) {
10168
+ function Lf(t) {
10112
10169
  t.level < Ps || (H.push(t), H.length > dt && (H = H.slice(-dt)));
10113
10170
  }
10114
- function Uf(t) {
10115
- dt = t?.maxBufferSize ?? Os, Ps = t?.minLevel ?? Ms, H = [], Mu(vf);
10171
+ function Ff(t) {
10172
+ dt = t?.maxBufferSize ?? Os, Ps = t?.minLevel ?? Ms, H = [], Mu(Lf);
10116
10173
  }
10117
- function ap(t) {
10174
+ function hp(t) {
10118
10175
  ht = t;
10119
10176
  }
10120
- function cp() {
10177
+ function fp() {
10121
10178
  return H;
10122
10179
  }
10123
- function Of() {
10180
+ function Bf() {
10124
10181
  const t = H;
10125
10182
  return H = [], t;
10126
10183
  }
10127
- function lp() {
10184
+ function pp() {
10128
10185
  if (!ht || H.length === 0)
10129
10186
  return 0;
10130
- const t = Of();
10187
+ const t = Bf();
10131
10188
  return ht(t), t.length;
10132
10189
  }
10133
- function up() {
10190
+ function mp() {
10134
10191
  H = [];
10135
10192
  }
10136
- function dp() {
10193
+ function Ep() {
10137
10194
  return H.length;
10138
10195
  }
10139
- Uf();
10196
+ Ff();
10140
10197
  export {
10141
- b as AuthenticationError,
10198
+ R as AuthenticationError,
10142
10199
  Gu as Channel,
10143
10200
  Vu as ChannelManager,
10144
- Pf as ChannelNotFoundError,
10201
+ Wf as ChannelNotFoundError,
10145
10202
  ne as ClientType,
10146
10203
  Ct as ConnectionError,
10147
10204
  de as ContextType,
10148
- kf as EndpointSelector,
10205
+ Mf as EndpointSelector,
10149
10206
  N as EntrypointType,
10150
- gh as FunctionCallError,
10151
- Ah as FunctionRegistry,
10152
- zf as IKON_AUTH_BASE_URL,
10207
+ Rh as FunctionCallError,
10208
+ kh as FunctionRegistry,
10209
+ qf as IKON_AUTH_BASE_URL,
10153
10210
  jt as IKON_AUTH_URL_DEV,
10154
10211
  Yt as IKON_AUTH_URL_PROD,
10155
10212
  ct as IKON_BACKEND_URL_DEV,
10156
10213
  at as IKON_BACKEND_URL_PROD,
10157
- ah as IKON_PARAM_AUDIO,
10214
+ hh as IKON_PARAM_AUDIO,
10158
10215
  Ss as IKON_PARAM_DEBUG,
10159
- qf as IKON_PARAM_GIT_BRANCH,
10160
- Zf as IKON_PARAM_GIT_SOURCE,
10161
- ih as IKON_PARAM_LANG,
10162
- nh as IKON_PARAM_PROXY,
10163
- oh as IKON_PARAM_SERVER_URL,
10164
- ch as IKON_PARAM_VIDEO,
10165
- lh as IKON_PARAM_WEBRTC,
10166
- rh as IKON_PARAM_WEBSOCKET,
10167
- sh as IKON_PARAM_WEBTRANSPORT,
10168
- Ef as IkonAudioCapture,
10216
+ sp as IKON_PARAM_GIT_BRANCH,
10217
+ rp as IKON_PARAM_GIT_SOURCE,
10218
+ uh as IKON_PARAM_LANG,
10219
+ ah as IKON_PARAM_PROXY,
10220
+ dh as IKON_PARAM_SERVER_URL,
10221
+ fh as IKON_PARAM_VIDEO,
10222
+ ph as IKON_PARAM_WEBRTC,
10223
+ ch as IKON_PARAM_WEBSOCKET,
10224
+ lh as IKON_PARAM_WEBTRANSPORT,
10225
+ wf as IkonAudioCapture,
10169
10226
  Mt as IkonAudioPlayback,
10170
- tp as IkonClient,
10171
- Tf as IkonImageCapture,
10172
- sf as IkonMedia,
10173
- Af as IkonMediaCapture,
10174
- Cf as IkonVideoCapture,
10175
- rf as IkonVideoPlayback,
10227
+ op as IkonClient,
10228
+ Af as IkonImageCapture,
10229
+ uf as IkonMedia,
10230
+ kf as IkonMediaCapture,
10231
+ Nf as IkonVideoCapture,
10232
+ lf as IkonVideoPlayback,
10176
10233
  At as KeepaliveTimeoutError,
10177
10234
  Ve as LogLevel,
10178
10235
  Uu as MaxRetriesExceededError,
10179
- Ff as NoChannelsError,
10236
+ Vf as NoChannelsError,
10180
10237
  g as Opcode,
10181
10238
  Ou as ProvisioningTimeoutError,
10182
- Lf as SpaceNotFoundError,
10239
+ Gf as SpaceNotFoundError,
10183
10240
  q as TransportError,
10184
10241
  fe as UserType,
10185
- $f as WEBRTC_AUDIO_BITRATE,
10186
- Hf as WEBRTC_AUDIO_CHANNELS,
10187
- Gf as WEBRTC_AUDIO_CODEC,
10242
+ Xf as WEBRTC_AUDIO_BITRATE,
10243
+ zf as WEBRTC_AUDIO_CHANNELS,
10244
+ Yf as WEBRTC_AUDIO_CODEC,
10188
10245
  Hu as WEBRTC_AUDIO_JITTER_BUFFER_TARGET_MS,
10189
- Vf as WEBRTC_AUDIO_SAMPLE_RATE,
10246
+ jf as WEBRTC_AUDIO_SAMPLE_RATE,
10190
10247
  Yu as WEBRTC_BUNDLE_POLICY,
10191
10248
  Qu as WEBRTC_DATA_CHANNEL_LABEL,
10192
10249
  qu as WEBRTC_DATA_CHANNEL_MAX_RETRANSMITS,
@@ -10195,58 +10252,58 @@ export {
10195
10252
  Xu as WEBRTC_MAX_AUDIO_TRACKS,
10196
10253
  Ju as WEBRTC_MAX_VIDEO_TRACKS,
10197
10254
  ju as WEBRTC_RTCP_MUX_POLICY,
10198
- Kf as WEBRTC_VIDEO_CODEC,
10255
+ Jf as WEBRTC_VIDEO_CODEC,
10199
10256
  $u as WEBRTC_VIDEO_MAX_BITRATE,
10200
- Yf as WEBRTC_VIDEO_MAX_FRAMERATE,
10257
+ Qf as WEBRTC_VIDEO_MAX_FRAMERATE,
10201
10258
  ed as WebRTCConnection,
10202
10259
  td as WebRTCSignaling,
10203
- Mf as asProtocolMessage,
10204
- jf as clearDeviceId,
10205
- up as clearLogBuffer,
10206
- Qf as clearSessionParamsFromUrl,
10260
+ xf as asProtocolMessage,
10261
+ Zf as clearDeviceId,
10262
+ mp as clearLogBuffer,
10263
+ np as clearSessionParamsFromUrl,
10207
10264
  P as createLogger,
10208
- Vd as deriveAuthUrl,
10209
- Xf as deriveBackendType,
10265
+ Yd as deriveAuthUrl,
10266
+ ep as deriveBackendType,
10210
10267
  zt as deriveBackendUrl,
10211
- Gd as extractUserIdFromToken,
10212
- lp as flushLogs,
10213
- mh as getAudioParam,
10214
- cp as getBufferedLogs,
10215
- ph as getDebugParam,
10216
- ep as getLangParam,
10217
- dp as getLogBufferSize,
10218
- Bf as getLogLevel,
10219
- xf as getLogSink,
10220
- op as getOpcodeName,
10268
+ Kd as extractUserIdFromToken,
10269
+ pp as flushLogs,
10270
+ Sh as getAudioParam,
10271
+ fp as getBufferedLogs,
10272
+ Th as getDebugParam,
10273
+ ip as getLangParam,
10274
+ Ep as getLogBufferSize,
10275
+ Hf as getLogLevel,
10276
+ $f as getLogSink,
10277
+ dp as getOpcodeName,
10221
10278
  $e as getOrCreateDeviceId,
10222
- dh as getProxyParam,
10223
- Eh as getServerUrlParam,
10224
- Ih as getVideoParam,
10225
- _h as getWebRtcParam,
10226
- hh as getWebSocketParam,
10227
- fh as getWebTransportParam,
10228
- yf as initializeDebugMode,
10229
- Uf as initializeLogSink,
10279
+ Eh as getProxyParam,
10280
+ wh as getServerUrlParam,
10281
+ gh as getVideoParam,
10282
+ Ch as getWebRtcParam,
10283
+ Ih as getWebSocketParam,
10284
+ _h as getWebTransportParam,
10285
+ Df as initializeDebugMode,
10286
+ Ff as initializeLogSink,
10230
10287
  ys as isAudioWorkletSupported,
10231
10288
  ze as isBrowserEnvironment,
10232
10289
  vt as isCloudEnvironment,
10233
- rp as isConnected,
10234
- np as isConnecting,
10235
- Rf as isDebugModeEnabled,
10236
- ip as isError,
10237
- sp as isOffline,
10290
+ cp as isConnected,
10291
+ ap as isConnecting,
10292
+ vf as isDebugModeEnabled,
10293
+ up as isError,
10294
+ lp as isOffline,
10238
10295
  Me as isSharedArrayBufferSupported,
10239
10296
  fs as isWebTransportSupported,
10240
- Jf as parseUrlParams,
10297
+ tp as parseUrlParams,
10241
10298
  Se as readOpcode,
10242
10299
  Oe as readOpcodeGroup,
10243
10300
  ce as readProtocolMessageHeaders,
10244
- Wd as registerBrowserFunctions,
10301
+ $d as registerBrowserFunctions,
10245
10302
  hs as setLogLevel,
10246
10303
  Mu as setLogSink,
10247
- uh as setSdkUrlParam,
10248
- ap as setSendLogsCallback,
10249
- Wf as subscribeToLogEvents,
10250
- Of as takeBufferedLogs,
10251
- Sh as withResultData
10304
+ mh as setSdkUrlParam,
10305
+ hp as setSendLogsCallback,
10306
+ Kf as subscribeToLogEvents,
10307
+ Bf as takeBufferedLogs,
10308
+ bh as withResultData
10252
10309
  };