Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,395 @@
|
||||
/* Metro module 7065; source: modules/premium/ReferralTrialStore.tsx; dependencies: [6, 7, 15, 17, 18, 1878, 661, 7066, 694, 671, 566, 2] */
|
||||
function _fun56062(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7243:6, offset: 0x013bc338, size: 713 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_56068 = 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 closure = function({messages}) {
|
||||
messages.forEach(_fun56071);
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_9 = (require(661) /* metro dependency 661: Constants */).NOOP_NULL;
|
||||
let Set = global.Set;
|
||||
const set = new Set();
|
||||
let Map = global.Map;
|
||||
let map = new Map();
|
||||
Set = global.Set;
|
||||
map = new Set();
|
||||
Set = global.Set;
|
||||
map = new Set();
|
||||
Map = global.Map;
|
||||
map = new Map();
|
||||
let env0_19 = [];
|
||||
const emitChanges_56074 = function() {
|
||||
return true;
|
||||
};
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
_fun56075(Store).displayName = 'ReferralTrialStore';
|
||||
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */,
|
||||
{BILLING_REFERRAL_TRIAL_OFFER_UPDATE: BILLING_REFERRAL_TRIAL_OFFER_UPDATE,
|
||||
BILLING_REFERRALS_REMAINING_FETCH_START: function(a0) {
|
||||
var r2;
|
||||
if (a0 == null) {
|
||||
throwTypeError(a0, "Cannot destructure 'undefined' or 'null'.", r2);
|
||||
throw undefined;
|
||||
}
|
||||
env0_24 = null;
|
||||
env0_13 = true;
|
||||
}, BILLING_REFERRALS_REMAINING_FETCH_SUCCESS: function({referrals_remaining, sent_user_ids, refresh_at,
|
||||
recipient_status, has_eligible_friends, reminder_state_id}) {
|
||||
env0_22 = true;
|
||||
env0_23 = has_eligible_friends;
|
||||
env0_13 = false;
|
||||
env0_10 = referrals_remaining;
|
||||
var value3 = new global.Set(sent_user_ids);
|
||||
env0_24 = refresh_at;
|
||||
env0_12 = recipient_status;
|
||||
env0_25 = reminder_state_id;
|
||||
env0_17 = 0;
|
||||
env0_18 = null;
|
||||
}, BILLING_REFERRALS_REMAINING_FETCH_FAIL: BILLING_REFERRALS_REMAINING_FETCH_FAIL,
|
||||
BILLING_CREATE_REFERRAL_SUCCESS: BILLING_CREATE_REFERRAL_SUCCESS,
|
||||
CREATE_REFERRALS_SUCCESS: CREATE_REFERRALS_SUCCESS,
|
||||
BILLING_REFERRAL_RESOLVE_SUCCESS: BILLING_REFERRAL_RESOLVE_SUCCESS,
|
||||
BILLING_REFERRAL_RESOLVE_FAIL: BILLING_REFERRAL_RESOLVE_FAIL, REFERRALS_FETCH_ELIGIBLE_USER_START: function() {
|
||||
env0_20 = true;
|
||||
}, REFERRALS_FETCH_ELIGIBLE_USER_SUCCESS: function({users, nextIndex}) {
|
||||
env0_20 = false;
|
||||
env0_19 = users;
|
||||
env0_21 = nextIndex;
|
||||
}, REFERRALS_FETCH_ELIGIBLE_USER_FAIL: function() {
|
||||
env0_20 = false;
|
||||
}, LOAD_MESSAGES_SUCCESS: closure, MESSAGE_CREATE: function({message}) {
|
||||
resolveUserReferralTrialId(message);
|
||||
}, LOAD_MESSAGES_AROUND_SUCCESS: closure, LOGOUT: LOGOUT_56106});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/ReferralTrialStore.tsx');
|
||||
exports.default = map;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_56063() { // fn#56063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7243:181, offset: 0x013bc601, size: 94 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_56063_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_56066(a0, a1) { // fn#56066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7243:374, offset: 0x013bc65f, size: 370 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 _fun56067;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_56068(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_56068(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_56068(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun56067;
|
||||
}
|
||||
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 handleReferralTrialResolve(a0) { // fn#56069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7243:1422, offset: 0x013bc7d1, size: 24 bytes, params: 2, frame: 11
|
||||
env0_14.add(a0);
|
||||
}
|
||||
|
||||
function LOAD_MESSAGES_AROUND_SUCCESS_56070({messages}) { // fn#56070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7243:1470, offset: 0x013bc7e9, size: 30 bytes, params: 2, frame: 11
|
||||
messages.forEach(function(a0) {
|
||||
return resolveUserReferralTrialId(a0);
|
||||
});
|
||||
}
|
||||
|
||||
function resolveUserReferralTrialId(a0) { // fn#56072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7243:1558, offset: 0x013bc81a, size: 153 bytes, params: 2, frame: 16
|
||||
const type = a0.type;
|
||||
const MessageTypes = (require(671) /* metro dependency 671: MessageTypes */).MessageTypes;
|
||||
const PREMIUM_REFERRAL = MessageTypes.PREMIUM_REFERRAL;
|
||||
const value2 = null;
|
||||
const content = type !== PREMIUM_REFERRAL ? value2 : a0.content;
|
||||
if (value2 == content) {
|
||||
return false;
|
||||
}
|
||||
if (!(env0_15.has(content) || env0_14.has(content))) {
|
||||
handleReferralTrialResolve(content);
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(function() {
|
||||
return require(dependencyMap[7]).resolveReferralTrialOffer(content).catch(NOOP_NULL);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun56075(a0) { // fn#56075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7243:1811, offset: 0x013bc8ef, size: 435 bytes, params: 2, frame: 16
|
||||
const closure = ReferralTrialStore;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'initialize', value: function() {
|
||||
this.waitFor(UserStore);
|
||||
this.syncWith([UserStore], emitChanges_56074);
|
||||
}}, {key: 'checkAndFetchReferralsRemaining', value: value_56078}, {key: 'getReferralsRemaining',
|
||||
value: value_56079}, {key: 'getSentUserIds', value: value_56080}, {key: 'isFetchingReferralsRemaining',
|
||||
value: value_56081}, {key: 'getRelevantUserTrialOffer', value: value_56082}, {key: 'isResolving',
|
||||
value: value_56083}, {key: 'getEligibleUsers', value: value_56084}, {key: 'getFetchingEligibleUsers',
|
||||
value: value_56085}, {key: 'getNextIndexOfEligibleUsers', value: value_56086},
|
||||
{key: 'getIsEligibleToSendReferrals', value: value_56087}, {key: 'getHasEligibleFriends', value: value_56088},
|
||||
{key: 'getRefreshAt', value: value_56089}, {key: 'getAllRelevantReferralTrialOffers', value: value_56090},
|
||||
{key: 'getRecipientStatus', value: value_56091}, {key: 'getReminderStateId', value: value_56092}]);
|
||||
}
|
||||
|
||||
function BILLING_REFERRAL_TRIAL_OFFER_UPDATE({userTrialOfferId}) { // fn#56093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7243:3398, offset: 0x013bcbe4, size: 125 bytes, params: 2, frame: 14
|
||||
if (!env0_13) {
|
||||
(require(7066) /* metro dependency 7066: ReferralTrialActionCreators */).fetchReferralsRemaining();
|
||||
}
|
||||
const binding = env0_14;
|
||||
if (!binding.has(userTrialOfferId)) {
|
||||
handleReferralTrialResolve(userTrialOfferId);
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(function() {
|
||||
return require(dependencyMap[7]).resolveReferralTrialOffer(userTrialOfferId).catch(NOOP_NULL);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function BILLING_REFERRALS_REMAINING_FETCH_FAIL(a0) { // fn#56097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7243:4007, offset: 0x013bcd06, size: 204 bytes, params: 2, frame: 16
|
||||
var r6;
|
||||
if (a0 == null) {
|
||||
throwTypeError(a0, "Cannot destructure 'undefined' or 'null'.", r6);
|
||||
throw undefined;
|
||||
}
|
||||
const value2 = env0_17 + 1;
|
||||
env0_17 = value2;
|
||||
r6 = value2 <= 3 ? 1000 * global.Math.pow(2, env0_17) : 8000 * global.Math.pow(4, env0_17 - 3);
|
||||
const Date = global.Date;
|
||||
const value7 = Date.now();
|
||||
const Math = global.Math;
|
||||
env0_18 = value7 + Math.min(300000, r6);
|
||||
}
|
||||
|
||||
function BILLING_CREATE_REFERRAL_SUCCESS({userTrialOffer}) { // fn#56098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7243:4192, offset: 0x013bcdd2, size: 86 bytes, params: 2, frame: 15
|
||||
(require(7066) /* metro dependency 7066: ReferralTrialActionCreators */).fetchReferralsRemaining();
|
||||
let binding = env0_16;
|
||||
binding.set(userTrialOffer.id, userTrialOffer);
|
||||
binding = env0_11;
|
||||
const add = binding.add;
|
||||
const user_id = userTrialOffer.user_id;
|
||||
Reflect.apply(add, binding, [user_id]);
|
||||
}
|
||||
|
||||
function CREATE_REFERRALS_SUCCESS({userTrialOffers}) { // fn#56099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7243:4341, offset: 0x013bce28, size: 127 bytes, params: 2, frame: 17
|
||||
var r2;
|
||||
var value4;
|
||||
var binding;
|
||||
var set;
|
||||
var id;
|
||||
var add;
|
||||
var user_id;
|
||||
var value5;
|
||||
(require(7066) /* metro dependency 7066: ReferralTrialActionCreators */).fetchReferralsRemaining();
|
||||
const value2 = _createForOfIteratorHelperLoose_56066(userTrialOffers);
|
||||
const value3 = value2();
|
||||
let done = value3.done;
|
||||
if (!done) {
|
||||
for (r2 = value3; true; r2 = value5) {
|
||||
value4 = r2.value;
|
||||
binding = env0_16;
|
||||
set = binding.set;
|
||||
id = value4.id;
|
||||
Reflect.apply(set, binding, [id, value4]);
|
||||
binding = env0_11;
|
||||
add = binding.add;
|
||||
user_id = value4.user_id;
|
||||
Reflect.apply(add, binding, [user_id]);
|
||||
value5 = value2();
|
||||
done = value5.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function BILLING_REFERRAL_RESOLVE_SUCCESS({userTrialOffer}) { // fn#56100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7243:4578, offset: 0x013bcea7, size: 80 bytes, params: 2, frame: 14
|
||||
var binding;
|
||||
var id;
|
||||
var add;
|
||||
var set;
|
||||
if (userTrialOffer != null) {
|
||||
binding = env0_14;
|
||||
id = userTrialOffer.id;
|
||||
binding.delete(id);
|
||||
binding = env0_15;
|
||||
add = binding.add;
|
||||
id = userTrialOffer.id;
|
||||
Reflect.apply(add, binding, [id]);
|
||||
binding = env0_16;
|
||||
set = binding.set;
|
||||
id = userTrialOffer.id;
|
||||
Reflect.apply(set, binding, [id, userTrialOffer]);
|
||||
}
|
||||
}
|
||||
|
||||
function BILLING_REFERRAL_RESOLVE_FAIL({userTrialOfferId}) { // fn#56101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7243:4724, offset: 0x013bcef7, size: 44 bytes, params: 2, frame: 12
|
||||
env0_14.delete(userTrialOfferId);
|
||||
env0_15.add(userTrialOfferId);
|
||||
}
|
||||
|
||||
function LOGOUT_56106() { // fn#56106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7243:5293, offset: 0x013bcf5f, size: 213 bytes, params: 1, frame: 13
|
||||
let Set = global.Set;
|
||||
let set = new Set();
|
||||
Set = global.Set;
|
||||
set = new Set();
|
||||
Set = global.Set;
|
||||
set = new Set();
|
||||
let Map = global.Map;
|
||||
let map = new Map();
|
||||
env0_19 = [];
|
||||
Map = global.Map;
|
||||
map = new Map();
|
||||
}
|
||||
|
||||
function value_56078() { // fn#56078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7243:2236, offset: 0x013bcad3, size: 118 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
if (env1_10 == null && !env1_13 && env1_17 < 6 && (env1_18 == null || env1_18 < global.Date.now())) {
|
||||
(require(7066) /* metro dependency 7066: ReferralTrialActionCreators */).fetchReferralsRemaining();
|
||||
}
|
||||
}
|
||||
|
||||
function value_56079() { // fn#56079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7243:2362, offset: 0x013bcb49, size: 48 bytes, params: 1, frame: 11
|
||||
let value = a0;
|
||||
let bypassFetch = (value !== undefined ? value : {}).bypassFetch;
|
||||
bypassFetch = !(bypassFetch === undefined) && bypassFetch;
|
||||
if (!bypassFetch) {
|
||||
this.checkAndFetchReferralsRemaining();
|
||||
}
|
||||
value = environment.__proto__;
|
||||
return env1_10;
|
||||
}
|
||||
|
||||
function value_56080() { // fn#56080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7243:2475, offset: 0x013bcb79, size: 49 bytes, params: 1, frame: 12
|
||||
this.checkAndFetchReferralsRemaining();
|
||||
const Array = global.Array;
|
||||
const from = Array.from;
|
||||
const binding = env1_11;
|
||||
return Reflect.apply(from, Array, [binding.values()]);
|
||||
}
|
||||
|
||||
function value_56082(a0) { // fn#56082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7243:2660, offset: 0x013bcbaa, size: 22 bytes, params: 2, frame: 11
|
||||
return env1_16.get(a0);
|
||||
}
|
||||
|
||||
function value_56090() { // fn#56090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7243:3136, offset: 0x013bcbc0, size: 36 bytes, params: 1, frame: 12
|
||||
const Array = global.Array;
|
||||
const from = Array.from;
|
||||
const binding = env1_16;
|
||||
return Reflect.apply(from, Array, [binding.values()]);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user