xvai-loi 0.1.45 → 0.1.46

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 +83 -6
package/co.txt CHANGED
@@ -1 +1 @@
1
- xvaiLoi100906
1
+ xvaiLoi100930
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xvai-loi",
3
- "version": "0.1.45",
3
+ "version": "0.1.46",
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
@@ -2141,6 +2141,32 @@ function safeKeepRanges(start, end, silences, words, shorten) {
2141
2141
  if (cuts.length && a < cuts[cuts.length - 1].t1) continue;
2142
2142
  cuts.push({ t0: a, t1: b });
2143
2143
  }
2144
+ {
2145
+ let tay = [];
2146
+ try {
2147
+ const G = globalThis;
2148
+ tay = Array.isArray(G.__catTay) ? G.__catTay : [];
2149
+ if (!tay.length) {
2150
+ const t = localStorage.getItem("xvaiCatTay");
2151
+ if (t) tay = JSON.parse(t) || [];
2152
+ }
2153
+ } catch (e) {
2154
+ tay = [];
2155
+ }
2156
+ for (const r of tay) {
2157
+ const a = Math.max(start, +r.t0 - 0.03), b = Math.min(end, +r.t1 + 0.03);
2158
+ if (b - a >= 0.08) cuts.push({ t0: a, t1: b });
2159
+ }
2160
+ cuts.sort((x, y) => x.t0 - y.t0);
2161
+ const gop = [];
2162
+ for (const c of cuts) {
2163
+ const L = gop[gop.length - 1];
2164
+ if (L && c.t0 <= L.t1) L.t1 = Math.max(L.t1, c.t1);
2165
+ else gop.push({ ...c });
2166
+ }
2167
+ cuts.length = 0;
2168
+ cuts.push(...gop);
2169
+ }
2144
2170
  const keep = [];
2145
2171
  let cursor = start;
