2026-10-12 16:32:48 +00:00
|
|
|
// Module ID: 11717
|
|
|
|
|
// Function ID: 11718
|
2026-09-18 19:45:33 +00:00
|
|
|
// Name: useActivityShelfData
|
2026-10-12 16:32:48 +00:00
|
|
|
// Dependencies: [19, 1390, 9067, 2064, 558, 576, 504, 6858, 1388, 8611, 11718, 1382, 9810, 2]
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-10-12 16:32:48 +00:00
|
|
|
// Module 11717 (useActivityShelfData)
|
|
|
|
|
import GlobalUtils from "GlobalUtils" /* 1388 */;
|
|
|
|
|
import EmbeddedSurfaceType from "EmbeddedSurfaceType" /* 8611 */;
|
2026-10-01 14:13:23 +00:00
|
|
|
import react from "react" /* 19 */;
|
2026-10-12 16:32:48 +00:00
|
|
|
import UserStore_mod from "UserStore" /* 1390 */;
|
|
|
|
|
import TestModeStore from "TestModeStore" /* 9067 */;
|
|
|
|
|
import EmbeddedActivitiesStore from "EmbeddedActivitiesStore" /* 2064 */;
|
2026-10-02 13:37:24 +00:00
|
|
|
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
|
2026-10-01 14:13:23 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-09-18 19:45:33 +00:00
|
|
|
|
|
|
|
|
const require = globalThis.__r;
|
2026-10-02 13:37:24 +00:00
|
|
|
let _require, application, closure_0;
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-10-01 14:13:23 +00:00
|
|
|
let UserStore = UserStore_mod;
|
2026-10-12 16:32:48 +00:00
|
|
|
let tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useActivityShelfData(arg0) {
|
2026-10-02 13:37:24 +00:00
|
|
|
let args;
|
|
|
|
|
let first;
|
|
|
|
|
let tmp10;
|
|
|
|
|
let tmp11;
|
|
|
|
|
let tmp12;
|
|
|
|
|
let tmp16;
|
|
|
|
|
let tmp8;
|
|
|
|
|
_require = arg0;
|
|
|
|
|
let tmp2 = _require;
|
|
|
|
|
let obj = require("react");
|
|
|
|
|
const cResult = obj.c(26);
|
|
|
|
|
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
|
|
|
let items = [UserStore];
|
|
|
|
|
cResult[0] = items;
|
|
|
|
|
first = items;
|
|
|
|
|
} else {
|
|
|
|
|
first = cResult[0];
|
|
|
|
|
}
|
2026-10-07 22:43:51 +00:00
|
|
|
const tmp2Result = tmp2(arr6[6]);
|
2026-10-02 13:37:24 +00:00
|
|
|
const stateFromStores = tmp2Result.useStateFromStores(first, UserStore.getCurrentUser);
|
|
|
|
|
if (cResult[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
|
|
|
const items1 = [EmbeddedActivitiesStore];
|
|
|
|
|
cResult[1] = items1;
|
|
|
|
|
tmp8 = items1;
|
|
|
|
|
} else {
|
|
|
|
|
tmp8 = cResult[1];
|
|
|
|
|
}
|
|
|
|
|
if (cResult[2] !== arg0) {
|
|
|
|
|
const fn = function f() {
|
|
|
|
|
return EmbeddedActivitiesStore.getShelfActivities(closure_0);
|
|
|
|
|
};
|
|
|
|
|
cResult[2] = arg0;
|
|
|
|
|
cResult[3] = fn;
|
|
|
|
|
tmp10 = fn;
|
|
|
|
|
} else {
|
|
|
|
|
tmp10 = cResult[3];
|
|
|
|
|
}
|
2026-10-07 22:43:51 +00:00
|
|
|
const tmp2Result3 = tmp2(arr6[6]);
|
2026-10-02 13:37:24 +00:00
|
|
|
const stateFromStoresArray = tmp2Result3.useStateFromStoresArray(tmp8, tmp10);
|
|
|
|
|
if (cResult[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
|
|
|
const items2 = [TestModeStore];
|
2026-10-07 22:43:51 +00:00
|
|
|
class S {
|
|
|
|
|
constructor() {
|
|
|
|
|
return TestModeStore.testModeEmbeddedApplicationId;
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-10-02 13:37:24 +00:00
|
|
|
cResult[4] = items2;
|
2026-10-07 22:43:51 +00:00
|
|
|
cResult[5] = S;
|
|
|
|
|
tmp12 = S;
|
2026-10-02 13:37:24 +00:00
|
|
|
tmp11 = items2;
|
|
|
|
|
} else {
|
|
|
|
|
tmp11 = cResult[4];
|
|
|
|
|
tmp12 = cResult[5];
|
|
|
|
|
}
|
2026-10-07 22:43:51 +00:00
|
|
|
const tmp2Result4 = tmp2(arr6[6]);
|
2026-10-02 13:37:24 +00:00
|
|
|
const stateFromStores1 = tmp2Result4.useStateFromStores(tmp11, tmp12);
|
|
|
|
|
if (cResult[6] === stateFromStoresArray) {
|
|
|
|
|
let tmp15;
|
2026-10-07 22:43:51 +00:00
|
|
|
let tmp25;
|
2026-10-02 13:37:24 +00:00
|
|
|
if (cResult[7] === stateFromStores1) {
|
|
|
|
|
tmp15 = cResult[8];
|
|
|
|
|
}
|
2026-10-07 22:43:51 +00:00
|
|
|
stateFromStores(arr6[7])(tmp15);
|
|
|
|
|
class S {
|
|
|
|
|
constructor() {
|
|
|
|
|
return TestModeStore.testModeEmbeddedApplicationId;
|
|
|
|
|
}
|
2026-10-02 13:37:24 +00:00
|
|
|
}
|
|
|
|
|
if (null != stateFromStores1) {
|
2026-10-07 22:43:51 +00:00
|
|
|
if (arr6.length > 0) {
|
|
|
|
|
if (arr6[0].id === stateFromStores1) {
|
|
|
|
|
const first1 = arr6[0];
|
|
|
|
|
if (first1.supportsEmbeddedSurface(tmp2(arr6[9]).EmbeddedSurfaceType.MAIN)) {
|
|
|
|
|
if (null != arr6[0].embeddedActivityConfig) {
|
|
|
|
|
let tmp26;
|
|
|
|
|
if (cResult[12] !== arr6[0]) {
|
|
|
|
|
const obj2 = { activity: arr6[0].embeddedActivityConfig, application: arr6[0] };
|
|
|
|
|
class S {
|
|
|
|
|
constructor() {
|
|
|
|
|
return TestModeStore.testModeEmbeddedApplicationId;
|
|
|
|
|
}
|
2026-10-02 13:37:24 +00:00
|
|
|
}
|
2026-10-07 22:43:51 +00:00
|
|
|
tmp27[0] = obj2;
|
|
|
|
|
cResult[12] = arr6[0];
|
|
|
|
|
cResult[13] = tmp27;
|
|
|
|
|
tmp26 = tmp27;
|
|
|
|
|
} else {
|
|
|
|
|
tmp26 = cResult[13];
|
2026-10-02 13:37:24 +00:00
|
|
|
}
|
2026-10-07 22:43:51 +00:00
|
|
|
tmp25 = tmp26;
|
2026-10-02 13:37:24 +00:00
|
|
|
}
|
2026-10-07 22:43:51 +00:00
|
|
|
let closure_3 = tmp25;
|
|
|
|
|
if (cResult[15] === stateFromStoresArray) {
|
|
|
|
|
let tmp28;
|
|
|
|
|
if (cResult[16] === arr6) {
|
|
|
|
|
tmp28 = cResult[17];
|
|
|
|
|
}
|
|
|
|
|
UserStore = tmp28;
|
|
|
|
|
let nsfwAllowed;
|
|
|
|
|
class S {
|
|
|
|
|
constructor() {
|
|
|
|
|
return TestModeStore.testModeEmbeddedApplicationId;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (stateFromStores != null) {
|
|
|
|
|
nsfwAllowed = stateFromStores.nsfwAllowed;
|
|
|
|
|
}
|
|
|
|
|
if (tmp31 === nsfwAllowed) {
|
|
|
|
|
if (cResult[21] === tmp28) {
|
|
|
|
|
let tmp33;
|
|
|
|
|
let tmp35;
|
|
|
|
|
if (cResult[22] === tmp25) {
|
|
|
|
|
tmp33 = cResult[23];
|
2026-10-02 13:37:24 +00:00
|
|
|
}
|
2026-10-07 22:43:51 +00:00
|
|
|
if (cResult[24] !== tmp33) {
|
|
|
|
|
const tmp33Result = tmp33();
|
|
|
|
|
cResult[24] = tmp33;
|
|
|
|
|
class S {
|
|
|
|
|
constructor() {
|
|
|
|
|
return TestModeStore.testModeEmbeddedApplicationId;
|
|
|
|
|
}
|
2026-10-02 13:37:24 +00:00
|
|
|
}
|
2026-10-07 22:43:51 +00:00
|
|
|
cResult[25] = tmp33Result;
|
|
|
|
|
tmp35 = tmp33Result;
|
|
|
|
|
} else {
|
|
|
|
|
tmp35 = cResult[25];
|
2026-10-02 13:37:24 +00:00
|
|
|
}
|
2026-10-07 22:43:51 +00:00
|
|
|
return tmp35;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
let nsfwAllowed1;
|
|
|
|
|
if (stateFromStores != null) {
|
|
|
|
|
nsfwAllowed1 = stateFromStores.nsfwAllowed;
|
|
|
|
|
}
|
|
|
|
|
class T {
|
|
|
|
|
constructor() {
|
|
|
|
|
items = [...closure_4];
|
|
|
|
|
found = items.filter((activity) => {
|
|
|
|
|
let supported_platforms = activity.activity.supported_platforms;
|
|
|
|
|
if (supported_platforms == null) {
|
|
|
|
|
supported_platforms = [];
|
2026-10-02 13:37:24 +00:00
|
|
|
}
|
2026-10-07 22:43:51 +00:00
|
|
|
const includes = supported_platforms.includes;
|
|
|
|
|
const tmp = stateFromStores(arr6[10]);
|
|
|
|
|
const obj = closure_1_0(arr6[11]);
|
|
|
|
|
return includes(tmp(obj.getOS()));
|
|
|
|
|
});
|
|
|
|
|
found1 = found.filter((activity) => {
|
|
|
|
|
const requires_age_gate = activity.activity.requires_age_gate;
|
|
|
|
|
let tmp = !requires_age_gate;
|
|
|
|
|
if (requires_age_gate) {
|
|
|
|
|
nsfwAllowed = undefined;
|
|
|
|
|
if (stateFromStores != null) {
|
|
|
|
|
nsfwAllowed = stateFromStores.nsfwAllowed;
|
|
|
|
|
}
|
|
|
|
|
tmp = true === nsfwAllowed;
|
|
|
|
|
}
|
|
|
|
|
if (!tmp) {
|
|
|
|
|
let nsfwAllowed1;
|
|
|
|
|
if (stateFromStores != null) {
|
|
|
|
|
nsfwAllowed1 = stateFromStores.nsfwAllowed;
|
|
|
|
|
}
|
|
|
|
|
tmp = null == nsfwAllowed1;
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
});
|
|
|
|
|
return found1.filter((application) => {
|
|
|
|
|
nsfwAllowed = undefined;
|
|
|
|
|
application = application.application;
|
|
|
|
|
if (nsfwAllowed != null) {
|
|
|
|
|
nsfwAllowed = nsfwAllowed.nsfwAllowed;
|
|
|
|
|
}
|
|
|
|
|
const tmp2 = false === nsfwAllowed && stateFromStores(arr6[12])(application.id);
|
|
|
|
|
return !tmp2;
|
|
|
|
|
});
|
|
|
|
|
}
|
2026-10-02 13:37:24 +00:00
|
|
|
}
|
2026-10-07 22:43:51 +00:00
|
|
|
cResult[20] = nsfwAllowed1;
|
|
|
|
|
cResult[21] = tmp28;
|
|
|
|
|
cResult[22] = tmp25;
|
|
|
|
|
cResult[23] = T;
|
|
|
|
|
tmp33 = T;
|
2026-10-02 13:37:24 +00:00
|
|
|
}
|
2026-10-07 22:43:51 +00:00
|
|
|
class S {
|
|
|
|
|
constructor() {
|
|
|
|
|
return TestModeStore.testModeEmbeddedApplicationId;
|
2026-10-02 13:37:24 +00:00
|
|
|
}
|
2026-10-07 22:43:51 +00:00
|
|
|
}
|
|
|
|
|
const mapped = stateFromStoresArray.map(tmp29);
|
|
|
|
|
let found = mapped.filter(tmp2(tmp3[8]).isNotNullish);
|
|
|
|
|
cResult[16] = arr6;
|
|
|
|
|
cResult[17] = found;
|
|
|
|
|
tmp28 = found;
|
2026-10-02 13:37:24 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const _Symbol = Symbol;
|
2026-10-07 22:43:51 +00:00
|
|
|
if (tmp24 === Symbol.for("react.memo_cache_sentinel")) {
|
|
|
|
|
const items3 = [];
|
|
|
|
|
cResult[14] = items3;
|
|
|
|
|
class S {
|
|
|
|
|
constructor() {
|
|
|
|
|
return TestModeStore.testModeEmbeddedApplicationId;
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-10-02 13:37:24 +00:00
|
|
|
} else {
|
2026-10-07 22:43:51 +00:00
|
|
|
tmp25 = cResult[14];
|
2026-10-02 13:37:24 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (cResult[9] === Symbol.for("react.memo_cache_sentinel")) {
|
2026-10-12 16:32:48 +00:00
|
|
|
const fn2 = function h(application_id) {
|
2026-10-02 13:37:24 +00:00
|
|
|
return application_id.application_id;
|
|
|
|
|
};
|
2026-10-07 22:43:51 +00:00
|
|
|
cResult[9] = fn2;
|
|
|
|
|
class S {
|
|
|
|
|
constructor() {
|
|
|
|
|
return TestModeStore.testModeEmbeddedApplicationId;
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-10-02 13:37:24 +00:00
|
|
|
} else {
|
|
|
|
|
tmp16 = cResult[9];
|
|
|
|
|
}
|
|
|
|
|
const mapped1 = stateFromStoresArray.map(tmp16);
|
|
|
|
|
let tmp18 = mapped1;
|
|
|
|
|
if (null != stateFromStores1) {
|
2026-10-07 22:43:51 +00:00
|
|
|
const items4 = [stateFromStores1];
|
|
|
|
|
class S {
|
|
|
|
|
constructor() {
|
|
|
|
|
return TestModeStore.testModeEmbeddedApplicationId;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
HermesBuiltin.arraySpread(items4, mapped1, 1);
|
|
|
|
|
tmp18 = items4;
|
2026-10-02 13:37:24 +00:00
|
|
|
}
|
|
|
|
|
cResult[6] = stateFromStoresArray;
|
|
|
|
|
cResult[7] = stateFromStores1;
|
|
|
|
|
cResult[8] = tmp18;
|
|
|
|
|
tmp15 = tmp18;
|
2026-10-12 16:32:48 +00:00
|
|
|
}) : (function useActivityShelfData(arg0) {
|
2026-10-01 14:13:23 +00:00
|
|
|
let closure_4;
|
|
|
|
|
let memo;
|
|
|
|
|
let memo1;
|
|
|
|
|
let stateFromStoresArray;
|
2026-10-02 13:37:24 +00:00
|
|
|
_require = arg0;
|
2026-10-01 14:13:23 +00:00
|
|
|
let tmp2 = stateFromStoresArray;
|
|
|
|
|
let obj = require("get initialized");
|
2026-09-18 19:45:33 +00:00
|
|
|
let items = [UserStore];
|
2026-10-01 14:13:23 +00:00
|
|
|
const stateFromStores = obj.useStateFromStores(items, UserStore.getCurrentUser);
|
2026-09-18 19:45:33 +00:00
|
|
|
const items1 = [memo1];
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj2 = require("get initialized");
|
2026-10-02 13:37:24 +00:00
|
|
|
stateFromStoresArray = obj2.useStateFromStoresArray(items1, () => EmbeddedActivitiesStore.getShelfActivities(closure_0));
|
2026-09-18 19:45:33 +00:00
|
|
|
const items2 = [memo];
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj3 = require("get initialized");
|
|
|
|
|
const stateFromStores1 = obj3.useStateFromStores(items2, () => memo.testModeEmbeddedApplicationId);
|
2026-09-18 19:45:33 +00:00
|
|
|
let mapped = stateFromStoresArray.map((application_id) => application_id.application_id);
|
2026-10-01 14:13:23 +00:00
|
|
|
let tmp6 = mapped;
|
2026-09-18 19:45:33 +00:00
|
|
|
if (null != stateFromStores1) {
|
|
|
|
|
const items3 = [stateFromStores1];
|
2026-10-01 14:13:23 +00:00
|
|
|
HermesBuiltin.arraySpread(items3, mapped, 1);
|
|
|
|
|
tmp6 = items3;
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
2026-10-02 13:37:24 +00:00
|
|
|
const tmp10 = stateFromStores(tmp2[7])(tmp6);
|
2026-10-01 14:13:23 +00:00
|
|
|
UserStore = tmp10;
|
|
|
|
|
const items4 = [tmp10];
|
2026-09-18 19:45:33 +00:00
|
|
|
memo = stateFromStores1.useMemo(() => closure_4.filter(GlobalUtils.isNotNullish), items4);
|
|
|
|
|
const items5 = [memo, stateFromStores1];
|
|
|
|
|
memo1 = stateFromStores1.useMemo(() => {
|
|
|
|
|
if (null != stateFromStores1) {
|
|
|
|
|
if (memo.length > 0) {
|
2026-10-01 14:13:23 +00:00
|
|
|
if (memo[0].id === tmp) {
|
2026-10-07 22:43:51 +00:00
|
|
|
const first = tmp2[0];
|
|
|
|
|
if (first.supportsEmbeddedSurface(EmbeddedSurfaceType.EmbeddedSurfaceType.MAIN)) {
|
|
|
|
|
if (null != memo[0].embeddedActivityConfig) {
|
|
|
|
|
const items = [{ activity: memo[0].embeddedActivityConfig, application: memo[0] }];
|
|
|
|
|
const obj = { activity: memo[0].embeddedActivityConfig, application: memo[0] };
|
|
|
|
|
}
|
|
|
|
|
return [];
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, items5);
|
|
|
|
|
const items6 = [stateFromStoresArray, memo];
|
|
|
|
|
const memo2 = stateFromStores1.useMemo(() => {
|
|
|
|
|
const mapped = stateFromStoresArray.map((activity) => {
|
2026-10-02 13:37:24 +00:00
|
|
|
closure_0 = activity;
|
2026-10-01 14:13:23 +00:00
|
|
|
const found = memo.find((id) => id.id === application_id.application_id);
|
2026-09-18 19:45:33 +00:00
|
|
|
let tmp2 = null;
|
|
|
|
|
if (null != found) {
|
2026-10-01 14:13:23 +00:00
|
|
|
tmp2 = { activity, application: found };
|
2026-09-18 19:45:33 +00:00
|
|
|
const obj = { activity, application: found };
|
|
|
|
|
}
|
|
|
|
|
return tmp2;
|
|
|
|
|
});
|
|
|
|
|
return mapped.filter(GlobalUtils.isNotNullish);
|
|
|
|
|
}, items6);
|
|
|
|
|
let nsfwAllowed;
|
2026-10-01 14:13:23 +00:00
|
|
|
const useMemo = stateFromStores1.useMemo;
|
2026-09-18 19:45:33 +00:00
|
|
|
if (stateFromStores != null) {
|
|
|
|
|
nsfwAllowed = stateFromStores.nsfwAllowed;
|
|
|
|
|
}
|
|
|
|
|
const items7 = [nsfwAllowed, memo2, memo1];
|
2026-10-01 14:13:23 +00:00
|
|
|
return useMemo(() => {
|
2026-09-18 19:45:33 +00:00
|
|
|
const items = [...memo2];
|
|
|
|
|
const found = items.filter((activity) => {
|
|
|
|
|
let supported_platforms = activity.activity.supported_platforms;
|
|
|
|
|
if (supported_platforms == null) {
|
|
|
|
|
supported_platforms = [];
|
|
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
const includes = supported_platforms.includes;
|
2026-10-07 22:43:51 +00:00
|
|
|
const tmp = stateFromStores(stateFromStoresArray[10]);
|
|
|
|
|
const obj = closure_1_0(stateFromStoresArray[11]);
|
2026-10-01 14:13:23 +00:00
|
|
|
return includes(tmp(obj.getOS()));
|
2026-09-18 19:45:33 +00:00
|
|
|
});
|
|
|
|
|
const found1 = found.filter((activity) => {
|
|
|
|
|
const requires_age_gate = activity.activity.requires_age_gate;
|
|
|
|
|
let tmp = !requires_age_gate;
|
|
|
|
|
if (requires_age_gate) {
|
|
|
|
|
nsfwAllowed = undefined;
|
|
|
|
|
if (stateFromStores != null) {
|
|
|
|
|
nsfwAllowed = stateFromStores.nsfwAllowed;
|
|
|
|
|
}
|
|
|
|
|
tmp = true === nsfwAllowed;
|
|
|
|
|
}
|
|
|
|
|
if (!tmp) {
|
|
|
|
|
let nsfwAllowed1;
|
|
|
|
|
if (stateFromStores != null) {
|
|
|
|
|
nsfwAllowed1 = stateFromStores.nsfwAllowed;
|
|
|
|
|
}
|
|
|
|
|
tmp = null == nsfwAllowed1;
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
});
|
|
|
|
|
return found1.filter((application) => {
|
|
|
|
|
nsfwAllowed = undefined;
|
2026-10-01 14:13:23 +00:00
|
|
|
application = application.application;
|
2026-09-18 19:45:33 +00:00
|
|
|
if (nsfwAllowed != null) {
|
|
|
|
|
nsfwAllowed = nsfwAllowed.nsfwAllowed;
|
|
|
|
|
}
|
2026-10-07 22:43:51 +00:00
|
|
|
const tmp2 = false === nsfwAllowed && stateFromStores(stateFromStoresArray[12])(application.id);
|
2026-09-18 19:45:33 +00:00
|
|
|
return !tmp2;
|
|
|
|
|
});
|
|
|
|
|
}, items7);
|
2026-10-02 13:37:24 +00:00
|
|
|
});
|
|
|
|
|
const result = size.fileFinishedImporting("modules/activities/useActivityShelfData.tsx");
|
|
|
|
|
|
|
|
|
|
export const useActivityShelfData = tmp2;
|