2627 lines
105 KiB
TypeScript
2627 lines
105 KiB
TypeScript
/* Metro module 6731; source: utils/web/DesktopNativeUtils.tsx; dependencies: [57, 5, 661, 44, 4044, 1471, 477, 587, 6732, 4269, 4, 6733, 507, 4292, 2] */
|
|
function _fun52879(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#52879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:6, offset: 0x013390dc, size: 2615 bytes, params: 8, frame: 29
|
|
var app;
|
|
let env0_0 = require;
|
|
const _arrayLikeToArray_52882 = function(a0, a1) {
|
|
var r0;
|
|
var r1;
|
|
var r2;
|
|
var value3;
|
|
var length;
|
|
var value5;
|
|
var value = undefined;
|
|
var value2 = value == null;
|
|
reducibleJoin2: while (true) {
|
|
if (value2) {
|
|
r0 = value2;
|
|
break reducibleJoin2;
|
|
}
|
|
value3 = value > a0.length;
|
|
r0 = value3;
|
|
break reducibleJoin2;
|
|
}
|
|
reducibleJoin4: while (true) {
|
|
if (r0) {
|
|
length = a0.length;
|
|
r1 = length;
|
|
break reducibleJoin4;
|
|
}
|
|
r1 = value;
|
|
break reducibleJoin4;
|
|
}
|
|
value = (0, global.Array)(r1);
|
|
var value4 = 0;
|
|
if (value4 < r1) {
|
|
r2 = value4;
|
|
reducibleLoop5: while (true) {
|
|
value[r2] = a0[r2];
|
|
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
if (value5 < r1) {
|
|
r2 = value5;
|
|
continue reducibleLoop5;
|
|
}
|
|
break reducibleLoop5;
|
|
}
|
|
}
|
|
return value;
|
|
};
|
|
const closure = sanitizeFilename;
|
|
const closure2 = function() {
|
|
return _getFileData.apply(this, arguments);
|
|
};
|
|
const closure3 = function(a0) {
|
|
return getFileData_52884(a0);
|
|
};
|
|
const closure4 = decideFileExtension;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
|
const env0_4 = importDefault(5) /* metro dependency 5 */;
|
|
const env0_5 = (require(661) /* metro dependency 661: Constants */).NativeFeatures;
|
|
const DiscordNative = global.window.DiscordNative;
|
|
let Set = global.Set;
|
|
let set = new Set(['jpg', 'jpeg', 'jfif', 'png']);
|
|
Set = global.Set;
|
|
set = new Set(['jpg', 'jpeg', 'jfif', 'png', 'webp', 'gif', 'tiff', 'bmp', 'avif']);
|
|
var env0_9;
|
|
var env0_10;
|
|
var env0_11;
|
|
const env0_12 = {};
|
|
const env0_14 = {};
|
|
if (DiscordNative != null) {
|
|
app = DiscordNative.app;
|
|
set = app.getVersion();
|
|
set = set.split('.');
|
|
env0_9 = set.map(function(a0) {
|
|
return (0, global.parseInt)(a0);
|
|
});
|
|
app = DiscordNative.app;
|
|
env0_11 = app.getModuleVersions();
|
|
app = DiscordNative.app;
|
|
env0_10 = app.getBuildNumber();
|
|
}
|
|
Set = global.Set;
|
|
Object.create(Set.prototype, {constructor: {value: Set}});
|
|
new Set(['discord_erlpack', 'discord_game_utils', 'discord_rpc', 'discord_spellcheck', 'discord_utils',
|
|
'discord_voice']);
|
|
const env0_18 = RegExp('[<>:"/\\\\|?*@]', 'g');
|
|
const env0_19 = RegExp('(\\.[a-zA-Z0-9]+):[^.]*$', '');
|
|
const env0_20 = RegExp('(\\.[a-zA-Z0-9]+)%3A.+$', '');
|
|
const env0_21 = RegExp('[^a-zA-Z0-9]', 'g');
|
|
const env0_22 = RegExp('\\.[^.]*$', '');
|
|
const object = {Camera: 0};
|
|
object[0] = 'Camera';
|
|
object.Microphone = 1;
|
|
object[1] = 'Microphone';
|
|
object.Photo = 2;
|
|
object[2] = 'Photo';
|
|
object.InputMonitoring = 3;
|
|
object[3] = 'InputMonitoring';
|
|
object.ScreenRecording = 4;
|
|
object[4] = 'ScreenRecording';
|
|
const object4 = {requireModule: requireModule_52893, ensureModule: ensureModule};
|
|
Object.defineProperty(object4, 'canBootstrapNewUpdater', {get: _fun52895, set: undefined, enumerable: true,
|
|
configurable: true});
|
|
object4.getCrashReporterMetadata = function() {
|
|
return DiscordNative.crashReporter.getMetadata();
|
|
};
|
|
object4.getSetting = getSetting;
|
|
object4.beforeUnload = beforeUnload;
|
|
object4.inputEventRegister = function(a0, a1, a2, a3) {
|
|
this.getDiscordUtils().inputEventRegister(global.parseInt('' + a0), a1.map(_fun52902), a2, a3);
|
|
};
|
|
object4.inputEventUnregister = function(a0) {
|
|
this.getDiscordUtils().inputEventUnregister((0, global.parseInt)(a0));
|
|
};
|
|
object4.setOnInputEventCallback = setOnInputEventCallback;
|
|
object4.setFocused = function(a0) {
|
|
this.getDiscordUtils().inputSetFocused(a0);
|
|
};
|
|
object4.setObservedGamesCallback = setObservedGamesCallback;
|
|
object4.setProcessObserverCollectExecutableFingerprint = function(a0) {
|
|
var value = this.getDiscordUtils();
|
|
var setProcessObserverCollectExecutableFingerprint = value.setProcessObserverCollectExecutableFingerprint;
|
|
if (setProcessObserverCollectExecutableFingerprint != null) {
|
|
setProcessObserverCollectExecutableFingerprint.call(value, a0);
|
|
}
|
|
};
|
|
object4.getExecutableFingerprintForProcess = function(a0) {
|
|
var env0_0 = this;
|
|
var env0_1 = a0;
|
|
var Promise = global.Promise;
|
|
var value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
|
var value2 = new Promise(_fun52912);
|
|
return value2 instanceof Object ? value2 : value;
|
|
};
|
|
object4.setGameDetectionCallback = function(a0) {
|
|
var env0_0 = a0;
|
|
var value = this.getDiscordUtils();
|
|
var setGameDetectionCallback = value.setGameDetectionCallback;
|
|
if (setGameDetectionCallback != null) {
|
|
setGameDetectionCallback.call(value, _fun52915);
|
|
}
|
|
};
|
|
object4.setGameDetectionErrorCallback = function(a0) {
|
|
var value = this.getDiscordUtils();
|
|
var setGameDetectionErrorCallback = value.setGameDetectionErrorCallback;
|
|
if (setGameDetectionErrorCallback != null) {
|
|
setGameDetectionErrorCallback.call(value, a0);
|
|
}
|
|
};
|
|
object4.setRobloxSubgameDetectionConfig = function(a0, a1) {
|
|
var value = this.getDiscordUtils();
|
|
var setRobloxSubgameDetectionConfig = value.setRobloxSubgameDetectionConfig;
|
|
if (setRobloxSubgameDetectionConfig != null) {
|
|
setRobloxSubgameDetectionConfig.call(value, a0, a1);
|
|
}
|
|
};
|
|
object4.checkForRobloxSubgameUpdate = function() {
|
|
var value = this.getDiscordUtils();
|
|
var checkForRobloxSubgameUpdate = value.checkForRobloxSubgameUpdate;
|
|
if (checkForRobloxSubgameUpdate != null) {
|
|
checkForRobloxSubgameUpdate.call(value);
|
|
}
|
|
};
|
|
object4.setCandidateGamesCallback = function(a0) {
|
|
var env0_0 = a0;
|
|
this.getDiscordUtils().setCandidateGamesCallback(_fun52922);
|
|
};
|
|
object4.clearCandidateGamesCallback = function() {
|
|
this.getDiscordUtils().clearCandidateGamesCallback();
|
|
};
|
|
object4.setGameCandidateOverrides = function(a0) {
|
|
this.getDiscordUtils().setGameCandidateOverrides(a0.map(_fun52926));
|
|
};
|
|
object4.setObserverDebugCallback = function(a0, a1, a2) {
|
|
var env0_0 = a0;
|
|
this.getDiscordUtils().setObserverDebugCallback(_fun52928, a1, a2);
|
|
};
|
|
object4.clearObserverDebugCallback = function() {
|
|
var value = this.getDiscordUtils();
|
|
var NONE = require(dependencyMap[9]).GameDetectionDebugLevel.NONE;
|
|
value.setObserverDebugCallback(null, NONE, 0);
|
|
};
|
|
object4.shouldDisplayNotifications = function() {
|
|
return this.getDiscordUtils().shouldDisplayNotifications();
|
|
};
|
|
object4.getVoiceEngine = getVoiceEngine_52931;
|
|
object4.getDiscordUtils = getDiscordUtils;
|
|
object4.isSystemDarkMode = isSystemDarkMode;
|
|
object4.getDiscordIsElevated = getDiscordIsElevated_52935;
|
|
object4.getGameUtils = function() {
|
|
return this.requireModule('discord_game_utils');
|
|
};
|
|
object4.getCloudSync = function() {
|
|
return this.requireModule('discord_cloudsync');
|
|
};
|
|
object4.getDispatch = function() {
|
|
return this.requireModule('discord_dispatch');
|
|
};
|
|
object4.setBadge = setBadge;
|
|
object4.setSystemTrayIcon = function(a0) {
|
|
if (require(dependencyMap[6]).isPlatformEmbedded) {
|
|
this.sendIPC(require(dependencyMap[11]).IPCEvents.SYSTEM_TRAY_SET_ICON, a0);
|
|
}
|
|
};
|
|
object4.setThumbarButtons = setThumbarButtons;
|
|
object4.bounceDock = bounceDock;
|
|
object4.setSystemTrayApplications = function(a0) {
|
|
if (require(dependencyMap[6]).isPlatformEmbedded) {
|
|
this.sendIPC(require(dependencyMap[11]).IPCEvents.SYSTEM_TRAY_SET_APPLICATIONS, a0);
|
|
}
|
|
};
|
|
Object.defineProperty(object4, 'architecture', {get: function() {
|
|
return require(dependencyMap[6]).isPlatformEmbedded ? DiscordNative.process.arch : '';
|
|
}, set: undefined, enumerable: true, configurable: true});
|
|
Object.defineProperty(object4, 'releaseChannel', {get: _fun52947, set: undefined, enumerable: true,
|
|
configurable: true});
|
|
Object.defineProperty(object4, 'version', {get: _fun52948, set: undefined, enumerable: true, configurable: true});
|
|
Object.defineProperty(object4, 'buildNumber', {get: _fun52949, set: undefined, enumerable: true,
|
|
configurable: true});
|
|
Object.defineProperty(object4, 'moduleVersions', {get: _fun52950, set: undefined, enumerable: true,
|
|
configurable: true});
|
|
Object.defineProperty(object4, 'parsedOSRelease', {get: _fun52951, set: undefined, enumerable: true,
|
|
configurable: true});
|
|
object4.copy = function(a0) {
|
|
if (require(dependencyMap[6]).isPlatformEmbedded) {
|
|
DiscordNative.clipboard.copy(a0);
|
|
}
|
|
};
|
|
object4.copyImage = copyImage;
|
|
object4.copyImageBlob = copyImageBlob;
|
|
object4.canSaveImage = canSaveImage;
|
|
object4.saveImage = saveImage;
|
|
object4.saveFile = saveFile;
|
|
object4.downloadMLModelFile = downloadMLModelFile;
|
|
object4.stopMLModelDownloads = function() {
|
|
DiscordNative.fileManager.stopMLModelDownloads();
|
|
};
|
|
object4.canCheckMLModelFilesExist = function() {
|
|
return typeof DiscordNative.fileManager.checkMLModelFilesExist === 'function';
|
|
};
|
|
object4.checkMLModelFilesExist = checkMLModelFilesExist;
|
|
object4.cleanupUnusedMLModelFiles = cleanupUnusedMLModelFiles;
|
|
object4.downloadClipsFile = downloadClipsFile;
|
|
object4.canCheckClipsFilesExist = function() {
|
|
return typeof DiscordNative.fileManager.checkClipsFilesExist === 'function';
|
|
};
|
|
object4.checkClipsFilesExist = checkClipsFilesExist;
|
|
object4.cleanupUnusedClipsFiles = cleanupUnusedClipsFiles;
|
|
object4.getClipsDataDirSync = function() {
|
|
return DiscordNative.fileManager.getClipsDataDirSync();
|
|
};
|
|
object4.downloadOpenH264 = downloadOpenH264;
|
|
object4.cleanupUnusedOpenH264Files = cleanupUnusedOpenH264Files;
|
|
object4.getOpenH264LibraryPath = getOpenH264LibraryPath_52995;
|
|
object4.canCopyImage = canCopyImage;
|
|
object4.cut = function() {
|
|
if (require(dependencyMap[6]).isPlatformEmbedded) {
|
|
DiscordNative.clipboard.cut();
|
|
}
|
|
};
|
|
object4.paste = function() {
|
|
if (require(dependencyMap[6]).isPlatformEmbedded) {
|
|
DiscordNative.clipboard.paste();
|
|
}
|
|
};
|
|
object4.readClipboard = readClipboard;
|
|
object4.clipboardHasMixedContent = clipboardHasMixedContent;
|
|
object4.on = function(a0, a1) {
|
|
DiscordNative.ipc.on(a0, a1);
|
|
};
|
|
object4.onIPC = function(a0, a1) {
|
|
DiscordNative.ipc.on(a0, a1);
|
|
};
|
|
object4.invoke = function(a0, a1) {
|
|
var r7;
|
|
var value = copyRestArgs(1, r7);
|
|
var ipc = DiscordNative.ipc;
|
|
var invoke = ipc.invoke;
|
|
var items = [a0];
|
|
arraySpread(items, value, 1, a0);
|
|
return apply(invoke, items, ipc, a0);
|
|
};
|
|
object4.invokeIPC = function(a0, a1) {
|
|
var r7;
|
|
var value = copyRestArgs(1, r7);
|
|
var ipc = DiscordNative.ipc;
|
|
var invoke = ipc.invoke;
|
|
var items = [a0];
|
|
arraySpread(items, value, 1, a0);
|
|
return apply(invoke, items, ipc, a0);
|
|
};
|
|
object4.send = function(a0, a1) {
|
|
var r7;
|
|
var value = copyRestArgs(1, r7);
|
|
var ipc = DiscordNative.ipc;
|
|
var send = ipc.send;
|
|
var items = [a0];
|
|
arraySpread(items, value, 1, a0);
|
|
apply(send, items, ipc, a0);
|
|
};
|
|
object4.sendIPC = function(a0, a1) {
|
|
var r7;
|
|
var value = copyRestArgs(1, r7);
|
|
var ipc = DiscordNative.ipc;
|
|
var send = ipc.send;
|
|
var items = [a0];
|
|
arraySpread(items, value, 1, a0);
|
|
apply(send, items, ipc, a0);
|
|
};
|
|
object4.isIPCReady = isIPCReady;
|
|
object4.waitForIPCReady = waitForIPCReady;
|
|
object4.flashFrame = function(a0) {
|
|
DiscordNative.window.flashFrame(a0);
|
|
};
|
|
object4.webAuthnRegister = webAuthnRegister;
|
|
object4.webAuthnAuthenticate = webAuthnAuthenticate;
|
|
object4.minimize = function(a0) {
|
|
DiscordNative.window.minimize(a0);
|
|
};
|
|
object4.restore = function(a0) {
|
|
DiscordNative.window.restore(a0);
|
|
};
|
|
object4.maximize = function(a0) {
|
|
DiscordNative.window.maximize(a0);
|
|
};
|
|
object4.focus = focus_53022;
|
|
object4.blur = function() {
|
|
if (require(dependencyMap[6]).isPlatformEmbedded) {
|
|
if (DiscordNative.window.blur != null) {
|
|
DiscordNative.window.blur();
|
|
} else {
|
|
global.window.blur();
|
|
}
|
|
} else {
|
|
global.window.blur();
|
|
}
|
|
};
|
|
object4.fullscreen = function(a0) {
|
|
DiscordNative.window.fullscreen(a0);
|
|
};
|
|
object4.close = function(a0) {
|
|
DiscordNative.window.close(a0);
|
|
};
|
|
object4.clearNavigationHistory = function() {
|
|
backwardCompatSend(require(dependencyMap[11]).IPCEvents.NAVIGATION_HISTORY_CLEAR);
|
|
};
|
|
object4.setAlwaysOnTop = function(a0, a1) {
|
|
if (typeof DiscordNative.window.setAlwaysOnTop === 'function') {
|
|
DiscordNative.window.setAlwaysOnTop(a0, a1);
|
|
}
|
|
};
|
|
object4.isAlwaysOnTop = isAlwaysOnTop;
|
|
object4.showInactive = function(a0) {
|
|
var value2 = undefined;
|
|
if (typeof (DiscordNative == null || DiscordNative.window == null ? value2 : DiscordNative.window.showInactive) === 'function') {
|
|
DiscordNative.window.showInactive(a0);
|
|
}
|
|
return value2;
|
|
};
|
|
object4.setMinimumSize = setMinimumSize;
|
|
object4.setTrafficLightPosition = setTrafficLightPosition;
|
|
object4.purgeMemory = function() {
|
|
if (require(dependencyMap[6]).isPlatformEmbedded) {
|
|
DiscordNative.processUtils.purgeMemory();
|
|
}
|
|
};
|
|
object4.updateCrashReporter = function(a0) {
|
|
DiscordNative.crashReporter.updateCrashReporter(a0);
|
|
};
|
|
object4.triggerJSException = function(a0) {
|
|
DiscordNative.crashReporter.triggerJSException(a0);
|
|
};
|
|
object4.flushDNSCache = function() {
|
|
if (require(dependencyMap[6]).isPlatformEmbedded) {
|
|
DiscordNative.processUtils.flushDNSCache();
|
|
}
|
|
};
|
|
object4.supportsFeature = function(a0) {
|
|
return DiscordNative.features.supports(a0);
|
|
};
|
|
object4.getEnableHardwareAcceleration = getEnableHardwareAcceleration;
|
|
object4.setEnableHardwareAcceleration = function(a0) {
|
|
DiscordNative.gpuSettings.setEnableHardwareAcceleration(a0);
|
|
};
|
|
object4.setOpenH264Enabled = setOpenH264Enabled;
|
|
object4.setChromiumSwitches = function(a0) {
|
|
DiscordNative.gpuSettings.setChromiumSwitches(a0);
|
|
};
|
|
object4.setSetting = function(a0, a1) {
|
|
if (DiscordNative.gpuSettings.setSetting != null) {
|
|
DiscordNative.gpuSettings.setSetting(a0, a1);
|
|
}
|
|
};
|
|
object4.getOpenOnStart = getOpenOnStart;
|
|
object4.getGPUDriverVersions = getGPUDriverVersions;
|
|
object4.setZoomFactor = setZoomFactor_53048;
|
|
object4.setBackgroundThrottling = function(a0) {
|
|
if (DiscordNative.window.setBackgroundThrottling != null) {
|
|
DiscordNative.window.setBackgroundThrottling(a0);
|
|
} else {
|
|
DiscordNative.window.webContents.setBackgroundThrottling(a0);
|
|
}
|
|
};
|
|
object4.setFocusable = function(a0, a1) {
|
|
if (typeof DiscordNative.window.setFocusable === 'function') {
|
|
DiscordNative.window.setFocusable(a0, a1);
|
|
}
|
|
};
|
|
object4.pauseFrameEvictor = function() {
|
|
if (DiscordNative.app.pauseFrameEvictor != null) {
|
|
DiscordNative.app.pauseFrameEvictor();
|
|
}
|
|
};
|
|
object4.unpauseFrameEvictor = function() {
|
|
if (DiscordNative.app.unpauseFrameEvictor != null) {
|
|
DiscordNative.app.unpauseFrameEvictor();
|
|
}
|
|
};
|
|
object4.getPreferredSystemLanguages = getPreferredSystemLanguages;
|
|
object4.getPidFromDesktopSource = getPidFromDesktopSource_53054;
|
|
object4.getDesktopSourceFromPid = getDesktopSourceFromPid;
|
|
object4.generateSessionFromPid = function(a0) {
|
|
return this.getDiscordUtils().generateSessionFromPid(a0);
|
|
};
|
|
object4.getAudioPid = function(a0) {
|
|
var r0;
|
|
var value = a0;
|
|
var getAudioPid = this.getDiscordUtils().getAudioPid;
|
|
if (getAudioPid == null) {
|
|
r0 = value;
|
|
} else if (value == null) {
|
|
r0 = value;
|
|
} else {
|
|
value = this.getDiscordUtils().getAudioPid(value);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
};
|
|
object4.setForegroundProcess = function(a0) {
|
|
var r0;
|
|
var value;
|
|
var error;
|
|
var setForegroundProcess = this.getDiscordUtils().setForegroundProcess;
|
|
try {
|
|
value = setForegroundProcess != null;
|
|
if (value) {
|
|
value = setForegroundProcess(a0);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
} catch (error) {
|
|
return false;
|
|
}
|
|
return r0;
|
|
};
|
|
object4.getDiscordMemoryUsage = function() {
|
|
var getDiscordMemoryUsage = this.getDiscordUtils().getDiscordMemoryUsage;
|
|
var value = null;
|
|
return value != getDiscordMemoryUsage ? getDiscordMemoryUsage() : value;
|
|
};
|
|
object4.getDiscordMemoryUsageElectronRenderer = function() {
|
|
var getDiscordMemoryUsageElectronRenderer = this.getDiscordUtils().getDiscordMemoryUsageElectronRenderer;
|
|
return getDiscordMemoryUsageElectronRenderer?.();
|
|
};
|
|
object4.getDiscordMemoryPrivateUsageElectronRenderer = function() {
|
|
var getDiscordMemoryPrivUsageElectronRenderer = this.getDiscordUtils().getDiscordMemoryPrivUsageElectronRenderer;
|
|
return getDiscordMemoryPrivUsageElectronRenderer?.();
|
|
};
|
|
object4.getDiscordMemoryUsageElectronProcessTypeDetails = function() {
|
|
var getDiscordMemoryUsageElectronProcessTypeDetails = this.getDiscordUtils().getDiscordMemoryUsageElectronProcessTypeDetails;
|
|
return getDiscordMemoryUsageElectronProcessTypeDetails?.();
|
|
};
|
|
object4.enablePerfMemoryHooks = function(a0) {
|
|
return this.getDiscordUtils().enablePerfMemoryHooks?.(a0);
|
|
};
|
|
object4.disablePerfMemoryHooks = function() {
|
|
return this.getDiscordUtils().disablePerfMemoryHooks?.();
|
|
};
|
|
object4.getPerfAttributedMemory = function() {
|
|
var getPerfAttributedMemory = this.getDiscordUtils().getPerfAttributedMemory;
|
|
return getPerfAttributedMemory?.();
|
|
};
|
|
object4.getPerfAttributedMemoryCallstacks = function(a0) {
|
|
var getPerfAttributedMemoryCallstacks = this.getDiscordUtils().getPerfAttributedMemoryCallstacks;
|
|
return getPerfAttributedMemoryCallstacks?.(a0);
|
|
};
|
|
object4.getPerfAttributedMemoryStats = function() {
|
|
var getPerfAttributedMemoryStats = this.getDiscordUtils().getPerfAttributedMemoryStats;
|
|
return getPerfAttributedMemoryStats?.();
|
|
};
|
|
object4.startCPUProfiling = function(a0) {
|
|
return this.getDiscordUtils().startCPUProfiling?.(a0);
|
|
};
|
|
object4.stopCPUProfiling = stopCPUProfiling;
|
|
object4.gzipAndBase64Encode = function(a0) {
|
|
var r0;
|
|
r0 = this.getDiscordUtils().gzipAndBase64Encode?.(a0);
|
|
r0 = r0 ?? global.Promise.resolve(null);
|
|
return r0;
|
|
};
|
|
object4.showOpenDialog = function(a0) {
|
|
return DiscordNative.fileManager.showOpenDialog({properties: a0});
|
|
};
|
|
object4.flushStorageData = flushStorageData;
|
|
object4.flushCookies = flushCookies_53077;
|
|
object4.setCrashInformation = function(a0, a1) {
|
|
var value2 = undefined;
|
|
if (require(dependencyMap[6]).isPlatformEmbedded && (DiscordNative == null || DiscordNative.processUtils == null ? value2 : DiscordNative.processUtils.setCrashInformation) != null) {
|
|
DiscordNative.processUtils.setCrashInformation(a0, a1);
|
|
}
|
|
return value2;
|
|
};
|
|
object4.blockDisplaySleep = blockDisplaySleep;
|
|
object4.unblockDisplaySleep = function(a0) {
|
|
if (require(dependencyMap[6]).isPlatformEmbedded && DiscordNative.powerSaveBlocker != null) {
|
|
DiscordNative.powerSaveBlocker.unblockDisplaySleep(a0);
|
|
}
|
|
};
|
|
object4.cleanupDisplaySleep = function() {
|
|
if (require(dependencyMap[6]).isPlatformEmbedded && DiscordNative.powerSaveBlocker != null) {
|
|
DiscordNative.powerSaveBlocker.cleanupDisplaySleep();
|
|
}
|
|
};
|
|
object4.relaunch = function() {
|
|
if (require(dependencyMap[6]).isPlatformEmbedded) {
|
|
DiscordNative.app.relaunch();
|
|
}
|
|
};
|
|
object4.makeChunkedRequest = makeChunkedRequest;
|
|
object4.submitLiveCrashReport = submitLiveCrashReport_53088;
|
|
object4.crash = function(a0) {
|
|
var r0;
|
|
var crash = this.getDiscordUtils().crash;
|
|
var value = crash != null;
|
|
if (value) {
|
|
crash(a0);
|
|
r0 = true;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
};
|
|
object4.setApplicationBackgroundColor = function(a0) {
|
|
var SETTINGS_UPDATE_BACKGROUND_COLOR = require(dependencyMap[11]).IPCEvents.SETTINGS_UPDATE_BACKGROUND_COLOR;
|
|
this.sendIPC(SETTINGS_UPDATE_BACKGROUND_COLOR, a0);
|
|
};
|
|
object4.initializeExitHook = function() {
|
|
var initializeExitHook = this.getDiscordUtils().initializeExitHook;
|
|
if (initializeExitHook != null) {
|
|
initializeExitHook();
|
|
}
|
|
};
|
|
object4.initializeWERHandler = function() {
|
|
var initializeWERHandler = this.getDiscordUtils().initializeWERHandler;
|
|
if (initializeWERHandler != null) {
|
|
initializeWERHandler();
|
|
}
|
|
};
|
|
object4.pollQueueMetrics = function(a0) {
|
|
var pollQueueMetrics = this.getDiscordUtils().pollQueueMetrics;
|
|
if (pollQueueMetrics != null) {
|
|
pollQueueMetrics(a0);
|
|
}
|
|
};
|
|
object4.asyncify = function(a0) {
|
|
var env0_0 = a0;
|
|
var Promise = global.Promise;
|
|
var value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
|
var value2 = new Promise(_fun53095);
|
|
return value2 instanceof Object ? value2 : value;
|
|
};
|
|
object4.IsGameDisplayModeUpdateSupported = function() {
|
|
return this.getDiscordUtils().gameDisplayModeUpdate != null;
|
|
};
|
|
object4.GameDisplayModeUpdate = function(a0) {
|
|
var gameDisplayModeUpdate = this.getDiscordUtils().gameDisplayModeUpdate;
|
|
return gameDisplayModeUpdate != null && a0 != null && gameDisplayModeUpdate(a0);
|
|
};
|
|
object4.GameDisplayModeIsGameSupported = function(a0) {
|
|
var gameDisplayModeIsSupported = this.getDiscordUtils().gameDisplayModeIsSupported;
|
|
return gameDisplayModeIsSupported != null && a0 != null && gameDisplayModeIsSupported(a0);
|
|
};
|
|
object4.GetWindowFullscreenTypeByPid = function(a0, a1, a2) {
|
|
var r2;
|
|
var value = a2;
|
|
var property = this.getDiscordUtils().getWindowFullscreenTypeByPid;
|
|
var value2 = null;
|
|
r2 = a0 === 0 ? value2 : value2 != property && value2 != a1 ? property(a0, a1) : value2;
|
|
r2 = r2 === -1 ? value2 : r2;
|
|
var r0 = value2 == r2 ? value : r2;
|
|
r0 = value2 == r0 ? require(dependencyMap[4]).RunningProcessFullscreenType.UNKNOWN : r0;
|
|
return r0;
|
|
};
|
|
object4.GetWindowFullscreenTypeExtraByPid = GetWindowFullscreenTypeExtraByPid;
|
|
object4.SetGPUBoostEnabledByPid = function(a0, a1) {
|
|
var setGPUBoostEnabledByPid = this.getDiscordUtils().setGPUBoostEnabledByPid;
|
|
return setGPUBoostEnabledByPid != null && setGPUBoostEnabledByPid(a0, a1);
|
|
};
|
|
object4.SetSystemServicePerformanceMonitorEnabled = function(a0, a1) {
|
|
var setSystemServicePerformanceMonitorEnabled = this.getDiscordUtils().setSystemServicePerformanceMonitorEnabled;
|
|
return setSystemServicePerformanceMonitorEnabled != null && setSystemServicePerformanceMonitorEnabled(a0, a1);
|
|
};
|
|
object4.GetSystemServicePerformanceMonitorSnapshot = GetSystemServicePerformanceMonitorSnapshot;
|
|
object4.IsHardwareAcceleratedGPUSchedulingEnabled = function() {
|
|
var isHardwareAcceleratedGPUSchedulingEnabled = this.getDiscordUtils().isHardwareAcceleratedGPUSchedulingEnabled;
|
|
return isHardwareAcceleratedGPUSchedulingEnabled != null && isHardwareAcceleratedGPUSchedulingEnabled();
|
|
};
|
|
object4.AcquireGlobalLock = function(a0) {
|
|
var acquireGlobalLock = this.getDiscordUtils().acquireGlobalLock;
|
|
if (acquireGlobalLock != null) {
|
|
return acquireGlobalLock(a0);
|
|
}
|
|
};
|
|
object4.SetServiceChannel = function(a0) {
|
|
var setServiceChannel = this.getDiscordUtils().setServiceChannel;
|
|
if (setServiceChannel != null) {
|
|
setServiceChannel(a0);
|
|
}
|
|
};
|
|
object4.IsSystemServiceInstalled = function() {
|
|
var isSystemServiceInstalled = this.getDiscordUtils().isSystemServiceInstalled;
|
|
if (isSystemServiceInstalled != null) {
|
|
return isSystemServiceInstalled();
|
|
}
|
|
};
|
|
object4.CanSystemServiceBeInstalled = function() {
|
|
var canSystemServiceBeInstalled = this.getDiscordUtils().canSystemServiceBeInstalled;
|
|
if (canSystemServiceBeInstalled != null) {
|
|
return canSystemServiceBeInstalled();
|
|
}
|
|
};
|
|
object4.InstallSystemService = function() {
|
|
var r0;
|
|
var value2;
|
|
var property = this.getDiscordUtils().installSystemService;
|
|
if (property != null) {
|
|
r0 = property();
|
|
} else {
|
|
property = global.Promise;
|
|
value2 = new global.Error('System service native not available');
|
|
value2 = property.reject(value2);
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
};
|
|
object4.DoesSystemServiceHaveUpdate = function() {
|
|
var r0;
|
|
var value2;
|
|
var property = this.getDiscordUtils().doesSystemServiceHaveUpdate;
|
|
if (property != null) {
|
|
r0 = property();
|
|
} else {
|
|
property = global.Promise;
|
|
value2 = new global.Error('System service native not available');
|
|
value2 = property.reject(value2);
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
};
|
|
object4.UpdateSystemService = function() {
|
|
var r0;
|
|
var value2;
|
|
var property = this.getDiscordUtils().updateSystemService;
|
|
if (property != null) {
|
|
r0 = property();
|
|
} else {
|
|
property = global.Promise;
|
|
value2 = new global.Error('System service native not available');
|
|
value2 = property.reject(value2);
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
};
|
|
object4.UninstallSystemService = function() {
|
|
var r0;
|
|
var value2;
|
|
var property = this.getDiscordUtils().uninstallSystemService;
|
|
if (property != null) {
|
|
r0 = property();
|
|
} else {
|
|
property = global.Promise;
|
|
value2 = new global.Error('System service native not available');
|
|
value2 = property.reject(value2);
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
};
|
|
object4.InputEventServiceSetStatusCallback = function(a0) {
|
|
var inputEventServiceSetStatusCallback = this.getDiscordUtils().inputEventServiceSetStatusCallback;
|
|
if (inputEventServiceSetStatusCallback != null) {
|
|
inputEventServiceSetStatusCallback(a0);
|
|
}
|
|
};
|
|
object4.InputEventServiceSetAllowed = function(a0) {
|
|
var inputEventServiceSetAllowed = this.getDiscordUtils().inputEventServiceSetAllowed;
|
|
if (inputEventServiceSetAllowed != null) {
|
|
return inputEventServiceSetAllowed(a0);
|
|
}
|
|
};
|
|
object4.ToolServiceSetStatusCallback = function(a0) {
|
|
var toolServiceSetStatusCallback = this.getDiscordUtils().toolServiceSetStatusCallback;
|
|
if (toolServiceSetStatusCallback != null) {
|
|
toolServiceSetStatusCallback(a0);
|
|
}
|
|
};
|
|
object4.ToolServiceSetAllowed = function(a0) {
|
|
var toolServiceSetAllowed = this.getDiscordUtils().toolServiceSetAllowed;
|
|
if (toolServiceSetAllowed != null) {
|
|
return toolServiceSetAllowed(a0);
|
|
}
|
|
};
|
|
object4.isModuleVersionAtLeast = isModuleVersionAtLeast;
|
|
object4.fetchRiotGamesLiveClientData = fetchRiotGamesLiveClientData;
|
|
object4.appViewed = function() {
|
|
if (require(dependencyMap[6]).isDesktop()) {
|
|
global.performance.mark('app_viewed');
|
|
this.sendIPC(require(dependencyMap[11]).IPCEvents.APP_VIEWED);
|
|
}
|
|
};
|
|
object4.appFirstRenderAfterReadyPayload = function() {
|
|
if (require(dependencyMap[6]).isDesktop()) {
|
|
global.performance.mark('app_first_render_after_ready_payload');
|
|
this.sendIPC(require(dependencyMap[11]).IPCEvents.APP_FIRST_RENDER_AFTER_READY_PAYLOAD);
|
|
}
|
|
};
|
|
object4.appLoaded = function() {
|
|
backwardCompatSend(require(dependencyMap[11]).IPCEvents.APP_LOADED);
|
|
};
|
|
object4.indexLoadedAsync = function() {
|
|
backwardCompatSend(require(dependencyMap[11]).IPCEvents.APP_ASYNC_INDEX_TSX_LOADED);
|
|
};
|
|
object4.setUseRequireModuleCache = function(a0) {
|
|
env0_13 = a0;
|
|
};
|
|
object4.GetSystemGpuStats = GetSystemGpuStats;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/web/DesktopNativeUtils.tsx');
|
|
exports.default = object4;
|
|
exports.SaveImageResult = {SAVED: 'saved', CANCELED: 'canceled', ERRORED: 'errored'};
|
|
exports.sanitizeFilename = closure;
|
|
exports.getFileData = closure2;
|
|
exports.getImageData = closure3;
|
|
exports.NativePermissionRequestType = object;
|
|
exports.decideFileExtension = closure4;
|
|
}
|
|
|
|
function _createForOfIteratorHelperLoose_52880(a0, a1) { // fn#52880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:150, offset: 0x01339b13, size: 370 bytes, params: 3, frame: 20
|
|
var r6;
|
|
var r9;
|
|
var r5;
|
|
var value3;
|
|
var regexp;
|
|
const env0_0 = a0;
|
|
const Symbol = global.Symbol;
|
|
let value = typeof Symbol !== 'undefined';
|
|
let r1 = value && a0[global.Symbol.iterator];
|
|
r1 = !r1 ? a0['@@iterator'] : r1;
|
|
if (r1) {
|
|
value = r1.call(a0);
|
|
return value.next.bind(value);
|
|
}
|
|
const Array = global.Array;
|
|
if (Array.isArray(a0)) {
|
|
if (r1) {
|
|
}
|
|
return _fun52881;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_52882(a0, value);
|
|
r5 = value;
|
|
} else {
|
|
value3 = ({}).toString.call(a0).slice(8, -1);
|
|
r6 = value3 === 'Object' && a0.constructor;
|
|
r9 = r6 ? a0.constructor.name : value3;
|
|
if (r9 === 'Map') {
|
|
r6 = global.Array.from(a0);
|
|
} else if (r9 === 'Set') {
|
|
r6 = global.Array.from(a0);
|
|
} else if (r9 === 'Arguments') {
|
|
value = _arrayLikeToArray_52882(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_52882(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun52881;
|
|
}
|
|
const TypeError = global.TypeError;
|
|
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
|
}
|
|
|
|
function sanitizeFilename(a0) { // fn#52883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:1707, offset: 0x01339c85, size: 178 bytes, params: 2, frame: 15
|
|
var decodeURIComponent;
|
|
var value;
|
|
var replace;
|
|
var value2;
|
|
var binding;
|
|
var regexp;
|
|
var error;
|
|
var value3;
|
|
var value4;
|
|
try {
|
|
decodeURIComponent = global.decodeURIComponent;
|
|
value = decodeURIComponent(a0);
|
|
replace = value.replace;
|
|
value2 = environment;
|
|
binding = env0_19;
|
|
value = Reflect.apply(replace, value, [binding, '$1']);
|
|
replace = value.replace;
|
|
regexp = RegExp('(.+)@([a-zA-Z0-9]+)$', '');
|
|
value = Reflect.apply(replace, value, [regexp, '$1.$2']);
|
|
replace = value.replace;
|
|
binding = env0_18;
|
|
value = Reflect.apply(replace, value, [binding, '_']);
|
|
} catch (error) {
|
|
replace = a0.replace;
|
|
value = environment;
|
|
value3 = Reflect.apply(replace, a0, [env0_20, '$1']);
|
|
value4 = value3.replace(RegExp('(.+)%40([a-zA-Z0-9]+)$', ''), '$1.$2');
|
|
return value4.replace(env0_18, '_');
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function _getFileData() { // fn#52885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:2012, offset: 0x01339d37, size: 48 bytes, params: 1, frame: 14
|
|
return env0_4(_fun52887).apply(this, arguments);
|
|
}
|
|
|
|
function normalizeRunningGame(a0) { // fn#52889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:2516, offset: 0x01339e43, size: 402 bytes, params: 2, frame: 18
|
|
let value = a1;
|
|
const r5 = value !== undefined ? value : env0_12;
|
|
const object2 = {};
|
|
let id = a0.id;
|
|
value = null;
|
|
const value2 = '';
|
|
object2.id = r5[value != id ? id : value2];
|
|
const parseInt = global.parseInt;
|
|
id = a0.id;
|
|
object2.nativeProcessObserverId = parseInt(value != id ? id : value2, 10);
|
|
const gameName = a0.gameName;
|
|
object2.name = value != gameName ? gameName : a0.name;
|
|
object2.origGameName = a0.origGameName;
|
|
const name = a0.name;
|
|
object2.processName = value != name ? name : value2;
|
|
object2.hidden = a0.hidden;
|
|
object2.elevated = a0.elevated;
|
|
const sandboxed = a0.sandboxed;
|
|
object2.sandboxed = value != sandboxed && sandboxed;
|
|
object2.lastFocused = a0.lastFocused;
|
|
object2.exePath = a0.exePath;
|
|
object2.exeName = a0.exeName;
|
|
object2.cmdLine = a0.cmdLine;
|
|
object2.distributor = a0.distributor;
|
|
object2.sku = a0.sku;
|
|
object2.pid = a0.pid;
|
|
const pidPath = a0.pidPath;
|
|
object2.pidPath = value != pidPath ? pidPath : [];
|
|
object2.gameMetadata = a0.gameMetadata;
|
|
const windowHandle = a0.windowHandle;
|
|
object2.windowHandle = value != windowHandle ? windowHandle : value;
|
|
const fullscreenType = a0.fullscreenType;
|
|
object2.fullscreenType = value != fullscreenType ? fullscreenType : (require(4044) /* metro dependency 4044: Client */).RunningProcessFullscreenType.UNKNOWN;
|
|
const isLauncher = a0.isLauncher;
|
|
value = value != isLauncher;
|
|
object2.isLauncher = value && isLauncher;
|
|
object2.executableFingerprint = a0.executableFingerprint;
|
|
return object2;
|
|
}
|
|
|
|
function decideFileExtension(a0, a1) { // fn#52890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:3239, offset: 0x01339fd5, size: 239 bytes, params: 3, frame: 16
|
|
var r0;
|
|
var r2;
|
|
var value;
|
|
var property;
|
|
var value2;
|
|
var pathname;
|
|
var value3;
|
|
var value4;
|
|
if (a1 != null) {
|
|
if (a1.startsWith('image/')) {
|
|
value = a1.split('/');
|
|
property = value[1];
|
|
value = undefined;
|
|
r0 = property == null ? value : property.toLowerCase();
|
|
if (r0 === 'jpeg') {
|
|
return 'jpg';
|
|
}
|
|
if (r0 != null) {
|
|
return r0;
|
|
}
|
|
value = undefined;
|
|
value2 = (importDefault(1471) /* metro dependency 1471: URLUtils */).toURLSafe(a0);
|
|
if (value2 != null) {
|
|
pathname = value2.pathname;
|
|
if (pathname == null) {
|
|
r2 = value;
|
|
} else {
|
|
value3 = pathname.split('.');
|
|
if (value3 == null) {
|
|
r2 = value;
|
|
} else {
|
|
value4 = value3.pop();
|
|
r2 = value4 == null ? value : value4.toLowerCase();
|
|
}
|
|
}
|
|
return r2 != null && r2.length <= 5 ? r2 : value;
|
|
}
|
|
return value;
|
|
}
|
|
}
|
|
value = undefined;
|
|
value2 = (importDefault(1471) /* metro dependency 1471: URLUtils */).toURLSafe(a0);
|
|
if (value2 != null) {
|
|
pathname = value2.pathname;
|
|
if (pathname == null) {
|
|
r2 = value;
|
|
} else {
|
|
value3 = pathname.split('.');
|
|
if (value3 == null) {
|
|
r2 = value;
|
|
} else {
|
|
value4 = value3.pop();
|
|
r2 = value4 == null ? value : value4.toLowerCase();
|
|
}
|
|
}
|
|
return r2 != null && r2.length <= 5 ? r2 : value;
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function backwardCompatSend(a0) { // fn#52891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:3631, offset: 0x0133a0c4, size: 62 bytes, params: 2, frame: 13
|
|
var binding;
|
|
var error;
|
|
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
|
if (platformUtilsModule.isDesktop()) {
|
|
try {
|
|
binding = env0_24;
|
|
binding.sendIPC(a0);
|
|
} catch (error) {
|
|
}
|
|
}
|
|
}
|
|
|
|
function requireModule_52893(a0) { // fn#52893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:3721, offset: 0x0133a102, size: 93 bytes, params: 2, frame: 12
|
|
var binding;
|
|
var value2;
|
|
if (env0_13) {
|
|
binding = env0_14;
|
|
if (binding.hasOwnProperty(a0)) {
|
|
if (env0_14[a0] != null) {
|
|
return env0_14[a0];
|
|
}
|
|
value2 = DiscordNative.nativeModules.requireModule(a0);
|
|
if (env0_13) {
|
|
env0_14[a0] = value2;
|
|
}
|
|
return value2;
|
|
}
|
|
}
|
|
value2 = DiscordNative.nativeModules.requireModule(a0);
|
|
if (env0_13) {
|
|
env0_14[a0] = value2;
|
|
}
|
|
return value2;
|
|
}
|
|
|
|
function ensureModule(a0) { // fn#52894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:3862, offset: 0x0133a15f, size: 113 bytes, params: 2, frame: 14
|
|
var r0;
|
|
var Promise;
|
|
var reject;
|
|
var error;
|
|
if ((require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded) {
|
|
r0 = DiscordNative.nativeModules.ensureModule(a0);
|
|
} else {
|
|
Promise = global.Promise;
|
|
reject = Promise.reject;
|
|
error = new global.Error('not embedded');
|
|
error = Reflect.apply(reject, Promise, [error]);
|
|
r0 = error;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun52895() { // fn#52895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:3967, offset: 0x0133a1d0, size: 28 bytes, params: 1, frame: 2
|
|
let canBootstrapNewUpdater = DiscordNative.nativeModules.canBootstrapNewUpdater;
|
|
canBootstrapNewUpdater = !!canBootstrapNewUpdater && canBootstrapNewUpdater;
|
|
return canBootstrapNewUpdater;
|
|
}
|
|
|
|
function getSetting(a0, a1) { // fn#52897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:4117, offset: 0x0133a205, size: 41 bytes, params: 3, frame: 11
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
return env0_4(_fun52899)();
|
|
}
|
|
|
|
function beforeUnload() { // fn#52900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:4177, offset: 0x0133a274, size: 344 bytes, params: 1, frame: 18
|
|
var r1;
|
|
var value2;
|
|
var error;
|
|
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
|
|
var userDataCache;
|
|
const value = undefined;
|
|
try {
|
|
value2 = this.requireModule('discord_overlay2');
|
|
r1 = value2;
|
|
} catch (error) {
|
|
r1 = value;
|
|
}
|
|
if (r1 && r1.reset) {
|
|
r1.reset();
|
|
}
|
|
if (r1 && r1.disconnectAllProcesses && r1.destroyHostProcess) {
|
|
r1.disconnectAllProcesses();
|
|
r1.destroyHostProcess();
|
|
}
|
|
DiscordNative.powerMonitor.removeAllListeners();
|
|
const origin = global.window.location.origin;
|
|
const GLOBAL_ENV = global.window.GLOBAL_ENV;
|
|
const MIGRATION_SOURCE_ORIGIN = GLOBAL_ENV.MIGRATION_SOURCE_ORIGIN;
|
|
if (origin === MIGRATION_SOURCE_ORIGIN && Storage.get((require(6732) /* metro dependency 6732: DomainMigrationUtils */).DOMAIN_MIGRATION_SUCCESS_KEY) !== true && this.supportsFeature(NativeFeatures.USER_DATA_CACHE)) {
|
|
userDataCache = DiscordNative.userDataCache;
|
|
userDataCache.cacheUserData(Storage.stringify());
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function inputEventRegister(a0, a1, a2, a3) { // fn#52901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:4650, offset: 0x0133a3cc, size: 95 bytes, params: 5, frame: 18
|
|
const discordUtils = this.getDiscordUtils();
|
|
discordUtils.inputEventRegister(global.parseInt('' + a0), a1.map(_fun52902), a2, a3);
|
|
}
|
|
|
|
function setOnInputEventCallback(a0) { // fn#52904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:4878, offset: 0x0133a4e2, size: 65 bytes, params: 2, frame: 12
|
|
if ((require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded) {
|
|
this.getDiscordUtils().inputWatchAll(a0);
|
|
}
|
|
}
|
|
|
|
function setObservedGamesCallback(a0, a1, a2, a3) { // fn#52906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:5032, offset: 0x0133a544, size: 188 bytes, params: 5, frame: 20
|
|
var environment;
|
|
var r7;
|
|
var value;
|
|
var discordUtils;
|
|
var closure2;
|
|
var value3;
|
|
var object;
|
|
var setProcessObserverUserId;
|
|
var setObservedGamesCallback2;
|
|
var error;
|
|
const env0_0 = a2;
|
|
const closure = normalizeCallback;
|
|
try {
|
|
value = environment;
|
|
var env0_1 = 0;
|
|
discordUtils = this.getDiscordUtils();
|
|
closure2 = _fun52909;
|
|
value3 = a0.map(closure2);
|
|
object = {};
|
|
var env0_2 = object;
|
|
value = a3 != null;
|
|
if (value) {
|
|
setProcessObserverUserId = discordUtils.setProcessObserverUserId;
|
|
value = setProcessObserverUserId != null;
|
|
r7 = value;
|
|
} else {
|
|
r7 = value;
|
|
}
|
|
if (r7) {
|
|
discordUtils.setProcessObserverUserId(a3);
|
|
}
|
|
if (a1) {
|
|
setObservedGamesCallback2 = discordUtils.setObservedGamesCallback2;
|
|
value = setObservedGamesCallback2 != null;
|
|
if (value) {
|
|
discordUtils.setObservedGamesCallback2(value3, closure);
|
|
} else {
|
|
discordUtils.setObservedGamesCallback(value3, closure);
|
|
}
|
|
} else {
|
|
discordUtils.setObservedGamesCallback(value3, closure);
|
|
}
|
|
} catch (error) {
|
|
}
|
|
}
|
|
|
|
function getExecutableFingerprintForProcess(a0) { // fn#52911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:5652, offset: 0x0133a6be, size: 51 bytes, params: 2, frame: 11
|
|
const env0_1 = a0;
|
|
const Promise = global.Promise;
|
|
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
|
const promise = new Promise(_fun52912);
|
|
return promise instanceof Object ? promise : value;
|
|
}
|
|
|
|
function setGameDetectionCallback(a0) { // fn#52914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:5855, offset: 0x0133a765, size: 54 bytes, params: 2, frame: 13
|
|
const env0_0 = a0;
|
|
const discordUtils = this.getDiscordUtils();
|
|
const setGameDetectionCallback = discordUtils.setGameDetectionCallback;
|
|
if (setGameDetectionCallback != null) {
|
|
setGameDetectionCallback.call(discordUtils, _fun52915);
|
|
}
|
|
}
|
|
|
|
function setCandidateGamesCallback(a0) { // fn#52921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:6416, offset: 0x0133a866, size: 42 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
this.getDiscordUtils().setCandidateGamesCallback(_fun52922);
|
|
}
|
|
|
|
function setGameCandidateOverrides(a0) { // fn#52925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:6626, offset: 0x0133a8cf, size: 48 bytes, params: 2, frame: 13
|
|
const discordUtils = this.getDiscordUtils();
|
|
discordUtils.setGameCandidateOverrides(a0.map(function(a0) {
|
|
var r3;
|
|
var object = {};
|
|
copyDataProperties(object, a0, r3);
|
|
object['gameId'] = a0.id;
|
|
object['gameName'] = a0.name;
|
|
return object;
|
|
}));
|
|
}
|
|
|
|
function setObserverDebugCallback(a0, a1, a2) { // fn#52927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:6755, offset: 0x0133a92c, size: 50 bytes, params: 4, frame: 15
|
|
const env0_0 = a0;
|
|
this.getDiscordUtils().setObserverDebugCallback(_fun52928, a1, a2);
|
|
}
|
|
|
|
function getVoiceEngine_52931() { // fn#52931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:7064, offset: 0x0133a9bc, size: 82 bytes, params: 1, frame: 14
|
|
const value = this.requireModule('discord_voice');
|
|
if (!env0_15) {
|
|
(require(4) /* metro dependency 4: Logger */).setNativeLogFn(_fun52932);
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function getDiscordUtils() { // fn#52933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:7210, offset: 0x0133aa4c, size: 46 bytes, params: 1, frame: 11
|
|
var error;
|
|
if (!env0_15) {
|
|
try {
|
|
this.getVoiceEngine();
|
|
} catch (error) {
|
|
}
|
|
}
|
|
return this.requireModule('discord_utils');
|
|
}
|
|
|
|
function isSystemDarkMode() { // fn#52934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:7314, offset: 0x0133aa7a, size: 99 bytes, params: 1, frame: 14
|
|
var r2;
|
|
var r0;
|
|
var discordUtils;
|
|
var isSystemDarkMode;
|
|
let value = undefined;
|
|
const isWindows2 = (require(477) /* metro dependency 477: PlatformUtils */).isWindows();
|
|
if (isWindows2) {
|
|
discordUtils = this.getDiscordUtils();
|
|
isSystemDarkMode = discordUtils.isSystemDarkMode;
|
|
r2 = isSystemDarkMode == null ? value : isSystemDarkMode.call(discordUtils);
|
|
value = r2 == null;
|
|
r0 = value || r2;
|
|
} else {
|
|
r0 = !!isWindows2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function getDiscordIsElevated_52935() { // fn#52935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:7460, offset: 0x0133aadd, size: 108 bytes, params: 1, frame: 13
|
|
var r0;
|
|
const isWindows2 = (require(477) /* metro dependency 477: PlatformUtils */).isWindows();
|
|
const value2 = null;
|
|
if (isWindows2) {
|
|
if (value2 != this.getDiscordUtils().getDiscordIsElevated) {
|
|
env0_16 = value2 === env0_16 ? this.getDiscordUtils().getDiscordIsElevated() : env0_16;
|
|
r0 = env0_16;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function setBadge(a0) { // fn#52939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:7820, offset: 0x0133ab8b, size: 289 bytes, params: 2, frame: 17
|
|
var app;
|
|
var value6;
|
|
const value = a0;
|
|
if ((require(477) /* metro dependency 477: PlatformUtils */).getPlatformName() === 'darwin') {
|
|
DiscordNative.app.dock.setBadge(value === -1 ? '•' : value > 0 ? '' + value : '');
|
|
} else if ((require(477) /* metro dependency 477: PlatformUtils */).getPlatformName() === 'win32') {
|
|
this.sendIPC((require(6733) /* metro dependency 6733: IPCEvents */).IPCEvents.APP_BADGE_SET, value);
|
|
} else if ((require(477) /* metro dependency 477: PlatformUtils */).getPlatformName() === 'linux') {
|
|
app = DiscordNative.app;
|
|
value6 = 0;
|
|
app.setBadgeCount(value >= value6 ? value : value6);
|
|
}
|
|
}
|
|
|
|
function setThumbarButtons(a0) { // fn#52941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:8205, offset: 0x0133ad02, size: 98 bytes, params: 2, frame: 15
|
|
var thumbar;
|
|
if ((require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded) {
|
|
thumbar = DiscordNative.thumbar;
|
|
if (!(thumbar == null || thumbar.setThumbarButtons == null)) {
|
|
thumbar.setThumbarButtons(a0, this.isSystemDarkMode());
|
|
}
|
|
}
|
|
}
|
|
|
|
function bounceDock(a0) { // fn#52942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:8359, offset: 0x0133ad64, size: 104 bytes, params: 2, frame: 14
|
|
var app;
|
|
if ((require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded) {
|
|
app = DiscordNative.app;
|
|
if (app.dock != null) {
|
|
var env0_1 = app.dock.bounce(a0);
|
|
return env0_4(_fun52944);
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun52947() { // fn#52947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:8719, offset: 0x0133ae9d, size: 60 bytes, params: 1, frame: 12
|
|
return (require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded ? DiscordNative.app.getReleaseChannel() : '';
|
|
}
|
|
|
|
function _fun52951() { // fn#52951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:8888, offset: 0x0133aee2, size: 89 bytes, params: 1, frame: 12
|
|
var r0;
|
|
var value;
|
|
if ((require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded) {
|
|
value = DiscordNative.os.release.split('.');
|
|
value = value.map(function(a0) {
|
|
return (0, global.parseInt)(a0, 10);
|
|
});
|
|
r0 = value;
|
|
} else {
|
|
r0 = [];
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function copyImage(a0, a1) { // fn#52954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:9066, offset: 0x0133af77, size: 41 bytes, params: 3, frame: 11
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
return env0_4(_fun52956)();
|
|
}
|
|
|
|
function copyImageBlob(a0, a1) { // fn#52957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:9399, offset: 0x0133b0b0, size: 41 bytes, params: 3, frame: 11
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
return env0_4(_fun52959)();
|
|
}
|
|
|
|
function canSaveImage(a0, a1) { // fn#52960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:9494, offset: 0x0133b13e, size: 83 bytes, params: 3, frame: 15
|
|
var value2;
|
|
if (a0 != null) {
|
|
var value;
|
|
if ((require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded) {
|
|
value2 = decideFileExtension(a0, a1);
|
|
return value2 == null || env0_8.has(value2);
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function saveImage(a0, a1, a2) { // fn#52961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:9629, offset: 0x0133b191, size: 48 bytes, params: 4, frame: 11
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
return env0_4(_fun52963)();
|
|
}
|
|
|
|
function saveFile(a0, a1) { // fn#52964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:10591, offset: 0x0133b4d7, size: 41 bytes, params: 3, frame: 11
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
return env0_4(_fun52966)();
|
|
}
|
|
|
|
function downloadMLModelFile(a0, a1, a2) { // fn#52967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:10992, offset: 0x0133b628, size: 48 bytes, params: 4, frame: 11
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
return env0_4(_fun52969)();
|
|
}
|
|
|
|
function checkMLModelFilesExist(a0) { // fn#52972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:11446, offset: 0x0133b748, size: 34 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
return env0_4(_fun52974)();
|
|
}
|
|
|
|
function cleanupUnusedMLModelFiles(a0) { // fn#52975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:11548, offset: 0x0133b7ac, size: 34 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
return env0_4(_fun52977)();
|
|
}
|
|
|
|
function downloadClipsFile(a0, a1, a2) { // fn#52978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:11645, offset: 0x0133b810, size: 48 bytes, params: 4, frame: 11
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
return env0_4(_fun52980)();
|
|
}
|
|
|
|
function checkClipsFilesExist(a0) { // fn#52982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:12029, offset: 0x0133b915, size: 34 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
return env0_4(_fun52984)();
|
|
}
|
|
|
|
function cleanupUnusedClipsFiles(a0) { // fn#52985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:12127, offset: 0x0133b979, size: 34 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
return env0_4(_fun52987)();
|
|
}
|
|
|
|
function downloadOpenH264(a0, a1, a2, a3) { // fn#52989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:12281, offset: 0x0133b9f6, size: 55 bytes, params: 5, frame: 11
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
const env0_3 = a3;
|
|
return env0_4(_fun52991)();
|
|
}
|
|
|
|
function cleanupUnusedOpenH264Files(a0) { // fn#52992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:12593, offset: 0x0133bae9, size: 34 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
return env0_4(_fun52994)();
|
|
}
|
|
|
|
function getOpenH264LibraryPath_52995() { // fn#52995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:12673, offset: 0x0133bb4d, size: 85 bytes, params: 1, frame: 12
|
|
const value2 = undefined;
|
|
if ((require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded) {
|
|
return DiscordNative.fileManager.getOpenH264LibraryPathSync == null ? value2 : DiscordNative.fileManager.getOpenH264LibraryPathSync();
|
|
}
|
|
return value2;
|
|
}
|
|
|
|
function canCopyImage() { // fn#52996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:12834, offset: 0x0133bba2, size: 123 bytes, params: 1, frame: 15
|
|
var value3;
|
|
var binding;
|
|
const value = a0;
|
|
const value2 = undefined;
|
|
const r4 = value !== value2 ? value : value2;
|
|
if ((require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded) {
|
|
if (typeof DiscordNative.clipboard.copyImage !== 'function') {
|
|
return false;
|
|
}
|
|
if (r4 == null) {
|
|
return true;
|
|
}
|
|
value3 = decideFileExtension(r4, value2);
|
|
if (value3 == null) {
|
|
return true;
|
|
}
|
|
binding = env0_7;
|
|
if (binding.has(value3)) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function readClipboard() { // fn#52999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:13166, offset: 0x0133bc8d, size: 60 bytes, params: 1, frame: 12
|
|
return (require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded ? DiscordNative.clipboard.read() : '';
|
|
}
|
|
|
|
function clipboardHasMixedContent() { // fn#53000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:13220, offset: 0x0133bcc9, size: 102 bytes, params: 1, frame: 13
|
|
var r2;
|
|
var r0;
|
|
const value2 = undefined;
|
|
const isPlatformEmbedded = (require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded;
|
|
if (isPlatformEmbedded) {
|
|
r2 = DiscordNative.clipboard.hasMixedContent == null ? value2 : DiscordNative.clipboard.hasMixedContent();
|
|
r0 = r2 != null && r2;
|
|
} else {
|
|
r0 = !!isPlatformEmbedded;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function isIPCReady() { // fn#53007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:13574, offset: 0x0133bdd6, size: 108 bytes, params: 1, frame: 13
|
|
var ipc;
|
|
var r0;
|
|
var value3;
|
|
var value4;
|
|
var send;
|
|
var error;
|
|
let value = environment;
|
|
if ((require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded) {
|
|
try {
|
|
value3 = DiscordNative == null;
|
|
ipc = value3 ? undefined : DiscordNative.ipc;
|
|
value4 = ipc != null;
|
|
if (value4) {
|
|
ipc = DiscordNative.ipc;
|
|
send = ipc.send;
|
|
value = typeof send === 'function';
|
|
r0 = value;
|
|
} else {
|
|
r0 = value4;
|
|
}
|
|
} catch (error) {
|
|
return false;
|
|
}
|
|
return r0;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
function waitForIPCReady() { // fn#53008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:13719, offset: 0x0133be42, size: 70 bytes, params: 1, frame: 13
|
|
const value = a0;
|
|
const value2 = a1;
|
|
const env0_0 = value !== undefined ? value : 5000;
|
|
const env0_1 = value2 !== undefined ? value2 : global.window;
|
|
return env0_4(_fun53010)();
|
|
}
|
|
|
|
function webAuthnRegister(a0) { // fn#53013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:13970, offset: 0x0133bf66, size: 34 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
return env0_4(_fun53015)();
|
|
}
|
|
|
|
function webAuthnAuthenticate(a0) { // fn#53016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:14113, offset: 0x0133bff2, size: 34 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
return env0_4(_fun53018)();
|
|
}
|
|
|
|
function focus_53022(a0) { // fn#53022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:14339, offset: 0x0133c0d8, size: 98 bytes, params: 2, frame: 16
|
|
var r1;
|
|
let value = a1;
|
|
const r4 = value !== undefined ? value : false;
|
|
if (r4) {
|
|
value = require(477) /* metro dependency 477: PlatformUtils */;
|
|
value = value.isWindows();
|
|
r1 = value;
|
|
} else {
|
|
r1 = r4;
|
|
}
|
|
if (r1) {
|
|
this.minimize(null);
|
|
}
|
|
DiscordNative.window.focus(r4, a0);
|
|
}
|
|
|
|
function isAlwaysOnTop(a0) { // fn#53028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:14771, offset: 0x0133c242, size: 34 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
return env0_4(_fun53030)();
|
|
}
|
|
|
|
function setMinimumSize(a0, a1) { // fn#53032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:15009, offset: 0x0133c314, size: 72 bytes, params: 3, frame: 15
|
|
var r1;
|
|
var r4;
|
|
var window;
|
|
const value2 = DiscordNative == null;
|
|
const value3 = undefined;
|
|
if (value2) {
|
|
r1 = value2;
|
|
r4 = value3;
|
|
} else {
|
|
window = DiscordNative.window;
|
|
r1 = window == null;
|
|
r4 = window;
|
|
}
|
|
r1 = !r1 ? r4.setMinimumSize == null : r1;
|
|
if (!r1) {
|
|
r4.setMinimumSize(a0, a1);
|
|
}
|
|
return value3;
|
|
}
|
|
|
|
function setTrafficLightPosition(a0) { // fn#53033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:15111, offset: 0x0133c35c, size: 127 bytes, params: 2, frame: 16
|
|
var sendIPC;
|
|
var property;
|
|
var IPCEvents;
|
|
var WINDOW_SET_TRAFFIC_LIGHT_POSITION;
|
|
var error;
|
|
let value = environment;
|
|
if (require(dependencyMap[6]).isPlatformEmbedded) {
|
|
if (require(dependencyMap[6]).getPlatformName() === 'darwin') {
|
|
try {
|
|
sendIPC = this.sendIPC;
|
|
property = dependencyMap[11];
|
|
value = require(property);
|
|
IPCEvents = value.IPCEvents;
|
|
WINDOW_SET_TRAFFIC_LIGHT_POSITION = IPCEvents.WINDOW_SET_TRAFFIC_LIGHT_POSITION;
|
|
Reflect.apply(sendIPC, this, [WINDOW_SET_TRAFFIC_LIGHT_POSITION, a0]);
|
|
} catch (error) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function getEnableHardwareAcceleration() { // fn#53039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:15640, offset: 0x0133c4a6, size: 59 bytes, params: 1, frame: 12
|
|
const isPlatformEmbedded = (require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded;
|
|
return isPlatformEmbedded ? DiscordNative.gpuSettings.getEnableHardwareAcceleration() : !isPlatformEmbedded;
|
|
}
|
|
|
|
function setOpenH264Enabled(a0) { // fn#53041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:15801, offset: 0x0133c500, size: 72 bytes, params: 2, frame: 15
|
|
var r1;
|
|
var r4;
|
|
var settings;
|
|
const value2 = DiscordNative == null;
|
|
const value3 = undefined;
|
|
if (value2) {
|
|
r1 = value2;
|
|
r4 = value3;
|
|
} else {
|
|
settings = DiscordNative.settings;
|
|
r1 = settings == null;
|
|
r4 = settings;
|
|
}
|
|
r1 = !r1 ? r4.set == null : r1;
|
|
if (!r1) {
|
|
r4.set('openH264Enabled', a0);
|
|
}
|
|
return value3;
|
|
}
|
|
|
|
function getOpenOnStart() { // fn#53044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:16056, offset: 0x0133c5a0, size: 27 bytes, params: 1, frame: 11
|
|
return env0_4(_fun53046)();
|
|
}
|
|
|
|
function getGPUDriverVersions() { // fn#53047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:16211, offset: 0x0133c644, size: 124 bytes, params: 1, frame: 14
|
|
var r0;
|
|
var Promise;
|
|
var resolve;
|
|
var Object;
|
|
var value;
|
|
if (Reflect.apply((require(477) /* metro dependency 477: PlatformUtils */).isWindows, value, [])) {
|
|
if (this.getDiscordUtils().getGPUDriverVersions != null) {
|
|
value = this.getDiscordUtils();
|
|
value = value.getGPUDriverVersions();
|
|
r0 = value;
|
|
} else {
|
|
Promise = global.Promise;
|
|
resolve = Promise.resolve;
|
|
Object = global.Object;
|
|
r0 = Reflect.apply(resolve, Promise, [Object.freeze({})]);
|
|
}
|
|
} else {
|
|
Promise = global.Promise;
|
|
resolve = Promise.resolve;
|
|
Object = global.Object;
|
|
r0 = Reflect.apply(resolve, Promise, [Object.freeze({})]);
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function setZoomFactor_53048(a0) { // fn#53048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:16409, offset: 0x0133c6c0, size: 67 bytes, params: 2, frame: 12
|
|
var r0;
|
|
const isPlatformEmbedded = (require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded;
|
|
if (isPlatformEmbedded) {
|
|
DiscordNative.window.setZoomFactor(a0);
|
|
r0 = true;
|
|
} else {
|
|
r0 = !!isPlatformEmbedded;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function getPreferredSystemLanguages() { // fn#53053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:16903, offset: 0x0133c7f2, size: 52 bytes, params: 1, frame: 10
|
|
const getPreferredSystemLanguages = DiscordNative.app.getPreferredSystemLanguages;
|
|
return getPreferredSystemLanguages == null ? undefined : DiscordNative.app.getPreferredSystemLanguages();
|
|
}
|
|
|
|
function getPidFromDesktopSource_53054(a0) { // fn#53054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:16990, offset: 0x0133c826, size: 230 bytes, params: 2, frame: 15
|
|
var r4;
|
|
var r6;
|
|
var r2;
|
|
var r0;
|
|
var getPidFromWindowHandle;
|
|
var value2;
|
|
let value = undefined;
|
|
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
|
if (platformUtilsModule.isDesktop()) {
|
|
getPidFromWindowHandle = this.getDiscordUtils().getPidFromWindowHandle;
|
|
value2 = null;
|
|
if (value2 == getPidFromWindowHandle) {
|
|
return null;
|
|
}
|
|
r4 = value2 == a0 ? value : a0.split(':');
|
|
r6 = value2 == r4 ? value : r4[0];
|
|
if (r6 === 'window') {
|
|
r0 = value2 == r4 ? value : r4[1];
|
|
value = '';
|
|
r2 = value2 != r0 ? r0 : value;
|
|
value = this.getDiscordUtils();
|
|
value = value.getPidFromWindowHandle(r2);
|
|
r0 = value2 == value || value === 0 ? value2 : value;
|
|
return r0;
|
|
}
|
|
r2 = r6.startsWith('screen') ? 1 : r6 !== 'prepicked' ? value2 : 1;
|
|
return r2;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
function getDesktopSourceFromPid(a0) { // fn#53055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:17358, offset: 0x0133c90c, size: 157 bytes, params: 2, frame: 13
|
|
var getWindowHandleFromPid;
|
|
var windowHandleFromPid;
|
|
var value;
|
|
if (Reflect.apply((require(477) /* metro dependency 477: PlatformUtils */).isWindows, value, [])) {
|
|
getWindowHandleFromPid = this.getDiscordUtils().getWindowHandleFromPid;
|
|
value = null;
|
|
if (value == getWindowHandleFromPid) {
|
|
return null;
|
|
}
|
|
if (value == a0) {
|
|
return null;
|
|
}
|
|
windowHandleFromPid = this.getDiscordUtils().getWindowHandleFromPid(a0);
|
|
return value == windowHandleFromPid || windowHandleFromPid.length === 0 ? value : ['window',
|
|
windowHandleFromPid,
|
|
'0'].join(':');
|
|
}
|
|
return null;
|
|
}
|
|
|
|
function stopCPUProfiling() { // fn#53069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:19103, offset: 0x0133cbc1, size: 34 bytes, params: 1, frame: 11
|
|
return env0_4(_fun53071)();
|
|
}
|
|
|
|
function flushStorageData() { // fn#53074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:19532, offset: 0x0133cce1, size: 82 bytes, params: 1, frame: 12
|
|
const isPlatformEmbedded = (require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded;
|
|
const Promise = global.Promise;
|
|
return isPlatformEmbedded ? new Promise(function(a0, a1) {
|
|
var env0_0 = a0;
|
|
var env0_1 = a1;
|
|
if (DiscordNative.processUtils.flushStorageData != null) {
|
|
DiscordNative.processUtils.flushStorageData(_fun53076);
|
|
} else {
|
|
a0();
|
|
}
|
|
}) : Promise.resolve();
|
|
}
|
|
|
|
function flushCookies_53077() { // fn#53077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:19727, offset: 0x0133cdc9, size: 82 bytes, params: 1, frame: 12
|
|
const isPlatformEmbedded = (require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded;
|
|
const Promise = global.Promise;
|
|
return isPlatformEmbedded ? new Promise(function(a0, a1) {
|
|
var env0_0 = a0;
|
|
var env0_1 = a1;
|
|
if (DiscordNative.processUtils.flushCookies != null) {
|
|
DiscordNative.processUtils.flushCookies(_fun53079);
|
|
} else {
|
|
a0();
|
|
}
|
|
}) : Promise.resolve();
|
|
}
|
|
|
|
function blockDisplaySleep() { // fn#53081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:20092, offset: 0x0133ced9, size: 79 bytes, params: 1, frame: 12
|
|
const isPlatformEmbedded = (require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded;
|
|
const value2 = null;
|
|
return isPlatformEmbedded && value2 != DiscordNative.powerSaveBlocker ? DiscordNative.powerSaveBlocker.blockDisplaySleep() : value2;
|
|
}
|
|
|
|
function makeChunkedRequest(a0, a1, a2) { // fn#53085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:20492, offset: 0x0133cffa, size: 456 bytes, params: 4, frame: 20
|
|
var r6;
|
|
var r2;
|
|
var Promise;
|
|
var prototype;
|
|
var object2;
|
|
var method;
|
|
var maxBps;
|
|
var token;
|
|
var chunkInterval;
|
|
var JSON;
|
|
var stringify;
|
|
var Math;
|
|
var value4;
|
|
var Array;
|
|
var value5;
|
|
var array;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var substring;
|
|
var value9;
|
|
var promise;
|
|
let value = a1;
|
|
const aPIBaseURL = (require(507) /* metro dependency 507: HTTPUtils */).getAPIBaseURL();
|
|
const env0_0 = '' + aPIBaseURL + a0;
|
|
if ((require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded) {
|
|
if (DiscordNative.http == null) {
|
|
Promise = global.Promise;
|
|
return Promise.reject(new global.Error('HTTP module not available'));
|
|
}
|
|
object2 = {'maxBps': 8000, 'chunkInterval': 50, 'contentType': 'application/json'};
|
|
copyDataProperties(object2, a2, aPIBaseURL);
|
|
method = object2.method;
|
|
maxBps = object2.maxBps;
|
|
token = object2.token;
|
|
chunkInterval = object2.chunkInterval;
|
|
reducibleJoin5: while (true) {
|
|
if (object2.contentType !== 'application/json') {
|
|
r6 = value;
|
|
break reducibleJoin5;
|
|
}
|
|
JSON = global.JSON;
|
|
stringify = JSON.stringify;
|
|
value = Reflect.apply(stringify, JSON, [value]);
|
|
r6 = value;
|
|
break reducibleJoin5;
|
|
}
|
|
value = maxBps * (chunkInterval / 1000);
|
|
Math = global.Math;
|
|
value4 = Math.ceil(r6.length / value);
|
|
Array = global.Array;
|
|
prototype = Array.prototype;
|
|
value5 = Object.create(prototype, {constructor: {value: Array}});
|
|
array = new Array();
|
|
value6 = array instanceof Object ? array : value5;
|
|
value7 = 0;
|
|
if (value7 < value4) {
|
|
r2 = value7;
|
|
reducibleLoop6: while (true) {
|
|
value8 = r2 * value;
|
|
substring = r6.substring;
|
|
value6[r2] = Reflect.apply(substring, r6, [value8, value8 + value]);
|
|
value9 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
if (value9 < value4) {
|
|
r2 = value9;
|
|
continue reducibleLoop6;
|
|
}
|
|
break reducibleLoop6;
|
|
}
|
|
}
|
|
Promise = global.Promise;
|
|
prototype = Promise.prototype;
|
|
value = Object.create(prototype, {constructor: {value: Promise}});
|
|
promise = new Promise(_fun53086);
|
|
return promise instanceof Object ? promise : value;
|
|
}
|
|
Promise = global.Promise;
|
|
const reject = Promise.reject;
|
|
const Error = global.Error;
|
|
return Reflect.apply(reject, Promise, [new Error('Not embedded!')]);
|
|
}
|
|
|
|
function submitLiveCrashReport_53088(a0) { // fn#53088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:21206, offset: 0x0133d2a7, size: 173 bytes, params: 2, frame: 15
|
|
var sentry;
|
|
var submitLiveCrashReport;
|
|
var crashReporterMetadata;
|
|
var app;
|
|
var discordUtils;
|
|
var object2;
|
|
var releaseChannel;
|
|
const value2 = undefined;
|
|
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
|
if (platformUtilsModule.isWindows()) {
|
|
submitLiveCrashReport = this.getDiscordUtils().submitLiveCrashReport;
|
|
if (submitLiveCrashReport == null) {
|
|
return global.Promise.resolve();
|
|
}
|
|
crashReporterMetadata = this.getCrashReporterMetadata();
|
|
app = DiscordNative.app;
|
|
releaseChannel = app.getReleaseChannel();
|
|
sentry = crashReporterMetadata == null ? value2 : crashReporterMetadata.sentry;
|
|
discordUtils = this.getDiscordUtils();
|
|
submitLiveCrashReport = discordUtils.submitLiveCrashReport;
|
|
object2 = {};
|
|
copyDataProperties(object2, sentry, app);
|
|
copyDataProperties(object2, a0, app);
|
|
return Reflect.apply(submitLiveCrashReport, discordUtils, [releaseChannel, object2]);
|
|
}
|
|
const Promise = global.Promise;
|
|
return Promise.resolve();
|
|
}
|
|
|
|
function asyncify(a0) { // fn#53094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:21927, offset: 0x0133d424, size: 44 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
const Promise = global.Promise;
|
|
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
|
const promise = new Promise(_fun53095);
|
|
return promise instanceof Object ? promise : value;
|
|
}
|
|
|
|
function GetWindowFullscreenTypeExtraByPid(a0, a1) { // fn#53100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:22505, offset: 0x0133d54b, size: 98 bytes, params: 3, frame: 14
|
|
const QueryUserNotificationState = (require(4044) /* metro dependency 4044: Client */).QueryUserNotificationState;
|
|
const getDiscordUtils = this.getDiscordUtils;
|
|
const getWindowFullscreenTypeExtraByPid = Reflect.apply(getDiscordUtils, this, []).getWindowFullscreenTypeExtraByPid;
|
|
return getWindowFullscreenTypeExtraByPid == null || a1 == null ? {quns: QueryUserNotificationState.QUNS_UNKNOWN} : getWindowFullscreenTypeExtraByPid(a0,
|
|
a1);
|
|
}
|
|
|
|
function GetSystemServicePerformanceMonitorSnapshot(a0) { // fn#53103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:22943, offset: 0x0133d609, size: 223 bytes, params: 2, frame: 14
|
|
var Promise;
|
|
let env0_0 = a0;
|
|
const getDiscordUtils = this.getDiscordUtils;
|
|
const getSystemServicePerformanceMonitorSnapshot = Reflect.apply(getDiscordUtils, this,
|
|
[]).getSystemServicePerformanceMonitorSnapshot;
|
|
if (getSystemServicePerformanceMonitorSnapshot == null) {
|
|
Promise = global.Promise;
|
|
return Promise.reject(new (require(4292) /* metro dependency 4292: DiscordNative */).SystemServiceNotAvailableError());
|
|
}
|
|
Promise = global.Promise;
|
|
let promise = new Promise(function(a0, a1) {
|
|
var env0_0 = a1;
|
|
env0_1 = global.setTimeout(_fun53105, 1000);
|
|
});
|
|
Promise = global.Promise;
|
|
promise = new Promise(_fun53106);
|
|
Promise = global.Promise;
|
|
promise = Promise.race([promise, promise]);
|
|
return promise.finally(_fun53108);
|
|
}
|
|
|
|
function isModuleVersionAtLeast(a0, a1) { // fn#53122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:25153, offset: 0x0133db2c, size: 226 bytes, params: 3, frame: 21
|
|
var value6;
|
|
var value7;
|
|
var property2;
|
|
var value8;
|
|
const r4 = env0_9 ?? [0, 0, 0];
|
|
const items2 = [];
|
|
const value2 = 0;
|
|
arraySpread(items2, r4, value2, undefined);
|
|
items2.push(this.moduleVersions?.[a0] ?? value2);
|
|
let property = a1[this.releaseChannel];
|
|
const r5 = property ?? a1.stable;
|
|
const value4 = _createForOfIteratorHelperLoose_52880(items2.entries());
|
|
const value5 = value4();
|
|
let done = value5.done;
|
|
if (done) {
|
|
return true;
|
|
}
|
|
let r1 = value5;
|
|
loopExit9: while (true) {
|
|
value6 = r1.value;
|
|
value7 = env0_3(value6, 2);
|
|
property = value7[value2];
|
|
property2 = value7[1];
|
|
if (property2 > r5[property]) {
|
|
return true;
|
|
}
|
|
if (property2 < r5[property]) {
|
|
break loopExit9;
|
|
}
|
|
value8 = value4();
|
|
done = value8.done;
|
|
if (done) {
|
|
return true;
|
|
}
|
|
r1 = value8;
|
|
continue;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function fetchRiotGamesLiveClientData(a0) { // fn#53123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:25513, offset: 0x0133dc0e, size: 197 bytes, params: 2, frame: 16
|
|
var r1;
|
|
var r0;
|
|
var Promise;
|
|
var reject;
|
|
var error;
|
|
const value = a1;
|
|
if ((require(477) /* metro dependency 477: PlatformUtils */).isPlatformEmbedded) {
|
|
if (DiscordNative.riotGames == null) {
|
|
Promise = global.Promise;
|
|
reject = Promise.reject;
|
|
error = new global.Error('Riot Games module not available');
|
|
error = Reflect.apply(reject, Promise, [error]);
|
|
r1 = error;
|
|
} else {
|
|
r1 = DiscordNative.riotGames.fetchLiveClientData(a0, value !== undefined ? value : {});
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
Promise = global.Promise;
|
|
reject = Promise.reject;
|
|
error = new global.Error('Not embedded!');
|
|
error = Reflect.apply(reject, Promise, [error]);
|
|
r0 = error;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function GetSystemGpuStats(a0) { // fn#53129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:26194, offset: 0x0133de11, size: 41 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
return env0_4(_fun53131)();
|
|
}
|
|
|
|
function* _fun52887(a0) { // fn#52887, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:2059, offset: 0x01339d70, size: 192 bytes, params: 2, frame: 17
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
const fetch = global.fetch;
|
|
const Request = global.Request;
|
|
let request = new Request(a0, {'method': 'GET', 'mode': 'cors'});
|
|
yield fetch(request);
|
|
request = undefined;
|
|
if (true) {
|
|
env2_1(env2_2[3])(request.status === 200, 'Data fetch unsuccessful');
|
|
yield request.arrayBuffer();
|
|
request = undefined;
|
|
if (false) {
|
|
return request;
|
|
}
|
|
env2_1(env2_2[3])(request != null, 'Data is null');
|
|
}
|
|
return request;
|
|
}
|
|
|
|
function* _fun52899() { // fn#52899, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:4127, offset: 0x0133a237, size: 61 bytes, params: 1, frame: 14
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var settings = env2_6.settings;
|
|
var get = settings.get;
|
|
value = environment.__proto__;
|
|
yield Reflect.apply(get, settings, [require, importDefault]);
|
|
}
|
|
}
|
|
|
|
function _fun52902(a0) { // fn#52902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:4744, offset: 0x0133a42b, size: 139 bytes, params: 2, frame: 9
|
|
var r0;
|
|
var r1;
|
|
var r3;
|
|
var r2;
|
|
var item3;
|
|
var value3;
|
|
var item4;
|
|
var value4;
|
|
const iterator = a0[Symbol.iterator]();
|
|
const iterator2 = iterator.next;
|
|
let item2 = Reflect.apply(iterator2, iterator, []);
|
|
let item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
const value = undefined;
|
|
const value2 = item2 === value;
|
|
const r4 = value2 ? value : item;
|
|
if (value2) {
|
|
r0 = item2;
|
|
r1 = value2;
|
|
r3 = value;
|
|
} else {
|
|
item3 = Reflect.apply(iterator2, item2, []);
|
|
item = item3.value;
|
|
item3 = item3.done ? undefined : item2;
|
|
value3 = item3 === value;
|
|
if (value3) {
|
|
r0 = item3;
|
|
r1 = value3;
|
|
r3 = value;
|
|
} else {
|
|
r0 = item3;
|
|
r1 = value3;
|
|
r3 = item;
|
|
}
|
|
}
|
|
if (r1) {
|
|
r2 = value;
|
|
} else {
|
|
item4 = Reflect.apply(iterator2, r0, []);
|
|
item = item4.value;
|
|
item4 = item4.done ? undefined : r0;
|
|
value4 = item4 === value;
|
|
if (value4) {
|
|
r0 = item4;
|
|
r1 = value4;
|
|
r2 = value;
|
|
} else {
|
|
r0 = item4;
|
|
r1 = value4;
|
|
r2 = item;
|
|
}
|
|
}
|
|
if (!r1) {
|
|
r0.return();
|
|
}
|
|
return typeof r2 === 'string' ? [r4, r3, r2] : [r4, r3];
|
|
}
|
|
|
|
function normalizeCallback(a0) { // fn#52907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:5199, owner: setObservedGamesCallback.normalizeCallback, offset: 0x0133a600, size: 36 bytes, params: 2, frame: 12
|
|
return importDefault(a0.map(_fun52908));
|
|
}
|
|
|
|
function _fun52909(a0) { // fn#52909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:5117, offset: 0x0133a63f, size: 84 bytes, params: 2, frame: 13
|
|
var r3;
|
|
let binding = env0_1;
|
|
const value2 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
|
const id = a0.id;
|
|
if (id == null) {
|
|
r3 = id;
|
|
} else {
|
|
value = environment.__proto__;
|
|
binding = env1_12;
|
|
binding[value2] = a0.id;
|
|
r3 = binding;
|
|
}
|
|
const object2 = {};
|
|
copyDataProperties(object2, a0, r3);
|
|
object2['cmdline'] = a0.cmdLine;
|
|
object2['id'] = value2;
|
|
return object2;
|
|
}
|
|
|
|
function _fun52912(a0) { // fn#52912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:5710, offset: 0x0133a6f1, size: 73 bytes, params: 2, frame: 17
|
|
const discordUtils = a0.getDiscordUtils();
|
|
const value3 = undefined;
|
|
const getExecutableFingerprintForProcess = discordUtils == null ? value3 : discordUtils.getExecutableFingerprintForProcess;
|
|
if (getExecutableFingerprintForProcess != null) {
|
|
getExecutableFingerprintForProcess(env0_1, _fun52913);
|
|
} else {
|
|
a0(null);
|
|
}
|
|
return value3;
|
|
}
|
|
|
|
function _fun52915(a0, a1) { // fn#52915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:5964, offset: 0x0133a79b, size: 55 bytes, params: 3, frame: 15
|
|
return env0_0(a0.map(function(a0) {
|
|
return normalizeRunningGame(a0);
|
|
}), a1.map(function(a0) {
|
|
return normalizeRunningGame(a0);
|
|
}));
|
|
}
|
|
|
|
function _fun52922(a0) { // fn#52922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:6495, offset: 0x0133a890, size: 36 bytes, params: 2, frame: 12
|
|
env0_0(a0.map(function(a0) {
|
|
return normalizeRunningGame(a0);
|
|
}));
|
|
}
|
|
|
|
function _fun52932(a0, a1, a2) { // fn#52932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:7159, offset: 0x0133aa0e, size: 62 bytes, params: 4, frame: 17
|
|
env0_0.consoleLog(a1, '[' + a0 + '] ' + a2);
|
|
}
|
|
|
|
function* _fun52944() { // fn#52944, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:8467, offset: 0x0133add5, size: 58 bytes, params: 1, frame: 12
|
|
if (true) {
|
|
value = environment.__proto__;
|
|
yield importDefault;
|
|
var value3 = undefined;
|
|
if (false) {
|
|
return value3;
|
|
}
|
|
require.dock.cancelBounce(value3);
|
|
}
|
|
}
|
|
|
|
function* _fun52956() { // fn#52956, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:9076, offset: 0x0133afa9, size: 263 bytes, params: 1, frame: 18
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var binding = env2_1;
|
|
var binding2 = env2_2;
|
|
binding(binding2[3])(env2_0(binding2[6]).isPlatformEmbedded, 'Copy image method called outside native app');
|
|
var value4 = binding(binding2[3]);
|
|
var clipboard = env2_6.clipboard;
|
|
var copyImage = clipboard.copyImage;
|
|
value4(typeof copyImage === 'function', 'Copy image not supported');
|
|
yield env2_30(require);
|
|
var value6 = undefined;
|
|
if (false) {
|
|
return value6;
|
|
}
|
|
var value8 = env2_32(require, importDefault);
|
|
var r6 = value8 == null ? require : env2_7.has(value8) ? 'image.' + value8 : require;
|
|
clipboard = env2_6.clipboard;
|
|
copyImage = clipboard.copyImage;
|
|
var Buffer = global.Buffer;
|
|
Reflect.apply(copyImage, clipboard, [Buffer.from(value6), r6]);
|
|
}
|
|
}
|
|
|
|
function* _fun52959() { // fn#52959, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:9409, offset: 0x0133b0e2, size: 92 bytes, params: 1, frame: 16
|
|
if (true) {
|
|
value = environment.__proto__;
|
|
yield require.arrayBuffer();
|
|
var value3 = undefined;
|
|
if (false) {
|
|
return value3;
|
|
}
|
|
var clipboard = env2_6.clipboard;
|
|
var copyImage = clipboard.copyImage;
|
|
var Buffer = global.Buffer;
|
|
Reflect.apply(copyImage, clipboard, [Buffer.from(value3), importDefault]);
|
|
}
|
|
}
|
|
|
|
function* _fun52963() { // fn#52963, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:9641, offset: 0x0133b1ca, size: 781 bytes, params: 1, frame: 26
|
|
var r3;
|
|
var r4;
|
|
var value17;
|
|
var saveWithDialog;
|
|
var value24;
|
|
var value25;
|
|
var value26;
|
|
var value27;
|
|
var error;
|
|
var value28;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = undefined;
|
|
let binding = env2_1;
|
|
const binding2 = env2_2;
|
|
binding(binding2[3])(env2_0(binding2[6]).isPlatformEmbedded, 'Save image method called outside native app');
|
|
const value7 = binding(binding2[5]).toURLSafe(require);
|
|
if (value7 == null) {
|
|
return env2_23.ERRORED;
|
|
}
|
|
const value11 = env2_27(value7.pathname.split('/').pop() ?? 'unknown');
|
|
const value12 = value7.searchParams.get('format');
|
|
if (value12 != null) {
|
|
value17 = value12.replace(env2_21, '').toLowerCase();
|
|
r3 = value17.length > 0 ? '' + value11.replace(env2_22, '') + '.' + value17 : value11;
|
|
} else {
|
|
r3 = value11.includes('.') ? value11 : '' + value11 + '.' + (env2_32(require,
|
|
importDefault) ?? dependencyMap ?? 'png');
|
|
}
|
|
yield env2_30(require);
|
|
const value20 = undefined;
|
|
if (false) {
|
|
return value20;
|
|
}
|
|
const Buffer = global.Buffer;
|
|
const value22 = Buffer.from(value20);
|
|
const Storage = env2_0(env2_2[7]).Storage;
|
|
const value23 = Storage.get(env2_17);
|
|
const r12 = typeof value23 === 'string' ? value23 : value;
|
|
let fileManager = env2_6.fileManager;
|
|
if (typeof fileManager.saveWithDialog2 === 'function') {
|
|
fileManager = env2_6.fileManager;
|
|
yield fileManager.saveWithDialog2(value22, r3, r12 ?? value);
|
|
value28 = undefined;
|
|
if (false) {
|
|
return value28;
|
|
}
|
|
if (value28 == null) {
|
|
return env2_23.ERRORED;
|
|
}
|
|
if (value28.canceledByUser) {
|
|
return env2_23.CANCELED;
|
|
}
|
|
r4 = value28.directory;
|
|
} else {
|
|
try {
|
|
binding = env2_6;
|
|
} catch (error) {
|
|
return env2_23.ERRORED;
|
|
}
|
|
try {
|
|
fileManager = binding.fileManager;
|
|
} catch (error) {
|
|
return env2_23.ERRORED;
|
|
}
|
|
try {
|
|
saveWithDialog = fileManager.saveWithDialog;
|
|
} catch (error) {
|
|
return env2_23.ERRORED;
|
|
}
|
|
try {
|
|
value24 = r12 != null;
|
|
} catch (error) {
|
|
return env2_23.ERRORED;
|
|
}
|
|
try {
|
|
value25 = Reflect.apply(saveWithDialog, fileManager, [value22, r3, value24 ? r12 : value]);
|
|
} catch (error) {
|
|
return env2_23.ERRORED;
|
|
}
|
|
yield value25;
|
|
try {
|
|
value26 = undefined;
|
|
value27 = false;
|
|
} catch (error) {
|
|
return env2_23.ERRORED;
|
|
}
|
|
if (value27) {
|
|
return value26;
|
|
}
|
|
r4 = value26;
|
|
}
|
|
if (r4 == null) {
|
|
r4 = env2_23.ERRORED;
|
|
} else if (r4 === '') {
|
|
r4 = env2_23.ERRORED;
|
|
} else {
|
|
env2_0(env2_2[7]).Storage.set(env2_17, r4);
|
|
r4 = env2_23.SAVED;
|
|
}
|
|
return r4;
|
|
}
|
|
|
|
function* _fun52966() { // fn#52966, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:10601, offset: 0x0133b509, size: 287 bytes, params: 1, frame: 18
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
const binding = env2_1;
|
|
const binding2 = env2_2;
|
|
binding(binding2[3])(env2_0(binding2[6]).isPlatformEmbedded, 'Save file method called outside native app');
|
|
const value6 = binding(binding2[5]).toURLSafe(require);
|
|
const value7 = null;
|
|
if (value7 == value6) {
|
|
return value7;
|
|
}
|
|
const r4 = value7 != importDefault ? importDefault : value6.pathname.split('/').pop();
|
|
const r5 = value7 != r4 ? r4 : 'unknown';
|
|
const r6 = value7 != importDefault ? r5 : env2_27(r5);
|
|
yield env2_28(require);
|
|
const value12 = undefined;
|
|
if (false) {
|
|
return value12;
|
|
}
|
|
const Buffer = global.Buffer;
|
|
const value14 = Buffer.from(value12);
|
|
const fileManager = env2_6.fileManager;
|
|
yield fileManager.saveWithDialog(value14, r6, undefined);
|
|
value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
return value7 == value ? value7 : value;
|
|
}
|
|
|
|
function* _fun52969() { // fn#52969, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:11004, offset: 0x0133b661, size: 172 bytes, params: 1, frame: 20
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var binding = env2_1;
|
|
var binding2 = env2_2;
|
|
binding(binding2[3])(env2_0(binding2[6]).isPlatformEmbedded,
|
|
'Download ML model file method called outside native app');
|
|
binding(binding2[3])(binding(binding2[5]).toURLSafe(require),
|
|
'Could not download ML model, fileSrc was not a valid path');
|
|
var fileManager = env2_6.fileManager;
|
|
yield fileManager.maybeDownloadMLModelFile(require, importDefault, dependencyMap);
|
|
}
|
|
}
|
|
|
|
function* _fun52974() { // fn#52974, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:11452, offset: 0x0133b773, size: 57 bytes, params: 1, frame: 12
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var fileManager = env2_6.fileManager;
|
|
var checkMLModelFilesExist = fileManager.checkMLModelFilesExist;
|
|
value = environment.__proto__;
|
|
yield Reflect.apply(checkMLModelFilesExist, fileManager, [require]);
|
|
}
|
|
}
|
|
|
|
function* _fun52977() { // fn#52977, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:11554, offset: 0x0133b7d7, size: 57 bytes, params: 1, frame: 12
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var fileManager = env2_6.fileManager;
|
|
var cleanupUnusedMLModelFiles = fileManager.cleanupUnusedMLModelFiles;
|
|
value = environment.__proto__;
|
|
yield Reflect.apply(cleanupUnusedMLModelFiles, fileManager, [require]);
|
|
}
|
|
}
|
|
|
|
function* _fun52980() { // fn#52980, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:11657, offset: 0x0133b849, size: 172 bytes, params: 1, frame: 20
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var binding = env2_1;
|
|
var binding2 = env2_2;
|
|
binding(binding2[3])(env2_0(binding2[6]).isPlatformEmbedded,
|
|
'Download clips file method called outside native app');
|
|
binding(binding2[3])(binding(binding2[5]).toURLSafe(require),
|
|
'Could not download clips file, fileSrc was not a valid path');
|
|
var fileManager = env2_6.fileManager;
|
|
yield fileManager.maybeDownloadClipsFile(require, importDefault, dependencyMap);
|
|
}
|
|
}
|
|
|
|
function* _fun52984() { // fn#52984, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:12035, offset: 0x0133b940, size: 57 bytes, params: 1, frame: 12
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var fileManager = env2_6.fileManager;
|
|
var checkClipsFilesExist = fileManager.checkClipsFilesExist;
|
|
value = environment.__proto__;
|
|
yield Reflect.apply(checkClipsFilesExist, fileManager, [require]);
|
|
}
|
|
}
|
|
|
|
function* _fun52987() { // fn#52987, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:12133, offset: 0x0133b9a4, size: 57 bytes, params: 1, frame: 12
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var fileManager = env2_6.fileManager;
|
|
var cleanupUnusedClipsFiles = fileManager.cleanupUnusedClipsFiles;
|
|
value = environment.__proto__;
|
|
yield Reflect.apply(cleanupUnusedClipsFiles, fileManager, [require]);
|
|
}
|
|
}
|
|
|
|
function* _fun52991() { // fn#52991, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:12295, offset: 0x0133ba36, size: 179 bytes, params: 1, frame: 21
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var binding = env2_1;
|
|
var binding2 = env2_2;
|
|
binding(binding2[3])(env2_0(binding2[6]).isPlatformEmbedded,
|
|
'Download OpenH264 file method called outside native app');
|
|
binding(binding2[3])(binding(binding2[5]).toURLSafe(require),
|
|
'Could not download OpenH264, fileSrc was not a valid path');
|
|
var fileManager = env2_6.fileManager;
|
|
yield fileManager.maybeDownloadOpenH264(require, importDefault, dependencyMap, env1_3);
|
|
}
|
|
}
|
|
|
|
function* _fun52994() { // fn#52994, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:12599, offset: 0x0133bb14, size: 57 bytes, params: 1, frame: 12
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var fileManager = env2_6.fileManager;
|
|
var cleanupUnusedOpenH264Files = fileManager.cleanupUnusedOpenH264Files;
|
|
value = environment.__proto__;
|
|
yield Reflect.apply(cleanupUnusedOpenH264Files, fileManager, [require]);
|
|
}
|
|
}
|
|
|
|
function* _fun53010() { // fn#53010, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:13772, offset: 0x0133be91, size: 160 bytes, params: 1, frame: 16
|
|
var isIPCReady;
|
|
var Promise;
|
|
var prototype;
|
|
var value5;
|
|
var closure;
|
|
var promise;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var value9;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
let Date = global.Date;
|
|
let now = Date.now;
|
|
value = Reflect.apply(now, Date, []);
|
|
Date = global.Date;
|
|
if (Date.now() - value < require) {
|
|
loopExit2: while (true) {
|
|
isIPCReady = dependencyMap.isIPCReady;
|
|
if (Reflect.apply(isIPCReady, dependencyMap, [])) {
|
|
return true;
|
|
}
|
|
Promise = global.Promise;
|
|
prototype = Promise.prototype;
|
|
value5 = Object.create(prototype, {constructor: {value: Promise}});
|
|
closure = function(a0) {
|
|
return importDefault.requestAnimationFrame(a0);
|
|
};
|
|
promise = new Promise();
|
|
value6 = promise instanceof Object ? promise : value5;
|
|
yield value6;
|
|
value7 = undefined;
|
|
value8 = false;
|
|
if (value8) {
|
|
return value7;
|
|
}
|
|
Date = global.Date;
|
|
now = Date.now;
|
|
value9 = Reflect.apply(now, Date, []) - value;
|
|
if (value9 < require) {
|
|
continue;
|
|
}
|
|
break loopExit2;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function* _fun53015() { // fn#53015, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:13976, offset: 0x0133bf91, size: 97 bytes, params: 1, frame: 13
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var nativeModules = env2_6.nativeModules;
|
|
yield nativeModules.ensureModule('discord_webauthn');
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
var webAuthn = env2_6.webAuthn;
|
|
var webAuthnRegister = webAuthn.webAuthnRegister;
|
|
value = environment.__proto__;
|
|
yield Reflect.apply(webAuthnRegister, webAuthn, [require]);
|
|
}
|
|
}
|
|
|
|
function* _fun53018() { // fn#53018, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:14119, offset: 0x0133c01d, size: 97 bytes, params: 1, frame: 13
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var nativeModules = env2_6.nativeModules;
|
|
yield nativeModules.ensureModule('discord_webauthn');
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
var webAuthn = env2_6.webAuthn;
|
|
var webAuthnAuthenticate = webAuthn.webAuthnAuthenticate;
|
|
value = environment.__proto__;
|
|
yield Reflect.apply(webAuthnAuthenticate, webAuthn, [require]);
|
|
}
|
|
}
|
|
|
|
function* _fun53030() { // fn#53030, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:14777, offset: 0x0133c26d, size: 87 bytes, params: 1, frame: 13
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
let window = env2_6.window;
|
|
let isAlwaysOnTop = window.isAlwaysOnTop;
|
|
if (typeof isAlwaysOnTop !== 'function') {
|
|
return false;
|
|
}
|
|
window = env2_6.window;
|
|
isAlwaysOnTop = window.isAlwaysOnTop;
|
|
value = environment.__proto__;
|
|
yield Reflect.apply(isAlwaysOnTop, window, [require]);
|
|
value = undefined;
|
|
if (false) {
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function* _fun53046() { // fn#53046, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:16063, offset: 0x0133c5c4, size: 128 bytes, params: 1, frame: 16
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
const getOpenOnStart = env2_6.app.getOpenOnStart;
|
|
yield getOpenOnStart == null ? undefined : env2_6.app.getOpenOnStart();
|
|
const value5 = undefined;
|
|
if (false) {
|
|
return value5;
|
|
}
|
|
if (value5 != null) {
|
|
return value5;
|
|
}
|
|
const settings = env2_6.settings;
|
|
const get = settings.get;
|
|
yield Reflect.apply(get, settings, ['OPEN_ON_STARTUP', true]);
|
|
value = undefined;
|
|
if (false) {
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function* _fun53071() { // fn#53071, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:19143, offset: 0x0133cbec, size: 145 bytes, params: 1, frame: 16
|
|
var r2;
|
|
var Promise;
|
|
var reject;
|
|
var error;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__;
|
|
const getDiscordUtils = require.getDiscordUtils;
|
|
yield Reflect.apply(getDiscordUtils, require, []).stopCPUProfiling?.();
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
if (value == null) {
|
|
Promise = global.Promise;
|
|
reject = Promise.reject;
|
|
error = new global.Error('Failed to stop CPU profiling');
|
|
error = Reflect.apply(reject, Promise, [error]);
|
|
r2 = error;
|
|
} else {
|
|
value = global.JSON.parse(value);
|
|
r2 = value;
|
|
}
|
|
return r2;
|
|
}
|
|
|
|
function _fun53075(a0, a1) { // fn#53075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:19577, offset: 0x0133cd33, size: 79 bytes, params: 3, frame: 13
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
if (DiscordNative.processUtils.flushStorageData != null) {
|
|
DiscordNative.processUtils.flushStorageData(_fun53076);
|
|
} else {
|
|
a0();
|
|
}
|
|
}
|
|
|
|
function _fun53078(a0, a1) { // fn#53078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:19772, offset: 0x0133ce1b, size: 79 bytes, params: 3, frame: 13
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
if (DiscordNative.processUtils.flushCookies != null) {
|
|
DiscordNative.processUtils.flushCookies(_fun53079);
|
|
} else {
|
|
a0();
|
|
}
|
|
}
|
|
|
|
function _fun53086(a0, a1) { // fn#53086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:21033, offset: 0x0133d1c2, size: 119 bytes, params: 3, frame: 19
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
let http = DiscordNative.http;
|
|
if (http != null) {
|
|
http = DiscordNative.http;
|
|
http.makeChunkedRequest(env0_0, env0_5, {method: method, chunkInterval: chunkInterval, contentType: contentType,
|
|
token: token}, _fun53087);
|
|
}
|
|
}
|
|
|
|
function _fun53104(a0, a1) { // fn#53104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:23162, offset: 0x0133d6e8, size: 45 bytes, params: 3, frame: 13
|
|
const env0_0 = a1;
|
|
const value = global.setTimeout(_fun53105, 1000);
|
|
}
|
|
|
|
function _fun53106(a0, a1) { // fn#53106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:23271, offset: 0x0133d747, size: 42 bytes, params: 3, frame: 13
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
getSystemServicePerformanceMonitorSnapshot(env0_0, _fun53107);
|
|
}
|
|
|
|
function* _fun53131() { // fn#53131, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:26236, offset: 0x0133de43, size: 169 bytes, params: 1, frame: 15
|
|
var environment;
|
|
var r2;
|
|
var value3;
|
|
var value6;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
const binding = env2_0;
|
|
value = undefined;
|
|
if (binding(env2_2[6]).isPlatformEmbedded) {
|
|
value3 = environment.__proto__;
|
|
yield importDefault.ensureModule('discord_media');
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value6 = importDefault.requireModule('discord_media');
|
|
if ((value6 == null ? value : value6.getGpuStats) == null) {
|
|
r2 = [];
|
|
} else {
|
|
value = value6.getGpuStats(require);
|
|
value = value.catch(function() {
|
|
return [];
|
|
});
|
|
r2 = value;
|
|
}
|
|
return r2;
|
|
}
|
|
return [];
|
|
}
|
|
|
|
function _fun52908(a0) { // fn#52908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:5245, offset: 0x0133a624, size: 27 bytes, params: 2, frame: 13
|
|
return normalizeRunningGame(a0, env1_2);
|
|
}
|
|
|
|
function _fun52913(a0) { // fn#52913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:5812, offset: 0x0133a73a, size: 43 bytes, params: 2, frame: 13
|
|
const value = a0;
|
|
const binding = env0_0;
|
|
const value3 = null;
|
|
return binding(value3 != value ? value === '' ? value3 : value : value3);
|
|
}
|
|
|
|
function _fun53076(a0) { // fn#53076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:19656, offset: 0x0133cd82, size: 71 bytes, params: 2, frame: 13
|
|
var r0;
|
|
var error;
|
|
if (a0 != null) {
|
|
error = new global.Error(a0);
|
|
error = require(error);
|
|
r0 = error;
|
|
} else {
|
|
r0 = env0_0();
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun53087(a0, a1) { // fn#53087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:21135, offset: 0x0133d239, size: 110 bytes, params: 3, frame: 14
|
|
var r0;
|
|
var value;
|
|
var Error;
|
|
var body;
|
|
var error;
|
|
if (a0 != null) {
|
|
r0 = require(a0);
|
|
} else if (a1.status >= 400) {
|
|
Error = global.Error;
|
|
body = a1.body;
|
|
error = new Error();
|
|
error = require(error);
|
|
r0 = error;
|
|
} else {
|
|
value = undefined;
|
|
env0_0(a1);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun53105() { // fn#53105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:23184, offset: 0x0133d715, size: 50 bytes, params: 1, frame: 12
|
|
const Error = global.Error;
|
|
return require(new Error('Timed out waiting for performance snapshot'));
|
|
}
|
|
|
|
function _fun53107(a0) { // fn#53107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6909:23284, offset: 0x0133d771, size: 211 bytes, params: 2, frame: 15
|
|
var r4;
|
|
var value;
|
|
var Error;
|
|
var prototype;
|
|
var error;
|
|
var binding;
|
|
var JSON;
|
|
var value2;
|
|
var Error2;
|
|
var String;
|
|
var message;
|
|
var value3;
|
|
if (a0 !== 'null') {
|
|
try {
|
|
value = environment;
|
|
binding = env0_0;
|
|
JSON = global.JSON;
|
|
value2 = JSON.parse(a0);
|
|
binding(value2);
|
|
} catch (error) {
|
|
Error = global.Error;
|
|
Error2 = global.Error;
|
|
if (error instanceof Error2) {
|
|
message = error.message;
|
|
r4 = message;
|
|
} else {
|
|
String = global.String;
|
|
r4 = String(error);
|
|
}
|
|
value = 'Invalid performance snapshot JSON: ' + r4;
|
|
prototype = Error.prototype;
|
|
value3 = Object.create(prototype, {constructor: {value: Error}});
|
|
error = new Error();
|
|
value = error instanceof Object ? error : value3;
|
|
require(value);
|
|
}
|
|
} else {
|
|
require(new global.Error('Performance snapshot not available'));
|
|
}
|
|
}
|
|
|