118 lines
6.6 KiB
TypeScript
118 lines
6.6 KiB
TypeScript
/* Metro module 15904; source: modules/guild_settings/GuildSettingsEmojiStore.tsx; dependencies: [6, 7, 15, 17, 18, 15905, 3969, 1393, 672, 566, 694, 2] */
|
|
function _fun122707(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:6, offset: 0x02571fa7, size: 469 bytes, params: 8, frame: 18
|
|
const 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 emojiRecord = importDefault(15905) /* metro dependency 15905: EmojiRecord */;
|
|
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
|
const env0_7 = {};
|
|
const env0_8 = {};
|
|
let value = importDefault(1393) /* metro dependency 1393 */;
|
|
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
|
const HOUR = Millis.HOUR;
|
|
value = new value({max: 5, maxAge: HOUR});
|
|
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
|
_fun122711(Store).displayName = 'GuildSettingsEmojiStore';
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {EMOJI_DELETE: EMOJI_DELETE,
|
|
EMOJI_FETCH_SUCCESS: EMOJI_FETCH_SUCCESS, EMOJI_FETCH_FAILURE: EMOJI_FETCH_FAILURE,
|
|
EMOJI_UPLOAD_START: EMOJI_UPLOAD_START, EMOJI_UPLOAD_STOP: EMOJI_UPLOAD_STOP,
|
|
EMOJI_CACHE_RAW_EMOJI_ASSET: EMOJI_CACHE_RAW_EMOJI_ASSET, GUILD_EMOJIS_UPDATE: GUILD_EMOJIS_UPDATE_122726});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_settings/GuildSettingsEmojiStore.tsx');
|
|
exports.default = value;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_122708() { // fn#122708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:168, offset: 0x0257217c, size: 98 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_122708_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun122711(a0) { // fn#122711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:436, offset: 0x025721de, size: 180 bytes, params: 2, frame: 16
|
|
const closure = GuildSettingsEmojiStore;
|
|
env0_4(closure, a0);
|
|
return env0_1(closure, [{key: 'initialize', value: function() {
|
|
this.waitFor(SelectedGuildStore);
|
|
}}, {key: 'isUploadingEmoji', value: value_122714}, {key: 'getEmojiRevision', value: value_122715},
|
|
{key: 'getEmojis', value: value_122716}, {key: 'getEmojiRawAsset', value: value_122717}]);
|
|
}
|
|
|
|
function EMOJI_DELETE({guildId, emojiId}) { // fn#122718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1142, offset: 0x025722bf, size: 56 bytes, params: 2, frame: 13
|
|
const binding = env0_8;
|
|
const property = binding[guildId];
|
|
binding[guildId] = property.filter(function({id}) {
|
|
return id !== emojiId;
|
|
});
|
|
}
|
|
|
|
function EMOJI_FETCH_SUCCESS({guildId, emojis}) { // fn#122720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1245, offset: 0x025722f7, size: 48 bytes, params: 2, frame: 13
|
|
env0_8[guildId] = emojis.map(_fun122721);
|
|
}
|
|
|
|
function EMOJI_FETCH_FAILURE({guildId}) { // fn#122722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1342, offset: 0x02572347, size: 27 bytes, params: 2, frame: 3
|
|
env0_8[guildId] = [];
|
|
}
|
|
|
|
function EMOJI_UPLOAD_START() { // fn#122723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1411, offset: 0x02572362, size: 18 bytes, params: 1, frame: 2
|
|
const binding = env0_9;
|
|
env0_9 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
|
}
|
|
|
|
function EMOJI_UPLOAD_STOP() { // fn#122724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1466, offset: 0x02572374, size: 18 bytes, params: 1, frame: 2
|
|
const binding = env0_9;
|
|
env0_9 = typeof binding === 'bigint' ? binding - 1n : +binding - 1;
|
|
}
|
|
|
|
function EMOJI_CACHE_RAW_EMOJI_ASSET({emojiId, userImage}) { // fn#122725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1530, offset: 0x02572386, size: 39 bytes, params: 2, frame: 13
|
|
env0_10.set(emojiId, userImage);
|
|
}
|
|
|
|
function GUILD_EMOJIS_UPDATE_122726({guildId}) { // fn#122726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1621, offset: 0x025723ad, size: 48 bytes, params: 2, frame: 5
|
|
const binding = env0_7;
|
|
binding[guildId] = (binding[guildId] ?? 0) + 1;
|
|
}
|
|
|
|
function value_122714() { // fn#122714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:840, offset: 0x02572292, size: 15 bytes, params: 1, frame: 2
|
|
return env1_9 > 0;
|
|
}
|
|
|
|
function value_122715(a0) { // fn#122715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:894, offset: 0x025722a1, size: 30 bytes, params: 2, frame: 3
|
|
const value = environment.__proto__;
|
|
return env1_7[a0] ?? 0;
|
|
}
|
|
|
|
function _fun122721(a0) { // fn#122721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16112:1307, offset: 0x02572327, size: 32 bytes, params: 2, frame: 11
|
|
let value = environment.__proto__;
|
|
value = Object.create(EmojiRecord.prototype, {constructor: {value: EmojiRecord}});
|
|
const emojiRecord = new EmojiRecord(a0);
|
|
return emojiRecord instanceof Object ? emojiRecord : value;
|
|
}
|
|
|