1363 lines
65 KiB
TypeScript
1363 lines
65 KiB
TypeScript
/* Metro module 11898; source: modules/message_request/hooks/useMessageRequestActions.tsx; dependencies: [5, 57, 31, 5189, 11899, 661, 11900, 9738, 4131, 8646, 8491, 683, 11902, 3829, 8153, 2] */
|
|
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
|
|
import UserProfileStore from '../../user_profile/UserProfileStore.tsx'; /* Metro dependency 5189 */
|
|
import UseRequireConfirmationOnAccept from './useRequireConfirmationOnAccept.tsx'; /* Metro dependency 11900 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as UserSettingsModule from '../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
|
|
import * as MessageRequestConstantsModule from '../MessageRequestConstants.tsx'; /* Metro dependency 11899 */
|
|
|
|
function _fun91318(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12084:6, offset: 0x0205b32b, size: 245 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const _arrayLikeToArray_91321 = 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 Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/message_request/hooks/useMessageRequestActions.tsx');
|
|
exports.useMessageRequestActions = useMessageRequestActions;
|
|
function _createForOfIteratorHelperLoose_91319(a0, a1) { // fn#91319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12084:235, offset: 0x0205b420, 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 _fun91320;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_91321(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_91321(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_91321(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun91320;
|
|
}
|
|
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 _fun91320() { // fn#91320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12084:806, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
|
|
return env0_1 >= env0_0.length ? {done: true} : {done: false,
|
|
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
|
|
}
|
|
|
|
}
|
|
|
|
function useMessageRequestActions({user, onAcceptSuccess, onRejectSuccess, onError}) { // fn#91322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12084:1267, offset: 0x0205b594, size: 501 bytes, params: 2, frame: 28
|
|
const value2 = (UseRequireConfirmationOnAccept)();
|
|
let binding = env0_5;
|
|
let useState = binding.useState;
|
|
const value3 = Reflect.apply(useState, binding, [false]);
|
|
const binding2 = env0_4;
|
|
const value4 = binding2(value3, 2);
|
|
const property = value4[0];
|
|
var env0_4 = value4[1];
|
|
useState = binding.useState;
|
|
const value5 = binding2(Reflect.apply(useState, binding, [false]), 2);
|
|
const property2 = value5[0];
|
|
var env0_5 = value5[1];
|
|
useState = binding.useState;
|
|
const value6 = binding2(Reflect.apply(useState, binding, [false]), 2);
|
|
const property3 = value6[0];
|
|
const env0_6 = value6[1];
|
|
useState = binding.useState;
|
|
const value7 = binding2(Reflect.apply(useState, binding, [false]), 2);
|
|
const property4 = value7[0];
|
|
const env0_7 = value7[1];
|
|
useState = binding.useState;
|
|
const value8 = binding2(Reflect.apply(useState, binding, [false]), 2);
|
|
const property5 = value8[0];
|
|
const env0_8 = value8[1];
|
|
let r15 = property || property2;
|
|
r15 = !r15 ? property3 : r15;
|
|
binding = env0_5;
|
|
const useCallback = binding.useCallback;
|
|
let value = _fun91323();
|
|
value = Reflect.apply(useCallback, binding, [value, [r15, onAcceptSuccess, onError]]);
|
|
return {acceptMessageRequest: value2 ? binding.useCallback(_fun91335(), [value, r15, user]) : value,
|
|
rejectMessageRequest: binding.useCallback(_fun91327(), [r15, onRejectSuccess, onError]),
|
|
rejectAll: binding.useCallback(_fun91331(), [r15, onRejectSuccess, onError]),
|
|
markAsNotSpam: binding.useCallback(_fun91346, [value]), isAcceptLoading: property, isRejectLoading: property2,
|
|
isUserProfileLoading: property3, isOptimisticAccepted: property4, isOptimisticRejected: property5};
|
|
function _fun91323() { // fn#91323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12084:1599, offset: 0x0205b789, size: 36 bytes, params: 1, frame: 12
|
|
const env0_0 = env1_3(_fun91325);
|
|
return _fun91326;
|
|
function* _fun91325(a0) { // fn#91325, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12084:1619, offset: 0x0205b7b8, size: 235 bytes, params: 2, frame: 17
|
|
var value;
|
|
var value2;
|
|
var value3;
|
|
var binding;
|
|
var binding2;
|
|
var property;
|
|
var value4;
|
|
var acceptMessageRequest;
|
|
var value5;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var error;
|
|
var binding3;
|
|
var value9;
|
|
var APIError;
|
|
var prototype;
|
|
var aPIError;
|
|
var value11;
|
|
var value12;
|
|
exceptionLanding42: while (true) {
|
|
value = undefined;
|
|
value2 = false;
|
|
if (value2) {
|
|
return value;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
if (!AnalyticEvents) {
|
|
env2_4(true);
|
|
value3 = environment.__proto__.__proto__.__proto__;
|
|
reducibleJoin5: while (true) {
|
|
reduciblePort41: while (true) {
|
|
exceptionLanding23: while (true) {
|
|
try {
|
|
try {
|
|
binding = env3_0;
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
break reducibleJoin5;
|
|
}
|
|
try {
|
|
binding = env3_0;
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
binding3 = env3_2;
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
property = binding3[8];
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
value9 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
APIError = value9.APIError;
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
prototype = APIError.prototype;
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
aPIError = new APIError();
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
value11 = aPIError instanceof Object ? aPIError : undefined;
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
binding = env2_3;
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
value12 = binding == null;
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
reducibleJoin41: while (true) {
|
|
if (value12) {
|
|
break reducibleJoin41;
|
|
}
|
|
try {
|
|
binding = env2_3;
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
binding(value11);
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
break reducibleJoin41;
|
|
}
|
|
break reduciblePort41;
|
|
}
|
|
env2_4(false);
|
|
return undefined;
|
|
}
|
|
try {
|
|
try {
|
|
binding2 = env3_2;
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
try {
|
|
property = binding2[7];
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
try {
|
|
value4 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
try {
|
|
acceptMessageRequest = value4.acceptMessageRequest;
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
try {
|
|
value5 = Reflect.apply(acceptMessageRequest, value4, [a0]);
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
yield value5;
|
|
try {
|
|
try {
|
|
value6 = undefined;
|
|
value7 = false;
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
if (value7) {
|
|
env2_4(false);
|
|
return value6;
|
|
}
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
try {
|
|
MessageRequestAnalyticsAction(true);
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
try {
|
|
value8 = importDefault == null;
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
reducibleJoin21: while (true) {
|
|
if (value8) {
|
|
break reducibleJoin21;
|
|
}
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
try {
|
|
importDefault();
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
break reducibleJoin21;
|
|
}
|
|
env2_4(false);
|
|
}
|
|
return undefined;
|
|
}
|
|
env2_4(false);
|
|
throw error;
|
|
}
|
|
|
|
function _fun91326() { // fn#91326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12084:1788, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
|
|
return env0_0.apply(this, arguments);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun91327() { // fn#91327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12084:1859, offset: 0x0205b8a3, size: 36 bytes, params: 1, frame: 12
|
|
const env0_0 = env1_3(_fun91329);
|
|
return _fun91330;
|
|
function* _fun91329(a0) { // fn#91329, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12084:1879, offset: 0x0205b8d2, size: 235 bytes, params: 2, frame: 17
|
|
var value;
|
|
var value2;
|
|
var value3;
|
|
var binding;
|
|
var binding2;
|
|
var property;
|
|
var value4;
|
|
var rejectMessageRequest;
|
|
var value5;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var error;
|
|
var binding3;
|
|
var value9;
|
|
var APIError;
|
|
var prototype;
|
|
var aPIError;
|
|
var value11;
|
|
var value12;
|
|
exceptionLanding42: while (true) {
|
|
value = undefined;
|
|
value2 = false;
|
|
if (value2) {
|
|
return value;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
if (!AnalyticEvents) {
|
|
env2_5(true);
|
|
value3 = environment.__proto__.__proto__.__proto__;
|
|
reducibleJoin5: while (true) {
|
|
reduciblePort41: while (true) {
|
|
exceptionLanding23: while (true) {
|
|
try {
|
|
try {
|
|
binding = env3_0;
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
break reducibleJoin5;
|
|
}
|
|
try {
|
|
binding = env3_0;
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
binding3 = env3_2;
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
property = binding3[8];
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
value9 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
APIError = value9.APIError;
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
prototype = APIError.prototype;
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
aPIError = new APIError();
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
value11 = aPIError instanceof Object ? aPIError : undefined;
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
binding = env2_3;
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
value12 = binding == null;
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
reducibleJoin41: while (true) {
|
|
if (value12) {
|
|
break reducibleJoin41;
|
|
}
|
|
try {
|
|
binding = env2_3;
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
binding(value11);
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
break reducibleJoin41;
|
|
}
|
|
break reduciblePort41;
|
|
}
|
|
env2_5(false);
|
|
return undefined;
|
|
}
|
|
try {
|
|
try {
|
|
binding2 = env3_2;
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
try {
|
|
property = binding2[7];
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
try {
|
|
value4 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
try {
|
|
rejectMessageRequest = value4.rejectMessageRequest;
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
try {
|
|
value5 = Reflect.apply(rejectMessageRequest, value4, [a0]);
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
yield value5;
|
|
try {
|
|
try {
|
|
value6 = undefined;
|
|
value7 = false;
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
if (value7) {
|
|
env2_5(false);
|
|
return value6;
|
|
}
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
try {
|
|
BATCH_REJECT_LIMIT(true);
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
try {
|
|
value8 = dependencyMap == null;
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
reducibleJoin21: while (true) {
|
|
if (value8) {
|
|
break reducibleJoin21;
|
|
}
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
try {
|
|
try {
|
|
dependencyMap();
|
|
} catch (error) {
|
|
break exceptionLanding23;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding42;
|
|
}
|
|
break reducibleJoin21;
|
|
}
|
|
env2_5(false);
|
|
}
|
|
return undefined;
|
|
}
|
|
env2_5(false);
|
|
throw error;
|
|
}
|
|
|
|
function _fun91330() { // fn#91330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12084:2048, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
|
|
return env0_0.apply(this, arguments);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun91331() { // fn#91331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12084:2119, offset: 0x0205b9bd, size: 36 bytes, params: 1, frame: 12
|
|
const env0_0 = env1_3(_fun91333);
|
|
return _fun91334;
|
|
function* _fun91333(a0) { // fn#91333, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12084:2139, offset: 0x0205b9ec, size: 326 bytes, params: 2, frame: 22
|
|
var r9;
|
|
var value;
|
|
var value2;
|
|
var value3;
|
|
var binding;
|
|
var value4;
|
|
var value5;
|
|
var value6;
|
|
var value7;
|
|
var done;
|
|
var value8;
|
|
var binding2;
|
|
var property;
|
|
var value9;
|
|
var rejectMessageRequestBatch;
|
|
var value10;
|
|
var value11;
|
|
var value12;
|
|
var value13;
|
|
var value14;
|
|
var error;
|
|
var binding3;
|
|
var value15;
|
|
var APIError;
|
|
var prototype;
|
|
var aPIError;
|
|
var value17;
|
|
var value18;
|
|
exceptionLanding54: while (true) {
|
|
value = undefined;
|
|
value2 = false;
|
|
if (value2) {
|
|
return value;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
if (!AnalyticEvents) {
|
|
env2_5(true);
|
|
value3 = environment.__proto__.__proto__.__proto__;
|
|
binding = env3_1;
|
|
value4 = binding(env3_2[9]);
|
|
value5 = value4(a0, env3_8);
|
|
reducibleJoin4: while (true) {
|
|
reduciblePort53: while (true) {
|
|
exceptionLanding36: while (true) {
|
|
try {
|
|
try {
|
|
binding = env3_10;
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
break reducibleJoin4;
|
|
}
|
|
try {
|
|
binding = env3_0;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
binding3 = env3_2;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
property = binding3[8];
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
value15 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
APIError = value15.APIError;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
prototype = APIError.prototype;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
aPIError = new APIError();
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
value17 = aPIError instanceof Object ? aPIError : undefined;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
binding = env2_3;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
value18 = binding == null;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
reducibleJoin53: while (true) {
|
|
if (value18) {
|
|
break reducibleJoin53;
|
|
}
|
|
try {
|
|
binding = env2_3;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
binding(value17);
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
break reducibleJoin53;
|
|
}
|
|
break reduciblePort53;
|
|
}
|
|
env2_5(false);
|
|
return undefined;
|
|
}
|
|
try {
|
|
try {
|
|
value6 = binding(value5);
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
try {
|
|
value7 = value6();
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
try {
|
|
done = value7.done;
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
reducibleJoin55: while (true) {
|
|
reducibleJoin53: while (true) {
|
|
if (done) {
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
try {
|
|
BATCH_REJECT_LIMIT(true);
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
try {
|
|
value14 = dependencyMap == null;
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
reducibleJoin35: while (true) {
|
|
if (value14) {
|
|
break reducibleJoin35;
|
|
}
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
try {
|
|
dependencyMap();
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
break reducibleJoin35;
|
|
}
|
|
break reducibleJoin53;
|
|
}
|
|
r9 = value7;
|
|
reducibleLoop10: while (true) {
|
|
try {
|
|
try {
|
|
value8 = r9.value;
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
try {
|
|
binding = env3_0;
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
try {
|
|
binding2 = env3_2;
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
try {
|
|
property = binding2[7];
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
try {
|
|
value9 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
try {
|
|
rejectMessageRequestBatch = value9.rejectMessageRequestBatch;
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
try {
|
|
value10 = Reflect.apply(rejectMessageRequestBatch, value9, [value8]);
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
yield value10;
|
|
try {
|
|
try {
|
|
value11 = undefined;
|
|
value12 = false;
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
if (value12) {
|
|
env2_5(false);
|
|
return value11;
|
|
}
|
|
try {
|
|
try {
|
|
value13 = value6();
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
try {
|
|
done = value13.done;
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
if (done) {
|
|
break reducibleLoop10;
|
|
}
|
|
r9 = value13;
|
|
continue reducibleLoop10;
|
|
}
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
try {
|
|
BATCH_REJECT_LIMIT(true);
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
try {
|
|
value14 = dependencyMap == null;
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
reducibleJoin35: while (true) {
|
|
if (value14) {
|
|
break reducibleJoin35;
|
|
}
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
try {
|
|
dependencyMap();
|
|
} catch (error) {
|
|
break exceptionLanding36;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
break reducibleJoin35;
|
|
}
|
|
break reducibleJoin53;
|
|
}
|
|
env2_5(false);
|
|
break reducibleJoin55;
|
|
}
|
|
}
|
|
return undefined;
|
|
}
|
|
env2_5(false);
|
|
throw error;
|
|
}
|
|
|
|
function _fun91334() { // fn#91334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12084:2409, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
|
|
return env0_0.apply(this, arguments);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun91335() { // fn#91335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12084:2480, offset: 0x0205bb32, size: 36 bytes, params: 1, frame: 12
|
|
const env0_0 = env1_3(_fun91337);
|
|
return _fun91345;
|
|
function* _fun91337(a0) { // fn#91337, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12084:2500, offset: 0x0205bb61, size: 288 bytes, params: 2, frame: 20
|
|
var environment;
|
|
var value;
|
|
var value2;
|
|
var value3;
|
|
var binding;
|
|
var getMutualGuilds;
|
|
var id;
|
|
var binding2;
|
|
var property;
|
|
var value4;
|
|
var getAvatarURL;
|
|
var value5;
|
|
var object;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var error;
|
|
var value9;
|
|
var value10;
|
|
var openAcceptMessageRequestConfirmModal;
|
|
exceptionLanding25: while (true) {
|
|
value = undefined;
|
|
value2 = false;
|
|
if (value2) {
|
|
return value;
|
|
}
|
|
var env0_0 = a0;
|
|
value = environment.__proto__.__proto__;
|
|
if (!AnalyticEvents) {
|
|
reducibleJoin26: while (true) {
|
|
reducibleJoin24: while (true) {
|
|
if (require == null) {
|
|
break reducibleJoin24;
|
|
}
|
|
value3 = environment.__proto__.__proto__.__proto__;
|
|
binding = env3_6;
|
|
getMutualGuilds = binding.getMutualGuilds;
|
|
id = require.id;
|
|
if (Reflect.apply(getMutualGuilds, binding, [id]) != null) {
|
|
break reducibleJoin24;
|
|
}
|
|
UserProfileStore(true);
|
|
reducibleJoin6: while (true) {
|
|
reduciblePort23: while (true) {
|
|
exceptionLanding22: while (true) {
|
|
try {
|
|
try {
|
|
binding = env3_1;
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding25;
|
|
}
|
|
break reducibleJoin6;
|
|
}
|
|
break reduciblePort23;
|
|
}
|
|
UserProfileStore(false);
|
|
break reducibleJoin24;
|
|
}
|
|
try {
|
|
try {
|
|
binding2 = env3_2;
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding25;
|
|
}
|
|
try {
|
|
try {
|
|
property = binding2[10];
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding25;
|
|
}
|
|
try {
|
|
try {
|
|
value4 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding25;
|
|
}
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding25;
|
|
}
|
|
try {
|
|
try {
|
|
id = require.id;
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding25;
|
|
}
|
|
try {
|
|
try {
|
|
getAvatarURL = require.getAvatarURL;
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding25;
|
|
}
|
|
try {
|
|
try {
|
|
value5 = Reflect.apply(getAvatarURL, require, [undefined, 80]);
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding25;
|
|
}
|
|
try {
|
|
try {
|
|
object = {'withMutualGuilds': true, 'withMutualFriendsCount': true};
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding25;
|
|
}
|
|
try {
|
|
try {
|
|
value6 = value4(id, value5, object);
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding25;
|
|
}
|
|
yield value6;
|
|
try {
|
|
try {
|
|
value7 = undefined;
|
|
value8 = false;
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding25;
|
|
}
|
|
if (value8) {
|
|
UserProfileStore(false);
|
|
return value7;
|
|
}
|
|
UserProfileStore(false);
|
|
break reducibleJoin24;
|
|
}
|
|
value = _fun91338();
|
|
value9 = environment.__proto__.__proto__.__proto__;
|
|
binding = env3_0;
|
|
value10 = binding(env3_2[12]);
|
|
openAcceptMessageRequestConfirmModal = value10.openAcceptMessageRequestConfirmModal;
|
|
Reflect.apply(openAcceptMessageRequestConfirmModal, value10, [{channelId: a0, onConfirm: value,
|
|
onCancel: onCancel_91343}]);
|
|
break reducibleJoin26;
|
|
}
|
|
}
|
|
return undefined;
|
|
}
|
|
UserProfileStore(false);
|
|
throw error;
|
|
function _fun91338() { // fn#91338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12084:2699, offset: 0x0205bc81, size: 36 bytes, params: 1, frame: 12
|
|
const env0_0 = env4_3(_fun91340);
|
|
return _fun91342;
|
|
function* _fun91340() { // fn#91340, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12084:2719, offset: 0x0205bcb0, size: 232 bytes, params: 1, frame: 20
|
|
var environment;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
|
|
let r8 = env5_0 != null ? env6_6.getMutualGuilds(env5_0.id)?.map(function(a0) {
|
|
return a0.guild.id;
|
|
}) : [];
|
|
const binding = env6_1;
|
|
const value8 = undefined;
|
|
const value9 = binding(env6_2[11]);
|
|
const track = value9.track;
|
|
const MESSAGE_REQUEST_ACTION = env6_9.MESSAGE_REQUEST_ACTION;
|
|
const ACCEPT_CONFIRMATION_PROMPT = env6_7.ACCEPT_CONFIRMATION_PROMPT;
|
|
r8 = r8 ?? [];
|
|
Reflect.apply(track, value9, [MESSAGE_REQUEST_ACTION, {action: ACCEPT_CONFIRMATION_PROMPT, channel_id: env2_0,
|
|
mutual_guild_ids: r8, other_user_id: env5_0 == null ? value8 : env5_0.id}]);
|
|
yield env5_10(env2_0);
|
|
return value8;
|
|
}
|
|
|
|
function _fun91342() { // fn#91342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12084:2991, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
|
|
return env0_0.apply(this, arguments);
|
|
}
|
|
|
|
}
|
|
|
|
function onCancel_91343() { // fn#91343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12084:3118, offset: 0x0205bd98, size: 192 bytes, params: 1, frame: 18
|
|
let r5 = require != null ? env4_6.getMutualGuilds(require.id)?.map(function(a0) {
|
|
return a0.guild.id;
|
|
}) : [];
|
|
const binding = env4_1;
|
|
const value7 = undefined;
|
|
const value8 = binding(env4_2[11]);
|
|
const track = value8.track;
|
|
const MESSAGE_REQUEST_ACTION = env4_9.MESSAGE_REQUEST_ACTION;
|
|
const DISMISS_CONFIRMATION_PROMPT = env4_7.DISMISS_CONFIRMATION_PROMPT;
|
|
r5 = r5 ?? [];
|
|
Reflect.apply(track, value8, [MESSAGE_REQUEST_ACTION, {action: DISMISS_CONFIRMATION_PROMPT, channel_id: env0_0,
|
|
mutual_guild_ids: r5, other_user_id: require == null ? value7 : require.id}]);
|
|
return value7;
|
|
}
|
|
|
|
}
|
|
|
|
function _fun91345() { // fn#91345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12084:3377, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
|
|
return env0_0.apply(this, arguments);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun91346(a0, a1, a2) { // fn#91346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12084:3449, offset: 0x0205be58, size: 140 bytes, params: 4, frame: 15
|
|
var environment;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
const onConfirm_913472 = onConfirm_91347;
|
|
let value = environment.__proto__;
|
|
const NonSpamRetrainingOptIn = (UserSettingsModule).NonSpamRetrainingOptIn;
|
|
const setting = NonSpamRetrainingOptIn.getSetting();
|
|
if (setting == null) {
|
|
value = require(11902) /* metro dependency 11902: MessageRequestModalActionCreatorsNative */;
|
|
value.onMarkAsNotSpamConfirmationModal({channel: a0, onConfirm: onConfirm_913472, onCancel: onCancel_91348});
|
|
} else {
|
|
onConfirm_913472(setting);
|
|
}
|
|
function onConfirm_91347(a0, a1) { // fn#91347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12084:3473, offset: 0x0205bee4, size: 245 bytes, params: 3, frame: 19
|
|
var value2;
|
|
var value5;
|
|
const value = a0;
|
|
if (a1) {
|
|
value2 = environment.__proto__.__proto__;
|
|
(require(3829) /* metro dependency 3829: UserSettings */).NonSpamRetrainingOptIn.updateSetting(value);
|
|
}
|
|
if (value && require != null) {
|
|
value5 = environment.__proto__.__proto__;
|
|
(require(8153) /* metro dependency 8153: ReportModals */).submitHamReportForFirstDM(require);
|
|
}
|
|
const binding = env1_10;
|
|
const binding2 = env0_0;
|
|
binding(binding2.id);
|
|
const defaultImport = AnalyticsUtils;
|
|
const track = defaultImport.track;
|
|
const MESSAGE_REQUEST_ACTION = AnalyticEvents.MESSAGE_REQUEST_ACTION;
|
|
const ACCEPT_HAM_CONFIRMATION_PROMPT = MessageRequestAnalyticsAction.ACCEPT_HAM_CONFIRMATION_PROMPT;
|
|
Reflect.apply(track, defaultImport, [MESSAGE_REQUEST_ACTION, {action: ACCEPT_HAM_CONFIRMATION_PROMPT,
|
|
channel_id: binding2.id, is_dont_show_again_checked: a1, non_spam_retraining_opt_in: value}]);
|
|
if (importDefault != null) {
|
|
importDefault();
|
|
}
|
|
}
|
|
|
|
function onCancel_91348() { // fn#91348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12084:3903, offset: 0x0205bfd9, size: 80 bytes, params: 1, frame: 15
|
|
const defaultImport = AnalyticsUtils;
|
|
const track = defaultImport.track;
|
|
const MESSAGE_REQUEST_ACTION = AnalyticEvents.MESSAGE_REQUEST_ACTION;
|
|
const DISMISS_HAM_CONFIRMATION_PROMPT = MessageRequestAnalyticsAction.DISMISS_HAM_CONFIRMATION_PROMPT;
|
|
Reflect.apply(track, defaultImport, [MESSAGE_REQUEST_ACTION, {action: DISMISS_HAM_CONFIRMATION_PROMPT,
|
|
channel_id: env0_0.id}]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun91318, 11898, [5, 57, 31, 5189, 11899, 661, 11900, 9738, 4131, 8646, 8491, 683, 11902, 3829, 8153,
|
|
2]) /* metro module 11898, dependencies: [5, 57, 31, 5189, 11899, 661, 11900, 9738, 4131, 8646, 8491, 683, 11902, 3829, 8153, 2] */;
|