decord/source/modules/search/SearchRecentMessageStore.tsx

114 lines
3.1 KiB
TypeScript
Raw Normal View History

2026-07-23 10:11:24 +00:00
// Module ID: 10081
// Function ID: 78007
2026-07-20 16:05:17 +00:00
// Name: _isNativeReflectConstruct
2026-07-23 10:11:24 +00:00
// Dependencies: [6, 7, 15, 17, 18, 4351, 566, 686, 2]
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
// Module 10081 (_isNativeReflectConstruct)
import initialize from "initialize";
import dispatcher from "dispatcher";
import _possibleConstructorReturn from "_possibleConstructorReturn";
import _getPrototypeOf from "_getPrototypeOf";
import _inherits from "_inherits";
const require = arg1;
2026-07-20 16:05:17 +00:00
function _isNativeReflectConstruct() {
let closure_0 = !valueOf.call(Reflect.construct(Boolean, [], () => {
}));
function _isNativeReflectConstruct() {
return closure_0;
}
const result = _isNativeReflectConstruct();
}
function handleReset() {
const map = new Map();
}
2026-07-23 10:11:24 +00:00
let map = new Map();
2026-07-20 16:05:17 +00:00
let closure_8 = [];
2026-07-23 10:11:24 +00:00
let tmp3 = ((Store) => {
2026-07-20 16:05:17 +00:00
class SearchRecentMessageStore {
constructor() {
self = this;
2026-07-23 10:11:24 +00:00
tmp = outer1_2(this, SearchRecentMessageStore);
obj = outer1_5(SearchRecentMessageStore);
tmp2 = outer1_4;
if (outer1_9()) {
2026-07-20 16:05:17 +00:00
tmp6 = globalThis;
_Reflect = Reflect;
2026-07-23 10:11:24 +00:00
tmp7 = outer1_5;
2026-07-20 16:05:17 +00:00
tmp8 = arguments;
2026-07-23 10:11:24 +00:00
constructResult = Reflect.construct(obj, arguments, outer1_5(self).constructor);
2026-07-20 16:05:17 +00:00
} else {
tmp3 = arguments;
tmp4 = arguments;
constructResult = obj(...arguments);
}
return tmp2(self, constructResult);
}
}
callback2(SearchRecentMessageStore, Store);
const items = [
{
key: "getRecentMessageAuthorIds",
value(arg0) {
2026-07-23 10:11:24 +00:00
let value = outer1_7.get(arg0);
2026-07-20 16:05:17 +00:00
if (null == value) {
2026-07-23 10:11:24 +00:00
value = outer1_8;
2026-07-20 16:05:17 +00:00
}
return value;
}
}
];
return callback(SearchRecentMessageStore, items);
2026-07-23 10:11:24 +00:00
})(require("initialize").Store);
2026-07-20 16:05:17 +00:00
tmp3.displayName = "SearchRecentMessageStore";
2026-07-23 10:11:24 +00:00
tmp3 = new tmp3(require("dispatcher"), {
2026-07-20 16:05:17 +00:00
SEARCH_MESSAGES_SUCCESS: function handleSearchMessagesSuccess(arg0) {
let data;
let guildId;
({ guildId, data } = arg0);
2026-07-23 10:11:24 +00:00
let c0;
let items;
let set;
2026-07-20 16:05:17 +00:00
if (null == guildId) {
return false;
} else {
2026-07-23 10:11:24 +00:00
c0 = false;
items = map.get(guildId);
2026-07-20 16:05:17 +00:00
if (null == items) {
items = [];
}
items = [];
HermesBuiltin.arraySpread(items, 0);
const _Set = Set;
2026-07-23 10:11:24 +00:00
set = new Set(items);
let item = data.forEach((messages) => {
2026-07-20 16:05:17 +00:00
messages = messages.messages;
const item = messages.forEach((arg0) => {
let tmp;
[tmp] = arg0;
2026-07-23 10:11:24 +00:00
const messageRecord = callback(items[5]).createMessageRecord(tmp);
let tmp3 = !outer1_2.has(messageRecord.author.id);
2026-07-20 16:05:17 +00:00
if (tmp3) {
2026-07-23 10:11:24 +00:00
tmp3 = outer1_2.size < 15;
2026-07-20 16:05:17 +00:00
}
if (tmp3) {
2026-07-23 10:11:24 +00:00
outer1_2.add(messageRecord.author.id);
outer1_1.push(messageRecord.author.id);
const outer1_0 = true;
2026-07-20 16:05:17 +00:00
}
});
});
2026-07-23 10:11:24 +00:00
if (c0) {
2026-07-20 16:05:17 +00:00
const result = map.set(guildId, items);
}
2026-07-23 10:11:24 +00:00
return c0;
2026-07-20 16:05:17 +00:00
}
},
SEARCH_RECENT_MESSAGES_CLEAR: handleReset,
CONNECTION_OPEN: handleReset
});
2026-07-23 10:11:24 +00:00
let result = require("_possibleConstructorReturn").fileFinishedImporting("modules/search/SearchRecentMessageStore.tsx");
2026-07-20 16:05:17 +00:00
export default tmp3;