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

@@ -1,56 +1,60 @@
/* Metro module 7693; source: modules/user_affinities/UserAffinitiesActionCreators.tsx; dependencies: [5078, 5221, 661, 694, 507, 2] */
import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
import ConsentStore from '../../stores/ConsentStore.tsx'; /* Metro dependency 5078 */
import UserAffinitiesV2Store from './UserAffinitiesV2Store.tsx'; /* Metro dependency 5221 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun61450(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7871:6, offset: 0x01b40263, size: 164 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const consentStore = importDefault(5078) /* metro dependency 5078: ConsentStore */;
const userAffinitiesV2Store = importDefault(5221) /* metro dependency 5221: UserAffinitiesV2Store */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_5 = constantsModule.Endpoints;
const env0_6 = constantsModule.Consents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_affinities/UserAffinitiesActionCreators.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/user_affinities/UserAffinitiesActionCreators.tsx');
exports.fetchUserAffinitiesV2 = fetchUserAffinitiesV2;
}
function fetchUserAffinitiesV2() { // fn#61451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7871:267, offset: 0x01b40307, size: 221 bytes, params: 1, frame: 20
var r0;
var value2;
var HTTP;
let value = a0;
if (UserAffinitiesV2Store.shouldFetch()) {
if (ConsentStore.hasConsented(Consents.PERSONALIZATION)) {
value2 = 3;
importDefault(dependencyMap[value2]).dispatch({type: 'LOAD_USER_AFFINITIES_V2'});
HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
value = 0;
value = HTTP.get({url: Endpoints.USER_AFFINITIES_V2,
retries: !(value !== undefined) || value ? value2 : value,
oldFormErrors: true, rejectWithError: false});
value = value.then(_fun61452, _fun61454);
r0 = value;
function fetchUserAffinitiesV2() { // fn#61451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7871:267, offset: 0x01b40307, size: 221 bytes, params: 1, frame: 20
var r0;
var consentStoreBinding;
var value2;
var HTTP;
let value = a0;
const r7 = !(value !== undefined) || value;
const userAffinitiesV2StoreBinding = UserAffinitiesV2Store;
if (userAffinitiesV2StoreBinding.shouldFetch()) {
consentStoreBinding = ConsentStore;
if (consentStoreBinding.hasConsented(Consents.PERSONALIZATION)) {
value2 = 3;
importDefault(dependencyMap[value2]).dispatch({type: 'LOAD_USER_AFFINITIES_V2'});
HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
value = 0;
value = HTTP.get({url: Endpoints.USER_AFFINITIES_V2, retries: r7 ? value2 : value, oldFormErrors: true,
rejectWithError: false});
value = value.then(_fun61452, _fun61454);
r0 = value;
} else {
r0 = global.Promise.resolve();
}
} else {
r0 = global.Promise.resolve();
}
} else {
r0 = global.Promise.resolve();
return r0;
function _fun61452({body}) { // fn#61452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7871:515, offset: 0x01b403e4, size: 87 bytes, params: 2, frame: 15
var environment;
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
const dispatch = value.dispatch;
const object = {type: 'LOAD_USER_AFFINITIES_V2_SUCCESS'};
const user_affinities = body.user_affinities;
object.affineUsers = user_affinities.map(_fun61453);
Reflect.apply(dispatch, value, [object]);
}
function _fun61454() { // fn#61454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7871:1168, offset: 0x01b40544, size: 49 bytes, params: 1, frame: 13
const value = environment.__proto__;
(Dispatcher).dispatch({type: 'LOAD_USER_AFFINITIES_V2_FAILURE'});
}
}
return r0;
}
function _fun61452({body}) { // fn#61452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7871:515, offset: 0x01b403e4, size: 87 bytes, params: 2, frame: 15
var environment;
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
const dispatch = value.dispatch;
const object2 = {type: 'LOAD_USER_AFFINITIES_V2_SUCCESS'};
const user_affinities = body.user_affinities;
object2.affineUsers = user_affinities.map(_fun61453);
Reflect.apply(dispatch, value, [object2]);
}
function _fun61454() { // fn#61454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7871:1168, offset: 0x01b40544, size: 49 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LOAD_USER_AFFINITIES_V2_FAILURE'});
}
function _fun61453({other_user_id, user_segment, other_user_segment, is_friend, dm_probability, dm_rank, vc_probability, vc_rank, server_message_probability, server_message_rank, communication_probability, communication_rank}) { // fn#61453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7871:620, offset: 0x01b4043b, size: 265 bytes, params: 2, frame: 7
@@ -61,3 +65,5 @@ function _fun61453({other_user_id, user_segment, other_user_segment, is_friend,
communicationProbability: communication_probability ?? 0, communicationRank: communication_rank ?? 0};
}
global.__d(_fun61450, 7693, [5078, 5221, 661, 694, 507,
2]) /* metro module 7693, dependencies: [5078, 5221, 661, 694, 507, 2] */;
@@ -1,11 +1,15 @@
/* Metro module 5222; source: modules/user_affinities/UserAffinitiesConstants.tsx; dependencies: [672, 2] */
import Durations from '../../utils/Durations.tsx'; /* Metro dependency 672 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun46236(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5400:6, offset: 0x011a347c, size: 112 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const Millis = (Durations).Millis;
const HOUR = Millis.HOUR;
const value = 8 * HOUR;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_affinities/UserAffinitiesConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/user_affinities/UserAffinitiesConstants.tsx');
exports.USER_AFFINITY_TTL = value;
}
global.__d(_fun46236, 5222, [672, 2]) /* metro module 5222, dependencies: [672, 2] */;
@@ -1,19 +1,22 @@
/* Metro module 5221; source: modules/user_affinities/UserAffinitiesV2Store.tsx; dependencies: [6, 7, 15, 17, 18, 3793, 5222, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import RelationshipStore from '../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UserAffinitiesConstantsModule from './UserAffinitiesConstants.tsx'; /* Metro dependency 5222 */
function _fun46213(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#46213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:6, offset: 0x011a2e60, size: 443 bytes, params: 8, frame: 21
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const env0_6 = (require(5222) /* metro dependency 5222: UserAffinitiesConstants */).USER_AFFINITY_TTL;
const Map = global.Map;
let map = new Map();
Object = global.Object;
copyDataProperties({}, Object.freeze({userAffinities: [], lastFetched: 0}), undefined);
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const PersistedStore = (Flux).PersistedStore;
map = _fun46220(PersistedStore);
map.displayName = 'UserAffinitiesV2Store';
map.persistKey = 'UserAffinitiesStoreV2';
@@ -22,125 +25,151 @@ function _fun46213(global, require, importDefault, importAll, module, exports, d
}, LOAD_USER_AFFINITIES_V2_SUCCESS: LOAD_USER_AFFINITIES_V2_SUCCESS, LOAD_USER_AFFINITIES_V2_FAILURE: function() {
env0_8 = false;
}, LOGOUT: LOGOUT_46235});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_affinities/UserAffinitiesV2Store.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/user_affinities/UserAffinitiesV2Store.tsx');
exports.default = map;
}
function _isNativeReflectConstruct_46214() { // fn#46214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:187, offset: 0x011a301b, 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) {
function _isNativeReflectConstruct_46214() { // fn#46214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:187, offset: 0x011a301b, 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_46214_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_46214_isNativeReflectConstruct = function() {
return !!result;
})();
}
function recomputeAffinities() { // fn#46217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:459, offset: 0x011a3079, size: 81 bytes, params: 1, frame: 14
const Map = global.Map;
const userAffinities = env0_10.userAffinities;
const value2 = userAffinities.filter(function(a0) {
return !RelationshipStore.isBlockedOrIgnored(a0.otherUserId);
});
let map = value2.map;
map = new Map(Reflect.apply(map, value2, [function(a0) {
return [a0.otherUserId, a0];
}]));
}
function recomputeAffinities() { // fn#46217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:459, offset: 0x011a3079, size: 81 bytes, params: 1, frame: 14
const Map = global.Map;
const userAffinities = env0_10.userAffinities;
const value2 = userAffinities.filter(function(a0) {
return !RelationshipStore.isBlockedOrIgnored(a0.otherUserId);
});
let map = value2.map;
map = new Map(Reflect.apply(map, value2, [function(a0) {
return [a0.otherUserId, a0];
}]));
}
function _fun46220(a0) { // fn#46220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:602, offset: 0x011a3101, size: 277 bytes, params: 2, frame: 16
const closure = UserAffinitiesV2Store;
env0_4(closure, a0);
return env0_1(closure, [{key: 'initialize', value: value_46222}, {key: 'shouldFetch', value: value_46223},
{key: 'isFetching', value: value_46224}, {key: 'getUserAffinities', value: value_46225},
{key: 'getUserAffinitiesMap', value: value_46226}, {key: 'compare', value: value_46227},
{key: 'compareByDmProbability', value: value_46228}, {key: 'getUserAffinity', value: value_46229},
{key: 'getState', value: value_46230}, {key: 'isHighlyAffinedVCUser', value: value_46231}]);
}
function _fun46220(a0) { // fn#46220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:602, offset: 0x011a3101, size: 277 bytes, params: 2, frame: 16
const UserAffinitiesV2Store2 = UserAffinitiesV2Store;
Inherits(UserAffinitiesV2Store2, a0);
return CreateClass(UserAffinitiesV2Store2, [{key: 'initialize', value: value_46222}, {key: 'shouldFetch',
value: value_46223}, {key: 'isFetching', value: value_46224}, {key: 'getUserAffinities', value: value_46225},
{key: 'getUserAffinitiesMap', value: value_46226}, {key: 'compare', value: value_46227},
{key: 'compareByDmProbability', value: value_46228}, {key: 'getUserAffinity', value: value_46229},
{key: 'getState', value: value_46230}, {key: 'isHighlyAffinedVCUser', value: value_46231}]);
function UserAffinitiesV2Store() { // fn#46221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:614, offset: 0x010a3f4a, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, UserAffinitiesV2Store);
const value3 = env1_3(UserAffinitiesV2Store);
return env1_2(this, _isNativeReflectConstruct_46214() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function LOAD_USER_AFFINITIES_V2_SUCCESS({affineUsers}) { // fn#46233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:2176, offset: 0x011a33ee, size: 67 bytes, params: 2, frame: 12
const binding = env0_10;
const Date = global.Date;
binding.lastFetched = Date.now();
env0_10.userAffinities = affineUsers;
recomputeAffinities();
}
function value_46222(a0) { // fn#46222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:937, offset: 0x011a3216, size: 104 bytes, params: 2, frame: 14
var binding;
this.waitFor(RelationshipStore);
if (a0 != null) {
binding = env1_10;
binding.userAffinities = a0.userAffinities;
binding = env1_10;
binding.lastFetched = a0.lastFetched;
recomputeAffinities();
}
this.syncWith([RelationshipStore], recomputeAffinities);
}
function LOGOUT_46235() { // fn#46235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:2394, offset: 0x011a343e, size: 62 bytes, params: 1, frame: 12
copyDataProperties({}, env0_9, undefined);
const Map = global.Map;
const map = new Map();
}
function value_46223() { // fn#46223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:1126, offset: 0x011a327e, size: 55 bytes, params: 1, frame: 10
if (env1_8) {
return undefined;
}
const Date = global.Date;
return Date.now() - env1_10.lastFetched > USER_AFFINITY_TTL;
}
function value_46222(a0) { // fn#46222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:937, offset: 0x011a3216, size: 104 bytes, params: 2, frame: 14
var binding;
this.waitFor(RelationshipStore);
if (a0 != null) {
binding = env1_10;
binding.userAffinities = a0.userAffinities;
binding = env1_10;
binding.lastFetched = a0.lastFetched;
function value_46224() { // fn#46224, offset: 0x00fbd9d4, size: 9 bytes, params: 1, frame: 1
return env1_8;
}
function value_46225() { // fn#46225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:1256, offset: 0x011a32b5, size: 15 bytes, params: 1, frame: 1
return env1_10.userAffinities;
}
function value_46226() { // fn#46226, offset: 0x00fbd9cb, size: 9 bytes, params: 1, frame: 1
return env1_7;
}
function value_46227(a0, a1) { // fn#46227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:1370, offset: 0x011a32c4, size: 99 bytes, params: 3, frame: 15
let value = environment.__proto__;
const value2 = env1_7.get(a1);
const value3 = undefined;
const communicationProbability = value2 == null ? value3 : value2.communicationProbability;
const value4 = 0;
const r0 = communicationProbability ?? value4;
value = env1_7.get(a0);
return r0 - ((value == null ? value3 : value.communicationProbability) ?? value4);
}
function value_46228(a0, a1) { // fn#46228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:1578, offset: 0x011a3327, size: 99 bytes, params: 3, frame: 15
let value = environment.__proto__;
const value2 = env1_7.get(a1);
const value3 = undefined;
const dmProbability = value2 == null ? value3 : value2.dmProbability;
const value4 = 0;
const r0 = dmProbability ?? value4;
value = env1_7.get(a0);
return r0 - ((value == null ? value3 : value.dmProbability) ?? value4);
}
function value_46229(a0) { // fn#46229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:1757, offset: 0x011a338a, size: 22 bytes, params: 2, frame: 11
return env1_7.get(a0);
}
function value_46230() { // fn#46230, offset: 0x00fbd9ec, size: 9 bytes, params: 1, frame: 1
return env1_10;
}
function value_46231(a0) { // fn#46231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:1866, offset: 0x011a33a0, size: 65 bytes, params: 2, frame: 12
const value = environment.__proto__;
return (env1_7.get(a0)?.vcProbability ?? 0) > 0.5;
}
}
function LOAD_USER_AFFINITIES_V2_SUCCESS({affineUsers}) { // fn#46233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:2176, offset: 0x011a33ee, size: 67 bytes, params: 2, frame: 12
const binding = env0_10;
const Date = global.Date;
binding.lastFetched = Date.now();
env0_10.userAffinities = affineUsers;
recomputeAffinities();
}
this.syncWith([RelationshipStore], recomputeAffinities);
}
function value_46223() { // fn#46223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:1126, offset: 0x011a327e, size: 55 bytes, params: 1, frame: 10
if (env1_8) {
return undefined;
function LOGOUT_46235() { // fn#46235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:2394, offset: 0x011a343e, size: 62 bytes, params: 1, frame: 12
copyDataProperties({}, env0_9, undefined);
const Map = global.Map;
const map = new Map();
}
const Date = global.Date;
return Date.now() - env1_10.lastFetched > USER_AFFINITY_TTL;
}
function value_46225() { // fn#46225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:1256, offset: 0x011a32b5, size: 15 bytes, params: 1, frame: 1
return env1_10.userAffinities;
}
function value_46227(a0, a1) { // fn#46227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:1370, offset: 0x011a32c4, size: 99 bytes, params: 3, frame: 15
let value = environment.__proto__;
const value2 = env1_7.get(a1);
const value3 = undefined;
const communicationProbability = value2 == null ? value3 : value2.communicationProbability;
const value4 = 0;
const r0 = communicationProbability ?? value4;
value = env1_7.get(a0);
return r0 - ((value == null ? value3 : value.communicationProbability) ?? value4);
}
function value_46228(a0, a1) { // fn#46228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:1578, offset: 0x011a3327, size: 99 bytes, params: 3, frame: 15
let value = environment.__proto__;
const value2 = env1_7.get(a1);
const value3 = undefined;
const dmProbability = value2 == null ? value3 : value2.dmProbability;
const value4 = 0;
const r0 = dmProbability ?? value4;
value = env1_7.get(a0);
return r0 - ((value == null ? value3 : value.dmProbability) ?? value4);
}
function value_46231(a0) { // fn#46231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5399:1866, offset: 0x011a33a0, size: 65 bytes, params: 2, frame: 12
const value = environment.__proto__;
return (env1_7.get(a0)?.vcProbability ?? 0) > 0.5;
}
global.__d(_fun46213, 5221, [6, 7, 15, 17, 18, 3793, 5222, 566, 694,
2]) /* metro module 5221, dependencies: [6, 7, 15, 17, 18, 3793, 5222, 566, 694, 2] */;
@@ -1,26 +1,30 @@
/* Metro module 8321; source: modules/user_affinities/VoiceUserAffinityExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun66262(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8506:6, offset: 0x01bf5482, size: 218 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
value = value.createApexExperiment({'kind': 'user', 'name': '2025-08-voice-user-affinity',
defaultConfig: {enabled: false}, variations: {[0]: {enabled: false, sortType: undefined}, [1]: {'enabled': true,
'sortType': 'vc_probability'}, [2]: {'enabled': true, 'sortType': 'communication_probability'}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_affinities/VoiceUserAffinityExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/user_affinities/VoiceUserAffinityExperiment.tsx');
exports.default = value;
exports.getVoiceUserAffinitySortType = getVoiceUserAffinitySortType;
exports.useVoiceUserAffinitySortType = useVoiceUserAffinitySortType;
function getVoiceUserAffinitySortType(a0) { // fn#66263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8506:481, offset: 0x01bf555c, size: 35 bytes, params: 2, frame: 12
const binding = env0_0;
const getConfig = binding.getConfig;
return Reflect.apply(getConfig, binding, [{location: a0}]).sortType;
}
function useVoiceUserAffinitySortType(a0) { // fn#66264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8506:596, offset: 0x01bf557f, size: 35 bytes, params: 2, frame: 12
const binding = env0_0;
const useConfig = binding.useConfig;
return Reflect.apply(useConfig, binding, [{location: a0}]).sortType;
}
}
function getVoiceUserAffinitySortType(a0) { // fn#66263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8506:481, offset: 0x01bf555c, size: 35 bytes, params: 2, frame: 12
const binding = env0_0;
const getConfig = binding.getConfig;
return Reflect.apply(getConfig, binding, [{location: a0}]).sortType;
}
function useVoiceUserAffinitySortType(a0) { // fn#66264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8506:596, offset: 0x01bf557f, size: 35 bytes, params: 2, frame: 12
const binding = env0_0;
const useConfig = binding.useConfig;
return Reflect.apply(useConfig, binding, [{location: a0}]).sortType;
}
global.__d(_fun66262, 8321, [1854, 2]) /* metro module 8321, dependencies: [1854, 2] */;
@@ -1,43 +1,47 @@
/* Metro module 8320; source: modules/user_affinities/maybeSortByProbability.tsx; dependencies: [8321, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as VoiceUserAffinityExperimentModule from './VoiceUserAffinityExperiment.tsx'; /* Metro dependency 8321 */
function _fun66258(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8505:6, offset: 0x01bf52b8, size: 96 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/user_affinities/maybeSortByProbability.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/user_affinities/maybeSortByProbability.tsx');
exports.maybeSortByProbability = maybeSortByProbability;
}
function maybeSortByProbability(a0, a1, a2) { // fn#66259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8505:202, offset: 0x01bf5318, size: 144 bytes, params: 4, frame: 17
var r1;
var r0;
var items2;
let value = a0;
const env0_0 = a1;
const voiceUserAffinitySortType = (require(8321) /* metro dependency 8321: VoiceUserAffinityExperiment */).getVoiceUserAffinitySortType(a2);
if (voiceUserAffinitySortType == null) {
r0 = value;
} else {
if (voiceUserAffinitySortType === 'vc_probability') {
items2 = [];
arraySpread(items2, value, 0, undefined);
value = items2.sort(_fun66260);
r1 = value;
function maybeSortByProbability(a0, a1, a2) { // fn#66259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8505:202, offset: 0x01bf5318, size: 144 bytes, params: 4, frame: 17
var r1;
var r0;
var items2;
let value = a0;
const env0_0 = a1;
const voiceUserAffinitySortType = (VoiceUserAffinityExperimentModule).getVoiceUserAffinitySortType(a2);
if (voiceUserAffinitySortType == null) {
r0 = value;
} else {
items2 = [];
arraySpread(items2, value, 0, items2);
value = items2.sort(_fun66261);
r1 = value;
if (voiceUserAffinitySortType === 'vc_probability') {
items2 = [];
arraySpread(items2, value, 0, undefined);
value = items2.sort(_fun66260);
r1 = value;
} else {
items2 = [];
arraySpread(items2, value, 0, items2);
value = items2.sort(_fun66261);
r1 = value;
}
r0 = r1;
}
r0 = r1;
return r0;
function _fun66260({id}, {id}) { // fn#66260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8505:338, offset: 0x01bf53a8, size: 109 bytes, params: 3, frame: 15
return (require.get(id)?.vcProbability ?? 0) - (require.get(id)?.vcProbability ?? 0);
}
function _fun66261({id}, {id}) { // fn#66261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8505:502, offset: 0x01bf5415, size: 109 bytes, params: 3, frame: 15
return (require.get(id)?.communicationProbability ?? 0) - (require.get(id)?.communicationProbability ?? 0);
}
}
return r0;
}
function _fun66260({id}, {id}) { // fn#66260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8505:338, offset: 0x01bf53a8, size: 109 bytes, params: 3, frame: 15
return (require.get(id)?.vcProbability ?? 0) - (require.get(id)?.vcProbability ?? 0);
}
function _fun66261({id}, {id}) { // fn#66261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8505:502, offset: 0x01bf5415, size: 109 bytes, params: 3, frame: 15
return (require.get(id)?.communicationProbability ?? 0) - (require.get(id)?.communicationProbability ?? 0);
}
global.__d(_fun66258, 8320, [8321, 2]) /* metro module 8320, dependencies: [8321, 2] */;