xvai-loi 0.1.128 → 0.1.129
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/co.txt +1 -1
- package/package.json +1 -1
- package/xvai-loi.js +11 -34
package/co.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
xvaiLoi130717
|
package/package.json
CHANGED
package/xvai-loi.js
CHANGED
|
@@ -8759,13 +8759,7 @@ function lapAnhTheoKhuon(kb, ws, K = KHUON_TOPN, toiDa = 12) {
|
|
|
8759
8759
|
const cau = W4.slice(Math.max(0, i - 5), i + 10).map((w) => w.text).join(" ");
|
|
8760
8760
|
c.kieu = "anh";
|
|
8761
8761
|
c.soAnh = 1;
|
|
8762
|
-
c.en = 'Cinematic photorealistic vertical photo that illustrates the meaning of this Vietnamese sentence: "' + cau + '". ' +
|
|
8763
|
-
try {
|
|
8764
|
-
return localStorage.getItem("xvaiLoiDanMoi") === "1";
|
|
8765
|
-
} catch (e) {
|
|
8766
|
-
return false;
|
|
8767
|
-
}
|
|
8768
|
-
})() ? "If the sentence is about people, feelings or relationships: " + K.tram.nhanVat[0] + " Otherwise: " + K.tram.nhanVat[1] : K.tram.nhanVat[doi % 2]) + " Natural light, no text, no captions.";
|
|
8762
|
+
c.en = 'Cinematic photorealistic vertical photo that illustrates the meaning of this Vietnamese sentence: "' + cau + '". ' + K.tram.nhanVat[doi % 2] + " Natural light, no text, no captions.";
|
|
8769
8763
|
doi++;
|
|
8770
8764
|
}
|
|
8771
8765
|
}
|
|
@@ -8794,13 +8788,7 @@ function lapAnhTheoKhuon(kb, ws, K = KHUON_TOPN, toiDa = 12) {
|
|
|
8794
8788
|
if (nd.length < 2) continue;
|
|
8795
8789
|
const i = nd[0], tu2 = W4.slice(i, i + 3).map((w) => sach2(w.text)).join(" "), cau = W4.slice(Math.max(0, i - 5), i + 10).map((w) => w.text).join(" ");
|
|
8796
8790
|
if (timTu(tu2) !== i) continue;
|
|
8797
|
-
kb.canh.push({ tu: tu2, kieu: "anh", chu: " ", chu2: "", khuon: 1, en: 'Cinematic photorealistic vertical photo that illustrates the meaning of this Vietnamese sentence: "' + cau + '". ' +
|
|
8798
|
-
try {
|
|
8799
|
-
return localStorage.getItem("xvaiLoiDanMoi") === "1";
|
|
8800
|
-
} catch (e) {
|
|
8801
|
-
return false;
|
|
8802
|
-
}
|
|
8803
|
-
})() ? "If the sentence is about people, feelings or relationships: " + K.tram.nhanVat[0] + " Otherwise: " + K.tram.nhanVat[1] : them % 2 ? K.tram.nhanVat[1] : K.tram.nhanVat[0]) + " Natural light, no text, no captions." });
|
|
8791
|
+
kb.canh.push({ tu: tu2, kieu: "anh", chu: " ", chu2: "", khuon: 1, en: 'Cinematic photorealistic vertical photo that illustrates the meaning of this Vietnamese sentence: "' + cau + '". ' + K.tram.nhanVat[them % 2] + " Natural light, no text, no captions." });
|
|
8804
8792
|
them++;
|
|
8805
8793
|
}
|
|
8806
8794
|
}
|
|
@@ -9616,7 +9604,9 @@ function taiLieu(g, ds2, tuoi, W4, H2, a, tieu = "") {
|
|
|
9616
9604
|
dangKy("cmNen", (g, d, tuoi, W4, H2, nen2, _s, dai2) => {
|
|
9617
9605
|
if (d.bo === "chia" && d.ten && nen2 && !(d.dong && d.dong.length) && !/^vat:/.test(String(d.ten))) {
|
|
9618
9606
|
const im0 = khungTS(d.ten, tuoi);
|
|
9619
|
-
|
|
9607
|
+
const kd = d._goc || d, MK = globalThis.__matKhung;
|
|
9608
|
+
if (kd.__satDinh == null) kd.__satDinh = !!(MK && MK[1] < 0.05);
|
|
9609
|
+
if (im0 && im0.height > im0.width * 1.15 && !kd.__satDinh) {
|
|
9620
9610
|
KHOI2.cmAnh(g, { ...d, _goc: d._goc || d, bo: "anh", pip: 1 }, tuoi, W4, H2, nen2, _s, dai2);
|
|
9621
9611
|
return;
|
|
9622
9612
|
}
|
|
@@ -11004,7 +10994,8 @@ function lapCuongMe(o) {
|
|
|
11004
10994
|
de(f2, dV, { uuTien: UT.so + 5, bo: "anh", ten: ten2, chu: chuK, chu2: chu22, keu: "whoosh", video: 1 }, 3, datAnh);
|
|
11005
10995
|
ghiL("video", { bo: "anh", f: f2, d: dV }, "kho video: ung vien clip " + dV.toFixed(1) + " s thay anh: " + String(x.tu || ""));
|
|
11006
10996
|
} 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)(
|
|
11007
|
-
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" }
|
|
10997
|
+
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" } : (F(f2, f2 + 2.4) || [0, 1])[1] < 0.05 ? { bo: "chia", ten: ten2, chu: chuK, keu: "whoosh" } : { bo: "anh", ten: ten2, chu: chuK, chu2: chu22, pip: 1, keu: "whoosh" }
|
|
10998
|
+
/* F3b 13/10 (B06: tóc chạm mép trên khung người nói → ô người luôn sát đỉnh 34–42 % khung): đầu không có khoảng trống trên → chia đôi thay ô người */
|
|
11008
10999
|
/* Lát 3 #2 CHƯA: thử chọn bố cục theo nội dung ảnh 12/10 → D03 tụt 5,3 s trám → trả lại; cần đo tỉ lệ kiểu bố cục đối thủ làm chuẩn trước */
|
|
11009
11000
|
) : { bo: "kinh", dong: [chuK, chu22].filter(Boolean), keu: "whoosh" } }, 3, datAnh);
|
|
11010
11001
|
else if (x.kieu === "vat") {
|
|
@@ -11044,7 +11035,7 @@ function lapCuongMe(o) {
|
|
|
11044
11035
|
const x = c[2], f2 = c[0], d2 = c[1] + 0.4;
|
|
11045
11036
|
if (!(x.bo === "anh" || x.bo === "chia") || !x.ten || x.video || x.uuTien !== UT.anh || c[1] > 2.4) return;
|
|
11046
11037
|
if (ung.some((k) => k !== c && k[0] > f2 + 0.5 && k[0] < f2 + d2 + 0.15) || gioLogo(f2 + c[1], f2 + d2) >= 0) return;
|
|
11047
|
-
ghiL("keo", { bo: x.bo, f: f2, d: c[1] }, "anh AI
|
|
11038
|
+
ghiL("keo", { bo: x.bo, f: f2, d: c[1] }, "anh AI: trong 0,4 s ke \u2192 dai them 0,4 s", [f2, f2 + d2]);
|
|
11048
11039
|
c[1] = d2;
|
|
11049
11040
|
});
|
|
11050
11041
|
ung.sort((p, q) => (q[2].uuTien || 0) - (p[2].uuTien || 0) || p[0] - q[0]);
|
|
@@ -18517,16 +18508,8 @@ function lichDoan(clips) {
|
|
|
18517
18508
|
|
|
18518
18509
|
// flow-src/engine/taiSanAI.ts
|
|
18519
18510
|
var NEN = ", isolated on a plain flat light grey studio background, soft even light, no shadow on background, no text, no watermark, photorealistic";
|
|
18520
|
-
var CO_NGUOI = ["man", "woman", "men", "women", "people", "person", "boy", "girl", "child", "children", "family", "worker", "workers", "crowd", "face", "faces", "he", "she", "couple", "friends"];
|
|
18521
|
-
var ANH_MOI = (x, i = 0) => "Cinematic photorealistic vertical photo, " + x + (CO_NGUOI.some((w) => (" " + x.toLowerCase().replace(/[^a-z]+/g, " ") + " ").indexOf(" " + w + " ") >= 0) ? ", Vietnamese people and setting" : ", Vietnamese setting") + ", natural light, shallow depth of field, rich detail, no text, no watermark, no logo";
|
|
18522
18511
|
var ANH_CU = (x, i = 0) => "Cinematic photorealistic vertical photo, " + x + (i % 2 || /no faces/i.test(x) ? ", Vietnamese setting, close-up of objects, hands or place, no faces" : ", Vietnamese people and setting") + ", natural light, shallow depth of field, rich detail, no text, no watermark, no logo";
|
|
18523
|
-
var ANH =
|
|
18524
|
-
try {
|
|
18525
|
-
return localStorage.getItem("xvaiLoiDanMoi") === "1";
|
|
18526
|
-
} catch (e) {
|
|
18527
|
-
return false;
|
|
18528
|
-
}
|
|
18529
|
-
})() ? ANH_MOI : ANH_CU)(x, i);
|
|
18512
|
+
var ANH = ANH_CU;
|
|
18530
18513
|
var V3D = (x) => "A single glossy 3D render of " + x + ", bold shapes, warm orange and white palette, soft studio light" + NEN;
|
|
18531
18514
|
var ICON = (x) => "A single glossy 3D icon of " + x + ", premium app-icon style, smooth plastic and metal materials, vivid but tasteful colors, soft studio lighting, subtle reflection, centered, isolated" + NEN;
|
|
18532
18515
|
var ICON3D = [["xu", "a shiny gold coin with a dollar sign"], ["dongho", "a modern round alarm clock"], ["canh", "a yellow warning triangle with an exclamation mark"], ["tich", "a green rounded check mark badge"], ["sao", "a golden star"], ["tim", "a glossy red heart"], ["bieu", "a rising bar chart with an upward arrow"], ["lua", "a glowing orange fire flame"], ["tenlua", "a small white and red rocket launching upward"], ["bongden", "a glowing yellow light bulb"], ["qua", "a red gift box with a gold ribbon"], ["giohang", "a shopping cart"], ["nha", "a small modern house"], ["sach", "an open book"], ["dienthoai", "a modern smartphone"], ["cup", "a golden trophy cup"], ["khien", "a blue shield with a white check mark"], ["la", "a fresh green leaf"], ["giot", "a clear blue water drop"], ["kinhlup", "a magnifying glass"], ["sai", "a red cross X mark badge"]];
|
|
@@ -18672,13 +18655,7 @@ function dsTaiSan(kieu, kb) {
|
|
|
18672
18655
|
});
|
|
18673
18656
|
(kb?.muc || []).slice(0, 8).forEach((m) => {
|
|
18674
18657
|
const ten2 = String(m && m.ten || "").trim();
|
|
18675
|
-
if (ten2) ds2.push(["trang:" + ten2.toLocaleLowerCase("vi").replace(/[^\p{L}\p{N}]+/gu, ""), !/SKILL|CÔNG CỤ|CONG CU|TOOL|APP/i.test(String(kb?.nhom || "")) ? 'Cinematic photorealistic wide scene illustrating "' + ten2.slice(0, 40) + '"' + (m.mo ? ": " + String(m.mo).slice(0, 60) : "") + ", Vietnamese everyday context, natural light, clear single subject, no text, no letters, no watermark" : (()
|
|
18676
|
-
try {
|
|
18677
|
-
return localStorage.getItem("xvaiLoiDanMoi") === "1";
|
|
18678
|
-
} catch (e) {
|
|
18679
|
-
return false;
|
|
18680
|
-
}
|
|
18681
|
-
})() ? 'A realistic desktop screenshot of the official website or main product page of "' + ten2.slice(0, 40) + '"' + (m.mo ? " (" + String(m.mo).slice(0, 60) + ")" : "") + ', clean modern interface, product name clearly reading "' + ten2.slice(0, 40) + '", crisp readable UI text, no people, no watermark' : 'A realistic desktop browser screenshot of the GitHub repository page of the AI skill "' + ten2.slice(0, 40) + '"' + (m.mo ? " (" + String(m.mo).slice(0, 60) + ")" : "") + ', dark GitHub theme, repository name and README title clearly reading "' + ten2.slice(0, 40) + '", short bullet list, file tree, crisp readable UI text, no people, no watermark', "16:9"]);
|
|
18658
|
+
if (ten2) ds2.push(["trang:" + ten2.toLocaleLowerCase("vi").replace(/[^\p{L}\p{N}]+/gu, ""), !/SKILL|CÔNG CỤ|CONG CU|TOOL|APP/i.test(String(kb?.nhom || "")) ? 'Cinematic photorealistic wide scene illustrating "' + ten2.slice(0, 40) + '"' + (m.mo ? ": " + String(m.mo).slice(0, 60) : "") + ", Vietnamese everyday context, natural light, clear single subject, no text, no letters, no watermark" : 'A realistic desktop browser screenshot of the GitHub repository page of the AI skill "' + ten2.slice(0, 40) + '"' + (m.mo ? " (" + String(m.mo).slice(0, 60) + ")" : "") + ', dark GitHub theme, repository name and README title clearly reading "' + ten2.slice(0, 40) + '", short bullet list, file tree, crisp readable UI text, no people, no watermark', "16:9"]);
|
|
18682
18659
|
});
|
|
18683
18660
|
const TRAN_ANH = (() => {
|
|
18684
18661
|
try {
|
|
@@ -20858,7 +20835,7 @@ function datCauLenh(a) {
|
|
|
20858
20835
|
on2 = true;
|
|
20859
20836
|
window.addEventListener("message", async (ev) => {
|
|
20860
20837
|
const d = ev.data;
|
|
20861
|
-
if (!d || d.
|
|
20838
|
+
if (!d || d.xvaiLoi130717 !== true) return;
|
|
20862
20839
|
const o = String(ev.origin || "");
|
|
20863
20840
|
if (!(o.indexOf("https://flow.google.com") === 0 || o.indexOf("https://labs.google") === 0)) return;
|
|
20864
20841
|
const tra = (kq) => {
|