Files
2026-07-28 01:06:53 +03:00

1349 lines
56 KiB
TypeScript

/* Metro module 9864; source: modules/summaries/SummaryActionCreators.tsx; dependencies: [5, 31, 4257, 1379, 9865, 661, 672, 694, 507, 4131, 22, 9867, 632, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import Durations from '../../utils/Durations.tsx'; /* Metro dependency 672 */
import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GatewayConnectionStore from '../gateway/GatewayConnectionStore.tsx'; /* Metro dependency 4257 */
import SummaryStore from './SummaryStore.tsx'; /* Metro dependency 9865 */
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 */
function _fun77320(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:6, offset: 0x01df92c7, size: 550 bytes, params: 8, frame: 30
const env0_0 = require;
const closure = function() {
return _fetchSummary.apply(this, arguments);
};
const closure2 = function() {
return _fetchSummaries.apply(this, arguments);
};
const closure3 = function(a0, a1) {
var value = a1;
var defaultImport = importDefault(dependencyMap[7]);
var value3 = null;
defaultImport.dispatch({type: 'SET_HIGHLIGHTED_SUMMARY', channelId: a0,
summaryId: value3 != value ? value : value3});
};
const setSelectedSummary2 = setSelectedSummary;
const closure5 = function(a0, a1) {
var value = a0;
var value2 = a1;
var defaultImport = importDefault(dependencyMap[7]);
var value4 = null;
defaultImport.dispatch({type: 'UPDATE_VISIBLE_MESSAGES', topVisibleMessage: value4 != value ? value : value4,
bottomVisibleMessage: value4 != value2 ? value2 : value4});
};
const setSummaryFeedback2 = setSummaryFeedback;
const closure7 = function() {
return _fetchChannelAffinities.apply(this, arguments);
};
const closure8 = function() {
return _fetchSummariesBulk.apply(this, arguments);
};
const useMaybeFetchChannelAffinitiesAndSummaries2 = useMaybeFetchChannelAffinitiesAndSummaries;
const closure10 = function({channelIds = []}) {
useMaybeFetchChannelAffinitiesAndSummaries(channelIds);
return require(dependencyMap[12]).useStateFromStoresArray([SummaryStore], _fun77353, []);
};
const closure11 = function(a0) {
return _deleteSummary.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const Millis = (Durations).Millis;
const SECOND = Millis.SECOND;
const env0_9 = 30 * SECOND;
const env0_10 = {};
const env0_11 = {};
object = {setSummaryFeedback: setSummaryFeedback2, updateVisibleMessages: closure5,
setSelectedSummary: setSelectedSummary2, setHighlightedSummary: closure3, fetchSummaries: closure2,
fetchSummariesBulk: closure8, useChannelSummaries: closure10, deleteSummary: closure11};
(FileImportTrackerModule).fileFinishedImporting('modules/summaries/SummaryActionCreators.tsx');
exports.default = object;
exports.fetchSummary = closure;
exports.fetchSummaries = closure2;
exports.setHighlightedSummary = closure3;
exports.toggleTopicsBar = toggleTopicsBar;
exports.setSelectedSummary = setSelectedSummary2;
exports.updateVisibleMessages = closure5;
exports.stopPolling = stopPolling;
exports.setSummaryFeedback = setSummaryFeedback2;
exports.fetchChannelAffinities = closure7;
exports.fetchSummariesBulk = closure8;
exports.useMaybeFetchChannelAffinitiesAndSummaries = useMaybeFetchChannelAffinitiesAndSummaries2;
exports.useChannelSummaries = closure10;
exports.deleteSummary = closure11;
function _fetchSummary() { // fn#77322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:267, offset: 0x01df94ed, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun77324).apply(this, arguments);
function* _fun77324(a0, a1) { // fn#77324, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:316, offset: 0x01df952a, size: 380 bytes, params: 3, frame: 26
var body;
var r7;
var r8;
var Date;
var now;
var value4;
var dispatch;
var object;
var binding2;
var property;
var value6;
var HTTP;
var get;
var CHANNEL_SUMMARY;
var value7;
var value8;
var value9;
var value10;
var value11;
var error;
var APIError;
var prototype;
var value12;
var aPIError;
var value13;
var value14;
if (false) {
return undefined;
}
value = undefined;
let binding = env2_7;
if (binding.shouldFetch(a0, a1)) {
Date = global.Date;
value4 = Date.now();
binding = env2_1;
binding(env2_2[7]).dispatch({type: 'REQUEST_CHANNEL_SUMMARY', channelId: a0, summaryId: a1,
requestedAt: value4});
reducibleJoin4: while (true) {
reduciblePort29: while (true) {
exceptionLanding28: while (true) {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding28;
}
break reducibleJoin4;
}
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value12 = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value13 = aPIError instanceof Object ? aPIError : value12;
r7 = value13;
r8 = value;
break reduciblePort29;
}
binding = env2_1;
value14 = binding(env2_2[7]);
dispatch = value14.dispatch;
Date = global.Date;
now = Date.now;
Reflect.apply(dispatch, value14, [{type: 'RECEIVE_CHANNEL_SUMMARY', channelId: a0, summary: r8, error: r7,
requestedAt: value4, receivedAt: Reflect.apply(now, Date, [])}]);
return value;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding28;
}
try {
property = binding2[8];
} catch (error) {
break exceptionLanding28;
}
try {
value6 = binding(property);
} catch (error) {
break exceptionLanding28;
}
try {
HTTP = value6.HTTP;
} catch (error) {
break exceptionLanding28;
}
try {
get = HTTP.get;
} catch (error) {
break exceptionLanding28;
}
try {
object = {};
} catch (error) {
break exceptionLanding28;
}
try {
binding = env2_8;
} catch (error) {
break exceptionLanding28;
}
try {
CHANNEL_SUMMARY = binding.CHANNEL_SUMMARY;
} catch (error) {
break exceptionLanding28;
}
try {
value7 = Reflect.apply(CHANNEL_SUMMARY, binding, [a0, a1]);
} catch (error) {
break exceptionLanding28;
}
try {
object.url = value7;
} catch (error) {
break exceptionLanding28;
}
try {
object.rejectWithError = false;
} catch (error) {
break exceptionLanding28;
}
try {
value8 = Reflect.apply(get, HTTP, [object]);
} catch (error) {
break exceptionLanding28;
}
yield value8;
try {
value9 = undefined;
value10 = false;
} catch (error) {
break exceptionLanding28;
}
if (value10) {
return value9;
}
try {
value11 = value9 == null;
} catch (error) {
break exceptionLanding28;
}
reducibleJoin26: while (true) {
if (value11) {
body = value;
break reducibleJoin26;
}
try {
body = value9.body;
} catch (error) {
break exceptionLanding28;
}
break reducibleJoin26;
}
r7 = value;
r8 = body;
binding = env2_1;
value14 = binding(env2_2[7]);
dispatch = value14.dispatch;
object = {type: 'RECEIVE_CHANNEL_SUMMARY', channelId: a0, summary: r8, error: r7, requestedAt: value4};
Date = global.Date;
object.receivedAt = Date.now();
Reflect.apply(dispatch, value14, [object]);
}
return value;
}
}
function _fetchSummaries() { // fn#77326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:839, offset: 0x01df96a6, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun77328).apply(this, arguments);
function* _fun77328(a0) { // fn#77328, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:892, offset: 0x01df96e3, size: 493 bytes, params: 2, frame: 27
var r3;
var r8;
var summaries;
var body;
var r13;
var r7;
var Date;
var now;
var value4;
var dispatch;
var object;
var binding2;
var property;
var value6;
var HTTP;
var get;
var CHANNEL_SUMMARIES;
var value7;
var value8;
var value9;
var value10;
var error;
var APIError;
var prototype;
var value11;
var aPIError;
var value12;
var Array;
var binding3;
var value13;
var takeRight;
var value14;
var value15;
if (false) {
return undefined;
}
value = undefined;
let binding = env2_7;
if (binding.shouldFetch(a0)) {
Date = global.Date;
value4 = Date.now();
binding = env2_1;
binding(env2_2[7]).dispatch({type: 'REQUEST_CHANNEL_SUMMARIES', channelId: a0, requestedAt: value4});
reducibleJoin4: while (true) {
reduciblePort25: while (true) {
exceptionLanding24: while (true) {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding24;
}
break reducibleJoin4;
}
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value11 = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value12 = aPIError instanceof Object ? aPIError : value11;
r3 = value;
r8 = value12;
break reduciblePort25;
}
reducibleJoin28: while (true) {
if (r3 == null) {
summaries = value;
break reducibleJoin28;
}
body = r3.body;
if (body == null) {
summaries = value;
break reducibleJoin28;
}
summaries = body.summaries;
break reducibleJoin28;
}
Array = global.Array;
if (summaries instanceof Array) {
body = r3.body;
summaries = body.summaries;
r13 = summaries;
} else {
reducibleJoin31: while (true) {
if (r3 == null) {
body = value;
break reducibleJoin31;
}
body = r3.body;
break reducibleJoin31;
}
reducibleJoin33: while (true) {
if (body != null) {
r13 = body;
break reducibleJoin33;
}
r13 = [];
break reducibleJoin33;
}
}
binding = env2_1;
binding3 = env2_2;
value13 = binding(binding3[10]);
takeRight = value13.takeRight;
value14 = Reflect.apply(takeRight, value13, [r13, 75]);
value15 = binding(binding3[7]);
dispatch = value15.dispatch;
r7 = r8 ?? value;
Date = global.Date;
now = Date.now;
Reflect.apply(dispatch, value15, [{type: 'RECEIVE_CHANNEL_SUMMARIES', channelId: a0, summaries: value14,
error: r7,
requestedAt: value4, receivedAt: Reflect.apply(now, Date, [])}]);
return value;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding24;
}
try {
property = binding2[8];
} catch (error) {
break exceptionLanding24;
}
try {
value6 = binding(property);
} catch (error) {
break exceptionLanding24;
}
try {
HTTP = value6.HTTP;
} catch (error) {
break exceptionLanding24;
}
try {
get = HTTP.get;
} catch (error) {
break exceptionLanding24;
}
try {
object = {};
} catch (error) {
break exceptionLanding24;
}
try {
binding = env2_8;
} catch (error) {
break exceptionLanding24;
}
try {
CHANNEL_SUMMARIES = binding.CHANNEL_SUMMARIES;
} catch (error) {
break exceptionLanding24;
}
try {
value7 = Reflect.apply(CHANNEL_SUMMARIES, binding, [a0]);
} catch (error) {
break exceptionLanding24;
}
try {
object.url = value7;
} catch (error) {
break exceptionLanding24;
}
try {
object.rejectWithError = false;
} catch (error) {
break exceptionLanding24;
}
try {
value8 = Reflect.apply(get, HTTP, [object]);
} catch (error) {
break exceptionLanding24;
}
yield value8;
try {
value9 = undefined;
value10 = false;
} catch (error) {
break exceptionLanding24;
}
if (value10) {
return value9;
}
r3 = value9;
r8 = value;
reducibleJoin28: while (true) {
if (r3 == null) {
summaries = value;
break reducibleJoin28;
}
body = r3.body;
if (body == null) {
summaries = value;
break reducibleJoin28;
}
summaries = body.summaries;
break reducibleJoin28;
}
Array = global.Array;
if (summaries instanceof Array) {
r13 = r3.body.summaries;
} else {
reducibleJoin31: while (true) {
if (r3 == null) {
body = value;
break reducibleJoin31;
}
body = r3.body;
break reducibleJoin31;
}
reducibleJoin33: while (true) {
if (body != null) {
r13 = body;
break reducibleJoin33;
}
r13 = [];
break reducibleJoin33;
}
}
binding = env2_1;
binding3 = env2_2;
value13 = binding(binding3[10]);
value14 = value13.takeRight(r13, 75);
value15 = binding(binding3[7]);
dispatch = value15.dispatch;
object = {type: 'RECEIVE_CHANNEL_SUMMARIES', channelId: a0, summaries: value14};
r7 = r8 ?? value;
object.error = r7;
object.requestedAt = value4;
Date = global.Date;
object.receivedAt = Date.now();
Reflect.apply(dispatch, value15, [object]);
}
return value;
}
}
function setSelectedSummary(a0, a1) { // fn#77330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:1613, offset: 0x01df991c, size: 107 bytes, params: 3, frame: 17
const value = a1;
const value2 = null;
if (value2 != a0 && value2 != value) {
fetchSummary(a0, value);
}
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SET_SELECTED_SUMMARY', channelId: a0,
summaryId: value2 != value ? value : value2});
}
function updateCount(a0, a1) { // fn#77332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:1923, offset: 0x01df99e2, size: 75 bytes, params: 3, frame: 6
if (env0_10[a0] == null) {
env0_10[a0] = 0;
}
if (a1 === null) {
env0_10[a0] = 0;
} else {
env0_10[a0] += a1;
}
return env0_10[a0];
}
function setSummaryFeedback(a0, a1) { // fn#77333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:2006, offset: 0x01df9a2d, size: 65 bytes, params: 3, frame: 13
(Dispatcher).dispatch({type: 'SET_SUMMARY_FEEDBACK', summary: a0,
rating: a1});
}
function _fetchChannelAffinities() { // fn#77335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:2193, offset: 0x01df9a6e, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun77337).apply(this, arguments);
function* _fun77337() { // fn#77337, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:2262, offset: 0x01df9aab, size: 388 bytes, params: 1, frame: 22
var r7;
var r8;
var channel_affinities;
var Date;
var now;
var value4;
var dispatch;
var object;
var binding2;
var property;
var value6;
var HTTP;
var get;
var value7;
var value8;
var value9;
var error;
var APIError;
var prototype;
var value10;
var aPIError;
var value11;
var body;
var value12;
if (false) {
return undefined;
}
value = undefined;
let binding = env2_7;
if (binding.shouldFetchChannelAffinities()) {
Date = global.Date;
value4 = Date.now();
binding = env2_1;
binding(env2_2[7]).dispatch({type: 'REQUEST_CHANNEL_AFFINITIES', requestedAt: value4});
reducibleJoin5: while (true) {
reduciblePort19: while (true) {
exceptionLanding18: while (true) {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding18;
}
break reducibleJoin5;
}
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value10 = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value11 = aPIError instanceof Object ? aPIError : value10;
r7 = value;
r8 = value11;
break reduciblePort19;
}
reducibleJoin22: while (true) {
if (r7 == null) {
channel_affinities = value;
break reducibleJoin22;
}
body = r7.body;
if (body == null) {
channel_affinities = value;
break reducibleJoin22;
}
channel_affinities = body.channel_affinities;
break reducibleJoin22;
}
binding = env2_1;
value12 = binding(env2_2[7]);
dispatch = value12.dispatch;
r7 = r8 ?? value;
Date = global.Date;
now = Date.now;
Reflect.apply(dispatch, value12, [{type: 'RECEIVE_CHANNEL_AFFINITIES', affinities: channel_affinities,
error: r7,
requestedAt: value4, receivedAt: Reflect.apply(now, Date, [])}]);
return value;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding18;
}
try {
property = binding2[8];
} catch (error) {
break exceptionLanding18;
}
try {
value6 = binding(property);
} catch (error) {
break exceptionLanding18;
}
try {
HTTP = value6.HTTP;
} catch (error) {
break exceptionLanding18;
}
try {
get = HTTP.get;
} catch (error) {
break exceptionLanding18;
}
try {
object = {'url': '/users/@me/affinities/channels', 'rejectWithError': false};
} catch (error) {
break exceptionLanding18;
}
try {
value7 = Reflect.apply(get, HTTP, [object]);
} catch (error) {
break exceptionLanding18;
}
yield value7;
try {
value8 = undefined;
value9 = false;
} catch (error) {
break exceptionLanding18;
}
if (value9) {
return value8;
}
r7 = value8;
r8 = value;
reducibleJoin22: while (true) {
if (r7 == null) {
channel_affinities = value;
break reducibleJoin22;
}
body = r7.body;
if (body == null) {
channel_affinities = value;
break reducibleJoin22;
}
channel_affinities = body.channel_affinities;
break reducibleJoin22;
}
binding = env2_1;
value12 = binding(env2_2[7]);
dispatch = value12.dispatch;
object = {type: 'RECEIVE_CHANNEL_AFFINITIES', affinities: channel_affinities};
r7 = r8 ?? value;
object.error = r7;
object.requestedAt = value4;
Date = global.Date;
object.receivedAt = Date.now();
Reflect.apply(dispatch, value12, [object]);
return value;
}
const Promise = global.Promise;
return Promise.resolve(null);
}
}
function _fetchSummariesBulk() { // fn#77339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:2872, offset: 0x01df9c2f, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun77341).apply(this, arguments);
async function _fun77341(a0) { // fn#77341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:2933, offset: 0x01df9c75, size: 557 bytes, params: 2, frame: 28
var r1;
var r14;
var r8;
var r9;
var summaries;
var object;
var binding2;
var property;
var value13;
var HTTP;
var post;
var USER_SUMMARIES;
var object2;
var value14;
var value15;
var value16;
var error;
var APIError;
var prototype;
var value17;
var aPIError;
var value18;
var body;
var value19;
let value = a1;
if (false) {
return undefined;
}
const value4 = a0;
const value5 = undefined;
reducibleJoin3: while (true) {
if (value !== value5) {
r1 = value;
break reducibleJoin3;
}
r1 = {};
break reducibleJoin3;
}
let useQuickSwitcher = r1.useQuickSwitcher;
reducibleJoin5: while (true) {
if (useQuickSwitcher !== value5) {
break reducibleJoin5;
}
value = true;
useQuickSwitcher = value;
break reducibleJoin5;
}
let useChannelAffinities = r1.useChannelAffinities;
reducibleJoin7: while (true) {
if (useChannelAffinities !== value5) {
break reducibleJoin7;
}
value = true;
useChannelAffinities = value;
break reducibleJoin7;
}
await value5;
if (false) {
return undefined;
}
reducibleJoin11: while (true) {
if (value4 != null) {
r14 = value4;
break reducibleJoin11;
}
r14 = [];
break reducibleJoin11;
}
let Date = global.Date;
let now = Date.now;
value = Reflect.apply(now, Date, []);
const concat = r14.concat;
let binding = env2_7;
const value11 = Reflect.apply(concat, r14, [binding.defaultChannelIds({withQuickSwitcher: useQuickSwitcher,
withChannelAffinities: useChannelAffinities})]).filter(_fun77342).filter(_fun77343).slice(0, 50);
if (value11.length === 0) {
return global.Promise.resolve(null);
}
const value12 = env2_1(env2_2[7]);
let dispatch = value12.dispatch;
Reflect.apply(dispatch, value12, [{type: 'REQUEST_CHANNEL_SUMMARIES_BULK', channelIds: value11,
requestedAt: value}]);
reducibleJoin14: while (true) {
reduciblePort37: while (true) {
exceptionLanding36: while (true) {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding36;
}
break reducibleJoin14;
}
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value17 = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value18 = aPIError instanceof Object ? aPIError : value17;
r8 = value18;
r9 = value5;
break reduciblePort37;
}
reducibleJoin39: while (true) {
if (r9 == null) {
summaries = value5;
break reducibleJoin39;
}
body = r9.body;
summaries = body.summaries;
break reducibleJoin39;
}
binding = env2_1;
value19 = binding(env2_2[7]);
dispatch = value19.dispatch;
Date = global.Date;
now = Date.now;
Reflect.apply(dispatch, value19, [{type: 'RECEIVE_CHANNEL_SUMMARIES_BULK', requestedAt: value,
receivedAt: Reflect.apply(now, Date, []), summaries: summaries, requestArgs: {channelIds: value11},
error: r8}]);
return value5;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding36;
}
try {
property = binding2[8];
} catch (error) {
break exceptionLanding36;
}
try {
value13 = binding(property);
} catch (error) {
break exceptionLanding36;
}
try {
HTTP = value13.HTTP;
} catch (error) {
break exceptionLanding36;
}
try {
post = HTTP.post;
} catch (error) {
break exceptionLanding36;
}
try {
object = {};
} catch (error) {
break exceptionLanding36;
}
try {
binding = env2_8;
} catch (error) {
break exceptionLanding36;
}
try {
USER_SUMMARIES = binding.USER_SUMMARIES;
} catch (error) {
break exceptionLanding36;
}
try {
object.url = USER_SUMMARIES;
} catch (error) {
break exceptionLanding36;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding36;
}
try {
object2.channel_ids = value11;
} catch (error) {
break exceptionLanding36;
}
try {
object.body = object2;
} catch (error) {
break exceptionLanding36;
}
try {
object.rejectWithError = false;
} catch (error) {
break exceptionLanding36;
}
try {
value14 = Reflect.apply(post, HTTP, [object]);
} catch (error) {
break exceptionLanding36;
}
await value14;
try {
value15 = undefined;
value16 = false;
} catch (error) {
break exceptionLanding36;
}
if (value16) {
return value15;
}
r8 = value5;
r9 = value15;
reducibleJoin39: while (true) {
if (r9 == null) {
summaries = value5;
break reducibleJoin39;
}
body = r9.body;
summaries = body.summaries;
break reducibleJoin39;
}
value19 = env2_1(env2_2[7]);
dispatch = value19.dispatch;
object = {type: 'RECEIVE_CHANNEL_SUMMARIES_BULK', requestedAt: value};
Date = global.Date;
object.receivedAt = Date.now();
object.summaries = summaries;
object.requestArgs = {channelIds: value11};
object.error = r8;
Reflect.apply(dispatch, value19, [object]);
return value5;
function _fun77342(a0) { // fn#77342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:3132, offset: 0x01df9ea2, size: 61 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return env3_0(env3_2[11]).canSeeChannelSummaries(env3_6.getChannel(a0), false, true);
}
function _fun77343(a0) { // fn#77343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:3217, offset: 0x01df9edf, size: 92 bytes, params: 2, frame: 14
var r0;
const Date = global.Date;
let value = Date.now();
const value3 = env3_7.status(a0);
if (value3 != null) {
if (value3.fetching) {
return false;
}
}
const lastReceivedAt = value3?.lastReceivedAt;
const value5 = lastReceivedAt == null;
if (value5) {
r0 = value5;
} else {
value -= lastReceivedAt;
value = value > env3_9;
r0 = value;
}
return r0;
}
}
}
function useMaybeFetchChannelAffinitiesAndSummaries() { // fn#77344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:3842, offset: 0x01df9f3b, size: 154 bytes, params: 1, frame: 17
const value = a0;
ReactModule.useEffect(_fun77347, [ReactModule.useMemo(_fun77346, [value !== undefined ? value : []]),
(require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GatewayConnectionStore],
function() {
return GatewayConnectionStore.isConnected();
})]);
function _fun77346() { // fn#77346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:3974, offset: 0x01df9fd5, size: 23 bytes, params: 1, frame: 11
return env0_0.join(',');
}
function _fun77347() { // fn#77347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:4009, offset: 0x01df9fec, size: 40 bytes, params: 1, frame: 9
if (env0_1) {
(function() {
return _fetch_77348.apply(this, arguments);
})();
}
function _fetch_77348() { // fn#77348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:4014, offset: 0x01dfa014, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_3(_fun77350).apply(this, arguments);
function* _fun77350() { // fn#77350, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:4049, offset: 0x01dfa054, size: 91 bytes, params: 1, frame: 13
var binding;
var value3;
var value4;
var value5;
var error;
var value6;
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
try {
binding = env4_16;
} catch (error) {
binding = env4_18;
value = environment.__proto__.__proto__.__proto__;
value = dependencyMap.split(',');
yield binding(value);
value = undefined;
value6 = false;
return value6 ? value : undefined;
}
try {
value3 = binding();
} catch (error) {
binding = env4_18;
value = environment.__proto__.__proto__.__proto__;
value = dependencyMap.split(',');
yield binding(value);
value = undefined;
value6 = false;
return value6 ? value : undefined;
}
yield value3;
try {
value4 = undefined;
value5 = false;
} catch (error) {
binding = env4_18;
value = environment.__proto__.__proto__.__proto__;
value = dependencyMap.split(',');
yield binding(value);
value = undefined;
value6 = false;
return value6 ? value : undefined;
}
if (value5) {
return value4;
}
binding = env4_18;
value = environment.__proto__.__proto__.__proto__;
yield binding(dependencyMap.split(','));
}
}
}
}
}
function useChannelSummaries({channelIds = []}) { // fn#77352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:4239, offset: 0x01dfa0af, size: 91 bytes, params: 2, frame: 15
useMaybeFetchChannelAffinitiesAndSummaries(channelIds);
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresArray([SummaryStore],
function() {
return SummaryStore.topSummaries();
}, []);
function _fun77353() { // fn#77353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:4378, offset: 0x01dfa10a, size: 21 bytes, params: 1, frame: 9
return SummaryStore.topSummaries();
}
}
function _deleteSummary() { // fn#77355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:4474, offset: 0x01dfa11f, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun77357).apply(this, arguments);
function* _fun77357(a0) { // fn#77357, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:4525, offset: 0x01dfa15c, size: 219 bytes, params: 2, frame: 20
var binding;
var binding2;
var property;
var value3;
var HTTP;
var del;
var object;
var CHANNEL_SUMMARY;
var channelId;
var id;
var value4;
var value5;
var value6;
var value7;
var binding3;
var value8;
var dispatch;
var error;
var APIError;
var prototype;
var aPIError;
if (true) {
value = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
property = binding2[8];
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
value3 = binding(property);
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
HTTP = value3.HTTP;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
del = HTTP.del;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
object = {};
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
binding = env2_8;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
CHANNEL_SUMMARY = binding.CHANNEL_SUMMARY;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
channelId = a0.channelId;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
id = a0.id;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
value4 = Reflect.apply(CHANNEL_SUMMARY, binding, [channelId, id]);
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
object.url = value4;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
object.rejectWithError = false;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
value5 = Reflect.apply(del, HTTP, [object]);
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
yield value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
if (value7) {
return value6;
}
try {
binding = env2_1;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
property = binding3[7];
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
value8 = binding(property);
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
dispatch = value8.dispatch;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
object = {};
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
object.type = 'DELETE_SUMMARY';
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
object.summary = a0;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
Reflect.apply(dispatch, value8, [object]);
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[9]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
}
}
}
function toggleTopicsBar() { // fn#77358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:5268, offset: 0x01dfa237, size: 49 bytes, params: 1, frame: 13
(Dispatcher).dispatch({type: 'TOGGLE_TOPICS_BAR'});
}
function stopPolling(a0) { // fn#77359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10050:5441, offset: 0x01dfa268, size: 63 bytes, params: 2, frame: 14
if (updateCount(a0, -1) <= 0) {
updateCount(a0, 0);
global.clearInterval(env0_11[a0]);
}
}
}
global.__d(_fun77320, 9864, [5, 31, 4257, 1379, 9865, 661, 672, 694, 507, 4131, 22, 9867, 632,
2]) /* metro module 9864, dependencies: [5, 31, 4257, 1379, 9865, 661, 672, 694, 507, 4131, 22, 9867, 632, 2] */;