aicodeman 0.9.1 → 0.9.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/web/public/api-client.3adebdc2.js.gz +0 -0
- package/dist/web/public/app.c860ea08.js.gz +0 -0
- package/dist/web/public/constants.cb6426c4.js.gz +0 -0
- package/dist/web/public/gesture/gesture-codeman.js +523 -436
- package/dist/web/public/image-input.7cade6a8.js.gz +0 -0
- package/dist/web/public/index.html.gz +0 -0
- package/dist/web/public/input-cjk.88082175.js.gz +0 -0
- package/dist/web/public/keyboard-accessory.cdfd8c04.js.gz +0 -0
- package/dist/web/public/mobile-handlers.1e2a8ef8.js.gz +0 -0
- package/dist/web/public/mobile.26dc30d6.css.gz +0 -0
- package/dist/web/public/notification-manager.9c984ac2.js.gz +0 -0
- package/dist/web/public/orchestrator-panel.js.gz +0 -0
- package/dist/web/public/panels-ui.3e304caf.js.gz +0 -0
- package/dist/web/public/ralph-panel.61076370.js.gz +0 -0
- package/dist/web/public/ralph-wizard.52d533d2.js.gz +0 -0
- package/dist/web/public/respawn-ui.5377f958.js.gz +0 -0
- package/dist/web/public/session-ui.3e0cf024.js.gz +0 -0
- package/dist/web/public/settings-ui.c06be9c3.js.gz +0 -0
- package/dist/web/public/styles.e87cb785.css.gz +0 -0
- package/dist/web/public/subagent-windows.a366a4ad.js.gz +0 -0
- package/dist/web/public/sw.js.gz +0 -0
- package/dist/web/public/terminal-ui.37caa926.js.gz +0 -0
- package/dist/web/public/upload.html.gz +0 -0
- package/dist/web/public/vendor/marked.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-fit.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-unicode11.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-addon-webgl.min.js.gz +0 -0
- package/dist/web/public/vendor/xterm-zerolag-input.137ad9f0.js.gz +0 -0
- package/dist/web/public/vendor/xterm.css.gz +0 -0
- package/dist/web/public/vendor/xterm.min.js.gz +0 -0
- package/dist/web/public/voice-input.085e9e73.js.gz +0 -0
- package/package.json +2 -1
|
@@ -63,7 +63,7 @@ var g = u && u[610401301];
|
|
|
63
63
|
h = null != g && g;
|
|
64
64
|
var m = t.navigator;
|
|
65
65
|
function y(t2) {
|
|
66
|
-
return !!h && (!!p && p.brands.some(({ brand: e2 }) => e2 && -1 != e2.indexOf(t2)));
|
|
66
|
+
return !!h && (!!p && p.brands.some((({ brand: e2 }) => e2 && -1 != e2.indexOf(t2))));
|
|
67
67
|
}
|
|
68
68
|
function _(e2) {
|
|
69
69
|
var n2;
|
|
@@ -90,7 +90,7 @@ function k(t2) {
|
|
|
90
90
|
n2 % 3 ? n2 = Math.floor(n2) : -1 != "=.".indexOf(t2[e2 - 1]) && (n2 = -1 != "=.".indexOf(t2[e2 - 2]) ? n2 - 2 : n2 - 1);
|
|
91
91
|
const r2 = new Uint8Array(n2);
|
|
92
92
|
let i2 = 0;
|
|
93
|
-
return function(t3, e3) {
|
|
93
|
+
return (function(t3, e3) {
|
|
94
94
|
function n3(e4) {
|
|
95
95
|
for (; r3 < t3.length; ) {
|
|
96
96
|
const e5 = t3.charAt(r3++), n4 = b[e5];
|
|
@@ -106,9 +106,9 @@ function k(t2) {
|
|
|
106
106
|
if (64 === s2 && -1 === t4) break;
|
|
107
107
|
e3(t4 << 2 | r4 >> 4), 64 != i3 && (e3(r4 << 4 & 240 | i3 >> 2), 64 != s2 && e3(i3 << 6 & 192 | s2));
|
|
108
108
|
}
|
|
109
|
-
}(t2, function(t3) {
|
|
109
|
+
})(t2, (function(t3) {
|
|
110
110
|
r2[i2++] = t3;
|
|
111
|
-
}), i2 !== n2 ? r2.subarray(0, i2) : r2;
|
|
111
|
+
})), i2 !== n2 ? r2.subarray(0, i2) : r2;
|
|
112
112
|
}
|
|
113
113
|
function S() {
|
|
114
114
|
if (!b) {
|
|
@@ -190,16 +190,16 @@ function V(t2, e2) {
|
|
|
190
190
|
function X(t2) {
|
|
191
191
|
return V(t2 = Error(t2), "warning"), t2;
|
|
192
192
|
}
|
|
193
|
-
var H = "function" == typeof Symbol && "symbol" == typeof Symbol();
|
|
193
|
+
var H = "function" == typeof Symbol && "symbol" == typeof /* @__PURE__ */ Symbol();
|
|
194
194
|
var W = /* @__PURE__ */ new Set();
|
|
195
195
|
function z(t2, e2, n2 = false, r2 = false) {
|
|
196
|
-
return t2 = "function" == typeof Symbol && "symbol" == typeof Symbol() ? r2 && Symbol.for && t2 ? Symbol.for(t2) : null != t2 ? Symbol(t2) : Symbol() : e2, n2 && W.add(t2), t2;
|
|
196
|
+
return t2 = "function" == typeof Symbol && "symbol" == typeof /* @__PURE__ */ Symbol() ? r2 && Symbol.for && t2 ? Symbol.for(t2) : null != t2 ? Symbol(t2) : /* @__PURE__ */ Symbol() : e2, n2 && W.add(t2), t2;
|
|
197
197
|
}
|
|
198
198
|
var K = z("jas", void 0, true, true);
|
|
199
199
|
var Y = z(void 0, "0di");
|
|
200
200
|
var $ = z(void 0, "2ex");
|
|
201
201
|
var q = z(void 0, "1oa", true);
|
|
202
|
-
var J = z(void 0, Symbol(), true);
|
|
202
|
+
var J = z(void 0, /* @__PURE__ */ Symbol(), true);
|
|
203
203
|
var Z = H ? K : "Ga";
|
|
204
204
|
var Q = { Ga: { value: 0, configurable: true, writable: true, enumerable: false } };
|
|
205
205
|
var tt = Object.defineProperties;
|
|
@@ -274,11 +274,11 @@ var vt = Object.freeze({});
|
|
|
274
274
|
function Et(t2) {
|
|
275
275
|
return t2.Qa = true, t2;
|
|
276
276
|
}
|
|
277
|
-
var wt = Et((t2) => "number" == typeof t2);
|
|
278
|
-
var Tt = Et((t2) => "string" == typeof t2);
|
|
279
|
-
var At = Et((t2) => "boolean" == typeof t2);
|
|
277
|
+
var wt = Et(((t2) => "number" == typeof t2));
|
|
278
|
+
var Tt = Et(((t2) => "string" == typeof t2));
|
|
279
|
+
var At = Et(((t2) => "boolean" == typeof t2));
|
|
280
280
|
var bt = "function" == typeof t.BigInt && "bigint" == typeof t.BigInt(0);
|
|
281
|
-
var kt = Et((t2) => bt ? t2 >= xt && t2 <= Rt : "-" === t2[0] ? Ft(t2, St) : Ft(t2, Lt));
|
|
281
|
+
var kt = Et(((t2) => bt ? t2 >= xt && t2 <= Rt : "-" === t2[0] ? Ft(t2, St) : Ft(t2, Lt)));
|
|
282
282
|
var St = Number.MIN_SAFE_INTEGER.toString();
|
|
283
283
|
var xt = bt ? BigInt(Number.MIN_SAFE_INTEGER) : void 0;
|
|
284
284
|
var Lt = Number.MAX_SAFE_INTEGER.toString();
|
|
@@ -411,14 +411,14 @@ function se(t2) {
|
|
|
411
411
|
if ("bigint" === e2) return String(Wt(64, t2));
|
|
412
412
|
if (Zt(t2)) {
|
|
413
413
|
if ("string" === e2) return e2 = Yt(Number(t2)), zt(e2) && e2 >= 0 ? t2 = String(e2) : (-1 !== (e2 = t2.indexOf(".")) && (t2 = t2.substring(0, e2)), ee(t2) || (Vt(t2), t2 = Gt(Pt, Ot))), t2;
|
|
414
|
-
if ("number" === e2) return (t2 = Yt(t2)) >= 0 && zt(t2) ? t2 : function(t3) {
|
|
414
|
+
if ("number" === e2) return (t2 = Yt(t2)) >= 0 && zt(t2) ? t2 : (function(t3) {
|
|
415
415
|
if (t3 < 0) {
|
|
416
416
|
Ut(t3);
|
|
417
417
|
var e3 = Gt(Pt, Ot);
|
|
418
418
|
return t3 = Number(e3), zt(t3) ? t3 : e3;
|
|
419
419
|
}
|
|
420
420
|
return ee(e3 = String(t3)) ? e3 : (Ut(t3), Nt(Pt, Ot));
|
|
421
|
-
}(t2);
|
|
421
|
+
})(t2);
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
424
|
function oe(t2) {
|
|
@@ -459,7 +459,7 @@ function ue(t2, e2, n2) {
|
|
|
459
459
|
return "string" == typeof (n2 = null == (t2 = e2) ? n2 ? 0 : void 0 : t2) && zt(e2 = +n2) ? e2 : n2;
|
|
460
460
|
}
|
|
461
461
|
var le = {};
|
|
462
|
-
var de = function() {
|
|
462
|
+
var de = (function() {
|
|
463
463
|
try {
|
|
464
464
|
return w(new class extends Map {
|
|
465
465
|
constructor() {
|
|
@@ -469,7 +469,7 @@ var de = function() {
|
|
|
469
469
|
} catch {
|
|
470
470
|
return true;
|
|
471
471
|
}
|
|
472
|
-
}();
|
|
472
|
+
})();
|
|
473
473
|
var fe = class {
|
|
474
474
|
constructor() {
|
|
475
475
|
this.g = /* @__PURE__ */ new Map();
|
|
@@ -553,9 +553,9 @@ var ye = class extends pe {
|
|
|
553
553
|
return new yt(t2, ye.prototype.get, this);
|
|
554
554
|
}
|
|
555
555
|
forEach(t2, e2) {
|
|
556
|
-
super.forEach((n2, r2) => {
|
|
556
|
+
super.forEach(((n2, r2) => {
|
|
557
557
|
t2.call(e2, this.get(r2), r2, this);
|
|
558
|
-
});
|
|
558
|
+
}));
|
|
559
559
|
}
|
|
560
560
|
set(t2, e2) {
|
|
561
561
|
return me(this), null == (t2 = this.R(t2, true, false)) ? this : null == e2 ? (super.delete(t2), this) : super.set(t2, this.Y(e2, true, true, this.S, false, this.L));
|
|
@@ -621,7 +621,7 @@ function xe(t2) {
|
|
|
621
621
|
return ke(t2, Le, void 0, void 0, false);
|
|
622
622
|
}
|
|
623
623
|
function Le(t2) {
|
|
624
|
-
return t2.W === ht ? t2.toJSON() : t2 instanceof ye ? t2.na(xe) : function(t3) {
|
|
624
|
+
return t2.W === ht ? t2.toJSON() : t2 instanceof ye ? t2.na(xe) : (function(t3) {
|
|
625
625
|
switch (typeof t3) {
|
|
626
626
|
case "number":
|
|
627
627
|
return isFinite(t3) ? t3 : String(t3);
|
|
@@ -642,7 +642,7 @@ function Le(t2) {
|
|
|
642
642
|
}
|
|
643
643
|
}
|
|
644
644
|
return t3;
|
|
645
|
-
}(t2);
|
|
645
|
+
})(t2);
|
|
646
646
|
}
|
|
647
647
|
function Re(t2) {
|
|
648
648
|
return Se(t2, Le, void 0, void 0, false);
|
|
@@ -688,7 +688,7 @@ function Me(t2, e2, n2 = st) {
|
|
|
688
688
|
}
|
|
689
689
|
function Pe(t2, e2, n2) {
|
|
690
690
|
const r2 = n2 || 2 & e2 ? st : it, i2 = !!(32 & e2);
|
|
691
|
-
return t2 = function(t3, e3, n3) {
|
|
691
|
+
return t2 = (function(t3, e3, n3) {
|
|
692
692
|
const r3 = at(t3);
|
|
693
693
|
var i3 = r3.length;
|
|
694
694
|
const s2 = 256 & e3 ? r3[i3 - 1] : void 0;
|
|
@@ -698,7 +698,7 @@ function Pe(t2, e2, n2) {
|
|
|
698
698
|
for (const t4 in s2) e3[t4] = n3(s2[t4]);
|
|
699
699
|
}
|
|
700
700
|
return (t3 = _t(t3)) && (r3[J] = at(t3)), r3;
|
|
701
|
-
}(t2, e2, (t3) => Me(t3, i2, r2)), et(t2, 32 | (n2 ? 2 : 0)), t2;
|
|
701
|
+
})(t2, e2, ((t3) => Me(t3, i2, r2))), et(t2, 32 | (n2 ? 2 : 0)), t2;
|
|
702
702
|
}
|
|
703
703
|
function Oe(t2) {
|
|
704
704
|
const e2 = t2.u, n2 = 0 | e2[Z];
|
|
@@ -711,11 +711,11 @@ function Ue(e2, n2, r2, i2) {
|
|
|
711
711
|
if (-1 === r2) return null;
|
|
712
712
|
var s2 = r2 + (512 & n2 ? 0 : -1);
|
|
713
713
|
const o2 = e2.length - 1;
|
|
714
|
-
return s2 >= o2 && 256 & n2 ? e2[o2][r2] : i2 && 256 & n2 && null != (n2 = e2[o2][r2]) ? (null != e2[s2] && null != $ && ((s2 = (e2 = G ?? (G = {}))[$] || 0) >= 4 || (e2[$] = s2 + 1, V(e2 = Error(), "incident"), function(e3) {
|
|
715
|
-
t.setTimeout(() => {
|
|
714
|
+
return s2 >= o2 && 256 & n2 ? e2[o2][r2] : i2 && 256 & n2 && null != (n2 = e2[o2][r2]) ? (null != e2[s2] && null != $ && ((s2 = (e2 = G ?? (G = {}))[$] || 0) >= 4 || (e2[$] = s2 + 1, V(e2 = Error(), "incident"), (function(e3) {
|
|
715
|
+
t.setTimeout((() => {
|
|
716
716
|
throw e3;
|
|
717
|
-
}, 0);
|
|
718
|
-
}(e2))), n2) : s2 <= o2 ? e2[s2] : void 0;
|
|
717
|
+
}), 0);
|
|
718
|
+
})(e2))), n2) : s2 <= o2 ? e2[s2] : void 0;
|
|
719
719
|
}
|
|
720
720
|
function De(t2, e2, n2) {
|
|
721
721
|
const r2 = t2.u;
|
|
@@ -1249,22 +1249,22 @@ function vr(t2, e2) {
|
|
|
1249
1249
|
function Er(t2, e2, n2, r2, i2) {
|
|
1250
1250
|
ar(t2, n2, Ir(e2, r2), i2);
|
|
1251
1251
|
}
|
|
1252
|
-
var wr = vr(function(t2, e2, n2, r2, i2) {
|
|
1252
|
+
var wr = vr((function(t2, e2, n2, r2, i2) {
|
|
1253
1253
|
return 2 === t2.h && (Un(t2, Qe(e2, r2, n2), i2), true);
|
|
1254
|
-
}, Er);
|
|
1255
|
-
var Tr = vr(function(t2, e2, n2, r2, i2) {
|
|
1254
|
+
}), Er);
|
|
1255
|
+
var Tr = vr((function(t2, e2, n2, r2, i2) {
|
|
1256
1256
|
return 2 === t2.h && (Un(t2, Qe(e2, r2, n2, true), i2), true);
|
|
1257
|
-
}, Er);
|
|
1258
|
-
var Ar = Symbol();
|
|
1259
|
-
var br = Symbol();
|
|
1260
|
-
var kr = Symbol();
|
|
1261
|
-
var Sr = Symbol();
|
|
1257
|
+
}), Er);
|
|
1258
|
+
var Ar = /* @__PURE__ */ Symbol();
|
|
1259
|
+
var br = /* @__PURE__ */ Symbol();
|
|
1260
|
+
var kr = /* @__PURE__ */ Symbol();
|
|
1261
|
+
var Sr = /* @__PURE__ */ Symbol();
|
|
1262
1262
|
var xr;
|
|
1263
1263
|
var Lr;
|
|
1264
1264
|
function Rr(t2, e2, n2, r2) {
|
|
1265
1265
|
var i2 = r2[t2];
|
|
1266
1266
|
if (i2) return i2;
|
|
1267
|
-
(i2 = {}).Pa = r2, i2.V = function(t3) {
|
|
1267
|
+
(i2 = {}).Pa = r2, i2.V = (function(t3) {
|
|
1268
1268
|
switch (typeof t3) {
|
|
1269
1269
|
case "boolean":
|
|
1270
1270
|
return Te || (Te = [0, void 0, true]);
|
|
@@ -1275,7 +1275,7 @@ function Rr(t2, e2, n2, r2) {
|
|
|
1275
1275
|
case "object":
|
|
1276
1276
|
return t3;
|
|
1277
1277
|
}
|
|
1278
|
-
}(r2[0]);
|
|
1278
|
+
})(r2[0]);
|
|
1279
1279
|
var s2 = r2[1];
|
|
1280
1280
|
let o2 = 1;
|
|
1281
1281
|
s2 && s2.constructor === Object && (i2.ga = s2, "function" == typeof (s2 = r2[++o2]) && (i2.la = true, xr ?? (xr = s2), Lr ?? (Lr = r2[o2 + 1]), s2 = r2[o2 += 2]));
|
|
@@ -1401,19 +1401,19 @@ function Xr(t2, e2, n2) {
|
|
|
1401
1401
|
function Hr(t2, e2, n2) {
|
|
1402
1402
|
Ne(t2, 0 | t2[Z], e2, n2);
|
|
1403
1403
|
}
|
|
1404
|
-
var Wr = vr(function(t2, e2, n2, r2, i2) {
|
|
1404
|
+
var Wr = vr((function(t2, e2, n2, r2, i2) {
|
|
1405
1405
|
return 2 === t2.h && (t2 = Un(t2, Fe([void 0, void 0], r2, true), i2), mt(r2 = 0 | e2[Z]), (i2 = Ue(e2, r2, n2)) instanceof ye ? 0 != (2 & i2.L) ? ((i2 = i2.X()).push(t2), Ne(e2, r2, n2, i2)) : i2.Na(t2) : Array.isArray(i2) ? (2 & (0 | i2[Z]) && Ne(e2, r2, n2, i2 = ze(i2)), i2.push(t2)) : Ne(e2, r2, n2, [t2]), true);
|
|
1406
|
-
}, function(t2, e2, n2, r2, i2) {
|
|
1407
|
-
if (e2 instanceof ye) e2.forEach((e3, s2) => {
|
|
1406
|
+
}), (function(t2, e2, n2, r2, i2) {
|
|
1407
|
+
if (e2 instanceof ye) e2.forEach(((e3, s2) => {
|
|
1408
1408
|
ar(t2, n2, Fe([s2, e3], r2, false), i2);
|
|
1409
|
-
});
|
|
1409
|
+
}));
|
|
1410
1410
|
else if (Array.isArray(e2)) for (let s2 = 0; s2 < e2.length; s2++) {
|
|
1411
1411
|
const o2 = e2[s2];
|
|
1412
1412
|
Array.isArray(o2) && ar(t2, n2, Fe(o2, r2, false), i2);
|
|
1413
1413
|
}
|
|
1414
|
-
});
|
|
1414
|
+
}));
|
|
1415
1415
|
function zr(t2, e2, n2) {
|
|
1416
|
-
if (e2 = function(t3) {
|
|
1416
|
+
if (e2 = (function(t3) {
|
|
1417
1417
|
if (null == t3) return t3;
|
|
1418
1418
|
const e3 = typeof t3;
|
|
1419
1419
|
if ("bigint" === e3) return String(Ht(64, t3));
|
|
@@ -1421,7 +1421,7 @@ function zr(t2, e2, n2) {
|
|
|
1421
1421
|
if ("string" === e3) return re(t3);
|
|
1422
1422
|
if ("number" === e3) return ne(t3);
|
|
1423
1423
|
}
|
|
1424
|
-
}(e2), null != e2) {
|
|
1424
|
+
})(e2), null != e2) {
|
|
1425
1425
|
if ("string" == typeof e2) $n(e2);
|
|
1426
1426
|
if (null != e2) switch (rr(t2, n2, 0), typeof e2) {
|
|
1427
1427
|
case "number":
|
|
@@ -1453,7 +1453,7 @@ function Jr(t2, e2, n2) {
|
|
|
1453
1453
|
function Zr(t2, e2, n2) {
|
|
1454
1454
|
return (5 === t2.h || 2 === t2.h) && (e2 = Ye(e2, 0 | e2[Z], n2, false, false), 2 == t2.h ? Bn(t2, xn, e2) : e2.push(xn(t2.g)), true);
|
|
1455
1455
|
}
|
|
1456
|
-
var Qr = Vr(function(t2, e2, n2) {
|
|
1456
|
+
var Qr = Vr((function(t2, e2, n2) {
|
|
1457
1457
|
if (1 !== t2.h) return false;
|
|
1458
1458
|
var r2 = t2.g;
|
|
1459
1459
|
t2 = Sn(r2);
|
|
@@ -1461,35 +1461,35 @@ var Qr = Vr(function(t2, e2, n2) {
|
|
|
1461
1461
|
r2 = 2 * (i2 >> 31) + 1;
|
|
1462
1462
|
const s2 = i2 >>> 20 & 2047;
|
|
1463
1463
|
return t2 = 4294967296 * (1048575 & i2) + t2, Hr(e2, n2, 2047 == s2 ? t2 ? NaN : r2 * (1 / 0) : 0 == s2 ? 5e-324 * r2 * t2 : r2 * Math.pow(2, s2 - 1075) * (t2 + 4503599627370496)), true;
|
|
1464
|
-
}, function(t2, e2, n2) {
|
|
1464
|
+
}), (function(t2, e2, n2) {
|
|
1465
1465
|
null != (e2 = $t(e2)) && (rr(t2, n2, 1), t2 = t2.g, (n2 = Mt || (Mt = new DataView(new ArrayBuffer(8)))).setFloat64(0, +e2, true), Pt = n2.getUint32(0, true), Ot = n2.getUint32(4, true), er(t2, Pt), er(t2, Ot));
|
|
1466
|
-
}, cr());
|
|
1467
|
-
var ti = Vr(function(t2, e2, n2) {
|
|
1466
|
+
}), cr());
|
|
1467
|
+
var ti = Vr((function(t2, e2, n2) {
|
|
1468
1468
|
return 5 === t2.h && (Hr(e2, n2, xn(t2.g)), true);
|
|
1469
|
-
}, function(t2, e2, n2) {
|
|
1469
|
+
}), (function(t2, e2, n2) {
|
|
1470
1470
|
null != (e2 = $t(e2)) && (rr(t2, n2, 5), t2 = t2.g, Dt(e2), er(t2, Pt));
|
|
1471
|
-
}, gr);
|
|
1472
|
-
var ei = Xr(Zr, function(t2, e2, n2) {
|
|
1471
|
+
}), gr);
|
|
1472
|
+
var ei = Xr(Zr, (function(t2, e2, n2) {
|
|
1473
1473
|
if (null != (e2 = jr($t, e2))) for (let o2 = 0; o2 < e2.length; o2++) {
|
|
1474
1474
|
var r2 = t2, i2 = n2, s2 = e2[o2];
|
|
1475
1475
|
null != s2 && (rr(r2, i2, 5), r2 = r2.g, Dt(s2), er(r2, Pt));
|
|
1476
1476
|
}
|
|
1477
|
-
}, gr);
|
|
1478
|
-
var ni = Xr(Zr, function(t2, e2, n2) {
|
|
1477
|
+
}), gr);
|
|
1478
|
+
var ni = Xr(Zr, (function(t2, e2, n2) {
|
|
1479
1479
|
if (null != (e2 = jr($t, e2)) && e2.length) {
|
|
1480
1480
|
rr(t2, n2, 2), Qn(t2.g, 4 * e2.length);
|
|
1481
1481
|
for (let r2 = 0; r2 < e2.length; r2++) n2 = t2.g, Dt(e2[r2]), er(n2, Pt);
|
|
1482
1482
|
}
|
|
1483
|
-
}, gr);
|
|
1484
|
-
var ri = Vr(function(t2, e2, n2) {
|
|
1483
|
+
}), gr);
|
|
1484
|
+
var ri = Vr((function(t2, e2, n2) {
|
|
1485
1485
|
return 0 === t2.h && (Hr(e2, n2, Tn(t2.g, Bt)), true);
|
|
1486
|
-
}, zr, pr);
|
|
1487
|
-
var ii = Vr(function(t2, e2, n2) {
|
|
1486
|
+
}), zr, pr);
|
|
1487
|
+
var ii = Vr((function(t2, e2, n2) {
|
|
1488
1488
|
return 0 === t2.h && (Hr(e2, n2, 0 === (t2 = Tn(t2.g, Bt)) ? void 0 : t2), true);
|
|
1489
|
-
}, zr, pr);
|
|
1490
|
-
var si = Vr(function(t2, e2, n2) {
|
|
1489
|
+
}), zr, pr);
|
|
1490
|
+
var si = Vr((function(t2, e2, n2) {
|
|
1491
1491
|
return 0 === t2.h && (Hr(e2, n2, Tn(t2.g, Nt)), true);
|
|
1492
|
-
}, function(t2, e2, n2) {
|
|
1492
|
+
}), (function(t2, e2, n2) {
|
|
1493
1493
|
if (null != (e2 = se(e2))) {
|
|
1494
1494
|
if ("string" == typeof e2) zn(e2);
|
|
1495
1495
|
if (null != e2) switch (rr(t2, n2, 0), typeof e2) {
|
|
@@ -1503,73 +1503,73 @@ var si = Vr(function(t2, e2, n2) {
|
|
|
1503
1503
|
n2 = zn(e2), Zn(t2.g, n2.h, n2.g);
|
|
1504
1504
|
}
|
|
1505
1505
|
}
|
|
1506
|
-
}, cr());
|
|
1507
|
-
var oi = Vr(function(t2, e2, n2) {
|
|
1506
|
+
}), cr());
|
|
1507
|
+
var oi = Vr((function(t2, e2, n2) {
|
|
1508
1508
|
return 0 === t2.h && (Hr(e2, n2, bn(t2.g)), true);
|
|
1509
|
-
}, Kr, dr);
|
|
1510
|
-
var ai = Xr(function(t2, e2, n2) {
|
|
1509
|
+
}), Kr, dr);
|
|
1510
|
+
var ai = Xr((function(t2, e2, n2) {
|
|
1511
1511
|
return (0 === t2.h || 2 === t2.h) && (e2 = Ye(e2, 0 | e2[Z], n2, false, false), 2 == t2.h ? Bn(t2, bn, e2) : e2.push(bn(t2.g)), true);
|
|
1512
|
-
}, function(t2, e2, n2) {
|
|
1512
|
+
}), (function(t2, e2, n2) {
|
|
1513
1513
|
if (null != (e2 = jr(Qt, e2)) && e2.length) {
|
|
1514
1514
|
n2 = ir(t2, n2);
|
|
1515
1515
|
for (let n3 = 0; n3 < e2.length; n3++) tr(t2.g, e2[n3]);
|
|
1516
1516
|
sr(t2, n2);
|
|
1517
1517
|
}
|
|
1518
|
-
}, dr);
|
|
1519
|
-
var ci = Vr(function(t2, e2, n2) {
|
|
1518
|
+
}), dr);
|
|
1519
|
+
var ci = Vr((function(t2, e2, n2) {
|
|
1520
1520
|
return 0 === t2.h && (Hr(e2, n2, 0 === (t2 = bn(t2.g)) ? void 0 : t2), true);
|
|
1521
|
-
}, Kr, dr);
|
|
1522
|
-
var hi = Vr(function(t2, e2, n2) {
|
|
1521
|
+
}), Kr, dr);
|
|
1522
|
+
var hi = Vr((function(t2, e2, n2) {
|
|
1523
1523
|
return 0 === t2.h && (Hr(e2, n2, An(t2.g)), true);
|
|
1524
|
-
}, Yr, ur);
|
|
1525
|
-
var ui = Vr(function(t2, e2, n2) {
|
|
1524
|
+
}), Yr, ur);
|
|
1525
|
+
var ui = Vr((function(t2, e2, n2) {
|
|
1526
1526
|
return 0 === t2.h && (Hr(e2, n2, false === (t2 = An(t2.g)) ? void 0 : t2), true);
|
|
1527
|
-
}, Yr, ur);
|
|
1528
|
-
var li = Xr(function(t2, e2, n2) {
|
|
1527
|
+
}), Yr, ur);
|
|
1528
|
+
var li = Xr((function(t2, e2, n2) {
|
|
1529
1529
|
return 2 === t2.h && (t2 = Dn(t2), Ye(e2, 0 | e2[Z], n2, false).push(t2), true);
|
|
1530
|
-
}, function(t2, e2, n2) {
|
|
1530
|
+
}), (function(t2, e2, n2) {
|
|
1531
1531
|
if (null != (e2 = jr(ce, e2))) for (let o2 = 0; o2 < e2.length; o2++) {
|
|
1532
1532
|
var r2 = t2, i2 = n2, s2 = e2[o2];
|
|
1533
1533
|
null != s2 && or(r2, i2, c(s2));
|
|
1534
1534
|
}
|
|
1535
|
-
}, lr);
|
|
1536
|
-
var di = Vr(function(t2, e2, n2) {
|
|
1535
|
+
}), lr);
|
|
1536
|
+
var di = Vr((function(t2, e2, n2) {
|
|
1537
1537
|
return 2 === t2.h && (Hr(e2, n2, "" === (t2 = Dn(t2)) ? void 0 : t2), true);
|
|
1538
|
-
}, $r, lr);
|
|
1539
|
-
var fi = Vr(function(t2, e2, n2) {
|
|
1538
|
+
}), $r, lr);
|
|
1539
|
+
var fi = Vr((function(t2, e2, n2) {
|
|
1540
1540
|
return 2 === t2.h && (Hr(e2, n2, Dn(t2)), true);
|
|
1541
|
-
}, $r, lr);
|
|
1542
|
-
var pi = function(t2, e2, n2 = hr) {
|
|
1541
|
+
}), $r, lr);
|
|
1542
|
+
var pi = (function(t2, e2, n2 = hr) {
|
|
1543
1543
|
return new _r(t2, e2, n2);
|
|
1544
|
-
}(function(t2, e2, n2, r2, i2) {
|
|
1544
|
+
})((function(t2, e2, n2, r2, i2) {
|
|
1545
1545
|
return 2 === t2.h && (r2 = Fe(void 0, r2, true), Ye(e2, 0 | e2[Z], n2, true).push(r2), Un(t2, r2, i2), true);
|
|
1546
|
-
}, function(t2, e2, n2, r2, i2) {
|
|
1546
|
+
}), (function(t2, e2, n2, r2, i2) {
|
|
1547
1547
|
if (Array.isArray(e2)) for (let s2 = 0; s2 < e2.length; s2++) qr(t2, e2[s2], n2, r2, i2);
|
|
1548
|
-
});
|
|
1549
|
-
var gi = vr(function(t2, e2, n2, r2, i2, s2) {
|
|
1548
|
+
}));
|
|
1549
|
+
var gi = vr((function(t2, e2, n2, r2, i2, s2) {
|
|
1550
1550
|
return 2 === t2.h && (Je(e2, 0 | e2[Z], s2, n2), Un(t2, e2 = Qe(e2, r2, n2), i2), true);
|
|
1551
|
-
}, qr);
|
|
1552
|
-
var mi = Vr(function(t2, e2, n2) {
|
|
1551
|
+
}), qr);
|
|
1552
|
+
var mi = Vr((function(t2, e2, n2) {
|
|
1553
1553
|
return 2 === t2.h && (Hr(e2, n2, Nn(t2)), true);
|
|
1554
|
-
}, Jr, mr);
|
|
1555
|
-
var yi = Xr(function(t2, e2, n2) {
|
|
1554
|
+
}), Jr, mr);
|
|
1555
|
+
var yi = Xr((function(t2, e2, n2) {
|
|
1556
1556
|
return (0 === t2.h || 2 === t2.h) && (e2 = Ye(e2, 0 | e2[Z], n2, false, false), 2 == t2.h ? Bn(t2, kn, e2) : e2.push(kn(t2.g)), true);
|
|
1557
|
-
}, function(t2, e2, n2) {
|
|
1557
|
+
}), (function(t2, e2, n2) {
|
|
1558
1558
|
if (null != (e2 = jr(te, e2))) for (let o2 = 0; o2 < e2.length; o2++) {
|
|
1559
1559
|
var r2 = t2, i2 = n2, s2 = e2[o2];
|
|
1560
1560
|
null != s2 && (rr(r2, i2, 0), Qn(r2.g, s2));
|
|
1561
1561
|
}
|
|
1562
|
-
}, fr);
|
|
1563
|
-
var _i = Vr(function(t2, e2, n2) {
|
|
1562
|
+
}), fr);
|
|
1563
|
+
var _i = Vr((function(t2, e2, n2) {
|
|
1564
1564
|
return 0 === t2.h && (Hr(e2, n2, 0 === (t2 = kn(t2.g)) ? void 0 : t2), true);
|
|
1565
|
-
}, function(t2, e2, n2) {
|
|
1565
|
+
}), (function(t2, e2, n2) {
|
|
1566
1566
|
null != (e2 = te(e2)) && null != e2 && (rr(t2, n2, 0), Qn(t2.g, e2));
|
|
1567
|
-
}, fr);
|
|
1568
|
-
var vi = Vr(function(t2, e2, n2) {
|
|
1567
|
+
}), fr);
|
|
1568
|
+
var vi = Vr((function(t2, e2, n2) {
|
|
1569
1569
|
return 0 === t2.h && (Hr(e2, n2, bn(t2.g)), true);
|
|
1570
|
-
}, function(t2, e2, n2) {
|
|
1570
|
+
}), (function(t2, e2, n2) {
|
|
1571
1571
|
null != (e2 = Qt(e2)) && (e2 = parseInt(e2, 10), rr(t2, n2, 0), tr(t2.g, e2));
|
|
1572
|
-
}, yr);
|
|
1572
|
+
}), yr);
|
|
1573
1573
|
var Ei = class {
|
|
1574
1574
|
constructor(t2, e2) {
|
|
1575
1575
|
this.h = t2, this.g = e2, this.l = en, this.m = sn, this.defaultValue = void 0;
|
|
@@ -1645,9 +1645,9 @@ var bi = class extends Hn {
|
|
|
1645
1645
|
super(t2);
|
|
1646
1646
|
}
|
|
1647
1647
|
};
|
|
1648
|
-
var ki = [0, di, Vr(function(t2, e2, n2) {
|
|
1648
|
+
var ki = [0, di, Vr((function(t2, e2, n2) {
|
|
1649
1649
|
return 2 === t2.h && (Hr(e2, n2, (t2 = Nn(t2)) === U() ? void 0 : t2), true);
|
|
1650
|
-
}, function(t2, e2, n2) {
|
|
1650
|
+
}), (function(t2, e2, n2) {
|
|
1651
1651
|
if (null != e2) {
|
|
1652
1652
|
if (e2 instanceof Hn) {
|
|
1653
1653
|
const r2 = e2.Ra;
|
|
@@ -1656,11 +1656,11 @@ var ki = [0, di, Vr(function(t2, e2, n2) {
|
|
|
1656
1656
|
if (Array.isArray(e2)) return;
|
|
1657
1657
|
}
|
|
1658
1658
|
Jr(t2, e2, n2);
|
|
1659
|
-
}, mr)];
|
|
1659
|
+
}), mr)];
|
|
1660
1660
|
var Si;
|
|
1661
1661
|
var xi = globalThis.trustedTypes;
|
|
1662
1662
|
function Li(t2) {
|
|
1663
|
-
void 0 === Si && (Si = function() {
|
|
1663
|
+
void 0 === Si && (Si = (function() {
|
|
1664
1664
|
let t3 = null;
|
|
1665
1665
|
if (!xi) return t3;
|
|
1666
1666
|
try {
|
|
@@ -1669,7 +1669,7 @@ function Li(t2) {
|
|
|
1669
1669
|
} catch (t4) {
|
|
1670
1670
|
}
|
|
1671
1671
|
return t3;
|
|
1672
|
-
}());
|
|
1672
|
+
})());
|
|
1673
1673
|
var e2 = Si;
|
|
1674
1674
|
return new class {
|
|
1675
1675
|
constructor(t3) {
|
|
@@ -1692,15 +1692,15 @@ var Ii = class extends Hn {
|
|
|
1692
1692
|
super(t2);
|
|
1693
1693
|
}
|
|
1694
1694
|
};
|
|
1695
|
-
var Mi = [0, hi, fi, hi, vi, -1, Xr(function(t2, e2, n2) {
|
|
1695
|
+
var Mi = [0, hi, fi, hi, vi, -1, Xr((function(t2, e2, n2) {
|
|
1696
1696
|
return (0 === t2.h || 2 === t2.h) && (e2 = Ye(e2, 0 | e2[Z], n2, false, false), 2 == t2.h ? Bn(t2, Ln, e2) : e2.push(bn(t2.g)), true);
|
|
1697
|
-
}, function(t2, e2, n2) {
|
|
1697
|
+
}), (function(t2, e2, n2) {
|
|
1698
1698
|
if (null != (e2 = jr(Qt, e2)) && e2.length) {
|
|
1699
1699
|
n2 = ir(t2, n2);
|
|
1700
1700
|
for (let n3 = 0; n3 < e2.length; n3++) tr(t2.g, e2[n3]);
|
|
1701
1701
|
sr(t2, n2);
|
|
1702
1702
|
}
|
|
1703
|
-
}, yr), fi, -1, [0, hi, -1], vi, hi, -1];
|
|
1703
|
+
}), yr), fi, -1, [0, hi, -1], vi, hi, -1];
|
|
1704
1704
|
var Pi = [0, fi, -2];
|
|
1705
1705
|
var Oi = class extends Hn {
|
|
1706
1706
|
constructor(t2) {
|
|
@@ -2040,7 +2040,7 @@ var go = wi(458105876, class extends Hn {
|
|
|
2040
2040
|
var t2 = this.u;
|
|
2041
2041
|
const e2 = 0 | t2[Z];
|
|
2042
2042
|
const n2 = 2 & e2;
|
|
2043
|
-
return t2 = function(t3, e3, n3) {
|
|
2043
|
+
return t2 = (function(t3, e3, n3) {
|
|
2044
2044
|
var r2 = fo;
|
|
2045
2045
|
const i2 = 2 & e3;
|
|
2046
2046
|
let s2 = false;
|
|
@@ -2056,7 +2056,7 @@ var go = wi(458105876, class extends Hn {
|
|
|
2056
2056
|
s2 || (s2 = true, rt(n3));
|
|
2057
2057
|
} else s2 && (s2 = false, n3 = ze(n3));
|
|
2058
2058
|
return s2 || (64 & (0 | n3[Z]) ? n3[Z] &= -33 : 32 & e3 && et(n3, 32)), Ne(t3, e3, 2, r2 = new ye(n3, r2, ue, void 0)), r2;
|
|
2059
|
-
}(t2, e2, Ue(t2, e2, 2)), !n2 && fo && (t2.ra = true), t2;
|
|
2059
|
+
})(t2, e2, Ue(t2, e2, 2)), !n2 && fo && (t2.ra = true), t2;
|
|
2060
2060
|
}
|
|
2061
2061
|
});
|
|
2062
2062
|
Ni[458105876] = [0, po, Wr, [true, ri, [0, fi, -1, li]]];
|
|
@@ -2084,7 +2084,7 @@ function To(t2, e2) {
|
|
|
2084
2084
|
return e2 = e2 ? e2.clone() : new ws(), void 0 !== t2.displayNamesLocale ? De(e2, 1, ae(t2.displayNamesLocale)) : void 0 === t2.displayNamesLocale && De(e2, 1), void 0 !== t2.maxResults ? pn(e2, 2, t2.maxResults) : "maxResults" in t2 && De(e2, 2), void 0 !== t2.scoreThreshold ? gn(e2, 3, t2.scoreThreshold) : "scoreThreshold" in t2 && De(e2, 3), void 0 !== t2.categoryAllowlist ? mn(e2, 4, t2.categoryAllowlist) : "categoryAllowlist" in t2 && De(e2, 4), void 0 !== t2.categoryDenylist ? mn(e2, 5, t2.categoryDenylist) : "categoryDenylist" in t2 && De(e2, 5), e2;
|
|
2085
2085
|
}
|
|
2086
2086
|
function Ao(t2, e2 = -1, n2 = "") {
|
|
2087
|
-
return { categories: t2.map((t3) => ({ index: un(t3, 1) ?? 0 ?? -1, score: dn(t3, 2) ?? 0, categoryName: ln(t3, 3) ?? "" ?? "", displayName: ln(t3, 4) ?? "" ?? "" })), headIndex: e2, headName: n2 };
|
|
2087
|
+
return { categories: t2.map(((t3) => ({ index: un(t3, 1) ?? 0 ?? -1, score: dn(t3, 2) ?? 0, categoryName: ln(t3, 3) ?? "" ?? "", displayName: ln(t3, 4) ?? "" ?? "" }))), headIndex: e2, headName: n2 };
|
|
2088
2088
|
}
|
|
2089
2089
|
function bo(t2) {
|
|
2090
2090
|
var e2 = Ve(t2, 3, $t, je()), n2 = Ve(t2, 2, Qt, je()), r2 = Ve(t2, 1, ce, je()), i2 = Ve(t2, 9, ce, je());
|
|
@@ -2104,7 +2104,7 @@ function So(t2) {
|
|
|
2104
2104
|
return e2;
|
|
2105
2105
|
}
|
|
2106
2106
|
function xo(t2) {
|
|
2107
|
-
return Array.from(t2, (t3) => t3 > 127 ? t3 - 256 : t3);
|
|
2107
|
+
return Array.from(t2, ((t3) => t3 > 127 ? t3 - 256 : t3));
|
|
2108
2108
|
}
|
|
2109
2109
|
function Lo(t2, e2) {
|
|
2110
2110
|
if (t2.length !== e2.length) throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t2.length} vs. ${e2.length}).`);
|
|
@@ -2132,20 +2132,20 @@ var Po = class {
|
|
|
2132
2132
|
};
|
|
2133
2133
|
function Oo() {
|
|
2134
2134
|
var t2 = navigator;
|
|
2135
|
-
return "undefined" != typeof OffscreenCanvas && (!function(t3 = navigator) {
|
|
2135
|
+
return "undefined" != typeof OffscreenCanvas && (!(function(t3 = navigator) {
|
|
2136
2136
|
return (t3 = t3.userAgent).includes("Safari") && !t3.includes("Chrome");
|
|
2137
|
-
}(t2) || !!((t2 = t2.userAgent.match(/Version\/([\d]+).*Safari/)) && t2.length >= 1 && Number(t2[1]) >= 17));
|
|
2137
|
+
})(t2) || !!((t2 = t2.userAgent.match(/Version\/([\d]+).*Safari/)) && t2.length >= 1 && Number(t2[1]) >= 17));
|
|
2138
2138
|
}
|
|
2139
2139
|
async function Co(t2) {
|
|
2140
2140
|
if ("function" != typeof importScripts) {
|
|
2141
2141
|
const e2 = document.createElement("script");
|
|
2142
|
-
return e2.src = t2.toString(), e2.crossOrigin = "anonymous", new Promise((t3, n2) => {
|
|
2143
|
-
e2.addEventListener("load", () => {
|
|
2142
|
+
return e2.src = t2.toString(), e2.crossOrigin = "anonymous", new Promise(((t3, n2) => {
|
|
2143
|
+
e2.addEventListener("load", (() => {
|
|
2144
2144
|
t3();
|
|
2145
|
-
}, false), e2.addEventListener("error", (t4) => {
|
|
2145
|
+
}), false), e2.addEventListener("error", ((t4) => {
|
|
2146
2146
|
n2(t4);
|
|
2147
|
-
}, false), document.body.appendChild(e2);
|
|
2148
|
-
});
|
|
2147
|
+
}), false), document.body.appendChild(e2);
|
|
2148
|
+
}));
|
|
2149
2149
|
}
|
|
2150
2150
|
importScripts(t2.toString());
|
|
2151
2151
|
}
|
|
@@ -2207,7 +2207,7 @@ function Ho(t2) {
|
|
|
2207
2207
|
try {
|
|
2208
2208
|
const e2 = t2.G.length;
|
|
2209
2209
|
if (1 === e2) throw Error(t2.G[0].message);
|
|
2210
|
-
if (e2 > 1) throw Error("Encountered multiple errors: " + t2.G.map((t3) => t3.message).join(", "));
|
|
2210
|
+
if (e2 > 1) throw Error("Encountered multiple errors: " + t2.G.map(((t3) => t3.message)).join(", "));
|
|
2211
2211
|
} finally {
|
|
2212
2212
|
t2.G = [];
|
|
2213
2213
|
}
|
|
@@ -2233,25 +2233,25 @@ var $o = class {
|
|
|
2233
2233
|
const e3 = t2.baseOptions || {};
|
|
2234
2234
|
if (t2.baseOptions?.modelAssetBuffer && t2.baseOptions?.modelAssetPath) throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");
|
|
2235
2235
|
if (!(en(this.baseOptions, xs, 1)?.g() || en(this.baseOptions, xs, 1)?.h() || t2.baseOptions?.modelAssetBuffer || t2.baseOptions?.modelAssetPath)) throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");
|
|
2236
|
-
if (function(t3, e4) {
|
|
2236
|
+
if ((function(t3, e4) {
|
|
2237
2237
|
let n2 = en(t3.baseOptions, ks, 3);
|
|
2238
2238
|
if (!n2) {
|
|
2239
2239
|
var r2 = n2 = new ks(), i2 = new Oi();
|
|
2240
2240
|
on(r2, 4, Ss, i2);
|
|
2241
2241
|
}
|
|
2242
2242
|
"delegate" in e4 && ("GPU" === e4.delegate ? (e4 = n2, r2 = new Ii(), on(e4, 2, Ss, r2)) : (e4 = n2, r2 = new Oi(), on(e4, 4, Ss, r2))), sn(t3.baseOptions, 0, 3, n2);
|
|
2243
|
-
}(this, e3), e3.modelAssetPath) return fetch(e3.modelAssetPath.toString()).then((t3) => {
|
|
2243
|
+
})(this, e3), e3.modelAssetPath) return fetch(e3.modelAssetPath.toString()).then(((t3) => {
|
|
2244
2244
|
if (t3.ok) return t3.arrayBuffer();
|
|
2245
2245
|
throw Error(`Failed to fetch model: ${e3.modelAssetPath} (${t3.status})`);
|
|
2246
|
-
}).then((t3) => {
|
|
2246
|
+
})).then(((t3) => {
|
|
2247
2247
|
try {
|
|
2248
2248
|
this.g.i.FS_unlink("/model.dat");
|
|
2249
2249
|
} catch {
|
|
2250
2250
|
}
|
|
2251
2251
|
this.g.i.FS_createDataFile("/", "model.dat", new Uint8Array(t3), true, false, false), Xo(this, "/model.dat"), this.m(), this.I();
|
|
2252
|
-
});
|
|
2252
|
+
}));
|
|
2253
2253
|
if (e3.modelAssetBuffer instanceof Uint8Array) Xo(this, e3.modelAssetBuffer);
|
|
2254
|
-
else if (e3.modelAssetBuffer) return async function(t3) {
|
|
2254
|
+
else if (e3.modelAssetBuffer) return (async function(t3) {
|
|
2255
2255
|
const e4 = [];
|
|
2256
2256
|
for (var n2 = 0; ; ) {
|
|
2257
2257
|
const { done: r2, value: i2 } = await t3.read();
|
|
@@ -2263,9 +2263,9 @@ var $o = class {
|
|
|
2263
2263
|
t3 = new Uint8Array(n2), n2 = 0;
|
|
2264
2264
|
for (const r2 of e4) t3.set(r2, n2), n2 += r2.length;
|
|
2265
2265
|
return t3;
|
|
2266
|
-
}(e3.modelAssetBuffer).then((t3) => {
|
|
2266
|
+
})(e3.modelAssetBuffer).then(((t3) => {
|
|
2267
2267
|
Xo(this, t3), this.m(), this.I();
|
|
2268
|
-
});
|
|
2268
|
+
}));
|
|
2269
2269
|
}
|
|
2270
2270
|
return this.m(), this.I(), Promise.resolve();
|
|
2271
2271
|
}
|
|
@@ -2273,15 +2273,15 @@ var $o = class {
|
|
|
2273
2273
|
}
|
|
2274
2274
|
da() {
|
|
2275
2275
|
let t2;
|
|
2276
|
-
if (this.g.da((e2) => {
|
|
2276
|
+
if (this.g.da(((e2) => {
|
|
2277
2277
|
t2 = Zi(e2);
|
|
2278
|
-
}), !t2) throw Error("Failed to retrieve CalculatorGraphConfig");
|
|
2278
|
+
})), !t2) throw Error("Failed to retrieve CalculatorGraphConfig");
|
|
2279
2279
|
return t2;
|
|
2280
2280
|
}
|
|
2281
2281
|
setGraph(t2, e2) {
|
|
2282
|
-
this.g.attachErrorListener((t3, e3) => {
|
|
2282
|
+
this.g.attachErrorListener(((t3, e3) => {
|
|
2283
2283
|
this.G.push(Error(e3));
|
|
2284
|
-
}), this.g.La(), this.g.setGraph(t2, e2), this.A = void 0, Ho(this);
|
|
2284
|
+
})), this.g.La(), this.g.setGraph(t2, e2), this.A = void 0, Ho(this);
|
|
2285
2285
|
}
|
|
2286
2286
|
finishProcessing() {
|
|
2287
2287
|
this.g.finishProcessing(), Ho(this);
|
|
@@ -2294,12 +2294,12 @@ function qo(t2, e2) {
|
|
|
2294
2294
|
if (!t2) throw Error(`Unable to obtain required WebGL resource: ${e2}`);
|
|
2295
2295
|
return t2;
|
|
2296
2296
|
}
|
|
2297
|
-
$o.prototype.close = $o.prototype.close, function(e2, n2) {
|
|
2297
|
+
$o.prototype.close = $o.prototype.close, (function(e2, n2) {
|
|
2298
2298
|
e2 = e2.split(".");
|
|
2299
2299
|
var r2, i2 = t;
|
|
2300
2300
|
e2[0] in i2 || void 0 === i2.execScript || i2.execScript("var " + e2[0]);
|
|
2301
2301
|
for (; e2.length && (r2 = e2.shift()); ) e2.length || void 0 === n2 ? i2 = i2[r2] && i2[r2] !== Object.prototype[r2] ? i2[r2] : i2[r2] = {} : i2[r2] = n2;
|
|
2302
|
-
}("TaskRunner", $o);
|
|
2302
|
+
})("TaskRunner", $o);
|
|
2303
2303
|
var Jo = class {
|
|
2304
2304
|
constructor(t2, e2, n2, r2) {
|
|
2305
2305
|
this.g = t2, this.h = e2, this.m = n2, this.l = r2;
|
|
@@ -2409,11 +2409,11 @@ var aa = class extends sa {
|
|
|
2409
2409
|
function ca(t2, e2) {
|
|
2410
2410
|
switch (e2) {
|
|
2411
2411
|
case 0:
|
|
2412
|
-
return t2.g.find((t3) => t3 instanceof Uint8Array);
|
|
2412
|
+
return t2.g.find(((t3) => t3 instanceof Uint8Array));
|
|
2413
2413
|
case 1:
|
|
2414
|
-
return t2.g.find((t3) => t3 instanceof Float32Array);
|
|
2414
|
+
return t2.g.find(((t3) => t3 instanceof Float32Array));
|
|
2415
2415
|
case 2:
|
|
2416
|
-
return t2.g.find((t3) => "undefined" != typeof WebGLTexture && t3 instanceof WebGLTexture);
|
|
2416
|
+
return t2.g.find(((t3) => "undefined" != typeof WebGLTexture && t3 instanceof WebGLTexture));
|
|
2417
2417
|
default:
|
|
2418
2418
|
throw Error(`Type is not supported: ${e2}`);
|
|
2419
2419
|
}
|
|
@@ -2421,7 +2421,7 @@ function ca(t2, e2) {
|
|
|
2421
2421
|
function ha(t2) {
|
|
2422
2422
|
var e2 = ca(t2, 1);
|
|
2423
2423
|
if (!e2) {
|
|
2424
|
-
if (e2 = ca(t2, 0)) e2 = new Float32Array(e2).map((t3) => t3 / 255);
|
|
2424
|
+
if (e2 = ca(t2, 0)) e2 = new Float32Array(e2).map(((t3) => t3 / 255));
|
|
2425
2425
|
else {
|
|
2426
2426
|
e2 = new Float32Array(t2.width * t2.height);
|
|
2427
2427
|
const r2 = la(t2);
|
|
@@ -2484,7 +2484,7 @@ var ya = class {
|
|
|
2484
2484
|
return !!ca(this, 2);
|
|
2485
2485
|
}
|
|
2486
2486
|
ia() {
|
|
2487
|
-
return (e2 = ca(t2 = this, 0)) || (e2 = ha(t2), e2 = new Uint8Array(e2.map((t3) => 255 * t3)), t2.g.push(e2)), e2;
|
|
2487
|
+
return (e2 = ca(t2 = this, 0)) || (e2 = ha(t2), e2 = new Uint8Array(e2.map(((t3) => 255 * t3))), t2.g.push(e2)), e2;
|
|
2488
2488
|
var t2, e2;
|
|
2489
2489
|
}
|
|
2490
2490
|
ha() {
|
|
@@ -2505,9 +2505,9 @@ var ya = class {
|
|
|
2505
2505
|
const t3 = la(this), e3 = fa(this);
|
|
2506
2506
|
t3.activeTexture(t3.TEXTURE1), n2 = na(e3, t3, this.m ? t3.LINEAR : t3.NEAREST), t3.bindTexture(t3.TEXTURE_2D, n2);
|
|
2507
2507
|
const r2 = da(this);
|
|
2508
|
-
t3.texImage2D(t3.TEXTURE_2D, 0, r2, this.width, this.height, 0, t3.RED, t3.FLOAT, null), t3.bindTexture(t3.TEXTURE_2D, null), ra(e3, t3, n2), ea(e3, t3, false, () => {
|
|
2508
|
+
t3.texImage2D(t3.TEXTURE_2D, 0, r2, this.width, this.height, 0, t3.RED, t3.FLOAT, null), t3.bindTexture(t3.TEXTURE_2D, null), ra(e3, t3, n2), ea(e3, t3, false, (() => {
|
|
2509
2509
|
pa(this), t3.clearColor(0, 0, 0, 0), t3.clear(t3.COLOR_BUFFER_BIT), t3.drawArrays(t3.TRIANGLE_FAN, 0, 4), ga(this);
|
|
2510
|
-
}), ia(e3), ga(this);
|
|
2510
|
+
})), ia(e3), ga(this);
|
|
2511
2511
|
}
|
|
2512
2512
|
}
|
|
2513
2513
|
t2.push(n2);
|
|
@@ -2548,13 +2548,13 @@ function ka(t2, e2, n2) {
|
|
|
2548
2548
|
}
|
|
2549
2549
|
}
|
|
2550
2550
|
function Sa(t2, e2, n2, r2) {
|
|
2551
|
-
const i2 = function(t3) {
|
|
2551
|
+
const i2 = (function(t3) {
|
|
2552
2552
|
return t3.g || (t3.g = new oa()), t3.g;
|
|
2553
|
-
}(t2), s2 = ba(t2), o2 = Array.isArray(n2) ? new ImageData(new Uint8ClampedArray(n2), 1, 1) : n2;
|
|
2554
|
-
ea(i2, s2, true, () => {
|
|
2555
|
-
!function(t4, e3, n3, r3) {
|
|
2553
|
+
})(t2), s2 = ba(t2), o2 = Array.isArray(n2) ? new ImageData(new Uint8ClampedArray(n2), 1, 1) : n2;
|
|
2554
|
+
ea(i2, s2, true, (() => {
|
|
2555
|
+
!(function(t4, e3, n3, r3) {
|
|
2556
2556
|
const i3 = t4.g;
|
|
2557
|
-
if (i3.activeTexture(i3.TEXTURE0), i3.bindTexture(i3.TEXTURE_2D, e3), i3.activeTexture(i3.TEXTURE1), i3.bindTexture(i3.TEXTURE_2D, t4.B), i3.texImage2D(i3.TEXTURE_2D, 0, i3.RGBA, i3.RGBA, i3.UNSIGNED_BYTE, n3), t4.H && function(t5, e4) {
|
|
2557
|
+
if (i3.activeTexture(i3.TEXTURE0), i3.bindTexture(i3.TEXTURE_2D, e3), i3.activeTexture(i3.TEXTURE1), i3.bindTexture(i3.TEXTURE_2D, t4.B), i3.texImage2D(i3.TEXTURE_2D, 0, i3.RGBA, i3.RGBA, i3.UNSIGNED_BYTE, n3), t4.H && (function(t5, e4) {
|
|
2558
2558
|
if (t5 !== e4) return false;
|
|
2559
2559
|
t5 = t5.entries(), e4 = e4.entries();
|
|
2560
2560
|
for (const [r4, i4] of t5) {
|
|
@@ -2566,28 +2566,28 @@ function Sa(t2, e2, n2, r2) {
|
|
|
2566
2566
|
if (n4 = a2, t5 !== o3 || s3[0] !== n4[0] || s3[1] !== n4[1] || s3[2] !== n4[2] || s3[3] !== n4[3]) return false;
|
|
2567
2567
|
}
|
|
2568
2568
|
return !!e4.next().done;
|
|
2569
|
-
}(t4.H, r3)) i3.activeTexture(i3.TEXTURE2), i3.bindTexture(i3.TEXTURE_2D, t4.j);
|
|
2569
|
+
})(t4.H, r3)) i3.activeTexture(i3.TEXTURE2), i3.bindTexture(i3.TEXTURE_2D, t4.j);
|
|
2570
2570
|
else {
|
|
2571
2571
|
t4.H = r3;
|
|
2572
2572
|
const e4 = Array(1024).fill(0);
|
|
2573
|
-
r3.forEach((t5, n4) => {
|
|
2573
|
+
r3.forEach(((t5, n4) => {
|
|
2574
2574
|
if (4 !== t5.length) throw Error(`Color at index ${n4} is not a four-channel value.`);
|
|
2575
2575
|
e4[4 * n4] = t5[0], e4[4 * n4 + 1] = t5[1], e4[4 * n4 + 2] = t5[2], e4[4 * n4 + 3] = t5[3];
|
|
2576
|
-
}), i3.activeTexture(i3.TEXTURE2), i3.bindTexture(i3.TEXTURE_2D, t4.j), i3.texImage2D(i3.TEXTURE_2D, 0, i3.RGBA, 256, 1, 0, i3.RGBA, i3.UNSIGNED_BYTE, new Uint8Array(e4));
|
|
2576
|
+
})), i3.activeTexture(i3.TEXTURE2), i3.bindTexture(i3.TEXTURE_2D, t4.j), i3.texImage2D(i3.TEXTURE_2D, 0, i3.RGBA, 256, 1, 0, i3.RGBA, i3.UNSIGNED_BYTE, new Uint8Array(e4));
|
|
2577
2577
|
}
|
|
2578
|
-
}(i2, e2, o2, r2), s2.clearColor(0, 0, 0, 0), s2.clear(s2.COLOR_BUFFER_BIT), s2.drawArrays(s2.TRIANGLE_FAN, 0, 4);
|
|
2578
|
+
})(i2, e2, o2, r2), s2.clearColor(0, 0, 0, 0), s2.clear(s2.COLOR_BUFFER_BIT), s2.drawArrays(s2.TRIANGLE_FAN, 0, 4);
|
|
2579
2579
|
const t3 = i2.g;
|
|
2580
2580
|
t3.activeTexture(t3.TEXTURE0), t3.bindTexture(t3.TEXTURE_2D, null), t3.activeTexture(t3.TEXTURE1), t3.bindTexture(t3.TEXTURE_2D, null), t3.activeTexture(t3.TEXTURE2), t3.bindTexture(t3.TEXTURE_2D, null);
|
|
2581
|
-
});
|
|
2581
|
+
}));
|
|
2582
2582
|
}
|
|
2583
2583
|
function xa(t2, e2, n2, r2) {
|
|
2584
|
-
const i2 = ba(t2), s2 = function(t3) {
|
|
2584
|
+
const i2 = ba(t2), s2 = (function(t3) {
|
|
2585
2585
|
return t3.h || (t3.h = new aa()), t3.h;
|
|
2586
|
-
}(t2), o2 = Array.isArray(n2) ? new ImageData(new Uint8ClampedArray(n2), 1, 1) : n2, a2 = Array.isArray(r2) ? new ImageData(new Uint8ClampedArray(r2), 1, 1) : r2;
|
|
2587
|
-
ea(s2, i2, true, () => {
|
|
2586
|
+
})(t2), o2 = Array.isArray(n2) ? new ImageData(new Uint8ClampedArray(n2), 1, 1) : n2, a2 = Array.isArray(r2) ? new ImageData(new Uint8ClampedArray(r2), 1, 1) : r2;
|
|
2587
|
+
ea(s2, i2, true, (() => {
|
|
2588
2588
|
var t3 = s2.g;
|
|
2589
2589
|
t3.activeTexture(t3.TEXTURE0), t3.bindTexture(t3.TEXTURE_2D, e2), t3.activeTexture(t3.TEXTURE1), t3.bindTexture(t3.TEXTURE_2D, s2.j), t3.texImage2D(t3.TEXTURE_2D, 0, t3.RGBA, t3.RGBA, t3.UNSIGNED_BYTE, o2), t3.activeTexture(t3.TEXTURE2), t3.bindTexture(t3.TEXTURE_2D, s2.B), t3.texImage2D(t3.TEXTURE_2D, 0, t3.RGBA, t3.RGBA, t3.UNSIGNED_BYTE, a2), i2.clearColor(0, 0, 0, 0), i2.clear(i2.COLOR_BUFFER_BIT), i2.drawArrays(i2.TRIANGLE_FAN, 0, 4), i2.bindTexture(i2.TEXTURE_2D, null), (t3 = s2.g).activeTexture(t3.TEXTURE0), t3.bindTexture(t3.TEXTURE_2D, null), t3.activeTexture(t3.TEXTURE1), t3.bindTexture(t3.TEXTURE_2D, null), t3.activeTexture(t3.TEXTURE2), t3.bindTexture(t3.TEXTURE_2D, null);
|
|
2590
|
-
});
|
|
2590
|
+
}));
|
|
2591
2591
|
}
|
|
2592
2592
|
var La = class {
|
|
2593
2593
|
constructor(t2, e2) {
|
|
@@ -2620,20 +2620,20 @@ var La = class {
|
|
|
2620
2620
|
e2 = Ea(e2), n2.save(), n2.beginPath(), n2.lineWidth = wa(e2.lineWidth, {}), n2.strokeStyle = wa(e2.color, {}), n2.fillStyle = wa(e2.fillColor, {}), n2.moveTo(t2.originX, t2.originY), n2.lineTo(t2.originX + t2.width, t2.originY), n2.lineTo(t2.originX + t2.width, t2.originY + t2.height), n2.lineTo(t2.originX, t2.originY + t2.height), n2.lineTo(t2.originX, t2.originY), n2.stroke(), n2.fill(), n2.restore();
|
|
2621
2621
|
}
|
|
2622
2622
|
va(t2, e2, n2 = [0, 0, 0, 255]) {
|
|
2623
|
-
this.l ? function(t3, e3, n3, r2) {
|
|
2623
|
+
this.l ? (function(t3, e3, n3, r2) {
|
|
2624
2624
|
const i2 = ba(t3);
|
|
2625
|
-
ka(t3, e3, (e4) => {
|
|
2625
|
+
ka(t3, e3, ((e4) => {
|
|
2626
2626
|
Sa(t3, e4, n3, r2), (e4 = Aa(t3)).drawImage(i2.canvas, 0, 0, e4.canvas.width, e4.canvas.height);
|
|
2627
|
-
});
|
|
2628
|
-
}(this, t2, n2, e2) : Sa(this, t2.M(), n2, e2);
|
|
2627
|
+
}));
|
|
2628
|
+
})(this, t2, n2, e2) : Sa(this, t2.M(), n2, e2);
|
|
2629
2629
|
}
|
|
2630
2630
|
wa(t2, e2, n2) {
|
|
2631
|
-
this.l ? function(t3, e3, n3, r2) {
|
|
2631
|
+
this.l ? (function(t3, e3, n3, r2) {
|
|
2632
2632
|
const i2 = ba(t3);
|
|
2633
|
-
ka(t3, e3, (e4) => {
|
|
2633
|
+
ka(t3, e3, ((e4) => {
|
|
2634
2634
|
xa(t3, e4, n3, r2), (e4 = Aa(t3)).drawImage(i2.canvas, 0, 0, e4.canvas.width, e4.canvas.height);
|
|
2635
|
-
});
|
|
2636
|
-
}(this, t2, e2, n2) : xa(this, t2.M(), e2, n2);
|
|
2635
|
+
}));
|
|
2636
|
+
})(this, t2, e2, n2) : xa(this, t2.M(), e2, n2);
|
|
2637
2637
|
}
|
|
2638
2638
|
close() {
|
|
2639
2639
|
this.g?.close(), this.g = void 0, this.h?.close(), this.h = void 0, this.m?.close(), this.m = void 0;
|
|
@@ -2642,11 +2642,11 @@ var La = class {
|
|
|
2642
2642
|
function Ra(t2, e2) {
|
|
2643
2643
|
switch (e2) {
|
|
2644
2644
|
case 0:
|
|
2645
|
-
return t2.g.find((t3) => t3 instanceof ImageData);
|
|
2645
|
+
return t2.g.find(((t3) => t3 instanceof ImageData));
|
|
2646
2646
|
case 1:
|
|
2647
|
-
return t2.g.find((t3) => "undefined" != typeof ImageBitmap && t3 instanceof ImageBitmap);
|
|
2647
|
+
return t2.g.find(((t3) => "undefined" != typeof ImageBitmap && t3 instanceof ImageBitmap));
|
|
2648
2648
|
case 2:
|
|
2649
|
-
return t2.g.find((t3) => "undefined" != typeof WebGLTexture && t3 instanceof WebGLTexture);
|
|
2649
|
+
return t2.g.find(((t3) => "undefined" != typeof WebGLTexture && t3 instanceof WebGLTexture));
|
|
2650
2650
|
default:
|
|
2651
2651
|
throw Error(`Type is not supported: ${e2}`);
|
|
2652
2652
|
}
|
|
@@ -2688,15 +2688,15 @@ function Ca(t2) {
|
|
|
2688
2688
|
}
|
|
2689
2689
|
function Ua(t2) {
|
|
2690
2690
|
const e2 = Ma(t2);
|
|
2691
|
-
return ea(Pa(t2), e2, true, () => function(t3, e3) {
|
|
2691
|
+
return ea(Pa(t2), e2, true, (() => (function(t3, e3) {
|
|
2692
2692
|
const n2 = t3.canvas;
|
|
2693
2693
|
if (n2.width === t3.width && n2.height === t3.height) return e3();
|
|
2694
2694
|
const r2 = n2.width, i2 = n2.height;
|
|
2695
2695
|
return n2.width = t3.width, n2.height = t3.height, t3 = e3(), n2.width = r2, n2.height = i2, t3;
|
|
2696
|
-
}(t2, () => {
|
|
2696
|
+
})(t2, (() => {
|
|
2697
2697
|
if (e2.bindFramebuffer(e2.FRAMEBUFFER, null), e2.clearColor(0, 0, 0, 0), e2.clear(e2.COLOR_BUFFER_BIT), e2.drawArrays(e2.TRIANGLE_FAN, 0, 4), !(t2.canvas instanceof OffscreenCanvas)) throw Error("Conversion to ImageBitmap requires that the MediaPipe Tasks is initialized with an OffscreenCanvas");
|
|
2698
2698
|
return t2.canvas.transferToImageBitmap();
|
|
2699
|
-
}));
|
|
2699
|
+
}))));
|
|
2700
2700
|
}
|
|
2701
2701
|
La.prototype.close = La.prototype.close, La.prototype.drawConfidenceMask = La.prototype.wa, La.prototype.drawCategoryMask = La.prototype.va, La.prototype.drawBoundingBox = La.prototype.ua, La.prototype.drawConnectors = La.prototype.xa, La.prototype.drawLandmarks = La.prototype.ya, La.lerp = function(t2, e2, n2, r2, i2) {
|
|
2702
2702
|
return Ta(r2 * (1 - (t2 - e2) / (n2 - e2)) + i2 * (1 - (n2 - t2) / (n2 - e2)), r2, i2);
|
|
@@ -2731,9 +2731,9 @@ var Da = class {
|
|
|
2731
2731
|
if (e2 instanceof ImageData) n2 = new ImageData(e2.data, this.width, this.height);
|
|
2732
2732
|
else if (e2 instanceof WebGLTexture) {
|
|
2733
2733
|
const t3 = Ma(this), e3 = Pa(this);
|
|
2734
|
-
t3.activeTexture(t3.TEXTURE1), n2 = na(e3, t3), t3.bindTexture(t3.TEXTURE_2D, n2), t3.texImage2D(t3.TEXTURE_2D, 0, t3.RGBA, this.width, this.height, 0, t3.RGBA, t3.UNSIGNED_BYTE, null), t3.bindTexture(t3.TEXTURE_2D, null), ra(e3, t3, n2), ea(e3, t3, false, () => {
|
|
2734
|
+
t3.activeTexture(t3.TEXTURE1), n2 = na(e3, t3), t3.bindTexture(t3.TEXTURE_2D, n2), t3.texImage2D(t3.TEXTURE_2D, 0, t3.RGBA, this.width, this.height, 0, t3.RGBA, t3.UNSIGNED_BYTE, null), t3.bindTexture(t3.TEXTURE_2D, null), ra(e3, t3, n2), ea(e3, t3, false, (() => {
|
|
2735
2735
|
Oa(this), t3.clearColor(0, 0, 0, 0), t3.clear(t3.COLOR_BUFFER_BIT), t3.drawArrays(t3.TRIANGLE_FAN, 0, 4), Ca(this);
|
|
2736
|
-
}), ia(e3), Ca(this);
|
|
2736
|
+
})), ia(e3), Ca(this);
|
|
2737
2737
|
} else {
|
|
2738
2738
|
if (!(e2 instanceof ImageBitmap)) throw Error(`Type is not supported: ${e2}`);
|
|
2739
2739
|
Ia(this), Oa(this), n2 = Ua(this), Ca(this);
|
|
@@ -2749,15 +2749,15 @@ var Da = class {
|
|
|
2749
2749
|
Da.prototype.close = Da.prototype.close, Da.prototype.clone = Da.prototype.clone, Da.prototype.getAsWebGLTexture = Da.prototype.M, Da.prototype.getAsImageBitmap = Da.prototype.Ba, Da.prototype.getAsImageData = Da.prototype.Ca, Da.prototype.hasWebGLTexture = Da.prototype.P, Da.prototype.hasImageBitmap = Da.prototype.ka, Da.prototype.hasImageData = Da.prototype.Ea;
|
|
2750
2750
|
var Na = 250;
|
|
2751
2751
|
function Ba(...t2) {
|
|
2752
|
-
return t2.map(([t3, e2]) => ({ start: t3, end: e2 }));
|
|
2752
|
+
return t2.map((([t3, e2]) => ({ start: t3, end: e2 })));
|
|
2753
2753
|
}
|
|
2754
|
-
var Ga = /* @__PURE__ */ function(t2) {
|
|
2754
|
+
var Ga = /* @__PURE__ */ (function(t2) {
|
|
2755
2755
|
return class extends t2 {
|
|
2756
2756
|
La() {
|
|
2757
2757
|
this.i._registerModelResourcesGraphService();
|
|
2758
2758
|
}
|
|
2759
2759
|
};
|
|
2760
|
-
}((ja = class {
|
|
2760
|
+
})((ja = class {
|
|
2761
2761
|
constructor(t2, e2) {
|
|
2762
2762
|
this.l = true, this.i = t2, this.g = null, this.h = 0, this.m = "function" == typeof this.i._addIntToInputStream, void 0 !== e2 ? this.i.canvas = e2 : Oo() ? this.i.canvas = new OffscreenCanvas(1, 1) : (console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."), this.i.canvas = document.createElement("canvas"));
|
|
2763
2763
|
}
|
|
@@ -2773,11 +2773,11 @@ var Ga = /* @__PURE__ */ function(t2) {
|
|
|
2773
2773
|
this.i.HEAPU8.set(t2, r2), e2 ? this.i._changeBinaryGraph(n2, r2) : this.i._changeTextGraph(n2, r2), this.i._free(r2);
|
|
2774
2774
|
}
|
|
2775
2775
|
configureAudio(t2, e2, n2, r2, i2) {
|
|
2776
|
-
this.i._configureAudio || console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'), Do(this, r2 || "input_audio", (r3) => {
|
|
2777
|
-
Do(this, i2 = i2 || "audio_header", (i3) => {
|
|
2776
|
+
this.i._configureAudio || console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'), Do(this, r2 || "input_audio", ((r3) => {
|
|
2777
|
+
Do(this, i2 = i2 || "audio_header", ((i3) => {
|
|
2778
2778
|
this.i._configureAudio(r3, i3, t2, e2 ?? 0, n2);
|
|
2779
|
-
});
|
|
2780
|
-
});
|
|
2779
|
+
}));
|
|
2780
|
+
}));
|
|
2781
2781
|
}
|
|
2782
2782
|
setAutoResizeCanvas(t2) {
|
|
2783
2783
|
this.l = t2;
|
|
@@ -2789,11 +2789,11 @@ var Ga = /* @__PURE__ */ function(t2) {
|
|
|
2789
2789
|
this.i.gpuOriginForWebTexturesIsBottomLeft = t2;
|
|
2790
2790
|
}
|
|
2791
2791
|
da(t2) {
|
|
2792
|
-
Go(this, "__graph_config__", (e2) => {
|
|
2792
|
+
Go(this, "__graph_config__", ((e2) => {
|
|
2793
2793
|
t2(e2);
|
|
2794
|
-
}), Do(this, "__graph_config__", (t3) => {
|
|
2794
|
+
})), Do(this, "__graph_config__", ((t3) => {
|
|
2795
2795
|
this.i._getGraphConfig(t3, void 0);
|
|
2796
|
-
}), delete this.i.simpleListeners.__graph_config__;
|
|
2796
|
+
})), delete this.i.simpleListeners.__graph_config__;
|
|
2797
2797
|
}
|
|
2798
2798
|
attachErrorListener(t2) {
|
|
2799
2799
|
this.i.errorListener = t2;
|
|
@@ -2806,286 +2806,286 @@ var Ga = /* @__PURE__ */ function(t2) {
|
|
|
2806
2806
|
}
|
|
2807
2807
|
addAudioToStreamWithShape(t2, e2, n2, r2, i2) {
|
|
2808
2808
|
const s2 = 4 * t2.length;
|
|
2809
|
-
this.h !== s2 && (this.g && this.i._free(this.g), this.g = this.i._malloc(s2), this.h = s2), this.i.HEAPF32.set(t2, this.g / 4), Do(this, r2, (t3) => {
|
|
2809
|
+
this.h !== s2 && (this.g && this.i._free(this.g), this.g = this.i._malloc(s2), this.h = s2), this.i.HEAPF32.set(t2, this.g / 4), Do(this, r2, ((t3) => {
|
|
2810
2810
|
this.i._addAudioToInputStream(this.g, e2, n2, t3, i2);
|
|
2811
|
-
});
|
|
2811
|
+
}));
|
|
2812
2812
|
}
|
|
2813
2813
|
addGpuBufferToStream(t2, e2, n2) {
|
|
2814
|
-
Do(this, e2, (e3) => {
|
|
2814
|
+
Do(this, e2, ((e3) => {
|
|
2815
2815
|
const [r2, i2] = No(this, t2, e3);
|
|
2816
2816
|
this.i._addBoundTextureToStream(e3, r2, i2, n2);
|
|
2817
|
-
});
|
|
2817
|
+
}));
|
|
2818
2818
|
}
|
|
2819
2819
|
addBoolToStream(t2, e2, n2) {
|
|
2820
|
-
Do(this, e2, (e3) => {
|
|
2820
|
+
Do(this, e2, ((e3) => {
|
|
2821
2821
|
this.i._addBoolToInputStream(t2, e3, n2);
|
|
2822
|
-
});
|
|
2822
|
+
}));
|
|
2823
2823
|
}
|
|
2824
2824
|
addDoubleToStream(t2, e2, n2) {
|
|
2825
|
-
Do(this, e2, (e3) => {
|
|
2825
|
+
Do(this, e2, ((e3) => {
|
|
2826
2826
|
this.i._addDoubleToInputStream(t2, e3, n2);
|
|
2827
|
-
});
|
|
2827
|
+
}));
|
|
2828
2828
|
}
|
|
2829
2829
|
addFloatToStream(t2, e2, n2) {
|
|
2830
|
-
Do(this, e2, (e3) => {
|
|
2830
|
+
Do(this, e2, ((e3) => {
|
|
2831
2831
|
this.i._addFloatToInputStream(t2, e3, n2);
|
|
2832
|
-
});
|
|
2832
|
+
}));
|
|
2833
2833
|
}
|
|
2834
2834
|
addIntToStream(t2, e2, n2) {
|
|
2835
|
-
Do(this, e2, (e3) => {
|
|
2835
|
+
Do(this, e2, ((e3) => {
|
|
2836
2836
|
this.i._addIntToInputStream(t2, e3, n2);
|
|
2837
|
-
});
|
|
2837
|
+
}));
|
|
2838
2838
|
}
|
|
2839
2839
|
addUintToStream(t2, e2, n2) {
|
|
2840
|
-
Do(this, e2, (e3) => {
|
|
2840
|
+
Do(this, e2, ((e3) => {
|
|
2841
2841
|
this.i._addUintToInputStream(t2, e3, n2);
|
|
2842
|
-
});
|
|
2842
|
+
}));
|
|
2843
2843
|
}
|
|
2844
2844
|
addStringToStream(t2, e2, n2) {
|
|
2845
|
-
Do(this, e2, (e3) => {
|
|
2846
|
-
Do(this, t2, (t3) => {
|
|
2845
|
+
Do(this, e2, ((e3) => {
|
|
2846
|
+
Do(this, t2, ((t3) => {
|
|
2847
2847
|
this.i._addStringToInputStream(t3, e3, n2);
|
|
2848
|
-
});
|
|
2849
|
-
});
|
|
2848
|
+
}));
|
|
2849
|
+
}));
|
|
2850
2850
|
}
|
|
2851
2851
|
addStringRecordToStream(t2, e2, n2) {
|
|
2852
|
-
Do(this, e2, (e3) => {
|
|
2853
|
-
Bo(this, Object.keys(t2), (r2) => {
|
|
2854
|
-
Bo(this, Object.values(t2), (i2) => {
|
|
2852
|
+
Do(this, e2, ((e3) => {
|
|
2853
|
+
Bo(this, Object.keys(t2), ((r2) => {
|
|
2854
|
+
Bo(this, Object.values(t2), ((i2) => {
|
|
2855
2855
|
this.i._addFlatHashMapToInputStream(r2, i2, Object.keys(t2).length, e3, n2);
|
|
2856
|
-
});
|
|
2857
|
-
});
|
|
2858
|
-
});
|
|
2856
|
+
}));
|
|
2857
|
+
}));
|
|
2858
|
+
}));
|
|
2859
2859
|
}
|
|
2860
2860
|
addProtoToStream(t2, e2, n2, r2) {
|
|
2861
|
-
Do(this, n2, (n3) => {
|
|
2862
|
-
Do(this, e2, (e3) => {
|
|
2861
|
+
Do(this, n2, ((n3) => {
|
|
2862
|
+
Do(this, e2, ((e3) => {
|
|
2863
2863
|
const i2 = this.i._malloc(t2.length);
|
|
2864
2864
|
this.i.HEAPU8.set(t2, i2), this.i._addProtoToInputStream(i2, t2.length, e3, n3, r2), this.i._free(i2);
|
|
2865
|
-
});
|
|
2866
|
-
});
|
|
2865
|
+
}));
|
|
2866
|
+
}));
|
|
2867
2867
|
}
|
|
2868
2868
|
addEmptyPacketToStream(t2, e2) {
|
|
2869
|
-
Do(this, t2, (t3) => {
|
|
2869
|
+
Do(this, t2, ((t3) => {
|
|
2870
2870
|
this.i._addEmptyPacketToInputStream(t3, e2);
|
|
2871
|
-
});
|
|
2871
|
+
}));
|
|
2872
2872
|
}
|
|
2873
2873
|
addBoolVectorToStream(t2, e2, n2) {
|
|
2874
|
-
Do(this, e2, (e3) => {
|
|
2874
|
+
Do(this, e2, ((e3) => {
|
|
2875
2875
|
const r2 = this.i._allocateBoolVector(t2.length);
|
|
2876
2876
|
if (!r2) throw Error("Unable to allocate new bool vector on heap.");
|
|
2877
2877
|
for (const e4 of t2) this.i._addBoolVectorEntry(r2, e4);
|
|
2878
2878
|
this.i._addBoolVectorToInputStream(r2, e3, n2);
|
|
2879
|
-
});
|
|
2879
|
+
}));
|
|
2880
2880
|
}
|
|
2881
2881
|
addDoubleVectorToStream(t2, e2, n2) {
|
|
2882
|
-
Do(this, e2, (e3) => {
|
|
2882
|
+
Do(this, e2, ((e3) => {
|
|
2883
2883
|
const r2 = this.i._allocateDoubleVector(t2.length);
|
|
2884
2884
|
if (!r2) throw Error("Unable to allocate new double vector on heap.");
|
|
2885
2885
|
for (const e4 of t2) this.i._addDoubleVectorEntry(r2, e4);
|
|
2886
2886
|
this.i._addDoubleVectorToInputStream(r2, e3, n2);
|
|
2887
|
-
});
|
|
2887
|
+
}));
|
|
2888
2888
|
}
|
|
2889
2889
|
addFloatVectorToStream(t2, e2, n2) {
|
|
2890
|
-
Do(this, e2, (e3) => {
|
|
2890
|
+
Do(this, e2, ((e3) => {
|
|
2891
2891
|
const r2 = this.i._allocateFloatVector(t2.length);
|
|
2892
2892
|
if (!r2) throw Error("Unable to allocate new float vector on heap.");
|
|
2893
2893
|
for (const e4 of t2) this.i._addFloatVectorEntry(r2, e4);
|
|
2894
2894
|
this.i._addFloatVectorToInputStream(r2, e3, n2);
|
|
2895
|
-
});
|
|
2895
|
+
}));
|
|
2896
2896
|
}
|
|
2897
2897
|
addIntVectorToStream(t2, e2, n2) {
|
|
2898
|
-
Do(this, e2, (e3) => {
|
|
2898
|
+
Do(this, e2, ((e3) => {
|
|
2899
2899
|
const r2 = this.i._allocateIntVector(t2.length);
|
|
2900
2900
|
if (!r2) throw Error("Unable to allocate new int vector on heap.");
|
|
2901
2901
|
for (const e4 of t2) this.i._addIntVectorEntry(r2, e4);
|
|
2902
2902
|
this.i._addIntVectorToInputStream(r2, e3, n2);
|
|
2903
|
-
});
|
|
2903
|
+
}));
|
|
2904
2904
|
}
|
|
2905
2905
|
addUintVectorToStream(t2, e2, n2) {
|
|
2906
|
-
Do(this, e2, (e3) => {
|
|
2906
|
+
Do(this, e2, ((e3) => {
|
|
2907
2907
|
const r2 = this.i._allocateUintVector(t2.length);
|
|
2908
2908
|
if (!r2) throw Error("Unable to allocate new unsigned int vector on heap.");
|
|
2909
2909
|
for (const e4 of t2) this.i._addUintVectorEntry(r2, e4);
|
|
2910
2910
|
this.i._addUintVectorToInputStream(r2, e3, n2);
|
|
2911
|
-
});
|
|
2911
|
+
}));
|
|
2912
2912
|
}
|
|
2913
2913
|
addStringVectorToStream(t2, e2, n2) {
|
|
2914
|
-
Do(this, e2, (e3) => {
|
|
2914
|
+
Do(this, e2, ((e3) => {
|
|
2915
2915
|
const r2 = this.i._allocateStringVector(t2.length);
|
|
2916
2916
|
if (!r2) throw Error("Unable to allocate new string vector on heap.");
|
|
2917
|
-
for (const e4 of t2) Do(this, e4, (t3) => {
|
|
2917
|
+
for (const e4 of t2) Do(this, e4, ((t3) => {
|
|
2918
2918
|
this.i._addStringVectorEntry(r2, t3);
|
|
2919
|
-
});
|
|
2919
|
+
}));
|
|
2920
2920
|
this.i._addStringVectorToInputStream(r2, e3, n2);
|
|
2921
|
-
});
|
|
2921
|
+
}));
|
|
2922
2922
|
}
|
|
2923
2923
|
addBoolToInputSidePacket(t2, e2) {
|
|
2924
|
-
Do(this, e2, (e3) => {
|
|
2924
|
+
Do(this, e2, ((e3) => {
|
|
2925
2925
|
this.i._addBoolToInputSidePacket(t2, e3);
|
|
2926
|
-
});
|
|
2926
|
+
}));
|
|
2927
2927
|
}
|
|
2928
2928
|
addDoubleToInputSidePacket(t2, e2) {
|
|
2929
|
-
Do(this, e2, (e3) => {
|
|
2929
|
+
Do(this, e2, ((e3) => {
|
|
2930
2930
|
this.i._addDoubleToInputSidePacket(t2, e3);
|
|
2931
|
-
});
|
|
2931
|
+
}));
|
|
2932
2932
|
}
|
|
2933
2933
|
addFloatToInputSidePacket(t2, e2) {
|
|
2934
|
-
Do(this, e2, (e3) => {
|
|
2934
|
+
Do(this, e2, ((e3) => {
|
|
2935
2935
|
this.i._addFloatToInputSidePacket(t2, e3);
|
|
2936
|
-
});
|
|
2936
|
+
}));
|
|
2937
2937
|
}
|
|
2938
2938
|
addIntToInputSidePacket(t2, e2) {
|
|
2939
|
-
Do(this, e2, (e3) => {
|
|
2939
|
+
Do(this, e2, ((e3) => {
|
|
2940
2940
|
this.i._addIntToInputSidePacket(t2, e3);
|
|
2941
|
-
});
|
|
2941
|
+
}));
|
|
2942
2942
|
}
|
|
2943
2943
|
addUintToInputSidePacket(t2, e2) {
|
|
2944
|
-
Do(this, e2, (e3) => {
|
|
2944
|
+
Do(this, e2, ((e3) => {
|
|
2945
2945
|
this.i._addUintToInputSidePacket(t2, e3);
|
|
2946
|
-
});
|
|
2946
|
+
}));
|
|
2947
2947
|
}
|
|
2948
2948
|
addStringToInputSidePacket(t2, e2) {
|
|
2949
|
-
Do(this, e2, (e3) => {
|
|
2950
|
-
Do(this, t2, (t3) => {
|
|
2949
|
+
Do(this, e2, ((e3) => {
|
|
2950
|
+
Do(this, t2, ((t3) => {
|
|
2951
2951
|
this.i._addStringToInputSidePacket(t3, e3);
|
|
2952
|
-
});
|
|
2953
|
-
});
|
|
2952
|
+
}));
|
|
2953
|
+
}));
|
|
2954
2954
|
}
|
|
2955
2955
|
addProtoToInputSidePacket(t2, e2, n2) {
|
|
2956
|
-
Do(this, n2, (n3) => {
|
|
2957
|
-
Do(this, e2, (e3) => {
|
|
2956
|
+
Do(this, n2, ((n3) => {
|
|
2957
|
+
Do(this, e2, ((e3) => {
|
|
2958
2958
|
const r2 = this.i._malloc(t2.length);
|
|
2959
2959
|
this.i.HEAPU8.set(t2, r2), this.i._addProtoToInputSidePacket(r2, t2.length, e3, n3), this.i._free(r2);
|
|
2960
|
-
});
|
|
2961
|
-
});
|
|
2960
|
+
}));
|
|
2961
|
+
}));
|
|
2962
2962
|
}
|
|
2963
2963
|
addBoolVectorToInputSidePacket(t2, e2) {
|
|
2964
|
-
Do(this, e2, (e3) => {
|
|
2964
|
+
Do(this, e2, ((e3) => {
|
|
2965
2965
|
const n2 = this.i._allocateBoolVector(t2.length);
|
|
2966
2966
|
if (!n2) throw Error("Unable to allocate new bool vector on heap.");
|
|
2967
2967
|
for (const e4 of t2) this.i._addBoolVectorEntry(n2, e4);
|
|
2968
2968
|
this.i._addBoolVectorToInputSidePacket(n2, e3);
|
|
2969
|
-
});
|
|
2969
|
+
}));
|
|
2970
2970
|
}
|
|
2971
2971
|
addDoubleVectorToInputSidePacket(t2, e2) {
|
|
2972
|
-
Do(this, e2, (e3) => {
|
|
2972
|
+
Do(this, e2, ((e3) => {
|
|
2973
2973
|
const n2 = this.i._allocateDoubleVector(t2.length);
|
|
2974
2974
|
if (!n2) throw Error("Unable to allocate new double vector on heap.");
|
|
2975
2975
|
for (const e4 of t2) this.i._addDoubleVectorEntry(n2, e4);
|
|
2976
2976
|
this.i._addDoubleVectorToInputSidePacket(n2, e3);
|
|
2977
|
-
});
|
|
2977
|
+
}));
|
|
2978
2978
|
}
|
|
2979
2979
|
addFloatVectorToInputSidePacket(t2, e2) {
|
|
2980
|
-
Do(this, e2, (e3) => {
|
|
2980
|
+
Do(this, e2, ((e3) => {
|
|
2981
2981
|
const n2 = this.i._allocateFloatVector(t2.length);
|
|
2982
2982
|
if (!n2) throw Error("Unable to allocate new float vector on heap.");
|
|
2983
2983
|
for (const e4 of t2) this.i._addFloatVectorEntry(n2, e4);
|
|
2984
2984
|
this.i._addFloatVectorToInputSidePacket(n2, e3);
|
|
2985
|
-
});
|
|
2985
|
+
}));
|
|
2986
2986
|
}
|
|
2987
2987
|
addIntVectorToInputSidePacket(t2, e2) {
|
|
2988
|
-
Do(this, e2, (e3) => {
|
|
2988
|
+
Do(this, e2, ((e3) => {
|
|
2989
2989
|
const n2 = this.i._allocateIntVector(t2.length);
|
|
2990
2990
|
if (!n2) throw Error("Unable to allocate new int vector on heap.");
|
|
2991
2991
|
for (const e4 of t2) this.i._addIntVectorEntry(n2, e4);
|
|
2992
2992
|
this.i._addIntVectorToInputSidePacket(n2, e3);
|
|
2993
|
-
});
|
|
2993
|
+
}));
|
|
2994
2994
|
}
|
|
2995
2995
|
addUintVectorToInputSidePacket(t2, e2) {
|
|
2996
|
-
Do(this, e2, (e3) => {
|
|
2996
|
+
Do(this, e2, ((e3) => {
|
|
2997
2997
|
const n2 = this.i._allocateUintVector(t2.length);
|
|
2998
2998
|
if (!n2) throw Error("Unable to allocate new unsigned int vector on heap.");
|
|
2999
2999
|
for (const e4 of t2) this.i._addUintVectorEntry(n2, e4);
|
|
3000
3000
|
this.i._addUintVectorToInputSidePacket(n2, e3);
|
|
3001
|
-
});
|
|
3001
|
+
}));
|
|
3002
3002
|
}
|
|
3003
3003
|
addStringVectorToInputSidePacket(t2, e2) {
|
|
3004
|
-
Do(this, e2, (e3) => {
|
|
3004
|
+
Do(this, e2, ((e3) => {
|
|
3005
3005
|
const n2 = this.i._allocateStringVector(t2.length);
|
|
3006
3006
|
if (!n2) throw Error("Unable to allocate new string vector on heap.");
|
|
3007
|
-
for (const e4 of t2) Do(this, e4, (t3) => {
|
|
3007
|
+
for (const e4 of t2) Do(this, e4, ((t3) => {
|
|
3008
3008
|
this.i._addStringVectorEntry(n2, t3);
|
|
3009
|
-
});
|
|
3009
|
+
}));
|
|
3010
3010
|
this.i._addStringVectorToInputSidePacket(n2, e3);
|
|
3011
|
-
});
|
|
3011
|
+
}));
|
|
3012
3012
|
}
|
|
3013
3013
|
attachBoolListener(t2, e2) {
|
|
3014
|
-
Go(this, t2, e2), Do(this, t2, (t3) => {
|
|
3014
|
+
Go(this, t2, e2), Do(this, t2, ((t3) => {
|
|
3015
3015
|
this.i._attachBoolListener(t3);
|
|
3016
|
-
});
|
|
3016
|
+
}));
|
|
3017
3017
|
}
|
|
3018
3018
|
attachBoolVectorListener(t2, e2) {
|
|
3019
|
-
jo(this, t2, e2), Do(this, t2, (t3) => {
|
|
3019
|
+
jo(this, t2, e2), Do(this, t2, ((t3) => {
|
|
3020
3020
|
this.i._attachBoolVectorListener(t3);
|
|
3021
|
-
});
|
|
3021
|
+
}));
|
|
3022
3022
|
}
|
|
3023
3023
|
attachIntListener(t2, e2) {
|
|
3024
|
-
Go(this, t2, e2), Do(this, t2, (t3) => {
|
|
3024
|
+
Go(this, t2, e2), Do(this, t2, ((t3) => {
|
|
3025
3025
|
this.i._attachIntListener(t3);
|
|
3026
|
-
});
|
|
3026
|
+
}));
|
|
3027
3027
|
}
|
|
3028
3028
|
attachIntVectorListener(t2, e2) {
|
|
3029
|
-
jo(this, t2, e2), Do(this, t2, (t3) => {
|
|
3029
|
+
jo(this, t2, e2), Do(this, t2, ((t3) => {
|
|
3030
3030
|
this.i._attachIntVectorListener(t3);
|
|
3031
|
-
});
|
|
3031
|
+
}));
|
|
3032
3032
|
}
|
|
3033
3033
|
attachUintListener(t2, e2) {
|
|
3034
|
-
Go(this, t2, e2), Do(this, t2, (t3) => {
|
|
3034
|
+
Go(this, t2, e2), Do(this, t2, ((t3) => {
|
|
3035
3035
|
this.i._attachUintListener(t3);
|
|
3036
|
-
});
|
|
3036
|
+
}));
|
|
3037
3037
|
}
|
|
3038
3038
|
attachUintVectorListener(t2, e2) {
|
|
3039
|
-
jo(this, t2, e2), Do(this, t2, (t3) => {
|
|
3039
|
+
jo(this, t2, e2), Do(this, t2, ((t3) => {
|
|
3040
3040
|
this.i._attachUintVectorListener(t3);
|
|
3041
|
-
});
|
|
3041
|
+
}));
|
|
3042
3042
|
}
|
|
3043
3043
|
attachDoubleListener(t2, e2) {
|
|
3044
|
-
Go(this, t2, e2), Do(this, t2, (t3) => {
|
|
3044
|
+
Go(this, t2, e2), Do(this, t2, ((t3) => {
|
|
3045
3045
|
this.i._attachDoubleListener(t3);
|
|
3046
|
-
});
|
|
3046
|
+
}));
|
|
3047
3047
|
}
|
|
3048
3048
|
attachDoubleVectorListener(t2, e2) {
|
|
3049
|
-
jo(this, t2, e2), Do(this, t2, (t3) => {
|
|
3049
|
+
jo(this, t2, e2), Do(this, t2, ((t3) => {
|
|
3050
3050
|
this.i._attachDoubleVectorListener(t3);
|
|
3051
|
-
});
|
|
3051
|
+
}));
|
|
3052
3052
|
}
|
|
3053
3053
|
attachFloatListener(t2, e2) {
|
|
3054
|
-
Go(this, t2, e2), Do(this, t2, (t3) => {
|
|
3054
|
+
Go(this, t2, e2), Do(this, t2, ((t3) => {
|
|
3055
3055
|
this.i._attachFloatListener(t3);
|
|
3056
|
-
});
|
|
3056
|
+
}));
|
|
3057
3057
|
}
|
|
3058
3058
|
attachFloatVectorListener(t2, e2) {
|
|
3059
|
-
jo(this, t2, e2), Do(this, t2, (t3) => {
|
|
3059
|
+
jo(this, t2, e2), Do(this, t2, ((t3) => {
|
|
3060
3060
|
this.i._attachFloatVectorListener(t3);
|
|
3061
|
-
});
|
|
3061
|
+
}));
|
|
3062
3062
|
}
|
|
3063
3063
|
attachStringListener(t2, e2) {
|
|
3064
|
-
Go(this, t2, e2), Do(this, t2, (t3) => {
|
|
3064
|
+
Go(this, t2, e2), Do(this, t2, ((t3) => {
|
|
3065
3065
|
this.i._attachStringListener(t3);
|
|
3066
|
-
});
|
|
3066
|
+
}));
|
|
3067
3067
|
}
|
|
3068
3068
|
attachStringVectorListener(t2, e2) {
|
|
3069
|
-
jo(this, t2, e2), Do(this, t2, (t3) => {
|
|
3069
|
+
jo(this, t2, e2), Do(this, t2, ((t3) => {
|
|
3070
3070
|
this.i._attachStringVectorListener(t3);
|
|
3071
|
-
});
|
|
3071
|
+
}));
|
|
3072
3072
|
}
|
|
3073
3073
|
attachProtoListener(t2, e2, n2) {
|
|
3074
|
-
Go(this, t2, e2), Do(this, t2, (t3) => {
|
|
3074
|
+
Go(this, t2, e2), Do(this, t2, ((t3) => {
|
|
3075
3075
|
this.i._attachProtoListener(t3, n2 || false);
|
|
3076
|
-
});
|
|
3076
|
+
}));
|
|
3077
3077
|
}
|
|
3078
3078
|
attachProtoVectorListener(t2, e2, n2) {
|
|
3079
|
-
jo(this, t2, e2), Do(this, t2, (t3) => {
|
|
3079
|
+
jo(this, t2, e2), Do(this, t2, ((t3) => {
|
|
3080
3080
|
this.i._attachProtoVectorListener(t3, n2 || false);
|
|
3081
|
-
});
|
|
3081
|
+
}));
|
|
3082
3082
|
}
|
|
3083
3083
|
attachAudioListener(t2, e2, n2) {
|
|
3084
|
-
this.i._attachAudioListener || console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'), Go(this, t2, (t3, n3) => {
|
|
3084
|
+
this.i._attachAudioListener || console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'), Go(this, t2, ((t3, n3) => {
|
|
3085
3085
|
t3 = new Float32Array(t3.buffer, t3.byteOffset, t3.length / 4), e2(t3, n3);
|
|
3086
|
-
}), Do(this, t2, (t3) => {
|
|
3086
|
+
})), Do(this, t2, ((t3) => {
|
|
3087
3087
|
this.i._attachAudioListener(t3, n2 || false);
|
|
3088
|
-
});
|
|
3088
|
+
}));
|
|
3089
3089
|
}
|
|
3090
3090
|
finishProcessing() {
|
|
3091
3091
|
this.i._waitUntilIdle();
|
|
@@ -3098,29 +3098,29 @@ var Ga = /* @__PURE__ */ function(t2) {
|
|
|
3098
3098
|
return this.i;
|
|
3099
3099
|
}
|
|
3100
3100
|
qa(t2, e2, n2) {
|
|
3101
|
-
Do(this, e2, (e3) => {
|
|
3101
|
+
Do(this, e2, ((e3) => {
|
|
3102
3102
|
const [r2, i2] = No(this, t2, e3);
|
|
3103
3103
|
this.ea._addBoundTextureAsImageToStream(e3, r2, i2, n2);
|
|
3104
|
-
});
|
|
3104
|
+
}));
|
|
3105
3105
|
}
|
|
3106
3106
|
U(t2, e2) {
|
|
3107
|
-
Go(this, t2, e2), Do(this, t2, (t3) => {
|
|
3107
|
+
Go(this, t2, e2), Do(this, t2, ((t3) => {
|
|
3108
3108
|
this.ea._attachImageListener(t3);
|
|
3109
|
-
});
|
|
3109
|
+
}));
|
|
3110
3110
|
}
|
|
3111
3111
|
ca(t2, e2) {
|
|
3112
|
-
jo(this, t2, e2), Do(this, t2, (t3) => {
|
|
3112
|
+
jo(this, t2, e2), Do(this, t2, ((t3) => {
|
|
3113
3113
|
this.ea._attachImageVectorListener(t3);
|
|
3114
|
-
});
|
|
3114
|
+
}));
|
|
3115
3115
|
}
|
|
3116
3116
|
}));
|
|
3117
3117
|
var ja;
|
|
3118
3118
|
var Va = class extends Ga {
|
|
3119
3119
|
};
|
|
3120
3120
|
async function Xa(t2, e2, n2) {
|
|
3121
|
-
return async function(t3, e3, n3, r2) {
|
|
3121
|
+
return (async function(t3, e3, n3, r2) {
|
|
3122
3122
|
return Vo(t3, e3, n3, r2);
|
|
3123
|
-
}(t2, n2.canvas ?? (Oo() ? void 0 : document.createElement("canvas")), e2, n2);
|
|
3123
|
+
})(t2, n2.canvas ?? (Oo() ? void 0 : document.createElement("canvas")), e2, n2);
|
|
3124
3124
|
}
|
|
3125
3125
|
function Ha(t2, e2, n2, r2) {
|
|
3126
3126
|
if (t2.T) {
|
|
@@ -3195,12 +3195,12 @@ var $a = class extends Ya {
|
|
|
3195
3195
|
const e2 = new Di();
|
|
3196
3196
|
Xn(e2, Ps, this.h);
|
|
3197
3197
|
const n2 = new Xi();
|
|
3198
|
-
Gi(n2, "mediapipe.tasks.vision.face_detector.FaceDetectorGraph"), ji(n2, "IMAGE:image_in"), ji(n2, "NORM_RECT:norm_rect_in"), Vi(n2, "DETECTIONS:detections"), n2.o(e2), Ki(t2, n2), this.g.attachProtoVectorListener("detections", (t3, e3) => {
|
|
3198
|
+
Gi(n2, "mediapipe.tasks.vision.face_detector.FaceDetectorGraph"), ji(n2, "IMAGE:image_in"), ji(n2, "NORM_RECT:norm_rect_in"), Vi(n2, "DETECTIONS:detections"), n2.o(e2), Ki(t2, n2), this.g.attachProtoVectorListener("detections", ((t3, e3) => {
|
|
3199
3199
|
for (const e4 of t3) t3 = os(e4), this.j.detections.push(bo(t3));
|
|
3200
3200
|
Wo(this, e3);
|
|
3201
|
-
}), this.g.attachEmptyPacketListener("detections", (t3) => {
|
|
3201
|
+
})), this.g.attachEmptyPacketListener("detections", ((t3) => {
|
|
3202
3202
|
Wo(this, t3);
|
|
3203
|
-
}), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3203
|
+
})), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3204
3204
|
}
|
|
3205
3205
|
};
|
|
3206
3206
|
$a.prototype.detectForVideo = $a.prototype.F, $a.prototype.detect = $a.prototype.D, $a.prototype.setOptions = $a.prototype.o, $a.createFromModelPath = async function(t2, e2) {
|
|
@@ -3248,22 +3248,22 @@ var ac = class extends Ya {
|
|
|
3248
3248
|
const e2 = new Di();
|
|
3249
3249
|
Xn(e2, Bs, this.h);
|
|
3250
3250
|
const n2 = new Xi();
|
|
3251
|
-
Gi(n2, "mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"), ji(n2, "IMAGE:image_in"), ji(n2, "NORM_RECT:norm_rect"), Vi(n2, "NORM_LANDMARKS:face_landmarks"), n2.o(e2), Ki(t2, n2), this.g.attachProtoVectorListener("face_landmarks", (t3, e3) => {
|
|
3251
|
+
Gi(n2, "mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"), ji(n2, "IMAGE:image_in"), ji(n2, "NORM_RECT:norm_rect"), Vi(n2, "NORM_LANDMARKS:face_landmarks"), n2.o(e2), Ki(t2, n2), this.g.attachProtoVectorListener("face_landmarks", ((t3, e3) => {
|
|
3252
3252
|
for (const e4 of t3) t3 = us(e4), this.j.faceLandmarks.push(ko(t3));
|
|
3253
3253
|
Wo(this, e3);
|
|
3254
|
-
}), this.g.attachEmptyPacketListener("face_landmarks", (t3) => {
|
|
3254
|
+
})), this.g.attachEmptyPacketListener("face_landmarks", ((t3) => {
|
|
3255
3255
|
Wo(this, t3);
|
|
3256
|
-
}), this.outputFaceBlendshapes && ($i(t2, "blendshapes"), Vi(n2, "BLENDSHAPES:blendshapes"), this.g.attachProtoVectorListener("blendshapes", (t3, e3) => {
|
|
3256
|
+
})), this.outputFaceBlendshapes && ($i(t2, "blendshapes"), Vi(n2, "BLENDSHAPES:blendshapes"), this.g.attachProtoVectorListener("blendshapes", ((t3, e3) => {
|
|
3257
3257
|
if (this.outputFaceBlendshapes) for (const e4 of t3) t3 = ns(e4), this.j.faceBlendshapes.push(Ao(t3.g() ?? []));
|
|
3258
3258
|
Wo(this, e3);
|
|
3259
|
-
}), this.g.attachEmptyPacketListener("blendshapes", (t3) => {
|
|
3259
|
+
})), this.g.attachEmptyPacketListener("blendshapes", ((t3) => {
|
|
3260
3260
|
Wo(this, t3);
|
|
3261
|
-
})), this.outputFacialTransformationMatrixes && ($i(t2, "face_geometry"), Vi(n2, "FACE_GEOMETRY:face_geometry"), this.g.attachProtoVectorListener("face_geometry", (t3, e3) => {
|
|
3261
|
+
}))), this.outputFacialTransformationMatrixes && ($i(t2, "face_geometry"), Vi(n2, "FACE_GEOMETRY:face_geometry"), this.g.attachProtoVectorListener("face_geometry", ((t3, e3) => {
|
|
3262
3262
|
if (this.outputFacialTransformationMatrixes) for (const e4 of t3) (t3 = en(Os(e4), ls, 2)) && this.j.facialTransformationMatrixes.push({ rows: un(t3, 1) ?? 0 ?? 0, columns: un(t3, 2) ?? 0 ?? 0, data: Ve(t3, 3, $t, je()).slice() ?? [] });
|
|
3263
3263
|
Wo(this, e3);
|
|
3264
|
-
}), this.g.attachEmptyPacketListener("face_geometry", (t3) => {
|
|
3264
|
+
})), this.g.attachEmptyPacketListener("face_geometry", ((t3) => {
|
|
3265
3265
|
Wo(this, t3);
|
|
3266
|
-
})), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3266
|
+
}))), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3267
3267
|
}
|
|
3268
3268
|
};
|
|
3269
3269
|
ac.prototype.detectForVideo = ac.prototype.F, ac.prototype.detect = ac.prototype.D, ac.prototype.setOptions = ac.prototype.o, ac.createFromModelPath = function(t2, e2) {
|
|
@@ -3296,7 +3296,7 @@ var cc = class extends Ya {
|
|
|
3296
3296
|
const e2 = new Di();
|
|
3297
3297
|
Xn(e2, js, this.j);
|
|
3298
3298
|
const n2 = new Xi();
|
|
3299
|
-
Gi(n2, "mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph"), ji(n2, "IMAGE:image_in"), ji(n2, "NORM_RECT:norm_rect"), Vi(n2, "STYLIZED_IMAGE:stylized_image"), n2.o(e2), Ki(t2, n2), this.g.U("stylized_image", (t3, e3) => {
|
|
3299
|
+
Gi(n2, "mediapipe.tasks.vision.face_stylizer.FaceStylizerGraph"), ji(n2, "IMAGE:image_in"), ji(n2, "NORM_RECT:norm_rect"), Vi(n2, "STYLIZED_IMAGE:stylized_image"), n2.o(e2), Ki(t2, n2), this.g.U("stylized_image", ((t3, e3) => {
|
|
3300
3300
|
var n3 = !this.h, r2 = t3.data, i2 = t3.width;
|
|
3301
3301
|
const s2 = i2 * (t3 = t3.height);
|
|
3302
3302
|
if (r2 instanceof Uint8Array) if (r2.length === 3 * s2) {
|
|
@@ -3309,9 +3309,9 @@ var cc = class extends Ya {
|
|
|
3309
3309
|
}
|
|
3310
3310
|
else if (!(r2 instanceof WebGLTexture)) throw Error(`Unsupported format: ${r2.constructor.name}`);
|
|
3311
3311
|
i2 = new Da([r2], false, false, this.g.i.canvas, this.O, i2, t3), this.s = n3 = n3 ? i2.clone() : i2, this.h && this.h(n3), Wo(this, e3);
|
|
3312
|
-
}), this.g.attachEmptyPacketListener("stylized_image", (t3) => {
|
|
3312
|
+
})), this.g.attachEmptyPacketListener("stylized_image", ((t3) => {
|
|
3313
3313
|
this.s = null, this.h && this.h(null), Wo(this, t3);
|
|
3314
|
-
}), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3314
|
+
})), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3315
3315
|
}
|
|
3316
3316
|
};
|
|
3317
3317
|
cc.prototype.stylize = cc.prototype.Oa, cc.prototype.setOptions = cc.prototype.o, cc.createFromModelPath = function(t2, e2) {
|
|
@@ -3367,7 +3367,7 @@ var fc = class extends Ya {
|
|
|
3367
3367
|
const e2 = new Di();
|
|
3368
3368
|
Xn(e2, Qs, this.j);
|
|
3369
3369
|
const n2 = new Xi();
|
|
3370
|
-
Gi(n2, "mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"), ji(n2, "IMAGE:image_in"), ji(n2, "NORM_RECT:norm_rect"), Vi(n2, "HAND_GESTURES:hand_gestures"), Vi(n2, "LANDMARKS:hand_landmarks"), Vi(n2, "WORLD_LANDMARKS:world_hand_landmarks"), Vi(n2, "HANDEDNESS:handedness"), n2.o(e2), Ki(t2, n2), this.g.attachProtoVectorListener("hand_landmarks", (t3, e3) => {
|
|
3370
|
+
Gi(n2, "mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"), ji(n2, "IMAGE:image_in"), ji(n2, "NORM_RECT:norm_rect"), Vi(n2, "HAND_GESTURES:hand_gestures"), Vi(n2, "LANDMARKS:hand_landmarks"), Vi(n2, "WORLD_LANDMARKS:world_hand_landmarks"), Vi(n2, "HANDEDNESS:handedness"), n2.o(e2), Ki(t2, n2), this.g.attachProtoVectorListener("hand_landmarks", ((t3, e3) => {
|
|
3371
3371
|
for (const e4 of t3) {
|
|
3372
3372
|
t3 = us(e4);
|
|
3373
3373
|
const n3 = [];
|
|
@@ -3375,9 +3375,9 @@ var fc = class extends Ya {
|
|
|
3375
3375
|
this.landmarks.push(n3);
|
|
3376
3376
|
}
|
|
3377
3377
|
Wo(this, e3);
|
|
3378
|
-
}), this.g.attachEmptyPacketListener("hand_landmarks", (t3) => {
|
|
3378
|
+
})), this.g.attachEmptyPacketListener("hand_landmarks", ((t3) => {
|
|
3379
3379
|
Wo(this, t3);
|
|
3380
|
-
}), this.g.attachProtoVectorListener("world_hand_landmarks", (t3, e3) => {
|
|
3380
|
+
})), this.g.attachProtoVectorListener("world_hand_landmarks", ((t3, e3) => {
|
|
3381
3381
|
for (const e4 of t3) {
|
|
3382
3382
|
t3 = cs(e4);
|
|
3383
3383
|
const n3 = [];
|
|
@@ -3385,17 +3385,17 @@ var fc = class extends Ya {
|
|
|
3385
3385
|
this.worldLandmarks.push(n3);
|
|
3386
3386
|
}
|
|
3387
3387
|
Wo(this, e3);
|
|
3388
|
-
}), this.g.attachEmptyPacketListener("world_hand_landmarks", (t3) => {
|
|
3388
|
+
})), this.g.attachEmptyPacketListener("world_hand_landmarks", ((t3) => {
|
|
3389
3389
|
Wo(this, t3);
|
|
3390
|
-
}), this.g.attachProtoVectorListener("hand_gestures", (t3, e3) => {
|
|
3390
|
+
})), this.g.attachProtoVectorListener("hand_gestures", ((t3, e3) => {
|
|
3391
3391
|
this.gestures.push(...dc(t3, false)), Wo(this, e3);
|
|
3392
|
-
}), this.g.attachEmptyPacketListener("hand_gestures", (t3) => {
|
|
3392
|
+
})), this.g.attachEmptyPacketListener("hand_gestures", ((t3) => {
|
|
3393
3393
|
Wo(this, t3);
|
|
3394
|
-
}), this.g.attachProtoVectorListener("handedness", (t3, e3) => {
|
|
3394
|
+
})), this.g.attachProtoVectorListener("handedness", ((t3, e3) => {
|
|
3395
3395
|
this.handedness.push(...dc(t3)), Wo(this, e3);
|
|
3396
|
-
}), this.g.attachEmptyPacketListener("handedness", (t3) => {
|
|
3396
|
+
})), this.g.attachEmptyPacketListener("handedness", ((t3) => {
|
|
3397
3397
|
Wo(this, t3);
|
|
3398
|
-
}), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3398
|
+
})), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3399
3399
|
}
|
|
3400
3400
|
};
|
|
3401
3401
|
function pc(t2) {
|
|
@@ -3433,17 +3433,17 @@ var gc = class extends Ya {
|
|
|
3433
3433
|
const e2 = new Di();
|
|
3434
3434
|
Xn(e2, to, this.h);
|
|
3435
3435
|
const n2 = new Xi();
|
|
3436
|
-
Gi(n2, "mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"), ji(n2, "IMAGE:image_in"), ji(n2, "NORM_RECT:norm_rect"), Vi(n2, "LANDMARKS:hand_landmarks"), Vi(n2, "WORLD_LANDMARKS:world_hand_landmarks"), Vi(n2, "HANDEDNESS:handedness"), n2.o(e2), Ki(t2, n2), this.g.attachProtoVectorListener("hand_landmarks", (t3, e3) => {
|
|
3436
|
+
Gi(n2, "mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"), ji(n2, "IMAGE:image_in"), ji(n2, "NORM_RECT:norm_rect"), Vi(n2, "LANDMARKS:hand_landmarks"), Vi(n2, "WORLD_LANDMARKS:world_hand_landmarks"), Vi(n2, "HANDEDNESS:handedness"), n2.o(e2), Ki(t2, n2), this.g.attachProtoVectorListener("hand_landmarks", ((t3, e3) => {
|
|
3437
3437
|
for (const e4 of t3) t3 = us(e4), this.landmarks.push(ko(t3));
|
|
3438
3438
|
Wo(this, e3);
|
|
3439
|
-
}), this.g.attachEmptyPacketListener("hand_landmarks", (t3) => {
|
|
3439
|
+
})), this.g.attachEmptyPacketListener("hand_landmarks", ((t3) => {
|
|
3440
3440
|
Wo(this, t3);
|
|
3441
|
-
}), this.g.attachProtoVectorListener("world_hand_landmarks", (t3, e3) => {
|
|
3441
|
+
})), this.g.attachProtoVectorListener("world_hand_landmarks", ((t3, e3) => {
|
|
3442
3442
|
for (const e4 of t3) t3 = cs(e4), this.worldLandmarks.push(So(t3));
|
|
3443
3443
|
Wo(this, e3);
|
|
3444
|
-
}), this.g.attachEmptyPacketListener("world_hand_landmarks", (t3) => {
|
|
3444
|
+
})), this.g.attachEmptyPacketListener("world_hand_landmarks", ((t3) => {
|
|
3445
3445
|
Wo(this, t3);
|
|
3446
|
-
}), this.g.attachProtoVectorListener("handedness", (t3, e3) => {
|
|
3446
|
+
})), this.g.attachProtoVectorListener("handedness", ((t3, e3) => {
|
|
3447
3447
|
var n3 = this.handedness, r2 = n3.push;
|
|
3448
3448
|
const i2 = [];
|
|
3449
3449
|
for (const e4 of t3) {
|
|
@@ -3453,9 +3453,9 @@ var gc = class extends Ya {
|
|
|
3453
3453
|
i2.push(n4);
|
|
3454
3454
|
}
|
|
3455
3455
|
r2.call(n3, ...i2), Wo(this, e3);
|
|
3456
|
-
}), this.g.attachEmptyPacketListener("handedness", (t3) => {
|
|
3456
|
+
})), this.g.attachEmptyPacketListener("handedness", ((t3) => {
|
|
3457
3457
|
Wo(this, t3);
|
|
3458
|
-
}), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3458
|
+
})), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3459
3459
|
}
|
|
3460
3460
|
};
|
|
3461
3461
|
gc.prototype.detectForVideo = gc.prototype.F, gc.prototype.detect = gc.prototype.D, gc.prototype.setOptions = gc.prototype.o, gc.createFromModelPath = function(t2, e2) {
|
|
@@ -3505,55 +3505,55 @@ var Ec = class extends Ya {
|
|
|
3505
3505
|
var t2 = new qi();
|
|
3506
3506
|
Yi(t2, "input_frames_image"), $i(t2, "pose_landmarks"), $i(t2, "pose_world_landmarks"), $i(t2, "face_landmarks"), $i(t2, "left_hand_landmarks"), $i(t2, "left_hand_world_landmarks"), $i(t2, "right_hand_landmarks"), $i(t2, "right_hand_world_landmarks");
|
|
3507
3507
|
const e2 = new Di(), n2 = new bi();
|
|
3508
|
-
Ke(n2, 1, ae("type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"), ""), function(t3, e3) {
|
|
3508
|
+
Ke(n2, 1, ae("type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"), ""), (function(t3, e3) {
|
|
3509
3509
|
if (null != e3) if (Array.isArray(e3)) De(t3, 2, Re(e3));
|
|
3510
3510
|
else {
|
|
3511
3511
|
if (!("string" == typeof e3 || e3 instanceof N || O(e3))) throw Error("invalid value in Any.value field: " + e3 + " expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");
|
|
3512
3512
|
Ke(t3, 2, ft(e3, false), U());
|
|
3513
3513
|
}
|
|
3514
|
-
}(n2, this.j.g());
|
|
3514
|
+
})(n2, this.j.g());
|
|
3515
3515
|
const r2 = new Xi();
|
|
3516
|
-
Gi(r2, "mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"), hn(r2, 8, bi, n2), ji(r2, "IMAGE:input_frames_image"), Vi(r2, "POSE_LANDMARKS:pose_landmarks"), Vi(r2, "POSE_WORLD_LANDMARKS:pose_world_landmarks"), Vi(r2, "FACE_LANDMARKS:face_landmarks"), Vi(r2, "LEFT_HAND_LANDMARKS:left_hand_landmarks"), Vi(r2, "LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"), Vi(r2, "RIGHT_HAND_LANDMARKS:right_hand_landmarks"), Vi(r2, "RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"), r2.o(e2), Ki(t2, r2), zo(this, t2), this.g.attachProtoListener("pose_landmarks", (t3, e3) => {
|
|
3516
|
+
Gi(r2, "mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"), hn(r2, 8, bi, n2), ji(r2, "IMAGE:input_frames_image"), Vi(r2, "POSE_LANDMARKS:pose_landmarks"), Vi(r2, "POSE_WORLD_LANDMARKS:pose_world_landmarks"), Vi(r2, "FACE_LANDMARKS:face_landmarks"), Vi(r2, "LEFT_HAND_LANDMARKS:left_hand_landmarks"), Vi(r2, "LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"), Vi(r2, "RIGHT_HAND_LANDMARKS:right_hand_landmarks"), Vi(r2, "RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"), r2.o(e2), Ki(t2, r2), zo(this, t2), this.g.attachProtoListener("pose_landmarks", ((t3, e3) => {
|
|
3517
3517
|
vc(t3, this.h.poseLandmarks), Wo(this, e3);
|
|
3518
|
-
}), this.g.attachEmptyPacketListener("pose_landmarks", (t3) => {
|
|
3518
|
+
})), this.g.attachEmptyPacketListener("pose_landmarks", ((t3) => {
|
|
3519
3519
|
Wo(this, t3);
|
|
3520
|
-
}), this.g.attachProtoListener("pose_world_landmarks", (t3, e3) => {
|
|
3520
|
+
})), this.g.attachProtoListener("pose_world_landmarks", ((t3, e3) => {
|
|
3521
3521
|
var n3 = this.h.poseWorldLandmarks;
|
|
3522
3522
|
t3 = cs(t3), n3.push(So(t3)), Wo(this, e3);
|
|
3523
|
-
}), this.g.attachEmptyPacketListener("pose_world_landmarks", (t3) => {
|
|
3523
|
+
})), this.g.attachEmptyPacketListener("pose_world_landmarks", ((t3) => {
|
|
3524
3524
|
Wo(this, t3);
|
|
3525
|
-
}), this.outputPoseSegmentationMasks && (Vi(r2, "POSE_SEGMENTATION_MASK:pose_segmentation_mask"), Ko(this, "pose_segmentation_mask"), this.g.U("pose_segmentation_mask", (t3, e3) => {
|
|
3525
|
+
})), this.outputPoseSegmentationMasks && (Vi(r2, "POSE_SEGMENTATION_MASK:pose_segmentation_mask"), Ko(this, "pose_segmentation_mask"), this.g.U("pose_segmentation_mask", ((t3, e3) => {
|
|
3526
3526
|
this.h.poseSegmentationMasks = [Ka(this, t3, true, !this.C)], Wo(this, e3);
|
|
3527
|
-
}), this.g.attachEmptyPacketListener("pose_segmentation_mask", (t3) => {
|
|
3527
|
+
})), this.g.attachEmptyPacketListener("pose_segmentation_mask", ((t3) => {
|
|
3528
3528
|
this.h.poseSegmentationMasks = [], Wo(this, t3);
|
|
3529
|
-
})), this.g.attachProtoListener("face_landmarks", (t3, e3) => {
|
|
3529
|
+
}))), this.g.attachProtoListener("face_landmarks", ((t3, e3) => {
|
|
3530
3530
|
vc(t3, this.h.faceLandmarks), Wo(this, e3);
|
|
3531
|
-
}), this.g.attachEmptyPacketListener("face_landmarks", (t3) => {
|
|
3531
|
+
})), this.g.attachEmptyPacketListener("face_landmarks", ((t3) => {
|
|
3532
3532
|
Wo(this, t3);
|
|
3533
|
-
}), this.outputFaceBlendshapes && ($i(t2, "extra_blendshapes"), Vi(r2, "FACE_BLENDSHAPES:extra_blendshapes"), this.g.attachProtoListener("extra_blendshapes", (t3, e3) => {
|
|
3533
|
+
})), this.outputFaceBlendshapes && ($i(t2, "extra_blendshapes"), Vi(r2, "FACE_BLENDSHAPES:extra_blendshapes"), this.g.attachProtoListener("extra_blendshapes", ((t3, e3) => {
|
|
3534
3534
|
var n3 = this.h.faceBlendshapes;
|
|
3535
3535
|
this.outputFaceBlendshapes && (t3 = ns(t3), n3.push(Ao(t3.g() ?? []))), Wo(this, e3);
|
|
3536
|
-
}), this.g.attachEmptyPacketListener("extra_blendshapes", (t3) => {
|
|
3536
|
+
})), this.g.attachEmptyPacketListener("extra_blendshapes", ((t3) => {
|
|
3537
3537
|
Wo(this, t3);
|
|
3538
|
-
})), this.g.attachProtoListener("left_hand_landmarks", (t3, e3) => {
|
|
3538
|
+
}))), this.g.attachProtoListener("left_hand_landmarks", ((t3, e3) => {
|
|
3539
3539
|
vc(t3, this.h.leftHandLandmarks), Wo(this, e3);
|
|
3540
|
-
}), this.g.attachEmptyPacketListener("left_hand_landmarks", (t3) => {
|
|
3540
|
+
})), this.g.attachEmptyPacketListener("left_hand_landmarks", ((t3) => {
|
|
3541
3541
|
Wo(this, t3);
|
|
3542
|
-
}), this.g.attachProtoListener("left_hand_world_landmarks", (t3, e3) => {
|
|
3542
|
+
})), this.g.attachProtoListener("left_hand_world_landmarks", ((t3, e3) => {
|
|
3543
3543
|
var n3 = this.h.leftHandWorldLandmarks;
|
|
3544
3544
|
t3 = cs(t3), n3.push(So(t3)), Wo(this, e3);
|
|
3545
|
-
}), this.g.attachEmptyPacketListener("left_hand_world_landmarks", (t3) => {
|
|
3545
|
+
})), this.g.attachEmptyPacketListener("left_hand_world_landmarks", ((t3) => {
|
|
3546
3546
|
Wo(this, t3);
|
|
3547
|
-
}), this.g.attachProtoListener("right_hand_landmarks", (t3, e3) => {
|
|
3547
|
+
})), this.g.attachProtoListener("right_hand_landmarks", ((t3, e3) => {
|
|
3548
3548
|
vc(t3, this.h.rightHandLandmarks), Wo(this, e3);
|
|
3549
|
-
}), this.g.attachEmptyPacketListener("right_hand_landmarks", (t3) => {
|
|
3549
|
+
})), this.g.attachEmptyPacketListener("right_hand_landmarks", ((t3) => {
|
|
3550
3550
|
Wo(this, t3);
|
|
3551
|
-
}), this.g.attachProtoListener("right_hand_world_landmarks", (t3, e3) => {
|
|
3551
|
+
})), this.g.attachProtoListener("right_hand_world_landmarks", ((t3, e3) => {
|
|
3552
3552
|
var n3 = this.h.rightHandWorldLandmarks;
|
|
3553
3553
|
t3 = cs(t3), n3.push(So(t3)), Wo(this, e3);
|
|
3554
|
-
}), this.g.attachEmptyPacketListener("right_hand_world_landmarks", (t3) => {
|
|
3554
|
+
})), this.g.attachEmptyPacketListener("right_hand_world_landmarks", ((t3) => {
|
|
3555
3555
|
Wo(this, t3);
|
|
3556
|
-
}), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3556
|
+
})), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3557
3557
|
}
|
|
3558
3558
|
};
|
|
3559
3559
|
Ec.prototype.detectForVideo = Ec.prototype.F, Ec.prototype.detect = Ec.prototype.D, Ec.prototype.setOptions = Ec.prototype.o, Ec.createFromModelPath = function(t2, e2) {
|
|
@@ -3588,14 +3588,14 @@ var wc = class extends Ya {
|
|
|
3588
3588
|
const e2 = new Di();
|
|
3589
3589
|
Xn(e2, co, this.h);
|
|
3590
3590
|
const n2 = new Xi();
|
|
3591
|
-
Gi(n2, "mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"), ji(n2, "IMAGE:input_image"), ji(n2, "NORM_RECT:norm_rect"), Vi(n2, "CLASSIFICATIONS:classifications"), n2.o(e2), Ki(t2, n2), this.g.attachProtoListener("classifications", (t3, e3) => {
|
|
3592
|
-
this.j = function(t4) {
|
|
3593
|
-
const e4 = { classifications: rn(t4, ps, 1).map((t5) => Ao(en(t5, ts, 4)?.g() ?? [], un(t5, 2) ?? 0, ln(t5, 3) ?? "")) };
|
|
3591
|
+
Gi(n2, "mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"), ji(n2, "IMAGE:input_image"), ji(n2, "NORM_RECT:norm_rect"), Vi(n2, "CLASSIFICATIONS:classifications"), n2.o(e2), Ki(t2, n2), this.g.attachProtoListener("classifications", ((t3, e3) => {
|
|
3592
|
+
this.j = (function(t4) {
|
|
3593
|
+
const e4 = { classifications: rn(t4, ps, 1).map(((t5) => Ao(en(t5, ts, 4)?.g() ?? [], un(t5, 2) ?? 0, ln(t5, 3) ?? ""))) };
|
|
3594
3594
|
return null != ie(Ce(t4, 2)) && (e4.timestampMs = ie(Ce(t4, 2)) ?? 0), e4;
|
|
3595
|
-
}(gs(t3)), Wo(this, e3);
|
|
3596
|
-
}), this.g.attachEmptyPacketListener("classifications", (t3) => {
|
|
3595
|
+
})(gs(t3)), Wo(this, e3);
|
|
3596
|
+
})), this.g.attachEmptyPacketListener("classifications", ((t3) => {
|
|
3597
3597
|
Wo(this, t3);
|
|
3598
|
-
}), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3598
|
+
})), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3599
3599
|
}
|
|
3600
3600
|
};
|
|
3601
3601
|
wc.prototype.classifyForVideo = wc.prototype.ta, wc.prototype.classify = wc.prototype.sa, wc.prototype.setOptions = wc.prototype.o, wc.createFromModelPath = function(t2, e2) {
|
|
@@ -3631,9 +3631,9 @@ var Tc = class extends Ya {
|
|
|
3631
3631
|
const e2 = new Di();
|
|
3632
3632
|
Xn(e2, uo, this.h);
|
|
3633
3633
|
const n2 = new Xi();
|
|
3634
|
-
Gi(n2, "mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"), ji(n2, "IMAGE:image_in"), ji(n2, "NORM_RECT:norm_rect"), Vi(n2, "EMBEDDINGS:embeddings_out"), n2.o(e2), Ki(t2, n2), this.g.attachProtoListener("embeddings_out", (t3, e3) => {
|
|
3635
|
-
t3 = Es(t3), this.embeddings = function(t4) {
|
|
3636
|
-
return { embeddings: rn(t4, _s, 1).map((t5) => {
|
|
3634
|
+
Gi(n2, "mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"), ji(n2, "IMAGE:image_in"), ji(n2, "NORM_RECT:norm_rect"), Vi(n2, "EMBEDDINGS:embeddings_out"), n2.o(e2), Ki(t2, n2), this.g.attachProtoListener("embeddings_out", ((t3, e3) => {
|
|
3635
|
+
t3 = Es(t3), this.embeddings = (function(t4) {
|
|
3636
|
+
return { embeddings: rn(t4, _s, 1).map(((t5) => {
|
|
3637
3637
|
const e4 = { headIndex: un(t5, 3) ?? 0 ?? -1, headName: ln(t5, 4) ?? "" ?? "" };
|
|
3638
3638
|
if (void 0 !== tn(t5, ms, $e(t5, 1))) t5 = Ve(t5 = en(t5, ms, $e(t5, 1)), 1, $t, je()), e4.floatEmbedding = t5.slice();
|
|
3639
3639
|
else {
|
|
@@ -3641,11 +3641,11 @@ var Tc = class extends Ya {
|
|
|
3641
3641
|
e4.quantizedEmbedding = en(t5, ys, $e(t5, 2))?.oa()?.h() ?? n3;
|
|
3642
3642
|
}
|
|
3643
3643
|
return e4;
|
|
3644
|
-
}), timestampMs: ie(Ce(t4, 2)) ?? 0 };
|
|
3645
|
-
}(t3), Wo(this, e3);
|
|
3646
|
-
}), this.g.attachEmptyPacketListener("embeddings_out", (t3) => {
|
|
3644
|
+
})), timestampMs: ie(Ce(t4, 2)) ?? 0 };
|
|
3645
|
+
})(t3), Wo(this, e3);
|
|
3646
|
+
})), this.g.attachEmptyPacketListener("embeddings_out", ((t3) => {
|
|
3647
3647
|
Wo(this, t3);
|
|
3648
|
-
}), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3648
|
+
})), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3649
3649
|
}
|
|
3650
3650
|
};
|
|
3651
3651
|
Tc.cosineSimilarity = function(t2, e2) {
|
|
@@ -3667,9 +3667,9 @@ var Ac = class {
|
|
|
3667
3667
|
this.confidenceMasks = t2, this.categoryMask = e2, this.qualityScores = n2;
|
|
3668
3668
|
}
|
|
3669
3669
|
close() {
|
|
3670
|
-
this.confidenceMasks?.forEach((t2) => {
|
|
3670
|
+
this.confidenceMasks?.forEach(((t2) => {
|
|
3671
3671
|
t2.close();
|
|
3672
|
-
}), this.categoryMask?.close();
|
|
3672
|
+
})), this.categoryMask?.close();
|
|
3673
3673
|
}
|
|
3674
3674
|
};
|
|
3675
3675
|
function bc(t2) {
|
|
@@ -3699,13 +3699,13 @@ var Sc = class extends Ya {
|
|
|
3699
3699
|
return void 0 !== t2.displayNamesLocale ? De(this.h, 2, ae(t2.displayNamesLocale)) : "displayNamesLocale" in t2 && De(this.h, 2), "outputCategoryMask" in t2 && (this.outputCategoryMask = t2.outputCategoryMask ?? false), "outputConfidenceMasks" in t2 && (this.outputConfidenceMasks = t2.outputConfidenceMasks ?? true), super.l(t2);
|
|
3700
3700
|
}
|
|
3701
3701
|
I() {
|
|
3702
|
-
!function(t2) {
|
|
3703
|
-
const e2 = rn(t2.da(), Xi, 1).filter((t3) => (ln(t3, 1) ?? "").includes("mediapipe.tasks.TensorsToSegmentationCalculator"));
|
|
3702
|
+
!(function(t2) {
|
|
3703
|
+
const e2 = rn(t2.da(), Xi, 1).filter(((t3) => (ln(t3, 1) ?? "").includes("mediapipe.tasks.TensorsToSegmentationCalculator")));
|
|
3704
3704
|
if (t2.s = [], e2.length > 1) throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");
|
|
3705
|
-
1 === e2.length && (en(e2[0], Di, 7)?.l()?.g() ?? /* @__PURE__ */ new Map()).forEach((e3, n2) => {
|
|
3705
|
+
1 === e2.length && (en(e2[0], Di, 7)?.l()?.g() ?? /* @__PURE__ */ new Map()).forEach(((e3, n2) => {
|
|
3706
3706
|
t2.s[Number(n2)] = ln(e3, 1) ?? "";
|
|
3707
|
-
});
|
|
3708
|
-
}(this);
|
|
3707
|
+
}));
|
|
3708
|
+
})(this);
|
|
3709
3709
|
}
|
|
3710
3710
|
segment(t2, e2, n2) {
|
|
3711
3711
|
const r2 = "function" != typeof e2 ? e2 : {};
|
|
@@ -3724,19 +3724,19 @@ var Sc = class extends Ya {
|
|
|
3724
3724
|
const e2 = new Di();
|
|
3725
3725
|
Xn(e2, yo, this.h);
|
|
3726
3726
|
const n2 = new Xi();
|
|
3727
|
-
Gi(n2, "mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"), ji(n2, "IMAGE:image_in"), ji(n2, "NORM_RECT:norm_rect"), n2.o(e2), Ki(t2, n2), zo(this, t2), this.outputConfidenceMasks && ($i(t2, "confidence_masks"), Vi(n2, "CONFIDENCE_MASKS:confidence_masks"), Ko(this, "confidence_masks"), this.g.ca("confidence_masks", (t3, e3) => {
|
|
3728
|
-
this.confidenceMasks = t3.map((t4) => Ka(this, t4, true, !this.j)), Wo(this, e3);
|
|
3729
|
-
}), this.g.attachEmptyPacketListener("confidence_masks", (t3) => {
|
|
3727
|
+
Gi(n2, "mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"), ji(n2, "IMAGE:image_in"), ji(n2, "NORM_RECT:norm_rect"), n2.o(e2), Ki(t2, n2), zo(this, t2), this.outputConfidenceMasks && ($i(t2, "confidence_masks"), Vi(n2, "CONFIDENCE_MASKS:confidence_masks"), Ko(this, "confidence_masks"), this.g.ca("confidence_masks", ((t3, e3) => {
|
|
3728
|
+
this.confidenceMasks = t3.map(((t4) => Ka(this, t4, true, !this.j))), Wo(this, e3);
|
|
3729
|
+
})), this.g.attachEmptyPacketListener("confidence_masks", ((t3) => {
|
|
3730
3730
|
this.confidenceMasks = [], Wo(this, t3);
|
|
3731
|
-
})), this.outputCategoryMask && ($i(t2, "category_mask"), Vi(n2, "CATEGORY_MASK:category_mask"), Ko(this, "category_mask"), this.g.U("category_mask", (t3, e3) => {
|
|
3731
|
+
}))), this.outputCategoryMask && ($i(t2, "category_mask"), Vi(n2, "CATEGORY_MASK:category_mask"), Ko(this, "category_mask"), this.g.U("category_mask", ((t3, e3) => {
|
|
3732
3732
|
this.categoryMask = Ka(this, t3, false, !this.j), Wo(this, e3);
|
|
3733
|
-
}), this.g.attachEmptyPacketListener("category_mask", (t3) => {
|
|
3733
|
+
})), this.g.attachEmptyPacketListener("category_mask", ((t3) => {
|
|
3734
3734
|
this.categoryMask = void 0, Wo(this, t3);
|
|
3735
|
-
})), $i(t2, "quality_scores"), Vi(n2, "QUALITY_SCORES:quality_scores"), this.g.attachFloatVectorListener("quality_scores", (t3, e3) => {
|
|
3735
|
+
}))), $i(t2, "quality_scores"), Vi(n2, "QUALITY_SCORES:quality_scores"), this.g.attachFloatVectorListener("quality_scores", ((t3, e3) => {
|
|
3736
3736
|
this.qualityScores = t3, Wo(this, e3);
|
|
3737
|
-
}), this.g.attachEmptyPacketListener("quality_scores", (t3) => {
|
|
3737
|
+
})), this.g.attachEmptyPacketListener("quality_scores", ((t3) => {
|
|
3738
3738
|
this.categoryMask = void 0, Wo(this, t3);
|
|
3739
|
-
}), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3739
|
+
})), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3740
3740
|
}
|
|
3741
3741
|
};
|
|
3742
3742
|
Sc.prototype.getLabels = Sc.prototype.Da, Sc.prototype.segmentForVideo = Sc.prototype.Ma, Sc.prototype.segment = Sc.prototype.segment, Sc.prototype.setOptions = Sc.prototype.o, Sc.createFromModelPath = function(t2, e2) {
|
|
@@ -3751,9 +3751,9 @@ var xc = class {
|
|
|
3751
3751
|
this.confidenceMasks = t2, this.categoryMask = e2, this.qualityScores = n2;
|
|
3752
3752
|
}
|
|
3753
3753
|
close() {
|
|
3754
|
-
this.confidenceMasks?.forEach((t2) => {
|
|
3754
|
+
this.confidenceMasks?.forEach(((t2) => {
|
|
3755
3755
|
t2.close();
|
|
3756
|
-
}), this.categoryMask?.close();
|
|
3756
|
+
})), this.categoryMask?.close();
|
|
3757
3757
|
}
|
|
3758
3758
|
};
|
|
3759
3759
|
xc.prototype.close = xc.prototype.close;
|
|
@@ -3838,19 +3838,19 @@ var Bc = class extends Ya {
|
|
|
3838
3838
|
const e2 = new Di();
|
|
3839
3839
|
Xn(e2, yo, this.h);
|
|
3840
3840
|
const n2 = new Xi();
|
|
3841
|
-
Gi(n2, "mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph"), ji(n2, "IMAGE:image_in"), ji(n2, "ROI:roi_in"), ji(n2, "NORM_RECT:norm_rect_in"), n2.o(e2), Ki(t2, n2), zo(this, t2), this.outputConfidenceMasks && ($i(t2, "confidence_masks"), Vi(n2, "CONFIDENCE_MASKS:confidence_masks"), Ko(this, "confidence_masks"), this.g.ca("confidence_masks", (t3, e3) => {
|
|
3842
|
-
this.confidenceMasks = t3.map((t4) => Ka(this, t4, true, !this.j)), Wo(this, e3);
|
|
3843
|
-
}), this.g.attachEmptyPacketListener("confidence_masks", (t3) => {
|
|
3841
|
+
Gi(n2, "mediapipe.tasks.vision.interactive_segmenter.InteractiveSegmenterGraph"), ji(n2, "IMAGE:image_in"), ji(n2, "ROI:roi_in"), ji(n2, "NORM_RECT:norm_rect_in"), n2.o(e2), Ki(t2, n2), zo(this, t2), this.outputConfidenceMasks && ($i(t2, "confidence_masks"), Vi(n2, "CONFIDENCE_MASKS:confidence_masks"), Ko(this, "confidence_masks"), this.g.ca("confidence_masks", ((t3, e3) => {
|
|
3842
|
+
this.confidenceMasks = t3.map(((t4) => Ka(this, t4, true, !this.j))), Wo(this, e3);
|
|
3843
|
+
})), this.g.attachEmptyPacketListener("confidence_masks", ((t3) => {
|
|
3844
3844
|
this.confidenceMasks = [], Wo(this, t3);
|
|
3845
|
-
})), this.outputCategoryMask && ($i(t2, "category_mask"), Vi(n2, "CATEGORY_MASK:category_mask"), Ko(this, "category_mask"), this.g.U("category_mask", (t3, e3) => {
|
|
3845
|
+
}))), this.outputCategoryMask && ($i(t2, "category_mask"), Vi(n2, "CATEGORY_MASK:category_mask"), Ko(this, "category_mask"), this.g.U("category_mask", ((t3, e3) => {
|
|
3846
3846
|
this.categoryMask = Ka(this, t3, false, !this.j), Wo(this, e3);
|
|
3847
|
-
}), this.g.attachEmptyPacketListener("category_mask", (t3) => {
|
|
3847
|
+
})), this.g.attachEmptyPacketListener("category_mask", ((t3) => {
|
|
3848
3848
|
this.categoryMask = void 0, Wo(this, t3);
|
|
3849
|
-
})), $i(t2, "quality_scores"), Vi(n2, "QUALITY_SCORES:quality_scores"), this.g.attachFloatVectorListener("quality_scores", (t3, e3) => {
|
|
3849
|
+
}))), $i(t2, "quality_scores"), Vi(n2, "QUALITY_SCORES:quality_scores"), this.g.attachFloatVectorListener("quality_scores", ((t3, e3) => {
|
|
3850
3850
|
this.qualityScores = t3, Wo(this, e3);
|
|
3851
|
-
}), this.g.attachEmptyPacketListener("quality_scores", (t3) => {
|
|
3851
|
+
})), this.g.attachEmptyPacketListener("quality_scores", ((t3) => {
|
|
3852
3852
|
this.categoryMask = void 0, Wo(this, t3);
|
|
3853
|
-
}), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3853
|
+
})), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3854
3854
|
}
|
|
3855
3855
|
};
|
|
3856
3856
|
Bc.prototype.segment = Bc.prototype.segment, Bc.prototype.setOptions = Bc.prototype.o, Bc.createFromModelPath = function(t2, e2) {
|
|
@@ -3885,12 +3885,12 @@ var Gc = class extends Ya {
|
|
|
3885
3885
|
const e2 = new Di();
|
|
3886
3886
|
Xn(e2, vo, this.h);
|
|
3887
3887
|
const n2 = new Xi();
|
|
3888
|
-
Gi(n2, "mediapipe.tasks.vision.ObjectDetectorGraph"), ji(n2, "IMAGE:input_frame_gpu"), ji(n2, "NORM_RECT:norm_rect"), Vi(n2, "DETECTIONS:detections"), n2.o(e2), Ki(t2, n2), this.g.attachProtoVectorListener("detections", (t3, e3) => {
|
|
3888
|
+
Gi(n2, "mediapipe.tasks.vision.ObjectDetectorGraph"), ji(n2, "IMAGE:input_frame_gpu"), ji(n2, "NORM_RECT:norm_rect"), Vi(n2, "DETECTIONS:detections"), n2.o(e2), Ki(t2, n2), this.g.attachProtoVectorListener("detections", ((t3, e3) => {
|
|
3889
3889
|
for (const e4 of t3) t3 = os(e4), this.j.detections.push(bo(t3));
|
|
3890
3890
|
Wo(this, e3);
|
|
3891
|
-
}), this.g.attachEmptyPacketListener("detections", (t3) => {
|
|
3891
|
+
})), this.g.attachEmptyPacketListener("detections", ((t3) => {
|
|
3892
3892
|
Wo(this, t3);
|
|
3893
|
-
}), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3893
|
+
})), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3894
3894
|
}
|
|
3895
3895
|
};
|
|
3896
3896
|
Gc.prototype.detectForVideo = Gc.prototype.F, Gc.prototype.detect = Gc.prototype.D, Gc.prototype.setOptions = Gc.prototype.o, Gc.createFromModelPath = async function(t2, e2) {
|
|
@@ -3905,9 +3905,9 @@ var jc = class {
|
|
|
3905
3905
|
this.landmarks = t2, this.worldLandmarks = e2, this.segmentationMasks = n2;
|
|
3906
3906
|
}
|
|
3907
3907
|
close() {
|
|
3908
|
-
this.segmentationMasks?.forEach((t2) => {
|
|
3908
|
+
this.segmentationMasks?.forEach(((t2) => {
|
|
3909
3909
|
t2.close();
|
|
3910
|
-
});
|
|
3910
|
+
}));
|
|
3911
3911
|
}
|
|
3912
3912
|
};
|
|
3913
3913
|
function Vc(t2) {
|
|
@@ -3950,23 +3950,23 @@ var Hc = class extends Ya {
|
|
|
3950
3950
|
const e2 = new Di();
|
|
3951
3951
|
Xn(e2, wo, this.h);
|
|
3952
3952
|
const n2 = new Xi();
|
|
3953
|
-
Gi(n2, "mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"), ji(n2, "IMAGE:image_in"), ji(n2, "NORM_RECT:norm_rect"), Vi(n2, "NORM_LANDMARKS:normalized_landmarks"), Vi(n2, "WORLD_LANDMARKS:world_landmarks"), n2.o(e2), Ki(t2, n2), zo(this, t2), this.g.attachProtoVectorListener("normalized_landmarks", (t3, e3) => {
|
|
3953
|
+
Gi(n2, "mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"), ji(n2, "IMAGE:image_in"), ji(n2, "NORM_RECT:norm_rect"), Vi(n2, "NORM_LANDMARKS:normalized_landmarks"), Vi(n2, "WORLD_LANDMARKS:world_landmarks"), n2.o(e2), Ki(t2, n2), zo(this, t2), this.g.attachProtoVectorListener("normalized_landmarks", ((t3, e3) => {
|
|
3954
3954
|
this.landmarks = [];
|
|
3955
3955
|
for (const e4 of t3) t3 = us(e4), this.landmarks.push(ko(t3));
|
|
3956
3956
|
Wo(this, e3);
|
|
3957
|
-
}), this.g.attachEmptyPacketListener("normalized_landmarks", (t3) => {
|
|
3957
|
+
})), this.g.attachEmptyPacketListener("normalized_landmarks", ((t3) => {
|
|
3958
3958
|
this.landmarks = [], Wo(this, t3);
|
|
3959
|
-
}), this.g.attachProtoVectorListener("world_landmarks", (t3, e3) => {
|
|
3959
|
+
})), this.g.attachProtoVectorListener("world_landmarks", ((t3, e3) => {
|
|
3960
3960
|
this.worldLandmarks = [];
|
|
3961
3961
|
for (const e4 of t3) t3 = cs(e4), this.worldLandmarks.push(So(t3));
|
|
3962
3962
|
Wo(this, e3);
|
|
3963
|
-
}), this.g.attachEmptyPacketListener("world_landmarks", (t3) => {
|
|
3963
|
+
})), this.g.attachEmptyPacketListener("world_landmarks", ((t3) => {
|
|
3964
3964
|
this.worldLandmarks = [], Wo(this, t3);
|
|
3965
|
-
}), this.outputSegmentationMasks && (Vi(n2, "SEGMENTATION_MASK:segmentation_masks"), Ko(this, "segmentation_masks"), this.g.ca("segmentation_masks", (t3, e3) => {
|
|
3966
|
-
this.segmentationMasks = t3.map((t4) => Ka(this, t4, true, !this.s)), Wo(this, e3);
|
|
3967
|
-
}), this.g.attachEmptyPacketListener("segmentation_masks", (t3) => {
|
|
3965
|
+
})), this.outputSegmentationMasks && (Vi(n2, "SEGMENTATION_MASK:segmentation_masks"), Ko(this, "segmentation_masks"), this.g.ca("segmentation_masks", ((t3, e3) => {
|
|
3966
|
+
this.segmentationMasks = t3.map(((t4) => Ka(this, t4, true, !this.s))), Wo(this, e3);
|
|
3967
|
+
})), this.g.attachEmptyPacketListener("segmentation_masks", ((t3) => {
|
|
3968
3968
|
this.segmentationMasks = [], Wo(this, t3);
|
|
3969
|
-
})), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3969
|
+
}))), t2 = t2.g(), this.setGraph(new Uint8Array(t2), true);
|
|
3970
3970
|
}
|
|
3971
3971
|
};
|
|
3972
3972
|
Hc.prototype.detectForVideo = Hc.prototype.F, Hc.prototype.detect = Hc.prototype.D, Hc.prototype.setOptions = Hc.prototype.o, Hc.createFromModelPath = function(t2, e2) {
|
|
@@ -3977,7 +3977,7 @@ Hc.prototype.detectForVideo = Hc.prototype.F, Hc.prototype.detect = Hc.prototype
|
|
|
3977
3977
|
return Xa(Hc, t2, e2);
|
|
3978
3978
|
}, Hc.POSE_CONNECTIONS = mc;
|
|
3979
3979
|
|
|
3980
|
-
// src/gesture/landmarks.ts
|
|
3980
|
+
// packages/gesture-control/src/gesture/landmarks.ts
|
|
3981
3981
|
var LANDMARK = {
|
|
3982
3982
|
WRIST: 0,
|
|
3983
3983
|
THUMB_CMC: 1,
|
|
@@ -4010,7 +4010,7 @@ function midpoint(a2, b2) {
|
|
|
4010
4010
|
return { x: (a2.x + b2.x) / 2, y: (a2.y + b2.y) / 2 };
|
|
4011
4011
|
}
|
|
4012
4012
|
|
|
4013
|
-
// src/gesture/OneEuroFilter.ts
|
|
4013
|
+
// packages/gesture-control/src/gesture/OneEuroFilter.ts
|
|
4014
4014
|
function smoothingAlpha(cutoffHz, dtSec) {
|
|
4015
4015
|
const tau = 1 / (2 * Math.PI * cutoffHz);
|
|
4016
4016
|
return 1 / (1 + tau / dtSec);
|
|
@@ -4037,9 +4037,9 @@ var OneEuroFilter = class {
|
|
|
4037
4037
|
* @param dCutoff Cutoff for the derivative low-pass (Hz). 1.0 is fine.
|
|
4038
4038
|
*/
|
|
4039
4039
|
constructor(minCutoff = 1, beta = 0.01, dCutoff = 1) {
|
|
4040
|
-
this
|
|
4041
|
-
this
|
|
4042
|
-
this
|
|
4040
|
+
__publicField(this, "minCutoff", minCutoff);
|
|
4041
|
+
__publicField(this, "beta", beta);
|
|
4042
|
+
__publicField(this, "dCutoff", dCutoff);
|
|
4043
4043
|
__publicField(this, "signal", new LowPass());
|
|
4044
4044
|
__publicField(this, "derivative", new LowPass());
|
|
4045
4045
|
__publicField(this, "lastTimeSec", null);
|
|
@@ -4064,7 +4064,7 @@ var OneEuroFilter = class {
|
|
|
4064
4064
|
}
|
|
4065
4065
|
};
|
|
4066
4066
|
|
|
4067
|
-
// src/gesture/pinch.ts
|
|
4067
|
+
// packages/gesture-control/src/gesture/pinch.ts
|
|
4068
4068
|
function pinchDistance(landmarks) {
|
|
4069
4069
|
const thumb = landmarks[LANDMARK.THUMB_TIP];
|
|
4070
4070
|
const index = landmarks[LANDMARK.INDEX_TIP];
|
|
@@ -4075,9 +4075,9 @@ function pinchDistance(landmarks) {
|
|
|
4075
4075
|
}
|
|
4076
4076
|
var PinchDetector = class {
|
|
4077
4077
|
constructor(onThreshold = 0.35, offThreshold = 0.5, persistFrames = 2) {
|
|
4078
|
-
this
|
|
4079
|
-
this
|
|
4080
|
-
this
|
|
4078
|
+
__publicField(this, "onThreshold", onThreshold);
|
|
4079
|
+
__publicField(this, "offThreshold", offThreshold);
|
|
4080
|
+
__publicField(this, "persistFrames", persistFrames);
|
|
4081
4081
|
__publicField(this, "pinching", false);
|
|
4082
4082
|
__publicField(this, "pendingFrames", 0);
|
|
4083
4083
|
}
|
|
@@ -4105,7 +4105,7 @@ var PinchDetector = class {
|
|
|
4105
4105
|
}
|
|
4106
4106
|
};
|
|
4107
4107
|
|
|
4108
|
-
// src/gesture/commands.ts
|
|
4108
|
+
// packages/gesture-control/src/gesture/commands.ts
|
|
4109
4109
|
var GESTURE_COMMANDS = {
|
|
4110
4110
|
Open_Palm: { name: "halt-all", holdMs: -1 },
|
|
4111
4111
|
// holdMs filled from palmHoldMs
|
|
@@ -4114,7 +4114,7 @@ var GESTURE_COMMANDS = {
|
|
|
4114
4114
|
};
|
|
4115
4115
|
var CommandDetector = class {
|
|
4116
4116
|
constructor(palmHoldMs = 1e3) {
|
|
4117
|
-
this
|
|
4117
|
+
__publicField(this, "palmHoldMs", palmHoldMs);
|
|
4118
4118
|
/** gesture category → timestamp (ms) it was first seen in the current hold. */
|
|
4119
4119
|
__publicField(this, "heldSince", /* @__PURE__ */ new Map());
|
|
4120
4120
|
/** gestures that already fired during the current hold (cleared on release). */
|
|
@@ -4161,7 +4161,7 @@ var CommandDetector = class {
|
|
|
4161
4161
|
}
|
|
4162
4162
|
};
|
|
4163
4163
|
|
|
4164
|
-
// src/gesture/GestureController.ts
|
|
4164
|
+
// packages/gesture-control/src/gesture/GestureController.ts
|
|
4165
4165
|
var DEFAULTS = {
|
|
4166
4166
|
numHands: 1,
|
|
4167
4167
|
deviceId: "",
|
|
@@ -4253,9 +4253,7 @@ var GestureController = class {
|
|
|
4253
4253
|
// ---- Event emitter ---------------------------------------------------
|
|
4254
4254
|
on(event, handler) {
|
|
4255
4255
|
var _a2;
|
|
4256
|
-
((_a2 = this.listeners)[event] ?? (_a2[event] = /* @__PURE__ */ new Set())).add(
|
|
4257
|
-
handler
|
|
4258
|
-
);
|
|
4256
|
+
((_a2 = this.listeners)[event] ?? (_a2[event] = /* @__PURE__ */ new Set())).add(handler);
|
|
4259
4257
|
return this;
|
|
4260
4258
|
}
|
|
4261
4259
|
off(event, handler) {
|
|
@@ -4326,8 +4324,7 @@ var GestureController = class {
|
|
|
4326
4324
|
height: { ideal: 720 },
|
|
4327
4325
|
frameRate: { ideal: 60, max: 60 }
|
|
4328
4326
|
};
|
|
4329
|
-
if (this.opts.deviceId)
|
|
4330
|
-
videoConstraints.deviceId = { exact: this.opts.deviceId };
|
|
4327
|
+
if (this.opts.deviceId) videoConstraints.deviceId = { exact: this.opts.deviceId };
|
|
4331
4328
|
else videoConstraints.facingMode = "user";
|
|
4332
4329
|
const stream = await navigator.mediaDevices.getUserMedia({
|
|
4333
4330
|
video: videoConstraints,
|
|
@@ -4449,10 +4446,14 @@ var GestureController = class {
|
|
|
4449
4446
|
}
|
|
4450
4447
|
};
|
|
4451
4448
|
|
|
4452
|
-
// src/codeman/entry.ts
|
|
4449
|
+
// packages/gesture-control/src/codeman/entry.ts
|
|
4453
4450
|
var TAB_SELECTOR = ".session-tab";
|
|
4451
|
+
var PANEL_SELECTOR = ".cg-float";
|
|
4452
|
+
var DOCK_SELECTOR = ".session-tabs";
|
|
4454
4453
|
var CLICK_SELECTOR = "#runBtn, .btn-shell";
|
|
4455
4454
|
var Z2 = 2147483e3;
|
|
4455
|
+
var FLOAT_W = 640;
|
|
4456
|
+
var FLOAT_H = 420;
|
|
4456
4457
|
var DETACH_PULL_PX = 70;
|
|
4457
4458
|
var TAP_CANCEL_PX = 45;
|
|
4458
4459
|
var handColor = (handedness, pinching) => pinching ? "#4ade80" : handedness === "Right" ? "#a78bfa" : "#38bdf8";
|
|
@@ -4469,10 +4470,12 @@ var GestureBridge = class {
|
|
|
4469
4470
|
__publicField(this, "running", false);
|
|
4470
4471
|
/** Camera view: full-viewport dimmed background, or small corner preview. */
|
|
4471
4472
|
__publicField(this, "camMode", "full");
|
|
4472
|
-
/** Per-hand in-progress grab (
|
|
4473
|
+
/** Per-hand in-progress grab (a tab being pulled out, or a panel being moved). */
|
|
4473
4474
|
__publicField(this, "grabs", /* @__PURE__ */ new Map());
|
|
4474
4475
|
/** Per-hand in-progress button pinch (fires on release if it didn't drift). */
|
|
4475
4476
|
__publicField(this, "taps", /* @__PURE__ */ new Map());
|
|
4477
|
+
/** Live floating panels, keyed by session id (idempotent per id). */
|
|
4478
|
+
__publicField(this, "floats", /* @__PURE__ */ new Map());
|
|
4476
4479
|
injectStyles();
|
|
4477
4480
|
this.surface = el("div", "cg-surface");
|
|
4478
4481
|
this.canvas = el("canvas", "cg-canvas");
|
|
@@ -4506,7 +4509,7 @@ var GestureBridge = class {
|
|
|
4506
4509
|
});
|
|
4507
4510
|
this.gc.on("grab", (p2) => this.onGrab(p2.hand, p2.x, p2.y));
|
|
4508
4511
|
this.gc.on("drag", (p2) => this.onDrag(p2.hand, p2.x, p2.y));
|
|
4509
|
-
this.gc.on("drop", (p2) => this.onDrop(p2.hand));
|
|
4512
|
+
this.gc.on("drop", (p2) => this.onDrop(p2.hand, p2.x, p2.y));
|
|
4510
4513
|
this.gc.on("status", ({ fps, hands }) => this.onStatus(fps, hands));
|
|
4511
4514
|
this.button.addEventListener("click", () => void this.toggle());
|
|
4512
4515
|
this.camBtn.addEventListener("click", () => this.toggleCamMode());
|
|
@@ -4552,6 +4555,26 @@ var GestureBridge = class {
|
|
|
4552
4555
|
return hit?.closest(sel) ?? null;
|
|
4553
4556
|
}
|
|
4554
4557
|
onGrab(hand, x2, y2) {
|
|
4558
|
+
const panelEl = this.hitClosest(x2, y2, PANEL_SELECTOR);
|
|
4559
|
+
const panelId = panelEl?.dataset.id;
|
|
4560
|
+
if (panelEl && panelId) {
|
|
4561
|
+
const float = this.floats.get(panelId);
|
|
4562
|
+
if (float) {
|
|
4563
|
+
const rect = panelEl.getBoundingClientRect();
|
|
4564
|
+
panelEl.style.pointerEvents = "none";
|
|
4565
|
+
panelEl.classList.add("cg-float-grabbed");
|
|
4566
|
+
this.grabs.set(hand, {
|
|
4567
|
+
kind: "panel",
|
|
4568
|
+
id: panelId,
|
|
4569
|
+
panel: float,
|
|
4570
|
+
dx: x2 - rect.left,
|
|
4571
|
+
dy: y2 - rect.top,
|
|
4572
|
+
overDock: false
|
|
4573
|
+
});
|
|
4574
|
+
this.status.textContent = "moving \u2014 drop over tabs to re-dock";
|
|
4575
|
+
return;
|
|
4576
|
+
}
|
|
4577
|
+
}
|
|
4555
4578
|
const tab = this.hitClosest(x2, y2, TAB_SELECTOR);
|
|
4556
4579
|
const id = tab?.dataset.id;
|
|
4557
4580
|
if (tab && id) {
|
|
@@ -4563,9 +4586,8 @@ var GestureBridge = class {
|
|
|
4563
4586
|
ghost.style.height = `${rect.height}px`;
|
|
4564
4587
|
document.body.append(ghost);
|
|
4565
4588
|
tab.classList.add("cg-grabbed");
|
|
4566
|
-
|
|
4567
|
-
this.
|
|
4568
|
-
this.positionGhost(grab, x2, y2);
|
|
4589
|
+
this.grabs.set(hand, { kind: "tab", id, tab, ghost, ox: x2, oy: y2, armed: false });
|
|
4590
|
+
this.positionGhost(ghost, x2, y2);
|
|
4569
4591
|
return;
|
|
4570
4592
|
}
|
|
4571
4593
|
const btn = this.hitClosest(x2, y2, CLICK_SELECTOR);
|
|
@@ -4578,13 +4600,23 @@ var GestureBridge = class {
|
|
|
4578
4600
|
}
|
|
4579
4601
|
onDrag(hand, x2, y2) {
|
|
4580
4602
|
const grab = this.grabs.get(hand);
|
|
4581
|
-
if (grab) {
|
|
4582
|
-
this.positionGhost(grab, x2, y2);
|
|
4603
|
+
if (grab?.kind === "tab") {
|
|
4604
|
+
this.positionGhost(grab.ghost, x2, y2);
|
|
4583
4605
|
const pulled = Math.hypot(x2 - grab.ox, y2 - grab.oy) >= DETACH_PULL_PX;
|
|
4584
4606
|
if (pulled !== grab.armed) {
|
|
4585
4607
|
grab.armed = pulled;
|
|
4586
4608
|
grab.ghost.classList.toggle("cg-armed", pulled);
|
|
4587
|
-
this.status.textContent = pulled ? "release to
|
|
4609
|
+
this.status.textContent = pulled ? "release to float out" : "on \u2014 pinch a tab";
|
|
4610
|
+
}
|
|
4611
|
+
return;
|
|
4612
|
+
}
|
|
4613
|
+
if (grab?.kind === "panel") {
|
|
4614
|
+
this.moveFloat(grab.panel, x2 - grab.dx, y2 - grab.dy);
|
|
4615
|
+
const overDock = !!this.hitClosest(x2, y2, DOCK_SELECTOR);
|
|
4616
|
+
if (overDock !== grab.overDock) {
|
|
4617
|
+
grab.overDock = overDock;
|
|
4618
|
+
grab.panel.el.classList.toggle("cg-redock", overDock);
|
|
4619
|
+
this.status.textContent = overDock ? "release to re-dock" : "moving panel";
|
|
4588
4620
|
}
|
|
4589
4621
|
return;
|
|
4590
4622
|
}
|
|
@@ -4595,16 +4627,24 @@ var GestureBridge = class {
|
|
|
4595
4627
|
this.status.textContent = "on \u2014 pinch a tab or button";
|
|
4596
4628
|
}
|
|
4597
4629
|
}
|
|
4598
|
-
onDrop(hand) {
|
|
4630
|
+
onDrop(hand, x2, y2) {
|
|
4599
4631
|
const grab = this.grabs.get(hand);
|
|
4600
|
-
if (grab) {
|
|
4632
|
+
if (grab?.kind === "tab") {
|
|
4601
4633
|
this.grabs.delete(hand);
|
|
4602
4634
|
grab.ghost.remove();
|
|
4603
4635
|
grab.tab.classList.remove("cg-grabbed");
|
|
4604
|
-
if (grab.armed) this.
|
|
4636
|
+
if (grab.armed) this.floatPanel(grab.id, x2, y2);
|
|
4605
4637
|
else this.flash("cancelled");
|
|
4606
4638
|
return;
|
|
4607
4639
|
}
|
|
4640
|
+
if (grab?.kind === "panel") {
|
|
4641
|
+
this.grabs.delete(hand);
|
|
4642
|
+
grab.panel.el.style.pointerEvents = "";
|
|
4643
|
+
grab.panel.el.classList.remove("cg-float-grabbed", "cg-redock");
|
|
4644
|
+
if (grab.overDock) this.redock(grab.id);
|
|
4645
|
+
else this.flash("placed");
|
|
4646
|
+
return;
|
|
4647
|
+
}
|
|
4608
4648
|
const tap = this.taps.get(hand);
|
|
4609
4649
|
if (tap) {
|
|
4610
4650
|
this.taps.delete(hand);
|
|
@@ -4613,27 +4653,60 @@ var GestureBridge = class {
|
|
|
4613
4653
|
this.flash(tap.label.toLowerCase());
|
|
4614
4654
|
}
|
|
4615
4655
|
}
|
|
4616
|
-
/**
|
|
4617
|
-
detach
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4656
|
+
/** Pop a session into an in-page floating panel (an iframe of its solo route)
|
|
4657
|
+
* centered on the drop point. Unlike OS-window detach, the panel lives in
|
|
4658
|
+
* this page's DOM, so the hand can re-grab and move it. Idempotent per id:
|
|
4659
|
+
* re-floating an existing id just repositions the panel it already has. */
|
|
4660
|
+
floatPanel(id, x2, y2) {
|
|
4661
|
+
let float = this.floats.get(id);
|
|
4662
|
+
if (!float) {
|
|
4663
|
+
const container = el("div", "cg-float");
|
|
4664
|
+
container.dataset.id = id;
|
|
4665
|
+
const bar = el("div", "cg-float-bar");
|
|
4666
|
+
bar.textContent = `session ${id}`;
|
|
4667
|
+
const frame = el("iframe", "cg-float-frame");
|
|
4668
|
+
frame.src = `/session/${encodeURIComponent(id)}`;
|
|
4669
|
+
frame.title = `Session ${id}`;
|
|
4670
|
+
container.append(bar, frame);
|
|
4671
|
+
document.body.append(container);
|
|
4672
|
+
float = { id, el: container };
|
|
4673
|
+
this.floats.set(id, float);
|
|
4674
|
+
this.flash("floated out");
|
|
4675
|
+
} else {
|
|
4676
|
+
this.flash("re-floated");
|
|
4623
4677
|
}
|
|
4624
|
-
this.
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4678
|
+
this.moveFloat(float, x2 - FLOAT_W / 2, y2 - FLOAT_H / 2);
|
|
4679
|
+
}
|
|
4680
|
+
/** Re-dock a floated session: drop its in-page panel. The original
|
|
4681
|
+
* `.session-tab` was never removed, so the session is simply back to plain
|
|
4682
|
+
* tab form. Mirrors Codeman's own `.detached` → attach toggle. */
|
|
4683
|
+
redock(id) {
|
|
4684
|
+
const float = this.floats.get(id);
|
|
4685
|
+
if (!float) return;
|
|
4686
|
+
float.el.remove();
|
|
4687
|
+
this.floats.delete(id);
|
|
4688
|
+
this.flash("re-docked");
|
|
4689
|
+
}
|
|
4690
|
+
/** Position a float by its top-left corner, clamped to stay on-screen. */
|
|
4691
|
+
moveFloat(float, left, top) {
|
|
4692
|
+
const l = Math.min(Math.max(0, left), Math.max(0, window.innerWidth - FLOAT_W));
|
|
4693
|
+
const t2 = Math.min(Math.max(0, top), Math.max(0, window.innerHeight - FLOAT_H));
|
|
4694
|
+
float.el.style.left = `${l}px`;
|
|
4695
|
+
float.el.style.top = `${t2}px`;
|
|
4696
|
+
}
|
|
4697
|
+
positionGhost(ghost, x2, y2) {
|
|
4698
|
+
ghost.style.left = `${x2}px`;
|
|
4699
|
+
ghost.style.top = `${y2}px`;
|
|
4632
4700
|
}
|
|
4633
4701
|
cancelAllGrabs() {
|
|
4634
4702
|
for (const grab of this.grabs.values()) {
|
|
4635
|
-
grab.
|
|
4636
|
-
|
|
4703
|
+
if (grab.kind === "tab") {
|
|
4704
|
+
grab.ghost.remove();
|
|
4705
|
+
grab.tab.classList.remove("cg-grabbed");
|
|
4706
|
+
} else {
|
|
4707
|
+
grab.panel.el.style.pointerEvents = "";
|
|
4708
|
+
grab.panel.el.classList.remove("cg-float-grabbed", "cg-redock");
|
|
4709
|
+
}
|
|
4637
4710
|
}
|
|
4638
4711
|
this.grabs.clear();
|
|
4639
4712
|
for (const tap of this.taps.values()) tap.el.classList.remove("cg-tap-armed");
|
|
@@ -4724,6 +4797,20 @@ function injectStyles() {
|
|
|
4724
4797
|
.cg-status { color: #9aa0a6; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
4725
4798
|
.session-tab.cg-grabbed { opacity: .35; outline: 2px dashed #4ade80; outline-offset: -2px; }
|
|
4726
4799
|
.cg-tap-armed { outline: 2px solid #4ade80 !important; outline-offset: 2px; box-shadow: 0 0 0 4px rgba(74,222,128,.25) !important; }
|
|
4800
|
+
.cg-float {
|
|
4801
|
+
position: fixed; left: 0; top: 0; width: ${FLOAT_W}px; height: ${FLOAT_H}px;
|
|
4802
|
+
z-index: ${Z2}; display: flex; flex-direction: column; overflow: hidden;
|
|
4803
|
+
background: #0c0c0f; border-radius: 10px; outline: 2px solid #38bdf8;
|
|
4804
|
+
outline-offset: -2px; box-shadow: 0 10px 40px rgba(0,0,0,.6);
|
|
4805
|
+
}
|
|
4806
|
+
.cg-float.cg-float-grabbed { outline-color: #4ade80; box-shadow: 0 12px 48px rgba(74,222,128,.45); }
|
|
4807
|
+
.cg-float.cg-redock { outline-color: #fbbf24; box-shadow: 0 12px 48px rgba(251,191,36,.5); }
|
|
4808
|
+
.cg-float-bar {
|
|
4809
|
+
flex: 0 0 auto; padding: 4px 10px; font: 11px/1.6 system-ui, sans-serif;
|
|
4810
|
+
color: #cbd5e1; background: #15151a; border-bottom: 1px solid #2a2a30;
|
|
4811
|
+
user-select: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
4812
|
+
}
|
|
4813
|
+
.cg-float-frame { flex: 1 1 auto; width: 100%; border: 0; background: #000; }
|
|
4727
4814
|
`;
|
|
4728
4815
|
const style = document.createElement("style");
|
|
4729
4816
|
style.id = "cg-styles";
|