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,309 @@
/* Metro module 11480; source: modules/safety_hub/SafetyHubActionCreators.tsx; dependencies: [5, 1226, 11473, 5267, 661, 694, 507, 4631, 5266, 2] */
function _fun87925(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:6, offset: 0x01fceec9, size: 326 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = function() {
return _checkSuspendedUserAgeVerification.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const safetyHubStore = importDefault(11473) /* metro dependency 11473: SafetyHubStore */;
const safetyHubConstantsModule = require(5267) /* metro dependency 5267: SafetyHubConstants */;
const env0_6 = safetyHubConstantsModule.AGE_CHECK_POLL_INTERVAL_MS;
const env0_7 = safetyHubConstantsModule.AGE_CHECK_MAX_POLL_ATTEMPTS;
const env0_8 = (require(661) /* metro dependency 661: Constants */).Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/safety_hub/SafetyHubActionCreators.tsx');
exports.getSafetyHubData = function() {
return _getSafetyHubData.apply(this, arguments);
};
exports.getSafetyHubDataForClassification = function() {
return _getSafetyHubDataForClassification.apply(this, arguments);
};
exports.requestReview = function() {
return _requestReview.apply(this, arguments);
};
exports.requestSuspendedUserAgeVerification = function() {
return _requestSuspendedUserAgeVerification.apply(this, arguments);
};
exports.checkSuspendedUserAgeVerification = closure;
}
function _getSafetyHubData() { // fn#87926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:219, offset: 0x01fcf00f, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun87928).apply(this, arguments);
}
function _getSafetyHubDataForClassification() { // fn#87932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:1133, offset: 0x01fcf284, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun87934).apply(this, arguments);
}
function _setClassificationFlaggedContent(a0) { // fn#87938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:2199, offset: 0x01fcf51e, size: 136 bytes, params: 2, frame: 13
var property;
var value;
if (a0.flagged_content != null) {
if (a0.flagged_content.length > 0) {
property = a0.flagged_content[0];
property.attachments = property.attachments.filter(_fun87939);
value = require(5266) /* metro dependency 5266: SafetyHubUtils */;
a0.flagged_content = value.isFlaggedContentEmpty(property) ? [] : [property];
}
}
}
function _requestReview() { // fn#87940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:2487, offset: 0x01fcf5f4, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun87942).apply(this, arguments);
}
function _requestSuspendedUserAgeVerification() { // fn#87945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:3195, offset: 0x01fcf815, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun87947).apply(this, arguments);
}
function _checkSuspendedUserAgeVerification() { // fn#87951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:4089, offset: 0x01fcf9cf, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun87953).apply(this, arguments);
}
function* _fun87928() { // fn#87928, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:276, offset: 0x01fcf04c, size: 267 bytes, params: 1, frame: 18
var environment;
var r5;
var HTTP;
if (true) {
value = environment.__proto__.__proto__;
env2_1(env2_2[5]).dispatch({type: 'SAFETY_HUB_FETCH_START'});
var suspendedUserToken = env2_4.getSuspendedUserToken();
var r7 = suspendedUserToken != null ? env2_8.SAFETY_HUB_SUSPENDED : env2_8.SAFETY_HUB;
if (suspendedUserToken != null) {
r5 = env2_0(env2_2[6]).HTTP.post({url: r7, body: {token: suspendedUserToken}, rejectWithError: false});
} else {
HTTP = env2_0(env2_2[6]).HTTP;
r5 = HTTP.get({url: r7, rejectWithError: false});
}
yield r5.then(_fun87929).catch(_fun87931);
}
}
function* _fun87934(a0) { // fn#87934, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:1224, offset: 0x01fcf2c1, size: 279 bytes, params: 2, frame: 18
var environment;
var r5;
var HTTP;
if (true) {
var env0_0 = a0;
value = environment.__proto__.__proto__;
env2_1(env2_2[5]).dispatch({type: 'SAFETY_HUB_FETCH_CLASSIFICATION_START', classificationId: a0});
var suspendedUserToken = env2_4.getSuspendedUserToken();
var r7 = suspendedUserToken != null ? env2_8.SAFETY_HUB_SUSPENDED : env2_8.SAFETY_HUB;
if (suspendedUserToken != null) {
r5 = env2_0(env2_2[6]).HTTP.post({url: r7, body: {token: suspendedUserToken}, rejectWithError: false});
} else {
HTTP = env2_0(env2_2[6]).HTTP;
r5 = HTTP.get({url: r7, rejectWithError: false});
}
yield r5.then(_fun87935).catch(_fun87937);
}
}
function _fun87939({filename}) { // fn#87939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:2363, offset: 0x01fcf5a6, size: 78 bytes, params: 2, frame: 14
var r0;
let value = environment.__proto__;
const isImageFile2 = (require(4631) /* metro dependency 4631: MediaFormatTesters */).isImageFile(filename);
if (isImageFile2) {
r0 = isImageFile2;
} else {
value = require(4631) /* metro dependency 4631: MediaFormatTesters */;
value = value.isVideoFile(filename);
r0 = value;
}
return r0;
}
function* _fun87942(a0, a1, a2) { // fn#87942, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:2538, offset: 0x01fcf631, size: 321 bytes, params: 4, frame: 20
var environment;
var r7;
var r5;
if (true) {
var env0_0 = a0;
value = environment.__proto__.__proto__;
var suspendedUserToken = env2_4.getSuspendedUserToken();
r7 = suspendedUserToken != null ? env2_8.SAFETY_HUB_REQUEST_SUSPENDED_USER_REVIEW(a0) : env2_8.SAFETY_HUB_REQUEST_REVIEW(a0);
r5 = suspendedUserToken != null ? env2_0(env2_2[6]).HTTP.put({url: r7, body: {signal: a1, user_input: a2,
token: suspendedUserToken}, rejectWithError: false}) : env2_0(env2_2[6]).HTTP.put({url: r7,
body: {signal: a1,
user_input: a2}, rejectWithError: false});
env2_1(env2_2[5]).dispatch({type: 'SAFETY_HUB_REQUEST_REVIEW_START'});
yield r5.then(_fun87943).catch(_fun87944);
}
}
function* _fun87947(a0) { // fn#87947, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:3290, offset: 0x01fcf852, size: 200 bytes, params: 2, frame: 17
var environment;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_1;
var binding2 = env2_2;
binding(binding2[5]).dispatch({type: 'SAFETY_HUB_REQUEST_AUTOMATED_UNDERAGE_APPEAL_START'});
var suspendedUserToken = env2_4.getSuspendedUserToken();
var SAFETY_HUB_REQUEST_SUSPENDED_AGE_VERIFICATION = env2_8.SAFETY_HUB_REQUEST_SUSPENDED_AGE_VERIFICATION;
var HTTP = env2_0(binding2[6]).HTTP;
value = HTTP.post({url: SAFETY_HUB_REQUEST_SUSPENDED_AGE_VERIFICATION, body: {token: suspendedUserToken,
from_classification_id: a0}, rejectWithError: false});
value = value.then(_fun87948);
yield value.catch(_fun87949);
}
}
function* _fun87953() { // fn#87953, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:4180, offset: 0x01fcfa0c, size: 216 bytes, params: 1, frame: 17
var environment;
if (true) {
var env0_0;
value = environment.__proto__.__proto__;
var binding = env2_1;
var binding2 = env2_2;
binding(binding2[5]).dispatch({type: 'SAFETY_HUB_CHECK_AUTOMATED_UNDERAGE_APPEAL_START'});
var suspendedUserToken = env2_4.getSuspendedUserToken();
env0_0 = env2_5.getAgeCheckAttempts();
var SAFETY_HUB_CHECK_SUSPENDED_AGE_VERIFICATION = env2_8.SAFETY_HUB_CHECK_SUSPENDED_AGE_VERIFICATION;
var HTTP = env2_0(binding2[6]).HTTP;
value = HTTP.post({url: SAFETY_HUB_CHECK_SUSPENDED_AGE_VERIFICATION, body: {token: suspendedUserToken},
rejectWithError: false});
value = value.then(_fun87954);
yield value.catch(_fun87956);
}
}
function _fun87929({body}) { // fn#87929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:546, offset: 0x01fcf157, size: 180 bytes, params: 2, frame: 22
const classifications = body.classifications;
const guild_classifications = body.guild_classifications;
const account_standing = body.account_standing;
const is_dsa_eligible = body.is_dsa_eligible;
const username = body.username;
const is_appeal_eligible = body.is_appeal_eligible;
const appeal_eligibility = body.appeal_eligibility;
const value = classifications.map(_fun87930);
env3_1(env3_2[5]).dispatch({type: 'SAFETY_HUB_FETCH_SUCCESS',
classifications: value.concat(guild_classifications ?? []), accountStanding: account_standing,
isDsaEligible: is_dsa_eligible, username: username, isAppealEligible: is_appeal_eligible,
appealEligibility: appeal_eligibility ?? []});
}
function _fun87931(a0) { // fn#87931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:963, offset: 0x01fcf21e, size: 102 bytes, params: 2, frame: 16
let value = environment.__proto__.__proto__.__proto__;
const binding = env3_1;
value = undefined;
const value2 = binding(env3_2[5]);
value2.dispatch({type: 'SAFETY_HUB_FETCH_FAILURE',
error: (a0 == null || a0.body == null ? value : a0.body.message) ?? 'Unknown error'});
return value;
}
function _fun87935({body}) { // fn#87935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:1529, offset: 0x01fcf3d8, size: 212 bytes, params: 2, frame: 17
var environment;
var value3;
var value4;
const classifications = body.classifications;
const account_standing = body.account_standing;
const is_dsa_eligible = body.is_dsa_eligible;
const username = body.username;
const is_appeal_eligible = body.is_appeal_eligible;
let value = classifications.find(_fun87936);
if (value != null) {
value3 = environment.__proto__.__proto__.__proto__;
env3_11(value);
value4 = env3_1(env3_2[5]);
value4.dispatch({type: 'SAFETY_HUB_FETCH_CLASSIFICATION_SUCCESS', classification: value,
accountStanding: account_standing, isDsaEligible: is_dsa_eligible, username: username,
isAppealEligible: is_appeal_eligible});
} else {
value = environment.__proto__.__proto__.__proto__;
value = env3_1(env3_2[5]);
value.dispatch({'type': 'SAFETY_HUB_FETCH_CLASSIFICATION_FAILURE', 'error': 'Classification not found.',
classificationId: env0_0});
}
}
function _fun87937(a0) { // fn#87937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:1995, offset: 0x01fcf4ac, size: 114 bytes, params: 2, frame: 16
let value = environment.__proto__.__proto__.__proto__;
const binding = env3_1;
value = undefined;
const value2 = binding(env3_2[5]);
value2.dispatch({type: 'SAFETY_HUB_FETCH_CLASSIFICATION_FAILURE',
error: (a0 == null || a0.body == null ? value : a0.body.message) ?? 'Unknown error', classificationId: env0_0});
return value;
}
function _fun87943() { // fn#87943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:2913, offset: 0x01fcf772, size: 61 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
env3_1(env3_2[5]).dispatch({type: 'SAFETY_HUB_REQUEST_REVIEW_SUCCESS', classificationId: env0_0});
}
function _fun87944(a0) { // fn#87944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:3008, offset: 0x01fcf7af, size: 102 bytes, params: 2, frame: 17
let value = environment.__proto__.__proto__.__proto__;
const binding = env3_1;
value = undefined;
const value2 = binding(env3_2[5]);
value2.dispatch({type: 'SAFETY_HUB_REQUEST_REVIEW_FAILURE',
error: (a0 == null || a0.body == null ? value : a0.body.message) ?? 'Unknown error'});
throw a0;
}
function _fun87948({body}) { // fn#87948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:3565, offset: 0x01fcf91a, size: 79 bytes, params: 2, frame: 15
const verification_request_id = body.verification_request_id;
const verification_webview_url = body.verification_webview_url;
let value = environment.__proto__.__proto__.__proto__;
value = env3_1(env3_2[5]);
value.dispatch({type: 'SAFETY_HUB_REQUEST_AUTOMATED_UNDERAGE_APPEAL_SUCCESS',
verificationRequestId: verification_request_id, verificationWebviewUrl: verification_webview_url});
}
function _fun87949(a0) { // fn#87949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:3782, offset: 0x01fcf969, size: 102 bytes, params: 2, frame: 16
let value = environment.__proto__.__proto__.__proto__;
const binding = env3_1;
value = undefined;
const value2 = binding(env3_2[5]);
value2.dispatch({type: 'SAFETY_HUB_REQUEST_AUTOMATED_UNDERAGE_APPEAL_FAILURE',
error: (a0 == null || a0.body == null ? value : a0.body.message) ?? 'Unknown error'});
return value;
}
function _fun87954({body}) { // fn#87954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:4451, offset: 0x01fcfae4, size: 127 bytes, params: 2, frame: 15
var environment;
var r0;
var binding;
var setTimeout;
const success = body.success;
let value = !success;
if (success) {
r0 = value;
} else {
binding = env0_0;
value = environment.__proto__.__proto__.__proto__;
value = binding < env3_7;
r0 = value;
}
if (r0) {
setTimeout = global.setTimeout;
value = environment.__proto__.__proto__.__proto__;
setTimeout(_fun87955, env3_6);
}
value = environment.__proto__.__proto__.__proto__;
value = env3_1(env3_2[5]);
value.dispatch({type: 'SAFETY_HUB_CHECK_AUTOMATED_UNDERAGE_APPEAL_SUCCESS', success: success});
}
function _fun87956(a0) { // fn#87956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:4643, offset: 0x01fcfb72, size: 102 bytes, params: 2, frame: 16
let value = environment.__proto__.__proto__.__proto__;
const binding = env3_1;
value = undefined;
const value2 = binding(env3_2[5]);
value2.dispatch({type: 'SAFETY_HUB_CHECK_AUTOMATED_UNDERAGE_APPEAL_FAILURE',
error: (a0 == null || a0.body == null ? value : a0.body.message) ?? 'Unknown error'});
return value;
}
function _fun87930(a0) { // fn#87930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:722, offset: 0x01fcf20b, size: 19 bytes, params: 2, frame: 11
env4_11(a0);
return a0;
}
function _fun87955() { // fn#87955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11666:4501, offset: 0x01fcfb63, size: 15 bytes, params: 1, frame: 9
return env4_14();
}