Files
discord-decomp/_bundle/Module1002.js
T
2026-11-01 12:12:55 +02:00

66 lines
2.3 KiB
JavaScript

// Metro module 1002 (f1003).
import _slicedToArray from "./_slicedToArray";
import { Platform } from "react-native";
import { RN_GLOBAL_OBJ } from "./Module816";
import { ReactNativeLibraries } from "./Module997";
import { getExpoGo, getExpoConstants } from "./Module1003";
Platform;
export function isHermesEnabled() {
return !!RN_GLOBAL_OBJ.HermesInternal;
}
export function isTurboModuleEnabled() {
return RN_GLOBAL_OBJ.RN$Bridgeless === true || RN_GLOBAL_OBJ.__turboModuleProxy != null;
}
export function isFabricEnabled() {
return RN_GLOBAL_OBJ.nativeFabricUIManager != null;
}
export function getReactNativeVersion() {
if (ReactNativeLibraries.ReactNativeVersion) {
const version = ReactNativeLibraries.ReactNativeVersion.version;
return `${version.major}.${version.minor}.${version.patch}${version.prerelease != null ? `-${version.prerelease}` : ""}`;
}
}
export function isExpo() {
return RN_GLOBAL_OBJ.expo != null;
}
export function isExpoGo() {
return !!getExpoGo();
}
export function getExpoGoVersion() {
const expoConstants = getExpoConstants();
return typeof expoConstants?.expoVersion === "string" ? expoConstants.expoVersion : void 0;
}
export function getExpoSdkVersion() {
const expoConstants = getExpoConstants();
const manifest = expoConstants?.manifest;
return _slicedToArray(typeof (manifest !== null ? manifest !== void 0 ? manifest.runtimeVersion : void 0 : void 0) === "string" ? expoConstants.manifest.runtimeVersion.split(":") : [], 2)[1];
}
export function isWeb() {
return false;
}
export function notWeb() {
return true;
}
export function isMobileOs() {
return true;
}
export function notMobileOs() {
return false;
}
export function getHermesVersion() {
const HermesInternal2 = RN_GLOBAL_OBJ.HermesInternal;
const r4 = HermesInternal2 !== null ? HermesInternal2 !== void 0 ? HermesInternal2.getRuntimeProperties : void 0 : void 0;
return r4 !== null ? r4 !== void 0 ? r4.call(HermesInternal2)["OSS Release Version"] : void 0 : void 0;
}
export function getDefaultEnvironment() {
return "production";
}
export function isRunningInMetroDevServer() {
let r0 = RN_GLOBAL_OBJ.process !== void 0;
if (r0) {
const env = RN_GLOBAL_OBJ.process.env;
r0 = (env !== null ? env !== void 0 ? env.___SENTRY_METRO_DEV_SERVER___ : void 0 : void 0) === "true";
}
return r0;
}