Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,277 @@
|
||||
/* Metro module 1870; source: modules/libdiscore/libdiscoreExperiments.tsx; dependencies: [15, 17, 18, 6, 7, 1871, 3, 1873, 44, 2] */
|
||||
function _fun20200(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:6, offset: 0x00ec208f, size: 649 bytes, params: 8, frame: 27
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_4 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_5 = importDefault(18) /* metro dependency 18 */;
|
||||
const env0_6 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_7 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_8 = (require(1871) /* metro dependency 1871: BridgedStore */).ensureValidMode;
|
||||
let value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('libdiscoreExperiments');
|
||||
const Symbol = global.Symbol;
|
||||
const env0_11 = Symbol('unknown');
|
||||
value = _fun20205();
|
||||
const value3 = _fun20211(value);
|
||||
const value4 = _fun20216(value);
|
||||
const value5 = _fun20222(value);
|
||||
const value7 = new value4('2026-01-libdiscore-batch-store-refactor', 'batch-store-refactor');
|
||||
const value10 = new value5('2025-09-libdiscore-telemetry');
|
||||
const value13 = new value3('2025-11-defer-load-late-lazy-cache',
|
||||
'Allow react to render before lazy cache is loaded');
|
||||
const value15 = _fun20229(value);
|
||||
const value17 = new value15('2026-01-android-rmle', 'Android Pull Mode Rendering', 4);
|
||||
const value20 = new value15('2026-02-android-fresco-cache', 'Android Fresco Cache', 3);
|
||||
const value23 = new value3('2026-02-android-chat-mosaic-shared-pool', 'Android Chat Mosaic Shared Pool');
|
||||
const value26 = new value3('2026-03-mobile-hermes-occupancy-target', 'Android Hermes Occupancy Target');
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/libdiscore/libdiscoreExperiments.tsx');
|
||||
exports.ALL_LIBDISCORE_EXPERIMENTS = [];
|
||||
exports.LibdiscoreCachedExperiment = value;
|
||||
exports.LibdiscoreWrapperSimpleExperiment = value3;
|
||||
exports.LibdiscoreBatchStoreRefactorExperiment = value7;
|
||||
exports.TelemetryExperiment = value10;
|
||||
exports.DelayLoadLateLazyCacheHoldoutExperiment = value13;
|
||||
exports.AndroidPullModeRenderingExperiment = value17;
|
||||
exports.AndroidFrescoCacheExperiment = value20;
|
||||
exports.AndroidChatMosaicSharedPoolExperiment = value23;
|
||||
exports.AndroidHermesOccupancyTargetExperiment = value26;
|
||||
exports.isExperimentSyncDisabled = isExperimentSyncDisabled;
|
||||
exports.clearLibdiscoreExperimentCache = clearLibdiscoreExperimentCache;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_20202() { // fn#20202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:311, offset: 0x00ec237c, size: 94 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_20202_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun20205() { // fn#20205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:576, offset: 0x00ec23da, size: 128 bytes, params: 1, frame: 15
|
||||
return env0_7(LibdiscoreCachedExperiment, [{key: 'getEnabledFeatureName', value: function() {
|
||||
var value = this.getCachedConfig();
|
||||
return value === undefined || value.treatmentId <= 0 ? null : '' + this.id + ':' + value.treatmentId;
|
||||
}}, {key: 'getCachedConfig', value: value_20208}, {key: 'setExperiment', value: function(a0) {
|
||||
this.inner = a0;
|
||||
}}, {key: 'getCurrentConfig', value: value_20210}]);
|
||||
}
|
||||
|
||||
function _fun20211(a0) { // fn#20211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:1419, offset: 0x00ec25ee, size: 118 bytes, params: 2, frame: 16
|
||||
const closure = LibdiscoreWrapperSimpleExperiment;
|
||||
env0_5(closure, a0);
|
||||
return env0_7(closure, [{key: 'getLabel', value: function() {
|
||||
return this.label;
|
||||
}}, {key: 'getTreatments', value: function() {
|
||||
return [{treatmentId: 0}, {treatmentId: 1}];
|
||||
}}, {key: 'getCachedEnabled', value: function() {
|
||||
var value = this.getCachedConfig();
|
||||
return value == null || value.treatmentId === -1 ? this.defaultValue : value.treatmentId === 1;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function _fun20216(a0) { // fn#20216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:1992, offset: 0x00ec2712, size: 141 bytes, params: 2, frame: 16
|
||||
const closure = LibdiscoreBridgedStoreExperiment;
|
||||
env0_5(closure, a0);
|
||||
return env0_7(closure, [{key: 'getCachedBridgedStoreMode', value: value_20218}, {key: 'getEnabledFeatureName',
|
||||
value: function() {
|
||||
var value = this.getCachedBridgedStoreMode();
|
||||
return value === 'typescript' ? null : 'BridgedStore[' + this.storeName + ',' + value + ']';
|
||||
}}, {key: 'getLabel', value: function() {
|
||||
return "libdiscore '" + this.storeName + "' Migration";
|
||||
}}, {key: 'getTreatments', value: function() {
|
||||
return [{treatmentId: 0}, {treatmentId: 1}, {treatmentId: 2}];
|
||||
}}]);
|
||||
}
|
||||
|
||||
function _fun20222(a0) { // fn#20222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:2861, offset: 0x00ec28dc, size: 168 bytes, params: 2, frame: 16
|
||||
const closure = LibdiscoreTelemetryExperiment;
|
||||
env0_5(closure, a0);
|
||||
return env0_7(closure, [{key: 'getLabel', value: function() {
|
||||
return 'libdiscore Telemetry';
|
||||
}}, {key: 'getTreatments', value: function() {
|
||||
return [{treatmentId: 0}, {treatmentId: 1}, {treatmentId: 2}, {treatmentId: 3}];
|
||||
}}, {key: 'getMetricsSampleRate', value: function() {
|
||||
var r2;
|
||||
r2 = this.getCachedConfig()?.treatmentId;
|
||||
if (r2 === 1) {
|
||||
return 0.01;
|
||||
}
|
||||
if (r2 === 2) {
|
||||
return 0.05;
|
||||
}
|
||||
if (r2 === 3) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}}, {key: 'didEmit', value: function() {
|
||||
var emissionsCount = this.emissionsCount;
|
||||
this.emissionsCount = typeof emissionsCount === 'bigint' ? emissionsCount + 1n : +emissionsCount + 1;
|
||||
}}, {key: 'shouldCollectMetrics', value: function() {
|
||||
var r2;
|
||||
var r1;
|
||||
var r0;
|
||||
var value3;
|
||||
var value4;
|
||||
var value = this.getMetricsSampleRate();
|
||||
var value2 = value !== 0;
|
||||
if (value2) {
|
||||
value3 = value === 1;
|
||||
if (value3) {
|
||||
r1 = value3;
|
||||
} else {
|
||||
value4 = this.emissionsCount >= this.MAX_EMISSIONS_PER_APP_LAUNCH;
|
||||
if (value4) {
|
||||
r2 = !value4;
|
||||
} else {
|
||||
value = global.Math.random() < value;
|
||||
r2 = value;
|
||||
}
|
||||
r1 = r2;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function _fun20229(a0) { // fn#20229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:3966, offset: 0x00ec2ad3, size: 93 bytes, params: 2, frame: 16
|
||||
const closure = LibdiscoreCustomTreatmentsExperiment;
|
||||
env0_5(closure, a0);
|
||||
return env0_7(closure, [{key: 'getLabel', value: function() {
|
||||
return this.label;
|
||||
}}, {key: 'getTreatments', value: function() {
|
||||
var Array = global.Array;
|
||||
return Array.from({length: this.treatmentCount}, _fun20233);
|
||||
}}]);
|
||||
}
|
||||
|
||||
function isExperimentSyncDisabled() { // fn#20234, offset: 0x00ec2baa, size: 9 bytes, params: 1, frame: 1
|
||||
return env0_12;
|
||||
}
|
||||
|
||||
function clearLibdiscoreExperimentCache() { // fn#20235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:5310, offset: 0x00ec2bb3, size: 104 bytes, params: 1, frame: 14
|
||||
var value;
|
||||
const shimNativeModule = require(1873) /* metro dependency 1873: shimNative */;
|
||||
if (shimNativeModule.isLibdiscoreInitialized()) {
|
||||
env0_9.info('Clearing libdiscore experiment cache and disabling sync');
|
||||
value = shimNativeModule;
|
||||
value = value.getExperimentCacher();
|
||||
value.clearCache();
|
||||
}
|
||||
}
|
||||
|
||||
function LibdiscoreCachedExperiment(a0) { // fn#20206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:597, offset: 0x00ec245a, size: 68 bytes, params: 2, frame: 14
|
||||
env1_6(this, LibdiscoreCachedExperiment);
|
||||
this.id = a0;
|
||||
this.inner = null;
|
||||
this.cachedConfig = env1_11;
|
||||
env1_10.push(this);
|
||||
}
|
||||
|
||||
function value_20208() { // fn#20208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:910, offset: 0x00ec24ed, size: 120 bytes, params: 1, frame: 14
|
||||
var moduleValue;
|
||||
const cachedConfig = this.cachedConfig;
|
||||
let value = environment.__proto__;
|
||||
if (cachedConfig === env1_11) {
|
||||
moduleValue = require(1873) /* metro dependency 1873: shimNative */;
|
||||
if (moduleValue.isLibdiscoreInitialized()) {
|
||||
value = require(1873) /* metro dependency 1873: shimNative */;
|
||||
value = value.getExperimentCacher();
|
||||
this.cachedConfig = value.getConfig(this.id);
|
||||
} else {
|
||||
this.cachedConfig = undefined;
|
||||
}
|
||||
}
|
||||
return this.cachedConfig;
|
||||
}
|
||||
|
||||
function value_20210() { // fn#20210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:1183, offset: 0x00ec2575, size: 121 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(44) /* metro dependency 44 */;
|
||||
let inner = this.inner;
|
||||
value(inner != null, 'experiment must be set before calling getCurrentConfig');
|
||||
value = 'getCurrentConfig' in this.inner;
|
||||
inner = this.inner;
|
||||
return value ? inner.getCurrentConfig({location: 'default'}) : inner.getConfig({location: 'default'});
|
||||
}
|
||||
|
||||
function LibdiscoreWrapperSimpleExperiment(a0, a1) { // fn#20212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:1431, offset: 0x00ec2664, size: 73 bytes, params: 3, frame: 17
|
||||
let value = a2;
|
||||
const r1 = value !== undefined ? value : false;
|
||||
value = environment.__proto__;
|
||||
env1_6(this, LibdiscoreWrapperSimpleExperiment);
|
||||
value = _callSuper_20201(this, LibdiscoreWrapperSimpleExperiment, [a0]);
|
||||
value.label = a1;
|
||||
value.defaultValue = r1;
|
||||
return value;
|
||||
}
|
||||
|
||||
function LibdiscoreBridgedStoreExperiment(a0, a1, a2) { // fn#20217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:2004, offset: 0x00ec279f, size: 65 bytes, params: 4, frame: 16
|
||||
let value = environment.__proto__;
|
||||
env1_6(this, LibdiscoreBridgedStoreExperiment);
|
||||
value = _callSuper_20201(this, LibdiscoreBridgedStoreExperiment, [a0, a2]);
|
||||
value.storeName = a1;
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_20218() { // fn#20218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:2301, offset: 0x00ec27e0, size: 96 bytes, params: 1, frame: 13
|
||||
const r3 = this.getCachedConfig()?.treatmentId ?? -1;
|
||||
const r1 = r3 === 1 ? 'typescript-libdiscore-dual-read' : r3 === 2 ? 'libdiscore' : 'typescript';
|
||||
value = environment.__proto__;
|
||||
return ensureValidMode(r1);
|
||||
}
|
||||
|
||||
function LibdiscoreTelemetryExperiment(a0) { // fn#20223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:2873, offset: 0x00ec2984, size: 77 bytes, params: 2, frame: 17
|
||||
let value = copyRestArgs(0, undefined);
|
||||
env1_6(this, LibdiscoreTelemetryExperiment);
|
||||
const _callSuper_20201Binding = _callSuper_20201;
|
||||
const items2 = [];
|
||||
arraySpread(items2, value, 0, value);
|
||||
value = _callSuper_20201Binding(this, LibdiscoreTelemetryExperiment, items2);
|
||||
value.MAX_EMISSIONS_PER_APP_LAUNCH = 5;
|
||||
value.emissionsCount = 0;
|
||||
return value;
|
||||
}
|
||||
|
||||
function LibdiscoreCustomTreatmentsExperiment(a0, a1, a2) { // fn#20230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:3978, offset: 0x00ec2b30, size: 67 bytes, params: 4, frame: 16
|
||||
let value = environment.__proto__;
|
||||
env1_6(this, LibdiscoreCustomTreatmentsExperiment);
|
||||
value = _callSuper_20201(this, LibdiscoreCustomTreatmentsExperiment, [a0]);
|
||||
value.label = a1;
|
||||
value.treatmentCount = a2;
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_20232() { // fn#20232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1997:4349, offset: 0x00ec2b73, size: 43 bytes, params: 1, frame: 13
|
||||
const Array = global.Array;
|
||||
return Array.from({length: this.treatmentCount}, function(a0, a1) {
|
||||
return {treatmentId: a1};
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user