2146
2172
  for (const c of cuts) {
@@ -13214,6 +13240,32 @@ async function renderNhanh(ff, clips, files, audio, cards, nen2, options, paint,
13214
13240
  if (fS) gn.filter = fS.trim();
13215
13241
  gn.drawImage(fr.canvas, ox, oy, sw * kz, sh * kz);
13216
13242
  if (fS) gn.filter = "none";
13243
+ const net = +(mau7.net || 0);
13244
+ if (net > 0) {
13245
+ const G = globalThis;
13246
+ if (!G.__cvNet) {
13247
+ G.__cvNet = document.createElement("canvas");
13248
+ }
13249
+ const cv2 = G.__cvNet;
13250
+ if (cv2.width !== W4 || cv2.height !== H2) {
13251
+ cv2.width = W4;
13252
+ cv2.height = H2;
13253
+ }
13254
+ const cg = cv2.getContext("2d");
13255
+ cg.globalCompositeOperation = "copy";
13256
+ cg.filter = "none";
13257
+ cg.drawImage(gn.canvas, 0, 0);
13258
+ cg.globalCompositeOperation = "difference";
13259
+ cg.filter = "blur(1.2px)";
13260
+ cg.drawImage(gn.canvas, 0, 0);
13261
+ cg.filter = "none";
13262
+ cg.globalCompositeOperation = "source-over";
13263
+ gn.save();
13264
+ gn.globalCompositeOperation = "lighter";
13265
+ gn.globalAlpha = Math.min(0.6, net);
13266
+ gn.drawImage(cv2, 0, 0);
13267
+ gn.restore();
13268
+ }
13217
13269
  }
13218
13270
  if (xo) gn.restore();
13219
13271
  if (dep && rang) {
@@ -19360,7 +19412,7 @@ async function napLoi(d) {
19360
19412
  return "LOI: " + String(e && e.message || e).slice(0, 300);
19361
19413
  }
19362
19414
  }
19363
- var LOI_URL = "https://cdn.jsdelivr.net/npm/xvai-loi@0.1.44/nap.js";
19415
+ var LOI_URL = "https://cdn.jsdelivr.net/npm/xvai-loi@0.1.45/nap.js";
19364
19416
  var TRONG_LOI = !!globalThis.__xvaiReact;
19365
19417
  try {
19366
19418
  if (!TRONG_LOI) setTimeout(() => {
@@ -19390,7 +19442,7 @@ function datCauLenh(a) {
19390
19442
  on2 = true;
19391
19443
  window.addEventListener("message", async (ev) => {
19392
19444
  const d = ev.data;
19393
- if (!d || d.xvaiLoi100906 !== true) return;
19445
+ if (!d || d.xvaiLoi100930 !== true) return;
19394
19446
  const o = String(ev.origin || "");
19395
19447
  if (!(o.indexOf("https://flow.google.com") === 0 || o.indexOf("https://labs.google") === 0)) return;
19396
19448
  const tra = (kq) => {
@@ -19638,7 +19690,7 @@ var SuaLich = ({ ten, onDong }) => {
19638
19690
  }
19639
19691
  } catch (e) {
19640
19692
  }
19641
- const [fx, setFx] = useState({ sang: +m0.sang || +fx0.sang || 1, tuongPhan: +m0.tuongPhan || 1, baoHoa: +m0.baoHoa || 1, am: +m0.am || 0 });
19693
+ const [fx, setFx] = useState({ sang: +m0.sang || +fx0.sang || 1, tuongPhan: +m0.tuongPhan || 1, baoHoa: +m0.baoHoa || 1, am: +m0.am || 0, net: +m0.net || 0 });
19642
19694
  const datFx = (k, v) => {
19643
19695
  const n = { ...fx, [k]: v };
19644
19696
  setFx(n);
@@ -19824,6 +19876,31 @@ var SuaLich = ({ ten, onDong }) => {
19824
19876
  apSua(n);
19825
19877
  setBao("C\u1EA3nh " + s.i + " tr\u1EA3 v\u1EC1 cho AI (b\u1ECF s\u1EEDa tay) \xB7 L\u01B0u r\u1ED3i V\u1EBD l\u1EA1i");
19826
19878
  };
19879
+ const [moLoi, setMoLoi] = useState(false);
19880
+ const [catTay, setCatTay] = useState(() => {
19881
+ try {
19882
+ return JSON.parse(localStorage.getItem("xvaiCatTay") || "[]") || [];
19883
+ } catch (e) {
19884
+ return [];
19885
+ }
19886
+ });
19887
+ const tuLoi = (() => {
19888
+ const p = G.__loiApp && G.__loiApp.p;
19889
+ const sc = p && p.scenes && p.scenes[0];
19890
+ const w = p && p.speechDraft && p.speechDraft.analysis && p.speechDraft.analysis.words || sc && (sc.speechWords || sc.speechDraft && sc.speechDraft.words) || p && p.speechDraft && p.speechDraft.words || [];
19891
+ return Array.isArray(w) ? w : [];
19892
+ })();
19893
+ const daCat = (w) => catTay.some((r) => Math.abs(r.t0 - w.t0) < 0.01);
19894
+ const batCat = (w) => {
19895
+ const n = daCat(w) ? catTay.filter((r) => Math.abs(r.t0 - w.t0) >= 0.01) : [...catTay, { t0: +w.t0, t1: +w.t1, tu: w.text }];
19896
+ setCatTay(n);
19897
+ G.__catTay = n;
19898
+ try {
19899
+ localStorage.setItem("xvaiCatTay", JSON.stringify(n));
19900
+ } catch (e) {
19901
+ }
19902
+ setBao("C\u1EAFt l\u1EDDi: " + n.length + " t\u1EEB \u0111\xE1nh d\u1EA5u xo\xE1 \xB7 V\u1EBD l\u1EA1i \u0111\u1EC3 \xE1p");
19903
+ };
19827
19904
  const themCanh = () => {
19828
19905
  if (!(them.d > 0.3)) return;
19829
19906
  ghiHoan(sua);
@@ -19853,7 +19930,7 @@ var SuaLich = ({ ten, onDong }) => {
19853
19930
  setDs(G.__lichSp || []);
19854
19931
  } }, "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) => {
19855
19932
  if (ev.target.value) napBan(+ev.target.value);
19856
- } }, /* @__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]" }, "Ki\u1EC3u ch\u1EEF c\u1EA3 b\xE0i:"), /* @__PURE__ */ shim_react_default.createElement("select", { className: "bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: kc, onChange: (ev) => datKc(ev.target.value) }, Object.keys(KIEU_CHU).map((t) => /* @__PURE__ */ shim_react_default.createElement("option", { key: t, value: t }, t)))), /* @__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]" }, "\xC2m thanh:"), /* @__PURE__ */ shim_react_default.createElement("label", { className: "flex items-center gap-1" }, "l\u1EDDi ", /* @__PURE__ */ shim_react_default.createElement("input", { type: "range", min: "0.5", max: "2", step: "0.05", value: am.loi, onChange: (ev) => datAm("loi", +ev.target.value), className: "w-20" }), " \xD7", (+am.loi).toFixed(2)), /* @__PURE__ */ shim_react_default.createElement("label", { className: "flex items-center gap-1" }, "nh\u1EA1c + SFX ", /* @__PURE__ */ shim_react_default.createElement("input", { type: "range", min: "0", max: "2.5", step: "0.05", value: am.nhac, onChange: (ev) => datAm("nhac", +ev.target.value), className: "w-20" }), " \xD7", (+am.nhac).toFixed(2)), /* @__PURE__ */ shim_react_default.createElement("label", { className: "flex items-center gap-1" }, "ch\u1ED1ng \u1ED3n ", /* @__PURE__ */ shim_react_default.createElement("select", { className: "bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: am.on, onChange: (ev) => datAm("on", ev.target.value === "" ? "" : +ev.target.value) }, /* @__PURE__ */ shim_react_default.createElement("option", { value: "" }, "theo b\u1EA3ng L\xE0m pro"), /* @__PURE__ */ shim_react_default.createElement("option", { value: "0" }, "t\u1EAFt"), /* @__PURE__ */ shim_react_default.createElement("option", { value: "1" }, "nh\u1EB9"), /* @__PURE__ */ shim_react_default.createElement("option", { value: "2" }, "m\u1EA1nh"))), /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#A2B2C9]" }, "(t\u1EF1 c\xE2n \u221214 LUFS, nh\u1EA1c t\u1EF1 h\u1EA1 khi n\xF3i)")), /* @__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)), [["T\u1EF1 c\xE2n", { sang: 1.05, tuongPhan: 1.05, baoHoa: 1, am: 0 }], ["\u1EA4m", { sang: 1.03, tuongPhan: 1.03, baoHoa: 1.08, am: 0.12 }], ["L\u1EA1nh s\u1EA1ch", { sang: 1.06, tuongPhan: 1.08, baoHoa: 0.92, am: 0 }], ["Phim", { sang: 0.97, tuongPhan: 1.12, baoHoa: 0.85, am: 0.08 }], ["R\u1EF1c", { sang: 1.04, tuongPhan: 1.1, baoHoa: 1.25, am: 0 }]].map(([t, v]) => /* @__PURE__ */ shim_react_default.createElement("button", { key: t, className: nut3, onClick: () => {
19933
+ } }, /* @__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]" }, "Ki\u1EC3u ch\u1EEF c\u1EA3 b\xE0i:"), /* @__PURE__ */ shim_react_default.createElement("select", { className: "bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: kc, onChange: (ev) => datKc(ev.target.value) }, Object.keys(KIEU_CHU).map((t) => /* @__PURE__ */ shim_react_default.createElement("option", { key: t, value: t }, t)))), /* @__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]" }, "\xC2m thanh:"), /* @__PURE__ */ shim_react_default.createElement("label", { className: "flex items-center gap-1" }, "l\u1EDDi ", /* @__PURE__ */ shim_react_default.createElement("input", { type: "range", min: "0.5", max: "2", step: "0.05", value: am.loi, onChange: (ev) => datAm("loi", +ev.target.value), className: "w-20" }), " \xD7", (+am.loi).toFixed(2)), /* @__PURE__ */ shim_react_default.createElement("label", { className: "flex items-center gap-1" }, "nh\u1EA1c + SFX ", /* @__PURE__ */ shim_react_default.createElement("input", { type: "range", min: "0", max: "2.5", step: "0.05", value: am.nhac, onChange: (ev) => datAm("nhac", +ev.target.value), className: "w-20" }), " \xD7", (+am.nhac).toFixed(2)), /* @__PURE__ */ shim_react_default.createElement("label", { className: "flex items-center gap-1" }, "ch\u1ED1ng \u1ED3n ", /* @__PURE__ */ shim_react_default.createElement("select", { className: "bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: am.on, onChange: (ev) => datAm("on", ev.target.value === "" ? "" : +ev.target.value) }, /* @__PURE__ */ shim_react_default.createElement("option", { value: "" }, "theo b\u1EA3ng L\xE0m pro"), /* @__PURE__ */ shim_react_default.createElement("option", { value: "0" }, "t\u1EAFt"), /* @__PURE__ */ shim_react_default.createElement("option", { value: "1" }, "nh\u1EB9"), /* @__PURE__ */ shim_react_default.createElement("option", { value: "2" }, "m\u1EA1nh"))), /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#A2B2C9]" }, "(t\u1EF1 c\xE2n \u221214 LUFS, nh\u1EA1c t\u1EF1 h\u1EA1 khi n\xF3i)")), /* @__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("label", { className: "flex items-center gap-1" }, "n\xE9t ", /* @__PURE__ */ shim_react_default.createElement("input", { type: "range", min: "0", max: "0.6", step: "0.05", value: fx.net || 0, onChange: (ev) => datFx("net", +ev.target.value), className: "w-20" }), " ", (+(fx.net || 0)).toFixed(2)), [["T\u1EF1 c\xE2n", { sang: 1.05, tuongPhan: 1.05, baoHoa: 1, am: 0 }], ["\u1EA4m", { sang: 1.03, tuongPhan: 1.03, baoHoa: 1.08, am: 0.12 }], ["L\u1EA1nh s\u1EA1ch", { sang: 1.06, tuongPhan: 1.08, baoHoa: 0.92, am: 0 }], ["Phim", { sang: 0.97, tuongPhan: 1.12, baoHoa: 0.85, am: 0.08 }], ["R\u1EF1c", { sang: 1.04, tuongPhan: 1.1, baoHoa: 1.25, am: 0 }]].map(([t, v]) => /* @__PURE__ */ shim_react_default.createElement("button", { key: t, className: nut3, onClick: () => {
19857
19934
  const n = { ...v };
19858
19935
  setFx(n);
19859
19936
  G.__xvaiMau = n;
@@ -19872,7 +19949,7 @@ var SuaLich = ({ ten, onDong }) => {
19872
19949
  const f2 = giaTri(x, "f"), d = giaTri(x, "d"), e = sua[x.id] || sua[x.i] || {};
19873
19950
  if (e.xoa) return null;
19874
19951
  return /* @__PURE__ */ shim_react_default.createElement("div", { key: "k" + (x.id || x.i), title: x.bo + " " + f2.toFixed(1) + "\u2013" + (f2 + d).toFixed(1) + " " + (x.giant || x.chu || ""), onPointerDown: (ev) => batDauKeo(ev, x, false), className: "absolute top-3 h-5 rounded-sm cursor-grab text-[8px] text-white overflow-hidden whitespace-nowrap px-0.5", style: { left: f2 / tongS * 100 + "%", width: Math.max(0.4, d / tongS * 100) + "%", background: MAUBO[x.bo] || "#777", outline: e.f != null || e.d != null ? "1px solid #fff" : "none" } }, String(x.giant || x.chu || x.bo).split(String.fromCharCode(10))[0].slice(0, 12), /* @__PURE__ */ shim_react_default.createElement("span", { onPointerDown: (ev) => batDauKeo(ev, x, true), className: "absolute right-0 top-0 bottom-0 w-1.5 bg-white/60 cursor-ew-resize" }));
19875
- }))), /* @__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" }, "khung"), /* @__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, "fx"), /* @__PURE__ */ shim_react_default.createElement("th", null, "xo\xE1"))), /* @__PURE__ */ shim_react_default.createElement("tbody", null, ds2.map((s) => {
19952
+ }))), /* @__PURE__ */ shim_react_default.createElement("div", { className: "mb-2 text-[11px]" }, /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: () => setMoLoi(!moLoi) }, moLoi ? "\u1EA8n" : "C\u1EAFt l\u1EDDi theo t\u1EEB", " (", tuLoi.length, " t\u1EEB", catTay.length ? ", xo\xE1 " + catTay.length : "", ")"), moLoi ? /* @__PURE__ */ shim_react_default.createElement("div", { className: "mt-1 max-h-32 overflow-auto bg-[#0B1A2D] border border-[#2C4A73] rounded p-1 leading-6" }, tuLoi.length ? tuLoi.map((w, k) => /* @__PURE__ */ shim_react_default.createElement("span", { key: k, onClick: () => batCat(w), title: (+w.t0).toFixed(2) + " s", className: "cursor-pointer px-0.5 rounded " + (daCat(w) ? "line-through text-red-400 bg-red-900/30" : "hover:bg-[#1E3A5F]") }, w.text, " ")) : /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#A2B2C9]" }, "Ch\u01B0a c\xF3 l\u1EDDi (ch\u1EA1y L\xE0m pro tr\u01B0\u1EDBc)")) : 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" }, "khung"), /* @__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, "fx"), /* @__PURE__ */ shim_react_default.createElement("th", null, "xo\xE1"))), /* @__PURE__ */ shim_react_default.createElement("tbody", null, ds2.map((s) => {
19876
19953
  const e = sua[s.id] || sua[s.i] || {};
19877
19954
  const v = (k) => (typeof e[k] === "string" ? e[k] : s[k]) || "";
19878
19955
  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, khung[(+s.f).toFixed(1)] ? /* @__PURE__ */ shim_react_default.createElement("img", { src: khung[(+s.f).toFixed(1)], width: 45, height: 80, className: "rounded cursor-zoom-in", onClick: () => setKhungTo(khung[(+s.f).toFixed(1)]) }) : /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#A2B2C9]" }, "\u2026")), /* @__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("input", { className: "w-10 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.05", min: "0.05", max: "0.95", placeholder: "x", title: "v\u1ECB tr\xED icon ngang 0,05\u20130,95", value: typeof e.stX === "number" ? e.stX : s.stX ?? "", onChange: (ev) => dat(s.id || String(s.i), "stX", +ev.target.value) }), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-10 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.05", min: "0.05", max: "0.95", placeholder: "y", title: "v\u1ECB tr\xED icon d\u1ECDc", value: typeof e.stY === "number" ? e.stY : s.stY ?? "", onChange: (ev) => dat(s.id || String(s.i), "stY", +ev.target.value) })), /* @__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("button", { className: nut3 + (Object.keys(fxCua(s)).length ? " bg-[#F6D178] text-[#122238]" : ""), onClick: () => setFxMo(fxMo === (s.id || String(s.i)) ? "" : s.id || String(s.i)) }, "fx"), fxMo === (s.id || String(s.i)) ? /* @__PURE__ */ shim_react_default.createElement("div", { className: "absolute z-40 bg-[#0B1A2D] border border-[#F6D178] rounded p-2 text-[11px] w-56 text-left", onClick: (ev) => ev.stopPropagation() }, [["sang", "s\xE1ng", 0.5, 1.6, 1], ["tuongPhan", "t\u01B0\u01A1ng ph\u1EA3n", 0.5, 1.6, 1], ["baoHoa", "t\u01B0\u01A1i", 0, 1.8, 1], ["am", "\u1EA5m", 0, 0.6, 0], ["mo", "m\u1EDD (px)", 0, 10, 0], ["xam", "\u0111en tr\u1EAFng", 0, 1, 0]].map((r) => /* @__PURE__ */ shim_react_default.createElement("label", { key: r[0], className: "flex items-center gap-1" }, r[1], " ", /* @__PURE__ */ shim_react_default.createElement("input", { type: "range", min: r[2], max: r[3], step: r[0] === "mo" ? 0.5 : 0.05, value: fxCua(s)[r[0]] ?? r[4], onChange: (ev) => datFxCanh(s, r[0], +ev.target.value), className: "flex-1" }), " ", (+(fxCua(s)[r[0]] ?? r[4])).toFixed(2))), /* @__PURE__ */ shim_react_default.createElement("div", { className: "flex gap-1 mt-1" }, /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: () => {
@@ -19882,7 +19959,7 @@ var SuaLich = ({ ten, onDong }) => {
19882
19959
  };
19883
19960
 
19884
19961
  // loi/vo-flow.tsx
19885
- var PHIEN_BAN = "loi-1010AM";
19962
+ var PHIEN_BAN = "loi-1010AO";
19886
19963
  var TRONG = () => migrateProject({ id: crypto.randomUUID(), name: "D\u1EF1 \xE1n m\u1EDBi", scenes: [], timeline: [], images: [null, null, null] });
19887
19964
  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";
19888
19965
  var Vo = () => {