chore(dist): rebuild
This commit is contained in:
+133
-133
@@ -1,14 +1,14 @@
|
||||
import { En as e, Mn as t, Sn as n, Wt as r, Yn as i, cn as a, dn as o, in as s, jn as c, kn as l, mn as u, pn as d, s as f, t as p, u as m, vn as h, wn as g, xn as _ } from "./config-C9a-wT5M.js";
|
||||
import { Cn as e, En as t, Kt as n, Nn as r, On as i, Pn as a, Zn as o, bn as s, gn as c, hn as l, jn as u, on as d, pn as f, s as p, t as m, u as h, un as g, wn as _ } from "./config-D56TZeFo.js";
|
||||
import { a as v, i as y, o as b, s as x } from "./graphTraversal-DTdQWkn5.js";
|
||||
import { c as S, l as C, m as w, p as ee, s as T, t as E, u as D, v as O } from "./generationSectionState-DuXxSw-j.js";
|
||||
import { c as S, l as C, m as w, p as ee, s as T, t as E, u as D, v as O } from "./generationSectionState-BR-TS47u.js";
|
||||
import { r as k } from "./events-1iwo5blr.js";
|
||||
import { C as A, D as j, E as M, T as N, _ as P, a as F, b as I, d as L, f as R, g as z, h as B, m as te, n as V, o as ne, p as H, r as re, s as ie, t as U, v as ae, w as oe, y as se } from "./tooltipShortcuts-Ury2eTek.js";
|
||||
import { I as ce } from "./mjr-primevue-C07IsEdU.js";
|
||||
import { C as le, S as ue, n as de, t as fe, w as pe } from "./genInfo-Dk8cerKp.js";
|
||||
import { C as A, D as j, E as M, T as N, _ as P, a as F, b as I, d as L, f as R, g as z, h as B, m as te, n as V, o as ne, p as H, r as re, s as ie, t as U, v as ae, w as oe, y as se } from "./tooltipShortcuts-BoJmznCQ.js";
|
||||
import { I as ce } from "./mjr-primevue-QrNPJaqR.js";
|
||||
import { C as le, S as ue, n as de, t as fe, w as pe } from "./genInfo-z8Muj1-U.js";
|
||||
// ui/features/viewer/videoSync.ts
|
||||
var me = () => {
|
||||
try {
|
||||
return !!p?.DEBUG_VIEWER;
|
||||
return !!m?.DEBUG_VIEWER;
|
||||
} catch {
|
||||
return !1;
|
||||
}
|
||||
@@ -592,7 +592,7 @@ function G(e) {
|
||||
return a === ".gif" ? "gif" : Me.has(a) ? "video" : Ne.has(a) ? "audio" : ue.has(a) ? "model3d" : "image";
|
||||
}
|
||||
function Fe(e) {
|
||||
return e ? e.url ? String(e.url) : e.filename && i(e) || "" : "";
|
||||
return e ? e.url ? String(e.url) : e.filename && o(e) || "" : "";
|
||||
}
|
||||
function K(e = "No media - select assets in the grid") {
|
||||
let t = document.createElement("div");
|
||||
@@ -743,7 +743,7 @@ function J(e, { fill: t = !1, controls: n = !0, initialMuted: r = !1, initialPla
|
||||
canvasClassName: `mjr-mfv-media mjr-model3d-render-canvas${t ? " mjr-mfv-media--fill" : ""}`,
|
||||
hintText: "Rotate: left drag Pan: right drag Zoom: wheel or middle drag",
|
||||
disableViewerTransform: !0,
|
||||
pauseDuringExecution: !!p.FLOATING_VIEWER_PAUSE_DURING_EXECUTION
|
||||
pauseDuringExecution: !!m.FLOATING_VIEWER_PAUSE_DURING_EXECUTION
|
||||
});
|
||||
let l = document.createElement("img");
|
||||
return l.className = s, l.src = a, l.alt = String(e?.filename || ""), l.draggable = !1, (o === "gif" || c) && Ae(l, e, { kind: o === "gif" ? "gif" : "animated-image" }) || l;
|
||||
@@ -905,12 +905,12 @@ var nt = class {
|
||||
let t = e?.widgets?.[0], i = t?.inputEl ?? t?.element ?? t?.el ?? null;
|
||||
i != null && "value" in i && i.value !== n.value && (i.value = n.value), r();
|
||||
try {
|
||||
l(e);
|
||||
u(e);
|
||||
} catch {}
|
||||
}), n._mjrAutoFit = r, this._noteTextarea = n, this._autoFits.push(r), c.appendChild(n), this._body = c, t.appendChild(c), this._el = t, this._applyExpandedState(), requestAnimationFrame(r), t;
|
||||
}
|
||||
let u = e.widgets ?? [], d = !1;
|
||||
for (let t of u) {
|
||||
let l = e.widgets ?? [], d = !1;
|
||||
for (let t of l) {
|
||||
let n = String(t.type || "").toLowerCase();
|
||||
if (We.has(n) || t.hidden || t.options?.hidden) continue;
|
||||
d = !0;
|
||||
@@ -952,7 +952,7 @@ var nt = class {
|
||||
}
|
||||
let e = this._node;
|
||||
if (e) try {
|
||||
d(e, {
|
||||
l(e, {
|
||||
select: !1,
|
||||
focusCanvas: !1
|
||||
});
|
||||
@@ -1085,7 +1085,7 @@ var it = class {
|
||||
};
|
||||
function at() {
|
||||
try {
|
||||
return h();
|
||||
return s();
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
@@ -1135,14 +1135,14 @@ function ut(e, t, n) {
|
||||
}
|
||||
function dt(e) {
|
||||
try {
|
||||
d(e);
|
||||
l(e);
|
||||
} catch (e) {
|
||||
console.debug?.("[MFV] _focusNode", e);
|
||||
}
|
||||
}
|
||||
function ft() {
|
||||
try {
|
||||
return n();
|
||||
return _();
|
||||
} catch (e) {
|
||||
console.debug?.("[MFV] _getSelectedNodeIds", e);
|
||||
}
|
||||
@@ -1168,66 +1168,66 @@ function ht(e) {
|
||||
}
|
||||
}
|
||||
function gt(e) {
|
||||
return g(e);
|
||||
return t(e);
|
||||
}
|
||||
function _t(e) {
|
||||
let t = h();
|
||||
let t = s();
|
||||
if (!e || !t || typeof t.add != "function") return !1;
|
||||
let n = String(e?.type || e?.class_type || e?.comfyClass || "").trim(), r = null;
|
||||
try {
|
||||
r = o(n);
|
||||
r = f(n);
|
||||
} catch (e) {
|
||||
console.debug?.("[MFV Graph Map] createNode failed", e);
|
||||
}
|
||||
if (!r) return !1;
|
||||
try {
|
||||
let t = typeof structuredClone == "function" ? structuredClone(e) : JSON.parse(JSON.stringify(e));
|
||||
return St(t, e), delete t.id, Array.isArray(t.pos) && (t.pos = [Number(t.pos[0] || 0) + 32, Number(t.pos[1] || 0) + 32]), typeof r.configure == "function" ? r.configure(t) : Object.assign(r, t), a(r);
|
||||
return St(t, e), delete t.id, Array.isArray(t.pos) && (t.pos = [Number(t.pos[0] || 0) + 32, Number(t.pos[1] || 0) + 32]), typeof r.configure == "function" ? r.configure(t) : Object.assign(r, t), g(r);
|
||||
} catch (e) {
|
||||
return console.debug?.("[MFV Graph Map] import node failed", e), !1;
|
||||
}
|
||||
}
|
||||
function vt(e) {
|
||||
let n = yt();
|
||||
if (!e || !n) return {
|
||||
let t = yt();
|
||||
if (!e || !t) return {
|
||||
ok: !1,
|
||||
count: 0,
|
||||
reason: "no-target"
|
||||
};
|
||||
let r = bt(e), i = Array.isArray(n.widgets) ? n.widgets : [];
|
||||
if (!r.length || !i.length) return {
|
||||
let n = bt(e), r = Array.isArray(t.widgets) ? t.widgets : [];
|
||||
if (!n.length || !r.length) return {
|
||||
ok: !1,
|
||||
count: 0,
|
||||
reason: "no-widgets"
|
||||
};
|
||||
let a = /* @__PURE__ */ new Map();
|
||||
i.forEach((e, t) => {
|
||||
for (let n of wt(e)) a.has(n) || a.set(n, {
|
||||
let i = /* @__PURE__ */ new Map();
|
||||
r.forEach((e, t) => {
|
||||
for (let n of wt(e)) i.has(n) || i.set(n, {
|
||||
widget: e,
|
||||
index: t
|
||||
});
|
||||
});
|
||||
let o = Et(B(e)), s = Et(n?.type || n?.comfyClass || n?.class_type), c = !!(o && s && o === s), l = /* @__PURE__ */ new Set(), u = 0;
|
||||
for (let e of r) {
|
||||
let t = Tt(e.label), r = t ? a.get(t) : null, o = e.index;
|
||||
if ((!r || l.has(r.index)) && c && typeof o == "number" && Number.isInteger(o)) {
|
||||
let e = i[o];
|
||||
e && (r = {
|
||||
let o = Et(B(e)), s = Et(t?.type || t?.comfyClass || t?.class_type), c = !!(o && s && o === s), l = /* @__PURE__ */ new Set(), u = 0;
|
||||
for (let e of n) {
|
||||
let n = Tt(e.label), a = n ? i.get(n) : null, o = e.index;
|
||||
if ((!a || l.has(a.index)) && c && typeof o == "number" && Number.isInteger(o)) {
|
||||
let e = r[o];
|
||||
e && (a = {
|
||||
widget: e,
|
||||
index: o
|
||||
});
|
||||
}
|
||||
r && !l.has(r.index) && ne(r.widget, X(e.value), n) && (l.add(r.index), u += 1);
|
||||
a && !l.has(a.index) && ne(a.widget, X(e.value), t) && (l.add(a.index), u += 1);
|
||||
}
|
||||
return t(), {
|
||||
return a(), {
|
||||
ok: u > 0,
|
||||
count: u,
|
||||
reason: u > 0 ? "ok" : "no-match",
|
||||
targetNode: n
|
||||
targetNode: t
|
||||
};
|
||||
}
|
||||
function yt() {
|
||||
return u() || null;
|
||||
return c() || null;
|
||||
}
|
||||
function bt(e) {
|
||||
let t = te(e);
|
||||
@@ -1735,14 +1735,14 @@ var Ht = 16, Ut = 250, Wt = class {
|
||||
let t = document.createElement("div");
|
||||
t.className = "mjr-ws-sidebar-header";
|
||||
let n = document.createElement("span");
|
||||
n.className = "mjr-ws-sidebar-title", n.textContent = s("workflowSidebar.nodes", "Nodes"), t.appendChild(n);
|
||||
n.className = "mjr-ws-sidebar-title", n.textContent = d("workflowSidebar.nodes", "Nodes"), t.appendChild(n);
|
||||
let r = document.createElement("button");
|
||||
r.type = "button", r.className = "mjr-icon-btn", r.title = s("workflowSidebar.close", "Close sidebar"), r.innerHTML = "<i class=\"pi pi-times\" aria-hidden=\"true\"></i>", r.addEventListener("click", () => {
|
||||
r.type = "button", r.className = "mjr-icon-btn", r.title = d("workflowSidebar.close", "Close sidebar"), r.innerHTML = "<i class=\"pi pi-times\" aria-hidden=\"true\"></i>", r.addEventListener("click", () => {
|
||||
let e = this._activeMode === "graph";
|
||||
this.hide(), e && this._onCloseGraphMap?.(), this._onClose?.();
|
||||
}), t.appendChild(r), e.appendChild(t);
|
||||
let i = document.createElement("div");
|
||||
i.className = "mjr-ws-tab-bar", this._nodesModeBtn = this._makeModeButton(s("workflowSidebar.nodes", "Nodes"), "pi pi-sliders-h", "nodes"), this._graphModeBtn = this._makeModeButton(s("workflowSidebar.graphMap", "Graph Map"), "pi pi-sitemap", "graph"), i.appendChild(this._nodesModeBtn), i.appendChild(this._graphModeBtn), e.appendChild(i);
|
||||
i.className = "mjr-ws-tab-bar", this._nodesModeBtn = this._makeModeButton(d("workflowSidebar.nodes", "Nodes"), "pi pi-sliders-h", "nodes"), this._graphModeBtn = this._makeModeButton(d("workflowSidebar.graphMap", "Graph Map"), "pi pi-sitemap", "graph"), i.appendChild(this._nodesModeBtn), i.appendChild(this._graphModeBtn), e.appendChild(i);
|
||||
let a = document.createElement("div");
|
||||
return a.className = "mjr-ws-sidebar-resizer", a.setAttribute("role", "separator"), a.setAttribute("aria-orientation", "vertical"), a.setAttribute("aria-hidden", "true"), e.appendChild(a), this._bindResize(a), this._body = document.createElement("div"), this._body.className = "mjr-ws-sidebar-body", e.appendChild(this._body), this._renderActiveMode(), e;
|
||||
}
|
||||
@@ -1834,7 +1834,7 @@ var Q = Object.freeze({
|
||||
"latent2rgb",
|
||||
"taesd",
|
||||
"none"
|
||||
]), Jt = "progress-update", Yt = (e, t = "") => s(e, t, void 0);
|
||||
]), Jt = "progress-update", Yt = (e, t = "") => d(e, t, void 0);
|
||||
function Xt() {
|
||||
let t = document.createElement("div");
|
||||
t.className = "mjr-mfv-run-controls";
|
||||
@@ -1842,82 +1842,82 @@ function Xt() {
|
||||
n.type = "button", n.className = "mjr-icon-btn mjr-mfv-run-btn";
|
||||
let r = Yt("tooltip.queuePrompt", "Queue Prompt (Run)");
|
||||
n.title = r, n.setAttribute("aria-label", r);
|
||||
let i = document.createElement("i");
|
||||
i.className = "pi pi-play", i.setAttribute("aria-hidden", "true"), n.appendChild(i);
|
||||
let a = document.createElement("button");
|
||||
a.type = "button", a.className = "mjr-icon-btn mjr-mfv-stop-btn";
|
||||
let o = document.createElement("i");
|
||||
o.className = "pi pi-stop", o.setAttribute("aria-hidden", "true"), a.appendChild(o), t.appendChild(n), t.appendChild(a);
|
||||
let s = Q.IDLE, c = !1, l = !1, u = null;
|
||||
function d() {
|
||||
u != null && (clearTimeout(u), u = null);
|
||||
let a = document.createElement("i");
|
||||
a.className = "pi pi-play", a.setAttribute("aria-hidden", "true"), n.appendChild(a);
|
||||
let o = document.createElement("button");
|
||||
o.type = "button", o.className = "mjr-icon-btn mjr-mfv-stop-btn";
|
||||
let s = document.createElement("i");
|
||||
s.className = "pi pi-stop", s.setAttribute("aria-hidden", "true"), o.appendChild(s), t.appendChild(n), t.appendChild(o);
|
||||
let c = Q.IDLE, l = !1, u = !1, d = null;
|
||||
function f() {
|
||||
d != null && (clearTimeout(d), d = null);
|
||||
}
|
||||
function f(e, { canStop: t = !1 } = {}) {
|
||||
s = e, n.classList.toggle("running", s === Q.RUNNING), n.classList.toggle("stopping", s === Q.STOPPING), n.classList.toggle("error", s === Q.ERROR), n.disabled = s === Q.RUNNING || s === Q.STOPPING, a.disabled = !t || s === Q.STOPPING, a.classList.toggle("active", t && s !== Q.STOPPING), a.classList.toggle("stopping", s === Q.STOPPING), s === Q.RUNNING || s === Q.STOPPING ? i.className = "pi pi-spin pi-spinner" : i.className = "pi pi-play";
|
||||
function p(e, { canStop: t = !1 } = {}) {
|
||||
c = e, n.classList.toggle("running", c === Q.RUNNING), n.classList.toggle("stopping", c === Q.STOPPING), n.classList.toggle("error", c === Q.ERROR), n.disabled = c === Q.RUNNING || c === Q.STOPPING, o.disabled = !t || c === Q.STOPPING, o.classList.toggle("active", t && c !== Q.STOPPING), o.classList.toggle("stopping", c === Q.STOPPING), c === Q.RUNNING || c === Q.STOPPING ? a.className = "pi pi-spin pi-spinner" : a.className = "pi pi-play";
|
||||
}
|
||||
function p() {
|
||||
function m() {
|
||||
let e = Yt("tooltip.queueStop", "Stop Generation");
|
||||
a.title = e, a.setAttribute("aria-label", e);
|
||||
o.title = e, o.setAttribute("aria-label", e);
|
||||
}
|
||||
function m(e = j.getSnapshot(), { authoritative: t = !1 } = {}) {
|
||||
function h(e = j.getSnapshot(), { authoritative: t = !1 } = {}) {
|
||||
let n = Math.max(0, Number(e?.queue) || 0), r = e?.prompt || null, i = !!r?.currentlyExecuting, a = !!(r && (r.currentlyExecuting || r.errorDetails)), o = n > 0 || a, s = !!r?.errorDetails;
|
||||
t && n === 0 && !r && (c = !1, l = !1);
|
||||
let u = c || l || i || n > 0;
|
||||
if ((i || o || n > 0) && (c = !1), s) l = !1, d(), f(Q.ERROR, { canStop: !1 });
|
||||
else if (l) {
|
||||
if (!u) {
|
||||
l = !1, m(e);
|
||||
t && n === 0 && !r && (l = !1, u = !1);
|
||||
let c = l || u || i || n > 0;
|
||||
if ((i || o || n > 0) && (l = !1), s) u = !1, f(), p(Q.ERROR, { canStop: !1 });
|
||||
else if (u) {
|
||||
if (!c) {
|
||||
u = !1, h(e);
|
||||
return;
|
||||
}
|
||||
f(Q.STOPPING, { canStop: !1 });
|
||||
} else c || i || o || n > 0 ? (d(), f(Q.RUNNING, { canStop: !0 })) : (d(), f(Q.IDLE, { canStop: !1 }));
|
||||
p(Q.STOPPING, { canStop: !1 });
|
||||
} else l || i || o || n > 0 ? (f(), p(Q.RUNNING, { canStop: !0 })) : (f(), p(Q.IDLE, { canStop: !1 }));
|
||||
}
|
||||
function h() {
|
||||
c = !1, l = !1, d(), f(Q.ERROR, { canStop: !1 }), u = setTimeout(() => {
|
||||
u = null, m();
|
||||
function g() {
|
||||
l = !1, u = !1, f(), p(Q.ERROR, { canStop: !1 }), d = setTimeout(() => {
|
||||
d = null, h();
|
||||
}, 1500);
|
||||
}
|
||||
async function g() {
|
||||
return { tracked: await e(_()) };
|
||||
async function _() {
|
||||
return { tracked: await i(e()) };
|
||||
}
|
||||
async function v() {
|
||||
if (s !== Q.RUNNING && s !== Q.STOPPING) {
|
||||
c = !0, l = !1, m();
|
||||
if (c !== Q.RUNNING && c !== Q.STOPPING) {
|
||||
l = !0, u = !1, h();
|
||||
try {
|
||||
(await nn())?.tracked || (c = !1), m();
|
||||
(await nn())?.tracked || (l = !1), h();
|
||||
} catch (e) {
|
||||
console.error?.("[MFV Run]", e), h();
|
||||
console.error?.("[MFV Run]", e), g();
|
||||
}
|
||||
}
|
||||
}
|
||||
async function y() {
|
||||
if (s === Q.RUNNING) {
|
||||
l = !0, m();
|
||||
if (c === Q.RUNNING) {
|
||||
u = !0, h();
|
||||
try {
|
||||
(await g())?.tracked || (l = !1, c = !1), m();
|
||||
(await _())?.tracked || (u = !1, l = !1), h();
|
||||
} catch (e) {
|
||||
console.error?.("[MFV Stop]", e), l = !1, m();
|
||||
console.error?.("[MFV Stop]", e), u = !1, h();
|
||||
}
|
||||
}
|
||||
}
|
||||
p(), a.disabled = !0, n.addEventListener("click", v), a.addEventListener("click", y);
|
||||
m(), o.disabled = !0, n.addEventListener("click", v), o.addEventListener("click", y);
|
||||
let b = (e) => {
|
||||
m(e?.detail || j.getSnapshot(), { authoritative: !0 });
|
||||
h(e?.detail || j.getSnapshot(), { authoritative: !0 });
|
||||
};
|
||||
return j.addEventListener(Jt, b), M({ timeoutMs: 4e3 }).catch((e) => {
|
||||
console.debug?.(e);
|
||||
}), m(), {
|
||||
}), h(), {
|
||||
el: t,
|
||||
dispose() {
|
||||
d(), n.removeEventListener("click", v), a.removeEventListener("click", y), j.removeEventListener(Jt, b);
|
||||
f(), n.removeEventListener("click", v), o.removeEventListener("click", y), j.removeEventListener(Jt, b);
|
||||
}
|
||||
};
|
||||
}
|
||||
function Zt(e = p.MFV_PREVIEW_METHOD) {
|
||||
function Zt(e = m.MFV_PREVIEW_METHOD) {
|
||||
let t = String(e || "").trim().toLowerCase();
|
||||
return qt.has(t) ? t : p.MFV_PREVIEW_METHOD || "auto";
|
||||
return qt.has(t) ? t : m.MFV_PREVIEW_METHOD || "auto";
|
||||
}
|
||||
function Qt(e, t = p.MFV_PREVIEW_METHOD) {
|
||||
function Qt(e, t = m.MFV_PREVIEW_METHOD) {
|
||||
let n = Zt(t), r = {
|
||||
...e?.extra_data || {},
|
||||
extra_pnginfo: { ...e?.extra_data?.extra_pnginfo || {} }
|
||||
@@ -1927,7 +1927,7 @@ function Qt(e, t = p.MFV_PREVIEW_METHOD) {
|
||||
extra_data: r
|
||||
};
|
||||
}
|
||||
function $t(e, { previewMethod: t = p.MFV_PREVIEW_METHOD, clientId: n = null } = {}) {
|
||||
function $t(e, { previewMethod: t = m.MFV_PREVIEW_METHOD, clientId: n = null } = {}) {
|
||||
let r = Qt(e, t), i = {
|
||||
prompt: r?.output,
|
||||
extra_data: r?.extra_data || {}
|
||||
@@ -1950,12 +1950,12 @@ function tn(e) {
|
||||
}), t;
|
||||
}
|
||||
async function nn() {
|
||||
let e = _();
|
||||
if (!e) throw Error("ComfyUI app not available");
|
||||
let t = tn(v(e));
|
||||
return { tracked: await c({
|
||||
app: e,
|
||||
forceNativeQueue: t,
|
||||
let t = e();
|
||||
if (!t) throw Error("ComfyUI app not available");
|
||||
let n = tn(v(t));
|
||||
return { tracked: await r({
|
||||
app: t,
|
||||
forceNativeQueue: n,
|
||||
resolvePromptData(e) {
|
||||
return typeof e?.graphToPrompt == "function" ? e.graphToPrompt() : null;
|
||||
},
|
||||
@@ -2083,7 +2083,7 @@ function dn(e) {
|
||||
let i = document.createElement("span");
|
||||
i.textContent = "Majoor Floating Viewer", n.append(r, i);
|
||||
let a = document.createElement("button");
|
||||
e._closeBtn = a, a.type = "button", a.className = "mjr-icon-btn mjr-mfv-close-btn", V(a, s("tooltip.closeViewer", "Close viewer"), "Esc");
|
||||
e._closeBtn = a, a.type = "button", a.className = "mjr-icon-btn mjr-mfv-close-btn", V(a, d("tooltip.closeViewer", "Close viewer"), "Esc");
|
||||
let o = document.createElement("i");
|
||||
return o.className = "pi pi-times", o.setAttribute("aria-hidden", "true"), a.appendChild(o), t.appendChild(n), t.appendChild(a), t;
|
||||
}
|
||||
@@ -2101,31 +2101,31 @@ function fn(e) {
|
||||
};
|
||||
}, n = document.createElement("div");
|
||||
n.className = "mjr-mfv-toolbar";
|
||||
let r = on("<i class=\"pi pi-image\" aria-hidden=\"true\"></i>", s("viewer.mode", "Viewer mode"), [
|
||||
let r = on("<i class=\"pi pi-image\" aria-hidden=\"true\"></i>", d("viewer.mode", "Viewer mode"), [
|
||||
{
|
||||
value: W.SIMPLE,
|
||||
html: `<i class="pi pi-image" aria-hidden="true"></i><span>${s("viewer.mode.simple", "Simple")}</span>`
|
||||
html: `<i class="pi pi-image" aria-hidden="true"></i><span>${d("viewer.mode.simple", "Simple")}</span>`
|
||||
},
|
||||
{
|
||||
value: W.AB,
|
||||
html: `<i class="pi pi-clone" aria-hidden="true"></i><span>${s("viewer.mode.abCompare", "A/B Compare")}</span>`
|
||||
html: `<i class="pi pi-clone" aria-hidden="true"></i><span>${d("viewer.mode.abCompare", "A/B Compare")}</span>`
|
||||
},
|
||||
{
|
||||
value: W.SIDE,
|
||||
html: `<i class="pi pi-table" aria-hidden="true"></i><span>${s("viewer.mode.sideBySide", "Side-by-side")}</span>`
|
||||
html: `<i class="pi pi-table" aria-hidden="true"></i><span>${d("viewer.mode.sideBySide", "Side-by-side")}</span>`
|
||||
},
|
||||
{
|
||||
value: W.GRID,
|
||||
html: `<i class="pi pi-th-large" aria-hidden="true"></i><span>${s("viewer.mode.grid", "Grid")}</span>`
|
||||
html: `<i class="pi pi-th-large" aria-hidden="true"></i><span>${d("viewer.mode.grid", "Grid")}</span>`
|
||||
},
|
||||
{
|
||||
value: W.GRAPH,
|
||||
html: `<i class="pi pi-sitemap" aria-hidden="true"></i><span>${s("workflowSidebar.graphMap", "Graph Map")}</span>`
|
||||
html: `<i class="pi pi-sitemap" aria-hidden="true"></i><span>${d("workflowSidebar.graphMap", "Graph Map")}</span>`
|
||||
}
|
||||
], e);
|
||||
e._modeDrop = r, e._modeBtn = r.trigger, e._modeSelect = r.select, e._updateModeBtnUI(), n.appendChild(r.wrap);
|
||||
let i = document.createElement("button");
|
||||
i.type = "button", i.className = "mjr-icon-btn mjr-mfv-pin-trigger", i.title = s("viewer.pinSlots", "Pin slots A/B/C/D"), i.setAttribute("aria-haspopup", "dialog"), i.setAttribute("aria-expanded", "false"), i.innerHTML = "<i class=\"pi pi-map-marker\" aria-hidden=\"true\"></i>", n.appendChild(i);
|
||||
i.type = "button", i.className = "mjr-icon-btn mjr-mfv-pin-trigger", i.title = d("viewer.pinSlots", "Pin slots A/B/C/D"), i.setAttribute("aria-haspopup", "dialog"), i.setAttribute("aria-expanded", "false"), i.innerHTML = "<i class=\"pi pi-map-marker\" aria-hidden=\"true\"></i>", n.appendChild(i);
|
||||
let a = document.createElement("div");
|
||||
a.className = "mjr-mfv-pin-popover", e.element.appendChild(a);
|
||||
let o = document.createElement("div");
|
||||
@@ -2144,25 +2144,25 @@ function fn(e) {
|
||||
i.className = "pi pi-map-marker mjr-menu-item-check", i.style.opacity = "0", n.appendChild(r), n.appendChild(i), o.appendChild(n), e._pinBtns[t] = n;
|
||||
}
|
||||
e._updatePinUI(), e._pinBtn = i, e._pinPopover = a;
|
||||
let c = () => {
|
||||
let s = () => {
|
||||
let t = i.getBoundingClientRect(), n = e.element.getBoundingClientRect();
|
||||
a.style.left = `${t.left - n.left}px`, a.style.top = `${t.bottom - n.top + 4}px`, a.classList.add("is-open"), i.setAttribute("aria-expanded", "true");
|
||||
};
|
||||
e._closePinPopover = () => {
|
||||
a.classList.remove("is-open"), i.setAttribute("aria-expanded", "false");
|
||||
}, i.addEventListener("click", (t) => {
|
||||
t.stopPropagation(), a.classList.contains("is-open") ? e._closePinPopover() : (e._closeAllToolbarPopovers?.(), c());
|
||||
t.stopPropagation(), a.classList.contains("is-open") ? e._closePinPopover() : (e._closeAllToolbarPopovers?.(), s());
|
||||
});
|
||||
let l = document.createElement("button");
|
||||
l.type = "button", l.className = "mjr-icon-btn mjr-mfv-guides-trigger", l.title = "Guides", l.setAttribute("aria-haspopup", "listbox"), l.setAttribute("aria-expanded", "false");
|
||||
let u = document.createElement("img");
|
||||
u.src = new URL("data:image/png;base64,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", "" + import.meta.url).href, u.className = "mjr-mfv-guides-icon", u.alt = "", u.setAttribute("aria-hidden", "true"), l.appendChild(u), n.appendChild(l);
|
||||
let d = document.createElement("div");
|
||||
d.className = "mjr-mfv-guides-popover", e.element.appendChild(d);
|
||||
let c = document.createElement("button");
|
||||
c.type = "button", c.className = "mjr-icon-btn mjr-mfv-guides-trigger", c.title = "Guides", c.setAttribute("aria-haspopup", "listbox"), c.setAttribute("aria-expanded", "false");
|
||||
let l = document.createElement("img");
|
||||
l.src = new URL("data:image/png;base64,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", "" + import.meta.url).href, l.className = "mjr-mfv-guides-icon", l.alt = "", l.setAttribute("aria-hidden", "true"), c.appendChild(l), n.appendChild(c);
|
||||
let u = document.createElement("div");
|
||||
u.className = "mjr-mfv-guides-popover", e.element.appendChild(u);
|
||||
let f = document.createElement("div");
|
||||
f.className = "mjr-menu", f.style.cssText = "display:grid;gap:4px;", d.appendChild(f);
|
||||
f.className = "mjr-menu", f.style.cssText = "display:grid;gap:4px;", u.appendChild(f);
|
||||
let p = document.createElement("select");
|
||||
p.style.cssText = "position:absolute;opacity:0;pointer-events:none;width:0;height:0;overflow:hidden;", d.appendChild(p);
|
||||
p.style.cssText = "position:absolute;opacity:0;pointer-events:none;width:0;height:0;overflow:hidden;", u.appendChild(p);
|
||||
let m = [
|
||||
{
|
||||
value: "0",
|
||||
@@ -2191,15 +2191,15 @@ function fn(e) {
|
||||
let i = document.createElement("i");
|
||||
i.className = "pi pi-check mjr-menu-item-check", i.style.opacity = e.value === h ? "1" : "0", n.appendChild(r), n.appendChild(i), f.appendChild(n), g.push(n), e.value === h && n.classList.add("is-active");
|
||||
}
|
||||
p.value = h, l.classList.toggle("is-on", h !== "0"), e._guidesSelect = p, e._guideBtn = l, e._guidePopover = d;
|
||||
p.value = h, c.classList.toggle("is-on", h !== "0"), e._guidesSelect = p, e._guideBtn = c, e._guidePopover = u;
|
||||
let _ = () => {
|
||||
let t = l.getBoundingClientRect(), n = e.element.getBoundingClientRect();
|
||||
d.style.left = `${t.left - n.left}px`, d.style.top = `${t.bottom - n.top + 4}px`, d.classList.add("is-open"), l.setAttribute("aria-expanded", "true");
|
||||
let t = c.getBoundingClientRect(), n = e.element.getBoundingClientRect();
|
||||
u.style.left = `${t.left - n.left}px`, u.style.top = `${t.bottom - n.top + 4}px`, u.classList.add("is-open"), c.setAttribute("aria-expanded", "true");
|
||||
};
|
||||
e._closeGuidePopover = () => {
|
||||
d.classList.remove("is-open"), l.setAttribute("aria-expanded", "false");
|
||||
}, l.addEventListener("click", (t) => {
|
||||
t.stopPropagation(), d.classList.contains("is-open") ? e._closeGuidePopover() : (e._closeAllToolbarPopovers?.(), _());
|
||||
u.classList.remove("is-open"), c.setAttribute("aria-expanded", "false");
|
||||
}, c.addEventListener("click", (t) => {
|
||||
t.stopPropagation(), u.classList.contains("is-open") ? e._closeGuidePopover() : (e._closeAllToolbarPopovers?.(), _());
|
||||
}), f.addEventListener("click", (t) => {
|
||||
let n = t.target.closest(".mjr-menu-item");
|
||||
if (!n) return;
|
||||
@@ -2207,7 +2207,7 @@ function fn(e) {
|
||||
p.value = r ?? "", p.dispatchEvent(new Event("change", { bubbles: !0 })), g.forEach((e) => {
|
||||
let t = e.dataset.value === r;
|
||||
e.classList.toggle("is-active", t), e.querySelector(".mjr-menu-item-check").style.opacity = t ? "1" : "0";
|
||||
}), l.classList.toggle("is-on", r !== "0"), e._closeGuidePopover();
|
||||
}), c.classList.toggle("is-on", r !== "0"), e._closeGuidePopover();
|
||||
});
|
||||
let v = String(e._channel || "rgb"), y = document.createElement("button");
|
||||
y.type = "button", y.className = "mjr-icon-btn mjr-mfv-ch-trigger", y.title = "Channel", y.setAttribute("aria-haspopup", "listbox"), y.setAttribute("aria-expanded", "false");
|
||||
@@ -2376,24 +2376,24 @@ function fn(e) {
|
||||
}), e._closeFormatPopover();
|
||||
});
|
||||
let L = document.createElement("div");
|
||||
L.className = "mjr-mfv-toolbar-sep", L.setAttribute("aria-hidden", "true"), n.appendChild(L), e._liveBtn = document.createElement("button"), e._liveBtn.type = "button", e._liveBtn.className = "mjr-icon-btn", e._liveBtn.innerHTML = "<i class=\"pi pi-circle\" aria-hidden=\"true\"></i>", e._liveBtn.setAttribute("aria-pressed", "false"), V(e._liveBtn, s("tooltip.liveStreamOff", "Live Stream: OFF - click to follow final generation outputs"), "L"), n.appendChild(e._liveBtn), e._previewBtn = document.createElement("button"), e._previewBtn.type = "button", e._previewBtn.className = "mjr-icon-btn", e._previewBtn.innerHTML = "<i class=\"pi pi-eye\" aria-hidden=\"true\"></i>", e._previewBtn.setAttribute("aria-pressed", "false"), V(e._previewBtn, s("tooltip.previewStreamOff", "KSampler Preview: OFF - click to stream sampler denoising frames"), "K"), n.appendChild(e._previewBtn), e._nodeStreamBtn = document.createElement("button"), e._nodeStreamBtn.type = "button", e._nodeStreamBtn.className = "mjr-icon-btn", e._nodeStreamBtn.innerHTML = "<i class=\"pi pi-sitemap\" aria-hidden=\"true\"></i>", e._nodeStreamBtn.setAttribute("aria-pressed", "false"), V(e._nodeStreamBtn, s("tooltip.nodeStreamOff", "Node Stream: OFF - click to follow selected node previews, including ImageOps live canvases"), "N"), n.appendChild(e._nodeStreamBtn), e._genBtn = document.createElement("button"), e._genBtn.type = "button", e._genBtn.className = "mjr-icon-btn", e._genBtn.setAttribute("aria-pressed", String(!!e._genSidebarEnabled));
|
||||
L.className = "mjr-mfv-toolbar-sep", L.setAttribute("aria-hidden", "true"), n.appendChild(L), e._liveBtn = document.createElement("button"), e._liveBtn.type = "button", e._liveBtn.className = "mjr-icon-btn", e._liveBtn.innerHTML = "<i class=\"pi pi-circle\" aria-hidden=\"true\"></i>", e._liveBtn.setAttribute("aria-pressed", "false"), V(e._liveBtn, d("tooltip.liveStreamOff", "Live Stream: OFF - click to follow final generation outputs"), "L"), n.appendChild(e._liveBtn), e._previewBtn = document.createElement("button"), e._previewBtn.type = "button", e._previewBtn.className = "mjr-icon-btn", e._previewBtn.innerHTML = "<i class=\"pi pi-eye\" aria-hidden=\"true\"></i>", e._previewBtn.setAttribute("aria-pressed", "false"), V(e._previewBtn, d("tooltip.previewStreamOff", "KSampler Preview: OFF - click to stream sampler denoising frames"), "K"), n.appendChild(e._previewBtn), e._nodeStreamBtn = document.createElement("button"), e._nodeStreamBtn.type = "button", e._nodeStreamBtn.className = "mjr-icon-btn", e._nodeStreamBtn.innerHTML = "<i class=\"pi pi-sitemap\" aria-hidden=\"true\"></i>", e._nodeStreamBtn.setAttribute("aria-pressed", "false"), V(e._nodeStreamBtn, d("tooltip.nodeStreamOff", "Node Stream: OFF - click to follow selected node previews, including ImageOps live canvases"), "N"), n.appendChild(e._nodeStreamBtn), e._genBtn = document.createElement("button"), e._genBtn.type = "button", e._genBtn.className = "mjr-icon-btn", e._genBtn.setAttribute("aria-pressed", String(!!e._genSidebarEnabled));
|
||||
let R = document.createElement("i");
|
||||
R.className = "pi pi-info-circle", R.setAttribute("aria-hidden", "true"), e._genBtn.appendChild(R), n.appendChild(e._genBtn), e._updateGenBtnUI(), e._popoutBtn = document.createElement("button"), e._popoutBtn.type = "button", e._popoutBtn.className = "mjr-icon-btn";
|
||||
let z = s("tooltip.popOutViewer", "Pop out viewer to separate window");
|
||||
let z = d("tooltip.popOutViewer", "Pop out viewer to separate window");
|
||||
e._popoutBtn.title = z, e._popoutBtn.setAttribute("aria-label", z), e._popoutBtn.setAttribute("aria-pressed", "false");
|
||||
let B = document.createElement("i");
|
||||
B.className = "pi pi-external-link", B.setAttribute("aria-hidden", "true"), e._popoutBtn.appendChild(B), n.appendChild(e._popoutBtn), e._captureBtn = document.createElement("button"), e._captureBtn.type = "button", e._captureBtn.className = "mjr-icon-btn";
|
||||
let te = s("tooltip.captureView", "Save view as image");
|
||||
let te = d("tooltip.captureView", "Save view as image");
|
||||
e._captureBtn.title = te, e._captureBtn.setAttribute("aria-label", te);
|
||||
let ne = document.createElement("i");
|
||||
ne.className = "pi pi-download", ne.setAttribute("aria-hidden", "true"), e._captureBtn.appendChild(ne), n.appendChild(e._captureBtn);
|
||||
let H = document.createElement("div");
|
||||
H.className = "mjr-mfv-toolbar-sep", H.style.marginLeft = "auto", H.setAttribute("aria-hidden", "true"), n.appendChild(H), e._settingsBtn = document.createElement("button"), e._settingsBtn.type = "button", e._settingsBtn.className = "mjr-icon-btn mjr-mfv-settings-btn";
|
||||
let re = s("tooltip.nodeParams", "Node Parameters");
|
||||
let re = d("tooltip.nodeParams", "Node Parameters");
|
||||
e._settingsBtn.title = re, e._settingsBtn.setAttribute("aria-label", re), e._settingsBtn.setAttribute("aria-pressed", "false");
|
||||
let ie = document.createElement("i");
|
||||
ie.className = "pi pi-sliders-h", ie.setAttribute("aria-hidden", "true"), e._settingsBtn.appendChild(ie), n.appendChild(e._settingsBtn), e._runHandle = Xt(), n.appendChild(e._runHandle.el), e._majoorSettingsBtn = document.createElement("button"), e._majoorSettingsBtn.type = "button", e._majoorSettingsBtn.className = "mjr-icon-btn mjr-mfv-majoor-settings-btn";
|
||||
let U = s("tooltip.openMajoorSettings", "Open Majoor Assets Manager settings");
|
||||
let U = d("tooltip.openMajoorSettings", "Open Majoor Assets Manager settings");
|
||||
e._majoorSettingsBtn.title = U, e._majoorSettingsBtn.setAttribute("aria-label", U);
|
||||
let ae = document.createElement("i");
|
||||
return ae.className = "pi pi-cog", ae.setAttribute("aria-hidden", "true"), e._majoorSettingsBtn.appendChild(ae), n.appendChild(e._majoorSettingsBtn), e._handleDocClick = (t) => {
|
||||
@@ -2455,7 +2455,7 @@ function mn(e, t) {
|
||||
}
|
||||
function hn(e) {
|
||||
if (!e._contentWrapper) return;
|
||||
let t = p.MFV_SIDEBAR_POSITION || "right";
|
||||
let t = m.MFV_SIDEBAR_POSITION || "right";
|
||||
e._contentWrapper.setAttribute("data-sidebar-pos", t), e._sidebar?.el && e._contentEl && (t === "left" ? e._contentWrapper.insertBefore(e._sidebar.el, e._contentEl) : e._contentWrapper.appendChild(e._sidebar.el));
|
||||
}
|
||||
function gn(e) {
|
||||
@@ -2645,7 +2645,7 @@ function kn(e, t) {
|
||||
if (!e._liveBtn) return;
|
||||
let n = !!t;
|
||||
e._liveBtn.classList.toggle("mjr-live-active", n);
|
||||
let r = n ? s("tooltip.liveStreamOn", "Live Stream: ON - follows final generation outputs after execution") : s("tooltip.liveStreamOff", "Live Stream: OFF - click to follow final generation outputs"), i = U(r, "L");
|
||||
let r = n ? d("tooltip.liveStreamOn", "Live Stream: ON - follows final generation outputs after execution") : d("tooltip.liveStreamOff", "Live Stream: OFF - click to follow final generation outputs"), i = U(r, "L");
|
||||
e._liveBtn.setAttribute("aria-pressed", String(n)), e._liveBtn.setAttribute("aria-label", i);
|
||||
let a = document.createElement("i");
|
||||
a.className = n ? "pi pi-circle-fill" : "pi pi-circle", a.setAttribute("aria-hidden", "true"), e._liveBtn.replaceChildren(a), e._liveBtn.title = i;
|
||||
@@ -2653,7 +2653,7 @@ function kn(e, t) {
|
||||
function An(e, t) {
|
||||
if (e._previewActive = !!t, !e._previewBtn) return;
|
||||
e._previewBtn.classList.toggle("mjr-preview-active", e._previewActive);
|
||||
let n = e._previewActive ? s("tooltip.previewStreamOn", "KSampler Preview: ON - streams sampler denoising frames during execution") : s("tooltip.previewStreamOff", "KSampler Preview: OFF - click to stream sampler denoising frames"), r = U(n, "K");
|
||||
let n = e._previewActive ? d("tooltip.previewStreamOn", "KSampler Preview: ON - streams sampler denoising frames during execution") : d("tooltip.previewStreamOff", "KSampler Preview: OFF - click to stream sampler denoising frames"), r = U(n, "K");
|
||||
e._previewBtn.setAttribute("aria-pressed", String(e._previewActive)), e._previewBtn.setAttribute("aria-label", r);
|
||||
let i = document.createElement("i");
|
||||
i.className = e._previewActive ? "pi pi-eye" : "pi pi-eye-slash", i.setAttribute("aria-hidden", "true"), e._previewBtn.replaceChildren(i), e._previewBtn.title = r;
|
||||
@@ -2730,7 +2730,7 @@ function Pn(e) {
|
||||
function Fn(e, t) {
|
||||
if (e._nodeStreamActive = !!t, e._nodeStreamActive || e.setNodeStreamSelection?.(null), !e._nodeStreamBtn) return;
|
||||
e._nodeStreamBtn.classList.toggle("mjr-nodestream-active", e._nodeStreamActive);
|
||||
let n = e._nodeStreamActive ? s("tooltip.nodeStreamOn", "Node Stream: ON - follows the selected node preview when frontend media exists") : s("tooltip.nodeStreamOff", "Node Stream: OFF - click to follow selected node previews, including ImageOps live canvases"), r = U(n, "N");
|
||||
let n = e._nodeStreamActive ? d("tooltip.nodeStreamOn", "Node Stream: ON - follows the selected node preview when frontend media exists") : d("tooltip.nodeStreamOff", "Node Stream: OFF - click to follow selected node previews, including ImageOps live canvases"), r = U(n, "N");
|
||||
e._nodeStreamBtn.setAttribute("aria-pressed", String(e._nodeStreamActive)), e._nodeStreamBtn.setAttribute("aria-label", r);
|
||||
let i = document.createElement("i");
|
||||
i.className = "pi pi-sitemap", i.setAttribute("aria-hidden", "true"), e._nodeStreamBtn.replaceChildren(i), e._nodeStreamBtn.title = r;
|
||||
@@ -2841,7 +2841,7 @@ function Wn(e, t) {
|
||||
function Gn(e, t) {
|
||||
e._desktopPopoutUnsupported = !0, $("electron-in-app-fallback", { message: t?.message || String(t || "unknown error") }, "warn"), e._setDesktopExpanded(!0);
|
||||
try {
|
||||
r(s("toast.popoutElectronInAppFallback", "Desktop PiP is unavailable here. Viewer expanded inside the app instead."), "warning", 4500);
|
||||
n(d("toast.popoutElectronInAppFallback", "Desktop PiP is unavailable here. Viewer expanded inside the app instead."), "warning", 4500);
|
||||
} catch (e) {
|
||||
console.debug?.(e);
|
||||
}
|
||||
@@ -3055,7 +3055,7 @@ function er(e) {
|
||||
if (!e._popoutBtn) return;
|
||||
let t = e._isPopped || e._desktopExpanded;
|
||||
e.element && e.element.classList.toggle("mjr-mfv--popped", t), e._popoutBtn.classList.toggle("mjr-popin-active", t);
|
||||
let n = e._popoutBtn.querySelector("i") || document.createElement("i"), r = t ? s("tooltip.popInViewer", "Return to floating panel") : s("tooltip.popOutViewer", "Pop out viewer to separate window");
|
||||
let n = e._popoutBtn.querySelector("i") || document.createElement("i"), r = t ? d("tooltip.popInViewer", "Return to floating panel") : d("tooltip.popOutViewer", "Pop out viewer to separate window");
|
||||
n.className = t ? "pi pi-sign-in" : "pi pi-external-link", e._popoutBtn.title = r, e._popoutBtn.setAttribute("aria-label", r), e._popoutBtn.setAttribute("aria-pressed", String(t)), e._popoutBtn.contains(n) || e._popoutBtn.replaceChildren(n);
|
||||
}
|
||||
// ui/features/viewer/floatingViewerPanel.ts
|
||||
@@ -3315,7 +3315,7 @@ function lr(e, t, n, r, i, a, o) {
|
||||
}
|
||||
async function ur(e) {
|
||||
if (!e._contentEl) return;
|
||||
e._captureBtn && (e._captureBtn.disabled = !0, e._captureBtn.setAttribute("aria-label", s("tooltip.capturingView", "Capturing...")));
|
||||
e._captureBtn && (e._captureBtn.disabled = !0, e._captureBtn.setAttribute("aria-label", d("tooltip.capturingView", "Capturing...")));
|
||||
let t = e._contentEl.clientWidth || 480, n = e._contentEl.clientHeight || 360, r = n;
|
||||
if (e._mode === W.SIMPLE && e._mediaA && e._genInfoSelections.size) {
|
||||
let i = document.createElement("canvas");
|
||||
@@ -3393,7 +3393,7 @@ async function ur(e) {
|
||||
} catch (e) {
|
||||
console.warn("[MFV] download failed:", e);
|
||||
} finally {
|
||||
e._captureBtn && (e._captureBtn.disabled = !1, e._captureBtn.setAttribute("aria-label", s("tooltip.captureView", "Save view as image")));
|
||||
e._captureBtn && (e._captureBtn.disabled = !1, e._captureBtn.setAttribute("aria-label", d("tooltip.captureView", "Save view as image")));
|
||||
}
|
||||
}
|
||||
// ui/features/viewer/floatingViewerLoader.ts
|
||||
@@ -3408,8 +3408,8 @@ function pr(e, t, { autoMode: n = !1 } = {}) {
|
||||
(async () => {
|
||||
try {
|
||||
let n = await fe(e._mediaA, {
|
||||
getAssetMetadata: f,
|
||||
getFileMetadataScoped: m
|
||||
getAssetMetadata: p,
|
||||
getFileMetadataScoped: h
|
||||
});
|
||||
if (e._refreshGen !== t) return;
|
||||
n && typeof n == "object" && (e._mediaA = n, e._refresh());
|
||||
@@ -3426,8 +3426,8 @@ function mr(e, t, n) {
|
||||
if (!e) return e;
|
||||
try {
|
||||
return await fe(e, {
|
||||
getAssetMetadata: f,
|
||||
getFileMetadataScoped: m
|
||||
getAssetMetadata: p,
|
||||
getFileMetadataScoped: h
|
||||
}) || e;
|
||||
} catch {
|
||||
return e;
|
||||
@@ -3450,8 +3450,8 @@ function hr(e, t, n, r, i) {
|
||||
if (!e) return e;
|
||||
try {
|
||||
return await fe(e, {
|
||||
getAssetMetadata: f,
|
||||
getFileMetadataScoped: m
|
||||
getAssetMetadata: p,
|
||||
getFileMetadataScoped: h
|
||||
}) || e;
|
||||
} catch {
|
||||
return e;
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import { Vn as e, t } from "./config-C9a-wT5M.js";
|
||||
import { t as n } from "./floatingViewerManager-B_I-SRbd.js";
|
||||
import { Un as e, t } from "./config-D56TZeFo.js";
|
||||
import { t as n } from "./floatingViewerManager-D_aLLeau.js";
|
||||
import { r } from "./events-1iwo5blr.js";
|
||||
// ui/features/viewer/LiveStreamTracker.ts
|
||||
var i = !1, a = null, o = null, s = null, c = null, l = null, u = null, d = null, f = null, p = 0, m = 0, h = !1, g = 400, _ = "kj_preview_override", v = /* @__PURE__ */ new Set([
|
||||
+524
-524
File diff suppressed because it is too large
Load Diff
+12
-12
@@ -1,9 +1,9 @@
|
||||
import { T as e, Wt as t, Yn as n, f as r, in as i, ir as a, s as o, u as s } from "./config-C9a-wT5M.js";
|
||||
import { a as c, i as l, r as u } from "./floatingViewerManager-B_I-SRbd.js";
|
||||
import { Kt as e, T as t, Zn as n, f as r, on as i, or as a, s as o, u as s } from "./config-D56TZeFo.js";
|
||||
import { a as c, i as l, r as u } from "./floatingViewerManager-D_aLLeau.js";
|
||||
import { i as d, r as f, t as p } from "./events-1iwo5blr.js";
|
||||
import { a as ee, i as m, n as h, r as g, t as _ } from "./TagsEditor-MUk741GH.js";
|
||||
import { $ as te, A as v, B as ne, C as y, D as b, E as x, H as S, J as re, K as C, M as w, O as T, P as E, Q as D, S as O, T as k, U as A, V as ie, W as j, X as M, Y as N, b as ae, gt as P, ht as F, j as I, k as L, lt as oe, mt as R, ot as se, pt as z, q as B, rt as ce, st as V, w as le, z as H } from "./mjr-primevue-C07IsEdU.js";
|
||||
import { C as U, _ as W, a as ue, b as de, c as G, d as fe, f as pe, g as me, h as he, i as ge, l as _e, m as ve, n as ye, o as K, p as be, r as xe, s as q, t as Se, u as Ce, v as we, x as Te, y as Ee } from "./genInfo-Dk8cerKp.js";
|
||||
import { a as ee, i as m, n as h, r as g, t as _ } from "./TagsEditor-NiAR71Jm.js";
|
||||
import { $ as te, A as v, B as ne, C as y, D as b, E as x, H as S, J as re, K as C, M as w, O as T, P as E, Q as D, S as O, T as k, U as A, V as ie, W as j, X as M, Y as N, b as ae, gt as P, ht as F, j as I, k as L, lt as oe, mt as R, ot as se, pt as z, q as B, rt as ce, st as V, w as le, z as H } from "./mjr-primevue-QrNPJaqR.js";
|
||||
import { C as U, _ as W, a as ue, b as de, c as G, d as fe, f as pe, g as me, h as he, i as ge, l as _e, m as ve, n as ye, o as K, p as be, r as xe, s as q, t as Se, u as Ce, v as we, x as Te, y as Ee } from "./genInfo-z8Muj1-U.js";
|
||||
// ui/vue/components/viewer/FloatingViewerHost.vue
|
||||
var De = /* @__PURE__ */ E({
|
||||
__name: "FloatingViewerHost",
|
||||
@@ -1428,12 +1428,12 @@ var Re = {
|
||||
X.value && (q.compare = q.compare === "off" ? "wipe" : "off");
|
||||
}
|
||||
async function Ke() {
|
||||
let e = await Me(Re()), n = window.ClipboardItem;
|
||||
if (!e || !n || !navigator.clipboard?.write) t(i("viewer.studio.copyFailed", "Could not copy this image"), "error");
|
||||
let t = await Me(Re()), n = window.ClipboardItem;
|
||||
if (!t || !n || !navigator.clipboard?.write) e(i("viewer.studio.copyFailed", "Could not copy this image"), "error");
|
||||
else try {
|
||||
await navigator.clipboard.write([new n({ "image/png": e })]), t(i("viewer.studio.copied", "Copied to clipboard"), "success");
|
||||
} catch (e) {
|
||||
console.debug?.(e), t(i("viewer.studio.copyFailed", "Could not copy this image"), "error");
|
||||
await navigator.clipboard.write([new n({ "image/png": t })]), e(i("viewer.studio.copied", "Copied to clipboard"), "success");
|
||||
} catch (t) {
|
||||
console.debug?.(t), e(i("viewer.studio.copyFailed", "Could not copy this image"), "error");
|
||||
}
|
||||
}
|
||||
let qe = [
|
||||
@@ -1499,14 +1499,14 @@ var Re = {
|
||||
async function tt(n) {
|
||||
let r = B.value;
|
||||
if (!r) return;
|
||||
let a = Math.max(0, Math.min(5, n)), o = await e(r, a);
|
||||
let a = Math.max(0, Math.min(5, n)), o = await t(r, a);
|
||||
o?.ok ? (r.rating = a, N.value = N.value ? {
|
||||
...N.value,
|
||||
rating: a
|
||||
} : r, window.dispatchEvent(new CustomEvent(p, { detail: {
|
||||
assetId: r.id == null ? "" : String(r.id),
|
||||
rating: a
|
||||
} }))) : t(o?.error || i("toast.ratingUpdateFailed", "Rating update failed"), "error");
|
||||
} }))) : e(o?.error || i("toast.ratingUpdateFailed", "Rating update failed"), "error");
|
||||
}
|
||||
function rt(e) {
|
||||
return !!e?.closest?.("input, textarea, select, [contenteditable='true']");
|
||||
+114
-93
@@ -147,6 +147,8 @@ var g = 200, _ = 0, v = {
|
||||
DB_BACKUPS: "/mjr/am/db/backups",
|
||||
DB_BACKUP_SAVE: "/mjr/am/db/backup-save",
|
||||
DB_BACKUP_RESTORE: "/mjr/am/db/backup-restore",
|
||||
TRASH: "/mjr/am/trash",
|
||||
TRASH_EMPTY: "/mjr/am/trash/empty",
|
||||
VECTOR_SEARCH: "/mjr/am/vector/search",
|
||||
VECTOR_SIMILAR: "/mjr/am/vector/similar",
|
||||
VECTOR_ALIGNMENT: "/mjr/am/vector/alignment",
|
||||
@@ -1953,6 +1955,8 @@ var F = {
|
||||
"btn.close": "Close",
|
||||
"btn.dbSave": "Save DB",
|
||||
"btn.dbRestore": "Restore DB",
|
||||
"btn.emptyTrash": "Empty trash",
|
||||
"btn.emptyTrashRunning": "Emptying...",
|
||||
"btn.back": "Back",
|
||||
"btn.up": "Up",
|
||||
"btn.saving": "Saving...",
|
||||
@@ -2130,6 +2134,8 @@ var F = {
|
||||
"status.memoryPurgeStarted": "Memory purge started...",
|
||||
"status.toolStatusChecking": "Tool status: checking...",
|
||||
"status.resetIndexHint": "Reset index cache (requires allowResetIndex in settings).",
|
||||
"status.emptyTrashHint": "Permanently remove files Majoor sent to the freedesktop trash (requires allowDelete in settings).",
|
||||
"status.emptyTrashDisabled": "Empty trash is disabled. Enable 'allow_delete' in settings or set MAJOOR_ALLOW_DELETE=1.",
|
||||
"status.scanningHint": "This may take a while",
|
||||
"status.toolAvailable": "{tool} available",
|
||||
"status.toolUnavailable": "{tool} unavailable",
|
||||
@@ -2577,6 +2583,8 @@ var F = {
|
||||
"dialog.newCollection.placeholder": "Collection name",
|
||||
"dialog.resetIndex.title": "Reset index?",
|
||||
"dialog.resetIndex.msg": "This will delete the database and rescan all files. Continue?",
|
||||
"dialog.emptyTrash.title": "Empty trash?",
|
||||
"dialog.emptyTrash.confirm": "Permanently delete {count} trashed files ({size}) that came from Majoor's folders? This cannot be undone.",
|
||||
"dialog.securityWarning": "This looks like a system or very broad directory.\n\nAdding it can expose sensitive files via the viewer/custom roots feature.\n\nContinue?",
|
||||
"dialog.securityWarningTitle": "Majoor: Security Warning",
|
||||
"dialog.enterFolderPath": "Enter a folder path to add as a Custom root:",
|
||||
@@ -2691,6 +2699,13 @@ var F = {
|
||||
"toast.dbRestoreReplacing": "Replacing database files",
|
||||
"toast.dbRestoreRescan": "Restarting scan",
|
||||
"toast.dbRestoreSuccess": "Database backup restored",
|
||||
"toast.trashIsEmpty": "Trash is empty",
|
||||
"toast.trashRemoved": "{count} files removed ({size})",
|
||||
"toast.trashFailures": "{count} entries could not be removed",
|
||||
"toast.trashSkippedDirs": "{count} directories in the trash were not removed",
|
||||
"toast.trashStatusFailed": "Failed to check trash",
|
||||
"toast.trashEmptyFailed": "Failed to empty trash",
|
||||
"toast.trashUnsupported": "Trash is not supported on this platform",
|
||||
"toast.nameCollisionInView": "Name collision in current view",
|
||||
"toast.fileRenamedSuccess": "File renamed successfully!",
|
||||
"toast.fileRenameFailed": "Failed to rename file.",
|
||||
@@ -4457,20 +4472,26 @@ async function ki({ name: e = "", useLatest: t = !1 } = {}) {
|
||||
let n = {};
|
||||
return e && (n.name = String(e)), t && (n.use_latest = !0), $(v.DB_BACKUP_RESTORE, n);
|
||||
}
|
||||
async function Ai(e = 250) {
|
||||
async function Ai() {
|
||||
return Q(v.TRASH);
|
||||
}
|
||||
async function ji() {
|
||||
return $(v.TRASH_EMPTY, {});
|
||||
}
|
||||
async function Mi(e = 250) {
|
||||
return $("/mjr/am/duplicates/analyze", { limit: Math.max(10, Math.min(5e3, Number(e) || 250)) });
|
||||
}
|
||||
async function ji({ scope: e = "output", customRootId: t = "", maxGroups: n = 6, maxPairs: r = 10 } = {}, i = {}) {
|
||||
async function Ni({ scope: e = "output", customRootId: t = "", maxGroups: n = 6, maxPairs: r = 10 } = {}, i = {}) {
|
||||
let a = `/mjr/am/duplicates/alerts?scope=${encodeURIComponent(String(e || "output"))}`;
|
||||
return t && (a += `&custom_root_id=${encodeURIComponent(String(t))}`), a += `&max_groups=${encodeURIComponent(String(Math.max(1, Number(n) || 6)))}`, a += `&max_pairs=${encodeURIComponent(String(Math.max(1, Number(r) || 10)))}`, Q(a, i);
|
||||
}
|
||||
async function Mi(e, t = []) {
|
||||
async function Pi(e, t = []) {
|
||||
return $("/mjr/am/duplicates/merge-tags", {
|
||||
keep_asset_id: Number(e) || 0,
|
||||
merge_asset_ids: Array.isArray(t) ? t.map((e) => Number(e) || 0).filter((e) => e > 0) : []
|
||||
});
|
||||
}
|
||||
async function Ni(e) {
|
||||
async function Fi(e) {
|
||||
let t, n;
|
||||
if (e && typeof e == "object") {
|
||||
t = d(e.id);
|
||||
@@ -4478,13 +4499,13 @@ async function Ni(e) {
|
||||
n = t ? { asset_id: t } : { filepath: r };
|
||||
} else t = d(e), n = { asset_id: t };
|
||||
let r = await $("/mjr/am/asset/delete", n);
|
||||
return r?.ok && t && Fi([t]), r;
|
||||
return r?.ok && t && Li([t]), r;
|
||||
}
|
||||
async function Pi(e) {
|
||||
async function Ii(e) {
|
||||
let t = Array.isArray(e) ? e.map((e) => d(e)).filter(Boolean) : [], n = await $("/mjr/am/assets/delete", { ids: t });
|
||||
return n?.ok && Fi(t), n;
|
||||
return n?.ok && Li(t), n;
|
||||
}
|
||||
function Fi(e) {
|
||||
function Li(e) {
|
||||
try {
|
||||
let t = (Array.isArray(e) ? e : [e]).map((e) => String(e || "").trim()).filter(Boolean);
|
||||
if (!t.length) return;
|
||||
@@ -4493,7 +4514,7 @@ function Fi(e) {
|
||||
console.debug?.(e);
|
||||
}
|
||||
}
|
||||
async function Ii(e, t) {
|
||||
async function Ri(e, t) {
|
||||
let n;
|
||||
if (e && typeof e == "object") {
|
||||
n = d(e.id);
|
||||
@@ -4505,7 +4526,7 @@ async function Ii(e, t) {
|
||||
new_name: t
|
||||
});
|
||||
if (i?.ok && n) try {
|
||||
let e = await Ca(n);
|
||||
let e = await Ta(n);
|
||||
e?.ok && e?.data && (i.data = {
|
||||
...i.data || {},
|
||||
asset: e.data
|
||||
@@ -4521,7 +4542,7 @@ async function Ii(e, t) {
|
||||
new_name: t
|
||||
});
|
||||
if (r?.ok && n) try {
|
||||
let e = await Ca(n);
|
||||
let e = await Ta(n);
|
||||
e?.ok && e?.data && (r.data = {
|
||||
...r.data || {},
|
||||
asset: e.data
|
||||
@@ -4531,7 +4552,7 @@ async function Ii(e, t) {
|
||||
}
|
||||
return r;
|
||||
}
|
||||
async function Li() {
|
||||
async function zi() {
|
||||
let e = typeof AbortController < "u" ? new AbortController() : null, t = null;
|
||||
try {
|
||||
return e && (t = setTimeout(() => e.abort(), 1e4)), await Q("/mjr/am/collections", e ? { signal: e.signal } : {});
|
||||
@@ -4539,26 +4560,26 @@ async function Li() {
|
||||
t && clearTimeout(t);
|
||||
}
|
||||
}
|
||||
async function Ri(e) {
|
||||
async function Bi(e) {
|
||||
return $("/mjr/am/collections", { name: String(e || "").trim() });
|
||||
}
|
||||
async function zi(e) {
|
||||
async function Vi(e) {
|
||||
let t = String(e || "").trim();
|
||||
return $(`/mjr/am/collections/${encodeURIComponent(t)}/delete`, {});
|
||||
}
|
||||
async function Bi(e, t) {
|
||||
async function Hi(e, t) {
|
||||
let n = String(e || "").trim(), r = Array.isArray(t) ? t : [];
|
||||
return $(`/mjr/am/collections/${encodeURIComponent(n)}/add`, { assets: r });
|
||||
}
|
||||
async function Vi(e, t) {
|
||||
async function Ui(e, t) {
|
||||
let n = String(e || "").trim(), r = Array.isArray(t) ? t : [];
|
||||
return $(`/mjr/am/collections/${encodeURIComponent(n)}/remove`, { filepaths: r });
|
||||
}
|
||||
async function Hi(e) {
|
||||
async function Wi(e) {
|
||||
let t = String(e || "").trim();
|
||||
return Q(`/mjr/am/collections/${encodeURIComponent(t)}/assets`);
|
||||
}
|
||||
async function Ui(e, t = 20) {
|
||||
async function Gi(e, t = 20) {
|
||||
let n = String(e || "").trim();
|
||||
if (!n) return {
|
||||
ok: !1,
|
||||
@@ -4582,7 +4603,7 @@ async function Ui(e, t = 20) {
|
||||
dateExact: r?.dateExact ?? null
|
||||
}), Q(s, { timeoutMs: 12e4 });
|
||||
}
|
||||
async function Wi(e, t = 20) {
|
||||
async function Ki(e, t = 20) {
|
||||
let n = String(e || "").trim();
|
||||
if (!n) return {
|
||||
ok: !1,
|
||||
@@ -4591,24 +4612,24 @@ async function Wi(e, t = 20) {
|
||||
let r = t && typeof t == "object" ? t : { topK: Number(t) }, i = Math.max(1, Math.min(200, Number(r?.topK ?? 20) || 20)), a = String(r?.scope || "").trim(), o = String(r?.customRootId || "").trim(), s = `${v.VECTOR_SIMILAR}/${encodeURIComponent(n)}?top_k=${i}`;
|
||||
return a && (s += `&scope=${encodeURIComponent(a)}`), o && (s += `&custom_root_id=${encodeURIComponent(o)}`), Q(s, { dedupeKey: `vec:${n}:${i}:${a}:${o}` });
|
||||
}
|
||||
async function Gi(e) {
|
||||
async function qi(e) {
|
||||
let t = String(e || "").trim();
|
||||
return t ? Q(`${v.VECTOR_ALIGNMENT}/${encodeURIComponent(t)}`) : {
|
||||
ok: !1,
|
||||
error: "Missing asset ID"
|
||||
};
|
||||
}
|
||||
async function Ki(e) {
|
||||
async function Ji(e) {
|
||||
let t = String(e || "").trim();
|
||||
return t ? $(`${v.VECTOR_INDEX}/${encodeURIComponent(t)}`, {}) : {
|
||||
ok: !1,
|
||||
error: "Missing asset ID"
|
||||
};
|
||||
}
|
||||
async function qi() {
|
||||
async function Yi() {
|
||||
return Q(v.VECTOR_STATS);
|
||||
}
|
||||
async function Ji(e = 64, t = {}) {
|
||||
async function Xi(e = 64, t = {}) {
|
||||
let n = Math.max(1, Math.min(200, e)), r = typeof t?.onProgress == "function" ? t.onProgress : null, i = String(t?.scope || "").trim().toLowerCase(), a = String(t?.customRootId ?? t?.custom_root_id ?? "").trim(), o = `${v.VECTOR_BACKFILL}?batch_size=${n}&async=1`;
|
||||
i && (o += `&scope=${encodeURIComponent(i)}`), a && (o += `&custom_root_id=${encodeURIComponent(a)}`);
|
||||
let s = await $(o, {}, { timeoutMs: 3e4 });
|
||||
@@ -4624,7 +4645,7 @@ async function Ji(e = 64, t = {}) {
|
||||
"running",
|
||||
"pending"
|
||||
].includes(l)) return s;
|
||||
let d = Number(t?.pollIntervalMs), f = Number(t?.pollTimeoutMs), p = Number.isFinite(d) ? Math.max(500, Math.min(1e4, Math.floor(d))) : na, m = Number.isFinite(f) ? Math.max(1e4, Math.min(ia, Math.floor(f))) : ra, h = Date.now(), g = null;
|
||||
let d = Number(t?.pollIntervalMs), f = Number(t?.pollTimeoutMs), p = Number.isFinite(d) ? Math.max(500, Math.min(1e4, Math.floor(d))) : ia, m = Number.isFinite(f) ? Math.max(1e4, Math.min(oa, Math.floor(f))) : aa, h = Date.now(), g = null;
|
||||
for (; Date.now() - h < m;) {
|
||||
await Ce(p);
|
||||
let e = await Q(`${v.VECTOR_BACKFILL_STATUS}?backfill_id=${encodeURIComponent(u)}`, { timeoutMs: 3e4 });
|
||||
@@ -4693,14 +4714,14 @@ async function Ji(e = 64, t = {}) {
|
||||
status: 408
|
||||
};
|
||||
}
|
||||
async function Yi(e) {
|
||||
async function Zi(e) {
|
||||
let t = String(e || "").trim();
|
||||
return t ? $(`${v.VECTOR_CAPTION}/${encodeURIComponent(t)}`, {}) : {
|
||||
ok: !1,
|
||||
error: "Missing asset ID"
|
||||
};
|
||||
}
|
||||
async function Xi(e, { topK: t = 50, scope: n = "output", customRootId: r = "", subfolder: i = null, kind: a = null, hasWorkflow: o = null, minRating: s = null, minSizeMB: c = null, maxSizeMB: l = null, minWidth: u = null, minHeight: d = null, maxWidth: f = null, maxHeight: p = null, workflowType: m = null, workflowId: h = null, dateRange: g = null, dateExact: _ = null } = {}) {
|
||||
async function Qi(e, { topK: t = 50, scope: n = "output", customRootId: r = "", subfolder: i = null, kind: a = null, hasWorkflow: o = null, minRating: s = null, minSizeMB: c = null, maxSizeMB: l = null, minWidth: u = null, minHeight: d = null, maxWidth: f = null, maxHeight: p = null, workflowType: m = null, workflowId: h = null, dateRange: g = null, dateExact: _ = null } = {}) {
|
||||
let b = String(e || "").trim();
|
||||
if (!b) return {
|
||||
ok: !1,
|
||||
@@ -4724,85 +4745,85 @@ async function Xi(e, { topK: t = 50, scope: n = "output", customRootId: r = "",
|
||||
dateExact: _
|
||||
}), Q(x, { timeoutMs: 12e4 });
|
||||
}
|
||||
async function Zi(e = 8) {
|
||||
async function $i(e = 8) {
|
||||
return $(v.VECTOR_SUGGEST_COLLECTIONS, { k: Math.max(2, Math.min(20, e)) });
|
||||
}
|
||||
// ui/api/client.ts
|
||||
var Qi = 3e4, $i = "__MJR_API_CLIENT__", ea = 2e3, ta = 200, na = 1e3, ra = 18e5, ia = 432e5, Y = "settings", aa = "available-tags", X = Re({
|
||||
ttlMs: ea,
|
||||
var ea = 3e4, ta = "__MJR_API_CLIENT__", na = 2e3, ra = 200, ia = 1e3, aa = 18e5, oa = 432e5, Y = "settings", sa = "available-tags", X = Re({
|
||||
ttlMs: na,
|
||||
maxSize: 1
|
||||
}), Z = Re({
|
||||
ttlMs: ea,
|
||||
ttlMs: na,
|
||||
maxSize: 1
|
||||
}), oa = Re({
|
||||
ttlMs: () => ua(),
|
||||
}), ca = Re({
|
||||
ttlMs: () => fa(),
|
||||
maxSize: 1
|
||||
}), sa = /* @__PURE__ */ new Set([
|
||||
}), la = /* @__PURE__ */ new Set([
|
||||
"1",
|
||||
"true",
|
||||
"yes",
|
||||
"on"
|
||||
]), ca = /* @__PURE__ */ new Set([
|
||||
]), ua = /* @__PURE__ */ new Set([
|
||||
"0",
|
||||
"false",
|
||||
"no",
|
||||
"off"
|
||||
]);
|
||||
function la(e, t = !1) {
|
||||
function da(e, t = !1) {
|
||||
if (typeof e == "boolean") return e;
|
||||
if (typeof e == "number") return e !== 0;
|
||||
if (typeof e == "string") {
|
||||
let t = e.trim().toLowerCase();
|
||||
if (sa.has(t)) return !0;
|
||||
if (ca.has(t)) return !1;
|
||||
if (la.has(t)) return !0;
|
||||
if (ua.has(t)) return !1;
|
||||
}
|
||||
return !!t;
|
||||
}
|
||||
function ua() {
|
||||
function fa() {
|
||||
try {
|
||||
let e = localStorage?.getItem?.("mjrSettings") || "{}", t = JSON.parse(e), n = t?.cache?.tagsTTLms ?? t?.cache?.tagsTTL ?? t?.cache?.tags_ttl_ms ?? null, r = Number(n);
|
||||
return Number.isFinite(r) ? Math.max(1e3, Math.min(6e5, Math.floor(r))) : Qi;
|
||||
return Number.isFinite(r) ? Math.max(1e3, Math.min(6e5, Math.floor(r))) : ea;
|
||||
} catch {
|
||||
return Qi;
|
||||
return ea;
|
||||
}
|
||||
}
|
||||
function da() {
|
||||
function pa() {
|
||||
X.clear();
|
||||
}
|
||||
function fa() {
|
||||
function ma() {
|
||||
Z.clear();
|
||||
}
|
||||
function pa() {
|
||||
oa.clear();
|
||||
function ha() {
|
||||
ca.clear();
|
||||
}
|
||||
function ma(e) {
|
||||
function ga(e) {
|
||||
return String(e ?? "").trim().toLowerCase() || "";
|
||||
}
|
||||
function ha(e) {
|
||||
function _a(e) {
|
||||
let t = [], n = /* @__PURE__ */ new Set();
|
||||
for (let r of Array.isArray(e) ? e : []) {
|
||||
let e = String(r ?? "").trim();
|
||||
if (!e) continue;
|
||||
let i = ma(e);
|
||||
let i = ga(e);
|
||||
i && !n.has(i) && (n.add(i), t.push(e));
|
||||
}
|
||||
return t;
|
||||
}
|
||||
try {
|
||||
let e = typeof window < "u" ? window : null;
|
||||
e && !e[$i] && (e[$i] = { initialized: !0 }, e.addEventListener?.("storage", (e) => {
|
||||
e && !e[ta] && (e[ta] = { initialized: !0 }, e.addEventListener?.("storage", (e) => {
|
||||
try {
|
||||
e?.key === "mjrSettings" && (da(), fa(), pa(), Ir());
|
||||
e?.key === "mjrSettings" && (pa(), ma(), ha(), Ir());
|
||||
} catch (e) {
|
||||
console.debug?.(e);
|
||||
}
|
||||
}), e.addEventListener?.("mjr-settings-changed", () => {
|
||||
da(), fa(), pa(), Ir();
|
||||
pa(), ma(), ha(), Ir();
|
||||
}));
|
||||
} catch (e) {
|
||||
console.debug?.(e);
|
||||
}
|
||||
var ga = () => {
|
||||
var va = () => {
|
||||
let e = X.get(Y);
|
||||
if (e !== void 0) return e;
|
||||
let t = Date.now();
|
||||
@@ -4814,33 +4835,33 @@ var ga = () => {
|
||||
} catch {
|
||||
return X.set(Y, !1, { at: t }), !1;
|
||||
}
|
||||
}, _a = () => {
|
||||
}, ya = () => {
|
||||
let e = Z.get(Y);
|
||||
if (e !== void 0) return e;
|
||||
let t = Date.now();
|
||||
try {
|
||||
let e = localStorage?.getItem?.(r);
|
||||
if (!e) return Z.set(Y, !0, { at: t }), !0;
|
||||
let n = JSON.parse(e)?.ratingTagsSync?.enabled, i = n == null || la(n, !0);
|
||||
let n = JSON.parse(e)?.ratingTagsSync?.enabled, i = n == null || da(n, !0);
|
||||
return Z.set(Y, i, { at: t }), i;
|
||||
} catch {
|
||||
return Z.set(Y, !0, { at: t }), !0;
|
||||
}
|
||||
}, va = Le({
|
||||
readObsEnabled: ga,
|
||||
}, ba = Le({
|
||||
readObsEnabled: va,
|
||||
readAuthToken: wr,
|
||||
ensureWriteAuthToken: Fr,
|
||||
normalizeWriteAuthFailure: Nr
|
||||
}), ya = va.fetchAPI;
|
||||
}), xa = ba.fetchAPI;
|
||||
async function Q(e, t = {}) {
|
||||
return va.get(e, t);
|
||||
return ba.get(e, t);
|
||||
}
|
||||
async function $(e, t, n = {}) {
|
||||
return va.post(e, t, n);
|
||||
return ba.post(e, t, n);
|
||||
}
|
||||
async function ba(e, t, n = {}) {
|
||||
let r = _a(), i = e && typeof e == "object" ? e : null, a = d(i ? i.id : e), o = { rating: Math.max(0, Math.min(5, Number(t) || 0)) };
|
||||
return a ? o.asset_id = a : i && (o.filepath = i.filepath || i.path || i?.file_info?.filepath || "", o.type = i.type || "output", o.root_id = f(i)), ya("/mjr/am/asset/rating", {
|
||||
async function Sa(e, t, n = {}) {
|
||||
let r = ya(), i = e && typeof e == "object" ? e : null, a = d(i ? i.id : e), o = { rating: Math.max(0, Math.min(5, Number(t) || 0)) };
|
||||
return a ? o.asset_id = a : i && (o.filepath = i.filepath || i.path || i?.file_info?.filepath || "", o.type = i.type || "output", o.root_id = f(i)), xa("/mjr/am/asset/rating", {
|
||||
...n,
|
||||
method: "POST",
|
||||
headers: {
|
||||
@@ -4850,10 +4871,10 @@ async function ba(e, t, n = {}) {
|
||||
body: JSON.stringify(o)
|
||||
});
|
||||
}
|
||||
async function xa(e, t, n = {}) {
|
||||
let r = _a(), i = e && typeof e == "object" ? e : null, a = d(i ? i.id : e), o = String(i?.kind || i?.type || "").trim().toLowerCase() === "workflow", s = String(i?.filepath || i?.path || i?.file_info?.filepath || "").trim(), c = { tags: Array.isArray(t) ? t : [] };
|
||||
async function Ca(e, t, n = {}) {
|
||||
let r = ya(), i = e && typeof e == "object" ? e : null, a = d(i ? i.id : e), o = String(i?.kind || i?.type || "").trim().toLowerCase() === "workflow", s = String(i?.filepath || i?.path || i?.file_info?.filepath || "").trim(), c = { tags: Array.isArray(t) ? t : [] };
|
||||
o && s ? c.filepath = s : a ? c.asset_id = a : i && (c.filepath = i.filepath || i.path || i?.file_info?.filepath || "", c.type = i.type || "output", c.root_id = f(i));
|
||||
let l = await ya(o && s ? v.WORKFLOWS_TAGS : "/mjr/am/asset/tags", {
|
||||
let l = await xa(o && s ? v.WORKFLOWS_TAGS : "/mjr/am/asset/tags", {
|
||||
...n,
|
||||
method: "POST",
|
||||
headers: {
|
||||
@@ -4862,10 +4883,10 @@ async function xa(e, t, n = {}) {
|
||||
},
|
||||
body: JSON.stringify(c)
|
||||
});
|
||||
return l?.ok && pa(), l;
|
||||
return l?.ok && ha(), l;
|
||||
}
|
||||
async function Sa() {
|
||||
let e = oa.get(aa);
|
||||
async function wa() {
|
||||
let e = ca.get(sa);
|
||||
if (Array.isArray(e)) return {
|
||||
ok: !0,
|
||||
data: e,
|
||||
@@ -4875,22 +4896,22 @@ async function Sa() {
|
||||
};
|
||||
let t = await Q("/mjr/am/tags");
|
||||
if (t?.ok && Array.isArray(t.data)) {
|
||||
let e = ha(t.data);
|
||||
return oa.set(aa, e), {
|
||||
let e = _a(t.data);
|
||||
return ca.set(sa, e), {
|
||||
...t,
|
||||
data: e
|
||||
};
|
||||
}
|
||||
return t;
|
||||
}
|
||||
async function Ca(e, t = {}) {
|
||||
async function Ta(e, t = {}) {
|
||||
let n = encodeURIComponent(d(e));
|
||||
return Q(`/mjr/am/asset/${n}`, {
|
||||
...t,
|
||||
dedupeKey: t?.dedupeKey || `meta:${n}`
|
||||
});
|
||||
}
|
||||
async function wa(e, t = {}) {
|
||||
async function Ea(e, t = {}) {
|
||||
let n = d(e);
|
||||
if (!n) return {
|
||||
ok: !1,
|
||||
@@ -4903,11 +4924,11 @@ async function wa(e, t = {}) {
|
||||
let { refresh: i, ...a } = t;
|
||||
return Q(r, a);
|
||||
}
|
||||
async function Ta(e, t = {}) {
|
||||
async function Da(e, t = {}) {
|
||||
let n = Array.isArray(e) ? e : [], r = [];
|
||||
for (let e of n) {
|
||||
let t = Number(e);
|
||||
if (Number.isFinite(t) && (r.push(Math.trunc(t)), r.length >= ta)) break;
|
||||
if (Number.isFinite(t) && (r.push(Math.trunc(t)), r.length >= ra)) break;
|
||||
}
|
||||
return r.length ? $("/mjr/am/assets/batch", { asset_ids: r }, t) : {
|
||||
ok: !0,
|
||||
@@ -4916,7 +4937,7 @@ async function Ta(e, t = {}) {
|
||||
code: "OK"
|
||||
};
|
||||
}
|
||||
async function Ea(e, t = {}) {
|
||||
async function Oa(e, t = {}) {
|
||||
let n = S(e);
|
||||
return n ? Q(n, t) : {
|
||||
ok: !1,
|
||||
@@ -4925,7 +4946,7 @@ async function Ea(e, t = {}) {
|
||||
code: "INVALID_INPUT"
|
||||
};
|
||||
}
|
||||
async function Da(e, t = {}) {
|
||||
async function ka(e, t = {}) {
|
||||
let n = ue(e);
|
||||
return n ? Q(n, t) : {
|
||||
ok: !1,
|
||||
@@ -4934,7 +4955,7 @@ async function Da(e, t = {}) {
|
||||
code: "INVALID_INPUT"
|
||||
};
|
||||
}
|
||||
async function Oa(e, t = {}) {
|
||||
async function Aa(e, t = {}) {
|
||||
let n = de(e);
|
||||
return n ? Q(n, t) : {
|
||||
ok: !1,
|
||||
@@ -4943,7 +4964,7 @@ async function Oa(e, t = {}) {
|
||||
code: "INVALID_INPUT"
|
||||
};
|
||||
}
|
||||
async function ka(e, t = "", n = {}) {
|
||||
async function ja(e, t = "", n = {}) {
|
||||
let r = fe(e, t);
|
||||
return r ? Q(r, n) : {
|
||||
ok: !1,
|
||||
@@ -4952,7 +4973,7 @@ async function ka(e, t = "", n = {}) {
|
||||
code: "INVALID_INPUT"
|
||||
};
|
||||
}
|
||||
async function Aa({ workflow: e = null, name: t = "", category: n = "", overwrite: r = !1, filepath: i = "", task: a = "", model_family: o = "", provider: s = "", runs_on: c = "", notes: l = "" } = {}, u = {}) {
|
||||
async function Ma({ workflow: e = null, name: t = "", category: n = "", overwrite: r = !1, filepath: i = "", task: a = "", model_family: o = "", provider: s = "", runs_on: c = "", notes: l = "" } = {}, u = {}) {
|
||||
return $(v.WORKFLOWS_SAVE, {
|
||||
workflow: e,
|
||||
name: t,
|
||||
@@ -4966,32 +4987,32 @@ async function Aa({ workflow: e = null, name: t = "", category: n = "", overwrit
|
||||
notes: l
|
||||
}, u);
|
||||
}
|
||||
async function ja({ filepath: e = "", name: t = "" } = {}, n = {}) {
|
||||
async function Na({ filepath: e = "", name: t = "" } = {}, n = {}) {
|
||||
return $(v.WORKFLOWS_DUPLICATE, {
|
||||
filepath: e,
|
||||
name: t
|
||||
}, n);
|
||||
}
|
||||
async function Ma({ filepath: e = "", name: t = "", category: n = "" } = {}, r = {}) {
|
||||
async function Pa({ filepath: e = "", name: t = "", category: n = "" } = {}, r = {}) {
|
||||
return $(v.WORKFLOWS_MOVE, {
|
||||
filepath: e,
|
||||
name: t,
|
||||
category: n
|
||||
}, r);
|
||||
}
|
||||
async function Na({ filepath: e = "" } = {}, t = {}) {
|
||||
async function Fa({ filepath: e = "" } = {}, t = {}) {
|
||||
return $(v.WORKFLOWS_DELETE, { filepath: e }, t);
|
||||
}
|
||||
async function Pa({ filepath: e = "" } = {}, t = {}) {
|
||||
async function Ia({ filepath: e = "" } = {}, t = {}) {
|
||||
return $(v.WORKFLOWS_MARK_LOADED, { filepath: e }, t);
|
||||
}
|
||||
async function Fa({ filepath: e = "", favorite: t = !1 } = {}, n = {}) {
|
||||
async function La({ filepath: e = "", favorite: t = !1 } = {}, n = {}) {
|
||||
return $(v.WORKFLOWS_FAVORITE, {
|
||||
filepath: e,
|
||||
favorite: !!t
|
||||
}, n);
|
||||
}
|
||||
async function Ia({ filepath: e = "", task: t = "", model_family: n = "", provider: r = "", runs_on: i = "", notes: a = "" } = {}, o = {}) {
|
||||
async function Ra({ filepath: e = "", task: t = "", model_family: n = "", provider: r = "", runs_on: i = "", notes: a = "" } = {}, o = {}) {
|
||||
return $(v.WORKFLOWS_INFO, {
|
||||
filepath: e,
|
||||
task: t,
|
||||
@@ -5001,24 +5022,24 @@ async function Ia({ filepath: e = "", task: t = "", model_family: n = "", provid
|
||||
notes: a
|
||||
}, o);
|
||||
}
|
||||
async function La({ filepath: e = "", limit: t = 12 } = {}, n = {}) {
|
||||
async function za({ filepath: e = "", limit: t = 12 } = {}, n = {}) {
|
||||
let r = Math.max(1, Math.min(50, Number(t) || 12));
|
||||
return Q(`${v.WORKFLOWS_THUMBNAIL_CANDIDATES}?filepath=${encodeURIComponent(String(e || "").trim())}&limit=${encodeURIComponent(String(r))}`, n);
|
||||
}
|
||||
async function Ra(e = {}) {
|
||||
async function Ba(e = {}) {
|
||||
return Q(v.WORKFLOWS_MODEL_FAMILIES, e);
|
||||
}
|
||||
async function za({ q: e = "*", limit: t = 100, offset: n = 0, sort: r = "mtime" } = {}, i = {}) {
|
||||
async function Va({ q: e = "*", limit: t = 100, offset: n = 0, sort: r = "mtime" } = {}, i = {}) {
|
||||
let a = Math.max(1, Math.min(500, Number(t) || 100)), o = Math.max(0, Number(n) || 0);
|
||||
return Q(`${v.LIST}?scope=workflow&q=${encodeURIComponent(String(e || "*"))}&limit=${encodeURIComponent(String(a))}&offset=${encodeURIComponent(String(o))}&sort=${encodeURIComponent(String(r || "mtime"))}`, i);
|
||||
}
|
||||
async function Ba({ filepath: e = "", source_filepath: t = "" } = {}, n = {}) {
|
||||
async function Ha({ filepath: e = "", source_filepath: t = "" } = {}, n = {}) {
|
||||
return $(v.WORKFLOWS_THUMBNAIL_SET, {
|
||||
filepath: e,
|
||||
source_filepath: t
|
||||
}, n);
|
||||
}
|
||||
async function Va({ type: e = "output", filename: t = "", subfolder: n = "", root_id: r = "", rootId: i = "", filepath: a = "" } = {}, o = {}) {
|
||||
async function Ua({ type: e = "output", filename: t = "", subfolder: n = "", root_id: r = "", rootId: i = "", filepath: a = "" } = {}, o = {}) {
|
||||
let s = String(e || "output").trim().toLowerCase() || "output", c = String(t || "").trim(), l = String(n || "").trim(), u = String(r || i || "").trim(), d = String(a || "").trim();
|
||||
if (!c) return {
|
||||
ok: !1,
|
||||
@@ -5029,7 +5050,7 @@ async function Va({ type: e = "output", filename: t = "", subfolder: n = "", roo
|
||||
let f = `/mjr/am/metadata?type=${encodeURIComponent(s)}&filename=${encodeURIComponent(c)}`;
|
||||
return d && (f += `&filepath=${encodeURIComponent(d)}`), l && (f += `&subfolder=${encodeURIComponent(l)}`), u && (f += `&root_id=${encodeURIComponent(u)}`), Q(f, o);
|
||||
}
|
||||
async function Ha({ filepath: e = "", root_id: t = "", subfolder: n = "" } = {}, r = {}) {
|
||||
async function Wa({ filepath: e = "", root_id: t = "", subfolder: n = "" } = {}, r = {}) {
|
||||
try {
|
||||
if (globalThis.__mjrFolderInfoSupported === !1) return {
|
||||
ok: !1,
|
||||
@@ -5063,7 +5084,7 @@ async function Ha({ filepath: e = "", root_id: t = "", subfolder: n = "" } = {},
|
||||
return l;
|
||||
}
|
||||
// ui/app/config.ts
|
||||
var Ua = Object.freeze({
|
||||
var Ga = Object.freeze({
|
||||
DEBUG_SAFE_CALL: !1,
|
||||
DEBUG_SAFE_LISTENERS: !1,
|
||||
DEBUG_VIEWER: !1,
|
||||
@@ -5144,5 +5165,5 @@ var Ua = Object.freeze({
|
||||
DELETE_CONFIRMATION: !0,
|
||||
DEBUG_VERBOSE_ERRORS: !1,
|
||||
SIDEBAR_ASSET_BADGE_ENABLED: !0
|
||||
}), Wa = { ...Ua };
|
||||
export { Br as $, se as $n, Fn as $t, _i as A, Ot as An, Ai as At, Ur as B, _t as Bn, qi as Bt, Ia as C, pt as Cn, Lr as Ct, Da as D, Xt as Dn, Vr as Dt, xa as E, kt as En, $r as Et, zi as F, ht as Fn, Wi as Ft, ei as G, ct as Gn, pr as Gt, ci as H, E as Hn, Or as Ht, Ei as I, vt as In, Yi as It, Xr as J, v as Jn, er as Jt, Rr as K, st as Kn, rr as Kt, Jr as L, Yt as Ln, Gi as Lt, Ri as M, M as Mn, Hr as Mt, Ni as N, xt as Nn, Ci as Nt, Bi as O, gt as On, yi as Ot, Pi as P, St as Pn, Ji as Pt, wi as Q, te as Qn, Pn as Qt, Hi as R, mt as Rn, Ki as Rt, Fa as S, zt as Sn, si as St, ba as T, Jt as Tn, pi as Tt, ai as U, Ge as Un, Dr as Ut, Kr as V, Tt as Vn, Zi as Vt, ni as W, We as Wn, or as Wt, fi as X, ne as Xn, Zn as Xt, Ti as Y, ce as Yn, Qn as Yt, Qr as Z, pe as Zn, $n as Zt, za as _, ft as _n, li as _t, ja as a, F as an, b as ar, Di as at, $ as b, wt as bn, ti as bt, Ta as c, Ht as cn, c as cr, Vi as ct, Ha as d, Wt as dn, f as dr, ki as dt, jn as en, le as er, Si as et, wa as f, Et as fn, i as fr, Oi as ft, Oa as g, jt as gn, qr as gt, La as h, an as hn, Wr as ht, ka as i, V as in, x as ir, Li as it, gi as j, Zt as jn, xi as jt, mi as k, Vt as kn, di as kt, Sa as l, rn as ln, l as lr, Ii as lt, Ra as m, Bt as mn, Gr as mt, Ua as n, B as nn, ae as nr, ui as nt, Q as o, bt as on, oe as or, Mi as ot, Ea as p, Qt as pn, r as pr, Yr as pt, ii as q, Re as qn, zn as qt, Na as r, Nn as rn, ie as rr, Xi as rt, Ca as s, yt as sn, p as sr, hi as st, Wa as t, Mn as tn, ee as tr, bi as tt, Va as u, $t as un, d as ur, vi as ut, Pa as v, Mt as vn, oi as vt, Ba as w, qt as wn, Zr as wt, Aa as x, Ct as xn, zr as xt, Ma as y, dt as yn, ri as yt, ji as z, ut as zn, Ui as zt };
|
||||
}), Ka = { ...Ga };
|
||||
export { wi as $, pe as $n, $n as $t, _i as A, gt as An, yi as At, Ni as B, mt as Bn, Ji as Bt, Ra as C, Ct as Cn, zr as Ct, ka as D, Jt as Dn, pi as Dt, Ca as E, qt as En, Zr as Et, Vi as F, xt as Fn, Ci as Ft, ni as G, Ge as Gn, Dr as Gt, Kr as H, _t as Hn, Yi as Ht, ji as I, St as In, Xi as It, ii as J, st as Jn, rr as Jt, ei as K, We as Kn, or as Kt, Ei as L, ht as Ln, Ki as Lt, Bi as M, Ot as Mn, Mi as Mt, Fi as N, Zt as Nn, xi as Nt, Hi as O, kt as On, $r as Ot, Ii as P, M as Pn, Hr as Pt, Qr as Q, ne as Qn, Zn as Qt, Jr as R, vt as Rn, Zi as Rt, La as S, wt as Sn, ti as St, Sa as T, pt as Tn, Lr as Tt, ci as U, Tt as Un, $i as Ut, Ur as V, ut as Vn, Gi as Vt, ai as W, E as Wn, Or as Wt, Ti as X, v as Xn, er as Xt, Xr as Y, Re as Yn, zn as Yt, fi as Z, ce as Zn, Qn as Zt, Va as _, an as _n, Wr as _t, Na as a, Nn as an, ie as ar, Qi as at, $ as b, Mt as bn, oi as bt, Da as c, bt as cn, oe as cr, Pi as ct, Wa as d, rn as dn, l as dr, Ri as dt, Pn as en, te as er, Ai as et, Ea as f, $t as fn, d as fr, vi as ft, Aa as g, Bt as gn, Gr as gt, za as h, Qt as hn, r as hr, Yr as ht, ja as i, B as in, ae as ir, ui as it, gi as j, Vt as jn, di as jt, mi as k, Xt as kn, Vr as kt, wa as l, yt as ln, p as lr, hi as lt, Ba as m, Et as mn, i as mr, Oi as mt, Ga as n, jn as nn, le as nr, Si as nt, Q as o, V as on, x as or, zi as ot, Oa as p, Wt as pn, f as pr, ki as pt, Rr as q, ct as qn, pr as qt, Fa as r, Mn as rn, ee as rr, bi as rt, Ta as s, F as sn, b as sr, Di as st, Ka as t, Fn as tn, se as tr, Br as tt, Ua as u, Ht as un, c as ur, Ui as ut, Ia as v, jt as vn, qr as vt, Ha as w, zt as wn, si as wt, Ma as x, dt as xn, ri as xt, Pa as y, ft as yn, li as yt, Wi as z, Yt as zn, qi as zt };
|
||||
Vendored
+6
-6
@@ -1,5 +1,5 @@
|
||||
import { t as e } from "./rolldown-runtime-CGnMp29N.js";
|
||||
import { An as t, Wt as n, c as r, t as i } from "./config-C9a-wT5M.js";
|
||||
import { Kt as t, Mn as n, c as r, t as i } from "./config-D56TZeFo.js";
|
||||
import { r as a } from "./events-1iwo5blr.js";
|
||||
// ui/utils/logging.ts
|
||||
function o(e, ...t) {
|
||||
@@ -7,15 +7,15 @@ function o(e, ...t) {
|
||||
i.DEBUG_VERBOSE_ERRORS && console.debug(e, ...t);
|
||||
} catch {}
|
||||
}
|
||||
function s(e, t = "Majoor", { showToast: r = !1, toastType: a = "error" } = {}) {
|
||||
function s(e, n = "Majoor", { showToast: r = !1, toastType: a = "error" } = {}) {
|
||||
let o = e?.message || String(e || "Unknown error");
|
||||
try {
|
||||
i.DEBUG_VERBOSE_ERRORS ? console.error(`[Majoor][${t}]`, o, e) : console.debug(`[Majoor][${t}]`, o);
|
||||
i.DEBUG_VERBOSE_ERRORS ? console.error(`[Majoor][${n}]`, o, e) : console.debug(`[Majoor][${n}]`, o);
|
||||
} catch (e) {
|
||||
console.debug?.(e);
|
||||
}
|
||||
if (r && i.DEBUG_VERBOSE_ERRORS) try {
|
||||
n(`${t}: ${o}`, a, 4e3);
|
||||
t(`${n}: ${o}`, a, 4e3);
|
||||
} catch (e) {
|
||||
console.debug?.(e);
|
||||
}
|
||||
@@ -201,7 +201,7 @@ var he = /* @__PURE__ */ e({
|
||||
teardownFloatingViewerManager: () => Ue
|
||||
}), S = null, ge = null;
|
||||
async function _e() {
|
||||
return S || (ge ||= import("./FloatingViewer--x61GAzy.js").then((e) => (S = e.FloatingViewer, S)), ge);
|
||||
return S || (ge ||= import("./FloatingViewer-C567UXNF.js").then((e) => (S = e.FloatingViewer, S)), ge);
|
||||
}
|
||||
var C = null, ve = null;
|
||||
async function ye() {
|
||||
@@ -434,7 +434,7 @@ function Oe() {
|
||||
}
|
||||
function Y() {
|
||||
if (!G) try {
|
||||
K = t(De, { includePointerFallback: !0 }), G = typeof K == "function";
|
||||
K = n(De, { includePointerFallback: !0 }), G = typeof K == "function";
|
||||
} catch (e) {
|
||||
console.debug?.("[MFV] _bindNodeSelectionListener error", e);
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import { in as e, or as t, t as n } from "./config-C9a-wT5M.js";
|
||||
import { _ as r, f as i, p as a } from "./generationSectionState-DuXxSw-j.js";
|
||||
import { cr as e, on as t, t as n } from "./config-D56TZeFo.js";
|
||||
import { _ as r, f as i, p as a } from "./generationSectionState-BR-TS47u.js";
|
||||
import { r as o } from "./events-1iwo5blr.js";
|
||||
import { $ as s, B as c, C as l, D as u, E as d, H as ee, J as te, M as f, O as p, P as m, Q as h, S as g, T as _, V as v, W as y, X as ne, b, gt as x, ht as S, j as C, k as w, mt as T, pt as E, q as re, st as D } from "./mjr-primevue-C07IsEdU.js";
|
||||
import { $ as s, B as c, C as l, D as u, E as d, H as ee, J as te, M as f, O as p, P as m, Q as h, S as g, T as _, V as v, W as y, X as ne, b, gt as x, ht as S, j as C, k as w, mt as T, pt as E, q as re, st as D } from "./mjr-primevue-QrNPJaqR.js";
|
||||
// ui/features/viewer/model3dCore.ts
|
||||
function ie(e, t) {
|
||||
if (e && typeof t == "function") try {
|
||||
@@ -261,45 +261,45 @@ function R(e) {
|
||||
let t = Math.max(0, Number(e) || 0), n = Math.floor(t / 60), r = Math.floor(t % 60);
|
||||
return n > 0 ? `${n}:${String(r).padStart(2, "0")}` : `${Math.floor(t)}s`;
|
||||
}
|
||||
function z(t, n) {
|
||||
function z(e, n) {
|
||||
let r = document.createElement("button");
|
||||
return r.type = "button", r.textContent = String(t || ""), r.title = String(n || t || ""), r.setAttribute("aria-label", String(n || t || e("model3d.viewportAction", "3D viewport action"))), r.style.cssText = "height:28px;padding:0 10px;border-radius:999px;border:1px solid rgba(255,255,255,0.16);background:rgba(13,15,20,0.78);color:rgba(255,255,255,0.92);font:600 11px system-ui,sans-serif;letter-spacing:0.02em;cursor:pointer;backdrop-filter:blur(8px);display:inline-flex;align-items:center;justify-content:center;box-shadow:0 4px 18px rgba(0,0,0,0.24)", r;
|
||||
return r.type = "button", r.textContent = String(e || ""), r.title = String(n || e || ""), r.setAttribute("aria-label", String(n || e || t("model3d.viewportAction", "3D viewport action"))), r.style.cssText = "height:28px;padding:0 10px;border-radius:999px;border:1px solid rgba(255,255,255,0.16);background:rgba(13,15,20,0.78);color:rgba(255,255,255,0.92);font:600 11px system-ui,sans-serif;letter-spacing:0.02em;cursor:pointer;backdrop-filter:blur(8px);display:inline-flex;align-items:center;justify-content:center;box-shadow:0 4px 18px rgba(0,0,0,0.24)", r;
|
||||
}
|
||||
function B(e, t) {
|
||||
if (!e) return;
|
||||
let n = !!t;
|
||||
e.dataset.active = n ? "1" : "0", e.style.background = n ? "rgba(76,175,80,0.18)" : "rgba(13,15,20,0.78)", e.style.borderColor = n ? "rgba(76,175,80,0.42)" : "rgba(255,255,255,0.16)", e.style.color = n ? "rgba(230,255,235,0.96)" : "rgba(255,255,255,0.92)";
|
||||
}
|
||||
function V(t, n, r = "", i = "#4CAF50") {
|
||||
if (!t) return;
|
||||
function V(e, n, r = "", i = "#4CAF50") {
|
||||
if (!e) return;
|
||||
try {
|
||||
let e = Math.max(480, Number(t.width) || 960), n = Math.max(270, Number(t.height) || 540);
|
||||
t.width = e, t.height = n;
|
||||
let t = Math.max(480, Number(e.width) || 960), n = Math.max(270, Number(e.height) || 540);
|
||||
e.width = t, e.height = n;
|
||||
} catch (e) {
|
||||
console.debug?.(e);
|
||||
}
|
||||
let a = (() => {
|
||||
try {
|
||||
return t.getContext("2d");
|
||||
return e.getContext("2d");
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
})();
|
||||
if (!a) return;
|
||||
let o = Number(t.width) || 960, s = Number(t.height) || 540, c = o / 2, l = s / 2;
|
||||
let o = Number(e.width) || 960, s = Number(e.height) || 540, c = o / 2, l = s / 2;
|
||||
try {
|
||||
let t = a.createLinearGradient(0, 0, o, s);
|
||||
t.addColorStop(0, "#0f1419"), t.addColorStop(1, "#11181f"), a.fillStyle = t, a.fillRect(0, 0, o, s), a.save(), a.translate(c, l - 32), a.strokeStyle = i, a.lineWidth = 3, a.globalAlpha = .95, a.beginPath(), a.moveTo(0, -44), a.lineTo(42, -22), a.lineTo(42, 22), a.lineTo(0, 44), a.lineTo(-42, 22), a.lineTo(-42, -22), a.closePath(), a.stroke(), a.beginPath(), a.moveTo(0, -44), a.lineTo(0, 0), a.lineTo(42, 22), a.moveTo(0, 0), a.lineTo(-42, 22), a.moveTo(-42, -22), a.lineTo(0, 0), a.moveTo(42, -22), a.lineTo(0, 0), a.stroke(), a.restore(), a.fillStyle = "rgba(255,255,255,0.94)", a.font = "600 18px system-ui, sans-serif", a.textAlign = "center", a.textBaseline = "middle", a.fillText(String(n || e("model3d.preview", "3D preview")), c, l + 44), r && (a.fillStyle = "rgba(255,255,255,0.62)", a.font = "13px system-ui, sans-serif", a.fillText(String(r), c, l + 72));
|
||||
let e = a.createLinearGradient(0, 0, o, s);
|
||||
e.addColorStop(0, "#0f1419"), e.addColorStop(1, "#11181f"), a.fillStyle = e, a.fillRect(0, 0, o, s), a.save(), a.translate(c, l - 32), a.strokeStyle = i, a.lineWidth = 3, a.globalAlpha = .95, a.beginPath(), a.moveTo(0, -44), a.lineTo(42, -22), a.lineTo(42, 22), a.lineTo(0, 44), a.lineTo(-42, 22), a.lineTo(-42, -22), a.closePath(), a.stroke(), a.beginPath(), a.moveTo(0, -44), a.lineTo(0, 0), a.lineTo(42, 22), a.moveTo(0, 0), a.lineTo(-42, 22), a.moveTo(-42, -22), a.lineTo(0, 0), a.moveTo(42, -22), a.lineTo(0, 0), a.stroke(), a.restore(), a.fillStyle = "rgba(255,255,255,0.94)", a.font = "600 18px system-ui, sans-serif", a.textAlign = "center", a.textBaseline = "middle", a.fillText(String(n || t("model3d.preview", "3D preview")), c, l + 44), r && (a.fillStyle = "rgba(255,255,255,0.62)", a.font = "13px system-ui, sans-serif", a.fillText(String(r), c, l + 72));
|
||||
} catch (i) {
|
||||
console.debug?.(i);
|
||||
try {
|
||||
P(t, n, r || e("model3d.unavailable", "3D viewer unavailable"));
|
||||
P(e, n, r || t("model3d.unavailable", "3D viewer unavailable"));
|
||||
} catch (e) {
|
||||
console.debug?.(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
function pe({ defaultBgColor: t, defaultFov: n, defaultLightIntensity: r, hasSkeleton: i } = {}) {
|
||||
function pe({ defaultBgColor: e, defaultFov: n, defaultLightIntensity: r, hasSkeleton: i } = {}) {
|
||||
let a = document.createElement("div");
|
||||
a.className = "mjr-model3d-settings", a.style.cssText = "position:absolute;right:0;top:44px;width:210px;max-height:calc(100% - 100px);overflow-y:auto;background:rgba(14,18,26,0.96);border:1px solid rgba(255,255,255,0.10);border-right:none;border-radius:10px 0 0 10px;padding:10px 10px 12px 10px;z-index:4;display:none;box-shadow:-6px 4px 24px rgba(0,0,0,0.5);backdrop-filter:blur(12px);font:13px system-ui,sans-serif;color:rgba(255,255,255,0.88);scrollbar-width:thin", [
|
||||
"pointerdown",
|
||||
@@ -351,7 +351,7 @@ function pe({ defaultBgColor: t, defaultFov: n, defaultLightIntensity: r, hasSke
|
||||
};
|
||||
o("Scene");
|
||||
let u = document.createElement("input");
|
||||
u.type = "color", u.value = t || "#282828", u.style.cssText = "width:34px;height:24px;cursor:pointer;border:1px solid rgba(255,255,255,0.18);border-radius:4px;padding:1px;background:none;flex-shrink:0;", s(e("model3d.background", "Background"), u), o("Model");
|
||||
u.type = "color", u.value = e || "#282828", u.style.cssText = "width:34px;height:24px;cursor:pointer;border:1px solid rgba(255,255,255,0.18);border-radius:4px;padding:1px;background:none;flex-shrink:0;", s(t("model3d.background", "Background"), u), o("Model");
|
||||
let d = c([
|
||||
["original", "Original"],
|
||||
["normal", "Normal map"],
|
||||
@@ -359,7 +359,7 @@ function pe({ defaultBgColor: t, defaultFov: n, defaultLightIntensity: r, hasSke
|
||||
["wireframe", "Wireframe"],
|
||||
["pointcloud", "Point cloud"]
|
||||
], "original");
|
||||
s(e("model3d.material", "Material"), d);
|
||||
s(t("model3d.material", "Material"), d);
|
||||
let ee = c([
|
||||
["original", "Original"],
|
||||
["+y", "+Y (default)"],
|
||||
@@ -371,11 +371,11 @@ function pe({ defaultBgColor: t, defaultFov: n, defaultLightIntensity: r, hasSke
|
||||
], "original");
|
||||
s("Up", ee);
|
||||
let te = null, f = null;
|
||||
i && (f = document.createElement("input"), f.type = "checkbox", f.checked = !1, f.style.cssText = "cursor:pointer;accent-color:#4CAF50;flex-shrink:0;", te = s(e("model3d.skeleton", "Skeleton"), f)), o("Camera");
|
||||
i && (f = document.createElement("input"), f.type = "checkbox", f.checked = !1, f.style.cssText = "cursor:pointer;accent-color:#4CAF50;flex-shrink:0;", te = s(t("model3d.skeleton", "Skeleton"), f)), o("Camera");
|
||||
let p = l(15, 120, 1, n ?? 75);
|
||||
s("FOV", p.wrap), o(e("model3d.lights", "Lights"));
|
||||
s("FOV", p.wrap), o(t("model3d.lights", "Lights"));
|
||||
let m = l(0, 5, .1, r ?? 1);
|
||||
return s(e("model3d.intensity", "Intensity"), m.wrap), {
|
||||
return s(t("model3d.intensity", "Intensity"), m.wrap), {
|
||||
panel: a,
|
||||
bgInput: u,
|
||||
materialSel: d,
|
||||
@@ -389,8 +389,8 @@ function pe({ defaultBgColor: t, defaultFov: n, defaultLightIntensity: r, hasSke
|
||||
};
|
||||
}
|
||||
function me() {
|
||||
let t = document.createElement("div");
|
||||
t.className = "mjr-model3d-anim-bar", t.style.cssText = [
|
||||
let e = document.createElement("div");
|
||||
e.className = "mjr-model3d-anim-bar", e.style.cssText = [
|
||||
"position:absolute",
|
||||
"bottom:0",
|
||||
"left:0",
|
||||
@@ -413,13 +413,13 @@ function me() {
|
||||
"mouseup",
|
||||
"wheel",
|
||||
"click"
|
||||
].forEach((e) => {
|
||||
t.addEventListener(e, (e) => L(e, { preventDefault: !1 }));
|
||||
].forEach((t) => {
|
||||
e.addEventListener(t, (e) => L(e, { preventDefault: !1 }));
|
||||
});
|
||||
let n = document.createElement("button");
|
||||
n.type = "button", n.textContent = e("model3d.play", "Play"), n.title = e("model3d.playPause", "Play / Pause"), n.style.cssText = "width:28px;height:28px;border-radius:50%;border:1px solid rgba(255,255,255,0.18);background:rgba(76,175,80,0.14);color:rgba(255,255,255,0.92);font:600 12px system-ui,sans-serif;cursor:pointer;flex-shrink:0;padding:0;line-height:1;display:flex;align-items:center;justify-content:center";
|
||||
n.type = "button", n.textContent = t("model3d.play", "Play"), n.title = t("model3d.playPause", "Play / Pause"), n.style.cssText = "width:28px;height:28px;border-radius:50%;border:1px solid rgba(255,255,255,0.18);background:rgba(76,175,80,0.14);color:rgba(255,255,255,0.92);font:600 12px system-ui,sans-serif;cursor:pointer;flex-shrink:0;padding:0;line-height:1;display:flex;align-items:center;justify-content:center";
|
||||
let r = document.createElement("select");
|
||||
r.title = e("model3d.playbackSpeed", "Playback speed"), r.style.cssText = "background:rgba(20,24,34,0.9);color:rgba(255,255,255,0.8);border:1px solid rgba(255,255,255,0.14);border-radius:6px;padding:3px 4px;font:11px system-ui,sans-serif;cursor:pointer;width:52px;flex-shrink:0";
|
||||
r.title = t("model3d.playbackSpeed", "Playback speed"), r.style.cssText = "background:rgba(20,24,34,0.9);color:rgba(255,255,255,0.8);border:1px solid rgba(255,255,255,0.14);border-radius:6px;padding:3px 4px;font:11px system-ui,sans-serif;cursor:pointer;width:52px;flex-shrink:0";
|
||||
for (let e of F) {
|
||||
let t = document.createElement("option");
|
||||
t.value = String(e), t.textContent = `${e}x`, e === 1 && (t.selected = !0), r.appendChild(t);
|
||||
@@ -429,8 +429,8 @@ function me() {
|
||||
let a = document.createElement("input");
|
||||
a.type = "range", a.min = "0", a.max = "1000", a.value = "0", a.style.cssText = "flex:1;min-width:50px;cursor:pointer;accent-color:#4CAF50;height:3px;";
|
||||
let o = document.createElement("span");
|
||||
return o.style.cssText = "font:500 11px system-ui,sans-serif;color:rgba(255,255,255,0.45);white-space:nowrap;flex-shrink:0", o.textContent = "0s / 0s", t.appendChild(n), t.appendChild(r), t.appendChild(i), t.appendChild(a), t.appendChild(o), {
|
||||
bar: t,
|
||||
return o.style.cssText = "font:500 11px system-ui,sans-serif;color:rgba(255,255,255,0.45);white-space:nowrap;flex-shrink:0", o.textContent = "0s / 0s", e.appendChild(n), e.appendChild(r), e.appendChild(i), e.appendChild(a), e.appendChild(o), {
|
||||
bar: e,
|
||||
playBtn: n,
|
||||
speedSel: r,
|
||||
animSel: i,
|
||||
@@ -455,7 +455,7 @@ var H = Object.freeze({
|
||||
"fbx",
|
||||
"stl",
|
||||
"ply"
|
||||
]), ge = "#282828", W = e("model3d.controlHint", "Rotate: left drag Pan: right drag Zoom: wheel"), G = Object.freeze({
|
||||
]), ge = "#282828", W = t("model3d.controlHint", "Rotate: left drag Pan: right drag Zoom: wheel"), G = Object.freeze({
|
||||
PERSPECTIVE: "perspective",
|
||||
ORTHOGRAPHIC: "orthographic"
|
||||
});
|
||||
@@ -576,7 +576,7 @@ function Te(r, i, a = {}) {
|
||||
ee.className = "mjr-model3d-toolbar", ee.style.cssText = "position:absolute;top:10px;right:10px;display:flex;align-items:center;gap:6px;flex-wrap:wrap;pointer-events:none;z-index:5";
|
||||
let te = document.createElement("div");
|
||||
te.style.cssText = "display:flex;align-items:center;gap:6px;flex-wrap:wrap;pointer-events:auto;";
|
||||
let f = z(e("model3d.reset", "Reset"), e("model3d.resetView", "Reset 3D view")), p = z(e("model3d.grid", "Grid"), e("model3d.toggleGrid", "Toggle grid")), m = z(e("model3d.persp", "Persp"), e("model3d.switchCamera", "Switch perspective / orthographic")), h = z(e("model3d.settings", "Settings"), e("model3d.settings", "Settings"));
|
||||
let f = z(t("model3d.reset", "Reset"), t("model3d.resetView", "Reset 3D view")), p = z(t("model3d.grid", "Grid"), t("model3d.toggleGrid", "Toggle grid")), m = z(t("model3d.persp", "Persp"), t("model3d.switchCamera", "Switch perspective / orthographic")), h = z(t("model3d.settings", "Settings"), t("model3d.settings", "Settings"));
|
||||
te.append(f, p, m, h), ee.appendChild(te), c.appendChild(ee);
|
||||
let g = document.createElement("div");
|
||||
g.className = "mjr-model3d-hint", g.textContent = a.hintText || W, g.style.cssText = "position:absolute;right:10px;bottom:10px;padding:5px 10px;border-radius:999px;font:500 11px system-ui,sans-serif;color:rgba(255,255,255,0.75);background:rgba(0,0,0,0.35);backdrop-filter:blur(6px);pointer-events:none;z-index:2;transition:bottom 0.2s", c.appendChild(g);
|
||||
@@ -710,9 +710,9 @@ function Te(r, i, a = {}) {
|
||||
} catch (e) {
|
||||
console.debug?.(e);
|
||||
}
|
||||
}, qe = (t) => {
|
||||
}, qe = (e) => {
|
||||
if (!J || !Y.length) return;
|
||||
let n = Y[t];
|
||||
let n = Y[e];
|
||||
if (!n) return;
|
||||
X.forEach((e) => {
|
||||
try {
|
||||
@@ -722,13 +722,13 @@ function Te(r, i, a = {}) {
|
||||
}
|
||||
});
|
||||
let r = J.clipAction(n);
|
||||
r.timeScale = Me, r.clampWhenFinished = !1, r.loop = b?.LoopRepeat ?? 2201, r.play(), X[t] = r, Z = t, Q = !0, v.playBtn.textContent = e("model3d.pause", "Pause");
|
||||
r.timeScale = Me, r.clampWhenFinished = !1, r.loop = b?.LoopRepeat ?? 2201, r.play(), X[e] = r, Z = e, Q = !0, v.playBtn.textContent = t("model3d.pause", "Pause");
|
||||
try {
|
||||
let e = Math.max(100, Math.min(1e4, Math.round((n.duration || 1) * 100)));
|
||||
v.progressSlider.max = String(e);
|
||||
} catch {}
|
||||
}, Je = () => {
|
||||
J && Y.length && (Q ? (J.timeScale = 0, Q = !1, v.playBtn.textContent = e("model3d.play", "Play")) : (J.timeScale = Me, X[Z]?.isRunning?.() ? (Q = !0, v.playBtn.textContent = e("model3d.pause", "Pause")) : qe(Z)));
|
||||
J && Y.length && (Q ? (J.timeScale = 0, Q = !1, v.playBtn.textContent = t("model3d.play", "Play")) : (J.timeScale = Me, X[Z]?.isRunning?.() ? (Q = !0, v.playBtn.textContent = t("model3d.pause", "Pause")) : qe(Z)));
|
||||
}, Ye = (e, t) => {
|
||||
e && e.length !== 0 && b && (Y = e, J = new b.AnimationMixer(t), je = new b.Clock(), X = Array(e.length).fill(null), v.animSel.innerHTML = "", e.forEach((e, t) => {
|
||||
let n = document.createElement("option");
|
||||
@@ -759,7 +759,7 @@ function Te(r, i, a = {}) {
|
||||
}
|
||||
}));
|
||||
}, Xe = () => {
|
||||
B(p, !!P?.visible), B(m, q === G.ORTHOGRAPHIC), m.textContent = q === G.ORTHOGRAPHIC ? e("model3d.ortho", "Ortho") : e("model3d.persp", "Persp"), B(h, Pe);
|
||||
B(p, !!P?.visible), B(m, q === G.ORTHOGRAPHIC), m.textContent = q === G.ORTHOGRAPHIC ? t("model3d.ortho", "Ortho") : t("model3d.persp", "Persp"), B(h, Pe);
|
||||
};
|
||||
_.bgInput.addEventListener("input", () => {
|
||||
let e = _.bgInput.value;
|
||||
@@ -936,26 +936,26 @@ function Te(r, i, a = {}) {
|
||||
return $("Preparing 3D preview", Fe), Promise.resolve().then(async () => {
|
||||
let n = Se(r);
|
||||
if (he.has(n)) try {
|
||||
let e = await N();
|
||||
let t = await N();
|
||||
if (y) return;
|
||||
let o = e.THREE;
|
||||
let o = t.THREE;
|
||||
b = o;
|
||||
let s = new o.LoadingManager();
|
||||
s.setURLModifier((e) => {
|
||||
if (!e || xe(e)) return e;
|
||||
let n = t(r, e);
|
||||
s.setURLModifier((t) => {
|
||||
if (!t || xe(t)) return t;
|
||||
let n = e(r, t);
|
||||
if (n) return n;
|
||||
try {
|
||||
return new URL(e, i).href;
|
||||
return new URL(t, i).href;
|
||||
} catch {
|
||||
return e;
|
||||
return t;
|
||||
}
|
||||
}), x = new o.WebGLRenderer({
|
||||
canvas: l,
|
||||
antialias: !0,
|
||||
alpha: !0,
|
||||
preserveDrawingBuffer: !0
|
||||
}), x.outputColorSpace = o.SRGBColorSpace, x.setPixelRatio(Math.min(2, window.devicePixelRatio || 1)), S = new o.Scene(), S.background = new o.Color(ge), w = new o.PerspectiveCamera(ve, 16 / 9, .01, 1e4), T = new o.OrthographicCamera(-1, 1, 1, -1, -1e4, 1e4), C = w, E = new e.OrbitControls(C, l), E.enableDamping = !0, E.dampingFactor = .08, E.rotateSpeed = .82, E.zoomSpeed = 1, E.panSpeed = .9, E.screenSpacePanning = !0, E.mouseButtons = we(null, o.MOUSE), de = Ze(), Oe = new o.AmbientLight(16777215, K.ambient * Ae), S.add(Oe);
|
||||
}), x.outputColorSpace = o.SRGBColorSpace, x.setPixelRatio(Math.min(2, window.devicePixelRatio || 1)), S = new o.Scene(), S.background = new o.Color(ge), w = new o.PerspectiveCamera(ve, 16 / 9, .01, 1e4), T = new o.OrthographicCamera(-1, 1, 1, -1, -1e4, 1e4), C = w, E = new t.OrbitControls(C, l), E.enableDamping = !0, E.dampingFactor = .08, E.rotateSpeed = .82, E.zoomSpeed = 1, E.panSpeed = .9, E.screenSpacePanning = !0, E.mouseButtons = we(null, o.MOUSE), de = Ze(), Oe = new o.AmbientLight(16777215, K.ambient * Ae), S.add(Oe);
|
||||
let u = new o.DirectionalLight(16777215, K.main * Ae);
|
||||
u.position.set(0, 10, 10);
|
||||
let d = new o.DirectionalLight(16777215, K.back * Ae);
|
||||
@@ -978,14 +978,14 @@ function Te(r, i, a = {}) {
|
||||
x.setSize(t, n, !1), w && (w.aspect = t / n, w.updateProjectionMatrix()), ze(t, n), Re(), Ie();
|
||||
};
|
||||
typeof ResizeObserver < "u" && (ne = new ResizeObserver(() => O()), ne.observe(c));
|
||||
let se = fe(e, n, s);
|
||||
let se = fe(t, n, s);
|
||||
if (!se) {
|
||||
$("3D loader unavailable", `${n.toUpperCase()} loader could not be created.`), g.style.display = "none";
|
||||
return;
|
||||
}
|
||||
if (n === "obj" && e.MTLLoader) try {
|
||||
let t = i.replace(/\.obj(\?.*)?$/i, (e, t) => `.mtl${t || ""}`), n = new e.MTLLoader(s), r = await new Promise((e) => {
|
||||
n.load(t, e, void 0, () => e(null));
|
||||
if (n === "obj" && t.MTLLoader) try {
|
||||
let e = i.replace(/\.obj(\?.*)?$/i, (e, t) => `.mtl${t || ""}`), n = new t.MTLLoader(s), r = await new Promise((t) => {
|
||||
n.load(e, t, void 0, () => t(null));
|
||||
});
|
||||
r && !y && (r.preload(), se.setMaterials(r));
|
||||
} catch (e) {
|
||||
@@ -1134,8 +1134,8 @@ function Te(r, i, a = {}) {
|
||||
console.warn("[MJR 3D] preview init failed", e), $("Failed to load 3D preview", String(e?.message || "Three.js initialization failed.")), g.style.display = "none";
|
||||
}
|
||||
else if ($("3D preview unavailable", `${n.toUpperCase()} is not supported in the embedded viewer.`), g.style.display = "none", i) try {
|
||||
let t = document.createElement("a");
|
||||
t.href = i, t.download = String(r?.filename || "model"), t.textContent = e("model3d.downloadFile", "Download {file}", { file: String(r?.filename || "file") }), t.style.cssText = "position:absolute;bottom:18px;left:50%;transform:translateX(-50%);padding:7px 16px;border-radius:8px;font:600 12px system-ui,sans-serif;color:#fff;background:rgba(76,175,80,0.85);text-decoration:none;pointer-events:auto;z-index:3", c.appendChild(t);
|
||||
let e = document.createElement("a");
|
||||
e.href = i, e.download = String(r?.filename || "model"), e.textContent = t("model3d.downloadFile", "Download {file}", { file: String(r?.filename || "file") }), e.style.cssText = "position:absolute;bottom:18px;left:50%;transform:translateX(-50%);padding:7px 16px;border-radius:8px;font:600 12px system-ui,sans-serif;color:#fff;background:rgba(76,175,80,0.85);text-decoration:none;pointer-events:auto;z-index:3", c.appendChild(e);
|
||||
} catch {}
|
||||
}).catch((e) => {
|
||||
if (!y) {
|
||||
@@ -1544,8 +1544,8 @@ var it = ["src"], at = ["src"], ot = {
|
||||
"update:wipe",
|
||||
"dismiss"
|
||||
],
|
||||
setup(t, { expose: n, emit: r }) {
|
||||
let i = t, a = r, o = D(null), m = D(null), ie = D(null), ae = D(null), oe = D(null), O = D({
|
||||
setup(e, { expose: n, emit: r }) {
|
||||
let i = e, a = r, o = D(null), m = D(null), ie = D(null), ae = D(null), oe = D(null), O = D({
|
||||
x: 0,
|
||||
y: 0,
|
||||
w: 0,
|
||||
@@ -1700,7 +1700,7 @@ var it = ["src"], at = ["src"], ot = {
|
||||
} else a("ended");
|
||||
}
|
||||
function Ie() {
|
||||
U.value = e("viewer.studio.mediaError", "This file cannot be played by the browser.");
|
||||
U.value = t("viewer.studio.mediaError", "This file cannot be played by the browser.");
|
||||
}
|
||||
function $() {
|
||||
let e = q();
|
||||
@@ -1854,14 +1854,14 @@ var it = ["src"], at = ["src"], ot = {
|
||||
ref_key: "root",
|
||||
ref: m,
|
||||
class: T(["mjr-studio-player", {
|
||||
"is-audio": t.kind === "audio",
|
||||
"is-compact": t.compact,
|
||||
"is-audio": e.kind === "audio",
|
||||
"is-compact": e.compact,
|
||||
"controls-hidden": !H.value
|
||||
}]),
|
||||
onPointermove: wt,
|
||||
onClick: J
|
||||
}, [
|
||||
t.kind === "video" ? (y(), w("div", {
|
||||
e.kind === "video" ? (y(), w("div", {
|
||||
key: 0,
|
||||
ref_key: "screen",
|
||||
ref: ae,
|
||||
@@ -1871,12 +1871,12 @@ var it = ["src"], at = ["src"], ot = {
|
||||
}, [
|
||||
d("div", {
|
||||
class: "mjr-studio-player__layers",
|
||||
style: S(t.mediaFilter ? { filter: t.mediaFilter } : void 0)
|
||||
style: S(e.mediaFilter ? { filter: e.mediaFilter } : void 0)
|
||||
}, [d("video", {
|
||||
ref_key: "media",
|
||||
ref: o,
|
||||
class: T(["mjr-studio-player__media", t.mediaClass]),
|
||||
src: t.src,
|
||||
class: T(["mjr-studio-player__media", e.mediaClass]),
|
||||
src: e.src,
|
||||
playsinline: "",
|
||||
preload: "auto",
|
||||
onPlay: Me,
|
||||
@@ -1889,9 +1889,9 @@ var it = ["src"], at = ["src"], ot = {
|
||||
}, null, 42, it), Se.value ? (y(), w("video", {
|
||||
ref_key: "mediaB",
|
||||
ref: oe,
|
||||
key: `b:${t.compareSrc}`,
|
||||
key: `b:${e.compareSrc}`,
|
||||
class: "mjr-studio-player__media is-b",
|
||||
src: t.compareSrc || "",
|
||||
src: e.compareSrc || "",
|
||||
playsinline: "",
|
||||
muted: "",
|
||||
preload: "auto",
|
||||
@@ -1907,10 +1907,10 @@ var it = ["src"], at = ["src"], ot = {
|
||||
}), we.value ? (y(), w("div", {
|
||||
key: 0,
|
||||
class: T(["mjr-studio-stage__divider", {
|
||||
"is-vertical": t.compare === "wipeV",
|
||||
"is-vertical": e.compare === "wipeV",
|
||||
"is-active": se.value
|
||||
}]),
|
||||
style: S(t.compare === "wipeV" ? { top: `${Te.value}%` } : { left: `${Te.value}%` }),
|
||||
style: S(e.compare === "wipeV" ? { top: `${Te.value}%` } : { left: `${Te.value}%` }),
|
||||
onClick: r[1] ||= g(() => {}, ["stop"]),
|
||||
onDblclick: r[2] ||= g((e) => a("update:wipe", 50), ["stop"]),
|
||||
onPointerdown: g(Y, ["stop"]),
|
||||
@@ -1920,7 +1920,7 @@ var it = ["src"], at = ["src"], ot = {
|
||||
}, [...r[12] ||= [d("span", { class: "mjr-studio-stage__divider-grip" }, null, -1)]], 38)) : p("", !0)], 4),
|
||||
Se.value ? (y(), w("div", ot, [
|
||||
r[13] ||= d("span", null, "A", -1),
|
||||
d("span", st, x(t.compare === "wipeV" ? "/" : "|"), 1),
|
||||
d("span", st, x(e.compare === "wipeV" ? "/" : "|"), 1),
|
||||
r[14] ||= d("span", null, "B", -1)
|
||||
])) : p("", !0)
|
||||
], 34)) : (y(), w("div", {
|
||||
@@ -1935,11 +1935,11 @@ var it = ["src"], at = ["src"], ot = {
|
||||
"aria-hidden": "true"
|
||||
}, null, 512), [[b, ue.value]]),
|
||||
s(d("i", ct, null, 512), [[b, !ue.value]]),
|
||||
d("span", null, x(t.filename), 1),
|
||||
d("span", null, x(e.filename), 1),
|
||||
d("audio", {
|
||||
ref_key: "media",
|
||||
ref: o,
|
||||
src: t.src,
|
||||
src: e.src,
|
||||
preload: "auto",
|
||||
onPlay: Me,
|
||||
onPause: Q,
|
||||
@@ -1954,7 +1954,7 @@ var it = ["src"], at = ["src"], ot = {
|
||||
key: 2,
|
||||
type: "button",
|
||||
class: "mjr-studio-player__big-play",
|
||||
"aria-label": E(e)("viewer.studio.play", "Play"),
|
||||
"aria-label": E(t)("viewer.studio.play", "Play"),
|
||||
onClick: $
|
||||
}, {
|
||||
default: h(() => [...r[15] ||= [d("i", {
|
||||
@@ -1972,7 +1972,7 @@ var it = ["src"], at = ["src"], ot = {
|
||||
ref: ie,
|
||||
class: "mjr-studio-player__track",
|
||||
role: "slider",
|
||||
"aria-label": E(e)("viewer.studio.seek", "Seek"),
|
||||
"aria-label": E(t)("viewer.studio.seek", "Seek"),
|
||||
"aria-valuemin": 0,
|
||||
"aria-valuemax": P.value,
|
||||
"aria-valuenow": N.value,
|
||||
@@ -2007,7 +2007,7 @@ var it = ["src"], at = ["src"], ot = {
|
||||
f(i, {
|
||||
type: "button",
|
||||
class: "mjr-studio-btn",
|
||||
title: E(e)("viewer.studio.playPause", "Play / pause (Space)"),
|
||||
title: E(t)("viewer.studio.playPause", "Play / pause (Space)"),
|
||||
onClick: $
|
||||
}, {
|
||||
default: h(() => [d("i", {
|
||||
@@ -2016,10 +2016,10 @@ var it = ["src"], at = ["src"], ot = {
|
||||
}, null, 2)]),
|
||||
_: 1
|
||||
}, 8, ["title"]),
|
||||
t.kind === "video" ? (y(), w(l, { key: 0 }, [f(i, {
|
||||
e.kind === "video" ? (y(), w(l, { key: 0 }, [f(i, {
|
||||
type: "button",
|
||||
class: "mjr-studio-btn",
|
||||
title: E(e)("viewer.studio.prevFrame", "Previous frame (,)"),
|
||||
title: E(t)("viewer.studio.prevFrame", "Previous frame (,)"),
|
||||
onClick: r[6] ||= (e) => ze(-1)
|
||||
}, {
|
||||
default: h(() => [...r[16] ||= [d("i", {
|
||||
@@ -2030,7 +2030,7 @@ var it = ["src"], at = ["src"], ot = {
|
||||
}, 8, ["title"]), f(i, {
|
||||
type: "button",
|
||||
class: "mjr-studio-btn",
|
||||
title: E(e)("viewer.studio.nextFrame", "Next frame (.)"),
|
||||
title: E(t)("viewer.studio.nextFrame", "Next frame (.)"),
|
||||
onClick: r[7] ||= (e) => ze(1)
|
||||
}, {
|
||||
default: h(() => [...r[17] ||= [d("i", {
|
||||
@@ -2040,10 +2040,10 @@ var it = ["src"], at = ["src"], ot = {
|
||||
_: 1
|
||||
}, 8, ["title"])], 64)) : p("", !0),
|
||||
d("span", pt, [C(x(E(Ke)(N.value)) + " ", 1), d("span", mt, "/ " + x(E(Ke)(P.value)), 1)]),
|
||||
t.kind === "video" && W.value ? (y(), w("span", {
|
||||
e.kind === "video" && W.value ? (y(), w("span", {
|
||||
key: 1,
|
||||
class: "mjr-studio-chip",
|
||||
title: E(e)("viewer.studio.frame", "Frame")
|
||||
title: E(t)("viewer.studio.frame", "Frame")
|
||||
}, [
|
||||
C(" f " + x(G.value), 1),
|
||||
_e.value ? (y(), w(l, { key: 0 }, [C(" / " + x(_e.value - 1), 1)], 64)) : p("", !0),
|
||||
@@ -2052,7 +2052,7 @@ var it = ["src"], at = ["src"], ot = {
|
||||
r[24] ||= d("span", { class: "mjr-studio-player__spacer" }, null, -1),
|
||||
d("div", {
|
||||
class: "mjr-studio-player__group",
|
||||
title: E(e)("viewer.studio.abLoop", "A-B loop (I / O, U to clear)")
|
||||
title: E(t)("viewer.studio.abLoop", "A-B loop (I / O, U to clear)")
|
||||
}, [
|
||||
f(i, {
|
||||
type: "button",
|
||||
@@ -2074,7 +2074,7 @@ var it = ["src"], at = ["src"], ot = {
|
||||
key: 0,
|
||||
type: "button",
|
||||
class: "mjr-studio-btn",
|
||||
title: E(e)("viewer.studio.clearLoop", "Clear A-B loop"),
|
||||
title: E(t)("viewer.studio.clearLoop", "Clear A-B loop"),
|
||||
onClick: xt
|
||||
}, {
|
||||
default: h(() => [...r[20] ||= [d("i", {
|
||||
@@ -2087,7 +2087,7 @@ var it = ["src"], at = ["src"], ot = {
|
||||
f(i, {
|
||||
type: "button",
|
||||
class: T(["mjr-studio-btn", { "is-on": z.value }]),
|
||||
title: E(e)("viewer.studio.loop", "Loop"),
|
||||
title: E(t)("viewer.studio.loop", "Loop"),
|
||||
onClick: r[8] ||= (e) => z.value = !z.value
|
||||
}, {
|
||||
default: h(() => [...r[21] ||= [d("i", {
|
||||
@@ -2099,7 +2099,7 @@ var it = ["src"], at = ["src"], ot = {
|
||||
f(i, {
|
||||
type: "button",
|
||||
class: T(["mjr-studio-btn is-text", { "is-on": R.value !== 1 }]),
|
||||
title: E(e)("viewer.studio.speed", "Speed ([ / ])"),
|
||||
title: E(t)("viewer.studio.speed", "Speed ([ / ])"),
|
||||
onClick: r[9] ||= (e) => Je(1, !0)
|
||||
}, {
|
||||
default: h(() => [C(x(R.value) + "×", 1)]),
|
||||
@@ -2108,7 +2108,7 @@ var it = ["src"], at = ["src"], ot = {
|
||||
d("div", _t, [f(i, {
|
||||
type: "button",
|
||||
class: "mjr-studio-btn",
|
||||
title: E(e)("viewer.studio.mute", "Mute (M)"),
|
||||
title: E(t)("viewer.studio.mute", "Mute (M)"),
|
||||
onClick: et
|
||||
}, {
|
||||
default: h(() => [d("i", {
|
||||
@@ -2119,7 +2119,7 @@ var it = ["src"], at = ["src"], ot = {
|
||||
}, 8, ["title"]), d("div", {
|
||||
class: "mjr-studio-player__volume",
|
||||
role: "slider",
|
||||
"aria-label": E(e)("viewer.studio.volume", "Volume"),
|
||||
"aria-label": E(t)("viewer.studio.volume", "Volume"),
|
||||
"aria-valuemin": 0,
|
||||
"aria-valuemax": 1,
|
||||
"aria-valuenow": L.value ? 0 : I.value,
|
||||
@@ -2130,11 +2130,11 @@ var it = ["src"], at = ["src"], ot = {
|
||||
class: "mjr-studio-player__volume-fill",
|
||||
style: S({ width: `${(L.value ? 0 : I.value) * 100}%` })
|
||||
}, null, 4)], 40, vt)]),
|
||||
t.kind === "video" ? (y(), u(i, {
|
||||
e.kind === "video" ? (y(), u(i, {
|
||||
key: 2,
|
||||
type: "button",
|
||||
class: "mjr-studio-btn",
|
||||
title: E(e)("viewer.studio.exportFrame", "Save this frame as PNG"),
|
||||
title: E(t)("viewer.studio.exportFrame", "Save this frame as PNG"),
|
||||
onClick: Ct
|
||||
}, {
|
||||
default: h(() => [...r[22] ||= [d("i", {
|
||||
@@ -2143,11 +2143,11 @@ var it = ["src"], at = ["src"], ot = {
|
||||
}, null, -1)]]),
|
||||
_: 1
|
||||
}, 8, ["title"])) : p("", !0),
|
||||
t.kind === "video" ? (y(), u(i, {
|
||||
e.kind === "video" ? (y(), u(i, {
|
||||
key: 3,
|
||||
type: "button",
|
||||
class: "mjr-studio-btn",
|
||||
title: E(e)("viewer.studio.fullscreen", "Fullscreen (F)"),
|
||||
title: E(t)("viewer.studio.fullscreen", "Fullscreen (F)"),
|
||||
onClick: St
|
||||
}, {
|
||||
default: h(() => [...r[23] ||= [d("i", {
|
||||
Vendored
+762
-762
File diff suppressed because it is too large
Load Diff
+2505
-2583
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { B as e, L as t, R as n, T as r, X as i, at as a, dt as o, et as s, it as c, nt as l, ot as u, rt as d, st as f, tt as p, ut as m } from "./mjr-primevue-C07IsEdU.js";
|
||||
import { B as e, L as t, R as n, T as r, X as i, at as a, dt as o, et as s, it as c, nt as l, ot as u, rt as d, st as f, tt as p, ut as m } from "./mjr-primevue-QrNPJaqR.js";
|
||||
// node_modules/pinia/dist/pinia.js
|
||||
var h = typeof window < "u", g, _ = (e) => g = e, v = () => t() && n(y) || g, y = Symbol();
|
||||
function b(e) {
|
||||
+32
-32
@@ -1,8 +1,8 @@
|
||||
import { Vn as e, bn as t, fn as n, gn as r, in as i, kn as a, un as o, xn as s } from "./config-C9a-wT5M.js";
|
||||
import { Cn as e, Sn as t, Un as n, fn as r, jn as i, mn as a, on as o, vn as s } from "./config-D56TZeFo.js";
|
||||
import { a as c, n as l } from "./graphTraversal-DTdQWkn5.js";
|
||||
import { C as u, S as d, b as f, x as p, y as m } from "./generationSectionState-DuXxSw-j.js";
|
||||
import { _ as ee, a as te, c as ne, d as re, f as ie, g as ae, h as oe, i as se, l as ce, m as le, n as ue, o as de, p as fe, r as pe, s as me, t as he, u as ge } from "./mjr-primevue-C07IsEdU.js";
|
||||
import { t as _e } from "./mjr-vue-vendor-CEDOnn2t.js";
|
||||
import { C as u, S as d, b as f, x as p, y as m } from "./generationSectionState-BR-TS47u.js";
|
||||
import { _ as ee, a as te, c as ne, d as re, f as ie, g as ae, h as oe, i as se, l as ce, m as le, n as ue, o as de, p as fe, r as pe, s as me, t as he, u as ge } from "./mjr-primevue-QrNPJaqR.js";
|
||||
import { t as _e } from "./mjr-vue-vendor-Dn5oe7QV.js";
|
||||
// ui/features/viewer/floatingViewerProgress.ts
|
||||
var h = "progress-update", g = "__MJR_MFV_PROGRESS_SERVICE__";
|
||||
function ve() {
|
||||
@@ -14,8 +14,8 @@ function ye(e, t) {
|
||||
return n.detail = t, n;
|
||||
}
|
||||
var be = class {
|
||||
constructor(e, t = () => s()) {
|
||||
this.id = String(e || ""), this.promptApi = null, this.executedNodeIds = [], this.totalNodes = 0, this.currentlyExecuting = null, this.errorDetails = null, this._getApp = typeof t == "function" ? t : () => null;
|
||||
constructor(t, n = () => e()) {
|
||||
this.id = String(t || ""), this.promptApi = null, this.executedNodeIds = [], this.totalNodes = 0, this.currentlyExecuting = null, this.errorDetails = null, this._getApp = typeof n == "function" ? n : () => null;
|
||||
}
|
||||
setPrompt(e) {
|
||||
let t = e && typeof e == "object" ? e.output : null;
|
||||
@@ -63,8 +63,8 @@ var be = class {
|
||||
this.errorDetails = e || null;
|
||||
}
|
||||
}, xe = class extends EventTarget {
|
||||
constructor({ getApi: n = (e) => t(e), getApp: r = () => s(), waitForApi: i = (t) => e(t) } = {}) {
|
||||
super(), this._getApi = n, this._getApp = r, this._waitForApi = i, this.promptsMap = /* @__PURE__ */ new Map(), this.currentExecution = null, this.lastQueueRemaining = 0, this._api = null, this._listenerEntries = [], this._initPromise = null, this._hydrations = /* @__PURE__ */ new Map();
|
||||
constructor({ getApi: r = (e) => t(e), getApp: i = () => e(), waitForApi: a = (e) => n(e) } = {}) {
|
||||
super(), this._getApi = r, this._getApp = i, this._waitForApi = a, this.promptsMap = /* @__PURE__ */ new Map(), this.currentExecution = null, this.lastQueueRemaining = 0, this._api = null, this._listenerEntries = [], this._initPromise = null, this._hydrations = /* @__PURE__ */ new Map();
|
||||
}
|
||||
getSnapshot() {
|
||||
return {
|
||||
@@ -246,11 +246,11 @@ function b(e, t) {
|
||||
e._mediaProgressTextEl.textContent = n, e._mediaProgressEl.title = n || "", e._mediaProgressEl.classList.toggle("is-error", o), e._mediaProgressEl.classList.toggle("is-visible", !!n);
|
||||
}
|
||||
}
|
||||
function we(e, t) {
|
||||
let n = String(t || "").trim();
|
||||
if (!n) return !1;
|
||||
function we(t, n) {
|
||||
let i = String(n || "").trim();
|
||||
if (!i) return !1;
|
||||
try {
|
||||
return o(n, s());
|
||||
return r(i, e());
|
||||
} catch (e) {
|
||||
return console.debug?.(e), !1;
|
||||
}
|
||||
@@ -321,7 +321,7 @@ var x = /* @__PURE__ */ new Map(), S = null;
|
||||
async function C(e) {
|
||||
let t = Array.from(new Set(w(e).map((e) => D(e)).filter(Boolean)));
|
||||
if (t.length && t.filter((e) => !x.has(e)).length) try {
|
||||
S ||= n("/object_info").then((e) => e?.ok ? e.json() : null).then((e) => {
|
||||
S ||= a("/object_info").then((e) => e?.ok ? e.json() : null).then((e) => {
|
||||
if (e && typeof e == "object") for (let [t, n] of Object.entries(e)) x.set(String(t), n);
|
||||
return e;
|
||||
}).catch(() => null), await S;
|
||||
@@ -873,16 +873,16 @@ function dt(e, t, n = null) {
|
||||
}
|
||||
function G(e, t, n = null) {
|
||||
if (!e) return !1;
|
||||
let i = String(e.type || "").toLowerCase();
|
||||
if (i === "number" || i === "int" || i === "float") {
|
||||
let r = String(e.type || "").toLowerCase();
|
||||
if (r === "number" || r === "int" || r === "float") {
|
||||
let n = Number(t);
|
||||
if (Number.isNaN(n)) return !1;
|
||||
let r = e.options ?? {}, a = r.min ?? -Infinity, o = r.max ?? Infinity, s = Math.min(o, Math.max(a, n));
|
||||
(i === "int" || r.precision === 0 || r.round === 1) && (s = Math.round(s)), e.value = s;
|
||||
} else e.value = i === "toggle" || i === "boolean" ? !!t : t;
|
||||
let i = e.options ?? {}, a = i.min ?? -Infinity, o = i.max ?? Infinity, s = Math.min(o, Math.max(a, n));
|
||||
(r === "int" || i.precision === 0 || i.round === 1) && (s = Math.round(s)), e.value = s;
|
||||
} else e.value = r === "toggle" || r === "boolean" ? !!t : t;
|
||||
try {
|
||||
let t = r(), o = n ?? e?.parent ?? null, s = e.value;
|
||||
e.callback?.(e.value, t, o, null, e), (i === "number" || i === "int" || i === "float") && (e.value = s), ft(e), a(o);
|
||||
let t = s(), a = n ?? e?.parent ?? null, o = e.value;
|
||||
e.callback?.(e.value, t, a, null, e), (r === "number" || r === "int" || r === "float") && (e.value = o), ft(e), i(a);
|
||||
} catch (e) {
|
||||
console.debug?.("[MFV] writeWidgetValue", e);
|
||||
}
|
||||
@@ -1301,15 +1301,15 @@ function Dt() {
|
||||
let n = document.createElement("div");
|
||||
n.className = "mjr-settings-head";
|
||||
let r = document.createElement("div");
|
||||
r.className = "mjr-settings-title", r.textContent = i("settings.majoor.title", "Majoor Assets Manager Settings");
|
||||
let a = document.createElement("button");
|
||||
a.type = "button", a.className = "mjr-settings-close", a.textContent = "X", a.setAttribute("aria-label", i("btn.close", "Close")), a.addEventListener("click", Z), n.append(r, a);
|
||||
let o = document.createElement("div");
|
||||
o.className = "mjr-settings-tools";
|
||||
r.className = "mjr-settings-title", r.textContent = o("settings.majoor.title", "Majoor Assets Manager Settings");
|
||||
let i = document.createElement("button");
|
||||
i.type = "button", i.className = "mjr-settings-close", i.textContent = "X", i.setAttribute("aria-label", o("btn.close", "Close")), i.addEventListener("click", Z), n.append(r, i);
|
||||
let a = document.createElement("div");
|
||||
a.className = "mjr-settings-tools";
|
||||
let s = document.createElement("input");
|
||||
s.type = "search", s.className = "mjr-settings-search", s.placeholder = i("placeholder.searchSettings", "Search settings"), o.appendChild(s);
|
||||
s.type = "search", s.className = "mjr-settings-search", s.placeholder = o("placeholder.searchSettings", "Search settings"), a.appendChild(s);
|
||||
let c = document.createElement("div");
|
||||
return c.className = "mjr-settings-body", t.append(n, o, c), e.appendChild(t), document.body.appendChild(e), {
|
||||
return c.className = "mjr-settings-body", t.append(n, a, c), e.appendChild(t), document.body.appendChild(e), {
|
||||
body: c,
|
||||
root: e,
|
||||
search: s
|
||||
@@ -1325,11 +1325,11 @@ function Z() {
|
||||
}
|
||||
}
|
||||
}
|
||||
function Ot(e = s()) {
|
||||
function Ot(t = e()) {
|
||||
if (typeof document > "u") return !1;
|
||||
Y?.root?.isConnected || (Y = Dt());
|
||||
let t = u(e), n = () => Et(Y.body, t, String(Y.search.value || "").trim().toLowerCase());
|
||||
Y.search.oninput = n, Y.search.value = "", n(), Y.root.hidden = !1;
|
||||
let n = u(t), r = () => Et(Y.body, n, String(Y.search.value || "").trim().toLowerCase());
|
||||
Y.search.oninput = r, Y.search.value = "", r(), Y.root.hidden = !1;
|
||||
try {
|
||||
window.dispatchEvent(new CustomEvent(J, { detail: { open: !0 } }));
|
||||
} catch (e) {
|
||||
@@ -1338,8 +1338,8 @@ function Ot(e = s()) {
|
||||
return setTimeout(() => Y?.search?.focus?.(), 0), !0;
|
||||
}
|
||||
// ui/app/openMajoorSettings.ts
|
||||
function Q(e = s()) {
|
||||
return Ot(e);
|
||||
function Q(t = e()) {
|
||||
return Ot(t);
|
||||
}
|
||||
try {
|
||||
typeof window < "u" && (window.MajoorAssetsManager = window.MajoorAssetsManager || {}, window.MajoorAssetsManager.openSettings = Q);
|
||||
Vendored
+4877
-4800
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user