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

107 lines
5.4 KiB
JavaScript

/* Metro module 1113; source: unknown; dependencies: [826, 1080] */
import * as Module00826Module from './module-00826.js'; /* Metro dependency 826 */
function _fun12472(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#12472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1240:6, offset: 0x00dcc933, size: 109 bytes, params: 8, frame: 19
let env0_0 = require;
const _wrappedIsEnabled = function(a0) {
var env0_0 = a0;
return _fun12474;
};
const Object = global.Object;
const defineProperty = Object.defineProperty;
const Symbol = global.Symbol;
Reflect.apply(defineProperty, Object, [exports, Symbol.toStringTag, {value: 'Module'}]);
exports.unleashIntegration = (require(826) /* metro dependency 826 */).defineIntegration(function({featureFlagClientClass}) {
return {name: 'Unleash', setupOnce: _fun12476, processEvent: _fun12477};
});
function _wrappedIsEnabled(a0) { // fn#12473, offset: 0x00dcc9a0, size: 16 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun12474;
function _fun12474() { // fn#12474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1240:423, offset: 0x00dcc9b0, size: 295 bytes, params: 1, frame: 28
var r0;
var value5;
var value7;
var DEBUG_BUILD;
var debug;
var error;
var HermesInternal;
var concat;
var value8;
var moduleValue;
var _INTERNAL_insertFlagToScope;
var moduleValue2;
var _INTERNAL_addFeatureFlagToActiveSpan;
let value = arguments.length;
const Array = global.Array;
const array = new Array(value);
const value4 = 0;
if (value4 < value) {
r0 = value4;
reducibleLoop1: while (true) {
array[r0] = arguments[r0];
value5 = typeof r0 === 'bigint' ? r0 + 1n : +r0 + 1;
if (value5 < value) {
r0 = value5;
continue reducibleLoop1;
}
break reducibleLoop1;
}
}
const property = array[value4];
value = env0_0.apply(this, array);
const value6 = typeof property;
reducibleJoin7: while (true) {
reducibleJoin4: while (true) {
if (value6 !== 'string') {
break reducibleJoin4;
}
if (typeof value === 'boolean') {
value8 = environment.__proto__;
moduleValue = require(dependencyMap[value4]);
_INTERNAL_insertFlagToScope = moduleValue._INTERNAL_insertFlagToScope;
Reflect.apply(_INTERNAL_insertFlagToScope, moduleValue, [property, value]);
moduleValue2 = require(dependencyMap[value4]);
_INTERNAL_addFeatureFlagToActiveSpan = moduleValue2._INTERNAL_addFeatureFlagToActiveSpan;
Reflect.apply(_INTERNAL_addFeatureFlagToActiveSpan, moduleValue2, [property, value]);
break reducibleJoin7;
}
break reducibleJoin4;
}
value7 = environment.__proto__;
DEBUG_BUILD = (require(1080) /* metro dependency 1080 */).DEBUG_BUILD;
if (DEBUG_BUILD) {
debug = require(dependencyMap[value4]).debug;
error = debug.error;
HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
Reflect.apply(error, debug,
['[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ' + property + ' (' + value6 + '), result: ' + value + ' (' + typeof value + ')']);
break reducibleJoin7;
}
break reducibleJoin7;
}
return value;
}
}
function _fun12475({featureFlagClientClass}) { // fn#12475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1240:124, offset: 0x00dccad7, size: 51 bytes, params: 2, frame: 3
return {name: 'Unleash', setupOnce: function() {
require(dependencyMap[0]).fill(featureFlagClientClass.prototype, 'isEnabled', _wrappedIsEnabled);
}, processEvent: processEvent_12477};
function setupOnce_12476() { // fn#12476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1240:199, offset: 0x00dccb0a, size: 59 bytes, params: 1, frame: 16
const prototype = featureFlagClientClass.prototype;
Module00826Module.fill(prototype, 'isEnabled', _wrappedIsEnabled);
}
function processEvent_12477(a0, a1, a2) { // fn#12477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1240:298, offset: 0x00dcc701, size: 40 bytes, params: 4, frame: 11
const value = environment.__proto__;
return (Module00826Module)._INTERNAL_copyFlagsFromScopeToEvent(a0);
}
}
}
global.__d(_fun12472, 1113, [826, 1080]) /* metro module 1113, dependencies: [826, 1080] */;