decord/beta/source/modules/changelog/ChangelogManager.tsx
github-actions 6fbb1b046c chore: update source for beta 347.8
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4943.js (118.4 MB)
2026-09-22 14:21:44 +00:00

205 lines
7.3 KiB
TypeScript

// Module ID: 17750
// Function ID: 17751
// Name: ChangelogManager
// Dependencies: [5, 32, 2113, 4772, 7365, 8356, 17751, 577, 11, 17753, 2]
// Module 17750 (ChangelogManager)
import asyncGeneratorStep from "asyncGeneratorStep" /* 5 */;
import _slicedToArray from "module_32" /* 32 */;
import LocaleStore from "LocaleStore" /* 2113 */;
import ChangelogStore from "ChangelogStore" /* 4772 */;
import AutomaticLifecycleManager from "AutomaticLifecycleManager" /* 7365 */;
let require = fn;
const prototype = function ChangelogManager() {
let applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
require = applyArgumentsResult;
applyArgumentsResult.actions = {
POST_CONNECTION_OPEN(arg0) {
return applyArgumentsResult.handleConnectionOpen(arg0);
}
};
closure_129_0 = asyncGeneratorStep(async (arg0, value) => {
if (locale === 2) {
locale = 3;
throw new TypeError("Generator functions may not be called on executing generators");
} else if (tmp6 === 3) {
if (arg0 === 1) {
throw value;
} else if (arg0 === 2) {
const obj6 = { value, done: true };
return obj6;
} else {
return { value: "IconComponent", done: null };
}
} else {
try {
locale = 2;
if (0 === c4) {
if (arg0 === 1) {
locale = 3;
throw value;
} else if (arg0 === 2) {
locale = 3;
const obj9 = { value, done: true };
return obj9;
} else {
applyArgumentsResult = tmp7;
closure_128_0 = undefined;
let body;
closure_128_2 = undefined;
closure_128_3 = undefined;
closure_128_4 = undefined;
closure_128_5 = undefined;
c3 = 1;
c4 = 2;
locale = 1;
const obj12 = { value: tmp3(tmp86[5]).fetchChangelogConfig(), done: false };
return obj12;
}
} else if (1 === tmp7) {
c3 = 0;
tmp3(tmp86[7]).dispatch({ type: "CHANGE_LOG_RESOLVED" });
throw tmp86;
} else if (2 === tmp7) {
if (arg0 === 1) {
locale = 3;
throw value;
} else if (arg0 === 2) {
c3 = 0;
tmp3(tmp86[7]).dispatch({ type: "CHANGE_LOG_RESOLVED" });
locale = 3;
const obj17 = { value, done: true };
return obj17;
} else {
closure_128_0 = value;
body = closure_128_0.body;
closure_128_2 = (function getLatestChangelogIdForVersion(arg0, clientVersionForChangelog) {
let num = 0;
let first = null;
const entries = Object.entries(arg0);
while (tmp3 !== undefined) {
let tmp6 = closure_1_4(tmp4, 2);
let min_version = tmp6[1].min_version;
let tmp8 = min_version <= clientVersionForChangelog;
if (tmp8) {
tmp8 = tmp7 > num;
}
if (tmp8) {
num = min_version;
first = tmp6[0];
}
continue;
}
return first;
})(body, applyArgumentsResult(tmp86[6]).getClientVersionForChangelog());
const obj23 = applyArgumentsResult(tmp86[6]);
const obj20 = { type: "CHANGE_LOG_SET_CONFIG", config: closure_128_0.body, latestChangelogId: closure_128_2 };
tmp3(tmp86[7]).dispatch(obj20);
if (null == closure_128_2) {
c3 = 0;
tmp3(tmp86[7]).dispatch({ type: "CHANGE_LOG_RESOLVED" });
locale = 3;
return { value: "IconComponent", done: null };
} else if (true !== body[closure_128_2].show_on_startup) {
c3 = 0;
tmp3(tmp86[7]).dispatch({ type: "CHANGE_LOG_RESOLVED" });
locale = 3;
return { value: "IconComponent", done: null };
} else {
closure_128_3 = ChangelogStore.lastSeenChangelogId();
closure_128_4 = ChangelogStore.lastSeenChangelogDate();
if (null != closure_128_3) {
if (obj10.compare(closure_128_2, closure_128_3) <= 0) {
c3 = 0;
tmp3(tmp86[7]).dispatch({ type: "CHANGE_LOG_RESOLVED" });
locale = 3;
return { value: "IconComponent", done: null };
}
obj10 = tmp3(tmp86[8]);
}
c4 = 3;
locale = 1;
const obj21 = { value: tmp3(tmp86[5]).fetchChangelog(closure_128_2, locale.locale), done: false };
return obj21;
}
const obj24 = tmp3(tmp86[7]);
}
} else if (arg0 === 1) {
locale = 3;
throw value;
} else if (arg0 === 2) {
c3 = 0;
tmp3(tmp86[7]).dispatch({ type: "CHANGE_LOG_RESOLVED" });
locale = 3;
const obj22 = { value, done: true };
return obj22;
} else {
closure_128_5 = value;
if (null == closure_128_5) {
c3 = 0;
tmp3(tmp86[7]).dispatch({ type: "CHANGE_LOG_RESOLVED" });
locale = 3;
return { value: "IconComponent", done: null };
} else {
if (null != closure_128_4) {
if (null != ChangelogStore.lastSeenChangelogDate()) {
if (ChangelogStore.isLocked()) {
c3 = 0;
tmp3(tmp86[7]).dispatch({ type: "CHANGE_LOG_RESOLVED" });
locale = 3;
return { value: "IconComponent", done: null };
} else {
const _Date = Date;
const date = new Date(closure_128_5.date);
const _Date2 = Date;
const date1 = new Date(closure_128_4);
if (date > date1) {
applyArgumentsResult(tmp86[9]).openChangelog();
const obj = applyArgumentsResult(tmp86[9]);
}
c3 = 0;
tmp3(tmp86[7]).dispatch({ type: "CHANGE_LOG_RESOLVED" });
locale = 3;
return { value: "IconComponent", done: null };
}
}
}
tmp3(tmp86[5]).markChangelogAsSeen(closure_128_2, closure_128_5.date);
c3 = 0;
const obj4 = tmp3(tmp86[5]);
tmp3(tmp86[7]).dispatch({ type: "CHANGE_LOG_RESOLVED" });
locale = 3;
const obj25 = { value: undefined, done: true };
return obj25;
}
}
} catch (tmp86) {
if (tmp4 === c3) {
locale = tmp2;
throw tmp86;
} else {
c4 = tmp;
}
}
}
});
applyArgumentsResult.handleConnectionOpen = function() {
const self = this;
const apply = applyArgumentsResult.apply;
if (typeof apply === "unknown") {
applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
};
return applyArgumentsResult;
}.prototype;
class prototype extends tmp2 {
}
const prototype1 = new prototype();
const size = fn(2);
const result = size.fileFinishedImporting("modules/changelog/ChangelogManager.tsx");
export default prototype1;