Files
discord-decomp/sources/stores/StatusPageStore.tsx
T
2026-07-28 01:06:53 +03:00

118 lines
6.0 KiB
TypeScript

/* Metro module 12604; source: stores/StatusPageStore.tsx; dependencies: [6, 7, 15, 17, 18, 587, 566, 694, 2] */
import ClassCallCheck from '../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as StorageModule from '../external/discord_common/js/packages/storage/Storage.tsx'; /* Metro dependency 587 */
function _fun96691(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12794:6, offset: 0x021638b5, size: 329 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const Store = (Flux).Store;
let value = _fun96695(Store);
value.displayName = 'MaintenanceStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: function() {
env0_7 = null;
}, STATUS_PAGE_INCIDENT: function(a0) {
env0_7 = a0.incident;
}, STATUS_PAGE_SCHEDULED_MAINTENANCE: function(a0) {
env0_8 = a0.maintenance;
}, STATUS_PAGE_SCHEDULED_MAINTENANCE_ACK: STATUS_PAGE_SCHEDULED_MAINTENANCE_ACK});
(FileImportTrackerModule).fileFinishedImporting('stores/StatusPageStore.tsx');
exports.default = value;
function _isNativeReflectConstruct_96692() { // fn#96692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12794:148, offset: 0x021639fe, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_96692_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun96695(a0) { // fn#96695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12794:393, offset: 0x02163a60, size: 126 bytes, params: 2, frame: 16
const MaintenanceStore2 = MaintenanceStore;
Inherits(MaintenanceStore2, a0);
return CreateClass(MaintenanceStore2, [{key: 'initialize', value: function() {
var Storage = require(dependencyMap[5]).Storage;
env1_9 = Storage.get('MaintenanceStore');
}}, {key: 'getIncident', value: value_96698}, {key: 'getScheduledMaintenance', value: value_96699}]);
function MaintenanceStore() { // fn#96696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12794:405, offset: 0x00ec62ac, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, MaintenanceStore);
const value3 = env1_5(MaintenanceStore);
return env1_4(this, _isNativeReflectConstruct_96692() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_96698() { // fn#96698, offset: 0x00fbd9cb, size: 9 bytes, params: 1, frame: 1
return env1_7;
}
function value_96699() { // fn#96699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12794:825, offset: 0x02163b13, size: 161 bytes, params: 1, frame: 15
var r0;
var Date;
var value4;
var date;
const binding = env1_8;
const value2 = null;
const value3 = undefined;
const scheduled_until = value2 == binding ? value3 : binding.scheduled_until;
if (value2 != env1_8) {
if (env1_8.id === env1_9) {
r0 = value2;
} else if (value2 == (value2 != scheduled_until ? scheduled_until : value2 == env1_8 ? value3 : env1_8.scheduled_for)) {
r0 = env1_8;
} else {
Date = global.Date;
value4 = Date.now();
Date = global.Date;
date = new Date();
r0 = value4 < date.getTime() ? env1_8 : value2;
}
} else {
r0 = value2;
}
return r0;
}
}
function STATUS_PAGE_SCHEDULED_MAINTENANCE_ACK() { // fn#96703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12794:1329, offset: 0x02163be0, size: 81 bytes, params: 1, frame: 14
if (env0_8 == null) {
return false;
}
id = env0_8.id;
const Storage = (StorageModule).Storage;
Storage.set('MaintenanceStore', id);
}
}
global.__d(_fun96691, 12604, [6, 7, 15, 17, 18, 587, 566, 694,
2]) /* metro module 12604, dependencies: [6, 7, 15, 17, 18, 587, 566, 694, 2] */;