obi-sdk 0.13.2 → 0.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/modular/chunks/index-dcd6962d.js +6 -0
- package/dist/modular/chunks/index-dcd6962d.js.map +1 -0
- package/dist/modular/chunks/{obi-widget-d8354869.js → obi-widget-222a1e0d.js} +36 -51
- package/dist/modular/chunks/{obi-widget-d8354869.js.map → obi-widget-222a1e0d.js.map} +1 -1
- package/dist/modular/index.js +1 -1
- package/dist/modular/ui.js +10 -10
- package/dist/obi-sdk.standalone.iife.js +33 -36
- package/dist/obi-sdk.standalone.iife.js.map +1 -1
- package/dist/react.es.js +272 -281
- package/dist/react.es.js.map +1 -1
- package/dist/react.umd.js +87 -90
- package/dist/react.umd.js.map +1 -1
- package/dist/ui/components/obi-widget/obi-widget.d.ts +0 -1
- package/package.json +3 -3
- package/dist/modular/chunks/index-a668ac46.js +0 -6
- package/dist/modular/chunks/index-a668ac46.js.map +0 -1
package/dist/react.es.js
CHANGED
|
@@ -188,7 +188,7 @@ let it = class {
|
|
|
188
188
|
return this._locking = this._locking.then(() => t), n;
|
|
189
189
|
}
|
|
190
190
|
};
|
|
191
|
-
function
|
|
191
|
+
function ve(A, e) {
|
|
192
192
|
if (!A)
|
|
193
193
|
throw new Error(e);
|
|
194
194
|
}
|
|
@@ -214,7 +214,7 @@ function sp(A) {
|
|
|
214
214
|
const op = Symbol("@bufbuild/protobuf/enum-type");
|
|
215
215
|
function Ev(A) {
|
|
216
216
|
const e = A[op];
|
|
217
|
-
return
|
|
217
|
+
return ve(e, "missing enum type on enum object"), e;
|
|
218
218
|
}
|
|
219
219
|
function ap(A, e, t, n) {
|
|
220
220
|
A[op] = cp(e, t.map((i) => ({
|
|
@@ -527,7 +527,7 @@ function Iv() {
|
|
|
527
527
|
}
|
|
528
528
|
};
|
|
529
529
|
}
|
|
530
|
-
const t = (i) =>
|
|
530
|
+
const t = (i) => ve(/^-?[0-9]+$/.test(i), "int64 invalid: ".concat(i)), n = (i) => ve(/^[0-9]+$/.test(i), "uint64 invalid: ".concat(i));
|
|
531
531
|
return {
|
|
532
532
|
zero: "0",
|
|
533
533
|
supported: !1,
|
|
@@ -1078,7 +1078,7 @@ function gp(A, e) {
|
|
|
1078
1078
|
return e.extendee.typeName === t.typeName && !!t.runtime.bin.listUnknownFields(A).find((n) => n.no == e.field.no);
|
|
1079
1079
|
}
|
|
1080
1080
|
function mp(A, e) {
|
|
1081
|
-
|
|
1081
|
+
ve(A.extendee.typeName == e.getType().typeName, "extension ".concat(A.typeName, " can only be applied to message ").concat(A.extendee.typeName));
|
|
1082
1082
|
}
|
|
1083
1083
|
function vp(A, e) {
|
|
1084
1084
|
const t = A.localName;
|
|
@@ -1236,7 +1236,7 @@ function Nt(A) {
|
|
|
1236
1236
|
function Yd(A, e, t, n, i) {
|
|
1237
1237
|
let r = t.localName;
|
|
1238
1238
|
if (t.repeated) {
|
|
1239
|
-
if (
|
|
1239
|
+
if (ve(t.kind != "map"), e === null)
|
|
1240
1240
|
return;
|
|
1241
1241
|
if (!Array.isArray(e))
|
|
1242
1242
|
throw new Error("cannot decode field ".concat(i.typeName, ".").concat(t.name, " from JSON: ").concat(Nt(e)));
|
|
@@ -1435,7 +1435,7 @@ function $v(A) {
|
|
|
1435
1435
|
}
|
|
1436
1436
|
function Zd(A, e, t) {
|
|
1437
1437
|
if (A.kind == "map") {
|
|
1438
|
-
|
|
1438
|
+
ve(typeof e == "object" && e != null);
|
|
1439
1439
|
const n = {}, i = Object.entries(e);
|
|
1440
1440
|
switch (A.V.kind) {
|
|
1441
1441
|
case "scalar":
|
|
@@ -1455,7 +1455,7 @@ function Zd(A, e, t) {
|
|
|
1455
1455
|
return t.emitDefaultValues || i.length > 0 ? n : void 0;
|
|
1456
1456
|
}
|
|
1457
1457
|
if (A.repeated) {
|
|
1458
|
-
|
|
1458
|
+
ve(Array.isArray(e));
|
|
1459
1459
|
const n = [];
|
|
1460
1460
|
switch (A.kind) {
|
|
1461
1461
|
case "scalar":
|
|
@@ -1484,7 +1484,7 @@ function Zd(A, e, t) {
|
|
|
1484
1484
|
}
|
|
1485
1485
|
function ba(A, e, t) {
|
|
1486
1486
|
var n;
|
|
1487
|
-
if (
|
|
1487
|
+
if (ve(typeof e == "number"), A.typeName == "google.protobuf.NullValue")
|
|
1488
1488
|
return null;
|
|
1489
1489
|
if (t)
|
|
1490
1490
|
return e;
|
|
@@ -1498,22 +1498,22 @@ function ys(A, e) {
|
|
|
1498
1498
|
case T.SINT32:
|
|
1499
1499
|
case T.FIXED32:
|
|
1500
1500
|
case T.UINT32:
|
|
1501
|
-
return
|
|
1501
|
+
return ve(typeof e == "number"), e;
|
|
1502
1502
|
case T.FLOAT:
|
|
1503
1503
|
case T.DOUBLE:
|
|
1504
|
-
return
|
|
1504
|
+
return ve(typeof e == "number"), Number.isNaN(e) ? "NaN" : e === Number.POSITIVE_INFINITY ? "Infinity" : e === Number.NEGATIVE_INFINITY ? "-Infinity" : e;
|
|
1505
1505
|
case T.STRING:
|
|
1506
|
-
return
|
|
1506
|
+
return ve(typeof e == "string"), e;
|
|
1507
1507
|
case T.BOOL:
|
|
1508
|
-
return
|
|
1508
|
+
return ve(typeof e == "boolean"), e;
|
|
1509
1509
|
case T.UINT64:
|
|
1510
1510
|
case T.FIXED64:
|
|
1511
1511
|
case T.INT64:
|
|
1512
1512
|
case T.SFIXED64:
|
|
1513
1513
|
case T.SINT64:
|
|
1514
|
-
return
|
|
1514
|
+
return ve(typeof e == "bigint" || typeof e == "string" || typeof e == "number"), e.toString();
|
|
1515
1515
|
case T.BYTES:
|
|
1516
|
-
return
|
|
1516
|
+
return ve(e instanceof Uint8Array), pp.enc(e);
|
|
1517
1517
|
}
|
|
1518
1518
|
}
|
|
1519
1519
|
const Dn = Symbol("@bufbuild/protobuf/unknown-fields"), eu = {
|
|
@@ -1708,14 +1708,14 @@ function Ws(A, e) {
|
|
|
1708
1708
|
}
|
|
1709
1709
|
}
|
|
1710
1710
|
function nu(A, e, t, n) {
|
|
1711
|
-
|
|
1711
|
+
ve(e !== void 0);
|
|
1712
1712
|
const i = A.repeated;
|
|
1713
1713
|
switch (A.kind) {
|
|
1714
1714
|
case "scalar":
|
|
1715
1715
|
case "enum":
|
|
1716
1716
|
let r = A.kind == "enum" ? T.INT32 : A.T;
|
|
1717
1717
|
if (i)
|
|
1718
|
-
if (
|
|
1718
|
+
if (ve(Array.isArray(e)), A.packed)
|
|
1719
1719
|
qv(t, r, A.no, e);
|
|
1720
1720
|
else
|
|
1721
1721
|
for (const s of e)
|
|
@@ -1725,14 +1725,14 @@ function nu(A, e, t, n) {
|
|
|
1725
1725
|
break;
|
|
1726
1726
|
case "message":
|
|
1727
1727
|
if (i) {
|
|
1728
|
-
|
|
1728
|
+
ve(Array.isArray(e));
|
|
1729
1729
|
for (const s of e)
|
|
1730
1730
|
iu(t, n, A, s);
|
|
1731
1731
|
} else
|
|
1732
1732
|
iu(t, n, A, e);
|
|
1733
1733
|
break;
|
|
1734
1734
|
case "map":
|
|
1735
|
-
|
|
1735
|
+
ve(typeof e == "object" && e != null);
|
|
1736
1736
|
for (const [s, o] of Object.entries(e))
|
|
1737
1737
|
Xv(t, n, A, s, o);
|
|
1738
1738
|
break;
|
|
@@ -1750,7 +1750,7 @@ function Xv(A, e, t, n, i) {
|
|
|
1750
1750
|
r = Number.parseInt(n);
|
|
1751
1751
|
break;
|
|
1752
1752
|
case T.BOOL:
|
|
1753
|
-
|
|
1753
|
+
ve(n == "true" || n == "false"), r = n == "true";
|
|
1754
1754
|
break;
|
|
1755
1755
|
}
|
|
1756
1756
|
switch (Ar(A, t.K, 1, r), t.V.kind) {
|
|
@@ -1761,7 +1761,7 @@ function Xv(A, e, t, n, i) {
|
|
|
1761
1761
|
Ar(A, T.INT32, 2, i);
|
|
1762
1762
|
break;
|
|
1763
1763
|
case "message":
|
|
1764
|
-
|
|
1764
|
+
ve(i !== void 0), A.tag(2, Se.LengthDelimited).bytes(i.toBinary(e));
|
|
1765
1765
|
break;
|
|
1766
1766
|
}
|
|
1767
1767
|
A.join();
|
|
@@ -1771,7 +1771,7 @@ function iu(A, e, t, n) {
|
|
|
1771
1771
|
t.delimited ? A.tag(t.no, Se.StartGroup).raw(i.toBinary(e)).tag(t.no, Se.EndGroup) : A.tag(t.no, Se.LengthDelimited).bytes(i.toBinary(e));
|
|
1772
1772
|
}
|
|
1773
1773
|
function Ar(A, e, t, n) {
|
|
1774
|
-
|
|
1774
|
+
ve(n !== void 0);
|
|
1775
1775
|
let [i, r] = Cp(e);
|
|
1776
1776
|
A.tag(t, i)[r](n);
|
|
1777
1777
|
}
|
|
@@ -2079,7 +2079,7 @@ class sB {
|
|
|
2079
2079
|
this.kind = "oneof", this.repeated = !1, this.packed = !1, this.opt = !1, this.req = !1, this.default = void 0, this.fields = [], this.name = e, this.localName = eB(e);
|
|
2080
2080
|
}
|
|
2081
2081
|
addField(e) {
|
|
2082
|
-
|
|
2082
|
+
ve(e.oneof === this, "field ".concat(e.name, " not one of ").concat(this.name)), this.fields.push(e);
|
|
2083
2083
|
}
|
|
2084
2084
|
findField(e) {
|
|
2085
2085
|
if (!this._lookup) {
|
|
@@ -6819,7 +6819,7 @@ var z;
|
|
|
6819
6819
|
(function(A) {
|
|
6820
6820
|
A[A.NotAllowed = 0] = "NotAllowed", A[A.ServerUnreachable = 1] = "ServerUnreachable", A[A.InternalError = 2] = "InternalError", A[A.Cancelled = 3] = "Cancelled", A[A.LeaveRequest = 4] = "LeaveRequest";
|
|
6821
6821
|
})(z || (z = {}));
|
|
6822
|
-
class
|
|
6822
|
+
class ae extends HA {
|
|
6823
6823
|
constructor(e, t, n, i) {
|
|
6824
6824
|
super(1, e), this.name = "ConnectionError", this.status = n, this.reason = t, this.context = i, this.reasonName = z[t];
|
|
6825
6825
|
}
|
|
@@ -8152,19 +8152,19 @@ function YC(A) {
|
|
|
8152
8152
|
req: A
|
|
8153
8153
|
}), e;
|
|
8154
8154
|
}
|
|
8155
|
-
var
|
|
8155
|
+
var le;
|
|
8156
8156
|
(function(A) {
|
|
8157
8157
|
A[A.CONNECTING = 0] = "CONNECTING", A[A.CONNECTED = 1] = "CONNECTED", A[A.RECONNECTING = 2] = "RECONNECTING", A[A.DISCONNECTING = 3] = "DISCONNECTING", A[A.DISCONNECTED = 4] = "DISCONNECTED";
|
|
8158
|
-
})(
|
|
8158
|
+
})(le || (le = {}));
|
|
8159
8159
|
class id {
|
|
8160
8160
|
get currentState() {
|
|
8161
8161
|
return this.state;
|
|
8162
8162
|
}
|
|
8163
8163
|
get isDisconnected() {
|
|
8164
|
-
return this.state ===
|
|
8164
|
+
return this.state === le.DISCONNECTING || this.state === le.DISCONNECTED;
|
|
8165
8165
|
}
|
|
8166
8166
|
get isEstablishingConnection() {
|
|
8167
|
-
return this.state ===
|
|
8167
|
+
return this.state === le.CONNECTING || this.state === le.RECONNECTING;
|
|
8168
8168
|
}
|
|
8169
8169
|
getNextRequestId() {
|
|
8170
8170
|
return this._requestId += 1, this._requestId;
|
|
@@ -8172,9 +8172,9 @@ class id {
|
|
|
8172
8172
|
constructor() {
|
|
8173
8173
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
8174
8174
|
var n;
|
|
8175
|
-
this.rtt = 0, this.state =
|
|
8175
|
+
this.rtt = 0, this.state = le.DISCONNECTED, this.log = j, this._requestId = 0, this.resetCallbacks = () => {
|
|
8176
8176
|
this.onAnswer = void 0, this.onLeave = void 0, this.onLocalTrackPublished = void 0, this.onLocalTrackUnpublished = void 0, this.onNegotiateRequested = void 0, this.onOffer = void 0, this.onRemoteMuteChanged = void 0, this.onSubscribedQualityUpdate = void 0, this.onTokenRefresh = void 0, this.onTrickle = void 0, this.onClose = void 0;
|
|
8177
|
-
}, this.log = oA((n = t.loggerName) !== null && n !== void 0 ? n : It.Signal), this.loggerContextCb = t.loggerContextCb, this.useJSON = e, this.requestQueue = new WC(), this.queuedRequests = [], this.closingLock = new it(), this.connectionLock = new it(), this.state =
|
|
8177
|
+
}, this.log = oA((n = t.loggerName) !== null && n !== void 0 ? n : It.Signal), this.loggerContextCb = t.loggerContextCb, this.useJSON = e, this.requestQueue = new WC(), this.queuedRequests = [], this.closingLock = new it(), this.connectionLock = new it(), this.state = le.DISCONNECTED;
|
|
8178
8178
|
}
|
|
8179
8179
|
get logContext() {
|
|
8180
8180
|
var e, t;
|
|
@@ -8182,7 +8182,7 @@ class id {
|
|
|
8182
8182
|
}
|
|
8183
8183
|
join(e, t, n, i) {
|
|
8184
8184
|
return m(this, void 0, void 0, function* () {
|
|
8185
|
-
return this.state =
|
|
8185
|
+
return this.state = le.CONNECTING, this.options = n, yield this.connect(e, t, n, i);
|
|
8186
8186
|
});
|
|
8187
8187
|
}
|
|
8188
8188
|
reconnect(e, t, n, i) {
|
|
@@ -8191,7 +8191,7 @@ class id {
|
|
|
8191
8191
|
this.log.warn("attempted to reconnect without signal options being set, ignoring", this.logContext);
|
|
8192
8192
|
return;
|
|
8193
8193
|
}
|
|
8194
|
-
return this.state =
|
|
8194
|
+
return this.state = le.RECONNECTING, this.clearPingInterval(), yield this.connect(e, t, Object.assign(Object.assign({}, this.options), {
|
|
8195
8195
|
reconnect: !0,
|
|
8196
8196
|
sid: n,
|
|
8197
8197
|
reconnectReason: i
|
|
@@ -8205,9 +8205,9 @@ class id {
|
|
|
8205
8205
|
const d = yield this.connectionLock.lock();
|
|
8206
8206
|
try {
|
|
8207
8207
|
const u = () => m(this, void 0, void 0, function* () {
|
|
8208
|
-
this.close(), clearTimeout(h), l(new
|
|
8208
|
+
this.close(), clearTimeout(h), l(new ae("room connection has been cancelled (signal)", z.Cancelled));
|
|
8209
8209
|
}), h = setTimeout(() => {
|
|
8210
|
-
this.close(), l(new
|
|
8210
|
+
this.close(), l(new ae("room connection has timed out (signal)", z.ServerUnreachable));
|
|
8211
8211
|
}, n.websocketTimeout);
|
|
8212
8212
|
i?.aborted && u(), i?.addEventListener("abort", u);
|
|
8213
8213
|
const f = new URL(o);
|
|
@@ -8217,17 +8217,17 @@ class id {
|
|
|
8217
8217
|
}, this.logContext)), this.ws && (yield this.close(!1)), this.ws = new WebSocket(o), this.ws.binaryType = "arraybuffer", this.ws.onopen = () => {
|
|
8218
8218
|
clearTimeout(h);
|
|
8219
8219
|
}, this.ws.onerror = (p) => m(this, void 0, void 0, function* () {
|
|
8220
|
-
if (this.state !==
|
|
8221
|
-
this.state =
|
|
8220
|
+
if (this.state !== le.CONNECTED) {
|
|
8221
|
+
this.state = le.DISCONNECTED, clearTimeout(h);
|
|
8222
8222
|
try {
|
|
8223
8223
|
const g = yield fetch(a);
|
|
8224
8224
|
if (g.status.toFixed(0).startsWith("4")) {
|
|
8225
8225
|
const v = yield g.text();
|
|
8226
|
-
l(new
|
|
8226
|
+
l(new ae(v, z.NotAllowed, g.status));
|
|
8227
8227
|
} else
|
|
8228
|
-
l(new
|
|
8228
|
+
l(new ae("Encountered unknown websocket error during connection: ".concat(p.toString()), z.InternalError, g.status));
|
|
8229
8229
|
} catch (g) {
|
|
8230
|
-
l(new
|
|
8230
|
+
l(new ae(g instanceof Error ? g.message : "server was not reachable", z.ServerUnreachable));
|
|
8231
8231
|
}
|
|
8232
8232
|
return;
|
|
8233
8233
|
}
|
|
@@ -8246,17 +8246,17 @@ class id {
|
|
|
8246
8246
|
this.log.error("could not decode websocket message: ".concat(typeof p.data), this.logContext);
|
|
8247
8247
|
return;
|
|
8248
8248
|
}
|
|
8249
|
-
if (this.state !==
|
|
8249
|
+
if (this.state !== le.CONNECTED) {
|
|
8250
8250
|
let B = !1;
|
|
8251
|
-
if (((g = y.message) === null || g === void 0 ? void 0 : g.case) === "join" ? (this.state =
|
|
8251
|
+
if (((g = y.message) === null || g === void 0 ? void 0 : g.case) === "join" ? (this.state = le.CONNECTED, i?.removeEventListener("abort", u), this.pingTimeoutDuration = y.message.value.pingTimeout, this.pingIntervalDuration = y.message.value.pingInterval, this.pingTimeoutDuration && this.pingTimeoutDuration > 0 && (this.log.debug("ping config", Object.assign(Object.assign({}, this.logContext), {
|
|
8252
8252
|
timeout: this.pingTimeoutDuration,
|
|
8253
8253
|
interval: this.pingIntervalDuration
|
|
8254
|
-
})), this.startPingInterval()), c(y.message.value)) : this.state ===
|
|
8254
|
+
})), this.startPingInterval()), c(y.message.value)) : this.state === le.RECONNECTING && y.message.case !== "leave" ? (this.state = le.CONNECTED, i?.removeEventListener("abort", u), this.startPingInterval(), ((v = y.message) === null || v === void 0 ? void 0 : v.case) === "reconnect" ? c(y.message.value) : (this.log.debug("declaring signal reconnected without reconnect response received", this.logContext), c(void 0), B = !0)) : this.isEstablishingConnection && y.message.case === "leave" ? l(new ae("Received leave request while trying to (re)connect", z.LeaveRequest, void 0, y.message.value.reason)) : n.reconnect || l(new ae("did not receive join response, got ".concat((w = y.message) === null || w === void 0 ? void 0 : w.case, " instead"), z.InternalError)), !B)
|
|
8255
8255
|
return;
|
|
8256
8256
|
}
|
|
8257
8257
|
this.signalLatency && (yield st(this.signalLatency)), this.handleSignalResponse(y);
|
|
8258
8258
|
}), this.ws.onclose = (p) => {
|
|
8259
|
-
this.isEstablishingConnection && l(new
|
|
8259
|
+
this.isEstablishingConnection && l(new ae("Websocket got closed during a (re)connection attempt", z.InternalError)), this.log.warn("websocket closed", Object.assign(Object.assign({}, this.logContext), {
|
|
8260
8260
|
reason: p.reason,
|
|
8261
8261
|
code: p.code,
|
|
8262
8262
|
wasClean: p.wasClean,
|
|
@@ -8275,7 +8275,7 @@ class id {
|
|
|
8275
8275
|
return function* () {
|
|
8276
8276
|
const n = yield e.closingLock.lock();
|
|
8277
8277
|
try {
|
|
8278
|
-
if (e.clearPingInterval(), t && (e.state =
|
|
8278
|
+
if (e.clearPingInterval(), t && (e.state = le.DISCONNECTING), e.ws) {
|
|
8279
8279
|
e.ws.onmessage = null, e.ws.onopen = null, e.ws.onclose = null;
|
|
8280
8280
|
const i = new Promise((r) => {
|
|
8281
8281
|
e.ws ? e.ws.onclose = () => {
|
|
@@ -8285,7 +8285,7 @@ class id {
|
|
|
8285
8285
|
e.ws.readyState < e.ws.CLOSING && (e.ws.close(), yield Promise.race([i, st(250)])), e.ws = void 0;
|
|
8286
8286
|
}
|
|
8287
8287
|
} finally {
|
|
8288
|
-
t && (e.state =
|
|
8288
|
+
t && (e.state = le.DISCONNECTED), n();
|
|
8289
8289
|
}
|
|
8290
8290
|
}();
|
|
8291
8291
|
});
|
|
@@ -8430,7 +8430,7 @@ class id {
|
|
|
8430
8430
|
var n = this;
|
|
8431
8431
|
let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
8432
8432
|
return function* () {
|
|
8433
|
-
if (!i && !YC(t) && n.state ===
|
|
8433
|
+
if (!i && !YC(t) && n.state === le.RECONNECTING) {
|
|
8434
8434
|
n.queuedRequests.push(() => m(n, void 0, void 0, function* () {
|
|
8435
8435
|
yield this.sendRequest(t, !0);
|
|
8436
8436
|
}));
|
|
@@ -8484,7 +8484,7 @@ class id {
|
|
|
8484
8484
|
}
|
|
8485
8485
|
handleOnClose(e) {
|
|
8486
8486
|
return m(this, void 0, void 0, function* () {
|
|
8487
|
-
if (this.state ===
|
|
8487
|
+
if (this.state === le.DISCONNECTED)
|
|
8488
8488
|
return;
|
|
8489
8489
|
const t = this.onClose;
|
|
8490
8490
|
yield this.close(), this.log.debug("websocket connection closed: ".concat(e), Object.assign(Object.assign({}, this.logContext), {
|
|
@@ -9537,10 +9537,10 @@ const Gc = "vp8", sb = {
|
|
|
9537
9537
|
peerConnectionTimeout: 15e3,
|
|
9538
9538
|
websocketTimeout: 15e3
|
|
9539
9539
|
};
|
|
9540
|
-
var
|
|
9540
|
+
var me;
|
|
9541
9541
|
(function(A) {
|
|
9542
9542
|
A[A.NEW = 0] = "NEW", A[A.CONNECTING = 1] = "CONNECTING", A[A.CONNECTED = 2] = "CONNECTED", A[A.FAILED = 3] = "FAILED", A[A.CLOSING = 4] = "CLOSING", A[A.CLOSED = 5] = "CLOSED";
|
|
9543
|
-
})(
|
|
9543
|
+
})(me || (me = {}));
|
|
9544
9544
|
class ab {
|
|
9545
9545
|
get needsPublisher() {
|
|
9546
9546
|
return this.isPublisherConnectionRequired;
|
|
@@ -9556,7 +9556,7 @@ class ab {
|
|
|
9556
9556
|
this.peerConnectionTimeout = od.peerConnectionTimeout, this.log = j, this.updateState = () => {
|
|
9557
9557
|
var r;
|
|
9558
9558
|
const s = this.state, o = this.requiredTransports.map((a) => a.getConnectionState());
|
|
9559
|
-
o.every((a) => a === "connected") ? this.state =
|
|
9559
|
+
o.every((a) => a === "connected") ? this.state = me.CONNECTED : o.some((a) => a === "failed") ? this.state = me.FAILED : o.some((a) => a === "connecting") ? this.state = me.CONNECTING : o.every((a) => a === "closed") ? this.state = me.CLOSED : o.some((a) => a === "closed") ? this.state = me.CLOSING : o.every((a) => a === "new") && (this.state = me.NEW), s !== this.state && (this.log.debug("pc state change: from ".concat(me[s], " to ").concat(me[this.state]), this.logContext), (r = this.onStateChange) === null || r === void 0 || r.call(this, this.state, this.publisher.getConnectionState(), this.subscriber.getConnectionState()));
|
|
9560
9560
|
}, this.log = oA((i = n.loggerName) !== null && i !== void 0 ? i : It.PCManager), this.loggerOptions = n, this.isPublisherConnectionRequired = !t, this.isSubscriberConnectionRequired = t, this.publisher = new Ru(e, n), this.subscriber = new Ru(e, n), this.publisher.onConnectionStateChange = this.updateState, this.subscriber.onConnectionStateChange = this.updateState, this.publisher.onIceConnectionStateChange = this.updateState, this.subscriber.onIceConnectionStateChange = this.updateState, this.publisher.onSignalingStatechange = this.updateState, this.subscriber.onSignalingStatechange = this.updateState, this.publisher.onIceCandidate = (r) => {
|
|
9561
9561
|
var s;
|
|
9562
9562
|
(s = this.onIceCandidate) === null || s === void 0 || s.call(this, r, kt.PUBLISHER);
|
|
@@ -9572,7 +9572,7 @@ class ab {
|
|
|
9572
9572
|
}, this.publisher.onOffer = (r) => {
|
|
9573
9573
|
var s;
|
|
9574
9574
|
(s = this.onPublisherOffer) === null || s === void 0 || s.call(this, r);
|
|
9575
|
-
}, this.state =
|
|
9575
|
+
}, this.state = me.NEW, this.connectionLock = new it(), this.remoteOfferLock = new it();
|
|
9576
9576
|
}
|
|
9577
9577
|
get logContext() {
|
|
9578
9578
|
var e, t;
|
|
@@ -9697,15 +9697,15 @@ class ab {
|
|
|
9697
9697
|
if (n.getConnectionState() !== "connected")
|
|
9698
9698
|
return new Promise((a, c) => m(r, void 0, void 0, function* () {
|
|
9699
9699
|
const l = () => {
|
|
9700
|
-
this.log.warn("abort transport connection", this.logContext), He.clearTimeout(d), c(new
|
|
9700
|
+
this.log.warn("abort transport connection", this.logContext), He.clearTimeout(d), c(new ae("room connection has been cancelled", z.Cancelled));
|
|
9701
9701
|
};
|
|
9702
9702
|
i?.signal.aborted && l(), i?.signal.addEventListener("abort", l);
|
|
9703
9703
|
const d = He.setTimeout(() => {
|
|
9704
|
-
i?.signal.removeEventListener("abort", l), c(new
|
|
9704
|
+
i?.signal.removeEventListener("abort", l), c(new ae("could not establish pc connection", z.InternalError));
|
|
9705
9705
|
}, s);
|
|
9706
|
-
for (; this.state !==
|
|
9706
|
+
for (; this.state !== me.CONNECTED; )
|
|
9707
9707
|
if (yield st(50), i?.signal.aborted) {
|
|
9708
|
-
c(new
|
|
9708
|
+
c(new ae("room connection has been cancelled", z.Cancelled));
|
|
9709
9709
|
return;
|
|
9710
9710
|
}
|
|
9711
9711
|
He.clearTimeout(d), i?.signal.removeEventListener("abort", l), a();
|
|
@@ -9714,7 +9714,7 @@ class ab {
|
|
|
9714
9714
|
});
|
|
9715
9715
|
}
|
|
9716
9716
|
}
|
|
9717
|
-
class
|
|
9717
|
+
class Be extends Error {
|
|
9718
9718
|
/**
|
|
9719
9719
|
* Creates an error object with the given code and message, plus an optional data payload.
|
|
9720
9720
|
*
|
|
@@ -9723,13 +9723,13 @@ class Ce extends Error {
|
|
|
9723
9723
|
* Error codes 1001-1999 are reserved for built-in errors (see RpcError.ErrorCode for their meanings).
|
|
9724
9724
|
*/
|
|
9725
9725
|
constructor(e, t, n) {
|
|
9726
|
-
super(t), this.code = e, this.message = Ou(t,
|
|
9726
|
+
super(t), this.code = e, this.message = Ou(t, Be.MAX_MESSAGE_BYTES), this.data = n ? Ou(n, Be.MAX_DATA_BYTES) : void 0;
|
|
9727
9727
|
}
|
|
9728
9728
|
/**
|
|
9729
9729
|
* @internal
|
|
9730
9730
|
*/
|
|
9731
9731
|
static fromProto(e) {
|
|
9732
|
-
return new
|
|
9732
|
+
return new Be(e.code, e.message, e.data);
|
|
9733
9733
|
}
|
|
9734
9734
|
/**
|
|
9735
9735
|
* @internal
|
|
@@ -9747,12 +9747,12 @@ class Ce extends Error {
|
|
|
9747
9747
|
* @internal
|
|
9748
9748
|
*/
|
|
9749
9749
|
static builtIn(e, t) {
|
|
9750
|
-
return new
|
|
9750
|
+
return new Be(Be.ErrorCode[e], Be.ErrorMessage[e], t);
|
|
9751
9751
|
}
|
|
9752
9752
|
}
|
|
9753
|
-
|
|
9754
|
-
|
|
9755
|
-
|
|
9753
|
+
Be.MAX_MESSAGE_BYTES = 256;
|
|
9754
|
+
Be.MAX_DATA_BYTES = 15360;
|
|
9755
|
+
Be.ErrorCode = {
|
|
9756
9756
|
APPLICATION_ERROR: 1500,
|
|
9757
9757
|
CONNECTION_TIMEOUT: 1501,
|
|
9758
9758
|
RESPONSE_TIMEOUT: 1502,
|
|
@@ -9765,7 +9765,7 @@ Ce.ErrorCode = {
|
|
|
9765
9765
|
UNSUPPORTED_SERVER: 1403,
|
|
9766
9766
|
UNSUPPORTED_VERSION: 1404
|
|
9767
9767
|
};
|
|
9768
|
-
|
|
9768
|
+
Be.ErrorMessage = {
|
|
9769
9769
|
APPLICATION_ERROR: "Application error in method handler",
|
|
9770
9770
|
CONNECTION_TIMEOUT: "Connection timeout",
|
|
9771
9771
|
RESPONSE_TIMEOUT: "Response timeout",
|
|
@@ -11011,7 +11011,7 @@ class yb extends Gt.EventEmitter {
|
|
|
11011
11011
|
if (i)
|
|
11012
11012
|
return i.bufferedAmount <= i.bufferedAmountLowThreshold;
|
|
11013
11013
|
}, this.handleBrowserOnLine = () => {
|
|
11014
|
-
this.client.currentState ===
|
|
11014
|
+
this.client.currentState === le.RECONNECTING && (this.clearReconnectTimeout(), this.attemptReconnect(On.RR_SIGNAL_DISCONNECTED));
|
|
11015
11015
|
}, this.log = oA((t = e.loggerName) !== null && t !== void 0 ? t : It.Engine), this.loggerOptions = {
|
|
11016
11016
|
loggerName: e.loggerName,
|
|
11017
11017
|
loggerContextCb: () => this.logContext
|
|
@@ -11037,7 +11037,7 @@ class yb extends Gt.EventEmitter {
|
|
|
11037
11037
|
this.emit(_.SignalConnected);
|
|
11038
11038
|
}, 10), r;
|
|
11039
11039
|
} catch (r) {
|
|
11040
|
-
if (r instanceof
|
|
11040
|
+
if (r instanceof ae && r.reason === z.ServerUnreachable && (this.log.warn("Couldn't connect to server, attempt ".concat(this.joinAttempts, " of ").concat(this.maxJoinAttempts), this.logContext), this.joinAttempts < this.maxJoinAttempts))
|
|
11041
11041
|
return this.join(e, t, n, i);
|
|
11042
11042
|
throw r;
|
|
11043
11043
|
}
|
|
@@ -11077,7 +11077,7 @@ class yb extends Gt.EventEmitter {
|
|
|
11077
11077
|
throw new iA("a track with the same ID has already been published");
|
|
11078
11078
|
return new Promise((t, n) => {
|
|
11079
11079
|
const i = setTimeout(() => {
|
|
11080
|
-
delete this.pendingTrackResolvers[e.cid], n(new
|
|
11080
|
+
delete this.pendingTrackResolvers[e.cid], n(new ae("publication of local track timed out, no response from server", z.InternalError));
|
|
11081
11081
|
}, 1e4);
|
|
11082
11082
|
this.pendingTrackResolvers[e.cid] = {
|
|
11083
11083
|
resolve: (r) => {
|
|
@@ -11131,7 +11131,7 @@ class yb extends Gt.EventEmitter {
|
|
|
11131
11131
|
configure(e) {
|
|
11132
11132
|
return m(this, void 0, void 0, function* () {
|
|
11133
11133
|
var t, n;
|
|
11134
|
-
if (this.pcManager && this.pcManager.currentState !==
|
|
11134
|
+
if (this.pcManager && this.pcManager.currentState !== me.NEW)
|
|
11135
11135
|
return;
|
|
11136
11136
|
this.participantSid = (t = e.participant) === null || t === void 0 ? void 0 : t.sid;
|
|
11137
11137
|
const i = this.makeRTCConfiguration(e);
|
|
@@ -11140,12 +11140,12 @@ class yb extends Gt.EventEmitter {
|
|
|
11140
11140
|
}, this.pcManager.onPublisherOffer = (r) => {
|
|
11141
11141
|
this.client.sendOffer(r);
|
|
11142
11142
|
}, this.pcManager.onDataChannel = this.handleDataChannel, this.pcManager.onStateChange = (r, s, o) => m(this, void 0, void 0, function* () {
|
|
11143
|
-
if (this.log.debug("primary PC state changed ".concat(r), this.logContext), ["closed", "disconnected", "failed"].includes(s) && (this.publisherConnectionPromise = void 0), r ===
|
|
11143
|
+
if (this.log.debug("primary PC state changed ".concat(r), this.logContext), ["closed", "disconnected", "failed"].includes(s) && (this.publisherConnectionPromise = void 0), r === me.CONNECTED) {
|
|
11144
11144
|
const l = this.pcState === Et.New;
|
|
11145
11145
|
this.pcState = Et.Connected, l && this.emit(_.Connected, e);
|
|
11146
11146
|
} else
|
|
11147
|
-
r ===
|
|
11148
|
-
const a = this.client.isDisconnected || this.client.currentState ===
|
|
11147
|
+
r === me.FAILED && this.pcState === Et.Connected && (this.pcState = Et.Disconnected, this.handleDisconnect("peerconnection failed", o === "failed" ? On.RR_SUBSCRIBER_FAILED : On.RR_PUBLISHER_FAILED));
|
|
11148
|
+
const a = this.client.isDisconnected || this.client.currentState === le.RECONNECTING, c = [me.FAILED, me.CLOSING, me.CLOSED].includes(r);
|
|
11149
11149
|
a && c && !this._isClosed && this.emit(_.Offline);
|
|
11150
11150
|
}), this.pcManager.onTrack = (r) => {
|
|
11151
11151
|
this.emit(_.MediaTrackAdded, r.track, r.streams[0], r.receiver);
|
|
@@ -11295,7 +11295,7 @@ class yb extends Gt.EventEmitter {
|
|
|
11295
11295
|
}
|
|
11296
11296
|
(((t = this.clientConfiguration) === null || t === void 0 ? void 0 : t.resumeConnection) === fr.DISABLED || // signaling state could change to closed due to hardware sleep
|
|
11297
11297
|
// those connections cannot be resumed
|
|
11298
|
-
((i = (n = this.pcManager) === null || n === void 0 ? void 0 : n.currentState) !== null && i !== void 0 ? i :
|
|
11298
|
+
((i = (n = this.pcManager) === null || n === void 0 ? void 0 : n.currentState) !== null && i !== void 0 ? i : me.NEW) === me.NEW) && (this.fullReconnectOnNext = !0);
|
|
11299
11299
|
try {
|
|
11300
11300
|
this.attemptingReconnect = !0, this.fullReconnectOnNext ? yield this.restartConnection() : yield this.resumeConnection(e), this.clearPendingReconnect(), this.fullReconnectOnNext = !1;
|
|
11301
11301
|
} catch (r) {
|
|
@@ -11333,11 +11333,11 @@ class yb extends Gt.EventEmitter {
|
|
|
11333
11333
|
throw this.log.warn("attempted connection restart, without signal options present", this.logContext), new Ln();
|
|
11334
11334
|
r = yield this.join(e ?? this.url, this.token, this.signalOpts);
|
|
11335
11335
|
} catch (s) {
|
|
11336
|
-
throw s instanceof
|
|
11336
|
+
throw s instanceof ae && s.reason === z.NotAllowed ? new Fe("could not reconnect, token might be expired") : new Ln();
|
|
11337
11337
|
}
|
|
11338
11338
|
if (this.shouldFailNext)
|
|
11339
11339
|
throw this.shouldFailNext = !1, new Error("simulated failure");
|
|
11340
|
-
if (this.client.setReconnected(), this.emit(_.SignalRestarted, r), yield this.waitForPCReconnected(), this.client.currentState !==
|
|
11340
|
+
if (this.client.setReconnected(), this.emit(_.SignalRestarted, r), yield this.waitForPCReconnected(), this.client.currentState !== le.CONNECTED)
|
|
11341
11341
|
throw new Ln("Signal connection got severed during reconnect");
|
|
11342
11342
|
(t = this.regionUrlProvider) === null || t === void 0 || t.resetAttempts(), this.emit(_.Restarted);
|
|
11343
11343
|
} catch (r) {
|
|
@@ -11365,7 +11365,7 @@ class yb extends Gt.EventEmitter {
|
|
|
11365
11365
|
let r = "";
|
|
11366
11366
|
throw i instanceof Error && (r = i.message, this.log.error(i.message, Object.assign(Object.assign({}, this.logContext), {
|
|
11367
11367
|
error: i
|
|
11368
|
-
}))), i instanceof
|
|
11368
|
+
}))), i instanceof ae && i.reason === z.NotAllowed ? new Fe("could not reconnect, token might be expired") : i instanceof ae && i.reason === z.LeaveRequest ? i : new Ln(r);
|
|
11369
11369
|
}
|
|
11370
11370
|
if (this.emit(_.SignalResumed), n) {
|
|
11371
11371
|
const i = this.makeRTCConfiguration(n);
|
|
@@ -11374,7 +11374,7 @@ class yb extends Gt.EventEmitter {
|
|
|
11374
11374
|
this.log.warn("Did not receive reconnect response", this.logContext);
|
|
11375
11375
|
if (this.shouldFailNext)
|
|
11376
11376
|
throw this.shouldFailNext = !1, new Error("simulated failure");
|
|
11377
|
-
if (yield this.pcManager.triggerIceRestart(), yield this.waitForPCReconnected(), this.client.currentState !==
|
|
11377
|
+
if (yield this.pcManager.triggerIceRestart(), yield this.waitForPCReconnected(), this.client.currentState !== le.CONNECTED)
|
|
11378
11378
|
throw new Ln("Signal connection got severed during reconnect");
|
|
11379
11379
|
this.client.setReconnected(), ((t = this.reliableDC) === null || t === void 0 ? void 0 : t.readyState) === "open" && this.reliableDC.id === null && this.createDataChannels(), this.emit(_.Resumed);
|
|
11380
11380
|
});
|
|
@@ -11394,7 +11394,7 @@ class yb extends Gt.EventEmitter {
|
|
|
11394
11394
|
throw new Fe("PC manager is closed");
|
|
11395
11395
|
yield this.pcManager.ensurePCTransportConnection(void 0, this.peerConnectionTimeout), this.pcState = Et.Connected;
|
|
11396
11396
|
} catch (e) {
|
|
11397
|
-
throw this.pcState = Et.Disconnected, new
|
|
11397
|
+
throw this.pcState = Et.Disconnected, new ae("could not establish PC connection, ".concat(e.message), z.InternalError);
|
|
11398
11398
|
}
|
|
11399
11399
|
});
|
|
11400
11400
|
}
|
|
@@ -11471,7 +11471,7 @@ class yb extends Gt.EventEmitter {
|
|
|
11471
11471
|
throw new Fe("PC manager is closed");
|
|
11472
11472
|
const s = i ? n.pcManager.subscriber : n.pcManager.publisher, o = i ? "Subscriber" : "Publisher";
|
|
11473
11473
|
if (!s)
|
|
11474
|
-
throw new
|
|
11474
|
+
throw new ae("".concat(o, " connection not set"), z.InternalError);
|
|
11475
11475
|
let a = !1;
|
|
11476
11476
|
!i && !n.dataChannelForKind(t, i) && (n.createDataChannels(), a = !0), !a && !i && !n.pcManager.publisher.isICEConnected && n.pcManager.publisher.getICEConnectionState() !== "checking" && (a = !0), a && n.negotiate();
|
|
11477
11477
|
const c = n.dataChannelForKind(t, i);
|
|
@@ -11483,7 +11483,7 @@ class yb extends Gt.EventEmitter {
|
|
|
11483
11483
|
return;
|
|
11484
11484
|
yield st(50);
|
|
11485
11485
|
}
|
|
11486
|
-
throw new
|
|
11486
|
+
throw new ae("could not establish ".concat(o, " connection, state: ").concat(s.getICEConnectionState()), z.InternalError);
|
|
11487
11487
|
}();
|
|
11488
11488
|
});
|
|
11489
11489
|
}
|
|
@@ -11494,7 +11494,7 @@ class yb extends Gt.EventEmitter {
|
|
|
11494
11494
|
}
|
|
11495
11495
|
/* @internal */
|
|
11496
11496
|
verifyTransport() {
|
|
11497
|
-
return !(!this.pcManager || this.pcManager.currentState !==
|
|
11497
|
+
return !(!this.pcManager || this.pcManager.currentState !== me.CONNECTED || !this.client.ws || this.client.ws.readyState === WebSocket.CLOSED);
|
|
11498
11498
|
}
|
|
11499
11499
|
/** @internal */
|
|
11500
11500
|
negotiate() {
|
|
@@ -11647,7 +11647,7 @@ class Jc {
|
|
|
11647
11647
|
const n = yield t.json();
|
|
11648
11648
|
return this.lastUpdateAt = Date.now(), n;
|
|
11649
11649
|
} else
|
|
11650
|
-
throw new
|
|
11650
|
+
throw new ae("Could not fetch region settings: ".concat(t.statusText), t.status === 401 ? z.NotAllowed : z.InternalError, t.status);
|
|
11651
11651
|
});
|
|
11652
11652
|
}
|
|
11653
11653
|
setServerReportedRegions(e) {
|
|
@@ -12645,7 +12645,7 @@ class Lb extends $g {
|
|
|
12645
12645
|
switch (s.value.case) {
|
|
12646
12646
|
case "rpcResponse":
|
|
12647
12647
|
let o = s.value.value, a = null, c = null;
|
|
12648
|
-
o.value.case === "payload" ? a = o.value.value : o.value.case === "error" && (c =
|
|
12648
|
+
o.value.case === "payload" ? a = o.value.value : o.value.case === "error" && (c = Be.fromProto(o.value.value)), this.handleIncomingRpcResponse(o.requestId, a, c);
|
|
12649
12649
|
break;
|
|
12650
12650
|
case "rpcAck":
|
|
12651
12651
|
let l = s.value.value;
|
|
@@ -13099,7 +13099,7 @@ class Lb extends $g {
|
|
|
13099
13099
|
!FC() && r.roomOptions.e2ee && (r.log.info("End-to-end encryption is set up, simulcast publishing will be disabled on Safari versions and iOS browsers running iOS < v17.2", Object.assign({}, r.logContext)), p.simulcast = !1), p.source && (n.source = p.source);
|
|
13100
13100
|
const g = new Promise((v, w) => m(r, void 0, void 0, function* () {
|
|
13101
13101
|
try {
|
|
13102
|
-
if (this.engine.client.currentState !==
|
|
13102
|
+
if (this.engine.client.currentState !== le.CONNECTED) {
|
|
13103
13103
|
this.log.debug("deferring track publication until signal is connected", Object.assign(Object.assign({}, this.logContext), {
|
|
13104
13104
|
track: ne(n)
|
|
13105
13105
|
}));
|
|
@@ -13318,7 +13318,7 @@ class Lb extends $g {
|
|
|
13318
13318
|
e = r.track, e.off(Q.Muted, this.onTrackMuted), e.off(Q.Unmuted, this.onTrackUnmuted), e.off(Q.Ended, this.handleTrackEnded), e.off(Q.UpstreamPaused, this.onTrackUpstreamPaused), e.off(Q.UpstreamResumed, this.onTrackUpstreamResumed), e.off(Q.AudioTrackFeatureUpdate, this.onTrackFeatureUpdate), t === void 0 && (t = (i = (n = this.roomOptions) === null || n === void 0 ? void 0 : n.stopLocalTrackOnUnpublish) !== null && i !== void 0 ? i : !0), t ? e.stop() : e.stopMonitor();
|
|
13319
13319
|
let o = !1;
|
|
13320
13320
|
const a = e.sender;
|
|
13321
|
-
if (e.sender = void 0, this.engine.pcManager && this.engine.pcManager.currentState <
|
|
13321
|
+
if (e.sender = void 0, this.engine.pcManager && this.engine.pcManager.currentState < me.FAILED && a)
|
|
13322
13322
|
try {
|
|
13323
13323
|
for (const c of this.engine.pcManager.publisher.getTransceivers())
|
|
13324
13324
|
c.sender === a && (c.direction = "inactive", o = !0);
|
|
@@ -13701,17 +13701,17 @@ class Lb extends $g {
|
|
|
13701
13701
|
return new Promise((c, l) => m(n, void 0, void 0, function* () {
|
|
13702
13702
|
var d, u, h, f;
|
|
13703
13703
|
if (ad(s) > Og) {
|
|
13704
|
-
l(
|
|
13704
|
+
l(Be.builtIn("REQUEST_PAYLOAD_TOO_LARGE"));
|
|
13705
13705
|
return;
|
|
13706
13706
|
}
|
|
13707
13707
|
if (!((u = (d = this.engine.latestJoinResponse) === null || d === void 0 ? void 0 : d.serverInfo) === null || u === void 0) && u.version && gn((f = (h = this.engine.latestJoinResponse) === null || h === void 0 ? void 0 : h.serverInfo) === null || f === void 0 ? void 0 : f.version, "1.8.0") < 0) {
|
|
13708
|
-
l(
|
|
13708
|
+
l(Be.builtIn("UNSUPPORTED_SERVER"));
|
|
13709
13709
|
return;
|
|
13710
13710
|
}
|
|
13711
13711
|
const p = crypto.randomUUID();
|
|
13712
13712
|
yield this.publishRpcRequest(i, p, r, s, o - 2e3);
|
|
13713
13713
|
const g = setTimeout(() => {
|
|
13714
|
-
this.pendingAcks.delete(p), l(
|
|
13714
|
+
this.pendingAcks.delete(p), l(Be.builtIn("CONNECTION_TIMEOUT")), this.pendingResponses.delete(p), clearTimeout(v);
|
|
13715
13715
|
}, 2e3);
|
|
13716
13716
|
this.pendingAcks.set(p, {
|
|
13717
13717
|
resolve: () => {
|
|
@@ -13720,7 +13720,7 @@ class Lb extends $g {
|
|
|
13720
13720
|
participantIdentity: i
|
|
13721
13721
|
});
|
|
13722
13722
|
const v = setTimeout(() => {
|
|
13723
|
-
this.pendingResponses.delete(p), l(
|
|
13723
|
+
this.pendingResponses.delete(p), l(Be.builtIn("RESPONSE_TIMEOUT"));
|
|
13724
13724
|
}, o);
|
|
13725
13725
|
this.pendingResponses.set(p, {
|
|
13726
13726
|
resolve: (w, y) => {
|
|
@@ -13803,7 +13803,7 @@ class Lb extends $g {
|
|
|
13803
13803
|
participantIdentity: n,
|
|
13804
13804
|
resolve: i
|
|
13805
13805
|
}] of this.pendingResponses)
|
|
13806
|
-
n === e && (i(null,
|
|
13806
|
+
n === e && (i(null, Be.builtIn("RECIPIENT_DISCONNECTED")), this.pendingResponses.delete(t));
|
|
13807
13807
|
}
|
|
13808
13808
|
/** @internal */
|
|
13809
13809
|
setEnabledPublishCodecs(e) {
|
|
@@ -14176,12 +14176,12 @@ class mn extends Gt.EventEmitter {
|
|
|
14176
14176
|
try {
|
|
14177
14177
|
yield this.attemptConnection(p ?? s, o, a, w), this.abortController = void 0, h();
|
|
14178
14178
|
} catch (y) {
|
|
14179
|
-
if (this.regionUrlProvider && y instanceof
|
|
14179
|
+
if (this.regionUrlProvider && y instanceof ae && y.reason !== z.Cancelled && y.reason !== z.NotAllowed) {
|
|
14180
14180
|
let B = null;
|
|
14181
14181
|
try {
|
|
14182
14182
|
B = yield this.regionUrlProvider.getNextBestRegionUrl((g = this.abortController) === null || g === void 0 ? void 0 : g.signal);
|
|
14183
14183
|
} catch (C) {
|
|
14184
|
-
if (C instanceof
|
|
14184
|
+
if (C instanceof ae && (C.status === 401 || C.reason === z.Cancelled)) {
|
|
14185
14185
|
this.handleDisconnect(this.options.stopLocalTrackOnUnpublish), f(C);
|
|
14186
14186
|
return;
|
|
14187
14187
|
}
|
|
@@ -14189,7 +14189,7 @@ class mn extends Gt.EventEmitter {
|
|
|
14189
14189
|
B && !(!((v = this.abortController) === null || v === void 0) && v.signal.aborted) ? (this.log.info("Initial connection failed with ConnectionError: ".concat(y.message, ". Retrying with another region: ").concat(B), this.logContext), this.recreateEngine(), yield d(h, f, B)) : (this.handleDisconnect(this.options.stopLocalTrackOnUnpublish, Tu(y)), f(y));
|
|
14190
14190
|
} else {
|
|
14191
14191
|
let B = Ft.UNKNOWN_REASON;
|
|
14192
|
-
y instanceof
|
|
14192
|
+
y instanceof ae && (B = Tu(y)), this.handleDisconnect(this.options.stopLocalTrackOnUnpublish, B), f(y);
|
|
14193
14193
|
}
|
|
14194
14194
|
}
|
|
14195
14195
|
}), u = this.regionUrl;
|
|
@@ -14240,13 +14240,13 @@ class mn extends Gt.EventEmitter {
|
|
|
14240
14240
|
this.applyJoinResponse(u), this.setupLocalParticipantEvents(), this.emit(k.SignalConnected);
|
|
14241
14241
|
} catch (u) {
|
|
14242
14242
|
yield this.engine.close(), this.recreateEngine();
|
|
14243
|
-
const h = new
|
|
14244
|
-
throw u instanceof Error && (h.message = "".concat(h.message, ": ").concat(u.message)), u instanceof
|
|
14243
|
+
const h = new ae("could not establish signal connection", z.ServerUnreachable);
|
|
14244
|
+
throw u instanceof Error && (h.message = "".concat(h.message, ": ").concat(u.message)), u instanceof ae && (h.reason = u.reason, h.status = u.status), this.log.debug("error trying to establish signal connection", Object.assign(Object.assign({}, this.logContext), {
|
|
14245
14245
|
error: u
|
|
14246
14246
|
})), h;
|
|
14247
14247
|
}
|
|
14248
14248
|
if (c.signal.aborted)
|
|
14249
|
-
throw yield this.engine.close(), this.recreateEngine(), new
|
|
14249
|
+
throw yield this.engine.close(), this.recreateEngine(), new ae("Connection attempt aborted", z.Cancelled);
|
|
14250
14250
|
try {
|
|
14251
14251
|
yield this.engine.waitForPCInitialConnection(this.connOptions.peerConnectionTimeout, c);
|
|
14252
14252
|
} catch (u) {
|
|
@@ -14267,7 +14267,7 @@ class mn extends Gt.EventEmitter {
|
|
|
14267
14267
|
c.log.debug("already disconnected", c.logContext);
|
|
14268
14268
|
return;
|
|
14269
14269
|
}
|
|
14270
|
-
c.log.info("disconnect from room", Object.assign({}, c.logContext)), (c.state === ee.Connecting || c.state === ee.Reconnecting || c.isResuming) && (c.log.warn("abort connection attempt", c.logContext), (d = c.abortController) === null || d === void 0 || d.abort(), (h = (u = c.connectFuture) === null || u === void 0 ? void 0 : u.reject) === null || h === void 0 || h.call(u, new
|
|
14270
|
+
c.log.info("disconnect from room", Object.assign({}, c.logContext)), (c.state === ee.Connecting || c.state === ee.Reconnecting || c.isResuming) && (c.log.warn("abort connection attempt", c.logContext), (d = c.abortController) === null || d === void 0 || d.abort(), (h = (u = c.connectFuture) === null || u === void 0 ? void 0 : u.reject) === null || h === void 0 || h.call(u, new ae("Client initiated disconnect", z.Cancelled)), c.connectFuture = void 0), !((f = c.engine) === null || f === void 0) && f.client.isDisconnected || (yield c.engine.client.sendLeave()), c.engine && (yield c.engine.close()), c.handleDisconnect(l, Ft.CLIENT_INITIATED), c.engine = void 0;
|
|
14271
14271
|
} finally {
|
|
14272
14272
|
p();
|
|
14273
14273
|
}
|
|
@@ -14576,12 +14576,12 @@ class mn extends Gt.EventEmitter {
|
|
|
14576
14576
|
handleIncomingRpcRequest(e, t, n, i, r, s) {
|
|
14577
14577
|
return m(this, void 0, void 0, function* () {
|
|
14578
14578
|
if (yield this.engine.publishRpcAck(e, t), s !== 1) {
|
|
14579
|
-
yield this.engine.publishRpcResponse(e, t, null,
|
|
14579
|
+
yield this.engine.publishRpcResponse(e, t, null, Be.builtIn("UNSUPPORTED_VERSION"));
|
|
14580
14580
|
return;
|
|
14581
14581
|
}
|
|
14582
14582
|
const o = this.rpcHandlers.get(n);
|
|
14583
14583
|
if (!o) {
|
|
14584
|
-
yield this.engine.publishRpcResponse(e, t, null,
|
|
14584
|
+
yield this.engine.publishRpcResponse(e, t, null, Be.builtIn("UNSUPPORTED_METHOD"));
|
|
14585
14585
|
return;
|
|
14586
14586
|
}
|
|
14587
14587
|
let a = null, c = null;
|
|
@@ -14592,9 +14592,9 @@ class mn extends Gt.EventEmitter {
|
|
|
14592
14592
|
payload: i,
|
|
14593
14593
|
responseTimeout: r
|
|
14594
14594
|
});
|
|
14595
|
-
ad(l) > Og ? (a =
|
|
14595
|
+
ad(l) > Og ? (a = Be.builtIn("RESPONSE_PAYLOAD_TOO_LARGE"), console.warn("RPC Response payload too large for ".concat(n))) : c = l;
|
|
14596
14596
|
} catch (l) {
|
|
14597
|
-
l instanceof
|
|
14597
|
+
l instanceof Be ? a = l : (console.warn("Uncaught error returned by RPC handler for ".concat(n, ". Returning APPLICATION_ERROR instead."), l), a = Be.builtIn("APPLICATION_ERROR"));
|
|
14598
14598
|
}
|
|
14599
14599
|
yield this.engine.publishRpcResponse(e, t, c, a);
|
|
14600
14600
|
});
|
|
@@ -15823,7 +15823,7 @@ function qb(...A) {
|
|
|
15823
15823
|
throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${A.length}.`);
|
|
15824
15824
|
}
|
|
15825
15825
|
function Le(A) {
|
|
15826
|
-
return Object.assign(A, { optional: () => ld(A), and: (e) =>
|
|
15826
|
+
return Object.assign(A, { optional: () => ld(A), and: (e) => de(A, e), or: (e) => jg(A, e), select: (e) => e === void 0 ? mr(A) : mr(e, A) });
|
|
15827
15827
|
}
|
|
15828
15828
|
function Yc(A) {
|
|
15829
15829
|
return Object.assign(((e) => Object.assign(e, { [Symbol.iterator]() {
|
|
@@ -15855,7 +15855,7 @@ const zb = (A, e) => {
|
|
|
15855
15855
|
return !1;
|
|
15856
15856
|
return !0;
|
|
15857
15857
|
};
|
|
15858
|
-
function
|
|
15858
|
+
function de(...A) {
|
|
15859
15859
|
return Le({ [nt]: () => ({ match: (e) => {
|
|
15860
15860
|
let t = {};
|
|
15861
15861
|
const n = (i, r) => {
|
|
@@ -15897,18 +15897,18 @@ function pA(A) {
|
|
|
15897
15897
|
const Wg = Le(q(function(A) {
|
|
15898
15898
|
return !0;
|
|
15899
15899
|
})), Zb = Wg, gA = (A) => Object.assign(Le(A), { startsWith: (e) => {
|
|
15900
|
-
return gA(
|
|
15900
|
+
return gA(de(A, (t = e, q((n) => fA(n) && n.startsWith(t)))));
|
|
15901
15901
|
var t;
|
|
15902
15902
|
}, endsWith: (e) => {
|
|
15903
|
-
return gA(
|
|
15903
|
+
return gA(de(A, (t = e, q((n) => fA(n) && n.endsWith(t)))));
|
|
15904
15904
|
var t;
|
|
15905
|
-
}, minLength: (e) => gA(
|
|
15906
|
-
return gA(
|
|
15905
|
+
}, minLength: (e) => gA(de(A, ((t) => q((n) => fA(n) && n.length >= t))(e))), length: (e) => gA(de(A, ((t) => q((n) => fA(n) && n.length === t))(e))), maxLength: (e) => gA(de(A, ((t) => q((n) => fA(n) && n.length <= t))(e))), includes: (e) => {
|
|
15906
|
+
return gA(de(A, (t = e, q((n) => fA(n) && n.includes(t)))));
|
|
15907
15907
|
var t;
|
|
15908
15908
|
}, regex: (e) => {
|
|
15909
|
-
return gA(
|
|
15909
|
+
return gA(de(A, (t = e, q((n) => fA(n) && !!n.match(t)))));
|
|
15910
15910
|
var t;
|
|
15911
|
-
} }), ew = gA(q(fA)), Mt = (A) => Object.assign(Le(A), { between: (e, t) => Mt(
|
|
15911
|
+
} }), ew = gA(q(fA)), Mt = (A) => Object.assign(Le(A), { between: (e, t) => Mt(de(A, ((n, i) => q((r) => Ht(r) && n <= r && i >= r))(e, t))), lt: (e) => Mt(de(A, ((t) => q((n) => Ht(n) && n < t))(e))), gt: (e) => Mt(de(A, ((t) => q((n) => Ht(n) && n > t))(e))), lte: (e) => Mt(de(A, ((t) => q((n) => Ht(n) && n <= t))(e))), gte: (e) => Mt(de(A, ((t) => q((n) => Ht(n) && n >= t))(e))), int: () => Mt(de(A, q((e) => Ht(e) && Number.isInteger(e)))), finite: () => Mt(de(A, q((e) => Ht(e) && Number.isFinite(e)))), positive: () => Mt(de(A, q((e) => Ht(e) && e > 0))), negative: () => Mt(de(A, q((e) => Ht(e) && e < 0))) }), tw = Mt(q(Ht)), mA = (A) => Object.assign(Le(A), { between: (e, t) => mA(de(A, ((n, i) => q((r) => pA(r) && n <= r && i >= r))(e, t))), lt: (e) => mA(de(A, ((t) => q((n) => pA(n) && n < t))(e))), gt: (e) => mA(de(A, ((t) => q((n) => pA(n) && n > t))(e))), lte: (e) => mA(de(A, ((t) => q((n) => pA(n) && n <= t))(e))), gte: (e) => mA(de(A, ((t) => q((n) => pA(n) && n >= t))(e))), positive: () => mA(de(A, q((e) => pA(e) && e > 0))), negative: () => mA(de(A, q((e) => pA(e) && e < 0))) }), Aw = mA(q(pA)), nw = Le(q(function(A) {
|
|
15912
15912
|
return typeof A == "boolean";
|
|
15913
15913
|
})), iw = Le(q(function(A) {
|
|
15914
15914
|
return typeof A == "symbol";
|
|
@@ -15969,7 +15969,7 @@ var ow = { __proto__: null, matcher: nt, optional: ld, array: function(...A) {
|
|
|
15969
15969
|
return c && l;
|
|
15970
15970
|
}), selections: t };
|
|
15971
15971
|
}, getSelectionKeys: () => A.length === 0 ? [] : [...dt(A[0]), ...dt(A[1])] }) });
|
|
15972
|
-
}, intersection:
|
|
15972
|
+
}, intersection: de, union: jg, not: function(A) {
|
|
15973
15973
|
return Le({ [nt]: () => ({ match: (e) => ({ matched: !Oe(A, e, () => {
|
|
15974
15974
|
}) }), getSelectionKeys: () => [], matcherType: "not" }) });
|
|
15975
15975
|
}, when: q, select: mr, any: Wg, _: Zb, string: ew, number: tw, bigint: Aw, boolean: nw, symbol: iw, nullish: rw, nonNullable: sw, instanceOf: function(A) {
|
|
@@ -17190,7 +17190,7 @@ function se(A) {
|
|
|
17190
17190
|
* Copyright 2017 Google LLC
|
|
17191
17191
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
17192
17192
|
*/
|
|
17193
|
-
function
|
|
17193
|
+
function ce(A) {
|
|
17194
17194
|
return se({ ...A, state: !0, attribute: !1 });
|
|
17195
17195
|
}
|
|
17196
17196
|
var xw = Object.defineProperty, Rw = Object.getOwnPropertyDescriptor, Pw = (A, e, t, n) => {
|
|
@@ -18170,7 +18170,7 @@ var Ay = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
|
|
|
18170
18170
|
return e === 11 && A.type === 12 || e === 28 && A.type === 29 ? !0 : e === 2 && A.type === 3;
|
|
18171
18171
|
}, PA = function(A) {
|
|
18172
18172
|
return A.type === 17 || A.type === 15;
|
|
18173
|
-
},
|
|
18173
|
+
}, ue = function(A) {
|
|
18174
18174
|
return A.type === 16 || PA(A);
|
|
18175
18175
|
}, pm = function(A) {
|
|
18176
18176
|
return A.length > 1 ? [A[0], A[1]] : [A[0]];
|
|
@@ -18278,7 +18278,7 @@ var Ay = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
|
|
|
18278
18278
|
return 0;
|
|
18279
18279
|
}, Sn = function(A) {
|
|
18280
18280
|
return (A[0].type === 20 ? A[0].value : "unknown") === "from";
|
|
18281
|
-
},
|
|
18281
|
+
}, Ce = function(A, e, t) {
|
|
18282
18282
|
return Math.min(Math.max(A, e), t);
|
|
18283
18283
|
}, ot = function(A, e) {
|
|
18284
18284
|
return [
|
|
@@ -18287,10 +18287,10 @@ var Ay = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
|
|
|
18287
18287
|
A[6] * e[0] + A[7] * e[1] + A[8] * e[2]
|
|
18288
18288
|
];
|
|
18289
18289
|
}, UE = function(A) {
|
|
18290
|
-
return Vt(
|
|
18290
|
+
return Vt(Ce(Math.round(A[0] * 255), 0, 255), Ce(Math.round(A[1] * 255), 0, 255), Ce(Math.round(A[2] * 255), 0, 255), Ce(A[3], 0, 1));
|
|
18291
18291
|
}, gd = function(A) {
|
|
18292
18292
|
var e = A[0], t = A[1], n = A[2], i = A[3], r = Un([e, t, n]);
|
|
18293
|
-
return Vt(
|
|
18293
|
+
return Vt(Ce(Math.round(r[0] * 255), 0, 255), Ce(Math.round(r[1] * 255), 0, 255), Ce(Math.round(r[2] * 255), 0, 255), i);
|
|
18294
18294
|
}, Ir = function(A) {
|
|
18295
18295
|
var e = KA([A[0], A[1], A[2]]);
|
|
18296
18296
|
return gd([e[0], e[1], e[2], A[3]]);
|
|
@@ -18298,24 +18298,24 @@ var Ay = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
|
|
|
18298
18298
|
if (Sn(e.filter(Ke)))
|
|
18299
18299
|
throw new Error("Relative color not supported for lab()");
|
|
18300
18300
|
var t = No(e), n = t[0], i = t[1], r = t[2], s = t[3], o = Un(KA(Vo([n, i, r])));
|
|
18301
|
-
return Vt(
|
|
18301
|
+
return Vt(Ce(Math.round(o[0] * 255), 0, 255), Ce(Math.round(o[1] * 255), 0, 255), Ce(Math.round(o[2] * 255), 0, 255), s);
|
|
18302
18302
|
}, kE = function(A, e) {
|
|
18303
18303
|
if (Sn(e.filter(Ke)))
|
|
18304
18304
|
throw new Error("Relative color not supported for oklab()");
|
|
18305
18305
|
var t = No(e), n = t[0], i = t[1], r = t[2], s = t[3], o = Un(KA($o([n, i, r])));
|
|
18306
|
-
return Vt(
|
|
18306
|
+
return Vt(Ce(Math.round(o[0] * 255), 0, 255), Ce(Math.round(o[1] * 255), 0, 255), Ce(Math.round(o[2] * 255), 0, 255), s);
|
|
18307
18307
|
}, FE = function(A, e) {
|
|
18308
18308
|
if (Sn(e.filter(Ke)))
|
|
18309
18309
|
throw new Error("Relative color not supported for oklch()");
|
|
18310
18310
|
var t = Em(e), n = t[0], i = t[1], r = t[2], s = t[3], o = Un(KA($o(Ko([n, i, r]))));
|
|
18311
|
-
return Vt(
|
|
18311
|
+
return Vt(Ce(Math.round(o[0] * 255), 0, 255), Ce(Math.round(o[1] * 255), 0, 255), Ce(Math.round(o[2] * 255), 0, 255), s);
|
|
18312
18312
|
}, QE = function(A, e) {
|
|
18313
18313
|
if (Sn(e.filter(Ke)))
|
|
18314
18314
|
throw new Error("Relative color not supported for lch()");
|
|
18315
18315
|
var t = ym(e), n = t[0], i = t[1], r = t[2], s = t[3], o = Un(KA(Vo(Ko([n, i, r]))));
|
|
18316
|
-
return Vt(
|
|
18316
|
+
return Vt(Ce(Math.round(o[0] * 255), 0, 255), Ce(Math.round(o[1] * 255), 0, 255), Ce(Math.round(o[2] * 255), 0, 255), s);
|
|
18317
18317
|
}, wm = function(A, e) {
|
|
18318
|
-
var t = e.filter(Ke), n = t[0], i = t[1], r = t[2], s = t[3], o = (n.type === 17 ? vt(n.number) : Mo.parse(A, n)) / (Math.PI * 2), a =
|
|
18318
|
+
var t = e.filter(Ke), n = t[0], i = t[1], r = t[2], s = t[3], o = (n.type === 17 ? vt(n.number) : Mo.parse(A, n)) / (Math.PI * 2), a = ue(i) ? i.number / 100 : 0, c = ue(r) ? r.number / 100 : 0, l = typeof s < "u" && ue(s) ? re(s, 1) : 1;
|
|
18319
18319
|
return [o, a, c, l];
|
|
18320
18320
|
}, ph = function(A, e) {
|
|
18321
18321
|
if (Sn(e))
|
|
@@ -18323,13 +18323,13 @@ var Ay = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
|
|
|
18323
18323
|
var t = wm(A, e), n = t[0], i = t[1], r = t[2], s = t[3], o = Um([n, i, r]);
|
|
18324
18324
|
return Vt(o[0] * 255, o[1] * 255, o[2] * 255, i === 0 ? 1 : s);
|
|
18325
18325
|
}, ym = function(A) {
|
|
18326
|
-
var e = A.filter(Ke), t =
|
|
18326
|
+
var e = A.filter(Ke), t = ue(e[0]) ? e[0].number : 0, n = ue(e[1]) ? e[1].number : 0, i = Te(e[2]) || NA(e[2]) ? e[2].number : 0, r = typeof e[4] < "u" && ue(e[4]) ? re(e[4], 1) : 1;
|
|
18327
18327
|
return [t, n, i, r];
|
|
18328
18328
|
}, No = function(A) {
|
|
18329
|
-
var e = A.filter(Ke), t = e[0].type === 16 ? e[0].number / 100 : Te(e[0]) ? e[0].number : 0, n = e[1].type === 16 ? e[1].number / 100 : Te(e[1]) ? e[1].number : 0, i = Te(e[2]) || NA(e[2]) ? e[2].number : 0, r = typeof e[4] < "u" &&
|
|
18329
|
+
var e = A.filter(Ke), t = e[0].type === 16 ? e[0].number / 100 : Te(e[0]) ? e[0].number : 0, n = e[1].type === 16 ? e[1].number / 100 : Te(e[1]) ? e[1].number : 0, i = Te(e[2]) || NA(e[2]) ? e[2].number : 0, r = typeof e[4] < "u" && ue(e[4]) ? re(e[4], 1) : 1;
|
|
18330
18330
|
return [t, n, i, r];
|
|
18331
18331
|
}, Em = function(A) {
|
|
18332
|
-
var e = A.filter(Ke), t = e[0].type === 16 ? e[0].number / 100 : Te(e[0]) ? e[0].number : 0, n = e[1].type === 16 ? e[1].number / 100 : Te(e[1]) ? e[1].number : 0, i = Te(e[2]) || NA(e[2]) ? e[2].number : 0, r = typeof e[4] < "u" &&
|
|
18332
|
+
var e = A.filter(Ke), t = e[0].type === 16 ? e[0].number / 100 : Te(e[0]) ? e[0].number : 0, n = e[1].type === 16 ? e[1].number / 100 : Te(e[1]) ? e[1].number : 0, i = Te(e[2]) || NA(e[2]) ? e[2].number : 0, r = typeof e[4] < "u" && ue(e[4]) ? re(e[4], 1) : 1;
|
|
18333
18333
|
return [t, n, i, r];
|
|
18334
18334
|
}, Sm = function(A) {
|
|
18335
18335
|
return ot(
|
|
@@ -18500,9 +18500,9 @@ var Ay = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
|
|
|
18500
18500
|
}, NE = function(A) {
|
|
18501
18501
|
var e = KA([A[0], A[1], A[2]]), t = e[0], n = e[1], i = e[2];
|
|
18502
18502
|
return [
|
|
18503
|
-
|
|
18504
|
-
|
|
18505
|
-
|
|
18503
|
+
Ce(Math.round(t * 255), 0, 255),
|
|
18504
|
+
Ce(Math.round(n * 255), 0, 255),
|
|
18505
|
+
Ce(Math.round(i * 255), 0, 255),
|
|
18506
18506
|
A[3]
|
|
18507
18507
|
];
|
|
18508
18508
|
}, KE = function(A) {
|
|
@@ -19035,7 +19035,7 @@ var Ay = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
|
|
|
19035
19035
|
format: "color"
|
|
19036
19036
|
}, Go = function(A, e) {
|
|
19037
19037
|
var t = _A.parse(A, e[0]), n = e[1];
|
|
19038
|
-
return n &&
|
|
19038
|
+
return n && ue(n) ? { color: t, stop: n } : { color: t, stop: null };
|
|
19039
19039
|
}, Ch = function(A, e) {
|
|
19040
19040
|
var t = A[0], n = A[A.length - 1];
|
|
19041
19041
|
t.stop === null && (t.stop = Me), n.stop === null && (n.stop = TA);
|
|
@@ -19211,7 +19211,7 @@ var Ay = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
|
|
|
19211
19211
|
return r.push(TA), d;
|
|
19212
19212
|
}
|
|
19213
19213
|
else
|
|
19214
|
-
(
|
|
19214
|
+
(ue(u) || PA(u)) && r.push(u);
|
|
19215
19215
|
else if (W(u))
|
|
19216
19216
|
switch (u.value) {
|
|
19217
19217
|
case xm:
|
|
@@ -19231,7 +19231,7 @@ var Ay = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
|
|
|
19231
19231
|
case _m:
|
|
19232
19232
|
return n = 3, !1;
|
|
19233
19233
|
}
|
|
19234
|
-
else if (PA(u) ||
|
|
19234
|
+
else if (PA(u) || ue(u))
|
|
19235
19235
|
return Array.isArray(n) || (n = []), n.push(u), !1;
|
|
19236
19236
|
return d;
|
|
19237
19237
|
}, a);
|
|
@@ -19264,7 +19264,7 @@ var Ay = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
|
|
|
19264
19264
|
case "bottom":
|
|
19265
19265
|
return r.push(TA), !1;
|
|
19266
19266
|
}
|
|
19267
|
-
else if (
|
|
19267
|
+
else if (ue(d) || PA(d))
|
|
19268
19268
|
return r.push(d), !1;
|
|
19269
19269
|
return l;
|
|
19270
19270
|
}, a) : o === 1 && (a = s.reduce(function(l, d) {
|
|
@@ -19285,7 +19285,7 @@ var Ay = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
|
|
|
19285
19285
|
case _m:
|
|
19286
19286
|
return n = 3, !1;
|
|
19287
19287
|
}
|
|
19288
|
-
else if (PA(d) ||
|
|
19288
|
+
else if (PA(d) || ue(d))
|
|
19289
19289
|
return Array.isArray(n) || (n = []), n.push(d), !1;
|
|
19290
19290
|
return l;
|
|
19291
19291
|
}, a)), a) {
|
|
@@ -19378,7 +19378,7 @@ var Om = {
|
|
|
19378
19378
|
prefix: !1,
|
|
19379
19379
|
parse: function(A, e) {
|
|
19380
19380
|
return jt(e).map(function(t) {
|
|
19381
|
-
return t.filter(
|
|
19381
|
+
return t.filter(ue);
|
|
19382
19382
|
}).map(pm);
|
|
19383
19383
|
}
|
|
19384
19384
|
}, xS = {
|
|
@@ -19422,7 +19422,7 @@ var PS = {
|
|
|
19422
19422
|
});
|
|
19423
19423
|
}
|
|
19424
19424
|
}, DS = function(A) {
|
|
19425
|
-
return W(A) ||
|
|
19425
|
+
return W(A) || ue(A);
|
|
19426
19426
|
}, jo = function(A) {
|
|
19427
19427
|
return {
|
|
19428
19428
|
name: "border-".concat(A, "-color"),
|
|
@@ -19438,7 +19438,7 @@ var PS = {
|
|
|
19438
19438
|
prefix: !1,
|
|
19439
19439
|
type: 1,
|
|
19440
19440
|
parse: function(e, t) {
|
|
19441
|
-
return pm(t.filter(
|
|
19441
|
+
return pm(t.filter(ue));
|
|
19442
19442
|
}
|
|
19443
19443
|
};
|
|
19444
19444
|
}, NS = Wo("top-left"), KS = Wo("top-right"), $S = Wo("bottom-right"), VS = Wo("bottom-left"), Jo = function(A) {
|
|
@@ -19621,7 +19621,7 @@ var rU = {
|
|
|
19621
19621
|
type: 4
|
|
19622
19622
|
/* PropertyDescriptorParsingType.TOKEN_VALUE */
|
|
19623
19623
|
}, wh = function(A, e) {
|
|
19624
|
-
return W(A) && A.value === "normal" ? 1.2 * e : A.type === 17 ? e * A.number :
|
|
19624
|
+
return W(A) && A.value === "normal" ? 1.2 * e : A.type === 17 ? e * A.number : ue(A) ? re(A, e) : e;
|
|
19625
19625
|
}, oU = {
|
|
19626
19626
|
name: "list-style-image",
|
|
19627
19627
|
initialValue: "none",
|
|
@@ -19931,7 +19931,7 @@ var rU = {
|
|
|
19931
19931
|
prefix: !0,
|
|
19932
19932
|
type: 1,
|
|
19933
19933
|
parse: function(A, e) {
|
|
19934
|
-
var t = e.filter(
|
|
19934
|
+
var t = e.filter(ue);
|
|
19935
19935
|
return t.length !== 2 ? TU : [t[0], t[1]];
|
|
19936
19936
|
}
|
|
19937
19937
|
}, FU = {
|
|
@@ -20379,7 +20379,7 @@ var QU = {
|
|
|
20379
20379
|
return PA(o) ? o : Me;
|
|
20380
20380
|
case "length-percentage":
|
|
20381
20381
|
var a = r.parseComponentValue();
|
|
20382
|
-
return
|
|
20382
|
+
return ue(a) ? a : Me;
|
|
20383
20383
|
case "time":
|
|
20384
20384
|
return Lm.parse(A, r.parseComponentValue());
|
|
20385
20385
|
}
|
|
@@ -22031,7 +22031,7 @@ var fe = function(A, e, t, n, i) {
|
|
|
22031
22031
|
var n = e[0], i = e[1], r = e[2], s = A[0], o = A[1];
|
|
22032
22032
|
if (!s)
|
|
22033
22033
|
return [0, 0];
|
|
22034
|
-
if (
|
|
22034
|
+
if (ue(s) && o && ue(o))
|
|
22035
22035
|
return [re(s, t.width), re(o, t.height)];
|
|
22036
22036
|
var a = us(r);
|
|
22037
22037
|
if (W(s) && (s.value === ii.CONTAIN || s.value === ii.COVER)) {
|
|
@@ -22056,10 +22056,10 @@ var fe = function(A, e, t, n, i) {
|
|
|
22056
22056
|
}
|
|
22057
22057
|
if (a) {
|
|
22058
22058
|
var v = 0, w = 0;
|
|
22059
|
-
return
|
|
22059
|
+
return ue(s) ? v = re(s, t.width) : ue(o) && (w = re(o, t.height)), Vn(s) ? v = w * r : (!o || Vn(o)) && (w = v / r), [v, w];
|
|
22060
22060
|
}
|
|
22061
22061
|
var y = null, B = null;
|
|
22062
|
-
if (
|
|
22062
|
+
if (ue(s) ? y = re(s, t.width) : o && ue(o) && (B = re(o, t.height)), y !== null && (!o || Vn(o)) && (B = l && d ? y / n * i : t.height), B !== null && Vn(s) && (y = l && d ? B / i * n : t.width), y !== null && B !== null)
|
|
22063
22063
|
return [y, B];
|
|
22064
22064
|
throw new Error("Unable to calculate background-size for element");
|
|
22065
22065
|
}, jn = function(A, e) {
|
|
@@ -28027,13 +28027,13 @@ GA([
|
|
|
28027
28027
|
se({ type: Function })
|
|
28028
28028
|
], Dt.prototype, "onClose", 2);
|
|
28029
28029
|
GA([
|
|
28030
|
-
|
|
28030
|
+
ce()
|
|
28031
28031
|
], Dt.prototype, "apiBaseUrl", 2);
|
|
28032
28032
|
GA([
|
|
28033
|
-
|
|
28033
|
+
ce()
|
|
28034
28034
|
], Dt.prototype, "selectedCourse", 2);
|
|
28035
28035
|
GA([
|
|
28036
|
-
|
|
28036
|
+
ce()
|
|
28037
28037
|
], Dt.prototype, "agentName", 2);
|
|
28038
28038
|
customElements.get("obi-course-modal") || customElements.define("obi-course-modal", Dt);
|
|
28039
28039
|
/**
|
|
@@ -28516,7 +28516,7 @@ tv([
|
|
|
28516
28516
|
se({ type: Object })
|
|
28517
28517
|
], Or.prototype, "volume", 2);
|
|
28518
28518
|
tv([
|
|
28519
|
-
|
|
28519
|
+
ce()
|
|
28520
28520
|
], Or.prototype, "canvasRef", 2);
|
|
28521
28521
|
customElements.get("obi-audio-equalizer") || customElements.define("obi-audio-equalizer", Or);
|
|
28522
28522
|
var ax = Object.defineProperty, cx = Object.getOwnPropertyDescriptor, lx = (A, e, t, n) => {
|
|
@@ -28604,7 +28604,7 @@ aa.styles = ge`
|
|
|
28604
28604
|
}
|
|
28605
28605
|
`;
|
|
28606
28606
|
lx([
|
|
28607
|
-
|
|
28607
|
+
ce()
|
|
28608
28608
|
], aa.prototype, "activeDots", 2);
|
|
28609
28609
|
customElements.get("obi-dot-loader") || customElements.define("obi-dot-loader", aa);
|
|
28610
28610
|
let Dd = class extends Z {
|
|
@@ -29331,7 +29331,7 @@ const Gl = Px(class extends Dx {
|
|
|
29331
29331
|
--obi-spinner-size: 16px;
|
|
29332
29332
|
--obi-spinner-border-width: 2px;
|
|
29333
29333
|
}
|
|
29334
|
-
`,
|
|
29334
|
+
`, be = ge`
|
|
29335
29335
|
:host {
|
|
29336
29336
|
box-sizing: border-box;
|
|
29337
29337
|
font-family: var(--obi-font-family-secondary);
|
|
@@ -29431,7 +29431,7 @@ class Jt extends Z {
|
|
|
29431
29431
|
}
|
|
29432
29432
|
}
|
|
29433
29433
|
Jt.styles = [
|
|
29434
|
-
|
|
29434
|
+
be,
|
|
29435
29435
|
da,
|
|
29436
29436
|
ge`
|
|
29437
29437
|
:host {
|
|
@@ -29605,7 +29605,7 @@ class Md extends Z {
|
|
|
29605
29605
|
}
|
|
29606
29606
|
}
|
|
29607
29607
|
Md.styles = [
|
|
29608
|
-
|
|
29608
|
+
be,
|
|
29609
29609
|
da,
|
|
29610
29610
|
ge`
|
|
29611
29611
|
:host {
|
|
@@ -29703,7 +29703,7 @@ class lA extends Z {
|
|
|
29703
29703
|
}
|
|
29704
29704
|
}
|
|
29705
29705
|
lA.styles = [
|
|
29706
|
-
|
|
29706
|
+
be,
|
|
29707
29707
|
da,
|
|
29708
29708
|
ge`
|
|
29709
29709
|
:host {
|
|
@@ -29904,7 +29904,7 @@ class Ci extends Z {
|
|
|
29904
29904
|
}
|
|
29905
29905
|
}
|
|
29906
29906
|
Ci.styles = [
|
|
29907
|
-
|
|
29907
|
+
be,
|
|
29908
29908
|
da,
|
|
29909
29909
|
ge`
|
|
29910
29910
|
:host {
|
|
@@ -30048,7 +30048,7 @@ class WA extends Z {
|
|
|
30048
30048
|
}
|
|
30049
30049
|
}
|
|
30050
30050
|
WA.styles = [
|
|
30051
|
-
|
|
30051
|
+
be,
|
|
30052
30052
|
ge`
|
|
30053
30053
|
:host {
|
|
30054
30054
|
display: block;
|
|
@@ -30236,7 +30236,7 @@ class ha extends Z {
|
|
|
30236
30236
|
}
|
|
30237
30237
|
}
|
|
30238
30238
|
ha.styles = [
|
|
30239
|
-
|
|
30239
|
+
be,
|
|
30240
30240
|
ge`
|
|
30241
30241
|
:host {
|
|
30242
30242
|
display: block;
|
|
@@ -30396,7 +30396,7 @@ class In extends Z {
|
|
|
30396
30396
|
`;
|
|
30397
30397
|
}
|
|
30398
30398
|
}
|
|
30399
|
-
In.styles = [
|
|
30399
|
+
In.styles = [be];
|
|
30400
30400
|
Lr([
|
|
30401
30401
|
P({ type: Object })
|
|
30402
30402
|
], In.prototype, "session", 2);
|
|
@@ -30453,7 +30453,7 @@ class Nd extends Z {
|
|
|
30453
30453
|
}
|
|
30454
30454
|
}
|
|
30455
30455
|
Nd.styles = [
|
|
30456
|
-
|
|
30456
|
+
be,
|
|
30457
30457
|
ge`
|
|
30458
30458
|
:host {
|
|
30459
30459
|
display: block;
|
|
@@ -30589,7 +30589,7 @@ class JA extends Z {
|
|
|
30589
30589
|
`;
|
|
30590
30590
|
}
|
|
30591
30591
|
}
|
|
30592
|
-
JA.styles = [
|
|
30592
|
+
JA.styles = [be];
|
|
30593
30593
|
wi([
|
|
30594
30594
|
P({ type: Object })
|
|
30595
30595
|
], JA.prototype, "session", 2);
|
|
@@ -30642,7 +30642,7 @@ class cv extends Z {
|
|
|
30642
30642
|
}
|
|
30643
30643
|
}
|
|
30644
30644
|
cv.styles = [
|
|
30645
|
-
|
|
30645
|
+
be,
|
|
30646
30646
|
ge`
|
|
30647
30647
|
:host {
|
|
30648
30648
|
display: block;
|
|
@@ -30853,7 +30853,7 @@ class XA extends Z {
|
|
|
30853
30853
|
`;
|
|
30854
30854
|
}
|
|
30855
30855
|
}
|
|
30856
|
-
XA.styles = [
|
|
30856
|
+
XA.styles = [be];
|
|
30857
30857
|
yi([
|
|
30858
30858
|
P({ type: Object })
|
|
30859
30859
|
], XA.prototype, "session", 2);
|
|
@@ -30928,7 +30928,7 @@ class Ei extends Z {
|
|
|
30928
30928
|
}
|
|
30929
30929
|
}
|
|
30930
30930
|
Ei.styles = [
|
|
30931
|
-
|
|
30931
|
+
be,
|
|
30932
30932
|
ge`
|
|
30933
30933
|
:host {
|
|
30934
30934
|
display: flex;
|
|
@@ -31063,7 +31063,7 @@ class _n extends Z {
|
|
|
31063
31063
|
`;
|
|
31064
31064
|
}
|
|
31065
31065
|
}
|
|
31066
|
-
_n.styles = [
|
|
31066
|
+
_n.styles = [be];
|
|
31067
31067
|
Hr([
|
|
31068
31068
|
P({ type: Object })
|
|
31069
31069
|
], _n.prototype, "session", 2);
|
|
@@ -31099,7 +31099,7 @@ class lv extends Z {
|
|
|
31099
31099
|
}
|
|
31100
31100
|
}
|
|
31101
31101
|
lv.styles = [
|
|
31102
|
-
|
|
31102
|
+
be,
|
|
31103
31103
|
ge`
|
|
31104
31104
|
:host {
|
|
31105
31105
|
display: flex;
|
|
@@ -31256,7 +31256,7 @@ class Kd extends Z {
|
|
|
31256
31256
|
}
|
|
31257
31257
|
}
|
|
31258
31258
|
Kd.styles = [
|
|
31259
|
-
|
|
31259
|
+
be,
|
|
31260
31260
|
ge`
|
|
31261
31261
|
:host {
|
|
31262
31262
|
display: block;
|
|
@@ -31433,7 +31433,7 @@ class qA extends Z {
|
|
|
31433
31433
|
`;
|
|
31434
31434
|
}
|
|
31435
31435
|
}
|
|
31436
|
-
qA.styles = [
|
|
31436
|
+
qA.styles = [be];
|
|
31437
31437
|
Si([
|
|
31438
31438
|
P({ type: Object })
|
|
31439
31439
|
], qA.prototype, "session", 2);
|
|
@@ -31508,7 +31508,7 @@ class pa extends Z {
|
|
|
31508
31508
|
}
|
|
31509
31509
|
}
|
|
31510
31510
|
pa.styles = [
|
|
31511
|
-
|
|
31511
|
+
be,
|
|
31512
31512
|
ge`
|
|
31513
31513
|
:host {
|
|
31514
31514
|
--obi-modal-width: 640px;
|
|
@@ -31607,7 +31607,7 @@ class Ui extends Z {
|
|
|
31607
31607
|
`;
|
|
31608
31608
|
}
|
|
31609
31609
|
}
|
|
31610
|
-
Ui.styles = [
|
|
31610
|
+
Ui.styles = [be];
|
|
31611
31611
|
ga([
|
|
31612
31612
|
P({ type: Object })
|
|
31613
31613
|
], Ui.prototype, "session", 2);
|
|
@@ -31646,7 +31646,7 @@ class xn extends Z {
|
|
|
31646
31646
|
`;
|
|
31647
31647
|
}
|
|
31648
31648
|
}
|
|
31649
|
-
xn.styles = [
|
|
31649
|
+
xn.styles = [be];
|
|
31650
31650
|
Mr([
|
|
31651
31651
|
P({ type: Object })
|
|
31652
31652
|
], xn.prototype, "session", 2);
|
|
@@ -31684,7 +31684,7 @@ class Ti extends Z {
|
|
|
31684
31684
|
`;
|
|
31685
31685
|
}
|
|
31686
31686
|
}
|
|
31687
|
-
Ti.styles = [
|
|
31687
|
+
Ti.styles = [be];
|
|
31688
31688
|
ma([
|
|
31689
31689
|
P({ type: Object })
|
|
31690
31690
|
], Ti.prototype, "session", 2);
|
|
@@ -31722,7 +31722,7 @@ class ki extends Z {
|
|
|
31722
31722
|
`;
|
|
31723
31723
|
}
|
|
31724
31724
|
}
|
|
31725
|
-
ki.styles = [
|
|
31725
|
+
ki.styles = [be];
|
|
31726
31726
|
va([
|
|
31727
31727
|
P({ type: Object })
|
|
31728
31728
|
], ki.prototype, "session", 2);
|
|
@@ -31763,7 +31763,7 @@ class zA extends Z {
|
|
|
31763
31763
|
`;
|
|
31764
31764
|
}
|
|
31765
31765
|
}
|
|
31766
|
-
zA.styles = [
|
|
31766
|
+
zA.styles = [be];
|
|
31767
31767
|
Fi([
|
|
31768
31768
|
P({ type: Object })
|
|
31769
31769
|
], zA.prototype, "session", 2);
|
|
@@ -31783,18 +31783,18 @@ Fi([
|
|
|
31783
31783
|
P({ type: Boolean, attribute: "close-disabled" })
|
|
31784
31784
|
], zA.prototype, "closeDisabled", 2);
|
|
31785
31785
|
customElements.get("obi-voice-guidance-modal") || customElements.define("obi-voice-guidance-modal", zA);
|
|
31786
|
-
var T2 = Object.defineProperty, k2 = Object.getOwnPropertyDescriptor,
|
|
31786
|
+
var T2 = Object.defineProperty, k2 = Object.getOwnPropertyDescriptor, we = (A, e, t, n) => {
|
|
31787
31787
|
for (var i = n > 1 ? void 0 : n ? k2(e, t) : e, r = A.length - 1, s; r >= 0; r--)
|
|
31788
31788
|
(s = A[r]) && (i = (n ? s(e, t, i) : s(i)) || i);
|
|
31789
31789
|
return n && i && T2(e, t, i), i;
|
|
31790
31790
|
};
|
|
31791
|
-
let
|
|
31791
|
+
let he = class extends Z {
|
|
31792
31792
|
constructor() {
|
|
31793
31793
|
super(), this.apiKey = "", this.isActive = !0, this.linkOnlyAccess = !1, this.urlBlacklist = [], this.position = "bottom-right", this.user = null, this.state = M.READY, this.storedActiveState = void 0, this.showCourseModal = !1, this.showSessionStartModal = !1, this.showShareMicModal = !1, this.micShareEnabled = !1, this.showVoiceGuidanceModal = !1, this.voiceGuidanceEnabled = !1, this.selectedCourse = null, this.isHovering = !1, this.navVisible = !1, this.activeSession = null, this.volume = {
|
|
31794
31794
|
speaker: "ASSISTANT",
|
|
31795
31795
|
volume: 0,
|
|
31796
31796
|
spectrum: []
|
|
31797
|
-
}, this.databaseConfig = null, this.configLoaded = !1, this.
|
|
31797
|
+
}, this.databaseConfig = null, this.configLoaded = !1, this.primaryColor = "#9500FF", this.sessionToken = null, this.roomToken = null, this.roomUrl = null, this.boundSaveSessionData = null, this.obiClient = null, this.closeNavTimeoutRef = null, this.researchingTimeoutRef = null, this.urlCheckInterval = null, this.currentUrl = "", this.connectObi = Ni(
|
|
31798
31798
|
async (e) => {
|
|
31799
31799
|
if (this.activeSession) {
|
|
31800
31800
|
te("connection_already_exists", { sessionToken: e }, "ObiWidget"), console.log("Connection already exists");
|
|
@@ -31949,7 +31949,9 @@ let le = class extends Z {
|
|
|
31949
31949
|
}
|
|
31950
31950
|
if (!this.selectedCourse.id) {
|
|
31951
31951
|
const i = "Session ID is missing.";
|
|
31952
|
-
console.error("[SessionStartModal] Validation failed:", i, {
|
|
31952
|
+
console.error("[SessionStartModal] Validation failed:", i, {
|
|
31953
|
+
session: this.selectedCourse
|
|
31954
|
+
}), Ge(i, {
|
|
31953
31955
|
componentName: "SessionStartModal",
|
|
31954
31956
|
handlerName: "handleSessionModalStart",
|
|
31955
31957
|
sessionData: this.selectedCourse
|
|
@@ -32093,12 +32095,7 @@ let le = class extends Z {
|
|
|
32093
32095
|
}
|
|
32094
32096
|
}
|
|
32095
32097
|
updateFromConfig() {
|
|
32096
|
-
|
|
32097
|
-
this.apiKey = window.obiWidgetConfig.apiKey || this.apiKey, window.obiWidgetConfig.position !== void 0 && (this.position = window.obiWidgetConfig.position, this.setAttribute("position", this.position)), window.obiWidgetConfig.primaryColor !== void 0 && (this.style.setProperty("--obi-primary", window.obiWidgetConfig.primaryColor), this.generateColorVariables(window.obiWidgetConfig.primaryColor)), window.obiWidgetConfig.user !== void 0 && (this.user = window.obiWidgetConfig.user), window.obiWidgetConfig.isActive !== void 0 && (this.isActive = window.obiWidgetConfig.isActive), window.obiWidgetConfig.linkOnlyAccess !== void 0 && (this.linkOnlyAccess = window.obiWidgetConfig.linkOnlyAccess), window.obiWidgetConfig.urlBlacklist !== void 0 && (this.urlBlacklist = window.obiWidgetConfig.urlBlacklist);
|
|
32098
|
-
const e = window.obiWidgetConfig.position !== void 0, t = window.obiWidgetConfig.primaryColor !== void 0, n = window.obiWidgetConfig.linkOnlyAccess !== void 0, i = window.obiWidgetConfig.urlBlacklist !== void 0;
|
|
32099
|
-
this.configAllInCode = e && t && n && i, this.configAllInCode ? (this.configLoaded = !0, this.applyFinalConfiguration()) : this.configLoaded || this.fetchDatabaseConfig(), window.obiWidgetConfig.showMenu === !0 && (this.state = M.LOADING, this.showCourseModal = !0, window.obiWidgetConfig.showMenu = !1);
|
|
32100
|
-
} else
|
|
32101
|
-
this.configLoaded || this.fetchDatabaseConfig();
|
|
32098
|
+
window.obiWidgetConfig ? (this.apiKey = window.obiWidgetConfig.apiKey || this.apiKey, window.obiWidgetConfig.position !== void 0 && (this.position = window.obiWidgetConfig.position, this.setAttribute("position", this.position)), window.obiWidgetConfig.primaryColor !== void 0 && (this.style.setProperty("--obi-primary", window.obiWidgetConfig.primaryColor), this.generateColorVariables(window.obiWidgetConfig.primaryColor)), window.obiWidgetConfig.user !== void 0 && (this.user = window.obiWidgetConfig.user), window.obiWidgetConfig.isActive !== void 0 && (this.isActive = window.obiWidgetConfig.isActive), window.obiWidgetConfig.linkOnlyAccess !== void 0 && (this.linkOnlyAccess = window.obiWidgetConfig.linkOnlyAccess), window.obiWidgetConfig.urlBlacklist !== void 0 && (this.urlBlacklist = window.obiWidgetConfig.urlBlacklist), this.fetchDatabaseConfig(), window.obiWidgetConfig.showMenu === !0 && (this.state = M.LOADING, this.showCourseModal = !0, window.obiWidgetConfig.showMenu = !1)) : this.configLoaded || this.fetchDatabaseConfig();
|
|
32102
32099
|
}
|
|
32103
32100
|
/**
|
|
32104
32101
|
* Generate additional color variables based on the primary color
|
|
@@ -32331,67 +32328,64 @@ let le = class extends Z {
|
|
|
32331
32328
|
></obi-navigation-bar>
|
|
32332
32329
|
` : zt}
|
|
32333
32330
|
</div>
|
|
32334
|
-
|
|
32331
|
+
|
|
32335
32332
|
${this.showCourseModal ? O`<obi-course-modal
|
|
32336
32333
|
.onClose=${this.handleCloseModals.bind(this)}
|
|
32337
32334
|
.apiKey=${this.apiKey}
|
|
32338
32335
|
@course-select=${this.handleCourseSelectEvent}
|
|
32339
32336
|
></obi-course-modal>` : zt}
|
|
32340
|
-
|
|
32341
32337
|
${this.showSessionStartModal && this.selectedCourse ? O`
|
|
32342
|
-
|
|
32343
|
-
|
|
32338
|
+
<obi-session-start-modal
|
|
32339
|
+
.session=${this.selectedCourse ? {
|
|
32344
32340
|
id: this.selectedCourse.id,
|
|
32345
32341
|
name: this.selectedCourse.name,
|
|
32346
32342
|
description: this.selectedCourse.description,
|
|
32347
32343
|
agentName: this.databaseConfig?.agentName
|
|
32348
32344
|
} : {}}
|
|
32349
|
-
|
|
32350
|
-
|
|
32351
|
-
|
|
32352
|
-
|
|
32353
|
-
|
|
32354
|
-
|
|
32355
|
-
|
|
32356
|
-
|
|
32357
|
-
|
|
32345
|
+
?open=${this.showSessionStartModal && !!this.selectedCourse}
|
|
32346
|
+
color=${this.primaryColor}
|
|
32347
|
+
@obi-start=${this.handleSessionModalStart}
|
|
32348
|
+
@obi-close=${this.handleSessionModalClose}
|
|
32349
|
+
@obi-error=${this.handleSessionModalError}
|
|
32350
|
+
>
|
|
32351
|
+
</obi-session-start-modal>
|
|
32352
|
+
` : zt}
|
|
32358
32353
|
${this.showShareMicModal ? O`
|
|
32359
|
-
|
|
32360
|
-
|
|
32354
|
+
<obi-share-mic-modal
|
|
32355
|
+
.session=${this.selectedCourse ? {
|
|
32361
32356
|
id: this.selectedCourse.id,
|
|
32362
32357
|
name: this.selectedCourse.name,
|
|
32363
32358
|
description: this.selectedCourse.description,
|
|
32364
32359
|
agentName: this.databaseConfig?.agentName
|
|
32365
32360
|
} : {}}
|
|
32366
|
-
|
|
32367
|
-
|
|
32368
|
-
|
|
32369
|
-
|
|
32370
|
-
|
|
32371
|
-
|
|
32372
|
-
|
|
32373
|
-
|
|
32374
|
-
|
|
32361
|
+
?open=${this.showShareMicModal}
|
|
32362
|
+
?disabled=${!this.micShareEnabled}
|
|
32363
|
+
color=${this.primaryColor}
|
|
32364
|
+
@obi-continue=${this.handleShareMicModalContinue}
|
|
32365
|
+
@obi-close=${this.handleShareMicModalClose}
|
|
32366
|
+
>
|
|
32367
|
+
</obi-share-mic-modal>
|
|
32368
|
+
` : zt}
|
|
32375
32369
|
${this.showVoiceGuidanceModal ? O`
|
|
32376
|
-
|
|
32377
|
-
|
|
32370
|
+
<obi-voice-guidance-modal
|
|
32371
|
+
.session=${this.selectedCourse ? {
|
|
32378
32372
|
id: this.selectedCourse.id,
|
|
32379
32373
|
name: this.selectedCourse.name,
|
|
32380
32374
|
description: this.selectedCourse.description,
|
|
32381
32375
|
agentName: this.databaseConfig?.agentName
|
|
32382
32376
|
} : {}}
|
|
32383
|
-
|
|
32384
|
-
|
|
32385
|
-
|
|
32386
|
-
|
|
32387
|
-
|
|
32388
|
-
|
|
32389
|
-
|
|
32390
|
-
|
|
32377
|
+
?open=${this.showVoiceGuidanceModal}
|
|
32378
|
+
?disabled=${!this.voiceGuidanceEnabled}
|
|
32379
|
+
color=${this.primaryColor}
|
|
32380
|
+
@obi-continue=${this.handleVoiceGuidanceModalContinue}
|
|
32381
|
+
@obi-close=${this.handleVoiceGuidanceModalClose}
|
|
32382
|
+
>
|
|
32383
|
+
</obi-voice-guidance-modal>
|
|
32384
|
+
` : zt}
|
|
32391
32385
|
`;
|
|
32392
32386
|
}
|
|
32393
32387
|
};
|
|
32394
|
-
|
|
32388
|
+
he.styles = ge`
|
|
32395
32389
|
:host {
|
|
32396
32390
|
display: block;
|
|
32397
32391
|
position: fixed;
|
|
@@ -32541,76 +32535,73 @@ le.styles = ge`
|
|
|
32541
32535
|
color-mix(in srgb, var(--obi-paused-pulse, #a06df9) 75%, transparent);
|
|
32542
32536
|
}
|
|
32543
32537
|
`;
|
|
32544
|
-
|
|
32545
|
-
|
|
32546
|
-
],
|
|
32547
|
-
|
|
32548
|
-
|
|
32549
|
-
],
|
|
32550
|
-
|
|
32551
|
-
|
|
32552
|
-
],
|
|
32553
|
-
|
|
32554
|
-
|
|
32555
|
-
],
|
|
32556
|
-
|
|
32557
|
-
|
|
32558
|
-
],
|
|
32559
|
-
|
|
32560
|
-
|
|
32561
|
-
],
|
|
32562
|
-
|
|
32563
|
-
|
|
32564
|
-
],
|
|
32565
|
-
|
|
32566
|
-
|
|
32567
|
-
],
|
|
32568
|
-
|
|
32569
|
-
|
|
32570
|
-
],
|
|
32571
|
-
|
|
32572
|
-
|
|
32573
|
-
],
|
|
32574
|
-
|
|
32575
|
-
|
|
32576
|
-
],
|
|
32577
|
-
|
|
32578
|
-
|
|
32579
|
-
],
|
|
32580
|
-
|
|
32581
|
-
|
|
32582
|
-
],
|
|
32583
|
-
|
|
32584
|
-
|
|
32585
|
-
],
|
|
32586
|
-
|
|
32587
|
-
|
|
32588
|
-
],
|
|
32589
|
-
|
|
32590
|
-
|
|
32591
|
-
],
|
|
32592
|
-
|
|
32593
|
-
|
|
32594
|
-
],
|
|
32595
|
-
|
|
32596
|
-
|
|
32597
|
-
],
|
|
32598
|
-
|
|
32599
|
-
|
|
32600
|
-
],
|
|
32601
|
-
|
|
32602
|
-
|
|
32603
|
-
],
|
|
32604
|
-
|
|
32605
|
-
|
|
32606
|
-
],
|
|
32607
|
-
|
|
32608
|
-
|
|
32609
|
-
],
|
|
32610
|
-
|
|
32611
|
-
ae()
|
|
32612
|
-
], le.prototype, "primaryColor", 2);
|
|
32613
|
-
customElements.get("obi-widget") || customElements.define("obi-widget", le);
|
|
32538
|
+
we([
|
|
32539
|
+
ce()
|
|
32540
|
+
], he.prototype, "apiKey", 2);
|
|
32541
|
+
we([
|
|
32542
|
+
ce()
|
|
32543
|
+
], he.prototype, "isActive", 2);
|
|
32544
|
+
we([
|
|
32545
|
+
ce()
|
|
32546
|
+
], he.prototype, "linkOnlyAccess", 2);
|
|
32547
|
+
we([
|
|
32548
|
+
ce()
|
|
32549
|
+
], he.prototype, "urlBlacklist", 2);
|
|
32550
|
+
we([
|
|
32551
|
+
ce()
|
|
32552
|
+
], he.prototype, "position", 2);
|
|
32553
|
+
we([
|
|
32554
|
+
ce()
|
|
32555
|
+
], he.prototype, "user", 2);
|
|
32556
|
+
we([
|
|
32557
|
+
ce()
|
|
32558
|
+
], he.prototype, "state", 2);
|
|
32559
|
+
we([
|
|
32560
|
+
ce()
|
|
32561
|
+
], he.prototype, "storedActiveState", 2);
|
|
32562
|
+
we([
|
|
32563
|
+
ce()
|
|
32564
|
+
], he.prototype, "showCourseModal", 2);
|
|
32565
|
+
we([
|
|
32566
|
+
ce()
|
|
32567
|
+
], he.prototype, "showSessionStartModal", 2);
|
|
32568
|
+
we([
|
|
32569
|
+
ce()
|
|
32570
|
+
], he.prototype, "showShareMicModal", 2);
|
|
32571
|
+
we([
|
|
32572
|
+
ce()
|
|
32573
|
+
], he.prototype, "micShareEnabled", 2);
|
|
32574
|
+
we([
|
|
32575
|
+
ce()
|
|
32576
|
+
], he.prototype, "showVoiceGuidanceModal", 2);
|
|
32577
|
+
we([
|
|
32578
|
+
ce()
|
|
32579
|
+
], he.prototype, "voiceGuidanceEnabled", 2);
|
|
32580
|
+
we([
|
|
32581
|
+
ce()
|
|
32582
|
+
], he.prototype, "selectedCourse", 2);
|
|
32583
|
+
we([
|
|
32584
|
+
ce()
|
|
32585
|
+
], he.prototype, "isHovering", 2);
|
|
32586
|
+
we([
|
|
32587
|
+
ce()
|
|
32588
|
+
], he.prototype, "navVisible", 2);
|
|
32589
|
+
we([
|
|
32590
|
+
ce()
|
|
32591
|
+
], he.prototype, "activeSession", 2);
|
|
32592
|
+
we([
|
|
32593
|
+
ce()
|
|
32594
|
+
], he.prototype, "volume", 2);
|
|
32595
|
+
we([
|
|
32596
|
+
ce()
|
|
32597
|
+
], he.prototype, "databaseConfig", 2);
|
|
32598
|
+
we([
|
|
32599
|
+
ce()
|
|
32600
|
+
], he.prototype, "configLoaded", 2);
|
|
32601
|
+
we([
|
|
32602
|
+
ce()
|
|
32603
|
+
], he.prototype, "primaryColor", 2);
|
|
32604
|
+
customElements.get("obi-widget") || customElements.define("obi-widget", he);
|
|
32614
32605
|
const J2 = Fr({
|
|
32615
32606
|
tagName: "obi-course-modal",
|
|
32616
32607
|
elementClass: Dt,
|
|
@@ -32629,7 +32620,7 @@ const J2 = Fr({
|
|
|
32629
32620
|
react: Tr
|
|
32630
32621
|
}), Y2 = Fr({
|
|
32631
32622
|
tagName: "obi-widget",
|
|
32632
|
-
elementClass:
|
|
32623
|
+
elementClass: he,
|
|
32633
32624
|
react: Tr
|
|
32634
32625
|
});
|
|
32635
32626
|
export {
|