Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,155 @@
|
||||
/* Metro module 12307; source: modules/premium/powerups/GuildPowerupsActionCreators.tsx; dependencies: [8259, 661, 694, 12308, 4141, 12309, 1360, 507, 2] */
|
||||
function _fun93980(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12493:6, offset: 0x020cd830, size: 221 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const guildPowerupsConstantsModule = require(8259) /* metro dependency 8259: GuildPowerupsConstants */;
|
||||
const env0_3 = guildPowerupsConstantsModule.GUILD_POWERUP_APPLICATION_ID;
|
||||
const env0_4 = guildPowerupsConstantsModule.GuildPowerupType;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).Endpoints;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/powerups/GuildPowerupsActionCreators.tsx');
|
||||
exports.guildPowerupsAckNotification = guildPowerupsAckNotification;
|
||||
exports.guildPowerupsResetNotifications = guildPowerupsResetNotifications;
|
||||
exports.fetchPowerupCatalogForGuild = fetchPowerupCatalogForGuild;
|
||||
exports.fetchGuildBoostEntitlements = fetchGuildBoostEntitlements;
|
||||
exports.enablePowerupForGuild = function(a0, a1) {
|
||||
var HTTP = require(dependencyMap[7]).HTTP;
|
||||
var object = {};
|
||||
object.url = Endpoints.GUILD_POWERUP_TOGGLE(a0, a1);
|
||||
object.rejectWithError = true;
|
||||
return HTTP.post(object);
|
||||
};
|
||||
exports.disablePowerupForGuild = function(a0, a1) {
|
||||
var HTTP = require(dependencyMap[7]).HTTP;
|
||||
var object = {};
|
||||
object.url = Endpoints.GUILD_POWERUP_TOGGLE(a0, a1);
|
||||
object.rejectWithError = true;
|
||||
return HTTP.del(object);
|
||||
};
|
||||
}
|
||||
|
||||
function guildPowerupsAckNotification(a0) { // fn#93981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12493:302, offset: 0x020cd90d, size: 56 bytes, params: 2, frame: 13
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_POWERUPS_ACK_NOTIFICATION',
|
||||
guildId: a0});
|
||||
}
|
||||
|
||||
function guildPowerupsResetNotifications() { // fn#93982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12493:447, offset: 0x020cd945, size: 49 bytes, params: 1, frame: 13
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_POWERUPS_RESET_NOTIFICATIONS'});
|
||||
}
|
||||
|
||||
function fetchPowerupCatalogForGuild(a0, a1) { // fn#93983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12493:583, offset: 0x020cd976, size: 327 bytes, params: 3, frame: 21
|
||||
var value;
|
||||
var object2;
|
||||
const MOCK_LEVELS = (require(12308) /* metro dependency 12308: GuildPowerupMocks */).MOCK_LEVELS;
|
||||
const MOCK_PERKS = (require(12308) /* metro dependency 12308: GuildPowerupMocks */).MOCK_PERKS;
|
||||
var value2;
|
||||
var dispatch;
|
||||
var object4;
|
||||
const env0_0 = a0;
|
||||
if (a1 === true) {
|
||||
value2 = MOCK_LEVELS.concat(MOCK_PERKS);
|
||||
object2 = {};
|
||||
object2[GuildPowerupType.LEVEL] = MOCK_LEVELS;
|
||||
object2[GuildPowerupType.PERK] = MOCK_PERKS;
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
dispatch = value.dispatch;
|
||||
object4 = {type: 'GUILD_POWERUP_CATALOG_FETCH_SUCCESS', guildId: a0};
|
||||
object4.allPowerups = value2.sort(function({skuId}, a1) {
|
||||
return skuId >= a1.skuId ? 1 : -1;
|
||||
}).reduce(_fun93985, {});
|
||||
object4.powerupCatalog = object2;
|
||||
Reflect.apply(dispatch, value, [object4]);
|
||||
return undefined;
|
||||
}
|
||||
const storeUtilsModule = require(4141) /* metro dependency 4141: StoreUtils */;
|
||||
const httpGetWithCountryCodeQuery = storeUtilsModule.httpGetWithCountryCodeQuery;
|
||||
const STORE_PUBLISHED_LISTINGS_SKUS = Endpoints.STORE_PUBLISHED_LISTINGS_SKUS;
|
||||
return Reflect.apply(httpGetWithCountryCodeQuery, storeUtilsModule, [{url: STORE_PUBLISHED_LISTINGS_SKUS,
|
||||
query: {application_id: GUILD_POWERUP_APPLICATION_ID, guild_id: a0}, oldFormErrors: true,
|
||||
rejectWithError: false}]).then(_fun93986);
|
||||
}
|
||||
|
||||
function fetchGuildBoostEntitlements(a0) { // fn#93990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12493:1596, offset: 0x020cdc4a, size: 121 bytes, params: 2, frame: 16
|
||||
const value = a1;
|
||||
const env0_0 = a0;
|
||||
const r5 = !(value !== undefined) || value;
|
||||
const storeUtilsModule = require(4141) /* metro dependency 4141: StoreUtils */;
|
||||
const httpGetWithCountryCodeQuery = storeUtilsModule.httpGetWithCountryCodeQuery;
|
||||
const object2 = {};
|
||||
object2.url = Endpoints.GUILD_POWERUPS(a0);
|
||||
object2.query = {include_ends_at: r5};
|
||||
object2.oldFormErrors = true;
|
||||
object2.rejectWithError = false;
|
||||
return Reflect.apply(httpGetWithCountryCodeQuery, storeUtilsModule, [object2]).then(_fun93991);
|
||||
}
|
||||
|
||||
function _fun93985(a0, a1) { // fn#93985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12493:896, offset: 0x020cdadf, size: 17 bytes, params: 3, frame: 3
|
||||
a0[a1.skuId] = a1;
|
||||
return a0;
|
||||
}
|
||||
|
||||
function _fun93986(a0) { // fn#93986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12493:1104, offset: 0x020cdaf0, size: 203 bytes, params: 2, frame: 18
|
||||
const env0_0 = a0;
|
||||
let value = a0.body.map(_fun93987);
|
||||
value = value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
value = value.sort(function({skuId}, a1) {
|
||||
return skuId >= a1.skuId ? 1 : -1;
|
||||
});
|
||||
value = value.reduce(function(a0, a1) {
|
||||
var property = a0.allPowerups;
|
||||
var powerupCatalog = a0.powerupCatalog;
|
||||
property[a1.skuId] = a1;
|
||||
if (powerupCatalog[a1.type] == null) {
|
||||
powerupCatalog[a1.type] = [];
|
||||
}
|
||||
property = powerupCatalog[a1.type];
|
||||
if (!(property == null || property.push == null)) {
|
||||
property.push(a1);
|
||||
}
|
||||
return a0;
|
||||
}, {allPowerups: {}, powerupCatalog: {}});
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_POWERUP_CATALOG_FETCH_SUCCESS',
|
||||
guildId: env0_0, allPowerups: value.allPowerups, powerupCatalog: value.powerupCatalog});
|
||||
return a0.body;
|
||||
}
|
||||
|
||||
function _fun93991({body}) { // fn#93991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12493:1779, offset: 0x020cdcc3, size: 107 bytes, params: 2, frame: 15
|
||||
var environment;
|
||||
const object2 = {};
|
||||
const env0_0 = object2;
|
||||
body.forEach(_fun93992);
|
||||
const value = environment.__proto__;
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_BOOST_ENTITLEMENTS_FETCH_SUCCESS',
|
||||
guildId: env0_0, unlockedPowerups: object2, unlockedGameServers: {}});
|
||||
}
|
||||
|
||||
function _fun93987(a0) { // fn#93987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12493:1126, offset: 0x020cdbbb, size: 48 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__.__proto__;
|
||||
return (importDefault(12309) /* metro dependency 12309: storeListingToGuildPowerup */)(env0_0.body, a0);
|
||||
}
|
||||
|
||||
function _fun93992(a0) { // fn#93992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12493:1813, offset: 0x020cdd2e, size: 188 bytes, params: 2, frame: 6
|
||||
var powerup_metadata;
|
||||
let sku = a0.sku;
|
||||
const value = undefined;
|
||||
if ((sku == null || sku.tenant_metadata == null || sku.tenant_metadata.guild_monetization == null ? value : sku.tenant_metadata.guild_monetization.powerup) != null) {
|
||||
env0_0[a0.sku_id] = a0;
|
||||
} else {
|
||||
if (a0 == null) {
|
||||
powerup_metadata = value;
|
||||
} else {
|
||||
sku = a0.sku;
|
||||
powerup_metadata = sku == null ? value : sku.powerup_metadata;
|
||||
}
|
||||
if (powerup_metadata != null) {
|
||||
env0_0[a0.sku_id] = a0;
|
||||
} else {
|
||||
sku = a0.sku;
|
||||
if ((sku == null || sku.tenant_metadata == null || sku.tenant_metadata.guild_monetization == null ? value : sku.tenant_metadata.guild_monetization.game_server) != null) {
|
||||
env0_1[a0.id] = a0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user