xvai-loi 0.1.67 → 0.1.68

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 +16 -9
package/co.txt CHANGED
@@ -1 +1 @@
1
- xvaiLoi111619
1
+ xvaiLoi111649
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xvai-loi",
3
- "version": "0.1.67",
3
+ "version": "0.1.68",
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
@@ -9825,8 +9825,8 @@ var KHUON_TOPN = {
9825
9825
  chu: { phut: [8, 18] },
9826
9826
  icon: { phut: 11.5 },
9827
9827
  cat: { moi10s: [4, 6] },
9828
- nguoi: { phongToiDa: 1.8 },
9829
- // MỌI ô người (PIP, thẻ, chia) phóng khung gốc tối đa 1,8× (độ nét) — trước: PIP 1,6, thẻ 1,3 (B05-1027: thẻ hiện cả người nhỏ)
9828
+ nguoi: { phongToiDa: 1.8, matToiDa: 0.55 },
9829
+ // matToiDa: hộp đầu (tóc→cằm) cao hơn 0,55 H thì KHÔNG dùng ô người / chia (không vừa ô) // MỌI ô người (PIP, thẻ, chia) phóng khung gốc tối đa 1,8× (độ nét) — trước: PIP 1,6, thẻ 1,3 (B05-1027: thẻ hiện cả người nhỏ)
9830
9830
  bien: { dau: 3, cuoi: 2.5, ctaAnh: true }
9831
9831
  // không đặt ảnh trám ở 3 s đầu (móc) và 2,5 s cuối; vùng CTA VẪN có ảnh (đối thủ CTA 8,7 s vẫn trám)
9832
9832
  };
@@ -11864,7 +11864,7 @@ function lapCuongMe(o) {
11864
11864
  if (x.kieu === "anh" && dV) {
11865
11865
  de(f2, dV, { uuTien: UT.so + 5, bo: "anh", ten: ten2, chu: chuK, chu2: chu22, keu: "whoosh", video: 1 }, 3, datAnh);
11866
11866
  ghiL("video", { bo: "anh", f: f2, d: dV }, "kho video: ung vien clip " + dV.toFixed(1) + " s thay anh: " + String(x.tu || ""));
11867
- } else if (x.kieu === "anh" && (co || chuK)) de(f2, (f2 < f1 ? 2 : 2.4) * kTram(), { uuTien: UT.anh, ...co ? nAnh++ % 3 === 0 || !F(f2, f2 + 2.4) ? { 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);
11867
+ } else if (x.kieu === "anh" && (co || chuK)) de(f2, (f2 < f1 ? 2 : 2.4) * kTram(), { uuTien: UT.anh, ...co ? nAnh++ % 3 === 0 || !((fb) => fb && fb[3] - fb[1] < KHUON_TOPN.nguoi.matToiDa)(F(f2, f2 + 2.4)) ? { 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);
11868
11868
  else if (x.kieu === "vat") {
11869
11869
  const LG = timLogo(suaChu(chuK + " " + sach3(String(x.tu || ""))))[0];
11870
11870
  if (LG) napHinhLogo(LG.slug);
@@ -18137,7 +18137,9 @@ async function themKho(files) {
18137
18137
  if (n) {
18138
18138
  try {
18139
18139
  const ds2 = await layKho();
18140
- hoiNgoai("luu", "khoVideo", ds2.map((m) => ({ id: m.id, ten: m.ten, blob: m.blob, loai: m.loai, dai: m.dai || 0 })));
18140
+ const L = ds2.map((m) => ({ id: m.id, ten: m.ten, blob: m.blob, loai: m.loai, dai: m.dai || 0 }));
18141
+ globalThis.__khoNgoai = L;
18142
+ hoiNgoai("luu", "khoVideo", L);
18141
18143
  } catch (e) {
18142
18144
  }
18143
18145
  }
@@ -18172,11 +18174,16 @@ async function layKho() {
18172
18174
  ok();
18173
18175
  }
18174
18176
  });
18175
- if (!ds2.length) {
18176
- const ng = await hoiNgoai("lay", "khoVideo");
18177
+ {
18178
+ const G3 = globalThis, rong = !ds2.length;
18179
+ if (!G3.__khoNgoai) {
18180
+ const ng0 = await hoiNgoai("lay", "khoVideo");
18181
+ G3.__khoNgoai = Array.isArray(ng0) ? ng0 : [];
18182
+ }
18183
+ const ng = G3.__khoNgoai, coS = new Set(ds2.map((x) => x.id));
18177
18184
  if (Array.isArray(ng)) for (const m of ng) {
18178
- if (!m || !m.blob) continue;
18179
- if (d) {
18185
+ if (!m || !m.blob || coS.has(String(m.id))) continue;
18186
+ if (d && rong) {
18180
18187
  try {
18181
18188
  d.transaction("kho", "readwrite").objectStore("kho").put({ ten: m.ten, blob: m.blob, loai: m.loai, dai: m.dai }, m.id);
18182
18189
  } catch (e) {
@@ -20699,7 +20706,7 @@ function datCauLenh(a) {
20699
20706
  on2 = true;
20700
20707
  window.addEventListener("message", async (ev) => {
20701
20708
  const d = ev.data;
20702
- if (!d || d.xvaiLoi111619 !== true) return;
20709
+ if (!d || d.xvaiLoi111649 !== true) return;
20703
20710
  const o = String(ev.origin || "");
20704
20711
  if (!(o.indexOf("https://flow.google.com") === 0 || o.indexOf("https://labs.google") === 0)) return;
20705
20712
  const tra = (kq) => {