This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

+31 -14
View File
@@ -1,26 +1,43 @@
/* Metro module 3815; source: modules/device/BillingPlatformUtils.tsx; dependencies: [1581, 477, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as PlatformUtilsModule from '../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as MetaQuestUtilsAndroidModule from './MetaQuestUtils.android.tsx'; /* Metro dependency 1581 */
function _fun29511(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#29511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3942:6, offset: 0x00fc3dea, size: 127 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/BillingPlatformUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/device/BillingPlatformUtils.tsx');
exports.isPremiumGiftingSupported = isPremiumGiftingSupported;
exports.isGooglePlayBillingSupported = isGooglePlayBillingSupported;
exports.isCollectibleGiftingSupported = isCollectibleGiftingSupported;
exports.isSocialLayerStorefrontGiftingSupported = isSocialLayerStorefrontGiftingSupported;
}
function isGooglePlayBillingSupported() { // fn#29513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3942:291, offset: 0x00fc3e90, size: 72 bytes, params: 1, frame: 13
var r0;
var value;
const isAndroid2 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
if (isAndroid2) {
value = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
value = !value.isMetaQuest();
r0 = value;
} else {
r0 = isAndroid2;
function isPremiumGiftingSupported() { // fn#29512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3942:193, offset: 0x00fc3e69, size: 39 bytes, params: 1, frame: 11
return !MetaQuestUtilsAndroidModule.isMetaQuest();
}
return r0;
function isGooglePlayBillingSupported() { // fn#29513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3942:291, offset: 0x00fc3e90, size: 72 bytes, params: 1, frame: 13
var r0;
var value;
const isAndroid2 = (PlatformUtilsModule).isAndroid();
if (isAndroid2) {
value = require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */;
value = !value.isMetaQuest();
r0 = value;
} else {
r0 = isAndroid2;
}
return r0;
}
function isCollectibleGiftingSupported() { // fn#29514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3942:415, offset: 0x00fc3e69, size: 39 bytes, params: 1, frame: 11
return !MetaQuestUtilsAndroidModule.isMetaQuest();
}
function isSocialLayerStorefrontGiftingSupported() { // fn#29515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3942:528, offset: 0x00fc3e69, size: 39 bytes, params: 1, frame: 11
return !MetaQuestUtilsAndroidModule.isMetaQuest();
}
}
global.__d(_fun29511, 3815, [1581, 477, 2]) /* metro module 3815, dependencies: [1581, 477, 2] */;
+28 -23
View File
@@ -1,35 +1,40 @@
/* Metro module 7138; source: modules/device/DeviceState.tsx; dependencies: [7139, 2, 7140] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as DeviceStateModule from './native/DeviceState.tsx'; /* Metro dependency 7139 */
import * as DeviceStateModule2 from './constants/DeviceState.tsx'; /* Metro dependency 7140 */
function _fun57125(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7316:6, offset: 0x013dd188, size: 164 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/DeviceState.tsx');
const DeviceState = (require(7140) /* metro dependency 7140: DeviceState */).DeviceState;
(FileImportTrackerModule).fileFinishedImporting('modules/device/DeviceState.tsx');
const DeviceState = (DeviceStateModule2).DeviceState;
exports.DeviceState = DeviceState;
const ThermalState = (require(7140) /* metro dependency 7140: DeviceState */).ThermalState;
const ThermalState = (DeviceStateModule2).ThermalState;
exports.ThermalState = ThermalState;
const getDeviceState = (require(7139) /* metro dependency 7139: DeviceState */).getDeviceState;
const getDeviceState = (DeviceStateModule).getDeviceState;
exports.getDeviceState = getDeviceState;
exports.logDeviceState = logDeviceState;
}
function logDeviceState(a0) { // fn#57126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7316:283, offset: 0x013dd22c, size: 287 bytes, params: 2, frame: 20
var value;
const logger = (require(7139) /* metro dependency 7139: DeviceState */).logger;
var info;
var isLowPowerMode;
if (a0 !== null) {
logger.info('Device State Information:');
logger.info('- Thermal State: ' + a0.thermalState);
info = logger.info;
value = 100 * a0.batteryLevel;
Reflect.apply(info, logger, ['- Battery Level: ' + value + '%']);
info = logger.info;
isLowPowerMode = a0.isLowPowerMode;
value = 'Disabled';
Reflect.apply(info, logger, ['- Low Power Mode: ' + (isLowPowerMode ? 'Enabled' : value)]);
} else {
logger.info('Device state not available');
function logDeviceState(a0) { // fn#57126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7316:283, offset: 0x013dd22c, size: 287 bytes, params: 2, frame: 20
var value;
const logger = (DeviceStateModule).logger;
var info;
var isLowPowerMode;
if (a0 !== null) {
logger.info('Device State Information:');
logger.info('- Thermal State: ' + a0.thermalState);
info = logger.info;
value = 100 * a0.batteryLevel;
Reflect.apply(info, logger, ['- Battery Level: ' + value + '%']);
info = logger.info;
isLowPowerMode = a0.isLowPowerMode;
value = 'Disabled';
Reflect.apply(info, logger, ['- Low Power Mode: ' + (isLowPowerMode ? 'Enabled' : value)]);
} else {
logger.info('Device state not available');
}
}
}
global.__d(_fun57125, 7138, [7139, 2, 7140]) /* metro module 7138, dependencies: [7139, 2, 7140] */;
@@ -1,23 +1,28 @@
/* Metro module 1581; source: modules/device/MetaQuestUtils.android.tsx; dependencies: [655, 1582, 2] */
import NativeMetaQuestModule from '../../external/discord_common/js/packages/rtn-codegen/js/NativeMetaQuestModule.tsx'; /* Metro dependency 655 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ClientInfoUtilsModule from '../../utils/native/ClientInfoUtils.tsx'; /* Metro dependency 1582 */
function _fun17595(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#17595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1708:6, offset: 0x00e70d37, size: 125 bytes, params: 8, frame: 18
const closure = isMetaQuest;
const isMetaQuest2 = isMetaQuest;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = closure();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/MetaQuestUtils.android.tsx');
exports.isMetaQuest = closure;
const isMetaQuest22 = isMetaQuest2();
(FileImportTrackerModule).fileFinishedImporting('modules/device/MetaQuestUtils.android.tsx');
exports.isMetaQuest = isMetaQuest2;
exports.isQuestRelease = isQuestRelease;
exports.isThumbstickScrollDevice = value;
}
exports.isThumbstickScrollDevice = isMetaQuest22;
function isMetaQuest() { // fn#17596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1708:43, offset: 0x00e70db4, size: 36 bytes, params: 1, frame: 11
return (NativeMetaQuestModule).isMetaQuest();
}
function isMetaQuest() { // fn#17596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1708:43, offset: 0x00e70db4, size: 36 bytes, params: 1, frame: 11
return (importDefault(655) /* metro dependency 655: NativeMetaQuestModule */).isMetaQuest();
}
function isQuestRelease() { // fn#17597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1708:282, offset: 0x00e70dd8, size: 88 bytes, params: 1, frame: 13
const value = undefined;
const constants = (ClientInfoUtilsModule).getConstants();
const r1 = constants == null || constants.ReleaseChannel == null ? value : constants.ReleaseChannel.startsWith('quest');
return r1 != null && r1;
}
function isQuestRelease() { // fn#17597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1708:282, offset: 0x00e70dd8, size: 88 bytes, params: 1, frame: 13
const value = undefined;
const constants = (importAll(1582) /* metro dependency 1582: ClientInfoUtils */).getConstants();
const r1 = constants == null || constants.ReleaseChannel == null ? value : constants.ReleaseChannel.startsWith('quest');
return r1 != null && r1;
}
global.__d(_fun17595, 1581, [655, 1582, 2]) /* metro module 1581, dependencies: [655, 1582, 2] */;
+68 -62
View File
@@ -1,82 +1,88 @@
/* Metro module 8093; source: modules/device/ThermalUtils.native.tsx; dependencies: [27, 477, 8094, 4092, 629, 690, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as PlatformUtilsModule from '../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as Module00629Module from '../../by-id/module-00629.js'; /* Metro dependency 629 */
import * as ReactBatchUpdatesNativeModule from '../../external/discord_common/js/shared/utils/ReactBatchUpdates.native.tsx'; /* Metro dependency 690 */
function _fun64872(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8278:6, offset: 0x01bb7aa4, size: 258 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const NativeEventEmitter = value.NativeEventEmitter;
const NativeModules = value.NativeModules;
value = require(477) /* metro dependency 477: PlatformUtils */;
const r1 = value.isAndroid() ? importDefault(8094) /* metro dependency 8094: NativeDeviceThermalStateModule */ : NativeModules.DCDDeviceThermalStateManager;
const nativeEventEmitter = new NativeEventEmitter();
const env0_5 = (require(629) /* metro dependency 629 */).create(_fun64873);
object2 = {getRawThermalState: getRawThermalState, useRawThermalState: useRawThermalState,
const env0_5 = (Module00629Module).create(_fun64873);
object = {getRawThermalState: getRawThermalState, useRawThermalState: useRawThermalState,
addListener: addListener_64881};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/ThermalUtils.native.tsx');
exports.default = object2;
}
function _fun64873(a0) { // fn#64873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8278:237, offset: 0x01bb7ba6, size: 232 bytes, params: 2, frame: 20
var r3;
var r4;
var Promise;
var resolve;
var defaultImport;
const env0_0 = a0;
const closure = updateThermalState;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
if ((require(4092) /* metro dependency 4092: DeviceUtils */).getSystemVersionMajor() >= 29) {
Promise = global.Promise;
resolve = Promise.resolve;
defaultImport = importDefault(8094) /* metro dependency 8094: NativeDeviceThermalStateModule */;
r3 = Reflect.apply(resolve, Promise, [defaultImport.getThermalState()]);
(FileImportTrackerModule).fileFinishedImporting('modules/device/ThermalUtils.native.tsx');
exports.default = object;
function _fun64873(a0) { // fn#64873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8278:237, offset: 0x01bb7ba6, size: 232 bytes, params: 2, frame: 20
var r3;
var r4;
var Promise;
var resolve;
var defaultImport;
const env0_0 = a0;
const updateThermalState2 = updateThermalState;
if (PlatformUtilsModule.isAndroid()) {
if ((require(4092) /* metro dependency 4092: DeviceUtils */).getSystemVersionMajor() >= 29) {
Promise = global.Promise;
resolve = Promise.resolve;
defaultImport = importDefault(8094) /* metro dependency 8094: NativeDeviceThermalStateModule */;
r3 = Reflect.apply(resolve, Promise, [defaultImport.getThermalState()]);
} else {
r3 = global.Promise.resolve(undefined);
}
r4 = r3;
} else {
r3 = global.Promise.resolve(undefined);
r4 = NativeModules.DCDDeviceThermalStateManager.getThermalState();
}
r4 = r3;
} else {
r4 = NativeModules.DCDDeviceThermalStateManager.getThermalState();
r4.then(updateThermalState2);
env0_4.addListener('DeviceThermalStateDidChange', function({state}) {
updateThermalState(state);
});
return {rawThermalState: undefined};
function updateThermalState(a0) { // fn#64874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8278:264, offset: 0x01bb7c8e, size: 52 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun64875);
function _fun64875() { // fn#64875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8278:290, offset: 0x01bb7cc2, size: 23 bytes, params: 1, frame: 11
return env1_0(_fun64876);
function _fun64876(a0) { // fn#64876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8278:297, offset: 0x01bb7cd9, size: 36 bytes, params: 2, frame: 4
const value = a0;
return value.rawThermalState === env1_0 ? value : {rawThermalState: env1_0};
}
}
}
}
r4.then(closure);
env0_4.addListener('DeviceThermalStateDidChange', function({state}) {
updateThermalState(state);
});
return {rawThermalState: undefined};
}
function getRawThermalState() { // fn#64878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8278:727, offset: 0x01bb7d15, size: 25 bytes, params: 1, frame: 9
const binding = env0_5;
const getState = binding.getState;
return Reflect.apply(getState, binding, []).rawThermalState;
}
function getRawThermalState() { // fn#64878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8278:727, offset: 0x01bb7d15, size: 25 bytes, params: 1, frame: 9
const binding = env0_5;
const getState = binding.getState;
return Reflect.apply(getState, binding, []).rawThermalState;
}
function useRawThermalState() { // fn#64879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8278:779, offset: 0x01bb7d2e, size: 23 bytes, params: 1, frame: 11
return env0_5(function(a0) {
return a0.rawThermalState;
});
}
function useRawThermalState() { // fn#64879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8278:779, offset: 0x01bb7d2e, size: 23 bytes, params: 1, frame: 11
return env0_5(function(a0) {
return a0.rawThermalState;
});
}
function addListener_64881(a0) { // fn#64881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8278:821, offset: 0x01bb7d50, size: 30 bytes, params: 2, frame: 12
const object2 = {};
object2.remove = env0_5.subscribe(a0);
return object2;
}
function addListener_64881(a0) { // fn#64881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8278:821, offset: 0x01bb7d50, size: 30 bytes, params: 2, frame: 12
const object = {};
object.remove = env0_5.subscribe(a0);
return object;
}
function updateThermalState(a0) { // fn#64874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8278:264, offset: 0x01bb7c8e, size: 52 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun64875);
}
function _fun64875() { // fn#64875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8278:290, offset: 0x01bb7cc2, size: 23 bytes, params: 1, frame: 11
return env1_0(_fun64876);
}
function _fun64876(a0) { // fn#64876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8278:297, offset: 0x01bb7cd9, size: 36 bytes, params: 2, frame: 4
const value = a0;
return value.rawThermalState === env1_0 ? value : {rawThermalState: env1_0};
}
global.__d(_fun64872, 8093, [27, 477, 8094, 4092, 629, 690,
2]) /* metro module 8093, dependencies: [27, 477, 8094, 4092, 629, 690, 2] */;
@@ -1,14 +1,16 @@
/* Metro module 7140; source: modules/device/constants/DeviceState.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun57132(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7318:6, offset: 0x013dd4e9, size: 162 bytes, params: 8, frame: 17
var object3;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object3 = {NOMINAL: 'NOMINAL', FAIR: 'FAIR', SERIOUS: 'SERIOUS', CRITICAL: 'CRITICAL', UNKNOWN: 'UNKNOWN'};
const object4 = {'thermalState': null, 'batteryLevel': 1, 'isLowPowerMode': false};
const UNKNOWN = object3.UNKNOWN;
object4.thermalState = UNKNOWN;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/constants/DeviceState.tsx');
exports.ThermalState = object3;
exports.DEFAULT_DEVICE_STATE = object4;
object = {NOMINAL: 'NOMINAL', FAIR: 'FAIR', SERIOUS: 'SERIOUS', CRITICAL: 'CRITICAL', UNKNOWN: 'UNKNOWN'};
const object2 = {'thermalState': null, 'batteryLevel': 1, 'isLowPowerMode': false};
const UNKNOWN = object.UNKNOWN;
object2.thermalState = UNKNOWN;
(FileImportTrackerModule).fileFinishedImporting('modules/device/constants/DeviceState.tsx');
exports.ThermalState = object;
exports.DEFAULT_DEVICE_STATE = object2;
}
global.__d(_fun57132, 7140, [2]) /* metro module 7140, dependencies: [2] */;
@@ -1,13 +1,17 @@
/* Metro module 7071; source: modules/device/getDeviceMetadata.native.tsx; dependencies: [4884, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as TTIAnalyticsUtilsModule from '../tti_analytics/native/TTIAnalyticsUtils.tsx'; /* Metro dependency 4884 */
function _fun56348(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7249:6, offset: 0x013c59eb, size: 94 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/getDeviceMetadata.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/device/getDeviceMetadata.native.tsx');
exports.default = getDeviceMetadata_56349;
function getDeviceMetadata_56349() { // fn#56349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7249:179, offset: 0x013c5a49, size: 36 bytes, params: 1, frame: 11
return (TTIAnalyticsUtilsModule).getDeviceMetadata();
}
}
function getDeviceMetadata_56349() { // fn#56349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7249:179, offset: 0x013c5a49, size: 36 bytes, params: 1, frame: 11
return (require(4884) /* metro dependency 4884: TTIAnalyticsUtils */).getDeviceMetadata();
}
global.__d(_fun56348, 7071, [4884, 2]) /* metro module 7071, dependencies: [4884, 2] */;
@@ -1,13 +1,17 @@
/* Metro module 5252; source: modules/device/getMediaPerformanceClass.android.tsx; dependencies: [4092, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as DeviceUtilsModule from '../../utils/native/DeviceUtils.tsx'; /* Metro dependency 4092 */
function _fun46709(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5430:6, offset: 0x011ad7d1, size: 94 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/getMediaPerformanceClass.android.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/device/getMediaPerformanceClass.android.tsx');
exports.default = getMediaPerformanceClass;
function getMediaPerformanceClass() { // fn#46710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5430:187, offset: 0x011ad82f, size: 36 bytes, params: 1, frame: 11
return (DeviceUtilsModule).getDeviceMediaPerformanceClass();
}
}
function getMediaPerformanceClass() { // fn#46710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5430:187, offset: 0x011ad82f, size: 36 bytes, params: 1, frame: 11
return (require(4092) /* metro dependency 4092: DeviceUtils */).getDeviceMediaPerformanceClass();
}
global.__d(_fun46709, 5252, [4092, 2]) /* metro module 5252, dependencies: [4092, 2] */;
@@ -1,13 +1,17 @@
/* Metro module 12477; source: modules/device/hasPerformanceForKrispFullband.tsx; dependencies: [5252, 2] */
import GetMediaPerformanceClassAndroid from './getMediaPerformanceClass.android.tsx'; /* Metro dependency 5252 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun94904(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12663:6, offset: 0x0212b971, size: 99 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/hasPerformanceForKrispFullband.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/device/hasPerformanceForKrispFullband.tsx');
exports.default = hasPerformanceForKrispFullband;
function hasPerformanceForKrispFullband() { // fn#94905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12663:185, offset: 0x0212b9d4, size: 46 bytes, params: 1, frame: 11
const value = (GetMediaPerformanceClassAndroid)();
return value === null || value >= 31;
}
}
function hasPerformanceForKrispFullband() { // fn#94905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12663:185, offset: 0x0212b9d4, size: 46 bytes, params: 1, frame: 11
const value = (importDefault(5252) /* metro dependency 5252: getMediaPerformanceClassAndroid */)();
return value === null || value >= 31;
}
global.__d(_fun94904, 12477, [5252, 2]) /* metro module 12477, dependencies: [5252, 2] */;
+6 -2
View File
@@ -1,10 +1,14 @@
/* Metro module 11106; source: modules/device/native/DCDPhotos.tsx; dependencies: [27, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
function _fun85074(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11292:6, offset: 0x01f62aa7, size: 102 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const NativeModules = (require(27) /* metro dependency 27 */).NativeModules;
const NativeModules = (ReactNativeModule).NativeModules;
const DCDPhotos = NativeModules.DCDPhotos;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/native/DCDPhotos.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/device/native/DCDPhotos.tsx');
exports.default = DCDPhotos;
}
global.__d(_fun85074, 11106, [27, 2]) /* metro module 11106, dependencies: [27, 2] */;
@@ -1,4 +1,6 @@
/* Metro module 11109; source: modules/device/native/DeviceConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun85099(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11295:6, offset: 0x01f6402a, size: 146 bytes, params: 8, frame: 17
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
@@ -6,8 +8,9 @@ function _fun85099(global, require, importDefault, importAll, module, exports, d
const value = Object.freeze({'VIDEO': 'ALAssetTypeVideo', 'PHOTO': 'ALAssetTypePhoto'});
Object = global.Object;
const value2 = Object.freeze({'VIDEO': 'video', 'IMAGE': 'image'});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/native/DeviceConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/device/native/DeviceConstants.tsx');
exports.ALAssetsType = value;
exports.DeviceMediaType = value2;
}
global.__d(_fun85099, 11109, [2]) /* metro module 11109, dependencies: [2] */;
+157 -152
View File
@@ -1,177 +1,182 @@
/* Metro module 11104; source: modules/device/native/DeviceMedia.tsx; dependencies: [661, 629, 683, 690, 11105, 477, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as ReactBatchUpdatesNativeModule from '../../../external/discord_common/js/shared/utils/ReactBatchUpdates.native.tsx'; /* Metro dependency 690 */
function _fun85055(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:6, offset: 0x01f62228, size: 200 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_4 = (require(629) /* metro dependency 629 */).create(function() {
return {'assets': null, 'page': 0, 'hasReachedEnd': false, 'lastAssetIndex': 0};
});
object2 = {getNextAssetPage: getNextAssetPage, refreshAssets: refreshAssets, useAssets: useAssets,
object = {getNextAssetPage: getNextAssetPage, refreshAssets: refreshAssets, useAssets: useAssets,
useHasReachedEnd: useHasReachedEnd};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/native/DeviceMedia.tsx');
exports.default = object2;
}
function getNextAssetPage({batchSize, extensions}) { // fn#85057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:226, offset: 0x01f62300, size: 276 bytes, params: 2, frame: 22
var image;
var property;
var moduleValue;
var env0_2;
const {assets, page, lastAssetIndex, hasReachedEnd, endCursor} = env0_4.getState();
if (assets != null) {
if (!hasReachedEnd) {
property = assets.edges[assets.edges.length - 1];
image = property == null || property.node == null ? undefined : property.node.image;
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isIOS()) {
if (image != null) {
if (image.uri != null) {
env0_2 = page + 1;
(importDefault(11105) /* metro dependency 11105: getDeviceMediaPhotos */)({batchSize: batchSize,
endCursor: endCursor, lastAssetIndex: lastAssetIndex, lastNodeImageUri: image.uri,
extensions: extensions,
onFetched: function(a0) {
_fun85059(a0);
}});
(FileImportTrackerModule).fileFinishedImporting('modules/device/native/DeviceMedia.tsx');
exports.default = object;
function getNextAssetPage({batchSize, extensions}) { // fn#85057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:226, offset: 0x01f62300, size: 276 bytes, params: 2, frame: 22
var image;
var property;
var moduleValue;
var env0_2;
const {assets, page, lastAssetIndex, hasReachedEnd, endCursor} = env0_4.getState();
if (assets != null) {
if (!hasReachedEnd) {
property = assets.edges[assets.edges.length - 1];
image = property == null || property.node == null ? undefined : property.node.image;
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isIOS()) {
if (image != null) {
if (image.uri != null) {
env0_2 = page + 1;
(importDefault(11105) /* metro dependency 11105: getDeviceMediaPhotos */)({batchSize: batchSize,
endCursor: endCursor, lastAssetIndex: lastAssetIndex, lastNodeImageUri: image.uri,
extensions: extensions,
onFetched: function(a0) {
_fun85059(a0);
}});
}
}
} else {
env0_2 = page + 1;
(importDefault(11105) /* metro dependency 11105: getDeviceMediaPhotos */)({batchSize: batchSize,
endCursor: endCursor, lastAssetIndex: lastAssetIndex, lastNodeImageUri: image.uri,
extensions: extensions,
onFetched: onFetched});
}
} else {
env0_2 = page + 1;
(importDefault(11105) /* metro dependency 11105: getDeviceMediaPhotos */)({batchSize: batchSize,
endCursor: endCursor, lastAssetIndex: lastAssetIndex, lastNodeImageUri: image.uri,
extensions: extensions,
onFetched: onFetched});
}
}
}
}
function getNextAssetPageOnFetched(a0) { // fn#85058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:612, owner: getNextAssetPage.onFetched, offset: 0x01f62414, size: 21 bytes, params: 2, frame: 11
onFetchedApplyStateUpdate(a0);
function onFetchedApplyStateUpdate(a0) { // fn#85059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:615, owner: getNextAssetPage.onFetched.applyStateUpdate, offset: 0x01f62429, size: 342 bytes, params: 2, frame: 21
var length;
var r7;
var edges;
var value4;
var unshift;
var items2;
const env0_0 = a0;
const lastAssetIndexBinding = lastAssetIndex;
const value2 = undefined;
if (a0 == null) {
length = value2;
} else {
edges = a0.edges;
length = edges == null ? value2 : edges.length;
}
const value3 = 0;
let r1 = length ?? value3;
const env0_1 = lastAssetIndexBinding + r1;
if (assets != null) {
value4 = a0 == null;
if (value4) {
r1 = value4;
r7 = value2;
} else {
edges = a0.edges;
r1 = edges == null;
r7 = edges;
}
if (!r1) {
unshift = r7.unshift;
edges = assets.edges;
items2 = [];
arraySpread(items2, edges, value3, undefined);
apply(unshift, items2, r7, undefined);
}
}
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun85060);
let r5 = a0 == null || value3 === a0.edges.length;
r5 = !r5 ? (a0.page_info == null ? value2 : a0.page_info.has_next_page) === false : r5;
if (r5) {
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun85061);
}
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const MEDIA_PICKER_INFINITE_SCROLL_PAGED = AnalyticEvents.MEDIA_PICKER_INFINITE_SCROLL_PAGED;
Reflect.apply(track, defaultImport, [MEDIA_PICKER_INFINITE_SCROLL_PAGED, {page: env1_2, has_reached_end: r5}]);
return value2;
function _fun85060() { // fn#85060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:802, offset: 0x01f6257f, size: 98 bytes, params: 1, frame: 16
const binding = env3_4;
const setState = binding.setState;
const binding2 = env0_0;
const value3 = undefined;
Reflect.apply(setState, binding, [{assets: binding2, page: env2_2, lastAssetIndex: env0_1,
endCursor: binding2 == null || env0_0.page_info == null ? value3 : env0_0.page_info.end_cursor}]);
return value3;
}
function refreshAssets({batchSize, extensions}) { // fn#85062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:1174, offset: 0x01f62603, size: 77 bytes, params: 2, frame: 14
(importDefault(11105) /* metro dependency 11105: getDeviceMediaPhotos */)({batchSize: batchSize,
extensions: extensions, onFetched: function(a0) {
_fun85064(a0);
}});
}
function _fun85061() { // fn#85061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:1036, offset: 0x01f625e1, size: 34 bytes, params: 1, frame: 12
return env3_4.setState({hasReachedEnd: env0_2});
}
function useAssets() { // fn#85067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:1930, offset: 0x01f6283d, size: 25 bytes, params: 1, frame: 11
return env0_4(function(a0) {
return a0.assets;
});
}
}
function useHasReachedEnd() { // fn#85069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:1968, offset: 0x01f62861, size: 25 bytes, params: 1, frame: 11
return env0_4(function(a0) {
return a0.hasReachedEnd;
});
}
function getNextAssetPageOnFetched(a0) { // fn#85058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:612, owner: getNextAssetPage.onFetched, offset: 0x01f62414, size: 21 bytes, params: 2, frame: 11
onFetchedApplyStateUpdate(a0);
}
function refreshAssetsOnFetched(a0) { // fn#85063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:1269, owner: refreshAssets.onFetched, offset: 0x01f62650, size: 21 bytes, params: 2, frame: 11
onFetchedApplyStateUpdate_85064(a0);
}
function onFetchedApplyStateUpdate(a0) { // fn#85059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:615, owner: getNextAssetPage.onFetched.applyStateUpdate, offset: 0x01f62429, size: 342 bytes, params: 2, frame: 21
var length;
var r7;
var edges;
var value4;
var unshift;
var items;
const env0_0 = a0;
const lastAssetIndexBinding = lastAssetIndex;
const value2 = undefined;
if (a0 == null) {
length = value2;
} else {
edges = a0.edges;
length = edges == null ? value2 : edges.length;
}
const value3 = 0;
let r1 = length ?? value3;
const env0_1 = lastAssetIndexBinding + r1;
if (assets != null) {
value4 = a0 == null;
if (value4) {
r1 = value4;
r7 = value2;
} else {
edges = a0.edges;
r1 = edges == null;
r7 = edges;
}
if (!r1) {
unshift = r7.unshift;
edges = assets.edges;
items = [];
arraySpread(items, edges, value3, undefined);
apply(unshift, items, r7, undefined);
}
function refreshAssets({batchSize, extensions}) { // fn#85062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:1174, offset: 0x01f62603, size: 77 bytes, params: 2, frame: 14
(importDefault(11105) /* metro dependency 11105: getDeviceMediaPhotos */)({batchSize: batchSize,
extensions: extensions, onFetched: function(a0) {
_fun85064(a0);
}});
function refreshAssetsOnFetched(a0) { // fn#85063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:1269, owner: refreshAssets.onFetched, offset: 0x01f62650, size: 21 bytes, params: 2, frame: 11
onFetchedApplyStateUpdate_85064(a0);
function onFetchedApplyStateUpdate_85064(a0) { // fn#85064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:1272, owner: refreshAssets.onFetched.applyStateUpdate, offset: 0x01f62665, size: 210 bytes, params: 2, frame: 19
var environment;
var value3;
var defaultImport;
const env0_0 = a0;
let value = undefined;
const length = a0 == null ? value : a0.edges.filter(function(a0) {
var value = undefined;
return (a0 == null || a0.node == null || a0.node.image == null ? value : a0.node.image.uri) == null || (a0 == null || a0.node == null || a0.node.image == null ? value : a0.node.image.uri) === '';
}).length;
const value2 = 0;
const r6 = length ?? value2;
if (r6 > value2) {
value3 = environment.__proto__.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.MEDIA_PICKER_ASSETS_DEBUG, {num_broken_assets: r6,
num_assets: a0 == null || a0.edges == null ? value : a0.edges.length,
location: 'DeviceMedia.applyStateUpdate'});
}
(ReactBatchUpdatesNativeModule).batchUpdates(_fun85066);
return value;
function _fun85066() { // fn#85066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:1703, offset: 0x01f627a5, size: 152 bytes, params: 1, frame: 17
const value = environment.__proto__.__proto__.__proto__;
const binding = env3_4;
const setState = binding.setState;
const binding2 = env0_0;
const value3 = undefined;
const has_next_page = env0_0 == null || env0_0.page_info == null ? value3 : env0_0.page_info.has_next_page;
Reflect.apply(setState, binding, [{assets: binding2, page: 0, lastAssetIndex: batchSize,
endCursor: binding2 == null || env0_0.page_info == null ? value3 : env0_0.page_info.end_cursor,
hasReachedEnd: !(has_next_page == null || has_next_page)}]);
return value3;
}
}
}
}
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun85060);
let r5 = a0 == null || value3 === a0.edges.length;
r5 = !r5 ? (a0.page_info == null ? value2 : a0.page_info.has_next_page) === false : r5;
if (r5) {
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun85061);
function useAssets() { // fn#85067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:1930, offset: 0x01f6283d, size: 25 bytes, params: 1, frame: 11
return env0_4(function(a0) {
return a0.assets;
});
}
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const MEDIA_PICKER_INFINITE_SCROLL_PAGED = AnalyticEvents.MEDIA_PICKER_INFINITE_SCROLL_PAGED;
Reflect.apply(track, defaultImport, [MEDIA_PICKER_INFINITE_SCROLL_PAGED, {page: env1_2, has_reached_end: r5}]);
return value2;
}
function onFetchedApplyStateUpdate_85064(a0) { // fn#85064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:1272, owner: refreshAssets.onFetched.applyStateUpdate, offset: 0x01f62665, size: 210 bytes, params: 2, frame: 19
var environment;
var value3;
var defaultImport;
const env0_0 = a0;
let value = undefined;
const length = a0 == null ? value : a0.edges.filter(function(a0) {
var value = undefined;
return (a0 == null || a0.node == null || a0.node.image == null ? value : a0.node.image.uri) == null || (a0 == null || a0.node == null || a0.node.image == null ? value : a0.node.image.uri) === '';
}).length;
const value2 = 0;
const r6 = length ?? value2;
if (r6 > value2) {
value3 = environment.__proto__.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.MEDIA_PICKER_ASSETS_DEBUG, {num_broken_assets: r6,
num_assets: a0 == null || a0.edges == null ? value : a0.edges.length,
location: 'DeviceMedia.applyStateUpdate'});
function useHasReachedEnd() { // fn#85069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:1968, offset: 0x01f62861, size: 25 bytes, params: 1, frame: 11
return env0_4(function(a0) {
return a0.hasReachedEnd;
});
}
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun85066);
return value;
}
function _fun85060() { // fn#85060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:802, offset: 0x01f6257f, size: 98 bytes, params: 1, frame: 16
const binding = env3_4;
const setState = binding.setState;
const binding2 = env0_0;
const value3 = undefined;
Reflect.apply(setState, binding, [{assets: binding2, page: env2_2, lastAssetIndex: env0_1,
endCursor: binding2 == null || env0_0.page_info == null ? value3 : env0_0.page_info.end_cursor}]);
return value3;
}
function _fun85061() { // fn#85061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:1036, offset: 0x01f625e1, size: 34 bytes, params: 1, frame: 12
return env3_4.setState({hasReachedEnd: env0_2});
}
function _fun85066() { // fn#85066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11290:1703, offset: 0x01f627a5, size: 152 bytes, params: 1, frame: 17
const value = environment.__proto__.__proto__.__proto__;
const binding = env3_4;
const setState = binding.setState;
const binding2 = env0_0;
const value3 = undefined;
const has_next_page = env0_0 == null || env0_0.page_info == null ? value3 : env0_0.page_info.has_next_page;
Reflect.apply(setState, binding, [{assets: binding2, page: 0, lastAssetIndex: batchSize,
endCursor: binding2 == null || env0_0.page_info == null ? value3 : env0_0.page_info.end_cursor,
hasReachedEnd: !(has_next_page == null || has_next_page)}]);
return value3;
}
global.__d(_fun85055, 11104, [661, 629, 683, 690, 11105, 477,
2]) /* metro module 11104, dependencies: [661, 629, 683, 690, 11105, 477, 2] */;
@@ -1,14 +1,20 @@
/* Metro module 7717; source: modules/device/native/DeviceOrientation.tsx; dependencies: [31, 27, 629, 477, 690, 4092, 7718, 2] */
import Module07718 from '../../../by-id/module-07718.js'; /* Metro dependency 7718 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as Module00629Module from '../../../by-id/module-00629.js'; /* Metro dependency 629 */
function _fun61716(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:6, offset: 0x01b49394, size: 470 bytes, params: 8, frame: 27
var object2;
const env0_0 = require;
const closure = handleOrientationChange;
const handleOrientationChange2 = handleOrientationChange;
const consumeUnlockAfterRotationToLockRequest = function() {
unlockOrientation({unlockAfterRotatingToPreviousLock: false});
env0_8 = false;
};
const closure2 = unlockOrientation;
const closure3 = lockOrientation;
const unlockOrientation2 = unlockOrientation;
const lockOrientation2 = lockOrientation;
const closure4 = function(a0) {
if (!(require(dependencyMap[3]).isAndroid() || require(dependencyMap[5]).isIpadOS() && a0 == null)) {
lockOrientation(a0);
@@ -16,27 +22,25 @@ function _fun61716(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const AppState = (require(27) /* metro dependency 27 */).AppState;
object2 = {PORTRAIT: 0};
object2[0] = 'PORTRAIT';
object2.LANDSCAPE = 1;
object2[1] = 'LANDSCAPE';
const AppState = (ReactNativeModule).AppState;
object = {PORTRAIT: 0};
object[0] = 'PORTRAIT';
object.LANDSCAPE = 1;
object[1] = 'LANDSCAPE';
const env0_5 = ['PORTRAIT', 'PORTRAITUPSIDEDOWN'];
let value = require(629) /* metro dependency 629 */;
let value = Module00629Module;
value = value.create(_fun61728);
(importDefault(7718) /* metro dependency 7718 */).addOrientationDegreesChangeListener(handleOrientationDegreesChange);
(importDefault(7718) /* metro dependency 7718 */).addOrientationListener(closure);
const value4 = importDefault(7718) /* metro dependency 7718 */;
const getInitialOrientation = value4.getInitialOrientation;
closure(Reflect.apply(getInitialOrientation, value4, []));
(Module07718).addOrientationDegreesChangeListener(handleOrientationDegreesChange);
(Module07718).addOrientationListener(handleOrientationChange2);
const getInitialOrientation = Module07718.getInitialOrientation;
handleOrientationChange2(Reflect.apply(getInitialOrientation, Module07718, []));
AppState.addEventListener('change', applyLockStateOnAppActive);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/native/DeviceOrientation.tsx');
exports.OrientationType = object2;
(FileImportTrackerModule).fileFinishedImporting('modules/device/native/DeviceOrientation.tsx');
exports.OrientationType = object;
exports.useStore = value;
exports.handleOrientationChange = closure;
exports.unlockOrientation = closure2;
exports.lockOrientation = closure3;
exports.handleOrientationChange = handleOrientationChange2;
exports.unlockOrientation = unlockOrientation2;
exports.lockOrientation = lockOrientation2;
exports.lockOrientationForiOS = closure4;
exports.toggleOrientation = toggleOrientation;
exports.getOrientation = getOrientation;
@@ -44,80 +48,95 @@ function _fun61716(global, require, importDefault, importAll, module, exports, d
exports.useOrientation = useOrientation;
exports.useOrientationListener = useOrientationListener;
exports.restoreDefaultOrientation = restoreDefaultOrientation;
}
function handleOrientationChange(a0) { // fn#61717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:329, offset: 0x01b4956a, size: 276 bytes, params: 2, frame: 17
var r3;
var binding;
var orientationLock;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isIOS()) {
handleDeviceOrientationChange(a0);
}
if (env0_7 !== a0) {
env0_7 = a0;
binding = env0_6;
orientationLock = binding.getState().orientationLock;
r3 = orientationLock != null && env0_5.includes(orientationLock);
if (env0_7 !== 'LANDSCAPE') {
r3 = env0_7 === 'PORTRAIT' || (require(4092) /* metro dependency 4092: DeviceUtils */).isIpadOS() && env0_7 === 'PORTRAITUPSIDEDOWN';
r3 = r3 && orientationLock !== 'LANDSCAPE';
if (r3) {
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61718);
}
} else if (r3) {
r3 = env0_7 === 'PORTRAIT' || (require(4092) /* metro dependency 4092: DeviceUtils */).isIpadOS() && env0_7 === 'PORTRAITUPSIDEDOWN';
r3 = r3 && orientationLock !== 'LANDSCAPE';
if (r3) {
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61718);
}
} else {
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61719);
function handleOrientationChange(a0) { // fn#61717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:329, offset: 0x01b4956a, size: 276 bytes, params: 2, frame: 17
var r3;
var binding;
var orientationLock;
if (PlatformUtilsModule.isIOS()) {
handleDeviceOrientationChange(a0);
}
}
}
function handleDeviceOrientationChange(a0) { // fn#61720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:721, offset: 0x01b496c8, size: 83 bytes, params: 2, frame: 12
const binding = env0_6;
const getState = binding.getState;
const orientationLock = Reflect.apply(getState, binding, []).orientationLock;
if (env0_8) {
if (a0 === 'LANDSCAPE') {
if (orientationLock === 'LANDSCAPE') {
consumeUnlockAfterRotationToLockRequest();
if (env0_7 !== a0) {
env0_7 = a0;
binding = env0_6;
orientationLock = binding.getState().orientationLock;
r3 = orientationLock != null && env0_5.includes(orientationLock);
if (env0_7 !== 'LANDSCAPE') {
r3 = env0_7 === 'PORTRAIT' || (require(4092) /* metro dependency 4092: DeviceUtils */).isIpadOS() && env0_7 === 'PORTRAITUPSIDEDOWN';
r3 = r3 && orientationLock !== 'LANDSCAPE';
if (r3) {
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61718);
}
} else if (r3) {
r3 = env0_7 === 'PORTRAIT' || (require(4092) /* metro dependency 4092: DeviceUtils */).isIpadOS() && env0_7 === 'PORTRAITUPSIDEDOWN';
r3 = r3 && orientationLock !== 'LANDSCAPE';
if (r3) {
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61718);
}
} else {
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61719);
}
} else if (a0 === 'PORTRAIT') {
if (orientationLock === 'PORTRAIT') {
consumeUnlockAfterRotationToLockRequest();
}
function _fun61718() { // fn#61718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:611, offset: 0x01b4967e, size: 37 bytes, params: 1, frame: 12
const binding = env1_6;
const setState = binding.setState;
const PORTRAIT = env1_4.PORTRAIT;
return Reflect.apply(setState, binding, [{orientation: PORTRAIT}]);
}
function _fun61719() { // fn#61719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:676, offset: 0x01b496a3, size: 37 bytes, params: 1, frame: 12
const binding = env1_6;
const setState = binding.setState;
const LANDSCAPE = env1_4.LANDSCAPE;
return Reflect.apply(setState, binding, [{orientation: LANDSCAPE}]);
}
}
function handleDeviceOrientationChange(a0) { // fn#61720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:721, offset: 0x01b496c8, size: 83 bytes, params: 2, frame: 12
const binding = env0_6;
const getState = binding.getState;
const orientationLock = Reflect.apply(getState, binding, []).orientationLock;
if (env0_8) {
if (a0 === 'LANDSCAPE') {
if (orientationLock === 'LANDSCAPE') {
consumeUnlockAfterRotationToLockRequest();
}
} else if (a0 === 'PORTRAIT') {
if (orientationLock === 'PORTRAIT') {
consumeUnlockAfterRotationToLockRequest();
}
}
}
}
}
function unlockOrientation({unlockAfterRotatingToPreviousLock}) { // fn#61722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:1082, offset: 0x01b49738, size: 239 bytes, params: 2, frame: 16
var moduleValue2;
const binding = env0_6;
const getState = binding.getState;
const orientationLock = Reflect.apply(getState, binding, []).orientationLock;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
if (unlockAfterRotatingToPreviousLock) {
if (orientationLock == null) {
function unlockOrientation({unlockAfterRotatingToPreviousLock}) { // fn#61722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:1082, offset: 0x01b49738, size: 239 bytes, params: 2, frame: 16
var moduleValue2;
const binding = env0_6;
const getState = binding.getState;
const orientationLock = Reflect.apply(getState, binding, []).orientationLock;
if (PlatformUtilsModule.isAndroid()) {
if (unlockAfterRotatingToPreviousLock) {
if (orientationLock == null) {
(importDefault(7718) /* metro dependency 7718 */).ignoreAutoRotate(false);
(importDefault(7718) /* metro dependency 7718 */).unlockAllOrientations();
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61723);
}
} else {
(importDefault(7718) /* metro dependency 7718 */).ignoreAutoRotate(false);
(importDefault(7718) /* metro dependency 7718 */).unlockAllOrientations();
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61723);
}
} else {
(importDefault(7718) /* metro dependency 7718 */).ignoreAutoRotate(false);
(importDefault(7718) /* metro dependency 7718 */).unlockAllOrientations();
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61723);
}
} else {
moduleValue2 = platformUtilsModule;
if (moduleValue2.isIOS()) {
if ((require(4092) /* metro dependency 4092: DeviceUtils */).getSystemVersionMajor() >= 16) {
if (unlockAfterRotatingToPreviousLock) {
if (orientationLock == null) {
moduleValue2 = PlatformUtilsModule;
if (moduleValue2.isIOS()) {
if ((require(4092) /* metro dependency 4092: DeviceUtils */).getSystemVersionMajor() >= 16) {
if (unlockAfterRotatingToPreviousLock) {
if (orientationLock == null) {
(importDefault(7718) /* metro dependency 7718 */).ignoreAutoRotate(false);
(importDefault(7718) /* metro dependency 7718 */).unlockAllOrientations();
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61723);
}
} else {
(importDefault(7718) /* metro dependency 7718 */).ignoreAutoRotate(false);
(importDefault(7718) /* metro dependency 7718 */).unlockAllOrientations();
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61723);
@@ -132,151 +151,149 @@ function unlockOrientation({unlockAfterRotatingToPreviousLock}) { // fn#61722, s
(importDefault(7718) /* metro dependency 7718 */).unlockAllOrientations();
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61723);
}
}
function _fun61723() { // fn#61723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:1360, offset: 0x01b49827, size: 31 bytes, params: 1, frame: 12
env1_6.setState({orientationLock: null});
}
}
function lockOrientation(a0, a1) { // fn#61724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:1404, offset: 0x01b49846, size: 192 bytes, params: 3, frame: 17
let value = a1;
const defaultImport = importDefault(7718) /* metro dependency 7718 */;
defaultImport.ignoreAutoRotate(value != null && value);
if (a0 === 'LANDSCAPE') {
value = defaultImport;
value.lockToLandscapeLeft();
value = require(690) /* metro dependency 690: ReactBatchUpdatesNative */;
value.batchUpdates(_fun61725);
} else {
(importDefault(7718) /* metro dependency 7718 */).ignoreAutoRotate(false);
(importDefault(7718) /* metro dependency 7718 */).unlockAllOrientations();
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61723);
value = importDefault(7718) /* metro dependency 7718 */;
value.lockToPortrait();
value = require(690) /* metro dependency 690: ReactBatchUpdatesNative */;
value.batchUpdates(_fun61726);
}
function _fun61725() { // fn#61725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:1547, offset: 0x01b49906, size: 33 bytes, params: 1, frame: 12
env1_6.setState({orientationLock: 'LANDSCAPE'});
}
function _fun61726() { // fn#61726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:1649, offset: 0x01b49927, size: 33 bytes, params: 1, frame: 12
env1_6.setState({orientationLock: 'PORTRAIT'});
}
}
function _fun61728() { // fn#61728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:263, offset: 0x01b499a9, size: 29 bytes, params: 1, frame: 2
const PORTRAIT = env0_4.PORTRAIT;
return {orientation: PORTRAIT, orientationLock: null};
}
function handleOrientationDegreesChange(a0) { // fn#61729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:1846, offset: 0x01b499c6, size: 198 bytes, params: 2, frame: 14
let r1 = a0 >= 0 && a0 <= 5;
r1 = !r1 ? a0 >= 355 : r1;
value = 'PORTRAIT';
const r0 = r1 === true ? value : (a0 >= 85 && a0 <= 95) === true ? 'LANDSCAPE-RIGHT' : (a0 >= 175 && a0 <= 185) === true ? 'PORTRAITUPSIDEDOWN' : (a0 >= 265 && a0 <= 275) === true ? 'LANDSCAPE-LEFT' : 'UNKNOWN';
if (r0 === 'LANDSCAPE-LEFT') {
handleDeviceOrientationChange('LANDSCAPE');
} else if (r0 === 'LANDSCAPE-RIGHT') {
handleDeviceOrientationChange('LANDSCAPE');
} else if (value === r0) {
handleDeviceOrientationChange(value);
}
}
}
function lockOrientation(a0, a1) { // fn#61724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:1404, offset: 0x01b49846, size: 192 bytes, params: 3, frame: 17
let value = a1;
const defaultImport = importDefault(7718) /* metro dependency 7718 */;
defaultImport.ignoreAutoRotate(value != null && value);
if (a0 === 'LANDSCAPE') {
value = defaultImport;
value.lockToLandscapeLeft();
value = require(690) /* metro dependency 690: ReactBatchUpdatesNative */;
value.batchUpdates(_fun61725);
} else {
value = importDefault(7718) /* metro dependency 7718 */;
value.lockToPortrait();
value = require(690) /* metro dependency 690: ReactBatchUpdatesNative */;
value.batchUpdates(_fun61726);
function applyLockStateOnAppActive(a0) { // fn#61730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:2422, offset: 0x01b49a8c, size: 64 bytes, params: 2, frame: 13
const binding = env0_6;
const getState = binding.getState;
const orientationLock = Reflect.apply(getState, binding, []).orientationLock;
if (a0 === 'active' && orientationLock != null) {
lockOrientation(orientationLock, true);
}
}
}
function _fun61728() { // fn#61728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:263, offset: 0x01b499a9, size: 29 bytes, params: 1, frame: 2
const PORTRAIT = env0_4.PORTRAIT;
return {orientation: PORTRAIT, orientationLock: null};
}
function handleOrientationDegreesChange(a0) { // fn#61729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:1846, offset: 0x01b499c6, size: 198 bytes, params: 2, frame: 14
let r1 = a0 >= 0 && a0 <= 5;
r1 = !r1 ? a0 >= 355 : r1;
value = 'PORTRAIT';
const r0 = r1 === true ? value : (a0 >= 85 && a0 <= 95) === true ? 'LANDSCAPE-RIGHT' : (a0 >= 175 && a0 <= 185) === true ? 'PORTRAITUPSIDEDOWN' : (a0 >= 265 && a0 <= 275) === true ? 'LANDSCAPE-LEFT' : 'UNKNOWN';
if (r0 === 'LANDSCAPE-LEFT') {
handleDeviceOrientationChange('LANDSCAPE');
} else if (r0 === 'LANDSCAPE-RIGHT') {
handleDeviceOrientationChange('LANDSCAPE');
} else if (value === r0) {
handleDeviceOrientationChange(value);
}
}
function applyLockStateOnAppActive(a0) { // fn#61730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:2422, offset: 0x01b49a8c, size: 64 bytes, params: 2, frame: 13
const binding = env0_6;
const getState = binding.getState;
const orientationLock = Reflect.apply(getState, binding, []).orientationLock;
if (a0 === 'active' && orientationLock != null) {
lockOrientation(orientationLock, true);
}
}
function toggleOrientation() { // fn#61731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:2841, offset: 0x01b49acc, size: 274 bytes, params: 1, frame: 16
const {orientation, orientationLock} = env0_6.getState();
const r3 = orientationLock != null && env0_5.includes(orientationLock);
const LANDSCAPE = env0_4.LANDSCAPE;
if (orientation !== LANDSCAPE) {
if (!(orientation !== env0_4.PORTRAIT || r3)) {
function toggleOrientation() { // fn#61731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:2841, offset: 0x01b49acc, size: 274 bytes, params: 1, frame: 16
const {orientation, orientationLock} = env0_6.getState();
const r3 = orientationLock != null && env0_5.includes(orientationLock);
const LANDSCAPE = env0_4.LANDSCAPE;
if (orientation !== LANDSCAPE) {
if (!(orientation !== env0_4.PORTRAIT || r3)) {
(importDefault(7718) /* metro dependency 7718 */).lockToLandscapeLeft();
(importDefault(7718) /* metro dependency 7718 */).unlockAllOrientations();
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61733);
}
} else if (orientationLock !== 'LANDSCAPE') {
(importDefault(7718) /* metro dependency 7718 */).lockToPortrait();
(importDefault(7718) /* metro dependency 7718 */).unlockAllOrientations();
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61732);
} else if (!(orientation !== env0_4.PORTRAIT || r3)) {
(importDefault(7718) /* metro dependency 7718 */).lockToLandscapeLeft();
(importDefault(7718) /* metro dependency 7718 */).unlockAllOrientations();
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61733);
}
} else if (orientationLock !== 'LANDSCAPE') {
(importDefault(7718) /* metro dependency 7718 */).lockToPortrait();
(importDefault(7718) /* metro dependency 7718 */).unlockAllOrientations();
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61732);
} else if (!(orientation !== env0_4.PORTRAIT || r3)) {
(importDefault(7718) /* metro dependency 7718 */).lockToLandscapeLeft();
(importDefault(7718) /* metro dependency 7718 */).unlockAllOrientations();
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61733);
function _fun61732() { // fn#61732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:3039, offset: 0x01b4967e, size: 37 bytes, params: 1, frame: 12
const binding = env1_6;
const setState = binding.setState;
const PORTRAIT = env1_4.PORTRAIT;
return Reflect.apply(setState, binding, [{orientation: PORTRAIT}]);
}
function _fun61733() { // fn#61733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:3187, offset: 0x01b496a3, size: 37 bytes, params: 1, frame: 12
const binding = env1_6;
const setState = binding.setState;
const LANDSCAPE = env1_4.LANDSCAPE;
return Reflect.apply(setState, binding, [{orientation: LANDSCAPE}]);
}
}
}
function getOrientation() { // fn#61734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:3250, offset: 0x01b49bde, size: 25 bytes, params: 1, frame: 9
const binding = env0_6;
const getState = binding.getState;
return Reflect.apply(getState, binding, []).orientation;
}
function getOrientation() { // fn#61734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:3250, offset: 0x01b49bde, size: 25 bytes, params: 1, frame: 9
const binding = env0_6;
const getState = binding.getState;
return Reflect.apply(getState, binding, []).orientation;
}
function getOrientationLock() { // fn#61735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:3330, offset: 0x01b49bf7, size: 25 bytes, params: 1, frame: 9
const binding = env0_6;
const getState = binding.getState;
return Reflect.apply(getState, binding, []).orientationLock;
}
function getOrientationLock() { // fn#61735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:3330, offset: 0x01b49bf7, size: 25 bytes, params: 1, frame: 9
const binding = env0_6;
const getState = binding.getState;
return Reflect.apply(getState, binding, []).orientationLock;
}
function useOrientation() { // fn#61736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:3414, offset: 0x01b49c10, size: 21 bytes, params: 1, frame: 9
return env0_6().orientation;
}
function useOrientation() { // fn#61736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:3414, offset: 0x01b49c10, size: 21 bytes, params: 1, frame: 9
return env0_6().orientation;
}
function useOrientationListener(a0) { // fn#61737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:3489, offset: 0x01b49c25, size: 44 bytes, params: 2, frame: 14
const env0_0 = a0;
env0_3.useEffect(_fun61738, [a0]);
}
function useOrientationListener(a0) { // fn#61737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:3489, offset: 0x01b49c25, size: 44 bytes, params: 2, frame: 14
const env0_0 = a0;
ReactModule.useEffect(_fun61738, [a0]);
function _fun61738() { // fn#61738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:3537, offset: 0x01b49c51, size: 27 bytes, params: 1, frame: 11
return env1_6.subscribe(env0_0);
}
function restoreDefaultOrientation() { // fn#61739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:3591, offset: 0x01b49c6c, size: 129 bytes, params: 1, frame: 13
var moduleValue2;
var binding;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isIOS()) {
moduleValue2 = require(4092) /* metro dependency 4092: DeviceUtils */;
if (moduleValue2.isIpadOS()) {
}
function restoreDefaultOrientation() { // fn#61739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:3591, offset: 0x01b49c6c, size: 129 bytes, params: 1, frame: 13
var moduleValue2;
var binding;
if (PlatformUtilsModule.isIOS()) {
moduleValue2 = require(4092) /* metro dependency 4092: DeviceUtils */;
if (moduleValue2.isIpadOS()) {
unlockOrientation({unlockAfterRotatingToPreviousLock: false});
lockOrientationForiOS();
return undefined;
}
binding = env0_6;
if (binding.getState().orientationLock !== 'PORTRAIT') {
unlockOrientation({unlockAfterRotatingToPreviousLock: false});
lockOrientationForiOS();
return undefined;
}
} else {
unlockOrientation({unlockAfterRotatingToPreviousLock: false});
lockOrientationForiOS();
return undefined;
}
binding = env0_6;
if (binding.getState().orientationLock !== 'PORTRAIT') {
unlockOrientation({unlockAfterRotatingToPreviousLock: false});
lockOrientationForiOS();
return undefined;
}
} else {
unlockOrientation({unlockAfterRotatingToPreviousLock: false});
lockOrientationForiOS();
}
}
function _fun61718() { // fn#61718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:611, offset: 0x01b4967e, size: 37 bytes, params: 1, frame: 12
const binding = env1_6;
const setState = binding.setState;
const PORTRAIT = env1_4.PORTRAIT;
return Reflect.apply(setState, binding, [{orientation: PORTRAIT}]);
}
function _fun61719() { // fn#61719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:676, offset: 0x01b496a3, size: 37 bytes, params: 1, frame: 12
const binding = env1_6;
const setState = binding.setState;
const LANDSCAPE = env1_4.LANDSCAPE;
return Reflect.apply(setState, binding, [{orientation: LANDSCAPE}]);
}
function _fun61723() { // fn#61723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:1360, offset: 0x01b49827, size: 31 bytes, params: 1, frame: 12
env1_6.setState({orientationLock: null});
}
function _fun61725() { // fn#61725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:1547, offset: 0x01b49906, size: 33 bytes, params: 1, frame: 12
env1_6.setState({orientationLock: 'LANDSCAPE'});
}
function _fun61726() { // fn#61726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:1649, offset: 0x01b49927, size: 33 bytes, params: 1, frame: 12
env1_6.setState({orientationLock: 'PORTRAIT'});
}
function _fun61738() { // fn#61738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7895:3537, offset: 0x01b49c51, size: 27 bytes, params: 1, frame: 11
return env1_6.subscribe(env0_0);
}
global.__d(_fun61716, 7717, [31, 27, 629, 477, 690, 4092, 7718,
2]) /* metro module 7717, dependencies: [31, 27, 629, 477, 690, 4092, 7718, 2] */;
+107 -103
View File
@@ -1,115 +1,119 @@
/* Metro module 7139; source: modules/device/native/DeviceState.tsx; dependencies: [5, 27, 3, 7140, 2] */
import Logger from '../../debug/Logger.tsx'; /* Metro dependency 3 */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
function _fun57127(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#57127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7317:6, offset: 0x013dd34b, size: 191 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = (require(27) /* metro dependency 27 */).NativeModules;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('native/DeviceState.tsx');
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/native/DeviceState.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/device/native/DeviceState.tsx');
exports.logger = value;
exports.getDeviceState = function() {
return _getDeviceState.apply(this, arguments);
};
function _getDeviceState() { // fn#57128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7317:171, offset: 0x013dd40a, size: 48 bytes, params: 1, frame: 14
return Module00005(_fun57130).apply(this, arguments);
async function _fun57130() { // fn#57130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7317:224, offset: 0x013dd44c, size: 157 bytes, params: 1, frame: 19
var r2;
var binding;
var MediaManager;
var getDeviceStateInfo;
var value5;
var value6;
var value7;
var error;
var DEFAULT_DEVICE_STATE;
let value = a0;
if (false) {
return undefined;
}
const fallback = (value !== undefined ? value : {fallback: true}).fallback;
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
try {
binding = env2_3;
} catch (error) {
binding = env2_4;
binding.warn('Failed to get device state:', error);
if (fallback) {
binding = env2_0;
DEFAULT_DEVICE_STATE = binding(env2_1[3]).DEFAULT_DEVICE_STATE;
r2 = DEFAULT_DEVICE_STATE;
} else {
r2 = error;
}
return r2;
}
try {
MediaManager = binding.MediaManager;
} catch (error) {
binding = env2_4;
binding.warn('Failed to get device state:', error);
if (fallback) {
binding = env2_0;
DEFAULT_DEVICE_STATE = binding(env2_1[3]).DEFAULT_DEVICE_STATE;
r2 = DEFAULT_DEVICE_STATE;
} else {
r2 = error;
}
return r2;
}
try {
getDeviceStateInfo = MediaManager.getDeviceStateInfo;
} catch (error) {
binding = env2_4;
binding.warn('Failed to get device state:', error);
if (fallback) {
binding = env2_0;
DEFAULT_DEVICE_STATE = binding(env2_1[3]).DEFAULT_DEVICE_STATE;
r2 = DEFAULT_DEVICE_STATE;
} else {
r2 = error;
}
return r2;
}
try {
value5 = Reflect.apply(getDeviceStateInfo, MediaManager, []);
} catch (error) {
binding = env2_4;
binding.warn('Failed to get device state:', error);
if (fallback) {
binding = env2_0;
DEFAULT_DEVICE_STATE = binding(env2_1[3]).DEFAULT_DEVICE_STATE;
r2 = DEFAULT_DEVICE_STATE;
} else {
r2 = error;
}
return r2;
}
await value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
binding = env2_4;
binding.warn('Failed to get device state:', error);
if (fallback) {
binding = env2_0;
DEFAULT_DEVICE_STATE = binding(env2_1[3]).DEFAULT_DEVICE_STATE;
r2 = DEFAULT_DEVICE_STATE;
} else {
r2 = error;
}
return r2;
}
return value7 ? value6 : value6;
}
}
}
function _getDeviceState() { // fn#57128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7317:171, offset: 0x013dd40a, size: 48 bytes, params: 1, frame: 14
return env0_2(_fun57130).apply(this, arguments);
}
async function _fun57130() { // fn#57130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7317:224, offset: 0x013dd44c, size: 157 bytes, params: 1, frame: 19
var r2;
var binding;
var MediaManager;
var getDeviceStateInfo;
var value5;
var value6;
var value7;
var error;
var DEFAULT_DEVICE_STATE;
let value = a0;
if (false) {
return undefined;
}
const fallback = (value !== undefined ? value : {fallback: true}).fallback;
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
try {
binding = env2_3;
} catch (error) {
binding = env2_4;
binding.warn('Failed to get device state:', error);
if (fallback) {
binding = env2_0;
DEFAULT_DEVICE_STATE = binding(env2_1[3]).DEFAULT_DEVICE_STATE;
r2 = DEFAULT_DEVICE_STATE;
} else {
r2 = error;
}
return r2;
}
try {
MediaManager = binding.MediaManager;
} catch (error) {
binding = env2_4;
binding.warn('Failed to get device state:', error);
if (fallback) {
binding = env2_0;
DEFAULT_DEVICE_STATE = binding(env2_1[3]).DEFAULT_DEVICE_STATE;
r2 = DEFAULT_DEVICE_STATE;
} else {
r2 = error;
}
return r2;
}
try {
getDeviceStateInfo = MediaManager.getDeviceStateInfo;
} catch (error) {
binding = env2_4;
binding.warn('Failed to get device state:', error);
if (fallback) {
binding = env2_0;
DEFAULT_DEVICE_STATE = binding(env2_1[3]).DEFAULT_DEVICE_STATE;
r2 = DEFAULT_DEVICE_STATE;
} else {
r2 = error;
}
return r2;
}
try {
value5 = Reflect.apply(getDeviceStateInfo, MediaManager, []);
} catch (error) {
binding = env2_4;
binding.warn('Failed to get device state:', error);
if (fallback) {
binding = env2_0;
DEFAULT_DEVICE_STATE = binding(env2_1[3]).DEFAULT_DEVICE_STATE;
r2 = DEFAULT_DEVICE_STATE;
} else {
r2 = error;
}
return r2;
}
await value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
binding = env2_4;
binding.warn('Failed to get device state:', error);
if (fallback) {
binding = env2_0;
DEFAULT_DEVICE_STATE = binding(env2_1[3]).DEFAULT_DEVICE_STATE;
r2 = DEFAULT_DEVICE_STATE;
} else {
r2 = error;
}
return r2;
}
return value7 ? value6 : value6;
}
global.__d(_fun57127, 7139, [5, 27, 3, 7140, 2]) /* metro module 7139, dependencies: [5, 27, 3, 7140, 2] */;
+41 -38
View File
@@ -1,52 +1,55 @@
/* Metro module 10706; source: modules/device/native/WakeLock.tsx; dependencies: [31, 27, 477, 10707, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
function _fun82266(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10892:6, offset: 0x01ef14a9, size: 160 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = useWakeLock;
const useWakeLock2 = useWakeLock;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).NativeModules;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/native/WakeLock.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/device/native/WakeLock.tsx');
exports.default = function({wakeLockKey}) {
useWakeLock(wakeLockKey);
return null;
};
exports.useWakeLock = closure;
}
exports.useWakeLock = useWakeLock2;
function useWakeLock(a0) { // fn#82267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10892:130, offset: 0x01ef1549, size: 46 bytes, params: 2, frame: 14
const env0_0 = a0;
ReactModule.useEffect(_fun82268, [a0]);
function _fun82268() { // fn#82268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10892:167, offset: 0x01ef1577, size: 117 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
if (PlatformUtilsModule.isAndroid()) {
(importDefault(10707) /* metro dependency 10707: NativeScreenWakeLockModule */).requestLock(env0_0);
} else {
NativeModules.ScreenWakeLockManager.requestLock(env0_0);
}
return _fun82269;
function _fun82269() { // fn#82269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10892:254, offset: 0x01ef15ec, size: 108 bytes, params: 1, frame: 13
var ScreenWakeLockManager;
var releaseLock;
var value2;
let value = environment.__proto__.__proto__;
if (PlatformUtilsModule.isAndroid()) {
value = importDefault(10707) /* metro dependency 10707: NativeScreenWakeLockModule */;
releaseLock = value.releaseLock;
value2 = environment.__proto__;
Reflect.apply(releaseLock, value, [env1_0]);
} else {
ScreenWakeLockManager = NativeModules.ScreenWakeLockManager;
releaseLock = ScreenWakeLockManager.releaseLock;
value = environment.__proto__;
Reflect.apply(releaseLock, ScreenWakeLockManager, [env1_0]);
}
}
function useWakeLock(a0) { // fn#82267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10892:130, offset: 0x01ef1549, size: 46 bytes, params: 2, frame: 14
const env0_0 = a0;
env0_3.useEffect(_fun82268, [a0]);
}
}
function _fun82268() { // fn#82268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10892:167, offset: 0x01ef1577, size: 117 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
(importDefault(10707) /* metro dependency 10707: NativeScreenWakeLockModule */).requestLock(env0_0);
} else {
NativeModules.ScreenWakeLockManager.requestLock(env0_0);
}
return _fun82269;
}
function _fun82269() { // fn#82269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10892:254, offset: 0x01ef15ec, size: 108 bytes, params: 1, frame: 13
var ScreenWakeLockManager;
var releaseLock;
var value2;
let value = environment.__proto__.__proto__;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
value = importDefault(10707) /* metro dependency 10707: NativeScreenWakeLockModule */;
releaseLock = value.releaseLock;
value2 = environment.__proto__;
Reflect.apply(releaseLock, value, [env1_0]);
} else {
ScreenWakeLockManager = NativeModules.ScreenWakeLockManager;
releaseLock = ScreenWakeLockManager.releaseLock;
value = environment.__proto__;
Reflect.apply(releaseLock, ScreenWakeLockManager, [env1_0]);
}
}
global.__d(_fun82266, 10706, [31, 27, 477, 10707,
2]) /* metro module 10706, dependencies: [31, 27, 477, 10707, 2] */;
@@ -1,40 +1,46 @@
/* Metro module 11105; source: modules/device/native/getDeviceMediaPhotos.tsx; dependencies: [27, 3, 1216, 477, 11106, 2] */
import Logger from '../../debug/Logger.tsx'; /* Metro dependency 3 */
import SentryUtilsNative from '../../../utils/SentryUtils.native.tsx'; /* Metro dependency 1216 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
function _fun85071(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11291:6, offset: 0x01f62885, size: 166 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).NativeModules;
let value = importDefault(3) /* metro dependency 3: Logger */;
let value = Logger;
value = new value('DeviceMedia.tsx');
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/native/getDeviceMediaPhotos.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/device/native/getDeviceMediaPhotos.tsx');
exports.default = getDeviceMediaPhotos;
}
function getDeviceMediaPhotos({batchSize, endCursor, lastAssetIndex, lastNodeImageUri, extensions, onFetched, onError = getDeviceMediaPhotosU}) { // fn#85072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11291:247, offset: 0x01f6292b, size: 280 bytes, params: 2, frame: 21
var CameraRollUtils;
var value;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isIOS()) {
if ((importDefault(11106) /* metro dependency 11106: DCDPhotos */) != null) {
value = importDefault(11106) /* metro dependency 11106: DCDPhotos */;
value = value.getPhotos({'first': null, 'groupTypes': 'Recents', 'assetType': 'All', first: batchSize,
after: endCursor, extensions: extensions});
function getDeviceMediaPhotos({batchSize, endCursor, lastAssetIndex, lastNodeImageUri, extensions, onFetched, onError = getDeviceMediaPhotosU}) { // fn#85072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11291:247, offset: 0x01f6292b, size: 280 bytes, params: 2, frame: 21
var CameraRollUtils;
var value;
if (PlatformUtilsModule.isIOS()) {
if ((importDefault(11106) /* metro dependency 11106: DCDPhotos */) != null) {
value = importDefault(11106) /* metro dependency 11106: DCDPhotos */;
value = value.getPhotos({'first': null, 'groupTypes': 'Recents', 'assetType': 'All', first: batchSize,
after: endCursor, extensions: extensions});
value = value.then(onFetched);
value.catch(onError);
}
} else {
CameraRollUtils = NativeModules.CameraRollUtils;
value = CameraRollUtils.getPhotos({first: batchSize, assetType: 'All', after: lastNodeImageUri,
offset: lastAssetIndex, extensions: extensions});
value = value.then(onFetched);
value.catch(onError);
}
} else {
CameraRollUtils = NativeModules.CameraRollUtils;
value = CameraRollUtils.getPhotos({first: batchSize, assetType: 'All', after: lastNodeImageUri,
offset: lastAssetIndex, extensions: extensions});
value = value.then(onFetched);
value.catch(onError);
function getDeviceMediaPhotosU(a0) { // fn#85073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11291:373, owner: getDeviceMediaPhotos.u, offset: 0x01f62a43, size: 100 bytes, params: 2, frame: 16
const value = environment.__proto__;
env1_4.log('CameraRollUtils -- Failed to get photos with error ' + a0);
(SentryUtilsNative).captureException(a0,
{tags: {source: 'DEVICE_MEDIA'}});
}
}
}
function getDeviceMediaPhotosU(a0) { // fn#85073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11291:373, owner: getDeviceMediaPhotos.u, offset: 0x01f62a43, size: 100 bytes, params: 2, frame: 16
const value = environment.__proto__;
env1_4.log('CameraRollUtils -- Failed to get photos with error ' + a0);
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureException(a0,
{tags: {source: 'DEVICE_MEDIA'}});
}
global.__d(_fun85071, 11105, [27, 3, 1216, 477, 11106,
2]) /* metro module 11105, dependencies: [27, 3, 1216, 477, 11106, 2] */;
+72 -71
View File
@@ -1,86 +1,87 @@
/* Metro module 8095; source: modules/device/useThermalState.tsx; dependencies: [477, 8093, 2] */
import ThermalUtilsNative from './ThermalUtils.native.tsx'; /* Metro dependency 8093 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun64883(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#64883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8280:6, offset: 0x01bb7ddf, size: 334 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object3 = {UNHANDLED: -1};
object3[-1] = 'UNHANDLED';
object3.NOMINAL = 0;
object3[0] = 'NOMINAL';
object3.FAIR = 1;
object3[1] = 'FAIR';
object3.SERIOUS = 2;
object3[2] = 'SERIOUS';
object3.CRITICAL = 3;
object3[3] = 'CRITICAL';
const object4 = {NONE: 0};
object4[0] = 'NONE';
object4.LIGHT = 1;
object4[1] = 'LIGHT';
object4.MODERATE = 2;
object4[2] = 'MODERATE';
object4.SEVERE = 3;
object4[3] = 'SEVERE';
object4.CRITICAL = 4;
object4[4] = 'CRITICAL';
object4.EMERGENCY = 5;
object4[5] = 'EMERGENCY';
object4.SHUTDOWN = 6;
object4[6] = 'SHUTDOWN';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/device/useThermalState.tsx');
object = {UNHANDLED: -1};
object[-1] = 'UNHANDLED';
object.NOMINAL = 0;
object[0] = 'NOMINAL';
object.FAIR = 1;
object[1] = 'FAIR';
object.SERIOUS = 2;
object[2] = 'SERIOUS';
object.CRITICAL = 3;
object[3] = 'CRITICAL';
const object2 = {NONE: 0};
object2[0] = 'NONE';
object2.LIGHT = 1;
object2[1] = 'LIGHT';
object2.MODERATE = 2;
object2[2] = 'MODERATE';
object2.SEVERE = 3;
object2[3] = 'SEVERE';
object2.CRITICAL = 4;
object2[4] = 'CRITICAL';
object2.EMERGENCY = 5;
object2[5] = 'EMERGENCY';
object2.SHUTDOWN = 6;
object2[6] = 'SHUTDOWN';
(FileImportTrackerModule).fileFinishedImporting('modules/device/useThermalState.tsx');
exports.default = useThermalState;
exports.ThermalStates = object3;
exports.AndroidThermalStates = object4;
exports.ThermalStates = object;
exports.AndroidThermalStates = object2;
exports.getThermalState = getThermalState;
}
function _getThermalState(a0) { // fn#64884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8280:451, offset: 0x01bb7f2d, size: 271 bytes, params: 2, frame: 14
if (a0 != null) {
var moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isIOS()) {
return a0;
}
var moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue2.isAndroid()) {
if (env0_4.NONE === a0) {
return env0_3.NOMINAL;
function _getThermalState(a0) { // fn#64884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8280:451, offset: 0x01bb7f2d, size: 271 bytes, params: 2, frame: 14
if (a0 != null) {
var moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue.isIOS()) {
return a0;
}
if (env0_4.LIGHT === a0) {
return env0_3.FAIR;
var moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue2.isAndroid()) {
if (env0_4.NONE === a0) {
return env0_3.NOMINAL;
}
if (env0_4.LIGHT === a0) {
return env0_3.FAIR;
}
if (env0_4.MODERATE === a0) {
return env0_3.FAIR;
}
if (env0_4.SEVERE === a0) {
return env0_3.SERIOUS;
}
if (env0_4.CRITICAL === a0) {
return env0_3.CRITICAL;
}
if (env0_4.EMERGENCY === a0) {
return env0_3.CRITICAL;
}
if (env0_4.SHUTDOWN === a0) {
return env0_3.CRITICAL;
}
return env0_3.UNHANDLED;
}
if (env0_4.MODERATE === a0) {
return env0_3.FAIR;
}
if (env0_4.SEVERE === a0) {
return env0_3.SERIOUS;
}
if (env0_4.CRITICAL === a0) {
return env0_3.CRITICAL;
}
if (env0_4.EMERGENCY === a0) {
return env0_3.CRITICAL;
}
if (env0_4.SHUTDOWN === a0) {
return env0_3.CRITICAL;
}
return env0_3.UNHANDLED;
}
return env0_3.UNHANDLED;
}
return env0_3.UNHANDLED;
}
function useThermalState() { // fn#64885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8280:867, offset: 0x01bb803c, size: 46 bytes, params: 1, frame: 12
const _getThermalStateBinding = _getThermalState;
const value = importDefault(8093) /* metro dependency 8093: ThermalUtilsNative */;
const useRawThermalState = value.useRawThermalState;
return _getThermalStateBinding(Reflect.apply(useRawThermalState, value, []));
}
function useThermalState() { // fn#64885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8280:867, offset: 0x01bb803c, size: 46 bytes, params: 1, frame: 12
const _getThermalStateBinding = _getThermalState;
const useRawThermalState = ThermalUtilsNative.useRawThermalState;
return _getThermalStateBinding(Reflect.apply(useRawThermalState, ThermalUtilsNative, []));
}
function getThermalState() { // fn#64886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8280:1010, offset: 0x01bb806a, size: 46 bytes, params: 1, frame: 12
const _getThermalStateBinding = _getThermalState;
const getRawThermalState = ThermalUtilsNative.getRawThermalState;
return _getThermalStateBinding(Reflect.apply(getRawThermalState, ThermalUtilsNative, []));
}
function getThermalState() { // fn#64886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8280:1010, offset: 0x01bb806a, size: 46 bytes, params: 1, frame: 12
const _getThermalStateBinding = _getThermalState;
const value = importDefault(8093) /* metro dependency 8093: ThermalUtilsNative */;
const getRawThermalState = value.getRawThermalState;
return _getThermalStateBinding(Reflect.apply(getRawThermalState, value, []));
}
global.__d(_fun64883, 8095, [477, 8093, 2]) /* metro module 8095, dependencies: [477, 8093, 2] */;