xvai-loi 0.1.89 → 0.1.91

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 +7 -6
package/co.txt CHANGED
@@ -1 +1 @@
1
- xvaiLoi120610
1
+ xvaiLoi120612
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xvai-loi",
3
- "version": "0.1.89",
3
+ "version": "0.1.91",
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
@@ -10536,7 +10536,7 @@ function docDemo(g, d, tuoi, W4, hT) {
10536
10536
  g.restore();
10537
10537
  }
10538
10538
  function taiLieu(g, ds2, tuoi, W4, H2, a) {
10539
- const x = 0.12 * W4, y = 0.16 * H2, w = 0.76 * W4, dh = 0.034 * H2, h = 0.06 * H2 + ds2.length * dh + 0.02 * H2, k = eSoft(tuoi / 0.3);
10539
+ const n = Math.max(1, ds2.length), dh = Math.min(0.06 * H2, Math.max(0.034 * H2, 0.22 * H2 / n)), h = 0.06 * H2 + n * dh + 0.02 * H2, x = 0.12 * W4, y = 0.16 * H2 + Math.max(0, (0.3 * H2 - h) / 2), w = 0.76 * W4, k = eSoft(tuoi / 0.3);
10540
10540
  g.save();
10541
10541
  g.globalAlpha = a;
10542
10542
  g.translate(W4 / 2, y + h / 2);
@@ -10554,14 +10554,14 @@ function taiLieu(g, ds2, tuoi, W4, H2, a) {
10554
10554
  g.fillStyle = CAM;
10555
10555
  g.fillRect(x, y, w, 0.05 * H2);
10556
10556
  g.restore();
10557
- g.font = "900 " + (0.022 * H2).toFixed(1) + "px " + FB;
10557
+ g.font = "900 " + (0.026 * H2).toFixed(1) + "px " + FB;
10558
10558
  g.fillStyle = "#fff";
10559
10559
  g.textBaseline = "middle";
10560
10560
  g.textAlign = "left";
10561
10561
  g.fillText("C\xC0I \u0110\u1EB6T " + ds2.length + " M\u1EE4C", x + 0.04 * W4, y + 0.025 * H2);
10562
10562
  ds2.forEach((t, i) => {
10563
- const yy = y + 0.07 * H2 + i * dh, tick = tuoi > 0.5 + i * 0.18;
10564
- g.font = "700 " + (0.02 * H2).toFixed(1) + "px " + FB;
10563
+ const yy = y + 0.06 * H2 + (i + 0.5) * dh, tick = tuoi > 0.5 + i * 0.18;
10564
+ g.font = "700 " + (0.55 * dh).toFixed(1) + "px " + FB;
10565
10565
  g.fillStyle = "rgb(40,40,48)";
10566
10566
  g.fillText(t, x + 0.11 * W4, yy, w - 0.15 * W4);
10567
10567
  g.strokeStyle = tick ? "rgb(30,180,90)" : "rgba(0,0,0,0.25)";
@@ -13067,9 +13067,10 @@ function lapCuongMe(o) {
13067
13067
  const duoc = (x) => !x.ui && !x.doc && !x.hang && !x.dong && !x.tieuDoc && !x.khoa && x.f >= 3 && (x.bo === "chia" && x.ten && taiSan(x.ten) || x.bo === "card" && x.anhTren);
13068
13068
  while (D.length > tranD) {
13069
13069
  let j = -1, m = 1e9;
13070
+ const coChia = D.some((x2) => x2.bo === "chia" && duoc(x2));
13070
13071
  for (let k = 0; k < D.length; k++) {
13071
13072
  const x2 = D[k];
13072
- if (!duoc(x2)) continue;
13073
+ if (!duoc(x2) || coChia && x2.bo !== "chia") continue;
13073
13074
  const g = Math.min(k > 0 ? x2.f - D[k - 1].f : 1e9, k + 1 < D.length ? D[k + 1].f - x2.f : 1e9);
13074
13075
  if (g < m) {
13075
13076
  m = g;
@@ -21029,7 +21030,7 @@ function datCauLenh(a) {
21029
21030
  on2 = true;
21030
21031
  window.addEventListener("message", async (ev) => {
21031
21032
  const d = ev.data;
21032
- if (!d || d.xvaiLoi120610 !== true) return;
21033
+ if (!d || d.xvaiLoi120612 !== true) return;
21033
21034
  const o = String(ev.origin || "");
21034
21035
  if (!(o.indexOf("https://flow.google.com") === 0 || o.indexOf("https://labs.google") === 0)) return;
21035
21036
  const tra = (kq) => {