xvai-loi 0.1.86 → 0.1.87

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/co.txt +1 -1
  2. package/package.json +1 -1
  3. package/xvai-loi.js +8 -2
package/co.txt CHANGED
@@ -1 +1 @@
1
- xvaiLoi120301
1
+ xvaiLoi120323
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xvai-loi",
3
- "version": "0.1.86",
3
+ "version": "0.1.87",
4
4
  "description": "Loi dung video (Edit Video Tu Dong) nap vao tool Google Flow qua o cam engine/oCam.ts",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
package/xvai-loi.js CHANGED
@@ -11549,6 +11549,12 @@ function lapCuongMe(o) {
11549
11549
  the0(a, a + (t1 - t0), d);
11550
11550
  };
11551
11551
  const F = (fa, fb) => matRa(fm, nguon3(fa), nguon3(fb), [0, 0, 0, 0], 1, zc);
11552
+ const yenMat = (fa, fb) => {
11553
+ const a0 = nguon3(fa), b0 = nguon3(fb), ss = (fm || []).filter((x) => x && x.face && x.t >= a0 && x.t <= b0).map((x) => x.face);
11554
+ if (ss.length < 2) return true;
11555
+ const cx = ss.map((q) => q.x + q.w / 2), cy = ss.map((q) => q.y + q.h / 2), hh = ss.map((q) => q.h);
11556
+ return Math.max(...cx) - Math.min(...cx) <= 0.12 && Math.max(...cy) - Math.min(...cy) <= 0.08 && Math.max(...hh) / Math.max(1e-6, Math.min(...hh)) <= 1.35;
11557
+ };
11552
11558
  const tyLeMat = (fa, fb) => {
11553
11559
  const a0 = nguon3(fa), b0 = nguon3(fb), ss = (fm || []).filter((x) => x && x.t >= a0 && x.t <= b0);
11554
11560
  return ss.length ? ss.filter((x) => x.face).length / ss.length : 0;
@@ -11953,7 +11959,7 @@ function lapCuongMe(o) {
11953
11959
  if (x.kieu === "anh" && dV) {
11954
11960
  de(f2, dV, { uuTien: UT.so + 5, bo: "anh", ten: ten2, chu: chuK, chu2: chu22, keu: "whoosh", video: 1 }, 3, datAnh);
11955
11961
  ghiL("video", { bo: "anh", f: f2, d: dV }, "kho video: ung vien clip " + dV.toFixed(1) + " s thay anh: " + String(x.tu || ""));
11956
- } else if (x.kieu === "anh" && (co || chuK)) de(f2, (f2 < f1 ? 2 : 2.4) * kTram(), { uuTien: UT.anh, ...co ? ((o2) => x.khuon ? { ...o2, keu: "" } : o2)(nAnh++ % 3 === 0 || !((fb) => fb && fb[3] - fb[1] < KHUON_TOPN.nguoi.matToiDa)(F(f2, f2 + 2.4)) || tyLeMat(f2, f2 + 2.4) < 0.7 ? { bo: "anh", ten: ten2, chu: chuK, chu2: chu22, keu: "whoosh" } : (nAnh - 1) % 3 === 1 ? { bo: "chia", ten: ten2, chu: chuK, keu: "whoosh" } : { bo: "anh", ten: ten2, chu: chuK, chu2: chu22, pip: 1, keu: "whoosh" }) : { bo: "kinh", dong: [chuK, chu22].filter(Boolean), keu: "whoosh" } }, 3, datAnh);
11962
+ } else if (x.kieu === "anh" && (co || chuK)) de(f2, (f2 < f1 ? 2 : 2.4) * kTram(), { uuTien: UT.anh, ...co ? ((o2) => x.khuon ? { ...o2, keu: "" } : o2)(nAnh++ % 3 === 0 || !((fb) => fb && fb[3] - fb[1] < KHUON_TOPN.nguoi.matToiDa)(F(f2, f2 + 2.4)) || tyLeMat(f2, f2 + 2.4) < 0.7 || !yenMat(f2, f2 + 3.6) ? { bo: "anh", ten: ten2, chu: chuK, chu2: chu22, keu: "whoosh" } : (nAnh - 1) % 3 === 1 ? { bo: "chia", ten: ten2, chu: chuK, keu: "whoosh" } : { bo: "anh", ten: ten2, chu: chuK, chu2: chu22, pip: 1, keu: "whoosh" }) : { bo: "kinh", dong: [chuK, chu22].filter(Boolean), keu: "whoosh" } }, 3, datAnh);
11957
11963
  else if (x.kieu === "vat") {
11958
11964
  const LG = timLogo(suaChu(chuK + " " + sach3(String(x.tu || ""))))[0];
11959
11965
  if (LG) napHinhLogo(LG.slug);
@@ -21003,7 +21009,7 @@ function datCauLenh(a) {
21003
21009
  on2 = true;
21004
21010
  window.addEventListener("message", async (ev) => {
21005
21011
  const d = ev.data;
21006
- if (!d || d.xvaiLoi120301 !== true) return;
21012
+ if (!d || d.xvaiLoi120323 !== true) return;
21007
21013
  const o = String(ev.origin || "");
21008
21014
  if (!(o.indexOf("https://flow.google.com") === 0 || o.indexOf("https://labs.google") === 0)) return;
21009
21015
  const tra = (kq) => {