139 lines
6.7 KiB
TypeScript
139 lines
6.7 KiB
TypeScript
/* Metro module 15385; source: modules/quests/UnenrolledActivityQuestStore.tsx; dependencies: [6, 7, 15, 17, 18, 21, 566, 694, 2] */
|
|
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
|
|
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
|
|
function _fun117616(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15582:6, offset: 0x024bae13, size: 350 bytes, params: 8, frame: 19
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let Set = global.Set;
|
|
Object.create(Set.prototype, {constructor: {value: Set}});
|
|
new Set();
|
|
Set = global.Set;
|
|
let set = new Set();
|
|
const PersistedStore = (Flux).PersistedStore;
|
|
set = _fun117620(PersistedStore);
|
|
set.displayName = 'UnenrolledActivityQuestStore';
|
|
set.persistKey = 'UnenrolledActivityQuestStore';
|
|
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */,
|
|
{UNENROLLED_ACTIVITY_QUEST_DISMISS: UNENROLLED_ACTIVITY_QUEST_DISMISS,
|
|
UNENROLLED_ACTIVITY_QUEST_AUTO_ENROLL: function(a0) {
|
|
env0_8 = a0.autoEnroll;
|
|
return true;
|
|
}});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/quests/UnenrolledActivityQuestStore.tsx');
|
|
exports.default = set;
|
|
function _isNativeReflectConstruct_117617() { // fn#117617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15582:148, offset: 0x024baf71, 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_117617_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun117620(a0) { // fn#117620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15582:412, offset: 0x024bafd3, size: 149 bytes, params: 2, frame: 16
|
|
const UnenrolledActivityQuestStore2 = UnenrolledActivityQuestStore;
|
|
Inherits(UnenrolledActivityQuestStore2, a0);
|
|
return CreateClass(UnenrolledActivityQuestStore2, [{key: 'initialize', value: function(a0) {
|
|
var r2;
|
|
var r3;
|
|
var property = global.Set;
|
|
var value = undefined;
|
|
r2 = a0 == null ? value : a0.dismissedQuestIds;
|
|
r2 = r2 ?? [];
|
|
var value3 = new property();
|
|
r3 = a0 == null ? value : a0.autoEnroll;
|
|
env1_8 = r3 != null && r3;
|
|
return value;
|
|
}}, {key: 'getState', value: value_117623}, {key: 'isDismissed', value: value_117624}, {key: 'getDismissedQuestIds',
|
|
value: value_117625}]);
|
|
function UnenrolledActivityQuestStore() { // fn#117621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15582:424, offset: 0x01081bdc, size: 113 bytes, params: 1, frame: 20
|
|
const value = environment.__proto__;
|
|
env1_2(this, UnenrolledActivityQuestStore);
|
|
const value3 = env1_5(UnenrolledActivityQuestStore);
|
|
return env1_4(this, _isNativeReflectConstruct_117617() ? global.Reflect.construct(value3, arguments,
|
|
env1_5(this).constructor) : value3.apply(this, arguments));
|
|
}
|
|
|
|
function value_117623() { // fn#117623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15582:930, offset: 0x024bb0cb, size: 38 bytes, params: 1, frame: 15
|
|
const binding = env1_7;
|
|
const items2 = [];
|
|
arraySpread(items2, binding, 0, undefined);
|
|
return {dismissedQuestIds: items2, autoEnroll: env1_8};
|
|
}
|
|
|
|
function value_117624(a0) { // fn#117624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15582:1014, offset: 0x010f296e, size: 31 bytes, params: 2, frame: 12
|
|
var r0;
|
|
let value = a0 != null;
|
|
if (value) {
|
|
value = environment.__proto__;
|
|
value = env1_7.has(a0);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_117625() { // fn#117625, offset: 0x00fbd9cb, size: 9 bytes, params: 1, frame: 1
|
|
return env1_7;
|
|
}
|
|
|
|
}
|
|
|
|
function UNENROLLED_ACTIVITY_QUEST_DISMISS({questId}) { // fn#117626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15582:1280, offset: 0x024bb0f1, size: 189 bytes, params: 2, frame: 15
|
|
var value2;
|
|
var value3;
|
|
var slice;
|
|
var Math;
|
|
var value4;
|
|
var Set;
|
|
var value5;
|
|
var set;
|
|
if (env0_7.size >= 20) {
|
|
value2 = global.Array.from(env0_7);
|
|
value3 = value2.sort((importDefault(21) /* metro dependency 21: SnowflakeUtils */).compare);
|
|
slice = value3.slice;
|
|
Math = global.Math;
|
|
value4 = Reflect.apply(slice, value3, [Math.floor(10)]);
|
|
Set = global.Set;
|
|
value5 = value4.map(function(a0) {
|
|
return a0.toString();
|
|
});
|
|
set = new Set();
|
|
}
|
|
env0_7.add(questId);
|
|
return true;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun117616, 15385, [6, 7, 15, 17, 18, 21, 566, 694,
|
|
2]) /* metro module 15385, dependencies: [6, 7, 15, 17, 18, 21, 566, 694, 2] */;
|