Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,300 @@
/* Metro module 16193; source: modules/libdiscore/LibdiscoreExperimentManager.tsx; dependencies: [6, 7, 15, 17, 18, 1220, 1873, 1870, 628, 1854, 4860, 2] */
function _fun125124(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#125124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16401:6, offset: 0x025cec92, size: 296 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_125130 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const initializeAllExperiments = function() {
var ALL_LIBDISCORE_EXPERIMENTS = require(dependencyMap[7]).ALL_LIBDISCORE_EXPERIMENTS;
ALL_LIBDISCORE_EXPERIMENTS.forEach(_fun125133);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const apexExperimentStore = importDefault(1220) /* metro dependency 1220: ApexExperimentStore */;
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
value = _fun125136(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/libdiscore/LibdiscoreExperimentManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_125125() { // fn#125125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16401:160, offset: 0x025cedba, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_125125_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_125128(a0, a1) { // fn#125128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16401:353, offset: 0x025cee1c, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun125129;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_125130(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_125130(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_125130(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun125129;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function experimentStoreUpdateHandler() { // fn#125131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16401:1274, offset: 0x025cef90, size: 273 bytes, params: 1, frame: 18
var r4;
var r3;
var moduleValue2;
var isExperimentSyncDisabled;
var object2;
var _createForOfIteratorHelperLoose_125128Binding;
var ALL_LIBDISCORE_EXPERIMENTS;
var value2;
var value3;
var done;
var value4;
var id;
var getCurrentConfig;
var value5;
var value6;
var defaultImport;
var value7;
var moduleValue3;
var getExperimentCacher;
var value8;
var flushToCache;
var JSON;
var stringify;
const shimNativeModule = require(1873) /* metro dependency 1873: shimNative */;
reducibleJoin8: while (true) {
if (shimNativeModule.isLibdiscoreInitialized()) {
moduleValue2 = require(1870) /* metro dependency 1870: libdiscoreExperiments */;
isExperimentSyncDisabled = moduleValue2.isExperimentSyncDisabled;
if (Reflect.apply(isExperimentSyncDisabled, moduleValue2, [])) {
break reducibleJoin8;
}
object2 = {};
_createForOfIteratorHelperLoose_125128Binding = _createForOfIteratorHelperLoose_125128;
ALL_LIBDISCORE_EXPERIMENTS = (require(1870) /* metro dependency 1870: libdiscoreExperiments */).ALL_LIBDISCORE_EXPERIMENTS;
value2 = _createForOfIteratorHelperLoose_125128Binding(ALL_LIBDISCORE_EXPERIMENTS);
value3 = value2();
done = value3.done;
if (!done) {
r4 = value3;
reducibleLoop3: while (true) {
value4 = r4.value;
id = value4.id;
getCurrentConfig = value4.getCurrentConfig;
object2[id] = Reflect.apply(getCurrentConfig, value4, []);
value5 = value2();
done = value5.done;
if (done) {
break reducibleLoop3;
}
r4 = value5;
continue reducibleLoop3;
}
}
value6 = env0_9 != null;
reducibleJoin6: while (true) {
if (value6) {
defaultImport = importDefault(628) /* metro dependency 628: shallowEqual */;
value7 = defaultImport(env0_9, object2);
r3 = value7;
break reducibleJoin6;
}
r3 = value6;
break reducibleJoin6;
}
if (r3) {
break reducibleJoin8;
}
moduleValue3 = shimNativeModule;
getExperimentCacher = moduleValue3.getExperimentCacher;
value8 = Reflect.apply(getExperimentCacher, moduleValue3, []);
flushToCache = value8.flushToCache;
JSON = global.JSON;
stringify = JSON.stringify;
Reflect.apply(flushToCache, value8, [Reflect.apply(stringify, JSON, [object2])]);
env0_9 = object2;
break reducibleJoin8;
}
break reducibleJoin8;
}
}
function initializeAllExperiments() { // fn#125132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16401:1629, offset: 0x025cf0a1, size: 52 bytes, params: 1, frame: 12
const ALL_LIBDISCORE_EXPERIMENTS = (require(1870) /* metro dependency 1870: libdiscoreExperiments */).ALL_LIBDISCORE_EXPERIMENTS;
ALL_LIBDISCORE_EXPERIMENTS.forEach(function(a0) {
a0.setExperiment(_fun125134(a0));
});
}
function _fun125136(a0) { // fn#125136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16401:1976, offset: 0x025cf19a, size: 97 bytes, params: 2, frame: 16
const closure = LibdiscoreExperimentManager;
env0_7(closure, a0);
return env0_4(closure, [{key: '_initialize', value: function() {
initializeAllExperiments();
}}, {key: '_terminate', value: function() {
}}]);
}
function _fun125133(a0) { // fn#125133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16401:1710, offset: 0x025cf0d5, size: 34 bytes, params: 2, frame: 12
a0.setExperiment(createApexExperimentWrapper(a0));
}
function LibdiscoreExperimentManager(a0) { // fn#125137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16401:1988, offset: 0x025cf1fb, size: 187 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, LibdiscoreExperimentManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(LibdiscoreExperimentManager);
binding = env1_5;
if (_isNativeReflectConstruct_125125()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.actions = {};
const Map = global.Map;
const map = new Map();
value.stores = map.set(ApexExperimentStore, experimentStoreUpdateHandler);
return value;
}
function createApexExperimentWrapper(a0) { // fn#125134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16401:1730, offset: 0x025cf0f7, size: 133 bytes, params: 2, frame: 16
var environment;
let value = environment.__proto__.__proto__;
value = require(1854) /* metro dependency 1854: apex */;
const createApexExperiment = value.createApexExperiment;
const object2 = {kind: 'user'};
object2.name = a0.id;
object2.defaultConfig = {treatmentId: -1};
const Object = global.Object;
const fromEntries = Object.fromEntries;
const treatments = a0.getTreatments();
object2.variations = Reflect.apply(fromEntries, Object, [treatments.map(function({treatmentId}) {
return [treatmentId, {treatmentId: treatmentId}];
})]);
return Reflect.apply(createApexExperiment, value, [object2]);
}