xvai-loi 0.1.38 → 0.1.39
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 +71 -13
package/co.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
xvaiLoi100138
|
package/package.json
CHANGED
package/xvai-loi.js
CHANGED
|
@@ -5805,6 +5805,7 @@ function catNen(im, buoc = 7, tol = 40) {
|
|
|
5805
5805
|
return o;
|
|
5806
5806
|
}
|
|
5807
5807
|
var ts = /* @__PURE__ */ new Map();
|
|
5808
|
+
var dsTenTaiSan = () => [...ts.keys()].filter((k) => /^(trang|anh|vat|story|logo):|\.(png|jpg)$/i.test(k)).sort();
|
|
5808
5809
|
var taiSan = (ten) => ten ? ts.get(ten) || globalThis.__taiSanThu?.(ten) || null : null;
|
|
5809
5810
|
var nhanTaiSan = (ten, im) => {
|
|
5810
5811
|
ts.set(ten, ten.indexOf("anh:") === 0 ? im : catNen(im));
|
|
@@ -9967,13 +9968,15 @@ dangKy("cmNen", (g, d, tuoi, W4, H2, nen2, _s, dai2) => {
|
|
|
9967
9968
|
g.restore();
|
|
9968
9969
|
}
|
|
9969
9970
|
if (d.bo === "depth") {
|
|
9970
|
-
|
|
9971
|
+
const yG = d.yChu ?? 0.24, truoc = d.yChu != null && F && yG > F[1] - 0.06 && yG < F[3];
|
|
9972
|
+
const veChu = () => chu2(g, d.giant, W4 / 2, yG * H2 + (d.z ? 0 : (1 - ka) * 70 * H2 / 1920), 190 * (d.coChu || 1) * H2 / 1920, "giant", d.z ? 1 : kep12(tuoi / 0.2), 0.84 * W4);
|
|
9971
9973
|
if (p) {
|
|
9972
9974
|
if (zk > 1.001) phongK(g, p, W4, H2, F, zk);
|
|
9973
9975
|
else g.drawImage(p, 0, 0, W4, H2);
|
|
9974
9976
|
}
|
|
9977
|
+
if (truoc) veChu();
|
|
9975
9978
|
} else if (d.giant) chu2(g, d.giant, W4 / 2, (d.yChu ?? (d.v3 ? 0.145 : d.bo === "toi" ? 0.4 : d.bo === "tron" ? 0.25 : 0.2)) * H2 + (1 - ka) * 70 * H2 / 1920, (d.cam ? 190 : d.v3 ? 112 : 150) * (d.coChu || 1) * H2 / 1920, d.cam ? "cam" : d.do ? "do" : "kw", kep12(tuoi / 0.06), 0.9 * W4);
|
|
9976
|
-
if (d.chu2 && !(d.bo === "depth" && /\n/.test(String(d.giant || "")))) chu2(g, d.chu2, W4 / 2, (d.bo === "
|
|
9979
|
+
if (d.chu2 && !(d.bo === "depth" && /\n/.test(String(d.giant || "")))) chu2(g, d.chu2, W4 / 2, (d.bo === "depth" ? (d.yChu ?? 0.24) + 0.02 : d.yChu ?? (d.bo === "toi" ? 0.4 : d.bo === "tron" ? 0.25 : 0.2)) * H2 + (/\n/.test(String(d.giant || "")) ? 290 : d.cam ? 200 : 150) * (d.coChu || 1) * H2 / 1920, 96 * H2 / 1920 * (d.z ? 1 + 0.7 * (1 - eOut((tuoi - 0.35) / 0.35)) : 1), d.do2 ? "do" : d.bo === "cut" || d.bo === "tron" || d.bo === "toi" ? "kw" : "vang", kep12((tuoi - 0.35) / 0.15), 0.88 * W4);
|
|
9977
9980
|
const vt = d.v3 && taiSan(d.v3), dl = String(d.giant || "").indexOf(String.fromCharCode(10)) >= 0;
|
|
9978
9981
|
if (vt) {
|
|
9979
9982
|
const p2 = eSoft((tuoi - 0.1) / 0.3), hh = (dl ? 0.2 : 0.26) * H2 * (0.9 + 0.1 * p2), ww = Math.min(hh * vt.width / vt.height, 0.6 * W4), h2 = ww * vt.height / vt.width;
|
|
@@ -10485,7 +10488,18 @@ function lapCuongMe(o) {
|
|
|
10485
10488
|
} catch (e) {
|
|
10486
10489
|
}
|
|
10487
10490
|
}
|
|
10488
|
-
const { tl, cs, ws, kb, fm, zc, tong, the: the0, keu, anh, moi, ms } = o;
|
|
10491
|
+
const { tl, cs, ws, kb, fm, zc, tong, the: the0, keu: keu0, anh, moi, ms } = o;
|
|
10492
|
+
let fKeu = -9;
|
|
10493
|
+
const keu = (f2, L) => {
|
|
10494
|
+
let cach = 0;
|
|
10495
|
+
try {
|
|
10496
|
+
cach = +(localStorage.getItem("xvaiSfxCach") || 0);
|
|
10497
|
+
} catch (e) {
|
|
10498
|
+
}
|
|
10499
|
+
if (cach > 0 && f2 - fKeu < cach) return;
|
|
10500
|
+
fKeu = Math.max(fKeu, f2);
|
|
10501
|
+
return keu0(f2, L);
|
|
10502
|
+
};
|
|
10489
10503
|
const loai = [];
|
|
10490
10504
|
let bc = "B0";
|
|
10491
10505
|
const r22 = (v) => +(+v || 0).toFixed(2), ghiL = (lo, s, ly, moi2) => {
|
|
@@ -12942,7 +12956,7 @@ async function renderNhanh(ff, clips, files, audio, cards, nen2, options, paint,
|
|
|
12942
12956
|
gn.translate(-X, -Y);
|
|
12943
12957
|
}
|
|
12944
12958
|
{
|
|
12945
|
-
const mau7 = fx0.mau || {}, sg = +mau7.sang || +fx0.sang || 1, tp = +mau7.tuongPhan || 1, bh = +mau7.baoHoa || 1, am = +mau7.am || 0;
|
|
12959
|
+
const mau7 = fx0.mau || globalThis.__xvaiMau || {}, sg = +mau7.sang || +fx0.sang || 1, tp = +mau7.tuongPhan || 1, bh = +mau7.baoHoa || 1, am = +mau7.am || 0;
|
|
12946
12960
|
const fS = (sg !== 1 ? "brightness(" + sg.toFixed(2) + ") " : "") + (tp !== 1 ? "contrast(" + tp.toFixed(2) + ") " : "") + (bh !== 1 ? "saturate(" + bh.toFixed(2) + ") " : "") + (am ? "sepia(" + Math.min(0.6, Math.abs(am)).toFixed(2) + ") " : "");
|
|
12947
12961
|
if (fS) gn.filter = fS.trim();
|
|
12948
12962
|
gn.drawImage(fr.canvas, ox, oy, sw * kz, sh * kz);
|
|
@@ -19070,7 +19084,7 @@ async function napLoi(d) {
|
|
|
19070
19084
|
return "LOI: " + String(e && e.message || e).slice(0, 300);
|
|
19071
19085
|
}
|
|
19072
19086
|
}
|
|
19073
|
-
var LOI_URL = "https://cdn.jsdelivr.net/npm/xvai-loi@0.1.
|
|
19087
|
+
var LOI_URL = "https://cdn.jsdelivr.net/npm/xvai-loi@0.1.38/nap.js";
|
|
19074
19088
|
var TRONG_LOI = !!globalThis.__xvaiReact;
|
|
19075
19089
|
try {
|
|
19076
19090
|
if (!TRONG_LOI) setTimeout(() => {
|
|
@@ -19100,7 +19114,7 @@ function datCauLenh(a) {
|
|
|
19100
19114
|
on2 = true;
|
|
19101
19115
|
window.addEventListener("message", async (ev) => {
|
|
19102
19116
|
const d = ev.data;
|
|
19103
|
-
if (!d || d.
|
|
19117
|
+
if (!d || d.xvaiLoi100138 !== true) return;
|
|
19104
19118
|
const o = String(ev.origin || "");
|
|
19105
19119
|
if (!(o.indexOf("https://flow.google.com") === 0 || o.indexOf("https://labs.google") === 0)) return;
|
|
19106
19120
|
const tra = (kq) => {
|
|
@@ -19224,11 +19238,41 @@ var SuaLich = ({ ten, onDong }) => {
|
|
|
19224
19238
|
}
|
|
19225
19239
|
})();
|
|
19226
19240
|
}, [ten]);
|
|
19227
|
-
const
|
|
19228
|
-
|
|
19241
|
+
const lsHoan = useState([])[0], lsLam = useState([])[0];
|
|
19242
|
+
const [nHoan, setNHoan] = useState(0);
|
|
19243
|
+
const ghiHoan = (cu) => {
|
|
19244
|
+
const t = Date.now();
|
|
19245
|
+
if (lsHoan.length && t - (lsHoan[lsHoan.length - 1].t || 0) < 600) return;
|
|
19246
|
+
lsHoan.push({ sua: cu, t });
|
|
19247
|
+
if (lsHoan.length > 50) lsHoan.shift();
|
|
19248
|
+
lsLam.length = 0;
|
|
19249
|
+
setNHoan(lsHoan.length);
|
|
19250
|
+
};
|
|
19251
|
+
const apSua = (n) => {
|
|
19229
19252
|
setSua(n);
|
|
19230
19253
|
G.__lichSua = n;
|
|
19231
19254
|
};
|
|
19255
|
+
const hoanTac = () => {
|
|
19256
|
+
if (!lsHoan.length) return;
|
|
19257
|
+
const b = lsHoan.pop();
|
|
19258
|
+
lsLam.push({ sua, t: Date.now() });
|
|
19259
|
+
apSua(b.sua);
|
|
19260
|
+
setNHoan(lsHoan.length);
|
|
19261
|
+
setBao("Ho\xE0n t\xE1c (" + lsHoan.length + " b\u01B0\u1EDBc c\xF2n l\u1EA1i)");
|
|
19262
|
+
};
|
|
19263
|
+
const lamLai = () => {
|
|
19264
|
+
if (!lsLam.length) return;
|
|
19265
|
+
const b = lsLam.pop();
|
|
19266
|
+
lsHoan.push({ sua, t: Date.now() });
|
|
19267
|
+
apSua(b.sua);
|
|
19268
|
+
setNHoan(lsHoan.length);
|
|
19269
|
+
setBao("L\xE0m l\u1EA1i");
|
|
19270
|
+
};
|
|
19271
|
+
const dat = (i, k, v) => {
|
|
19272
|
+
ghiHoan(sua);
|
|
19273
|
+
const n = { ...sua, [i]: { ...sua[i] || {}, [k]: v } };
|
|
19274
|
+
apSua(n);
|
|
19275
|
+
};
|
|
19232
19276
|
const [ls, setLs] = useState([]);
|
|
19233
19277
|
const [them, setThem] = useState({ f: 0, d: 2, bo: "depth", giant: "", ten: "" });
|
|
19234
19278
|
useEffect(() => {
|
|
@@ -19306,11 +19350,23 @@ var SuaLich = ({ ten, onDong }) => {
|
|
|
19306
19350
|
taiTep("phu-de-" + ten.replace(/[^\w-]+/g, "_").slice(0, 40) + ".srt", cues.map((c, i) => i + 1 + "\n" + hh(c.t0) + " --> " + hh(c.t1) + "\n" + c.text + "\n").join("\n"), "text/plain");
|
|
19307
19351
|
};
|
|
19308
19352
|
const fx0 = G.__loiApp && G.__loiApp.p && G.__loiApp.p.studioFx || {};
|
|
19309
|
-
|
|
19353
|
+
let m0 = fx0.mau || G.__xvaiMau || {};
|
|
19354
|
+
try {
|
|
19355
|
+
if (!fx0.mau && !G.__xvaiMau) {
|
|
19356
|
+
const t = localStorage.getItem("xvaiMau");
|
|
19357
|
+
if (t) m0 = JSON.parse(t);
|
|
19358
|
+
}
|
|
19359
|
+
} catch (e) {
|
|
19360
|
+
}
|
|
19310
19361
|
const [fx, setFx] = useState({ sang: +m0.sang || +fx0.sang || 1, tuongPhan: +m0.tuongPhan || 1, baoHoa: +m0.baoHoa || 1, am: +m0.am || 0 });
|
|
19311
19362
|
const datFx = (k, v) => {
|
|
19312
19363
|
const n = { ...fx, [k]: v };
|
|
19313
19364
|
setFx(n);
|
|
19365
|
+
G.__xvaiMau = n;
|
|
19366
|
+
try {
|
|
19367
|
+
localStorage.setItem("xvaiMau", JSON.stringify(n));
|
|
19368
|
+
} catch (e) {
|
|
19369
|
+
}
|
|
19314
19370
|
if (typeof G.__loiSetP === "function") {
|
|
19315
19371
|
G.__loiSetP((c) => c ? { ...c, studioFx: { ...c.studioFx || {}, mau: n } } : c);
|
|
19316
19372
|
setBao("M\xE0u c\u1EA3 b\xE0i: s\xE1ng " + (+n.sang).toFixed(2) + " \xB7 t\u01B0\u01A1ng ph\u1EA3n " + (+n.tuongPhan).toFixed(2) + " \xB7 t\u01B0\u01A1i " + (+n.baoHoa).toFixed(2) + " \xB7 \u1EA5m " + (+n.am).toFixed(2) + " \u2192 b\u1EA5m Xu\u1EA5t l\u1EA1i");
|
|
@@ -19318,6 +19374,7 @@ var SuaLich = ({ ten, onDong }) => {
|
|
|
19318
19374
|
};
|
|
19319
19375
|
const themCanh = () => {
|
|
19320
19376
|
if (!(them.d > 0.3)) return;
|
|
19377
|
+
ghiHoan(sua);
|
|
19321
19378
|
const n = { ...sua, them: [...sua.them || [], { ...them, f: +them.f, d: +them.d }] };
|
|
19322
19379
|
setSua(n);
|
|
19323
19380
|
G.__lichSua = n;
|
|
@@ -19333,28 +19390,29 @@ var SuaLich = ({ ten, onDong }) => {
|
|
|
19333
19390
|
} else setBao("Ch\u01B0a c\xF3 L\xE0m pro (n\u1EA1p video + ch\u1ECDn m\u1EABu tr\u01B0\u1EDBc)");
|
|
19334
19391
|
};
|
|
19335
19392
|
const xoaHet = async () => {
|
|
19393
|
+
ghiHoan(sua);
|
|
19336
19394
|
setSua({});
|
|
19337
19395
|
G.__lichSua = null;
|
|
19338
19396
|
await ghiDem("lichSua:" + ten, { sua: {} });
|
|
19339
19397
|
setBao("\u0110\xE3 b\u1ECF m\u1ECDi s\u1EEDa tay");
|
|
19340
19398
|
};
|
|
19341
19399
|
if (!ds2.length) return /* @__PURE__ */ shim_react_default.createElement("div", { className: "rounded-xl border border-[#2C4A73] p-4 text-[12px]" }, 'Ch\u01B0a c\xF3 l\u1ECBch d\u1EF1ng \u2014 b\u1EA5m "L\xE0m pro" m\u1ED9t l\u1EA7n r\u1ED3i quay l\u1EA1i \u0111\xE2y. ', /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: onDong }, "\u0110\xF3ng"));
|
|
19342
|
-
return /* @__PURE__ */ shim_react_default.createElement("div", { className: "rounded-xl border border-[#F6D178]/60 p-3 text-[12px] bg-[#0E2240]" }, /* @__PURE__ */ shim_react_default.createElement("div", { className: "flex items-center gap-2 mb-2" }, /* @__PURE__ */ shim_react_default.createElement("span", { className: "font-black text-[#F6D178]" }, "S\u1EECA L\u1ECACH D\u1EF0NG \xB7 ", ds2.length, " c\u1EA3nh"), /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#A2B2C9] flex-1" }, bao), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: luu }, "L\u01B0u"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3 + " bg-[#F6D178] text-[#122238]", onClick: veLai }, "V\u1EBD l\u1EA1i"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: xoaHet }, "B\u1ECF s\u1EEDa"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: () => {
|
|
19400
|
+
return /* @__PURE__ */ shim_react_default.createElement("div", { className: "rounded-xl border border-[#F6D178]/60 p-3 text-[12px] bg-[#0E2240]" }, /* @__PURE__ */ shim_react_default.createElement("div", { className: "flex items-center gap-2 mb-2" }, /* @__PURE__ */ shim_react_default.createElement("span", { className: "font-black text-[#F6D178]" }, "S\u1EECA L\u1ECACH D\u1EF0NG \xB7 ", ds2.length, " c\u1EA3nh"), /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#A2B2C9] flex-1" }, bao), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: hoanTac, disabled: !nHoan, title: "Ho\xE0n t\xE1c (Ctrl+Z)" }, "\u21B6 ", nHoan || ""), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: lamLai, title: "L\xE0m l\u1EA1i" }, "\u21B7"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: luu }, "L\u01B0u"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3 + " bg-[#F6D178] text-[#122238]", onClick: veLai }, "V\u1EBD l\u1EA1i"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: xoaHet }, "B\u1ECF s\u1EEDa"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: () => {
|
|
19343
19401
|
setDs(G.__lichSp || []);
|
|
19344
19402
|
} }, "N\u1EA1p l\u1EA1i"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: onDong }, "\u0110\xF3ng"), ls.length ? /* @__PURE__ */ shim_react_default.createElement("select", { className: "bg-[#0B1A2D] border border-[#2C4A73] rounded px-1 text-[11px]", value: "", onChange: (ev) => {
|
|
19345
19403
|
if (ev.target.value) napBan(+ev.target.value);
|
|
19346
19404
|
} }, /* @__PURE__ */ shim_react_default.createElement("option", { value: "" }, "b\u1EA3n c\u0169\u2026"), ls.map((t) => /* @__PURE__ */ shim_react_default.createElement("option", { key: t, value: t }, new Date(t).toLocaleString("vi")))) : null), /* @__PURE__ */ shim_react_default.createElement("div", { className: "flex items-center gap-2 mb-2 text-[11px] flex-wrap" }, /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#A2B2C9]" }, "M\xE0u c\u1EA3 b\xE0i:"), /* @__PURE__ */ shim_react_default.createElement("label", { className: "flex items-center gap-1" }, "s\xE1ng ", /* @__PURE__ */ shim_react_default.createElement("input", { type: "range", min: "0.7", max: "1.4", step: "0.05", value: fx.sang, onChange: (ev) => datFx("sang", +ev.target.value), className: "w-20" }), " ", (+fx.sang).toFixed(2)), /* @__PURE__ */ shim_react_default.createElement("label", { className: "flex items-center gap-1" }, "t\u01B0\u01A1ng ph\u1EA3n ", /* @__PURE__ */ shim_react_default.createElement("input", { type: "range", min: "0.7", max: "1.4", step: "0.05", value: fx.tuongPhan, onChange: (ev) => datFx("tuongPhan", +ev.target.value), className: "w-20" }), " ", (+fx.tuongPhan).toFixed(2)), /* @__PURE__ */ shim_react_default.createElement("label", { className: "flex items-center gap-1" }, "t\u01B0\u01A1i ", /* @__PURE__ */ shim_react_default.createElement("input", { type: "range", min: "0.5", max: "1.6", step: "0.05", value: fx.baoHoa, onChange: (ev) => datFx("baoHoa", +ev.target.value), className: "w-20" }), " ", (+fx.baoHoa).toFixed(2)), /* @__PURE__ */ shim_react_default.createElement("label", { className: "flex items-center gap-1" }, "\u1EA5m ", /* @__PURE__ */ shim_react_default.createElement("input", { type: "range", min: "0", max: "0.4", step: "0.05", value: fx.am, onChange: (ev) => datFx("am", +ev.target.value), className: "w-20" }), " ", (+fx.am).toFixed(2)), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: () => {
|
|
19347
19405
|
setFx({ sang: 1, tuongPhan: 1, baoHoa: 1, am: 0 });
|
|
19348
19406
|
datFx("sang", 1);
|
|
19349
|
-
} }, "V\u1EC1 g\u1ED1c"), /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#A2B2C9]" }, "(ch\u1ED1ng rung \xB7 l\xE0m \u0111\u1EB9p \xB7 ti\u1EBFng \xB7 r\u0103ng: 4 c\xF4ng t\u1EAFc \u1EDF b\u1EA3ng L\xE0m pro)")), /* @__PURE__ */ shim_react_default.createElement("div", { className: "flex items-center gap-1 mb-2 text-[11px] flex-wrap" }, /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#A2B2C9]" }, "Th\xEAm c\u1EA3nh:"), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.1", value: them.f, onChange: (ev) => setThem({ ...them, f: ev.target.value }), title: "gi\xE2y \u0111\u1EA7u" }), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.1", value: them.d, onChange: (ev) => setThem({ ...them, d: ev.target.value }), title: "d\xE0i (s)" }), /* @__PURE__ */ shim_react_default.createElement("select", { className: "bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: them.bo, onChange: (ev) => setThem({ ...them, bo: ev.target.value }) }, /* @__PURE__ */ shim_react_default.createElement("option", { value: "depth" }, "ch\u1EEF nh\u1EA5n"), /* @__PURE__ */ shim_react_default.createElement("option", { value: "anh" }, "\u1EA3nh to\xE0n khung"), /* @__PURE__ */ shim_react_default.createElement("option", { value: "cut" }, "c\u1EAFt ch\u1EEF"), /* @__PURE__ */ shim_react_default.createElement("option", { value: "tron" }, "\xF4 tr\xF2n")), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-28 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", placeholder: "ch\u1EEF nh\u1EA5n", value: them.giant, onChange: (ev) => setThem({ ...them, giant: ev.target.value }) }), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-24 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", placeholder: "\u1EA3nh: trang:\u2026", value: them.ten, onChange: (ev) => setThem({ ...them, ten: ev.target.value }) }), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: themCanh }, "+ Th\xEAm"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: taiLich }, "T\u1EA3i l\u1ECBch .json"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: taiSrt, title: "b\u1EA3n \u0111\u1EA7u: ch\u01B0a tr\u1EEB \u0111o\u1EA1n l\u1EB7ng b\u1ECB c\u1EAFt" }, "T\u1EA3i SRT"), /* @__PURE__ */ shim_react_default.createElement("label", { className: nut3 + " cursor-pointer" }, "M\u1EDF d\u1EF1 \xE1n .json", /* @__PURE__ */ shim_react_default.createElement("input", { type: "file", accept: ".json,application/json", className: "hidden", onChange: (ev) => moDuAn(ev.target.files && ev.target.files[0]) })), (sua.them || []).length ? /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#F6D178]" }, (sua.them || []).length, " c\u1EA3nh th\xEAm") : null), /* @__PURE__ */ shim_react_default.createElement("div", { className: "max-h-[60vh] overflow-auto" }, /* @__PURE__ */ shim_react_default.createElement("table", { className: "w-full text-[11px]" }, /* @__PURE__ */ shim_react_default.createElement("thead", null, /* @__PURE__ */ shim_react_default.createElement("tr", { className: "text-[#A2B2C9]" }, /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "#"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "gi\xE2y"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "b\u1ED1 c\u1EE5c"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "\u0111\u1EA7u/d\xE0i (s)"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "ch\u1EEF nh\u1EA5n"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "y / c\u1EE1"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "ch\u1EEF ph\u1EE5"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "icon"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "\u1EA3nh (t\xEAn kho)"), /* @__PURE__ */ shim_react_default.createElement("th", null, "xo\xE1"))), /* @__PURE__ */ shim_react_default.createElement("tbody", null, ds2.map((s) => {
|
|
19407
|
+
} }, "V\u1EC1 g\u1ED1c"), /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#A2B2C9]" }, "(ch\u1ED1ng rung \xB7 l\xE0m \u0111\u1EB9p \xB7 ti\u1EBFng \xB7 r\u0103ng: 4 c\xF4ng t\u1EAFc \u1EDF b\u1EA3ng L\xE0m pro)")), /* @__PURE__ */ shim_react_default.createElement("div", { className: "flex items-center gap-1 mb-2 text-[11px] flex-wrap" }, /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#A2B2C9]" }, "Th\xEAm c\u1EA3nh:"), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.1", value: them.f, onChange: (ev) => setThem({ ...them, f: ev.target.value }), title: "gi\xE2y \u0111\u1EA7u" }), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.1", value: them.d, onChange: (ev) => setThem({ ...them, d: ev.target.value }), title: "d\xE0i (s)" }), /* @__PURE__ */ shim_react_default.createElement("select", { className: "bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: them.bo, onChange: (ev) => setThem({ ...them, bo: ev.target.value }) }, /* @__PURE__ */ shim_react_default.createElement("option", { value: "depth" }, "ch\u1EEF nh\u1EA5n"), /* @__PURE__ */ shim_react_default.createElement("option", { value: "anh" }, "\u1EA3nh to\xE0n khung"), /* @__PURE__ */ shim_react_default.createElement("option", { value: "cut" }, "c\u1EAFt ch\u1EEF"), /* @__PURE__ */ shim_react_default.createElement("option", { value: "tron" }, "\xF4 tr\xF2n")), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-28 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", placeholder: "ch\u1EEF nh\u1EA5n", value: them.giant, onChange: (ev) => setThem({ ...them, giant: ev.target.value }) }), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-24 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", placeholder: "\u1EA3nh: trang:\u2026", value: them.ten, onChange: (ev) => setThem({ ...them, ten: ev.target.value }) }), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: themCanh }, "+ Th\xEAm"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: taiLich }, "T\u1EA3i l\u1ECBch .json"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: taiSrt, title: "b\u1EA3n \u0111\u1EA7u: ch\u01B0a tr\u1EEB \u0111o\u1EA1n l\u1EB7ng b\u1ECB c\u1EAFt" }, "T\u1EA3i SRT"), /* @__PURE__ */ shim_react_default.createElement("label", { className: nut3 + " cursor-pointer" }, "M\u1EDF d\u1EF1 \xE1n .json", /* @__PURE__ */ shim_react_default.createElement("input", { type: "file", accept: ".json,application/json", className: "hidden", onChange: (ev) => moDuAn(ev.target.files && ev.target.files[0]) })), (sua.them || []).length ? /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#F6D178]" }, (sua.them || []).length, " c\u1EA3nh th\xEAm") : null), /* @__PURE__ */ shim_react_default.createElement("datalist", { id: "xvai-kho-anh" }, dsTenTaiSan().map((t) => /* @__PURE__ */ shim_react_default.createElement("option", { key: t, value: t }))), /* @__PURE__ */ shim_react_default.createElement("div", { className: "max-h-[60vh] overflow-auto" }, /* @__PURE__ */ shim_react_default.createElement("table", { className: "w-full text-[11px]" }, /* @__PURE__ */ shim_react_default.createElement("thead", null, /* @__PURE__ */ shim_react_default.createElement("tr", { className: "text-[#A2B2C9]" }, /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "#"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "gi\xE2y"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "b\u1ED1 c\u1EE5c"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "\u0111\u1EA7u/d\xE0i (s)"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "ch\u1EEF nh\u1EA5n"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "y / c\u1EE1"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "ch\u1EEF ph\u1EE5"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "icon"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "\u1EA3nh (t\xEAn kho)"), /* @__PURE__ */ shim_react_default.createElement("th", null, "xo\xE1"))), /* @__PURE__ */ shim_react_default.createElement("tbody", null, ds2.map((s) => {
|
|
19350
19408
|
const e = sua[s.id] || sua[s.i] || {};
|
|
19351
19409
|
const v = (k) => (typeof e[k] === "string" ? e[k] : s[k]) || "";
|
|
19352
|
-
return /* @__PURE__ */ shim_react_default.createElement("tr", { key: s.id || s.i, className: e.xoa ? "opacity-40" : s.khoa ? "bg-[#1E3A5F]/40" : "" }, /* @__PURE__ */ shim_react_default.createElement("td", null, s.i), /* @__PURE__ */ shim_react_default.createElement("td", null, s.f.toFixed(1), "\u2013", (s.f + s.d).toFixed(1)), /* @__PURE__ */ shim_react_default.createElement("td", null, s.bo), /* @__PURE__ */ shim_react_default.createElement("td", { className: "whitespace-nowrap" }, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: typeof e.f === "number" ? e.f : s.f, onChange: (ev) => dat(s.id || String(s.i), "f", +ev.target.value), type: "number", step: "0.1" }), " ", /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: typeof e.d === "number" ? e.d : s.d, onChange: (ev) => dat(s.id || String(s.i), "d", +ev.target.value), type: "number", step: "0.1", min: "0.4" })), /* @__PURE__ */ shim_react_default.createElement("td", null, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-full bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: v("giant"), onChange: (ev) => dat(s.id || String(s.i), "giant", ev.target.value) })), /* @__PURE__ */ shim_react_default.createElement("td", { className: "whitespace-nowrap" }, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.02", min: "0.05", max: "0.6", placeholder: "y", value: typeof e.yChu === "number" ? e.yChu : s.yChu ?? "", onChange: (ev) => dat(s.id || String(s.i), "yChu", +ev.target.value), title: "v\u1ECB tr\xED ch\u1EEF nh\u1EA5n (0,05 tr\xEAn \u2013 0,6 d\u01B0\u1EDBi)" }), " ", /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.1", min: "0.5", max: "1.6", placeholder: "\xD71", value: typeof e.coChu === "number" ? e.coChu : s.coChu ?? "", onChange: (ev) => dat(s.id || String(s.i), "coChu", +ev.target.value), title: "c\u1EE1 ch\u1EEF nh\u1EA5n \xD70,5\u20131,6" })), /* @__PURE__ */ shim_react_default.createElement("td", null, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-full bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: v("chu2") || v("chu"), onChange: (ev) => dat(s.id || String(s.i), s.chu2 || !s.chu ? "chu2" : "chu", ev.target.value) })), /* @__PURE__ */ shim_react_default.createElement("td", null, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-20 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: v("st"), onChange: (ev) => dat(s.id || String(s.i), "st", ev.target.value), placeholder: "tich/luu\u2026" })), /* @__PURE__ */ shim_react_default.createElement("td", null, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-24 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: v("ten"), onChange: (ev) => dat(s.id || String(s.i), "ten", ev.target.value), placeholder: "trang:\u2026 / anh:\u2026" })), /* @__PURE__ */ shim_react_default.createElement("td", { className: "text-center" }, /* @__PURE__ */ shim_react_default.createElement("input", { type: "checkbox", checked: !!e.xoa, onChange: (ev) => dat(s.id || String(s.i), "xoa", ev.target.checked ? 1 : 0) })));
|
|
19410
|
+
return /* @__PURE__ */ shim_react_default.createElement("tr", { key: s.id || s.i, className: e.xoa ? "opacity-40" : s.khoa ? "bg-[#1E3A5F]/40" : "" }, /* @__PURE__ */ shim_react_default.createElement("td", null, s.i), /* @__PURE__ */ shim_react_default.createElement("td", null, s.f.toFixed(1), "\u2013", (s.f + s.d).toFixed(1)), /* @__PURE__ */ shim_react_default.createElement("td", null, s.bo), /* @__PURE__ */ shim_react_default.createElement("td", { className: "whitespace-nowrap" }, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: typeof e.f === "number" ? e.f : s.f, onChange: (ev) => dat(s.id || String(s.i), "f", +ev.target.value), type: "number", step: "0.1" }), " ", /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: typeof e.d === "number" ? e.d : s.d, onChange: (ev) => dat(s.id || String(s.i), "d", +ev.target.value), type: "number", step: "0.1", min: "0.4" })), /* @__PURE__ */ shim_react_default.createElement("td", null, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-full bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: v("giant"), onChange: (ev) => dat(s.id || String(s.i), "giant", ev.target.value) })), /* @__PURE__ */ shim_react_default.createElement("td", { className: "whitespace-nowrap" }, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.02", min: "0.05", max: "0.6", placeholder: "y", value: typeof e.yChu === "number" ? e.yChu : s.yChu ?? "", onChange: (ev) => dat(s.id || String(s.i), "yChu", +ev.target.value), title: "v\u1ECB tr\xED ch\u1EEF nh\u1EA5n (0,05 tr\xEAn \u2013 0,6 d\u01B0\u1EDBi)" }), " ", /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.1", min: "0.5", max: "1.6", placeholder: "\xD71", value: typeof e.coChu === "number" ? e.coChu : s.coChu ?? "", onChange: (ev) => dat(s.id || String(s.i), "coChu", +ev.target.value), title: "c\u1EE1 ch\u1EEF nh\u1EA5n \xD70,5\u20131,6" })), /* @__PURE__ */ shim_react_default.createElement("td", null, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-full bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: v("chu2") || v("chu"), onChange: (ev) => dat(s.id || String(s.i), s.chu2 || !s.chu ? "chu2" : "chu", ev.target.value) })), /* @__PURE__ */ shim_react_default.createElement("td", null, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-20 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: v("st"), onChange: (ev) => dat(s.id || String(s.i), "st", ev.target.value), placeholder: "tich/luu\u2026" })), /* @__PURE__ */ shim_react_default.createElement("td", null, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-24 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", list: "xvai-kho-anh", value: v("ten"), onChange: (ev) => dat(s.id || String(s.i), "ten", ev.target.value), placeholder: "trang:\u2026 / anh:\u2026" })), /* @__PURE__ */ shim_react_default.createElement("td", { className: "text-center" }, /* @__PURE__ */ shim_react_default.createElement("input", { type: "checkbox", checked: !!e.xoa, onChange: (ev) => dat(s.id || String(s.i), "xoa", ev.target.checked ? 1 : 0) })));
|
|
19353
19411
|
})))), /* @__PURE__ */ shim_react_default.createElement("div", { className: "text-[#A2B2C9] mt-2" }, "Ch\u1EEF nh\u1EA5n xu\u1ED1ng d\xF2ng: g\xF5 \\n. Icon: tich, luu, chuot, sao, tim, dong-ho\u2026 (t\xEAn trong veSticker). S\u1EEDa xong b\u1EA5m V\u1EBD l\u1EA1i (~2\u20135 ph\xFAt)."));
|
|
19354
19412
|
};
|
|
19355
19413
|
|
|
19356
19414
|
// loi/vo-flow.tsx
|
|
19357
|
-
var PHIEN_BAN = "loi-
|
|
19415
|
+
var PHIEN_BAN = "loi-1010N";
|
|
19358
19416
|
var TRONG = () => migrateProject({ id: crypto.randomUUID(), name: "D\u1EF1 \xE1n m\u1EDBi", scenes: [], timeline: [], images: [null, null, null] });
|
|
19359
19417
|
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";
|
|
19360
19418
|
var Vo = () => {
|