92 lines
2.7 KiB
JavaScript
92 lines
2.7 KiB
JavaScript
/*
|
|
* Extracted from browser-delivered Turbopack chunk: cde068e14ffee6a8.f8b5a2ab76.js
|
|
* Module id: 922656
|
|
* For reading/searching only; this factory depends on the original Turbopack runtime.
|
|
*/
|
|
|
|
const moduleFactory = (e) => {
|
|
"use strict";
|
|
var t = e.i(185264),
|
|
i = e.i(299750);
|
|
let n = 0;
|
|
function r(e) {
|
|
if (
|
|
!Array.isArray(e) ||
|
|
0 === e.length ||
|
|
!e.some((e) => i.TERMINAL_PROGRESS_STATUS.has(e.status))
|
|
)
|
|
return;
|
|
let r = Date.now();
|
|
r - n < 2e3 ||
|
|
((n = r),
|
|
t.useUserVipInfo
|
|
.getState()
|
|
.syncVipInfo()
|
|
.catch((e) => {
|
|
console.warn("syncVipOnTerminalProgress failed", e);
|
|
}));
|
|
}
|
|
e.s(["syncVipOnTerminalProgress", () => r], 820915);
|
|
var a = e.i(459812),
|
|
o = e.i(182004);
|
|
let u = new Set([o.NodeType.IMAGE, o.NodeType.VIDEO, o.NodeType.AUDIO]);
|
|
function l(e, t, i, n, r) {
|
|
for (let o of i) {
|
|
let i = t[o],
|
|
u = (function (e, t, i) {
|
|
let n = (0, a.getStoreKey)(i, t);
|
|
return Object.prototype.hasOwnProperty.call(e, t)
|
|
? e[t]
|
|
: n !== t && Object.prototype.hasOwnProperty.call(e, n)
|
|
? e[n]
|
|
: void 0;
|
|
})(e, o, i);
|
|
if (void 0 === u) continue;
|
|
let l = (0, a.getStoreKey)(i, o);
|
|
(n[l] = u), r.add(o), l !== o && r.add(l);
|
|
}
|
|
}
|
|
function s(e, t, i, n) {
|
|
let r,
|
|
s = i ?? {};
|
|
if (!u.has(t)) {
|
|
let { settings: t, advancedSettings: i, ...n } = e;
|
|
return { ...s, ...n };
|
|
}
|
|
let d = { ...(s.settings ?? {}) },
|
|
c = { ...(s.advancedSettings ?? {}) },
|
|
m = new Set(),
|
|
f =
|
|
"string" == typeof e.model
|
|
? e.model
|
|
: "string" == typeof s.model
|
|
? s.model
|
|
: "",
|
|
p =
|
|
"string" == typeof (r = e.modeType ?? s.modeType)
|
|
? r
|
|
: null != r
|
|
? String(r)
|
|
: void 0,
|
|
g = f ? n(f) : null;
|
|
if (g?.properties && g.config) {
|
|
let i = g.properties,
|
|
n = g.config,
|
|
r = t === o.NodeType.VIDEO || t === o.NodeType.IMAGE ? p : void 0,
|
|
u = (0, a.getFieldList)(n.settings, r),
|
|
s = (0, a.getFieldList)(n.advancedSettings, r);
|
|
l(e, i, u, d, m), l(e, i, s, c, m);
|
|
}
|
|
let v = { ...s };
|
|
for (let e of m) delete v[e];
|
|
for (let [t, i] of Object.entries(e))
|
|
"settings" !== t &&
|
|
"advancedSettings" !== t &&
|
|
(m.has(t) || (v[t] = i));
|
|
return (v.settings = d), (v.advancedSettings = c), v;
|
|
}
|
|
e.s(["hydrateGeneratorParamsFromFlatTaskParams", () => s], 922656);
|
|
};
|
|
|
|
export default moduleFactory;
|