Files
discord-decomp/sources/by-id/module-00847.js
T
2026-07-28 01:06:53 +03:00

108 lines
5.9 KiB
JavaScript

/* Metro module 847; source: unknown; dependencies: [840, 830] */
import * as GLOBAL_OBJModule from './module-00830-GLOBAL_OBJ.js'; /* Metro dependency 830 */
import * as Module00840Module from './module-00840.js'; /* Metro dependency 840 */
function _fun9158(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#9158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:974:6, offset: 0x00d5edf6, size: 110 bytes, params: 8, frame: 18
const env0_0 = require;
const dateTimestampInSeconds2 = dateTimestampInSeconds;
const Object = global.Object;
const defineProperty = Object.defineProperty;
const Symbol = global.Symbol;
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
exports.browserPerformanceTimeOrigin = browserPerformanceTimeOrigin;
exports.dateTimestampInSeconds = dateTimestampInSeconds2;
exports.timestampInSeconds = timestampInSeconds;
function dateTimestampInSeconds() { // fn#9159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:974:97, offset: 0x00d5ee64, size: 46 bytes, params: 1, frame: 11
let value = Module00840Module;
value = value.safeDateNow();
return value / 1000;
}
function browserPerformanceTimeOrigin() { // fn#9160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:974:206, offset: 0x00d5ee92, size: 36 bytes, params: 1, frame: 10
env0_3 = env0_3 === null ? getBrowserTimeOrigin() : env0_3;
return env0_3;
function getBrowserTimeOrigin() { // fn#9161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:974:266, owner: browserPerformanceTimeOrigin.getBrowserTimeOrigin, offset: 0x00d5eeb6, size: 240 bytes, params: 1, frame: 18
var environment;
var navigationStart;
var value3;
var timeOrigin;
var timing;
let value = environment.__proto__;
const value2 = undefined;
const GLOBAL_OBJ = (GLOBAL_OBJModule).GLOBAL_OBJ;
const performance = GLOBAL_OBJ.performance;
if (performance != null) {
if (performance.now) {
value = require(840) /* metro dependency 840 */;
value = value.withRandomSafeContext(function() {
return performance.now();
});
value3 = (require(840) /* metro dependency 840 */).safeDateNow();
timeOrigin = performance.timeOrigin;
if (typeof timeOrigin !== 'number') {
timing = performance.timing;
navigationStart = timing == null ? value2 : timing.navigationStart;
return typeof navigationStart !== 'number' ? value3 - value : global.Math.abs(navigationStart + value - value3) < 300000 ? navigationStart : value3 - value;
}
if (global.Math.abs(timeOrigin + value - value3) < 300000) {
return timeOrigin;
}
timing = performance.timing;
navigationStart = timing == null ? value2 : timing.navigationStart;
return typeof navigationStart !== 'number' ? value3 - value : global.Math.abs(navigationStart + value - value3) < 300000 ? navigationStart : value3 - value;
}
}
return value2;
}
}
function timestampInSeconds() { // fn#9163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:974:694, offset: 0x00d5efb8, size: 44 bytes, params: 1, frame: 10
return (env0_2 ?? (() => {
var performance = (require(830) /* metro dependency 830 */).GLOBAL_OBJ.performance;
var env0_0 = performance;
if (performance != null) {
if (performance.now) {
if (performance.timeOrigin) {
var env0_1 = performance.timeOrigin;
return _fun9165;
}
return dateTimestampInSeconds;
}
}
return dateTimestampInSeconds;
})())();
function createUnixTimestampInSecondsFunc() { // fn#9164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:974:743, owner: timestampInSeconds.createUnixTimestampInSecondsFunc, offset: 0x00d5efe4, size: 89 bytes, params: 1, frame: 13
var timeOrigin;
const GLOBAL_OBJ = (GLOBAL_OBJModule).GLOBAL_OBJ;
const performance = GLOBAL_OBJ.performance;
if (performance != null) {
if (performance.now) {
timeOrigin = performance.timeOrigin;
if (timeOrigin) {
timeOrigin = performance.timeOrigin;
return _fun9165;
}
return dateTimestampInSeconds;
}
}
return dateTimestampInSeconds;
function _fun9165() { // fn#9165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:974:914, offset: 0x00d5f03d, size: 65 bytes, params: 1, frame: 12
var environment;
const timeOriginBinding = timeOrigin;
let value = environment.__proto__.__proto__;
value = timeOriginBinding + Reflect.apply((require(840) /* metro dependency 840 */).withRandomSafeContext, value,
[function() {
return performance.now();
}]);
return value / 1000;
}
}
}
}
global.__d(_fun9158, 847, [840, 830]) /* metro module 847, dependencies: [840, 830] */;