xvai-loi 0.1.36 → 0.1.37
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 +26 -4
package/co.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
xvaiLoi100036
|
package/package.json
CHANGED
package/xvai-loi.js
CHANGED
|
@@ -16008,6 +16008,17 @@ function qcBaoCao(project, seconds) {
|
|
|
16008
16008
|
return "Phim " + dur.toFixed(1) + " s \xB7 xu\u1EA5t " + Math.round(seconds) + " s \xB7 " + subs.length + " trang ch\u1EEF (t\u1ED1i \u0111a " + maxWords + " t\u1EEB) \xB7 " + pills.length + " th\u1EBB nh\u1EA5n \xB7 " + ills.length + " \u1EA3nh (" + (dur ? Math.round(illSec / dur * 100) : 0) + " % th\u1EDDi l\u01B0\u1EE3ng) \xB7 ch\u1EEF n\xE9 m\u1EB7t " + placed + "/" + (subs.length + pills.length) + " \xB7 hook 3 s: " + (hook ? "c\xF3" : "kh\xF4ng") + " \xB7 ch\u1ED1ng rung " + (fx.stabilize ?? 1) + " \xB7 l\xE0m \u0111\u1EB9p " + (fx.beauty ?? 2) + " \xB7 s\u1EA1ch ti\u1EBFng " + (fx.voice ?? 1) + " \xB7 r\u0103ng " + (fx.teeth ?? 1 ? "b\u1EADt" : "t\u1EAFt") + " \xB7 r\xFAt l\u1EB7ng " + rut.toFixed(1) + " s" + mau7;
|
|
16009
16009
|
}
|
|
16010
16010
|
|
|
16011
|
+
// flow-src/engine/lichV2.ts
|
|
16012
|
+
var idCanh = (f2, bo4) => Math.round(f2 * 10) + "-" + bo4;
|
|
16013
|
+
function tuSp(duAn, sp, sua, daiS) {
|
|
16014
|
+
const canh = (sp || []).map((s) => ({ id: s.id || idCanh(s.f, s.bo), f: +(+s.f).toFixed(2), d: +(+s.d).toFixed(2), bo: s.bo, giant: s.giant || "", chu: s.chu || "", chu2: s.chu2 || "", st: s.st || "", ten: s.ten || "", tieu: s.tieu || "", aiTao: s.khoa ? 0 : 1, khoa: s.khoa ? 1 : 0 }));
|
|
16015
|
+
for (const t of sua && Array.isArray(sua.them) ? sua.them : []) if (t && typeof t.f === "number") canh.push({ id: idCanh(t.f, t.bo || "depth"), f: +(+t.f).toFixed(2), d: +(+t.d).toFixed(2), bo: t.bo || "depth", giant: t.giant || "", chu: t.chu || "", ten: t.ten || "", aiTao: 0, khoa: 1, moi: 1 });
|
|
16016
|
+
canh.sort((a, b) => a.f - b.f);
|
|
16017
|
+
const ts2 = /* @__PURE__ */ new Map();
|
|
16018
|
+
for (const c of canh) if (c.ten) ts2.set(c.ten, { ten: c.ten, loai: "anh" });
|
|
16019
|
+
return { v: 2, duAn, luc: Date.now(), nguon: { daiS: +daiS.toFixed(2) }, quyetDinh: { canh }, taiSan: [...ts2.values()] };
|
|
16020
|
+
}
|
|
16021
|
+
|
|
16011
16022
|
// flow-src/utils.ts
|
|
16012
16023
|
var sanitizeFilename = (name) => {
|
|
16013
16024
|
const str = name.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[đĐ]/g, "d").replace(/([^0-9a-z-\s])/g, "").replace(/(\s+)/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, "");
|
|
@@ -17375,7 +17386,18 @@ async function handleExport(currentProject, setExporting, setExportedBlob, addLo
|
|
|
17375
17386
|
async function handleExportProject(currentProject, showToast) {
|
|
17376
17387
|
if (!currentProject) return;
|
|
17377
17388
|
try {
|
|
17378
|
-
const
|
|
17389
|
+
const G = globalThis;
|
|
17390
|
+
let lichV2 = void 0;
|
|
17391
|
+
try {
|
|
17392
|
+
if (Array.isArray(G.__lichSp) && G.__lichSp.length) {
|
|
17393
|
+
const tl = currentProject.timeline || [];
|
|
17394
|
+
const dai2 = tl.reduce((a, c) => a + Math.max(0, (+c.trimEnd || 0) - (+c.trimStart || 0)), 0);
|
|
17395
|
+
lichV2 = tuSp(currentProject.name || currentProject.id, G.__lichSp, G.__lichSua, dai2);
|
|
17396
|
+
G.__lichV2 = lichV2;
|
|
17397
|
+
}
|
|
17398
|
+
} catch (e) {
|
|
17399
|
+
}
|
|
17400
|
+
const data = JSON.stringify(lichV2 ? { ...currentProject, lichV2 } : currentProject, null, 2);
|
|
17379
17401
|
const base64 = btoa(unescape(encodeURIComponent(data)));
|
|
17380
17402
|
const filename = `project-${currentProject.id.slice(0, 8)}.json`;
|
|
17381
17403
|
await Flow.download({ base64, mimeType: "application/json", filename });
|
|
@@ -18967,7 +18989,7 @@ async function napLoi(d) {
|
|
|
18967
18989
|
return "LOI: " + String(e && e.message || e).slice(0, 300);
|
|
18968
18990
|
}
|
|
18969
18991
|
}
|
|
18970
|
-
var LOI_URL = "https://cdn.jsdelivr.net/npm/xvai-loi@0.1.
|
|
18992
|
+
var LOI_URL = "https://cdn.jsdelivr.net/npm/xvai-loi@0.1.36/nap.js";
|
|
18971
18993
|
var TRONG_LOI = !!globalThis.__xvaiReact;
|
|
18972
18994
|
try {
|
|
18973
18995
|
if (!TRONG_LOI) setTimeout(() => {
|
|
@@ -18997,7 +19019,7 @@ function datCauLenh(a) {
|
|
|
18997
19019
|
on2 = true;
|
|
18998
19020
|
window.addEventListener("message", async (ev) => {
|
|
18999
19021
|
const d = ev.data;
|
|
19000
|
-
if (!d || d.
|
|
19022
|
+
if (!d || d.xvaiLoi100036 !== true) return;
|
|
19001
19023
|
const o = String(ev.origin || "");
|
|
19002
19024
|
if (!(o.indexOf("https://flow.google.com") === 0 || o.indexOf("https://labs.google") === 0)) return;
|
|
19003
19025
|
const tra = (kq) => {
|
|
@@ -19187,7 +19209,7 @@ var SuaLich = ({ ten, onDong }) => {
|
|
|
19187
19209
|
};
|
|
19188
19210
|
|
|
19189
19211
|
// loi/vo-flow.tsx
|
|
19190
|
-
var PHIEN_BAN = "loi-
|
|
19212
|
+
var PHIEN_BAN = "loi-1010A";
|
|
19191
19213
|
var TRONG = () => migrateProject({ id: crypto.randomUUID(), name: "D\u1EF1 \xE1n m\u1EDBi", scenes: [], timeline: [], images: [null, null, null] });
|
|
19192
19214
|
var nut4 = "px-3 py-1.5 rounded-lg border border-[#2C4A73] text-[11px] font-bold text-[#A2B2C9] hover:text-[#F6D178] hover:border-[#F6D178]/60";
|
|
19193
19215
|
var Vo = () => {
|