interview-widget 3.2.16 → 3.2.18
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/components/interview/proctoring/gaze-detection/hooks/use-warning-manager.d.ts +2 -2
- package/dist/{widget.3.2.16.css → widget.3.2.18.css} +1 -1
- package/dist/{widget.es.3.2.16.js → widget.es.3.2.18.js} +331 -323
- package/dist/{widget.umd.3.2.16.js → widget.umd.3.2.18.js} +4 -4
- package/package.json +9 -9
|
@@ -423,12 +423,12 @@ const uu = (e) => {
|
|
|
423
423
|
const t = D(null), i = D(null), [r, n] = C(!1), [o, s] = C(!1), [a, l] = C(null), [d, u] = C([]), [h, w] = C([]), [f, g] = C(""), [y, b] = C(""), [p, v] = C(!1), _ = M(() => {
|
|
424
424
|
i.current && (i.current.getTracks().forEach((x) => x.stop()), i.current = null, l(null));
|
|
425
425
|
}, []), E = M(async () => {
|
|
426
|
-
var x,
|
|
426
|
+
var x, T, P, j;
|
|
427
427
|
try {
|
|
428
428
|
const z = await navigator.mediaDevices.enumerateDevices(), X = z.filter((U) => U.kind === "audioinput"), O = z.filter((U) => U.kind === "videoinput");
|
|
429
429
|
if (u(X), w(O), !f && X.length > 0) {
|
|
430
430
|
const U = (x = i.current) == null ? void 0 : x.getAudioTracks()[0], ee = U == null ? void 0 : U.getSettings().deviceId;
|
|
431
|
-
g(ee || ((
|
|
431
|
+
g(ee || ((T = X[0]) == null ? void 0 : T.deviceId) || "");
|
|
432
432
|
}
|
|
433
433
|
if (!y && O.length > 0) {
|
|
434
434
|
const U = (P = i.current) == null ? void 0 : P.getVideoTracks()[0], ee = U == null ? void 0 : U.getSettings().deviceId;
|
|
@@ -437,11 +437,11 @@ const uu = (e) => {
|
|
|
437
437
|
} catch (z) {
|
|
438
438
|
console.error("Error enumerating devices:", z);
|
|
439
439
|
}
|
|
440
|
-
}, [f, y]),
|
|
440
|
+
}, [f, y]), k = M(async (x, T) => {
|
|
441
441
|
const P = {
|
|
442
442
|
width: { ideal: 1280 },
|
|
443
443
|
height: { ideal: 720 },
|
|
444
|
-
...
|
|
444
|
+
...T ? { deviceId: { exact: T } } : { facingMode: "user" }
|
|
445
445
|
}, j = {
|
|
446
446
|
echoCancellation: !0,
|
|
447
447
|
noiseSuppression: !0,
|
|
@@ -472,17 +472,17 @@ const uu = (e) => {
|
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
474
|
z ? (i.current = z, l(z), t.current && (t.current.srcObject = z, await t.current.play().catch((X) => console.error("Error playing video element", X)))) : (i.current = null, l(null)), await E();
|
|
475
|
-
}, [E]),
|
|
476
|
-
x !== f && (v(!0), g(x), _(), await
|
|
475
|
+
}, [E]), A = async (x) => {
|
|
476
|
+
x !== f && (v(!0), g(x), _(), await k(x, y), v(!1));
|
|
477
477
|
}, G = async (x) => {
|
|
478
|
-
x !== y && (v(!0), b(x), _(), await
|
|
478
|
+
x !== y && (v(!0), b(x), _(), await k(f, x), v(!1));
|
|
479
479
|
};
|
|
480
480
|
return B(() => {
|
|
481
481
|
if (!e) {
|
|
482
482
|
_();
|
|
483
483
|
return;
|
|
484
484
|
}
|
|
485
|
-
return
|
|
485
|
+
return k(), () => _();
|
|
486
486
|
}, [e]), {
|
|
487
487
|
videoRef: t,
|
|
488
488
|
audioAllowed: r,
|
|
@@ -493,7 +493,7 @@ const uu = (e) => {
|
|
|
493
493
|
selectedVideoDeviceId: y,
|
|
494
494
|
isDeviceLoading: p,
|
|
495
495
|
currentStream: a,
|
|
496
|
-
handleAudioChange:
|
|
496
|
+
handleAudioChange: A,
|
|
497
497
|
handleVideoChange: G,
|
|
498
498
|
stopStream: _
|
|
499
499
|
};
|
|
@@ -757,7 +757,7 @@ const uu = (e) => {
|
|
|
757
757
|
/* @__PURE__ */ c("path", { d: "M17 15a3.5 3.5 0 0 0-.025-4.975" })
|
|
758
758
|
]
|
|
759
759
|
}
|
|
760
|
-
),
|
|
760
|
+
), Se = {
|
|
761
761
|
FACE_DETECTED: "face_detected",
|
|
762
762
|
NO_FACE: "no_face_detected",
|
|
763
763
|
MULTIPLE_FACES: "multiple_faces",
|
|
@@ -765,7 +765,7 @@ const uu = (e) => {
|
|
|
765
765
|
CAMERA_ERROR: "camera_error",
|
|
766
766
|
MODEL_LOADING: "model_loading"
|
|
767
767
|
}, Ca = {
|
|
768
|
-
[
|
|
768
|
+
[Se.FACE_DETECTED]: {
|
|
769
769
|
icon: mu,
|
|
770
770
|
iconColor: "iw-text-green-600",
|
|
771
771
|
iconBg: "iw-bg-green-50",
|
|
@@ -775,7 +775,7 @@ const uu = (e) => {
|
|
|
775
775
|
description: "Your gaze is properly focused on the screen. Continue with your interview.",
|
|
776
776
|
buttonText: "Continue"
|
|
777
777
|
},
|
|
778
|
-
[
|
|
778
|
+
[Se.NO_FACE]: {
|
|
779
779
|
icon: wu,
|
|
780
780
|
iconColor: "iw-text-orange-600",
|
|
781
781
|
iconBg: "iw-bg-orange-50",
|
|
@@ -785,7 +785,7 @@ const uu = (e) => {
|
|
|
785
785
|
description: "Please ensure you're positioned properly in front of the camera and that your face is clearly visible.",
|
|
786
786
|
buttonText: "I Understood"
|
|
787
787
|
},
|
|
788
|
-
[
|
|
788
|
+
[Se.MULTIPLE_FACES]: {
|
|
789
789
|
icon: yu,
|
|
790
790
|
iconColor: "iw-text-red-600",
|
|
791
791
|
iconBg: "iw-bg-red-50",
|
|
@@ -796,7 +796,7 @@ const uu = (e) => {
|
|
|
796
796
|
// "For interview integrity, please ensure you are alone in the room and only your face is visible to the camera.",
|
|
797
797
|
buttonText: "I Understood"
|
|
798
798
|
},
|
|
799
|
-
[
|
|
799
|
+
[Se.LOOKING_AWAY]: {
|
|
800
800
|
icon: cs,
|
|
801
801
|
iconColor: "iw-text-amber-600",
|
|
802
802
|
iconBg: "iw-bg-amber-50",
|
|
@@ -805,7 +805,7 @@ const uu = (e) => {
|
|
|
805
805
|
subtitle: "You looked away from the screen. Maintain focus to continue.",
|
|
806
806
|
buttonText: "I Understood"
|
|
807
807
|
},
|
|
808
|
-
[
|
|
808
|
+
[Se.CAMERA_ERROR]: {
|
|
809
809
|
icon: Kr,
|
|
810
810
|
iconColor: "iw-text-red-600",
|
|
811
811
|
iconBg: "iw-bg-red-50",
|
|
@@ -815,7 +815,7 @@ const uu = (e) => {
|
|
|
815
815
|
description: "Please check your camera connection and permissions, contact support if the problem continues.",
|
|
816
816
|
buttonText: "I Understood"
|
|
817
817
|
},
|
|
818
|
-
[
|
|
818
|
+
[Se.MODEL_LOADING]: {
|
|
819
819
|
icon: cs,
|
|
820
820
|
iconColor: "iw-text-blue-600",
|
|
821
821
|
iconBg: "iw-bg-blue-50",
|
|
@@ -1173,7 +1173,7 @@ var Ri = typeof Symbol == "function" && typeof Symbol() == "symbol";
|
|
|
1173
1173
|
function wt(e, t, i = !1) {
|
|
1174
1174
|
return typeof Symbol == "function" && typeof Symbol() == "symbol" ? i && Symbol.for && e ? Symbol.for(e) : e != null ? Symbol(e) : Symbol() : t;
|
|
1175
1175
|
}
|
|
1176
|
-
var Lu = wt("jas", void 0, !0), fs = wt(void 0, "0di"), er = wt(void 0, "1oa"),
|
|
1176
|
+
var Lu = wt("jas", void 0, !0), fs = wt(void 0, "0di"), er = wt(void 0, "1oa"), Ge = wt(void 0, Symbol()), Mu = wt(void 0, "0ub"), Du = wt(void 0, "0ubs"), Bn = wt(void 0, "0ubsb"), Pu = wt(void 0, "0actk"), vi = wt("m_m", "Pa", !0), ms = wt();
|
|
1177
1177
|
const Oa = { Ga: { value: 0, configurable: !0, writable: !0, enumerable: !1 } }, Ba = Object.defineProperties, S = Ri ? Lu : "Ga";
|
|
1178
1178
|
var ti;
|
|
1179
1179
|
const gs = [];
|
|
@@ -1191,7 +1191,7 @@ function ur(e) {
|
|
|
1191
1191
|
}
|
|
1192
1192
|
ye(gs, 7), ti = Object.freeze(gs);
|
|
1193
1193
|
var xi = {};
|
|
1194
|
-
function
|
|
1194
|
+
function $e(e, t) {
|
|
1195
1195
|
return t === void 0 ? e.h !== Zt && !!(2 & (0 | e.v[S])) : !!(2 & t) && e.h !== Zt;
|
|
1196
1196
|
}
|
|
1197
1197
|
const Zt = {};
|
|
@@ -1238,7 +1238,7 @@ function Qr(e) {
|
|
|
1238
1238
|
return e.Na = !0, e;
|
|
1239
1239
|
}
|
|
1240
1240
|
var Bu = Qr((e) => typeof e == "number"), ys = Qr((e) => typeof e == "string"), Uu = Qr((e) => typeof e == "boolean"), Jr = typeof pi.BigInt == "function" && typeof pi.BigInt(0) == "bigint";
|
|
1241
|
-
function
|
|
1241
|
+
function je(e) {
|
|
1242
1242
|
var t = e;
|
|
1243
1243
|
if (ys(t)) {
|
|
1244
1244
|
if (!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(t)) throw Error(String(t));
|
|
@@ -1278,14 +1278,14 @@ function Vn(e, t) {
|
|
|
1278
1278
|
return Number.isSafeInteger(i) ? i : dr(e, t);
|
|
1279
1279
|
}
|
|
1280
1280
|
function Hu(e, t) {
|
|
1281
|
-
return
|
|
1281
|
+
return je(Fi() ? BigInt.asUintN(64, (BigInt(t >>> 0) << BigInt(32)) + BigInt(e >>> 0)) : dr(e, t));
|
|
1282
1282
|
}
|
|
1283
1283
|
function mo(e, t) {
|
|
1284
1284
|
const i = 2147483648 & t;
|
|
1285
1285
|
return i && (t = ~t >>> 0, (e = 1 + ~e >>> 0) == 0 && (t = t + 1 >>> 0)), typeof (e = Vn(e, t)) == "number" ? i ? -e : e : i ? "-" + e : e;
|
|
1286
1286
|
}
|
|
1287
1287
|
function Ga(e, t) {
|
|
1288
|
-
return Fi() ?
|
|
1288
|
+
return Fi() ? je(BigInt.asIntN(64, (BigInt.asUintN(32, BigInt(t)) << BigInt(32)) + BigInt.asUintN(32, BigInt(e)))) : je(go(e, t));
|
|
1289
1289
|
}
|
|
1290
1290
|
function dr(e, t) {
|
|
1291
1291
|
if (e >>>= 0, (t >>>= 0) <= 2097151) var i = "" + (4294967296 * t + e);
|
|
@@ -1327,7 +1327,7 @@ function po(e, t) {
|
|
|
1327
1327
|
function rt(e) {
|
|
1328
1328
|
return Array.prototype.slice.call(e);
|
|
1329
1329
|
}
|
|
1330
|
-
const br = typeof BigInt == "function" ? BigInt.asIntN : void 0, qu = typeof BigInt == "function" ? BigInt.asUintN : void 0, ei = Number.isSafeInteger, en = Number.isFinite, _i = Math.trunc, Ku =
|
|
1330
|
+
const br = typeof BigInt == "function" ? BigInt.asIntN : void 0, qu = typeof BigInt == "function" ? BigInt.asUintN : void 0, ei = Number.isSafeInteger, en = Number.isFinite, _i = Math.trunc, Ku = je(0);
|
|
1331
1331
|
function rr(e) {
|
|
1332
1332
|
if (e != null && typeof e != "number") throw Error(`Value of float/double field must be a number, found ${typeof e}: ${e}`);
|
|
1333
1333
|
return e;
|
|
@@ -1383,17 +1383,17 @@ function Wa(e) {
|
|
|
1383
1383
|
}
|
|
1384
1384
|
function Ha(e) {
|
|
1385
1385
|
var t = _i(Number(e));
|
|
1386
|
-
return ei(t) ?
|
|
1386
|
+
return ei(t) ? je(t) : ((t = e.indexOf(".")) !== -1 && (e = e.substring(0, t)), Fi() ? je(br(64, BigInt(e))) : je(za(e)));
|
|
1387
1387
|
}
|
|
1388
1388
|
function qa(e) {
|
|
1389
|
-
return ei(e) ? e =
|
|
1389
|
+
return ei(e) ? e = je(yo(e)) : (e = _i(e), ei(e) ? e = String(e) : (Ei(e), e = go(oe, he)), e = je(e)), e;
|
|
1390
1390
|
}
|
|
1391
1391
|
function Xu(e) {
|
|
1392
1392
|
return e == null ? e : typeof e == "bigint" ? (Un(e) ? e = Number(e) : (e = br(64, e), e = Un(e) ? Number(e) : String(e)), e) : vr(e) ? typeof e == "number" ? yo(e) : Wa(e) : void 0;
|
|
1393
1393
|
}
|
|
1394
1394
|
function Or(e) {
|
|
1395
1395
|
const t = typeof e;
|
|
1396
|
-
return e == null ? e : t === "bigint" ?
|
|
1396
|
+
return e == null ? e : t === "bigint" ? je(br(64, e)) : vr(e) ? t === "string" ? Ha(e) : qa(e) : void 0;
|
|
1397
1397
|
}
|
|
1398
1398
|
function Ka(e) {
|
|
1399
1399
|
if (typeof e != "string") throw Error();
|
|
@@ -1417,7 +1417,7 @@ function Qu(e, t, i) {
|
|
|
1417
1417
|
t = Ha(t);
|
|
1418
1418
|
break e;
|
|
1419
1419
|
case "bigint":
|
|
1420
|
-
t =
|
|
1420
|
+
t = je(br(64, t));
|
|
1421
1421
|
break e;
|
|
1422
1422
|
default:
|
|
1423
1423
|
t = qa(t);
|
|
@@ -1554,7 +1554,7 @@ function _s() {
|
|
|
1554
1554
|
return rd || (rd = new vt(yr([]), void 0, void 0, void 0, Ju));
|
|
1555
1555
|
}
|
|
1556
1556
|
function tn(e) {
|
|
1557
|
-
return
|
|
1557
|
+
return Ge ? e[Ge] : void 0;
|
|
1558
1558
|
}
|
|
1559
1559
|
function Br(e, t) {
|
|
1560
1560
|
for (const i in e) !isNaN(i) && t(e, +i, e[i]);
|
|
@@ -1569,7 +1569,7 @@ function od(e, t) {
|
|
|
1569
1569
|
function rn(e, t, i, r) {
|
|
1570
1570
|
const n = r !== void 0;
|
|
1571
1571
|
r = !!r;
|
|
1572
|
-
var o, s =
|
|
1572
|
+
var o, s = Ge;
|
|
1573
1573
|
!n && Ri && s && (o = e[s]) && Br(o, od), s = [];
|
|
1574
1574
|
var a = e.length;
|
|
1575
1575
|
let l;
|
|
@@ -1589,7 +1589,7 @@ function rn(e, t, i, r) {
|
|
|
1589
1589
|
let g;
|
|
1590
1590
|
w = +f, u && !Number.isNaN(w) && (g = w + h) < o ? s[g] = a : (t ?? (t = {}))[f] = a;
|
|
1591
1591
|
}
|
|
1592
|
-
return t && (d ? s.push(t) : s[o] = t), n &&
|
|
1592
|
+
return t && (d ? s.push(t) : s[o] = t), n && Ge && (e = tn(e)) && e instanceof Gn && (s[Ge] = function(f) {
|
|
1593
1593
|
const g = new Gn();
|
|
1594
1594
|
return Br(f, (y, b, p) => {
|
|
1595
1595
|
g[b] = rt(p);
|
|
@@ -1711,14 +1711,14 @@ function vo(e, t, i) {
|
|
|
1711
1711
|
}
|
|
1712
1712
|
function As(e) {
|
|
1713
1713
|
const t = e.v, i = 0 | t[S];
|
|
1714
|
-
return
|
|
1714
|
+
return $e(e, i) ? e : Eo(e, t, i) ? vo(e, t) : Di(t, i);
|
|
1715
1715
|
}
|
|
1716
1716
|
function Di(e, t, i, r) {
|
|
1717
1717
|
return r ?? (r = !!(34 & t)), e = rn(e, t, ld, r), r = 32, i && (r |= 2), ye(e, t = 16769217 & t | r), e;
|
|
1718
1718
|
}
|
|
1719
1719
|
function xo(e) {
|
|
1720
1720
|
const t = e.v, i = 0 | t[S];
|
|
1721
|
-
return
|
|
1721
|
+
return $e(e, i) ? Eo(e, t, i) ? vo(e, t, !0) : new e.constructor(Di(t, i, !1)) : e;
|
|
1722
1722
|
}
|
|
1723
1723
|
function Pi(e) {
|
|
1724
1724
|
if (e.h !== Zt) return !1;
|
|
@@ -1726,7 +1726,7 @@ function Pi(e) {
|
|
|
1726
1726
|
return pr(t = Di(t, 0 | t[S]), 2048), e.v = t, e.h = void 0, e.m = void 0, !0;
|
|
1727
1727
|
}
|
|
1728
1728
|
function Oi(e) {
|
|
1729
|
-
if (!Pi(e) &&
|
|
1729
|
+
if (!Pi(e) && $e(e, 0 | e.v[S])) throw Error();
|
|
1730
1730
|
}
|
|
1731
1731
|
function ii(e, t) {
|
|
1732
1732
|
t === void 0 && (t = 0 | e[S]), 32 & t && !(4096 & t) && ye(e, 4096 | t);
|
|
@@ -1734,7 +1734,7 @@ function ii(e, t) {
|
|
|
1734
1734
|
function Eo(e, t, i) {
|
|
1735
1735
|
return !!(2 & i) || !(!(32 & i) || 4096 & i) && (ye(t, 2 | i), e.h = Zt, !0);
|
|
1736
1736
|
}
|
|
1737
|
-
const ud =
|
|
1737
|
+
const ud = je(0), Ct = {};
|
|
1738
1738
|
function ie(e, t, i, r, n) {
|
|
1739
1739
|
if ((t = xt(e.v, t, i, n)) !== null || r && e.m !== Zt) return t;
|
|
1740
1740
|
}
|
|
@@ -1773,7 +1773,7 @@ function zt() {
|
|
|
1773
1773
|
}
|
|
1774
1774
|
function Wt(e, t, i, r, n) {
|
|
1775
1775
|
let o = e.v, s = 0 | o[S];
|
|
1776
|
-
r =
|
|
1776
|
+
r = $e(e, s) ? 1 : r, n = !!n || r === 3, r === 2 && Pi(e) && (o = e.v, s = 0 | o[S]);
|
|
1777
1777
|
let a = (e = _o(o, t)) === ti ? 7 : 0 | e[S], l = ko(a, s);
|
|
1778
1778
|
var d = !(4 & l);
|
|
1779
1779
|
if (d) {
|
|
@@ -1849,7 +1849,7 @@ function No(e, t, i) {
|
|
|
1849
1849
|
const n = Li(r), o = xt(e, i, n);
|
|
1850
1850
|
let s;
|
|
1851
1851
|
if (o != null && o[vi] === xi) {
|
|
1852
|
-
if (
|
|
1852
|
+
if (!$e(o)) return Pi(o), o.v;
|
|
1853
1853
|
s = o.v;
|
|
1854
1854
|
} else Array.isArray(o) && (s = o);
|
|
1855
1855
|
if (s) {
|
|
@@ -1863,19 +1863,19 @@ function tc(e, t, i, r, n) {
|
|
|
1863
1863
|
if ((r = xt(e, r, n, (s) => {
|
|
1864
1864
|
const a = bo(s, i, !1, t);
|
|
1865
1865
|
return o = a !== s && a != null, a;
|
|
1866
|
-
})) != null) return o &&
|
|
1866
|
+
})) != null) return o && !$e(r) && ii(e, t), r;
|
|
1867
1867
|
}
|
|
1868
1868
|
function K(e, t, i, r) {
|
|
1869
1869
|
let n = e.v, o = 0 | n[S];
|
|
1870
1870
|
if ((t = tc(n, o, t, i, r)) == null) return t;
|
|
1871
|
-
if (o = 0 | n[S],
|
|
1871
|
+
if (o = 0 | n[S], !$e(e, o)) {
|
|
1872
1872
|
const s = xo(t);
|
|
1873
1873
|
s !== t && (Pi(e) && (n = e.v, o = 0 | n[S]), o = ge(n, o, i, t = s, r), ii(n, o));
|
|
1874
1874
|
}
|
|
1875
1875
|
return t;
|
|
1876
1876
|
}
|
|
1877
1877
|
function ic(e, t, i, r, n, o, s, a) {
|
|
1878
|
-
var l =
|
|
1878
|
+
var l = $e(e, i);
|
|
1879
1879
|
o = l ? 1 : o, s = !!s || o === 3, l = a && !l, (o === 2 || l) && Pi(e) && (i = 0 | (t = e.v)[S]);
|
|
1880
1880
|
var d = (e = _o(t, n)) === ti ? 7 : 0 | e[S], u = ko(d, i);
|
|
1881
1881
|
if (a = !(4 & u)) {
|
|
@@ -1887,7 +1887,7 @@ function ic(e, t, i, r, n, o, s, a) {
|
|
|
1887
1887
|
const v = bo(h[b], r, !1, w);
|
|
1888
1888
|
if (v instanceof r) {
|
|
1889
1889
|
if (!f) {
|
|
1890
|
-
const _ =
|
|
1890
|
+
const _ = $e(v);
|
|
1891
1891
|
g && (g = !_), y && (y = _);
|
|
1892
1892
|
}
|
|
1893
1893
|
h[p++] = v;
|
|
@@ -1909,7 +1909,7 @@ function rc(e) {
|
|
|
1909
1909
|
return e == null && (e = void 0), e;
|
|
1910
1910
|
}
|
|
1911
1911
|
function L(e, t, i, r, n) {
|
|
1912
|
-
return J(e, i, r = rc(r), n), r &&
|
|
1912
|
+
return J(e, i, r = rc(r), n), r && !$e(r) && ii(e.v), e;
|
|
1913
1913
|
}
|
|
1914
1914
|
function nr(e, t, i, r) {
|
|
1915
1915
|
e: {
|
|
@@ -1924,14 +1924,14 @@ function nr(e, t, i, r) {
|
|
|
1924
1924
|
} else s = ec(o, s, i, t);
|
|
1925
1925
|
ge(o, s, t, n);
|
|
1926
1926
|
}
|
|
1927
|
-
r &&
|
|
1927
|
+
r && !$e(r) && ii(e.v);
|
|
1928
1928
|
}
|
|
1929
1929
|
function Yt(e, t) {
|
|
1930
1930
|
return -273 & (2 & t ? 2 | e : -3 & e);
|
|
1931
1931
|
}
|
|
1932
1932
|
function Co(e, t, i, r) {
|
|
1933
1933
|
var n = r;
|
|
1934
|
-
Oi(e), e = ic(e, r = e.v, 0 | r[S], i, t, 2, !0), n = n ?? new i(), e.push(n), t = i = e === ti ? 7 : 0 | e[S], (n =
|
|
1934
|
+
Oi(e), e = ic(e, r = e.v, 0 | r[S], i, t, 2, !0), n = n ?? new i(), e.push(n), t = i = e === ti ? 7 : 0 | e[S], (n = $e(n)) ? (i &= -9, e.length === 1 && (i &= -4097)) : i |= 4096, i !== t && ye(e, i), n || ii(r);
|
|
1935
1935
|
}
|
|
1936
1936
|
function Ze(e, t, i) {
|
|
1937
1937
|
return Mi(ie(e, t, void 0, i));
|
|
@@ -1952,7 +1952,7 @@ function _t(e, t, i) {
|
|
|
1952
1952
|
function R(e, t, i) {
|
|
1953
1953
|
J(e, t, rr(i));
|
|
1954
1954
|
}
|
|
1955
|
-
function
|
|
1955
|
+
function ze(e, t, i) {
|
|
1956
1956
|
Lt(e, t, xr(i), "");
|
|
1957
1957
|
}
|
|
1958
1958
|
function Ur(e, t, i) {
|
|
@@ -2230,7 +2230,7 @@ function ft() {
|
|
|
2230
2230
|
var Do = ft(), dc = ft(), Po = ft(), Oo = ft(), hc = ft(), wc = ft(), md = ft(), cn = ft(), fc = ft(), mc = ft();
|
|
2231
2231
|
function mt(e, t, i) {
|
|
2232
2232
|
var r = e.v;
|
|
2233
|
-
|
|
2233
|
+
Ge && Ge in r && (r = r[Ge]) && delete r[t.g], t.h ? t.j(e, t.h, t.g, i, t.l) : t.j(e, t.g, i, t.l);
|
|
2234
2234
|
}
|
|
2235
2235
|
var I = class {
|
|
2236
2236
|
constructor(e, t) {
|
|
@@ -2241,8 +2241,8 @@ var I = class {
|
|
|
2241
2241
|
}
|
|
2242
2242
|
j() {
|
|
2243
2243
|
var n;
|
|
2244
|
-
var e = Qd, t = this.v, i = e.g, r =
|
|
2245
|
-
if (Ri && r && ((n = t[r]) == null ? void 0 : n[i]) != null && bi(Mu, 3), t = e.g, ms &&
|
|
2244
|
+
var e = Qd, t = this.v, i = e.g, r = Ge;
|
|
2245
|
+
if (Ri && r && ((n = t[r]) == null ? void 0 : n[i]) != null && bi(Mu, 3), t = e.g, ms && Ge && ms === void 0 && (r = (i = this.v)[Ge]) && (r = r.da)) try {
|
|
2246
2246
|
r(i, t, nd);
|
|
2247
2247
|
} catch (o) {
|
|
2248
2248
|
Ia(o);
|
|
@@ -2343,7 +2343,7 @@ function Vo(e) {
|
|
|
2343
2343
|
if (s == null || !s(n, r, o)) {
|
|
2344
2344
|
if (s = (a = n).m, Mr(a), a.ha) var l = void 0;
|
|
2345
2345
|
else l = a.g.g - s, a.g.g = s, l = sc(a.g, l);
|
|
2346
|
-
s = void 0, a = r, l && ((s = a[
|
|
2346
|
+
s = void 0, a = r, l && ((s = a[Ge] ?? (a[Ge] = new Gn()))[o] ?? (s[o] = [])).push(l);
|
|
2347
2347
|
}
|
|
2348
2348
|
}
|
|
2349
2349
|
return (r = tn(r)) && (r.da = i.qa[Is]), !0;
|
|
@@ -2432,7 +2432,7 @@ function Ec(e, t, i) {
|
|
|
2432
2432
|
for (Ai(t, t.g.end()), r = 0; r < o.length; r++) Ai(t, ho(o[r]) || new Uint8Array(0));
|
|
2433
2433
|
});
|
|
2434
2434
|
}
|
|
2435
|
-
const vd =
|
|
2435
|
+
const vd = je(0);
|
|
2436
2436
|
function Gi(e, t) {
|
|
2437
2437
|
if (Array.isArray(t)) {
|
|
2438
2438
|
var i = 0 | t[S];
|
|
@@ -2444,7 +2444,7 @@ function Gi(e, t) {
|
|
|
2444
2444
|
return n < r && (t.length = n), (e = -1537 & (5 | i)) !== i && ye(t, e), 2 & e && Object.freeze(t), t;
|
|
2445
2445
|
}
|
|
2446
2446
|
}
|
|
2447
|
-
function
|
|
2447
|
+
function Ie(e, t, i) {
|
|
2448
2448
|
return new Vi(e, t, i);
|
|
2449
2449
|
}
|
|
2450
2450
|
function ji(e, t, i) {
|
|
@@ -2517,7 +2517,7 @@ function Sc(e, t, i) {
|
|
|
2517
2517
|
function Ic(e, t, i) {
|
|
2518
2518
|
return (e.h === 5 || e.h === 2) && (t = Bi(t, 0 | t[S], i), e.h == 2 ? on(e, Vr, t) : t.push(Vr(e.g)), !0);
|
|
2519
2519
|
}
|
|
2520
|
-
var we =
|
|
2520
|
+
var we = Ie(function(e, t, i) {
|
|
2521
2521
|
return e.h === 5 && (_e(t, i, Vr(e.g)), !0);
|
|
2522
2522
|
}, _c, cn), Ed = ji(Ic, function(e, t, i) {
|
|
2523
2523
|
if ((t = Gi(dt, t)) != null) for (let s = 0; s < t.length; s++) {
|
|
@@ -2529,13 +2529,13 @@ var we = Se(function(e, t, i) {
|
|
|
2529
2529
|
et(e, i, 2), Ui(e.g, 4 * t.length);
|
|
2530
2530
|
for (let r = 0; r < t.length; r++) i = e.g, fo(t[r]), Ro(i);
|
|
2531
2531
|
}
|
|
2532
|
-
}, cn), _d =
|
|
2532
|
+
}, cn), _d = Ie(function(e, t, i) {
|
|
2533
2533
|
return e.h === 5 && (_e(t, i, (e = Vr(e.g)) === 0 ? void 0 : e), !0);
|
|
2534
|
-
}, _c, cn), Ot =
|
|
2534
|
+
}, _c, cn), Ot = Ie(function(e, t, i) {
|
|
2535
2535
|
return co ? (e.h !== 0 ? e = !1 : (_e(t, i, ki(e.g, Ga)), e = !0), e) : e.h === 0 && (_e(t, i, ki(e.g, mo)), !0);
|
|
2536
|
-
}, kc, wc), Cn =
|
|
2536
|
+
}, kc, wc), Cn = Ie(function(e, t, i) {
|
|
2537
2537
|
return co ? (e.h !== 0 ? t = !1 : (_e(t, i, (e = ki(e.g, Ga)) === vd ? void 0 : e), t = !0), t) : e.h === 0 && (_e(t, i, (e = ki(e.g, mo)) === 0 ? void 0 : e), !0);
|
|
2538
|
-
}, kc, wc), kd =
|
|
2538
|
+
}, kc, wc), kd = Ie(function(e, t, i) {
|
|
2539
2539
|
return co ? (e.h !== 0 ? e = !1 : (_e(t, i, ki(e.g, Hu)), e = !0), e) : e.h === 0 && (_e(t, i, ki(e.g, Vn)), !0);
|
|
2540
2540
|
}, function(e, t, i) {
|
|
2541
2541
|
if (t = function(r) {
|
|
@@ -2557,7 +2557,7 @@ var we = Se(function(e, t, i) {
|
|
|
2557
2557
|
default:
|
|
2558
2558
|
i = Ns(t), mi(e.g, i.h, i.g);
|
|
2559
2559
|
}
|
|
2560
|
-
}, md), Ee =
|
|
2560
|
+
}, md), Ee = Ie(function(e, t, i) {
|
|
2561
2561
|
return e.h === 0 && (_e(t, i, Pt(e.g)), !0);
|
|
2562
2562
|
}, Ac, Oo), _r = ji(function(e, t, i) {
|
|
2563
2563
|
return (e.h === 0 || e.h === 2) && (t = Bi(t, 0 | t[S], i), e.h == 2 ? on(e, Pt, t) : t.push(Pt(e.g)), !0);
|
|
@@ -2567,11 +2567,11 @@ var we = Se(function(e, t, i) {
|
|
|
2567
2567
|
for (let r = 0; r < t.length; r++) sn(e.g, t[r]);
|
|
2568
2568
|
Mo(e, i);
|
|
2569
2569
|
}
|
|
2570
|
-
}, Oo), fi =
|
|
2570
|
+
}, Oo), fi = Ie(function(e, t, i) {
|
|
2571
2571
|
return e.h === 0 && (_e(t, i, (e = Pt(e.g)) === 0 ? void 0 : e), !0);
|
|
2572
|
-
}, Ac, Oo), de =
|
|
2572
|
+
}, Ac, Oo), de = Ie(function(e, t, i) {
|
|
2573
2573
|
return e.h === 0 && (_e(t, i, Io(e.g)), !0);
|
|
2574
|
-
}, Tc, dc), Qt =
|
|
2574
|
+
}, Tc, dc), Qt = Ie(function(e, t, i) {
|
|
2575
2575
|
return e.h === 0 && (_e(t, i, (e = Io(e.g)) === !1 ? void 0 : e), !0);
|
|
2576
2576
|
}, Tc, dc), Te = ji(function(e, t, i) {
|
|
2577
2577
|
return e.h === 2 && (e = Fo(e), Bi(t, 0 | t[S], i).push(e), !0);
|
|
@@ -2580,9 +2580,9 @@ var we = Se(function(e, t, i) {
|
|
|
2580
2580
|
var r = e, n = i, o = t[s];
|
|
2581
2581
|
o != null && an(r, n, Sa(o));
|
|
2582
2582
|
}
|
|
2583
|
-
}, Po), Mt =
|
|
2583
|
+
}, Po), Mt = Ie(function(e, t, i) {
|
|
2584
2584
|
return e.h === 2 && (_e(t, i, (e = Fo(e)) === "" ? void 0 : e), !0);
|
|
2585
|
-
}, Nc, Po), Z =
|
|
2585
|
+
}, Nc, Po), Z = Ie(function(e, t, i) {
|
|
2586
2586
|
return e.h === 2 && (_e(t, i, Fo(e)), !0);
|
|
2587
2587
|
}, Nc, Po), xe = function(e, t, i = Do) {
|
|
2588
2588
|
return new Vi(e, t, i);
|
|
@@ -2597,7 +2597,7 @@ var we = Se(function(e, t, i) {
|
|
|
2597
2597
|
if (e.h !== 2) return !1;
|
|
2598
2598
|
let s = 0 | t[S];
|
|
2599
2599
|
return ec(t, s, o, i, Li(s)), Er(e, t = No(t, r, i), n), !0;
|
|
2600
|
-
}, Cc), Fc =
|
|
2600
|
+
}, Cc), Fc = Ie(function(e, t, i) {
|
|
2601
2601
|
return e.h === 2 && (_e(t, i, uc(e)), !0);
|
|
2602
2602
|
}, Sc, fc), Ad = ji(function(e, t, i) {
|
|
2603
2603
|
return (e.h === 0 || e.h === 2) && (t = Bi(t, 0 | t[S], i), e.h == 2 ? on(e, kt, t) : t.push(kt(e.g)), !0);
|
|
@@ -2606,18 +2606,18 @@ var we = Se(function(e, t, i) {
|
|
|
2606
2606
|
var r = e, n = i, o = t[s];
|
|
2607
2607
|
o != null && (et(r, n, 0), Ui(r.g, o));
|
|
2608
2608
|
}
|
|
2609
|
-
}, hc), Td =
|
|
2609
|
+
}, hc), Td = Ie(function(e, t, i) {
|
|
2610
2610
|
return e.h === 0 && (_e(t, i, (e = kt(e.g)) === 0 ? void 0 : e), !0);
|
|
2611
2611
|
}, function(e, t, i) {
|
|
2612
2612
|
(t = $a(t)) != null && t != null && (et(e, i, 0), Ui(e.g, t));
|
|
2613
|
-
}, hc),
|
|
2613
|
+
}, hc), We = Ie(function(e, t, i) {
|
|
2614
2614
|
return e.h === 0 && (_e(t, i, Pt(e.g)), !0);
|
|
2615
2615
|
}, function(e, t, i) {
|
|
2616
2616
|
(t = Mi(t)) != null && (t = parseInt(t, 10), et(e, i, 0), sn(e.g, t));
|
|
2617
2617
|
}, mc);
|
|
2618
2618
|
class Nd {
|
|
2619
2619
|
constructor(t, i) {
|
|
2620
|
-
var r =
|
|
2620
|
+
var r = qe;
|
|
2621
2621
|
this.g = t, this.h = i, this.m = K, this.j = L, this.defaultValue = void 0, this.l = r.Oa != null ? Va : void 0;
|
|
2622
2622
|
}
|
|
2623
2623
|
register() {
|
|
@@ -2675,7 +2675,7 @@ var Fs = class extends I {
|
|
|
2675
2675
|
constructor(e) {
|
|
2676
2676
|
super(e);
|
|
2677
2677
|
}
|
|
2678
|
-
}, Rs = [0, Mt,
|
|
2678
|
+
}, Rs = [0, Mt, Ie(function(e, t, i) {
|
|
2679
2679
|
return e.h === 2 && (_e(t, i, (e = uc(e)) === Jt() ? void 0 : e), !0);
|
|
2680
2680
|
}, function(e, t, i) {
|
|
2681
2681
|
if (t != null) {
|
|
@@ -2714,11 +2714,11 @@ function Cd(e, ...t) {
|
|
|
2714
2714
|
for (let r = 0; r < t.length; r++) i += encodeURIComponent(t[r]) + e[r + 1];
|
|
2715
2715
|
return Ms(i);
|
|
2716
2716
|
}
|
|
2717
|
-
var Rc = [0, Ee,
|
|
2717
|
+
var Rc = [0, Ee, We, de, -1, _r, We, -1, de], Sd = class extends I {
|
|
2718
2718
|
constructor(e) {
|
|
2719
2719
|
super(e);
|
|
2720
2720
|
}
|
|
2721
|
-
}, Lc = [0, de, Z, de,
|
|
2721
|
+
}, Lc = [0, de, Z, de, We, -1, ji(function(e, t, i) {
|
|
2722
2722
|
return (e.h === 0 || e.h === 2) && (t = Bi(t, 0 | t[S], i), e.h == 2 ? on(e, dd, t) : t.push(Pt(e.g)), !0);
|
|
2723
2723
|
}, function(e, t, i) {
|
|
2724
2724
|
if ((t = Gi(Mi, t)) != null && t.length) {
|
|
@@ -2726,16 +2726,16 @@ var Rc = [0, Ee, ze, de, -1, _r, ze, -1, de], Sd = class extends I {
|
|
|
2726
2726
|
for (let r = 0; r < t.length; r++) sn(e.g, t[r]);
|
|
2727
2727
|
Mo(e, i);
|
|
2728
2728
|
}
|
|
2729
|
-
}, mc), Z, -1, [0, de, -1],
|
|
2729
|
+
}, mc), Z, -1, [0, de, -1], We, de, -1], Mc = [0, 3, de, -1, 2, [0, Ee], [0, We, de], [0, Z, -1], [0]], Dc = [0, Z, -2], Ds = class extends I {
|
|
2730
2730
|
constructor(e) {
|
|
2731
2731
|
super(e);
|
|
2732
2732
|
}
|
|
2733
|
-
}, Pc = [0], Oc = [0, Ee, de, 1, de, -4],
|
|
2733
|
+
}, Pc = [0], Oc = [0, Ee, de, 1, de, -4], qe = class extends I {
|
|
2734
2734
|
constructor(e) {
|
|
2735
2735
|
super(e, 2);
|
|
2736
2736
|
}
|
|
2737
2737
|
}, pe = {};
|
|
2738
|
-
pe[336783863] = [0, Z, de, -1, Ee, [0, [1, 2, 3, 4, 5, 6, 7, 8, 9], le, Pc, le, Lc, le, Dc, le, Oc, le, Rc, le, [0, Z, -2], le, [0, Z,
|
|
2738
|
+
pe[336783863] = [0, Z, de, -1, Ee, [0, [1, 2, 3, 4, 5, 6, 7, 8, 9], le, Pc, le, Lc, le, Dc, le, Oc, le, Rc, le, [0, Z, -2], le, [0, Z, We], le, Mc, le, [0, We, -1, de]], [0, Z], de, [0, [1, 3], [2, 4], le, [0, _r], -1, le, [0, Te], -1, xe, [0, Z, -1]], Z];
|
|
2739
2739
|
var Ps = [0, Cn, -1, Qt, -3, Cn, _r, Mt, fi, Cn, -1, Qt, fi, Qt, -2, Mt];
|
|
2740
2740
|
function re(e, t) {
|
|
2741
2741
|
nn(e, 3, t);
|
|
@@ -2760,7 +2760,7 @@ function se(e, t) {
|
|
|
2760
2760
|
function Y(e, t) {
|
|
2761
2761
|
nn(e, 15, t);
|
|
2762
2762
|
}
|
|
2763
|
-
var
|
|
2763
|
+
var Ke = class extends I {
|
|
2764
2764
|
constructor(e) {
|
|
2765
2765
|
super(e, 500);
|
|
2766
2766
|
}
|
|
@@ -2768,8 +2768,8 @@ var qe = class extends I {
|
|
|
2768
2768
|
return L(this, 0, 1001, e);
|
|
2769
2769
|
}
|
|
2770
2770
|
}, Bc = [-500, xe, [-500, Mt, -1, Te, -3, [-2, pe, de], xe, Rs, fi, -1, Os, Bs, xe, [0, Mt, Qt], Mt, Ps, fi, Te, 987, Te], 4, xe, [-500, Z, -1, [-1, {}], 998, Z], xe, [-500, Z, Te, -1, [-2, {}, de], 997, Te, -1], fi, xe, [-500, Z, Te, or, 998, Te], Te, fi, Os, Bs, xe, [0, Mt, -1, or], Te, -2, Ps, Mt, -1, Qt, [0, Qt, Td], 978, or, xe, Rs];
|
|
2771
|
-
|
|
2772
|
-
var Id = Bt(
|
|
2771
|
+
Ke.prototype.g = fn(Bc);
|
|
2772
|
+
var Id = Bt(Ke, Bc), Fd = class extends I {
|
|
2773
2773
|
constructor(e) {
|
|
2774
2774
|
super(e);
|
|
2775
2775
|
}
|
|
@@ -2802,7 +2802,7 @@ var Id = Bt(qe, Bc), Fd = class extends I {
|
|
|
2802
2802
|
constructor(e) {
|
|
2803
2803
|
super(e);
|
|
2804
2804
|
}
|
|
2805
|
-
}, [0, Te, _r, Go, [0,
|
|
2805
|
+
}, [0, Te, _r, Go, [0, We, [0, Ee, -3], [0, we, -3], [0, Ee, -1, [0, xe, [0, Ee, -2]]], xe, [0, we, -1, Z, we]], Z, -1, Ot, xe, [0, Ee, we], Te, Ot]), jc = class extends I {
|
|
2806
2806
|
constructor(e) {
|
|
2807
2807
|
super(e);
|
|
2808
2808
|
}
|
|
@@ -2822,7 +2822,7 @@ var Id = Bt(qe, Bc), Fd = class extends I {
|
|
|
2822
2822
|
constructor(e) {
|
|
2823
2823
|
super(e);
|
|
2824
2824
|
}
|
|
2825
|
-
}, Dd = [0, Ee, -1, Go,
|
|
2825
|
+
}, Dd = [0, Ee, -1, Go, We], zc = class extends I {
|
|
2826
2826
|
constructor(e) {
|
|
2827
2827
|
super(e);
|
|
2828
2828
|
}
|
|
@@ -2885,7 +2885,7 @@ var Pd = class extends I {
|
|
|
2885
2885
|
g() {
|
|
2886
2886
|
return ja(ie(this, 2)) ?? !1;
|
|
2887
2887
|
}
|
|
2888
|
-
}, qc = [0, Fc, Z, [0, Ee, Ot, -1], [0, kd, Ot]], fe = [0, qc, de, [0, Dr, le, Oc, le, Lc, le, Rc, le, Pc, le, Dc, le, Mc],
|
|
2888
|
+
}, qc = [0, Fc, Z, [0, Ee, Ot, -1], [0, kd, Ot]], fe = [0, qc, de, [0, Dr, le, Oc, le, Lc, le, Rc, le, Pc, le, Dc, le, Mc], We], gn = class extends I {
|
|
2889
2889
|
constructor(e) {
|
|
2890
2890
|
super(e);
|
|
2891
2891
|
}
|
|
@@ -2895,7 +2895,7 @@ var $d = Bt(class extends I {
|
|
|
2895
2895
|
constructor(e) {
|
|
2896
2896
|
super(e);
|
|
2897
2897
|
}
|
|
2898
|
-
}, [0, [0,
|
|
2898
|
+
}, [0, [0, We, -1, Ed, Ad], Dd]), Kc = class extends I {
|
|
2899
2899
|
constructor(e) {
|
|
2900
2900
|
super(e);
|
|
2901
2901
|
}
|
|
@@ -2979,7 +2979,7 @@ var sl = class extends I {
|
|
|
2979
2979
|
constructor(e) {
|
|
2980
2980
|
super(e);
|
|
2981
2981
|
}
|
|
2982
|
-
}, al = [0,
|
|
2982
|
+
}, al = [0, We, -1], Qd = gt(458105876, class extends I {
|
|
2983
2983
|
constructor(e) {
|
|
2984
2984
|
super(e);
|
|
2985
2985
|
}
|
|
@@ -2987,7 +2987,7 @@ var sl = class extends I {
|
|
|
2987
2987
|
let e;
|
|
2988
2988
|
var t = this.v;
|
|
2989
2989
|
const i = 0 | t[S];
|
|
2990
|
-
return e =
|
|
2990
|
+
return e = $e(this, i), t = function(r, n, o, s) {
|
|
2991
2991
|
var a = $s;
|
|
2992
2992
|
!s && Pi(r) && (o = 0 | (n = r.v)[S]);
|
|
2993
2993
|
var l = xt(n, 2);
|
|
@@ -3006,7 +3006,7 @@ var sl = class extends I {
|
|
|
3006
3006
|
}(this, t, i, e), !e && $s && (t.ra = !0), t;
|
|
3007
3007
|
}
|
|
3008
3008
|
});
|
|
3009
|
-
pe[458105876] = [0, al, xd, [!0, Ot, [0, Z, -1, Te]], [0, _r, de,
|
|
3009
|
+
pe[458105876] = [0, al, xd, [!0, Ot, [0, Z, -1, Te]], [0, _r, de, We]];
|
|
3010
3010
|
var Ko = class extends I {
|
|
3011
3011
|
constructor(e) {
|
|
3012
3012
|
super(e);
|
|
@@ -3192,7 +3192,7 @@ function N(e, t) {
|
|
|
3192
3192
|
e.C = Math.max(e.C, t);
|
|
3193
3193
|
}
|
|
3194
3194
|
function yn(e, t) {
|
|
3195
|
-
e.B = new Le(),
|
|
3195
|
+
e.B = new Le(), ze(e.B, 2, "PassThroughCalculator"), re(e.B, "free_memory"), H(e.B, "free_memory_unused_out"), se(t, "free_memory"), tt(t, e.B);
|
|
3196
3196
|
}
|
|
3197
3197
|
function Ti(e, t) {
|
|
3198
3198
|
re(e.B, t), H(e.B, t + "_unused_out");
|
|
@@ -3872,7 +3872,7 @@ function Ci(e, t, i, r) {
|
|
|
3872
3872
|
if ((n instanceof Uint8Array || n instanceof Float32Array) && n.length !== s) throw Error("Unsupported channel count: " + n.length / s);
|
|
3873
3873
|
return e = new ve([n], i, !1, e.g.i.canvas, e.P, o, t), r ? e.clone() : e;
|
|
3874
3874
|
}
|
|
3875
|
-
var
|
|
3875
|
+
var He = class extends Yn {
|
|
3876
3876
|
constructor(e, t, i, r) {
|
|
3877
3877
|
super(e), this.g = e, this.X = t, this.U = i, this.oa = r, this.P = new bl();
|
|
3878
3878
|
}
|
|
@@ -3884,8 +3884,8 @@ var We = class extends Yn {
|
|
|
3884
3884
|
this.P.close(), super.close();
|
|
3885
3885
|
}
|
|
3886
3886
|
};
|
|
3887
|
-
|
|
3888
|
-
var Xe = class extends
|
|
3887
|
+
He.prototype.close = He.prototype.close;
|
|
3888
|
+
var Xe = class extends He {
|
|
3889
3889
|
constructor(e, t) {
|
|
3890
3890
|
super(new ot(e, t), "image_in", "norm_rect_in", !1), this.j = { detections: [] }, L(e = this.h = new gn(), 0, 1, t = new ce()), R(this.h, 2, 0.5), R(this.h, 3, 0.3);
|
|
3891
3891
|
}
|
|
@@ -3905,12 +3905,12 @@ var Xe = class extends We {
|
|
|
3905
3905
|
return this.j = { detections: [] }, pt(this, e, i, t), this.j;
|
|
3906
3906
|
}
|
|
3907
3907
|
m() {
|
|
3908
|
-
var e = new
|
|
3908
|
+
var e = new Ke();
|
|
3909
3909
|
se(e, "image_in"), se(e, "norm_rect_in"), Y(e, "detections");
|
|
3910
|
-
const t = new
|
|
3910
|
+
const t = new qe();
|
|
3911
3911
|
mt(t, jd, this.h);
|
|
3912
3912
|
const i = new Le();
|
|
3913
|
-
|
|
3913
|
+
ze(i, 2, "mediapipe.tasks.vision.face_detector.FaceDetectorGraph"), re(i, "IMAGE:image_in"), re(i, "NORM_RECT:norm_rect_in"), H(i, "DETECTIONS:detections"), i.o(t), tt(e, i), this.g.attachProtoVectorListener("detections", (r, n) => {
|
|
3914
3914
|
for (const o of r) r = Gc(o), this.j.detections.push(wl(r));
|
|
3915
3915
|
N(this, n);
|
|
3916
3916
|
}), this.g.attachEmptyPacketListener("detections", (r) => {
|
|
@@ -3929,7 +3929,7 @@ var Jo = nt([61, 146], [146, 91], [91, 181], [181, 84], [84, 17], [17, 314], [31
|
|
|
3929
3929
|
function ta(e) {
|
|
3930
3930
|
e.j = { faceLandmarks: [], faceBlendshapes: [], facialTransformationMatrixes: [] };
|
|
3931
3931
|
}
|
|
3932
|
-
var ne = class extends
|
|
3932
|
+
var ne = class extends He {
|
|
3933
3933
|
constructor(e, t) {
|
|
3934
3934
|
super(new ot(e, t), "image_in", "norm_rect", !1), this.j = { faceLandmarks: [], faceBlendshapes: [], facialTransformationMatrixes: [] }, this.outputFacialTransformationMatrixes = this.outputFaceBlendshapes = !1, L(e = this.h = new Yc(), 0, 1, t = new ce()), this.A = new Kc(), L(this.h, 0, 3, this.A), this.u = new gn(), L(this.h, 0, 2, this.u), _t(this.u, 4, 1), R(this.u, 2, 0.5), R(this.A, 2, 0.5), R(this.h, 4, 0.5);
|
|
3935
3935
|
}
|
|
@@ -3949,12 +3949,12 @@ var ne = class extends We {
|
|
|
3949
3949
|
return ta(this), pt(this, e, i, t), this.j;
|
|
3950
3950
|
}
|
|
3951
3951
|
m() {
|
|
3952
|
-
var e = new
|
|
3952
|
+
var e = new Ke();
|
|
3953
3953
|
se(e, "image_in"), se(e, "norm_rect"), Y(e, "face_landmarks");
|
|
3954
|
-
const t = new
|
|
3954
|
+
const t = new qe();
|
|
3955
3955
|
mt(t, zd, this.h);
|
|
3956
3956
|
const i = new Le();
|
|
3957
|
-
|
|
3957
|
+
ze(i, 2, "mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"), re(i, "IMAGE:image_in"), re(i, "NORM_RECT:norm_rect"), H(i, "NORM_LANDMARKS:face_landmarks"), i.o(t), tt(e, i), this.g.attachProtoVectorListener("face_landmarks", (r, n) => {
|
|
3958
3958
|
for (const o of r) r = kr(o), this.j.faceLandmarks.push(pn(r));
|
|
3959
3959
|
N(this, n);
|
|
3960
3960
|
}), this.g.attachEmptyPacketListener("face_landmarks", (r) => {
|
|
@@ -3996,7 +3996,7 @@ function na(e, t = !0) {
|
|
|
3996
3996
|
}
|
|
3997
3997
|
return i;
|
|
3998
3998
|
}
|
|
3999
|
-
var
|
|
3999
|
+
var Oe = class extends He {
|
|
4000
4000
|
constructor(e, t) {
|
|
4001
4001
|
super(new ot(e, t), "image_in", "norm_rect", !1), this.gestures = [], this.landmarks = [], this.worldLandmarks = [], this.handedness = [], L(e = this.j = new Jc(), 0, 1, t = new ce()), this.u = new Wo(), L(this.j, 0, 2, this.u), this.D = new zo(), L(this.u, 0, 3, this.D), this.A = new Qc(), L(this.u, 0, 2, this.A), this.h = new Wd(), L(this.j, 0, 3, this.h), R(this.A, 2, 0.5), R(this.u, 4, 0.5), R(this.D, 2, 0.5);
|
|
4002
4002
|
}
|
|
@@ -4021,12 +4021,12 @@ var Pe = class extends We {
|
|
|
4021
4021
|
return ia(this), pt(this, e, i, t), ra(this);
|
|
4022
4022
|
}
|
|
4023
4023
|
m() {
|
|
4024
|
-
var e = new
|
|
4024
|
+
var e = new Ke();
|
|
4025
4025
|
se(e, "image_in"), se(e, "norm_rect"), Y(e, "hand_gestures"), Y(e, "hand_landmarks"), Y(e, "world_hand_landmarks"), Y(e, "handedness");
|
|
4026
|
-
const t = new
|
|
4026
|
+
const t = new qe();
|
|
4027
4027
|
mt(t, Hd, this.j);
|
|
4028
4028
|
const i = new Le();
|
|
4029
|
-
|
|
4029
|
+
ze(i, 2, "mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"), re(i, "IMAGE:image_in"), re(i, "NORM_RECT:norm_rect"), H(i, "HAND_GESTURES:hand_gestures"), H(i, "LANDMARKS:hand_landmarks"), H(i, "WORLD_LANDMARKS:world_hand_landmarks"), H(i, "HANDEDNESS:handedness"), i.o(t), tt(e, i), this.g.attachProtoVectorListener("hand_landmarks", (r, n) => {
|
|
4030
4030
|
for (const o of r) {
|
|
4031
4031
|
r = kr(o);
|
|
4032
4032
|
const s = [];
|
|
@@ -4060,14 +4060,14 @@ var Pe = class extends We {
|
|
|
4060
4060
|
function oa(e) {
|
|
4061
4061
|
return { landmarks: e.landmarks, worldLandmarks: e.worldLandmarks, handednesses: e.handedness, handedness: e.handedness };
|
|
4062
4062
|
}
|
|
4063
|
-
|
|
4064
|
-
return q(
|
|
4065
|
-
},
|
|
4066
|
-
return q(
|
|
4067
|
-
},
|
|
4068
|
-
return q(
|
|
4069
|
-
},
|
|
4070
|
-
var
|
|
4063
|
+
Oe.prototype.recognizeForVideo = Oe.prototype.Ia, Oe.prototype.recognize = Oe.prototype.Ha, Oe.prototype.setOptions = Oe.prototype.o, Oe.createFromModelPath = function(e, t) {
|
|
4064
|
+
return q(Oe, e, { baseOptions: { modelAssetPath: t } });
|
|
4065
|
+
}, Oe.createFromModelBuffer = function(e, t) {
|
|
4066
|
+
return q(Oe, e, { baseOptions: { modelAssetBuffer: t } });
|
|
4067
|
+
}, Oe.createFromOptions = function(e, t) {
|
|
4068
|
+
return q(Oe, e, t);
|
|
4069
|
+
}, Oe.HAND_CONNECTIONS = ns;
|
|
4070
|
+
var Be = class extends He {
|
|
4071
4071
|
constructor(e, t) {
|
|
4072
4072
|
super(new ot(e, t), "image_in", "norm_rect", !1), this.landmarks = [], this.worldLandmarks = [], this.handedness = [], L(e = this.h = new Wo(), 0, 1, t = new ce()), this.u = new zo(), L(this.h, 0, 3, this.u), this.j = new Qc(), L(this.h, 0, 2, this.j), _t(this.j, 3, 1), R(this.j, 2, 0.5), R(this.u, 2, 0.5), R(this.h, 4, 0.5);
|
|
4073
4073
|
}
|
|
@@ -4087,12 +4087,12 @@ var Oe = class extends We {
|
|
|
4087
4087
|
return this.landmarks = [], this.worldLandmarks = [], this.handedness = [], pt(this, e, i, t), oa(this);
|
|
4088
4088
|
}
|
|
4089
4089
|
m() {
|
|
4090
|
-
var e = new
|
|
4090
|
+
var e = new Ke();
|
|
4091
4091
|
se(e, "image_in"), se(e, "norm_rect"), Y(e, "hand_landmarks"), Y(e, "world_hand_landmarks"), Y(e, "handedness");
|
|
4092
|
-
const t = new
|
|
4092
|
+
const t = new qe();
|
|
4093
4093
|
mt(t, qd, this.h);
|
|
4094
4094
|
const i = new Le();
|
|
4095
|
-
|
|
4095
|
+
ze(i, 2, "mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"), re(i, "IMAGE:image_in"), re(i, "NORM_RECT:norm_rect"), H(i, "LANDMARKS:hand_landmarks"), H(i, "WORLD_LANDMARKS:world_hand_landmarks"), H(i, "HANDEDNESS:handedness"), i.o(t), tt(e, i), this.g.attachProtoVectorListener("hand_landmarks", (r, n) => {
|
|
4096
4096
|
for (const o of r) r = kr(o), this.landmarks.push(pn(r));
|
|
4097
4097
|
N(this, n);
|
|
4098
4098
|
}), this.g.attachEmptyPacketListener("hand_landmarks", (r) => {
|
|
@@ -4117,13 +4117,13 @@ var Oe = class extends We {
|
|
|
4117
4117
|
}), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
4118
4118
|
}
|
|
4119
4119
|
};
|
|
4120
|
-
|
|
4121
|
-
return q(
|
|
4122
|
-
},
|
|
4123
|
-
return q(
|
|
4124
|
-
},
|
|
4125
|
-
return q(
|
|
4126
|
-
},
|
|
4120
|
+
Be.prototype.detectForVideo = Be.prototype.G, Be.prototype.detect = Be.prototype.F, Be.prototype.setOptions = Be.prototype.o, Be.createFromModelPath = function(e, t) {
|
|
4121
|
+
return q(Be, e, { baseOptions: { modelAssetPath: t } });
|
|
4122
|
+
}, Be.createFromModelBuffer = function(e, t) {
|
|
4123
|
+
return q(Be, e, { baseOptions: { modelAssetBuffer: t } });
|
|
4124
|
+
}, Be.createFromOptions = function(e, t) {
|
|
4125
|
+
return q(Be, e, t);
|
|
4126
|
+
}, Be.HAND_CONNECTIONS = ns;
|
|
4127
4127
|
var Cl = nt([0, 1], [1, 2], [2, 3], [3, 7], [0, 4], [4, 5], [5, 6], [6, 8], [9, 10], [11, 12], [11, 13], [13, 15], [15, 17], [15, 19], [15, 21], [17, 19], [12, 14], [14, 16], [16, 18], [16, 20], [16, 22], [18, 20], [11, 23], [12, 24], [23, 24], [23, 25], [24, 26], [25, 27], [26, 28], [27, 29], [28, 30], [29, 31], [30, 32], [27, 31], [28, 32]);
|
|
4128
4128
|
function sa(e) {
|
|
4129
4129
|
e.h = { faceLandmarks: [], faceBlendshapes: [], poseLandmarks: [], poseWorldLandmarks: [], poseSegmentationMasks: [], leftHandLandmarks: [], leftHandWorldLandmarks: [], rightHandLandmarks: [], rightHandWorldLandmarks: [] };
|
|
@@ -4139,7 +4139,7 @@ function aa(e) {
|
|
|
4139
4139
|
function Rr(e, t) {
|
|
4140
4140
|
e = kr(e), t.push(pn(e));
|
|
4141
4141
|
}
|
|
4142
|
-
var te = class extends
|
|
4142
|
+
var te = class extends He {
|
|
4143
4143
|
constructor(e, t) {
|
|
4144
4144
|
super(new ot(e, t), "input_frames_image", null, !1), this.h = { faceLandmarks: [], faceBlendshapes: [], poseLandmarks: [], poseWorldLandmarks: [], poseSegmentationMasks: [], leftHandLandmarks: [], leftHandWorldLandmarks: [], rightHandLandmarks: [], rightHandWorldLandmarks: [] }, this.outputPoseSegmentationMasks = this.outputFaceBlendshapes = !1, L(e = this.j = new rl(), 0, 1, t = new ce()), this.I = new zo(), L(this.j, 0, 2, this.I), this.W = new Kd(), L(this.j, 0, 3, this.W), this.u = new gn(), L(this.j, 0, 4, this.u), this.O = new Kc(), L(this.j, 0, 5, this.O), this.A = new tl(), L(this.j, 0, 6, this.A), this.M = new il(), L(this.j, 0, 7, this.M), R(this.u, 2, 0.5), R(this.u, 3, 0.3), R(this.O, 2, 0.5), R(this.A, 2, 0.5), R(this.A, 3, 0.3), R(this.M, 2, 0.5), R(this.I, 2, 0.5);
|
|
4145
4145
|
}
|
|
@@ -4161,10 +4161,10 @@ var te = class extends We {
|
|
|
4161
4161
|
return this.D = typeof i == "function" ? i : r, sa(this), pt(this, e, n, t), aa(this);
|
|
4162
4162
|
}
|
|
4163
4163
|
m() {
|
|
4164
|
-
var e = new
|
|
4164
|
+
var e = new Ke();
|
|
4165
4165
|
se(e, "input_frames_image"), Y(e, "pose_landmarks"), Y(e, "pose_world_landmarks"), Y(e, "face_landmarks"), Y(e, "left_hand_landmarks"), Y(e, "left_hand_world_landmarks"), Y(e, "right_hand_landmarks"), Y(e, "right_hand_world_landmarks");
|
|
4166
|
-
const t = new
|
|
4167
|
-
|
|
4166
|
+
const t = new qe(), i = new Fs();
|
|
4167
|
+
ze(i, 1, "type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"), function(n, o) {
|
|
4168
4168
|
if (o != null) if (Array.isArray(o)) J(n, 2, rn(o, 0, wr));
|
|
4169
4169
|
else {
|
|
4170
4170
|
if (!(typeof o == "string" || o instanceof ht || uo(o))) throw Error("invalid value in Any.value field: " + o + " expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");
|
|
@@ -4172,7 +4172,7 @@ var te = class extends We {
|
|
|
4172
4172
|
}
|
|
4173
4173
|
}(i, this.j.g());
|
|
4174
4174
|
const r = new Le();
|
|
4175
|
-
|
|
4175
|
+
ze(r, 2, "mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"), Co(r, 8, Fs, i), re(r, "IMAGE:input_frames_image"), H(r, "POSE_LANDMARKS:pose_landmarks"), H(r, "POSE_WORLD_LANDMARKS:pose_world_landmarks"), H(r, "FACE_LANDMARKS:face_landmarks"), H(r, "LEFT_HAND_LANDMARKS:left_hand_landmarks"), H(r, "LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"), H(r, "RIGHT_HAND_LANDMARKS:right_hand_landmarks"), H(r, "RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"), r.o(t), tt(e, r), yn(this, e), this.g.attachProtoListener("pose_landmarks", (n, o) => {
|
|
4176
4176
|
Rr(n, this.h.poseLandmarks), N(this, o);
|
|
4177
4177
|
}), this.g.attachEmptyPacketListener("pose_landmarks", (n) => {
|
|
4178
4178
|
N(this, n);
|
|
@@ -4222,7 +4222,7 @@ te.prototype.detectForVideo = te.prototype.G, te.prototype.detect = te.prototype
|
|
|
4222
4222
|
}, te.createFromOptions = function(e, t) {
|
|
4223
4223
|
return q(te, e, t);
|
|
4224
4224
|
}, te.HAND_CONNECTIONS = ns, te.POSE_CONNECTIONS = Cl, te.FACE_LANDMARKS_LIPS = Jo, te.FACE_LANDMARKS_LEFT_EYE = Zo, te.FACE_LANDMARKS_LEFT_EYEBROW = es, te.FACE_LANDMARKS_LEFT_IRIS = kl, te.FACE_LANDMARKS_RIGHT_EYE = ts, te.FACE_LANDMARKS_RIGHT_EYEBROW = is, te.FACE_LANDMARKS_RIGHT_IRIS = Al, te.FACE_LANDMARKS_FACE_OVAL = rs, te.FACE_LANDMARKS_CONTOURS = Tl, te.FACE_LANDMARKS_TESSELATION = Nl;
|
|
4225
|
-
var Qe = class extends
|
|
4225
|
+
var Qe = class extends He {
|
|
4226
4226
|
constructor(e, t) {
|
|
4227
4227
|
super(new ot(e, t), "input_image", "norm_rect", !0), this.j = { classifications: [] }, L(e = this.h = new nl(), 0, 1, t = new ce());
|
|
4228
4228
|
}
|
|
@@ -4242,12 +4242,12 @@ var Qe = class extends We {
|
|
|
4242
4242
|
return this.j = { classifications: [] }, pt(this, e, i, t), this.j;
|
|
4243
4243
|
}
|
|
4244
4244
|
m() {
|
|
4245
|
-
var e = new
|
|
4245
|
+
var e = new Ke();
|
|
4246
4246
|
se(e, "input_image"), se(e, "norm_rect"), Y(e, "classifications");
|
|
4247
|
-
const t = new
|
|
4247
|
+
const t = new qe();
|
|
4248
4248
|
mt(t, Yd, this.h);
|
|
4249
4249
|
const i = new Le();
|
|
4250
|
-
|
|
4250
|
+
ze(i, 2, "mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"), re(i, "IMAGE:input_image"), re(i, "NORM_RECT:norm_rect"), H(i, "CLASSIFICATIONS:classifications"), i.o(t), tt(e, i), this.g.attachProtoListener("classifications", (r, n) => {
|
|
4251
4251
|
this.j = th(Od(r)), N(this, n);
|
|
4252
4252
|
}), this.g.attachEmptyPacketListener("classifications", (r) => {
|
|
4253
4253
|
N(this, r);
|
|
@@ -4261,7 +4261,7 @@ Qe.prototype.classifyForVideo = Qe.prototype.ta, Qe.prototype.classify = Qe.prot
|
|
|
4261
4261
|
}, Qe.createFromOptions = function(e, t) {
|
|
4262
4262
|
return q(Qe, e, t);
|
|
4263
4263
|
};
|
|
4264
|
-
var
|
|
4264
|
+
var Ue = class extends He {
|
|
4265
4265
|
constructor(e, t) {
|
|
4266
4266
|
super(new ot(e, t), "image_in", "norm_rect", !0), this.h = new ol(), this.embeddings = { embeddings: [] }, L(e = this.h, 0, 1, t = new ce());
|
|
4267
4267
|
}
|
|
@@ -4282,12 +4282,12 @@ var Be = class extends We {
|
|
|
4282
4282
|
return pt(this, e, i, t), this.embeddings;
|
|
4283
4283
|
}
|
|
4284
4284
|
m() {
|
|
4285
|
-
var e = new
|
|
4285
|
+
var e = new Ke();
|
|
4286
4286
|
se(e, "image_in"), se(e, "norm_rect"), Y(e, "embeddings_out");
|
|
4287
|
-
const t = new
|
|
4287
|
+
const t = new qe();
|
|
4288
4288
|
mt(t, Xd, this.h);
|
|
4289
4289
|
const i = new Le();
|
|
4290
|
-
|
|
4290
|
+
ze(i, 2, "mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"), re(i, "IMAGE:image_in"), re(i, "NORM_RECT:norm_rect"), H(i, "EMBEDDINGS:embeddings_out"), i.o(t), tt(e, i), this.g.attachProtoListener("embeddings_out", (r, n) => {
|
|
4291
4291
|
r = Vd(r), this.embeddings = function(o) {
|
|
4292
4292
|
return { embeddings: Et(o, Ud, 1).map((s) => {
|
|
4293
4293
|
var d, u;
|
|
@@ -4301,19 +4301,19 @@ var Be = class extends We {
|
|
|
4301
4301
|
}), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
4302
4302
|
}
|
|
4303
4303
|
};
|
|
4304
|
-
|
|
4304
|
+
Ue.cosineSimilarity = function(e, t) {
|
|
4305
4305
|
if (e.floatEmbedding && t.floatEmbedding) e = Hs(e.floatEmbedding, t.floatEmbedding);
|
|
4306
4306
|
else {
|
|
4307
4307
|
if (!e.quantizedEmbedding || !t.quantizedEmbedding) throw Error("Cannot compute cosine similarity between quantized and float embeddings.");
|
|
4308
4308
|
e = Hs(Ws(e.quantizedEmbedding), Ws(t.quantizedEmbedding));
|
|
4309
4309
|
}
|
|
4310
4310
|
return e;
|
|
4311
|
-
},
|
|
4312
|
-
return q(
|
|
4313
|
-
},
|
|
4314
|
-
return q(
|
|
4315
|
-
},
|
|
4316
|
-
return q(
|
|
4311
|
+
}, Ue.prototype.embedForVideo = Ue.prototype.Aa, Ue.prototype.embed = Ue.prototype.za, Ue.prototype.setOptions = Ue.prototype.o, Ue.createFromModelPath = function(e, t) {
|
|
4312
|
+
return q(Ue, e, { baseOptions: { modelAssetPath: t } });
|
|
4313
|
+
}, Ue.createFromModelBuffer = function(e, t) {
|
|
4314
|
+
return q(Ue, e, { baseOptions: { modelAssetBuffer: t } });
|
|
4315
|
+
}, Ue.createFromOptions = function(e, t) {
|
|
4316
|
+
return q(Ue, e, t);
|
|
4317
4317
|
};
|
|
4318
4318
|
var Jn = class {
|
|
4319
4319
|
constructor(e, t, i) {
|
|
@@ -4332,7 +4332,7 @@ function ch(e) {
|
|
|
4332
4332
|
return Et(n, Le, 1);
|
|
4333
4333
|
}(e.ca()).filter((n) => (ke(ie(n, 1)) ?? "").includes("mediapipe.tasks.TensorsToSegmentationCalculator"));
|
|
4334
4334
|
if (e.u = [], t.length > 1) throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");
|
|
4335
|
-
t.length === 1 && (((r = (i = K(t[0],
|
|
4335
|
+
t.length === 1 && (((r = (i = K(t[0], qe, 7)) == null ? void 0 : i.j()) == null ? void 0 : r.g()) ?? /* @__PURE__ */ new Map()).forEach((n, o) => {
|
|
4336
4336
|
e.u[Number(o)] = ke(ie(n, 1)) ?? "";
|
|
4337
4337
|
});
|
|
4338
4338
|
}
|
|
@@ -4349,7 +4349,7 @@ function la(e) {
|
|
|
4349
4349
|
}
|
|
4350
4350
|
}
|
|
4351
4351
|
Jn.prototype.close = Jn.prototype.close;
|
|
4352
|
-
var
|
|
4352
|
+
var Re = class extends He {
|
|
4353
4353
|
constructor(e, t) {
|
|
4354
4354
|
super(new ot(e, t), "image_in", "norm_rect", !1), this.u = [], this.outputCategoryMask = !1, this.outputConfidenceMasks = !0, this.h = new Ko(), this.A = new sl(), L(this.h, 0, 3, this.A), L(e = this.h, 0, 1, t = new ce());
|
|
4355
4355
|
}
|
|
@@ -4377,12 +4377,12 @@ var Fe = class extends We {
|
|
|
4377
4377
|
return this.u;
|
|
4378
4378
|
}
|
|
4379
4379
|
m() {
|
|
4380
|
-
var e = new
|
|
4380
|
+
var e = new Ke();
|
|
4381
4381
|
se(e, "image_in"), se(e, "norm_rect");
|
|
4382
|
-
const t = new
|
|
4382
|
+
const t = new qe();
|
|
4383
4383
|
mt(t, cl, this.h);
|
|
4384
4384
|
const i = new Le();
|
|
4385
|
-
|
|
4385
|
+
ze(i, 2, "mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"), re(i, "IMAGE:image_in"), re(i, "NORM_RECT:norm_rect"), i.o(t), tt(e, i), yn(this, e), this.outputConfidenceMasks && (Y(e, "confidence_masks"), H(i, "CONFIDENCE_MASKS:confidence_masks"), Ti(this, "confidence_masks"), this.g.aa("confidence_masks", (r, n) => {
|
|
4386
4386
|
this.confidenceMasks = r.map((o) => Ci(this, o, !0, !this.j)), N(this, n);
|
|
4387
4387
|
}), this.g.attachEmptyPacketListener("confidence_masks", (r) => {
|
|
4388
4388
|
this.confidenceMasks = [], N(this, r);
|
|
@@ -4397,12 +4397,12 @@ var Fe = class extends We {
|
|
|
4397
4397
|
}), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
4398
4398
|
}
|
|
4399
4399
|
};
|
|
4400
|
-
|
|
4401
|
-
return q(
|
|
4402
|
-
},
|
|
4403
|
-
return q(
|
|
4404
|
-
},
|
|
4405
|
-
return q(
|
|
4400
|
+
Re.prototype.getLabels = Re.prototype.Da, Re.prototype.segmentForVideo = Re.prototype.La, Re.prototype.segment = Re.prototype.segment, Re.prototype.setOptions = Re.prototype.o, Re.createFromModelPath = function(e, t) {
|
|
4401
|
+
return q(Re, e, { baseOptions: { modelAssetPath: t } });
|
|
4402
|
+
}, Re.createFromModelBuffer = function(e, t) {
|
|
4403
|
+
return q(Re, e, { baseOptions: { modelAssetBuffer: t } });
|
|
4404
|
+
}, Re.createFromOptions = function(e, t) {
|
|
4405
|
+
return q(Re, e, t);
|
|
4406
4406
|
};
|
|
4407
4407
|
var Zn = class {
|
|
4408
4408
|
constructor(e, t, i) {
|
|
@@ -4416,7 +4416,7 @@ var Zn = class {
|
|
|
4416
4416
|
}
|
|
4417
4417
|
};
|
|
4418
4418
|
Zn.prototype.close = Zn.prototype.close;
|
|
4419
|
-
var ut = class extends
|
|
4419
|
+
var ut = class extends He {
|
|
4420
4420
|
constructor(e, t) {
|
|
4421
4421
|
super(new ot(e, t), "image_in", "norm_rect_in", !1), this.outputCategoryMask = !1, this.outputConfidenceMasks = !0, this.h = new Ko(), this.u = new sl(), L(this.h, 0, 3, this.u), L(e = this.h, 0, 1, t = new ce());
|
|
4422
4422
|
}
|
|
@@ -4460,12 +4460,12 @@ var ut = class extends We {
|
|
|
4460
4460
|
return s;
|
|
4461
4461
|
}
|
|
4462
4462
|
m() {
|
|
4463
|
-
var e = new
|
|
4463
|
+
var e = new Ke();
|
|
4464
4464
|
se(e, "image_in"), se(e, "roi_in"), se(e, "norm_rect_in");
|
|
4465
|
-
const t = new
|
|
4465
|
+
const t = new qe();
|
|
4466
4466
|
mt(t, cl, this.h);
|
|
4467
4467
|
const i = new Le();
|
|
4468
|
-
|
|
4468
|
+
ze(i, 2, "mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraphV2"), re(i, "IMAGE:image_in"), re(i, "ROI:roi_in"), re(i, "NORM_RECT:norm_rect_in"), i.o(t), tt(e, i), yn(this, e), this.outputConfidenceMasks && (Y(e, "confidence_masks"), H(i, "CONFIDENCE_MASKS:confidence_masks"), Ti(this, "confidence_masks"), this.g.aa("confidence_masks", (r, n) => {
|
|
4469
4469
|
this.confidenceMasks = r.map((o) => Ci(this, o, !0, !this.j)), N(this, n);
|
|
4470
4470
|
}), this.g.attachEmptyPacketListener("confidence_masks", (r) => {
|
|
4471
4471
|
this.confidenceMasks = [], N(this, r);
|
|
@@ -4487,7 +4487,7 @@ ut.prototype.segment = ut.prototype.segment, ut.prototype.setOptions = ut.protot
|
|
|
4487
4487
|
}, ut.createFromOptions = function(e, t) {
|
|
4488
4488
|
return q(ut, e, t);
|
|
4489
4489
|
};
|
|
4490
|
-
var Je = class extends
|
|
4490
|
+
var Je = class extends He {
|
|
4491
4491
|
constructor(e, t) {
|
|
4492
4492
|
super(new ot(e, t), "input_frame_gpu", "norm_rect", !1), this.j = { detections: [] }, L(e = this.h = new ul(), 0, 1, t = new ce());
|
|
4493
4493
|
}
|
|
@@ -4507,12 +4507,12 @@ var Je = class extends We {
|
|
|
4507
4507
|
return this.j = { detections: [] }, pt(this, e, i, t), this.j;
|
|
4508
4508
|
}
|
|
4509
4509
|
m() {
|
|
4510
|
-
var e = new
|
|
4510
|
+
var e = new Ke();
|
|
4511
4511
|
se(e, "input_frame_gpu"), se(e, "norm_rect"), Y(e, "detections");
|
|
4512
|
-
const t = new
|
|
4512
|
+
const t = new qe();
|
|
4513
4513
|
mt(t, Zd, this.h);
|
|
4514
4514
|
const i = new Le();
|
|
4515
|
-
|
|
4515
|
+
ze(i, 2, "mediapipe.tasks.vision.ObjectDetectorGraph"), re(i, "IMAGE:input_frame_gpu"), re(i, "NORM_RECT:norm_rect"), H(i, "DETECTIONS:detections"), i.o(t), tt(e, i), this.g.attachProtoVectorListener("detections", (r, n) => {
|
|
4516
4516
|
for (const o of r) r = Gc(o), this.j.detections.push(wl(r));
|
|
4517
4517
|
N(this, n);
|
|
4518
4518
|
}), this.g.attachEmptyPacketListener("detections", (r) => {
|
|
@@ -4551,7 +4551,7 @@ function da(e) {
|
|
|
4551
4551
|
}
|
|
4552
4552
|
}
|
|
4553
4553
|
eo.prototype.close = eo.prototype.close;
|
|
4554
|
-
var
|
|
4554
|
+
var Ve = class extends He {
|
|
4555
4555
|
constructor(e, t) {
|
|
4556
4556
|
super(new ot(e, t), "image_in", "norm_rect", !1), this.landmarks = [], this.worldLandmarks = [], this.outputSegmentationMasks = !1, L(e = this.h = new dl(), 0, 1, t = new ce()), this.A = new il(), L(this.h, 0, 3, this.A), this.j = new tl(), L(this.h, 0, 2, this.j), _t(this.j, 4, 1), R(this.j, 2, 0.5), R(this.A, 2, 0.5), R(this.h, 4, 0.5);
|
|
4557
4557
|
}
|
|
@@ -4573,12 +4573,12 @@ var Ue = class extends We {
|
|
|
4573
4573
|
return this.u = typeof i == "function" ? i : r, ua(this), pt(this, e, n, t), da(this);
|
|
4574
4574
|
}
|
|
4575
4575
|
m() {
|
|
4576
|
-
var e = new
|
|
4576
|
+
var e = new Ke();
|
|
4577
4577
|
se(e, "image_in"), se(e, "norm_rect"), Y(e, "normalized_landmarks"), Y(e, "world_landmarks"), Y(e, "segmentation_masks");
|
|
4578
|
-
const t = new
|
|
4578
|
+
const t = new qe();
|
|
4579
4579
|
mt(t, eh, this.h);
|
|
4580
4580
|
const i = new Le();
|
|
4581
|
-
|
|
4581
|
+
ze(i, 2, "mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"), re(i, "IMAGE:image_in"), re(i, "NORM_RECT:norm_rect"), H(i, "NORM_LANDMARKS:normalized_landmarks"), H(i, "WORLD_LANDMARKS:world_landmarks"), i.o(t), tt(e, i), yn(this, e), this.g.attachProtoVectorListener("normalized_landmarks", (r, n) => {
|
|
4582
4582
|
this.landmarks = [];
|
|
4583
4583
|
for (const o of r) r = kr(o), this.landmarks.push(pn(r));
|
|
4584
4584
|
N(this, n);
|
|
@@ -4597,13 +4597,13 @@ var Ue = class extends We {
|
|
|
4597
4597
|
})), e = e.g(), this.setGraph(new Uint8Array(e), !0);
|
|
4598
4598
|
}
|
|
4599
4599
|
};
|
|
4600
|
-
|
|
4601
|
-
return q(
|
|
4602
|
-
},
|
|
4603
|
-
return q(
|
|
4604
|
-
},
|
|
4605
|
-
return q(
|
|
4606
|
-
},
|
|
4600
|
+
Ve.prototype.detectForVideo = Ve.prototype.G, Ve.prototype.detect = Ve.prototype.F, Ve.prototype.setOptions = Ve.prototype.o, Ve.createFromModelPath = function(e, t) {
|
|
4601
|
+
return q(Ve, e, { baseOptions: { modelAssetPath: t } });
|
|
4602
|
+
}, Ve.createFromModelBuffer = function(e, t) {
|
|
4603
|
+
return q(Ve, e, { baseOptions: { modelAssetBuffer: t } });
|
|
4604
|
+
}, Ve.createFromOptions = function(e, t) {
|
|
4605
|
+
return q(Ve, e, t);
|
|
4606
|
+
}, Ve.POSE_CONNECTIONS = Cl;
|
|
4607
4607
|
const Lr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/latest/face_landmarker.task", lh = "https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.32/wasm", uh = () => {
|
|
4608
4608
|
const e = D(null), [t, i] = C(!1), [r, n] = C("Initializing..."), [o, s] = C(0), [a, l] = C(!1);
|
|
4609
4609
|
B(() => {
|
|
@@ -4732,8 +4732,8 @@ const Lr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
|
|
|
4732
4732
|
const w = (d.x + u.x) * 0.5, f = (d.y + u.y) * 0.5, g = w - a.x, y = f - a.y, b = Math.sqrt(g * g + y * y), p = Math.abs(h.y - a.noseY) * 100, v = Math.abs(h.x - a.noseX) * 100, _ = Math.max(
|
|
4733
4733
|
0,
|
|
4734
4734
|
100 - (b * 200 + p + v)
|
|
4735
|
-
), E = _ < wh,
|
|
4736
|
-
return
|
|
4735
|
+
), E = _ < wh, k = performance.now();
|
|
4736
|
+
return k - n.current > 100 && (t(_), r(E), n.current = k), { engagement: _, isLookingAway: E };
|
|
4737
4737
|
},
|
|
4738
4738
|
[]
|
|
4739
4739
|
);
|
|
@@ -4774,11 +4774,11 @@ const Lr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
|
|
|
4774
4774
|
);
|
|
4775
4775
|
if (b === 0 || p === 0) return 0;
|
|
4776
4776
|
for (const _ of d) {
|
|
4777
|
-
const E = l[_],
|
|
4778
|
-
if (E &&
|
|
4779
|
-
const
|
|
4777
|
+
const E = l[_], k = a[_];
|
|
4778
|
+
if (E && k) {
|
|
4779
|
+
const A = w.x + (k.x - g.x) * b / p, G = w.y + (k.y - g.y) * b / p;
|
|
4780
4780
|
u += n(E, {
|
|
4781
|
-
x:
|
|
4781
|
+
x: A,
|
|
4782
4782
|
y: G
|
|
4783
4783
|
}), h++;
|
|
4784
4784
|
}
|
|
@@ -4818,32 +4818,41 @@ const Lr = "https://storage.googleapis.com/mediapipe-models/face_landmarker/face
|
|
|
4818
4818
|
setMultipleFacesDetected: t,
|
|
4819
4819
|
setReferenceFaceNotDetected: r
|
|
4820
4820
|
};
|
|
4821
|
-
}, ph = 500, yh = (e, t) => {
|
|
4822
|
-
const [
|
|
4821
|
+
}, ph = 500, yh = (e, t, i) => {
|
|
4822
|
+
const [r, n] = C(!1), [o, s] = C(Se.MODEL_LOADING), { incrementGazeViolation: a } = _a(), { multipleFacesDetected: l, referenceFaceNotDetected: d, isLookingAway: u } = e;
|
|
4823
4823
|
B(() => {
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4824
|
+
if (!i) return;
|
|
4825
|
+
let f;
|
|
4826
|
+
return (u || l || d) && t ? f = setTimeout(() => {
|
|
4827
|
+
n(!0), u ? (s("looking_away"), a("looking_away")) : l ? (s("multiple_faces"), a("multiple_faces")) : d && (s("no_face_detected"), a("no_face_detected"));
|
|
4828
|
+
}, ph) : (n(!1), o === Se.MODEL_LOADING ? f = setTimeout(() => {
|
|
4829
|
+
s("face_detected");
|
|
4830
|
+
}, 500) : s("face_detected")), () => {
|
|
4831
|
+
clearTimeout(f);
|
|
4829
4832
|
};
|
|
4830
4833
|
}, [
|
|
4831
|
-
|
|
4832
|
-
a,
|
|
4834
|
+
u,
|
|
4833
4835
|
l,
|
|
4836
|
+
d,
|
|
4834
4837
|
t,
|
|
4835
|
-
|
|
4838
|
+
a,
|
|
4839
|
+
i
|
|
4836
4840
|
]);
|
|
4837
|
-
const
|
|
4838
|
-
|
|
4841
|
+
const h = M(() => l ? Se.MULTIPLE_FACES : d ? "no_face_detected" : u ? Se.LOOKING_AWAY : o === Se.MODEL_LOADING ? Se.MODEL_LOADING : Se.FACE_DETECTED, [
|
|
4842
|
+
l,
|
|
4843
|
+
d,
|
|
4844
|
+
u,
|
|
4845
|
+
o
|
|
4846
|
+
]), w = M(() => {
|
|
4847
|
+
n(!1), s("face_detected");
|
|
4839
4848
|
}, []);
|
|
4840
4849
|
return {
|
|
4841
|
-
showGazeWarningModal:
|
|
4842
|
-
faceDetectionState:
|
|
4843
|
-
getWarningType:
|
|
4844
|
-
closeWarningModal:
|
|
4845
|
-
setShowGazeWarningModal:
|
|
4846
|
-
setFaceDetectionState:
|
|
4850
|
+
showGazeWarningModal: r,
|
|
4851
|
+
faceDetectionState: o,
|
|
4852
|
+
getWarningType: h,
|
|
4853
|
+
closeWarningModal: w,
|
|
4854
|
+
setShowGazeWarningModal: n,
|
|
4855
|
+
setFaceDetectionState: s
|
|
4847
4856
|
};
|
|
4848
4857
|
};
|
|
4849
4858
|
function bh(e) {
|
|
@@ -5353,24 +5362,24 @@ const Eh = new fr(), _h = (e, t, i, r) => {
|
|
|
5353
5362
|
}
|
|
5354
5363
|
r();
|
|
5355
5364
|
try {
|
|
5356
|
-
const E = performance.now(),
|
|
5365
|
+
const E = performance.now(), k = _.detectForVideo(
|
|
5357
5366
|
p,
|
|
5358
5367
|
E
|
|
5359
|
-
),
|
|
5360
|
-
|
|
5368
|
+
), A = n(
|
|
5369
|
+
k,
|
|
5361
5370
|
l,
|
|
5362
5371
|
d.current,
|
|
5363
5372
|
f
|
|
5364
5373
|
);
|
|
5365
|
-
|
|
5374
|
+
A ? (o(
|
|
5366
5375
|
v,
|
|
5367
5376
|
p,
|
|
5368
|
-
|
|
5377
|
+
A,
|
|
5369
5378
|
u,
|
|
5370
5379
|
h,
|
|
5371
5380
|
w,
|
|
5372
5381
|
l
|
|
5373
|
-
), l && w && a(
|
|
5382
|
+
), l && w && a(A, d.current, w)) : s(v, p);
|
|
5374
5383
|
} catch (E) {
|
|
5375
5384
|
console.error("Face detection error:", E);
|
|
5376
5385
|
}
|
|
@@ -5828,28 +5837,28 @@ const Fh = (e) => {
|
|
|
5828
5837
|
try {
|
|
5829
5838
|
l(null), s(null), u(null), await v.startRecording(p, {
|
|
5830
5839
|
onStart: () => {
|
|
5831
|
-
var
|
|
5832
|
-
i(!0), (
|
|
5840
|
+
var k, A;
|
|
5841
|
+
i(!0), (A = (k = h.current).onStart) == null || A.call(k);
|
|
5833
5842
|
},
|
|
5834
5843
|
// ---- FIX: onStop is the SINGLE source of truth for stop events.
|
|
5835
5844
|
// stopRecording() no longer calls onStop separately, preventing double-fire.
|
|
5836
5845
|
onStop: () => {
|
|
5837
|
-
var
|
|
5838
|
-
i(!1), (
|
|
5846
|
+
var k, A;
|
|
5847
|
+
i(!1), (A = (k = h.current).onStop) == null || A.call(k);
|
|
5839
5848
|
},
|
|
5840
|
-
onError: (
|
|
5849
|
+
onError: (k) => {
|
|
5841
5850
|
var G, x;
|
|
5842
|
-
const
|
|
5843
|
-
l(
|
|
5851
|
+
const A = k instanceof Q ? k : new Q(k.message, "RECORDING_ERROR", !0);
|
|
5852
|
+
l(A), i(!1), (x = (G = h.current).onError) == null || x.call(G, A);
|
|
5844
5853
|
}
|
|
5845
5854
|
});
|
|
5846
|
-
} catch (
|
|
5847
|
-
const
|
|
5848
|
-
|
|
5855
|
+
} catch (k) {
|
|
5856
|
+
const A = k instanceof Q ? k : new Q(
|
|
5857
|
+
k instanceof Error ? k.message : String(k),
|
|
5849
5858
|
"START_FAILED",
|
|
5850
5859
|
!1
|
|
5851
5860
|
);
|
|
5852
|
-
throw l(
|
|
5861
|
+
throw l(A), i(!1), (E = (_ = h.current).onError) == null || E.call(_, A), A;
|
|
5853
5862
|
}
|
|
5854
5863
|
}, []), g = M(async () => {
|
|
5855
5864
|
var v, _;
|
|
@@ -5864,16 +5873,16 @@ const Fh = (e) => {
|
|
|
5864
5873
|
const E = await p.stopRecording();
|
|
5865
5874
|
return u(E), E;
|
|
5866
5875
|
} catch (E) {
|
|
5867
|
-
const
|
|
5876
|
+
const k = E instanceof Q ? E : new Q(
|
|
5868
5877
|
E instanceof Error ? E.message : String(E),
|
|
5869
5878
|
"STOP_FAILED",
|
|
5870
5879
|
!1
|
|
5871
5880
|
);
|
|
5872
|
-
throw l(
|
|
5881
|
+
throw l(k), i(!1), (_ = (v = h.current).onError) == null || _.call(v, k), k;
|
|
5873
5882
|
}
|
|
5874
5883
|
}, []), y = M(
|
|
5875
5884
|
async (p, v = {}) => {
|
|
5876
|
-
var E,
|
|
5885
|
+
var E, k, A, G, x, T;
|
|
5877
5886
|
const _ = w.current;
|
|
5878
5887
|
if (!_ || _.isDisposed())
|
|
5879
5888
|
throw new Q(
|
|
@@ -5885,20 +5894,20 @@ const Fh = (e) => {
|
|
|
5885
5894
|
if (l(null), n(!0), !p || p.size === 0) {
|
|
5886
5895
|
console.warn("Skipping transcription — blob is empty");
|
|
5887
5896
|
const z = { transcript: "" };
|
|
5888
|
-
return s(z.transcript), n(!1), (
|
|
5897
|
+
return s(z.transcript), n(!1), (k = (E = h.current).onTranscriptionComplete) == null || k.call(E, z), z;
|
|
5889
5898
|
}
|
|
5890
5899
|
const P = {
|
|
5891
5900
|
audioBlob: p,
|
|
5892
5901
|
...v
|
|
5893
5902
|
}, j = await _.transcribe(P);
|
|
5894
|
-
return s(j.transcript), n(!1), (G = (
|
|
5903
|
+
return s(j.transcript), n(!1), (G = (A = h.current).onTranscriptionComplete) == null || G.call(A, j), j;
|
|
5895
5904
|
} catch (P) {
|
|
5896
5905
|
const j = P instanceof Q ? P : new Q(
|
|
5897
5906
|
P instanceof Error ? P.message : String(P),
|
|
5898
5907
|
"TRANSCRIPTION_FAILED",
|
|
5899
5908
|
!0
|
|
5900
5909
|
);
|
|
5901
|
-
throw l(j), n(!1), (
|
|
5910
|
+
throw l(j), n(!1), (T = (x = h.current).onError) == null || T.call(x, j), j;
|
|
5902
5911
|
}
|
|
5903
5912
|
},
|
|
5904
5913
|
[]
|
|
@@ -6386,9 +6395,9 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6386
6395
|
videoAllowed: u = !0
|
|
6387
6396
|
}, h) => {
|
|
6388
6397
|
var as;
|
|
6389
|
-
const { authToken: w } = Aa(), f = os(), g = w ? lu(w) : null, { borderRadius: y } = Ii(), b = y ?? 18, { proctoring: p, capture_screenshots: v } = gr(), _ = !!(p != null && p.gazeAnalysisEnabled), [E,
|
|
6398
|
+
const { authToken: w } = Aa(), f = os(), g = w ? lu(w) : null, { borderRadius: y } = Ii(), b = y ?? 18, { proctoring: p, capture_screenshots: v } = gr(), _ = !!(p != null && p.gazeAnalysisEnabled), [E, k] = C(!1), [A, G] = C(
|
|
6390
6399
|
(p == null ? void 0 : p.showLandmarks) ?? !1
|
|
6391
|
-
), [x,
|
|
6400
|
+
), [x, T] = C(
|
|
6392
6401
|
r && ((p == null ? void 0 : p.showEngagementBar) ?? !0)
|
|
6393
6402
|
), [P, j] = C(
|
|
6394
6403
|
_
|
|
@@ -6429,13 +6438,13 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6429
6438
|
}, [o]);
|
|
6430
6439
|
const {
|
|
6431
6440
|
faceLandmarkerRef: at,
|
|
6432
|
-
isModelLoaded:
|
|
6433
|
-
statusMessage:
|
|
6441
|
+
isModelLoaded: De,
|
|
6442
|
+
statusMessage: Pe,
|
|
6434
6443
|
setStatusMessage: ct,
|
|
6435
6444
|
loadingProgress: At,
|
|
6436
6445
|
permissionDenied: ni,
|
|
6437
6446
|
clearCache: oi
|
|
6438
|
-
} = uh(), { fps: si, updateFPS: ai } = dh(), { drawWithEngagementBar: ci, clearCanvas: Ut, engagementRef:
|
|
6447
|
+
} = uh(), { fps: si, updateFPS: ai } = dh(), { drawWithEngagementBar: ci, clearCanvas: Ut, engagementRef: Fe } = hh(), {
|
|
6439
6448
|
engagement: Tt,
|
|
6440
6449
|
isLookingAway: ae,
|
|
6441
6450
|
analyzeGaze: $i,
|
|
@@ -6464,12 +6473,13 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6464
6473
|
setFaceDetectionState: ss
|
|
6465
6474
|
} = yh(
|
|
6466
6475
|
Tr,
|
|
6467
|
-
_ && !a
|
|
6476
|
+
_ && !a,
|
|
6468
6477
|
// Disable warning manager modal triggers if overlay is on
|
|
6478
|
+
De
|
|
6469
6479
|
);
|
|
6470
6480
|
B(() => {
|
|
6471
6481
|
if (s) {
|
|
6472
|
-
if (d || !
|
|
6482
|
+
if (d || !De) {
|
|
6473
6483
|
s("model_loading");
|
|
6474
6484
|
return;
|
|
6475
6485
|
}
|
|
@@ -6477,11 +6487,11 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6477
6487
|
s("camera_error");
|
|
6478
6488
|
return;
|
|
6479
6489
|
}
|
|
6480
|
-
const Ae = W() ||
|
|
6490
|
+
const Ae = W() || Se.NO_FACE;
|
|
6481
6491
|
s(Ae);
|
|
6482
6492
|
}
|
|
6483
6493
|
}, [
|
|
6484
|
-
|
|
6494
|
+
De,
|
|
6485
6495
|
d,
|
|
6486
6496
|
u,
|
|
6487
6497
|
ui,
|
|
@@ -6501,17 +6511,17 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6501
6511
|
$i,
|
|
6502
6512
|
Hi,
|
|
6503
6513
|
qi,
|
|
6504
|
-
|
|
6514
|
+
A,
|
|
6505
6515
|
x,
|
|
6506
6516
|
_,
|
|
6507
6517
|
ct,
|
|
6508
6518
|
Wi
|
|
6509
6519
|
);
|
|
6510
|
-
_h(O,
|
|
6520
|
+
_h(O, De, Dl, ct), B(() => {
|
|
6511
6521
|
Xi();
|
|
6512
6522
|
}, [Xi]), B(() => {
|
|
6513
|
-
|
|
6514
|
-
}, [Tt, ae,
|
|
6523
|
+
Fe && Fe.current && (Fe.current.value = Tt, Fe.current.isLookingAway = ae);
|
|
6524
|
+
}, [Tt, ae, Fe]);
|
|
6515
6525
|
const Pl = M(
|
|
6516
6526
|
(Ae) => {
|
|
6517
6527
|
j(Ae), Ae || (li(100), Vt(!1));
|
|
@@ -6597,7 +6607,7 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6597
6607
|
style: { transform: "scaleX(-1)" }
|
|
6598
6608
|
}
|
|
6599
6609
|
),
|
|
6600
|
-
!u && /* @__PURE__ */ c("div", { className: "iw-absolute iw-inset-0 iw-flex iw-flex-col iw-items-center iw-justify-center iw-bg-black/60 iw-z-30", children: d || !
|
|
6610
|
+
!u && /* @__PURE__ */ c("div", { className: "iw-absolute iw-inset-0 iw-flex iw-flex-col iw-items-center iw-justify-center iw-bg-black/60 iw-z-30", children: d || !De ? /* @__PURE__ */ m("div", { className: "iw-flex iw-flex-col iw-items-center iw-gap-3", children: [
|
|
6601
6611
|
/* @__PURE__ */ c("div", { className: "iw-w-5 iw-h-5 iw-border-2 iw-border-white/20 iw-border-t-white iw-rounded-full iw-animate-spin" }),
|
|
6602
6612
|
/* @__PURE__ */ c("span", { className: "iw-text-white/60 iw-text-xs iw-font-medium iw-tracking-wide", children: "Initializing camera..." })
|
|
6603
6613
|
] }) : /* @__PURE__ */ m(bt, { children: [
|
|
@@ -6629,19 +6639,19 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6629
6639
|
{
|
|
6630
6640
|
showControls: (p == null ? void 0 : p.showControls) ?? !1,
|
|
6631
6641
|
isBubbleOpen: E,
|
|
6632
|
-
setIsBubbleOpen:
|
|
6642
|
+
setIsBubbleOpen: k,
|
|
6633
6643
|
setReference: Ki,
|
|
6634
6644
|
clearCache: oi,
|
|
6635
|
-
isModelLoaded:
|
|
6645
|
+
isModelLoaded: De,
|
|
6636
6646
|
gazeAnalysisEnabled: P && _,
|
|
6637
6647
|
referenceSet: Hi,
|
|
6638
|
-
showLandmarks:
|
|
6648
|
+
showLandmarks: A,
|
|
6639
6649
|
setShowLandmarks: G,
|
|
6640
6650
|
showEngagementBar: x,
|
|
6641
|
-
setShowEngagementBar:
|
|
6651
|
+
setShowEngagementBar: T,
|
|
6642
6652
|
handleToggleGazeAnalysis: Pl,
|
|
6643
6653
|
stats: Bl,
|
|
6644
|
-
statusMessage:
|
|
6654
|
+
statusMessage: Pe,
|
|
6645
6655
|
loadingProgress: At
|
|
6646
6656
|
}
|
|
6647
6657
|
) }),
|
|
@@ -6658,7 +6668,7 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6658
6668
|
/* @__PURE__ */ c("div", { className: "iw-absolute iw-bottom-2 iw-inset-x-0 iw-flex iw-justify-center iw-pointer-events-none iw-z-20", children: /* @__PURE__ */ c(
|
|
6659
6669
|
Nh,
|
|
6660
6670
|
{
|
|
6661
|
-
status: u ? d || !
|
|
6671
|
+
status: u ? d || !De ? "model_loading" : W() ?? "no_face_detected" : "camera_error"
|
|
6662
6672
|
}
|
|
6663
6673
|
) })
|
|
6664
6674
|
] })
|
|
@@ -6767,21 +6777,21 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
6767
6777
|
const U = p[O] ?? 0;
|
|
6768
6778
|
E += U * U;
|
|
6769
6779
|
}
|
|
6770
|
-
const
|
|
6780
|
+
const k = Math.sqrt(E / b), A = Math.min(1, k / 128), G = new Float32Array(w.fftSize);
|
|
6771
6781
|
w.getFloatTimeDomainData(G);
|
|
6772
6782
|
let x = 0;
|
|
6773
6783
|
for (let O = 0; O < G.length; O++) {
|
|
6774
6784
|
const U = G[O] || 0;
|
|
6775
6785
|
x += U * U;
|
|
6776
6786
|
}
|
|
6777
|
-
const
|
|
6787
|
+
const T = Math.sqrt(x / G.length), P = T > 0 ? 20 * Math.log10(T) : -1 / 0;
|
|
6778
6788
|
let j = "problem";
|
|
6779
6789
|
if (P >= -20 ? j = "good" : P >= -25 ? j = "acceptable" : P >= -45 ? j = "poor" : j = "problem", r) {
|
|
6780
6790
|
const O = Date.now();
|
|
6781
6791
|
O - s.current > 200 && (s.current = O, r(j, P));
|
|
6782
6792
|
}
|
|
6783
6793
|
y.clearRect(0, 0, v, _);
|
|
6784
|
-
const z = i, X = Math.floor(
|
|
6794
|
+
const z = i, X = Math.floor(A * z);
|
|
6785
6795
|
for (let O = 0; O < z; O++) {
|
|
6786
6796
|
const U = O * (v / z), ee = v / z - 1.8;
|
|
6787
6797
|
O < X ? y.fillStyle = "#0EB00E" : y.fillStyle = "#D9D9D9", y.fillRect(U, 0, ee, _);
|
|
@@ -7030,11 +7040,11 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
7030
7040
|
audioStream: y = null,
|
|
7031
7041
|
isDeviceLoading: b = !1
|
|
7032
7042
|
}) => {
|
|
7033
|
-
const { baseColor: p } = Ii(), [v, _] = C("problem"), [E,
|
|
7043
|
+
const { baseColor: p } = Ii(), [v, _] = C("problem"), [E, k] = C(!1);
|
|
7034
7044
|
Ht.useEffect(() => {
|
|
7035
|
-
_("problem"),
|
|
7045
|
+
_("problem"), k(!1);
|
|
7036
7046
|
}, [h]);
|
|
7037
|
-
const
|
|
7047
|
+
const A = l || !n || a && (!e || !t || !E) || b;
|
|
7038
7048
|
return /* @__PURE__ */ m("div", { className: "iw-flex iw-flex-col iw-gap-1 iw-w-full", children: [
|
|
7039
7049
|
/* @__PURE__ */ m("div", { className: "iw-flex iw-justify-center iw-items-center iw-gap-2 iw-flex-wrap iw-max-w-[700px] iw-mx-auto", children: [
|
|
7040
7050
|
a && /* @__PURE__ */ m("div", { className: "iw-flex sm:iw-flex-row iw-flex-col iw-gap-4 iw-w-full", children: [
|
|
@@ -7053,10 +7063,10 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
7053
7063
|
stream: y,
|
|
7054
7064
|
hasPermission: e,
|
|
7055
7065
|
onAudioLevel: (x) => {
|
|
7056
|
-
const
|
|
7066
|
+
const T = { good: 3, acceptable: 2, poor: 1, problem: 0 };
|
|
7057
7067
|
_(
|
|
7058
|
-
(P) =>
|
|
7059
|
-
), !E && (x === "good" || x === "acceptable") &&
|
|
7068
|
+
(P) => T[x] > T[P] ? x : P
|
|
7069
|
+
), !E && (x === "good" || x === "acceptable") && k(!0);
|
|
7060
7070
|
}
|
|
7061
7071
|
}
|
|
7062
7072
|
),
|
|
@@ -7098,8 +7108,8 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
7098
7108
|
zr,
|
|
7099
7109
|
{
|
|
7100
7110
|
onClick: r,
|
|
7101
|
-
disabled:
|
|
7102
|
-
className: `iw-h-12 iw-w-full iw-shadow-lg !iw-bg-[#F1F5FE] !iw-text-[#062260] !iw-font-bold !iw-border-[#E7EAF1] iw-rounded-lg ${
|
|
7111
|
+
disabled: A,
|
|
7112
|
+
className: `iw-h-12 iw-w-full iw-shadow-lg !iw-bg-[#F1F5FE] !iw-text-[#062260] !iw-font-bold !iw-border-[#E7EAF1] iw-rounded-lg ${A ? "iw-opacity-50" : "hover:iw-opacity-75"}`,
|
|
7103
7113
|
children: b ? "Device Loading..." : i
|
|
7104
7114
|
}
|
|
7105
7115
|
),
|
|
@@ -7171,20 +7181,20 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
7171
7181
|
handleAudioChange: y,
|
|
7172
7182
|
handleVideoChange: b,
|
|
7173
7183
|
stopStream: p
|
|
7174
|
-
} = du(e), [v, _] = C(!1), [E,
|
|
7184
|
+
} = du(e), [v, _] = C(!1), [E, k] = C(0), [A, G] = C(!1), x = D(null), T = D(null), P = (U) => {
|
|
7175
7185
|
x.current = U, r && (typeof r == "function" ? r(U) : r.current = U);
|
|
7176
7186
|
};
|
|
7177
7187
|
if (B(() => () => {
|
|
7178
|
-
|
|
7188
|
+
T.current && (clearInterval(T.current), T.current = null);
|
|
7179
7189
|
}, []), !e) return null;
|
|
7180
|
-
const [j, z] = C(
|
|
7190
|
+
const [j, z] = C(Se.MODEL_LOADING), X = async () => {
|
|
7181
7191
|
var ee;
|
|
7182
7192
|
_(!0), (ee = x.current) == null || ee.resetReference();
|
|
7183
7193
|
const U = () => {
|
|
7184
7194
|
var be;
|
|
7185
7195
|
return (be = x.current) == null ? void 0 : be.setReference();
|
|
7186
7196
|
};
|
|
7187
|
-
U(),
|
|
7197
|
+
U(), T.current && clearInterval(T.current), T.current = setInterval(U, 500);
|
|
7188
7198
|
};
|
|
7189
7199
|
return /* @__PURE__ */ c("div", { className: "iw-fixed iw-inset-0 iw-z-50 iw-flex iw-items-center iw-justify-center iw-bg-gray-900/40 iw-backdrop-blur-sm iw-p-4 iw-pt-16 iw-overflow-auto", children: /* @__PURE__ */ m("div", { className: "iw-w-full iw-max-w-[700px] iw-max-h-[900px] iw-my-6 iw-bg-white iw-rounded-xl iw-shadow-2xl iw-overflow-auto", children: [
|
|
7190
7200
|
/* @__PURE__ */ m("div", { className: "iw-px-12 iw-pt-3", children: [
|
|
@@ -7209,7 +7219,7 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
7209
7219
|
videoAllowed: a,
|
|
7210
7220
|
onProctoringStatusChange: z,
|
|
7211
7221
|
onSetReference: () => {
|
|
7212
|
-
|
|
7222
|
+
T.current && (clearInterval(T.current), T.current = null), _(!1), k(1);
|
|
7213
7223
|
}
|
|
7214
7224
|
}
|
|
7215
7225
|
) : /* @__PURE__ */ c(
|
|
@@ -7230,10 +7240,10 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
7230
7240
|
videoEnabled: a,
|
|
7231
7241
|
buttonText: i ? v ? "Calibrating..." : j === "model_loading" ? "Initialising..." : "Start calibrate" : "Next",
|
|
7232
7242
|
onButtonClick: () => {
|
|
7233
|
-
i ? X() :
|
|
7243
|
+
i ? X() : k(1);
|
|
7234
7244
|
},
|
|
7235
|
-
disabled: !
|
|
7236
|
-
isAgreed:
|
|
7245
|
+
disabled: !A || i && j !== "face_detected" || !i && (!s || !a),
|
|
7246
|
+
isAgreed: A,
|
|
7237
7247
|
onAgreedToggle: G,
|
|
7238
7248
|
audioDevices: d,
|
|
7239
7249
|
videoDevices: u,
|
|
@@ -7257,7 +7267,7 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
7257
7267
|
onButtonClick: () => {
|
|
7258
7268
|
t(), p();
|
|
7259
7269
|
},
|
|
7260
|
-
isAgreed:
|
|
7270
|
+
isAgreed: A,
|
|
7261
7271
|
onAgreedToggle: G,
|
|
7262
7272
|
showMediaIcons: !1
|
|
7263
7273
|
}
|
|
@@ -7561,29 +7571,29 @@ const to = new Oh(), Bh = (e = {}) => {
|
|
|
7561
7571
|
n = new u(), o = n.createAnalyser(), o.fftSize = 256, o.smoothingTimeConstant = 0.9, s = n.createMediaStreamSource(d), s.connect(o);
|
|
7562
7572
|
const h = o.frequencyBinCount, w = new Uint8Array(h), f = new Float32Array(h), g = 0.2, y = () => {
|
|
7563
7573
|
if (t.current) {
|
|
7564
|
-
const
|
|
7565
|
-
i.width !==
|
|
7574
|
+
const T = t.current.clientWidth - 32;
|
|
7575
|
+
i.width !== T && T > 0 && (i.width = T);
|
|
7566
7576
|
}
|
|
7567
7577
|
const b = i.width, p = i.height;
|
|
7568
7578
|
r.clearRect(0, 0, b, p), o.getByteFrequencyData(w);
|
|
7569
|
-
for (let
|
|
7570
|
-
const P = f[
|
|
7571
|
-
f[
|
|
7579
|
+
for (let T = 0; T < h; T++) {
|
|
7580
|
+
const P = f[T] || 0, j = w[T] || 0;
|
|
7581
|
+
f[T] = P * g + j * (1 - g);
|
|
7572
7582
|
}
|
|
7573
|
-
const v = 3, _ = 2, E = Math.floor(b / (v + _)),
|
|
7574
|
-
if (
|
|
7583
|
+
const v = 3, _ = 2, E = Math.floor(b / (v + _)), k = E > 0 ? E % 2 === 0 ? E - 1 : E : 0;
|
|
7584
|
+
if (k <= 0) {
|
|
7575
7585
|
a = requestAnimationFrame(y);
|
|
7576
7586
|
return;
|
|
7577
7587
|
}
|
|
7578
|
-
const
|
|
7588
|
+
const A = (b - k * (v + _)) / 2, G = Math.floor(k / 2);
|
|
7579
7589
|
r.fillStyle = "#27ba71";
|
|
7580
7590
|
const x = 38;
|
|
7581
|
-
for (let
|
|
7582
|
-
const P = Math.abs(
|
|
7591
|
+
for (let T = 0; T < k; T++) {
|
|
7592
|
+
const P = Math.abs(T - G), j = G > 0 ? P / G : 0, z = 2 + Math.floor(Math.pow(j, 1.5) * x);
|
|
7583
7593
|
let X = f[Math.min(z, h - 1)] || 0;
|
|
7584
7594
|
X = X / 255, X = Math.pow(X, 2.2);
|
|
7585
|
-
const O = 1 - j * 0.8, U = 1.5, ee = X > 0.05 ? Math.sin(Date.now() / 300 +
|
|
7586
|
-
r.beginPath(), r.roundRect(at,
|
|
7595
|
+
const O = 1 - j * 0.8, U = 1.5, ee = X > 0.05 ? Math.sin(Date.now() / 300 + T) * 0.5 * O : 0, be = X * (p - 8) * O, Me = Math.max(U, be + ee), at = A + T * (v + _), De = (p - Me) / 2;
|
|
7596
|
+
r.beginPath(), r.roundRect(at, De, v, Me, v / 2), r.fill();
|
|
7587
7597
|
}
|
|
7588
7598
|
a = requestAnimationFrame(y);
|
|
7589
7599
|
};
|
|
@@ -8168,26 +8178,24 @@ const c2 = (e) => /* @__PURE__ */ m(
|
|
|
8168
8178
|
}),
|
|
8169
8179
|
[]
|
|
8170
8180
|
), Lh(y), Fh(y), Mh(), Vh();
|
|
8171
|
-
const { proctoring: E } = gr(),
|
|
8181
|
+
const { proctoring: E } = gr(), k = (E == null ? void 0 : E.prevent_unintended_exit) ?? !1;
|
|
8172
8182
|
B(() => {
|
|
8173
|
-
if (!T) return;
|
|
8174
|
-
window.history.pushState(null, "", window.location.href);
|
|
8175
8183
|
const x = () => {
|
|
8176
|
-
d || h || r || (console.log("User attempted to use browser back navigation"), l(!0), window.history.pushState(null, "", window.location.href));
|
|
8177
|
-
},
|
|
8178
|
-
if (!(d || h || r))
|
|
8179
|
-
return
|
|
8184
|
+
k && (d || h || r || (console.log("User attempted to use browser back navigation"), l(!0), window.history.pushState(null, "", window.location.href)));
|
|
8185
|
+
}, T = (P) => {
|
|
8186
|
+
if (!(d || h || r) && (console.log("User attempted to reload or close the tab"), k))
|
|
8187
|
+
return l(!0), P.preventDefault(), P.returnValue = "", "";
|
|
8180
8188
|
};
|
|
8181
|
-
return window.addEventListener("popstate", x), window.addEventListener("beforeunload",
|
|
8182
|
-
window.removeEventListener("popstate", x), window.removeEventListener("beforeunload",
|
|
8189
|
+
return k && (window.history.pushState(null, "", window.location.href), window.addEventListener("popstate", x)), window.addEventListener("beforeunload", T), () => {
|
|
8190
|
+
window.removeEventListener("popstate", x), window.removeEventListener("beforeunload", T);
|
|
8183
8191
|
};
|
|
8184
8192
|
}, [
|
|
8185
8193
|
d,
|
|
8186
8194
|
h,
|
|
8187
8195
|
r,
|
|
8188
|
-
|
|
8196
|
+
k
|
|
8189
8197
|
]);
|
|
8190
|
-
const
|
|
8198
|
+
const A = () => {
|
|
8191
8199
|
u(!0), _(), s(!1), l(!1), t == null || t();
|
|
8192
8200
|
}, G = () => {
|
|
8193
8201
|
l(!1), i == null || i();
|
|
@@ -8203,7 +8211,7 @@ const c2 = (e) => /* @__PURE__ */ m(
|
|
|
8203
8211
|
handleClose: () => {
|
|
8204
8212
|
s(!1), p();
|
|
8205
8213
|
},
|
|
8206
|
-
handleDisqualify:
|
|
8214
|
+
handleDisqualify: A,
|
|
8207
8215
|
handleUnintendedExit: () => {
|
|
8208
8216
|
l(!0);
|
|
8209
8217
|
}
|
|
@@ -8425,13 +8433,13 @@ const c2 = (e) => /* @__PURE__ */ m(
|
|
|
8425
8433
|
const { baseColor: d } = Ii(), u = D(null), h = D(null), w = D(null), f = D(null), g = D(null), y = D(null), b = D(!1), [p, v] = C(null);
|
|
8426
8434
|
B(() => {
|
|
8427
8435
|
if (t || !h.current) return;
|
|
8428
|
-
const E = h.current,
|
|
8436
|
+
const E = h.current, k = () => {
|
|
8429
8437
|
const G = u.current;
|
|
8430
8438
|
if (!G) return;
|
|
8431
|
-
const x = E.clientWidth,
|
|
8432
|
-
G.width = Math.max(1, Math.floor(x * window.devicePixelRatio || 1)), G.height = Math.max(1, Math.floor(
|
|
8433
|
-
},
|
|
8434
|
-
return
|
|
8439
|
+
const x = E.clientWidth, T = i;
|
|
8440
|
+
G.width = Math.max(1, Math.floor(x * window.devicePixelRatio || 1)), G.height = Math.max(1, Math.floor(T * window.devicePixelRatio || 1));
|
|
8441
|
+
}, A = new ResizeObserver(k);
|
|
8442
|
+
return A.observe(E), k(), () => A.disconnect();
|
|
8435
8443
|
}, [t, i]), B(() => {
|
|
8436
8444
|
if (!t) return;
|
|
8437
8445
|
const E = u.current;
|
|
@@ -8446,8 +8454,8 @@ const c2 = (e) => /* @__PURE__ */ m(
|
|
|
8446
8454
|
let E = !1;
|
|
8447
8455
|
return (async () => {
|
|
8448
8456
|
try {
|
|
8449
|
-
const
|
|
8450
|
-
w.current =
|
|
8457
|
+
const A = new (window.AudioContext || window.webkitAudioContext)();
|
|
8458
|
+
w.current = A;
|
|
8451
8459
|
let G = a;
|
|
8452
8460
|
if (!G) {
|
|
8453
8461
|
if (!l) return;
|
|
@@ -8457,40 +8465,40 @@ const c2 = (e) => /* @__PURE__ */ m(
|
|
|
8457
8465
|
}), b.current = !0;
|
|
8458
8466
|
}
|
|
8459
8467
|
if (E) return;
|
|
8460
|
-
const x =
|
|
8468
|
+
const x = A.createAnalyser();
|
|
8461
8469
|
x.fftSize = o, x.smoothingTimeConstant = s, f.current = x;
|
|
8462
|
-
const
|
|
8463
|
-
g.current =
|
|
8464
|
-
} catch (
|
|
8465
|
-
v((
|
|
8470
|
+
const T = A.createMediaStreamSource(G);
|
|
8471
|
+
g.current = T, T.connect(x), _();
|
|
8472
|
+
} catch (A) {
|
|
8473
|
+
v((A == null ? void 0 : A.message) || "Failed to initialize microphone");
|
|
8466
8474
|
}
|
|
8467
8475
|
})(), () => {
|
|
8468
|
-
var
|
|
8476
|
+
var A, G, x, T;
|
|
8469
8477
|
E = !0, y.current && cancelAnimationFrame(y.current);
|
|
8470
8478
|
try {
|
|
8471
|
-
(
|
|
8479
|
+
(A = g.current) == null || A.disconnect();
|
|
8472
8480
|
} catch {
|
|
8473
8481
|
}
|
|
8474
8482
|
try {
|
|
8475
8483
|
(G = f.current) == null || G.disconnect();
|
|
8476
8484
|
} catch {
|
|
8477
8485
|
}
|
|
8478
|
-
b.current && ((
|
|
8486
|
+
b.current && ((T = ((x = g.current) == null ? void 0 : x.mediaStream) || void 0) == null || T.getTracks().forEach((P) => P.stop())), w.current && w.current.state !== "closed" && w.current.close();
|
|
8479
8487
|
};
|
|
8480
8488
|
}, [a, o, s, l]);
|
|
8481
8489
|
const _ = () => {
|
|
8482
|
-
const E = u.current,
|
|
8483
|
-
if (!E || !
|
|
8484
|
-
const
|
|
8485
|
-
if (!
|
|
8486
|
-
const G = window.devicePixelRatio || 1, x = E.width,
|
|
8487
|
-
y.current = requestAnimationFrame(z),
|
|
8490
|
+
const E = u.current, k = f.current;
|
|
8491
|
+
if (!E || !k) return;
|
|
8492
|
+
const A = E.getContext("2d");
|
|
8493
|
+
if (!A) return;
|
|
8494
|
+
const G = window.devicePixelRatio || 1, x = E.width, T = E.height, P = k.frequencyBinCount, j = new Uint8Array(P), z = () => {
|
|
8495
|
+
y.current = requestAnimationFrame(z), k.getByteTimeDomainData(j), A.clearRect(0, 0, x, T), A.fillStyle = "rgba(0,0,0,0)", A.fillRect(0, 0, x, T);
|
|
8488
8496
|
const X = Math.max(1, Math.floor(r * G)), O = Math.max(1, Math.floor(n * G)), U = X + O, ee = Math.max(8, Math.floor((x + O) / U)), be = Math.floor(j.length / ee);
|
|
8489
8497
|
for (let Me = 0; Me < ee; Me++) {
|
|
8490
|
-
const at = Math.min(j.length - 1, Me * be),
|
|
8491
|
-
|
|
8498
|
+
const at = Math.min(j.length - 1, Me * be), De = j[at] / 128 - 1, Pe = Math.abs(De), ct = Math.pow(Pe, 0.6), At = Math.max(T * 0.06, ct * (T * 0.9)), ni = Me * U, oi = (T - At) / 2, si = 140 - Math.min(140, 140 * Pe), ai = 85, ci = 48 + Math.floor(12 * (1 - Pe));
|
|
8499
|
+
A.fillStyle = `${d}`, A.shadowColor = `hsla(${si}, ${ai}%, ${ci}%, ${0.25 * Pe})`, A.shadowBlur = 8 * Pe;
|
|
8492
8500
|
const Ut = Math.min(X / 2, At / 2);
|
|
8493
|
-
g2(
|
|
8501
|
+
g2(A, ni, oi, X, At, Ut), A.fill();
|
|
8494
8502
|
}
|
|
8495
8503
|
};
|
|
8496
8504
|
z();
|
|
@@ -8836,9 +8844,9 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
8836
8844
|
videoFeedRef: a
|
|
8837
8845
|
}) => {
|
|
8838
8846
|
var Xi, Tr;
|
|
8839
|
-
const l = os(), { baseUrl: d, authToken: u } = Aa(), { timers: h, stt: w, proctoring: f } = gr(), g = D(null), [y, b] = C(null), [p, v] = C(""), [_, E] = C(null), [
|
|
8847
|
+
const l = os(), { baseUrl: d, authToken: u } = Aa(), { timers: h, stt: w, proctoring: f } = gr(), g = D(null), [y, b] = C(null), [p, v] = C(""), [_, E] = C(null), [k, A] = C(
|
|
8840
8848
|
Hr
|
|
8841
|
-
), [G, x] = C(!0),
|
|
8849
|
+
), [G, x] = C(!0), T = D(""), P = D(null), j = {
|
|
8842
8850
|
thinkingTime: (h == null ? void 0 : h.thinkingDuration) || 0,
|
|
8843
8851
|
// TODO: Use this to use the estimated answer duration from response
|
|
8844
8852
|
// answeringTime:
|
|
@@ -8849,12 +8857,12 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
8849
8857
|
editingTime: G ? (h == null ? void 0 : h.editingDuration) || 30 : 0
|
|
8850
8858
|
}, { thinkingTime: z, answeringTime: X, editingTime: O } = j;
|
|
8851
8859
|
B(() => {
|
|
8852
|
-
|
|
8860
|
+
T.current = p;
|
|
8853
8861
|
}, [p]);
|
|
8854
8862
|
const [U, ee] = C(!1), be = D(!1), {
|
|
8855
8863
|
speak: Me,
|
|
8856
8864
|
stop: at,
|
|
8857
|
-
error:
|
|
8865
|
+
error: De
|
|
8858
8866
|
} = Bh({
|
|
8859
8867
|
onEnd: () => {
|
|
8860
8868
|
be.current = !1, ae();
|
|
@@ -8862,7 +8870,7 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
8862
8870
|
onError: () => {
|
|
8863
8871
|
be.current || (be.current = !0, ae());
|
|
8864
8872
|
}
|
|
8865
|
-
}),
|
|
8873
|
+
}), Pe = D(!1), ct = D(!1), {
|
|
8866
8874
|
startRecording: At,
|
|
8867
8875
|
stopRecording: ni,
|
|
8868
8876
|
transcribe: oi,
|
|
@@ -8881,18 +8889,18 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
8881
8889
|
interviewId: r
|
|
8882
8890
|
},
|
|
8883
8891
|
onStart: () => {
|
|
8884
|
-
|
|
8892
|
+
Pe.current = !1, ct.current = !1;
|
|
8885
8893
|
},
|
|
8886
8894
|
onStop: () => {
|
|
8887
8895
|
},
|
|
8888
8896
|
onTranscriptionComplete: (V) => {
|
|
8889
8897
|
const W = V.transcript;
|
|
8890
|
-
v(W),
|
|
8898
|
+
v(W), T.current = W, ct.current || (ct.current = !0, ae());
|
|
8891
8899
|
},
|
|
8892
8900
|
onError: (V) => {
|
|
8893
|
-
console.error("STT Error:", V),
|
|
8901
|
+
console.error("STT Error:", V), Pe.current || (Pe.current = !0, ae());
|
|
8894
8902
|
}
|
|
8895
|
-
}), { state:
|
|
8903
|
+
}), { state: Fe, startQuestion: Tt, nextPhase: ae, completeInterview: $i, timerService: li } = Ph({
|
|
8896
8904
|
config: {
|
|
8897
8905
|
// thinkingDuration: thinkingTime,
|
|
8898
8906
|
answeringDuration: X,
|
|
@@ -8929,7 +8937,7 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
8929
8937
|
(async () => {
|
|
8930
8938
|
try {
|
|
8931
8939
|
const W = await l.getInterviewConfig(r);
|
|
8932
|
-
if (W != null && W.data && (W.data.duration_in_minutes &&
|
|
8940
|
+
if (W != null && W.data && (W.data.duration_in_minutes && A(W.data.duration_in_minutes), typeof W.data.allow_answer_editing == "boolean" && x(W.data.allow_answer_editing), typeof W.data.elapsed_time_in_minutes == "number")) {
|
|
8933
8941
|
const Ye = Math.floor(
|
|
8934
8942
|
W.data.elapsed_time_in_minutes * 60
|
|
8935
8943
|
);
|
|
@@ -8952,7 +8960,7 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
8952
8960
|
},
|
|
8953
8961
|
{
|
|
8954
8962
|
onSuccess: async (V) => {
|
|
8955
|
-
V && V.data && (v(""),
|
|
8963
|
+
V && V.data && (v(""), T.current = "", b(V.data), ae());
|
|
8956
8964
|
},
|
|
8957
8965
|
onError: (V) => {
|
|
8958
8966
|
console.error("Failed to fetch questions:", V);
|
|
@@ -8961,7 +8969,7 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
8961
8969
|
), zi = M(async () => {
|
|
8962
8970
|
var V;
|
|
8963
8971
|
try {
|
|
8964
|
-
const W =
|
|
8972
|
+
const W = T.current, Ye = ((V = P.current) == null ? void 0 : V.qna_id) || "";
|
|
8965
8973
|
G && await l.submitAnswer({
|
|
8966
8974
|
interviewId: r,
|
|
8967
8975
|
qnaId: Ye,
|
|
@@ -9013,7 +9021,7 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
9013
9021
|
const V = !ai && Ut ? Ut : await ni();
|
|
9014
9022
|
await oi(V);
|
|
9015
9023
|
} catch (V) {
|
|
9016
|
-
console.error("STT processing failed:", V), !
|
|
9024
|
+
console.error("STT processing failed:", V), !Pe.current && !ct.current && (Pe.current = !0, ae());
|
|
9017
9025
|
} finally {
|
|
9018
9026
|
ee(!1);
|
|
9019
9027
|
}
|
|
@@ -9042,7 +9050,7 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
9042
9050
|
},
|
|
9043
9051
|
[r, at, l]
|
|
9044
9052
|
), Ki = () => {
|
|
9045
|
-
const { phase: V } =
|
|
9053
|
+
const { phase: V } = Fe;
|
|
9046
9054
|
switch (V) {
|
|
9047
9055
|
case $.IDLE:
|
|
9048
9056
|
return /* @__PURE__ */ m("div", { className: "iw-text-center iw-flex iw-flex-col iw-items-center iw-justify-center iw-gap-2 iw-h-full", children: [
|
|
@@ -9064,12 +9072,12 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
9064
9072
|
)
|
|
9065
9073
|
] }) : /* @__PURE__ */ c(y2, {});
|
|
9066
9074
|
case $.READING_QUESTION:
|
|
9067
|
-
return /* @__PURE__ */ c(v2, { ttsError:
|
|
9075
|
+
return /* @__PURE__ */ c(v2, { ttsError: De });
|
|
9068
9076
|
case $.THINKING:
|
|
9069
9077
|
return /* @__PURE__ */ c(
|
|
9070
9078
|
x2,
|
|
9071
9079
|
{
|
|
9072
|
-
state:
|
|
9080
|
+
state: Fe,
|
|
9073
9081
|
thinkingTime: z,
|
|
9074
9082
|
nextPhase: ae
|
|
9075
9083
|
}
|
|
@@ -9078,7 +9086,7 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
9078
9086
|
return /* @__PURE__ */ c(
|
|
9079
9087
|
p2,
|
|
9080
9088
|
{
|
|
9081
|
-
state:
|
|
9089
|
+
state: Fe,
|
|
9082
9090
|
answeringTime: X,
|
|
9083
9091
|
nextPhase: Hi,
|
|
9084
9092
|
sttError: ci,
|
|
@@ -9108,8 +9116,8 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
9108
9116
|
title: e,
|
|
9109
9117
|
brandName: t,
|
|
9110
9118
|
brandLogo: i,
|
|
9111
|
-
totalDuration:
|
|
9112
|
-
elapsedTime:
|
|
9119
|
+
totalDuration: k,
|
|
9120
|
+
elapsedTime: Fe.totalTimeElapsed,
|
|
9113
9121
|
onExit: () => {
|
|
9114
9122
|
var V;
|
|
9115
9123
|
return (V = g.current) == null ? void 0 : V.exitFullScreenIntentionally().then(() => qi());
|
|
@@ -9122,21 +9130,21 @@ const x2 = ({ state: e, thinkingTime: t, nextPhase: i }) => /* @__PURE__ */ m("d
|
|
|
9122
9130
|
brandName: t,
|
|
9123
9131
|
brandLogo: i,
|
|
9124
9132
|
currentQuestion: y,
|
|
9125
|
-
state:
|
|
9126
|
-
phase:
|
|
9133
|
+
state: Fe,
|
|
9134
|
+
phase: Fe.phase,
|
|
9127
9135
|
className: s,
|
|
9128
9136
|
interviewId: r,
|
|
9129
|
-
interview_duration:
|
|
9137
|
+
interview_duration: k,
|
|
9130
9138
|
videoFeedRef: a,
|
|
9131
9139
|
lastSubmittedAnswer: _,
|
|
9132
|
-
onNextPhase:
|
|
9140
|
+
onNextPhase: Fe.phase === $.ANSWERING ? Hi : ae,
|
|
9133
9141
|
answerText: p,
|
|
9134
9142
|
onAnswerChange: (V) => {
|
|
9135
9143
|
const W = V.target.value;
|
|
9136
|
-
v(W),
|
|
9144
|
+
v(W), T.current = W;
|
|
9137
9145
|
},
|
|
9138
9146
|
editingTime: O,
|
|
9139
|
-
disableSubmitButton:
|
|
9147
|
+
disableSubmitButton: Fe.phase === $.ANSWERING && U,
|
|
9140
9148
|
children: Ki()
|
|
9141
9149
|
}
|
|
9142
9150
|
)
|