decord/source/modules/guild_onboarding/native/GuildOnboardingPrompts.tsx

632 lines
28 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 6839
// Function ID: 6840
2026-07-20 16:05:17 +00:00
// Name: _getBackgroundGradientColor
2026-08-24 06:08:38 +00:00
// Dependencies: [32, 5, 19, 17, 4669, 6838, 1391, 1910, 1980, 6825, 5291, 6822, 676, 21, 1222, 4668, 6401, 712, 1491, 4227, 5454, 4761, 691, 589, 1629, 1500, 4119, 6828, 5290, 1435, 1896, 698, 5047, 4671, 6345, 6840, 6842, 1370, 7168, 4739, 1236, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 6839 (_getBackgroundGradientColor)
import keys from "keys" /* 691 */;
import ThemesDefault from "Themes" /* 712 */;
import hexToRgba from "hexToRgba" /* 4227 */;
import LinearGradientDefault from "LinearGradient" /* 4761 */;
import preloadDefault from "preload" /* 5454 */;
import closure_3 from "_slicedToArray" /* 32 */;
import closure_4 from "asyncGeneratorStep" /* 5 */;
import closure_5 from "noop" /* 19 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import closure_8 from "maybeApplyNoTextColorForLightCustomTheme" /* 4669 */;
import closure_9 from "get" /* 6838 */;
import closure_10 from "ensureGuildLoaded" /* 1391 */;
import closure_11 from "createGuildRecordFromRust" /* 1910 */;
import closure_12 from "handleConnectionOpen" /* 1980 */;
import closure_13 from "handleUpdate" /* 6825 */;
import { OnboardingPromptType } from "serverPromptToClientPrompt" /* 5291 */;
import { GuildOnboardingModalStates as closure_15 } from "GUILD_ONBOARDING_MODAL_KEY" /* 6822 */;
import ME from "ME" /* 676 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-29 08:29:29 +00:00
function _getBackgroundGradientColor() {
const self = this;
const tmp = callback((arg0) => {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
c3 = 0;
c4 = 0;
2026-07-29 08:29:29 +00:00
return (function*(arg0) {
2026-08-04 21:03:28 +00:00
let table = tmp5;
let dependencyMap2 = tmp2;
2026-08-24 06:08:38 +00:00
const obj2 = dependencyMap(closure_1_2[18]);
2026-08-04 21:03:28 +00:00
dependencyMap = yield obj2.getPaletteForAvatar(dependencyMap);
dependencyMap2 = v0(32, 3);
table = 32;
return dependencyMap(table[19]).rgbToHex(table, v0, c4);
2026-07-29 08:29:29 +00:00
})();
});
2026-08-24 06:08:38 +00:00
closure_23 = tmp;
2026-07-29 08:29:29 +00:00
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
function BackgroundImageGradient(uri) {
const color = uri.color;
2026-08-24 06:08:38 +00:00
const tmp = callback4();
2026-07-29 08:29:29 +00:00
let obj = { children: null };
2026-07-20 16:05:17 +00:00
const items = [tmp.backgroundImage];
2026-08-24 06:08:38 +00:00
const items1 = [callback2(preloadDefault, { source: { uri: uri.splashUrl }, style: items, resizeMode: "cover" }), ];
obj = { style: tmp.backgroundColorGradient, start: keys.VerticalGradient.START, end: keys.VerticalGradient.END, colors: null };
const tmp2 = LinearGradientDefault;
const items2 = [hexToRgba.hexWithOpacity(color, 0.16), color];
2026-07-29 08:29:29 +00:00
obj[3] = items2;
2026-07-23 10:11:24 +00:00
items1[1] = callback2(tmp2, obj);
2026-07-29 08:29:29 +00:00
obj[0] = items1;
2026-07-23 10:11:24 +00:00
return callback3(closure_20, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
({ StyleSheet: closure_6, View: error } = get_ActivityIndicator);
2026-07-23 10:11:24 +00:00
({ AnalyticEvents: closure_16, MarketingURLs: closure_17, Routes: closure_18 } = ME);
({ jsx: closure_19, Fragment: closure_20, jsxs: closure_21 } = jsxProd);
2026-07-29 08:29:29 +00:00
createCacheKey = { flex: { flex: 1 }, container: null, subtitle: null, onboardingTitle: null, onboardingPolicy: null, onboardingPolicyText: null, landingOverlay: null, artWrapper: null, landingBody: null, backgroundImage: null, backgroundColorGradient: null, darkColorGradient: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { display: "flex", flex: 1, flexGrow: 1, marginTop: require("NAV_BAR_HEIGHT").NAV_BAR_HEIGHT, marginBottom: ThemesDefault.space.PX_16, backgroundColor: ThemesDefault.colors.BACKGROUND_BASE_LOWER };
2026-07-29 08:29:29 +00:00
createCacheKey[1] = createCacheKey;
2026-08-24 06:08:38 +00:00
createCacheKey[2] = { marginBottom: ThemesDefault.space.PX_16, opacity: 0.8 };
2026-07-29 08:29:29 +00:00
createCacheKey[3] = { textAlign: "center" };
2026-08-24 06:08:38 +00:00
let obj1 = { marginBottom: ThemesDefault.space.PX_16, opacity: 0.8 };
createCacheKey[4] = { position: "absolute", paddingHorizontal: ThemesDefault.space.PX_16, display: "flex", justifyContent: "center", width: "100%", marginBottom: ThemesDefault.space.PX_16 };
2026-07-29 08:29:29 +00:00
createCacheKey[5] = { textAlign: "center" };
createCacheKey[6] = { position: "absolute", width: "100%", height: "100%", display: "flex", justifyContent: "center" };
createCacheKey[7] = { height: 350, position: "relative", display: "flex", flexDirection: "row", alignItems: "center", justifyContent: "center" };
2026-08-24 06:08:38 +00:00
let obj2 = { position: "absolute", paddingHorizontal: ThemesDefault.space.PX_16, display: "flex", justifyContent: "center", width: "100%", marginBottom: ThemesDefault.space.PX_16 };
createCacheKey[8] = { alignItems: "center", marginTop: -24, paddingHorizontal: ThemesDefault.space.PX_16 };
2026-07-29 08:29:29 +00:00
createCacheKey[9] = { position: "absolute", height: "50%", width: "100%", top: 0 };
createCacheKey[10] = { position: "absolute", height: "100%", width: "100%", top: 0 };
createCacheKey[11] = { position: "absolute", height: "100%", width: "100%", top: 0 };
2026-08-24 06:08:38 +00:00
let closure_22 = createCacheKey.createStyles(createCacheKey);
2026-07-29 08:29:29 +00:00
let closure_25 = { code: "function GuildOnboardingPromptsTsx1(){const{showPrompts,withTiming,Easing,useReducedMotion}=this.__closure;const rawOpacity=showPrompts.get()?0:1;const opacity=withTiming(rawOpacity,{duration:300,easing:Easing.out(Easing.ease)});const rawTranslateY=!useReducedMotion&&showPrompts.get()?-80:0;const translateY=withTiming(rawTranslateY,{duration:300,easing:Easing.out(Easing.ease)});return{opacity:opacity,transform:[{translateY:translateY}]};}" };
let closure_26 = { code: "function GuildOnboardingPromptsTsx2(){const{showPrompts,withDelay,withTiming,Easing,useReducedMotion}=this.__closure;const rawOpacity=showPrompts.get()?0:1;const opacity=withDelay(200,withTiming(rawOpacity,{duration:300,easing:Easing.out(Easing.ease)}));const rawTranslateY=!useReducedMotion&&showPrompts.get()?-80:0;const translateY=withDelay(200,withTiming(rawTranslateY,{duration:300,easing:Easing.out(Easing.ease)}));return{opacity:opacity,transform:[{translateY:translateY}]};}" };
let closure_27 = { code: "function GuildOnboardingPromptsTsx3(){const{showPrompts,withDelay,withTiming,Easing}=this.__closure;const rawOpacity=showPrompts.get()?0:1;const opacity=withDelay(200,withTiming(rawOpacity,{duration:300,easing:Easing.out(Easing.ease)}));return{opacity:opacity};}" };
let closure_28 = { code: "function GuildOnboardingPromptsTsx4(){const{showPrompts,withDelay,withTiming,Easing}=this.__closure;const rawOpacity=showPrompts.get()?0:1;const opacity=withDelay(200,withTiming(rawOpacity,{duration:300,easing:Easing.out(Easing.ease)}));return{opacity:opacity};}" };
let closure_29 = { code: "function GuildOnboardingPromptsTsx5(){const{showPrompts,withDelay,withTiming,Easing,useReducedMotion}=this.__closure;const rawOpacity=showPrompts.get()?1:0;const opacity=withDelay(600,withTiming(rawOpacity,{duration:300,easing:Easing.out(Easing.ease)}));const rawTranslateY=!useReducedMotion&&!showPrompts.get()?80:0;const translateY=withDelay(600,withTiming(rawTranslateY,{duration:300,easing:Easing.out(Easing.ease)}));return{opacity:opacity,transform:[{translateY:translateY}]};}" };
2026-08-24 06:08:38 +00:00
let obj3 = { alignItems: "center", marginTop: -24, paddingHorizontal: ThemesDefault.space.PX_16 };
let result = require("set").fileFinishedImporting("modules/guild_onboarding/native/GuildOnboardingPrompts.tsx");
2026-07-20 16:05:17 +00:00
export default function GuildOnboardingPrompt(guildId) {
guildId = guildId.guildId;
const currentPromptIdx = guildId.currentPromptIdx;
const prompts = guildId.prompts;
({ selectOption, onClose } = guildId);
({ isFirstOpen, backShouldLeaveGuild } = guildId);
2026-07-23 10:11:24 +00:00
let stateFromStores;
2026-07-29 08:29:29 +00:00
let stateFromStores1;
2026-08-24 06:08:38 +00:00
closure_7 = undefined;
2026-07-23 10:11:24 +00:00
isFirstOpen = undefined;
let navigation;
2026-08-24 06:08:38 +00:00
closure_10 = undefined;
closure_11 = undefined;
2026-07-23 10:11:24 +00:00
let sharedValue;
let callback;
let stateFromStores2;
let stateFromStoresArray;
2026-08-24 06:08:38 +00:00
let required;
2026-07-23 10:11:24 +00:00
let constants;
2026-08-24 06:08:38 +00:00
closure_18 = undefined;
2026-07-20 16:05:17 +00:00
let guildSplashURL;
2026-08-24 06:08:38 +00:00
required = undefined;
let tmp = callback4();
2026-07-29 08:29:29 +00:00
const tmp3 = prompts;
2026-07-23 10:11:24 +00:00
let obj = guildId(prompts[23]);
let items = [navigation];
stateFromStores = obj.useStateFromStores(items, () => navigation.getRulesPrompt(guildId));
2026-08-24 06:08:38 +00:00
obj1 = guildId(prompts[23]);
2026-07-23 10:11:24 +00:00
const items1 = [isFirstOpen];
2026-07-29 08:29:29 +00:00
stateFromStores1 = obj1.useStateFromStores(items1, () => isFirstOpen.useReducedMotion);
2026-07-23 10:11:24 +00:00
let obj2 = guildId(prompts[23]);
const items2 = [callback];
2026-07-29 08:29:29 +00:00
const tmp8 = obj2.useStateFromStores(items2, () => callback.getOnboardingConnections(guildId)).length > 0;
2026-08-24 06:08:38 +00:00
closure_7 = tmp8;
2026-07-20 16:05:17 +00:00
if (isFirstOpen) {
isFirstOpen = 0 === currentPromptIdx;
}
if (isFirstOpen) {
2026-07-29 08:29:29 +00:00
isFirstOpen = !tmp8;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp2Result = tmp2(tmp3[25]);
navigation = tmp2Result.useNavigation();
2026-08-24 06:08:38 +00:00
closure_10 = tmp10;
closure_11 = tmp11;
2026-07-29 08:29:29 +00:00
tmp2Result = tmp2(tmp3[26]);
sharedValue = tmp2Result.useSharedValue(!isFirstOpen);
let obj5 = stateFromStores;
2026-07-20 16:05:17 +00:00
const items3 = [guildId, prompts];
2026-07-23 10:11:24 +00:00
callback = stateFromStores.useCallback(() => {
2026-07-20 16:05:17 +00:00
currentPromptIdx(prompts[27]).completeOnboarding(guildId, prompts);
}, items3);
2026-08-24 06:08:38 +00:00
const items4 = [closure_11];
stateFromStores2 = guildId(tmp3[23]).useStateFromStores(items4, () => guild.getGuild(guildId));
2026-07-29 08:29:29 +00:00
const tmp2Result1 = guildId(tmp3[23]);
const tmp7 = callback;
const items5 = [tmp7];
2026-07-20 16:05:17 +00:00
const items6 = [guildId, prompts[currentPromptIdx]];
2026-07-29 08:29:29 +00:00
stateFromStoresArray = guildId(tmp3[23]).useStateFromStoresArray(items5, () => {
2026-08-24 06:08:38 +00:00
if (null != closure_11) {
2026-07-29 08:29:29 +00:00
let onboardingResponsesForPrompt = callback.getOnboardingResponsesForPrompt(guildId, tmp.id);
2026-07-20 16:05:17 +00:00
} else {
onboardingResponsesForPrompt = [];
}
return onboardingResponsesForPrompt;
}, items6);
2026-07-29 08:29:29 +00:00
let tmp15 = 0 === stateFromStoresArray.length;
if (tmp15) {
2026-07-20 16:05:17 +00:00
required = undefined;
2026-07-29 08:29:29 +00:00
if (tmp11 != null) {
required = tmp11.required;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp15 = required;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
required = tmp15;
2026-07-29 08:29:29 +00:00
let tmp18 = currentPromptIdx + 1 >= prompts.length;
if (tmp18) {
tmp18 = !tmp2(tmp3[28]).showRulesInOnboarding(stateFromStores2, stateFromStores);
const tmp2Result3 = tmp2(tmp3[28]);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
constants = tmp18;
const tmp19 = onClose(obj5.useState(currentPromptIdx(tmp3[17]).unsafe_rawColors.PRIMARY_800), 2);
closure_18 = tmp19[1];
2026-07-20 16:05:17 +00:00
guildSplashURL = null;
if (null != stateFromStores2) {
2026-07-29 08:29:29 +00:00
let tmp6Result = tmp6(tmp3[29]);
obj = { id: null, splash: null, size: null };
({ id: obj11[0], splash: obj11[1] } = stateFromStores2);
obj[2] = 400 * tmp6(tmp3[30])();
guildSplashURL = tmp6Result.getGuildSplashURL(obj);
2026-07-20 16:05:17 +00:00
}
const items7 = [guildSplashURL];
2026-07-29 08:29:29 +00:00
const effect = obj5.useEffect(() => {
2026-07-20 16:05:17 +00:00
if (null != guildSplashURL) {
2026-07-29 08:29:29 +00:00
(function getBackgroundGradientColor(arg0) {
const self = this;
const apply = closure_23.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
})(tmp).then((arg0) => {
callback(arg0);
2026-07-20 16:05:17 +00:00
});
2026-07-29 08:29:29 +00:00
const promise = (function getBackgroundGradientColor(arg0) {
const self = this;
const apply = closure_23.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
})(tmp);
2026-07-20 16:05:17 +00:00
}
}, items7);
const items8 = [guildId, prompts.length > 0, stateFromStores, isFirstOpen];
2026-07-29 08:29:29 +00:00
const effect1 = obj5.useEffect(() => {
2026-07-20 16:05:17 +00:00
if (isFirstOpen) {
let obj = currentPromptIdx(prompts[31]);
obj = {};
const merged = Object.assign(guildId(prompts[32]).collectGuildAnalyticsMetadata(guildId));
2026-07-29 08:29:29 +00:00
obj.step = -1;
obj.required = true;
2026-08-24 06:08:38 +00:00
obj.track(required.GUILD_ONBOARDING_STEP_VIEWED, obj);
2026-07-20 16:05:17 +00:00
const obj3 = guildId(prompts[32]);
obj = {};
const obj4 = currentPromptIdx(prompts[31]);
const merged1 = Object.assign(guildId(prompts[32]).collectGuildAnalyticsMetadata(guildId));
2026-07-29 08:29:29 +00:00
obj.step = -1;
2026-08-24 06:08:38 +00:00
obj.skipped = closure_10;
2026-07-29 08:29:29 +00:00
obj.is_final_step = false;
obj.in_onboarding = true;
2026-08-24 06:08:38 +00:00
obj4.track(required.GUILD_ONBOARDING_STEP_COMPLETED, obj);
2026-07-20 16:05:17 +00:00
const obj6 = guildId(prompts[32]);
}
}, items8);
2026-07-29 08:29:29 +00:00
const items9 = [sharedValue, isFirstOpen, prompts.length > 0, tmp8, onClose, callback, guildId];
const effect2 = obj5.useEffect(() => {
2026-07-20 16:05:17 +00:00
if (isFirstOpen) {
const _setTimeout = setTimeout;
const timerId = setTimeout(() => {
2026-08-24 06:08:38 +00:00
if (closure_10) {
const result = closure_12.set(true);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
callback();
callback2();
2026-07-20 16:05:17 +00:00
}
}, 2000);
}
}, items9);
const items10 = [isFirstOpen, prompts.length > 0, onClose];
2026-07-29 08:29:29 +00:00
const effect3 = obj5.useEffect(() => {
2026-07-20 16:05:17 +00:00
let tmp = isFirstOpen;
if (!isFirstOpen) {
2026-08-24 06:08:38 +00:00
tmp = closure_10;
2026-07-20 16:05:17 +00:00
}
if (!tmp) {
onClose();
}
}, items10);
2026-07-29 08:29:29 +00:00
required = tmp10;
2026-07-20 16:05:17 +00:00
if (prompts.length > 0) {
required = prompts[0].required;
}
const items11 = [guildId, required, currentPromptIdx];
2026-07-29 08:29:29 +00:00
const effect4 = obj5.useEffect(() => {
2026-07-20 16:05:17 +00:00
if (0 === currentPromptIdx) {
let obj = currentPromptIdx(prompts[31]);
obj = {};
const merged = Object.assign(guildId(prompts[32]).collectGuildAnalyticsMetadata(guildId));
2026-07-29 08:29:29 +00:00
obj.step = 0;
obj.required = required;
2026-08-24 06:08:38 +00:00
obj.track(required.GUILD_ONBOARDING_STEP_VIEWED, obj);
2026-07-20 16:05:17 +00:00
const obj3 = guildId(prompts[32]);
}
}, items11);
2026-07-29 08:29:29 +00:00
const tmp2Result2 = guildId(tmp3[23]);
function ot() {
let obj = sharedValue;
2026-07-20 16:05:17 +00:00
let num = 1;
if (sharedValue.get()) {
num = 0;
}
2026-08-24 06:08:38 +00:00
obj1 = guildId(prompts[33]);
2026-07-29 08:29:29 +00:00
obj = { duration: 300, easing: null };
2026-07-20 16:05:17 +00:00
const Easing = guildId(prompts[26]).Easing;
2026-07-29 08:29:29 +00:00
obj[1] = Easing.out(guildId(prompts[26]).Easing.ease);
2026-07-20 16:05:17 +00:00
let num2 = 0;
if (!stateFromStores1) {
num2 = 0;
2026-07-29 08:29:29 +00:00
if (obj.get()) {
2026-07-20 16:05:17 +00:00
num2 = -80;
}
}
2026-07-29 08:29:29 +00:00
obj = { opacity: obj1.withTiming(num, obj), transform: null };
obj1 = { translateY: null };
const withTimingResult = obj1.withTiming(num, obj);
const obj2 = { duration: 300, easing: null };
const Easing2 = tmp(tmp2[26]).Easing;
obj2[1] = Easing2.out(guildId(prompts[26]).Easing.ease);
obj1[0] = guildId(prompts[33]).withTiming(num2, obj2);
2026-07-20 16:05:17 +00:00
const items = [obj1];
2026-07-29 08:29:29 +00:00
obj[1] = items;
2026-07-20 16:05:17 +00:00
return obj;
}
2026-07-29 08:29:29 +00:00
obj = { showPrompts: sharedValue, withTiming: tmp2(tmp3[33]).withTiming, Easing: tmp2(tmp3[26]).Easing, useReducedMotion: stateFromStores1 };
ot.__closure = obj;
ot.__workletHash = 6820086589932;
ot.__initData = closure_25;
const animatedStyle = guildId(tmp3[26]).useAnimatedStyle(ot);
const tmp2Result4 = guildId(tmp3[26]);
function st() {
let obj = sharedValue;
2026-07-20 16:05:17 +00:00
let num = 1;
if (sharedValue.get()) {
num = 0;
}
2026-08-24 06:08:38 +00:00
obj1 = guildId(prompts[26]);
2026-07-29 08:29:29 +00:00
let obj2 = guildId(prompts[33]);
obj = { duration: 300, easing: null };
2026-07-20 16:05:17 +00:00
const Easing = guildId(prompts[26]).Easing;
2026-07-29 08:29:29 +00:00
obj[1] = Easing.out(guildId(prompts[26]).Easing.ease);
2026-07-20 16:05:17 +00:00
let num2 = 0;
if (!stateFromStores1) {
num2 = 0;
2026-07-29 08:29:29 +00:00
if (obj.get()) {
2026-07-20 16:05:17 +00:00
num2 = -80;
}
}
2026-07-29 08:29:29 +00:00
obj = { opacity: obj1.withDelay(200, obj2.withTiming(num, obj)), transform: null };
obj1 = { translateY: null };
let tmpResult = tmp(tmp2[26]);
tmpResult = tmp(tmp2[33]);
obj2 = { duration: 300, easing: null };
const Easing2 = tmp(tmp2[26]).Easing;
obj2[1] = Easing2.out(guildId(prompts[26]).Easing.ease);
obj1[0] = tmpResult.withDelay(200, tmpResult.withTiming(num2, obj2));
2026-07-20 16:05:17 +00:00
const items = [obj1];
2026-07-29 08:29:29 +00:00
obj[1] = items;
2026-07-20 16:05:17 +00:00
return obj;
}
2026-07-29 08:29:29 +00:00
obj1 = { showPrompts: sharedValue, withDelay: tmp2(tmp3[26]).withDelay, withTiming: tmp2(tmp3[33]).withTiming, Easing: tmp2(tmp3[26]).Easing, useReducedMotion: stateFromStores1 };
st.__closure = obj1;
st.__workletHash = 3034833873876;
st.__initData = closure_26;
const animatedStyle1 = guildId(tmp3[26]).useAnimatedStyle(st);
const tmp2Result5 = guildId(tmp3[26]);
function rt() {
2026-07-20 16:05:17 +00:00
let num = 1;
if (sharedValue.get()) {
num = 0;
}
2026-07-29 08:29:29 +00:00
let obj = { opacity: null };
2026-07-20 16:05:17 +00:00
const obj2 = guildId(prompts[26]);
2026-07-29 08:29:29 +00:00
obj = { duration: 300, easing: null };
2026-07-20 16:05:17 +00:00
const Easing = guildId(prompts[26]).Easing;
2026-07-29 08:29:29 +00:00
obj[1] = Easing.out(guildId(prompts[26]).Easing.ease);
obj[0] = obj2.withDelay(200, guildId(prompts[33]).withTiming(num, obj));
2026-07-20 16:05:17 +00:00
return obj;
}
2026-07-29 08:29:29 +00:00
obj2 = { showPrompts: sharedValue, withDelay: tmp2(tmp3[26]).withDelay, withTiming: tmp2(tmp3[33]).withTiming, Easing: tmp2(tmp3[26]).Easing };
rt.__closure = obj2;
rt.__workletHash = 2795589385440;
rt.__initData = closure_27;
const animatedStyle2 = guildId(tmp3[26]).useAnimatedStyle(rt);
const tmp2Result6 = guildId(tmp3[26]);
function lt() {
2026-07-20 16:05:17 +00:00
let num = 1;
if (sharedValue.get()) {
num = 0;
}
2026-07-29 08:29:29 +00:00
let obj = { opacity: null };
2026-07-20 16:05:17 +00:00
const obj2 = guildId(prompts[26]);
2026-07-29 08:29:29 +00:00
obj = { duration: 300, easing: null };
2026-07-20 16:05:17 +00:00
const Easing = guildId(prompts[26]).Easing;
2026-07-29 08:29:29 +00:00
obj[1] = Easing.out(guildId(prompts[26]).Easing.ease);
obj[0] = obj2.withDelay(200, guildId(prompts[33]).withTiming(num, obj));
2026-07-20 16:05:17 +00:00
return obj;
}
2026-07-29 08:29:29 +00:00
const tmp2Result7 = guildId(tmp3[26]);
lt.__closure = { showPrompts: sharedValue, withDelay: guildId(tmp3[26]).withDelay, withTiming: guildId(tmp3[33]).withTiming, Easing: guildId(tmp3[26]).Easing };
lt.__workletHash = 13481450530727;
lt.__initData = closure_28;
const animatedStyle3 = tmp2Result7.useAnimatedStyle(lt);
let obj3 = { showPrompts: sharedValue, withDelay: guildId(tmp3[26]).withDelay, withTiming: guildId(tmp3[33]).withTiming, Easing: guildId(tmp3[26]).Easing };
function ct() {
let obj = sharedValue;
2026-07-20 16:05:17 +00:00
let num = 0;
if (sharedValue.get()) {
num = 1;
}
2026-08-24 06:08:38 +00:00
obj1 = guildId(prompts[26]);
2026-07-29 08:29:29 +00:00
let obj2 = guildId(prompts[33]);
obj = { duration: 300, easing: null };
2026-07-20 16:05:17 +00:00
const Easing = guildId(prompts[26]).Easing;
2026-07-29 08:29:29 +00:00
obj[1] = Easing.out(guildId(prompts[26]).Easing.ease);
2026-07-20 16:05:17 +00:00
if (stateFromStores1) {
let num2 = 0;
} else {
num2 = 80;
}
2026-07-29 08:29:29 +00:00
obj = { opacity: obj1.withDelay(600, obj2.withTiming(num, obj)), transform: null };
obj1 = { translateY: null };
let tmpResult = tmp(tmp2[26]);
tmpResult = tmp(tmp2[33]);
obj2 = { duration: 300, easing: null };
const Easing2 = tmp(tmp2[26]).Easing;
obj2[1] = Easing2.out(guildId(prompts[26]).Easing.ease);
obj1[0] = tmpResult.withDelay(600, tmpResult.withTiming(num2, obj2));
2026-07-20 16:05:17 +00:00
const items = [obj1];
2026-07-29 08:29:29 +00:00
obj[1] = items;
2026-07-20 16:05:17 +00:00
return obj;
}
2026-07-29 08:29:29 +00:00
const tmp2Result8 = guildId(tmp3[26]);
ct.__closure = { showPrompts: sharedValue, withDelay: guildId(tmp3[26]).withDelay, withTiming: guildId(tmp3[33]).withTiming, Easing: guildId(tmp3[26]).Easing, useReducedMotion: stateFromStores1 };
ct.__workletHash = 14018549800735;
ct.__initData = closure_29;
const items12 = [navigation, currentPromptIdx, stateFromStoresArray, guildId, prompts, onClose, backShouldLeaveGuild, tmp8];
const animatedStyle4 = tmp2Result8.useAnimatedStyle(ct);
const layoutEffect = obj5.useLayoutEffect(() => {
2026-07-20 16:05:17 +00:00
if (0 === currentPromptIdx) {
2026-08-24 06:08:38 +00:00
if (!closure_7) {
2026-07-20 16:05:17 +00:00
let obj = guildId(prompts[34]);
2026-07-29 08:29:29 +00:00
obj = { headerLeft: null };
obj[0] = obj.getHeaderCloseButton(() => {
2026-08-24 06:08:38 +00:00
let transitionTo = closure_1_2;
let obj = closure_1_1(closure_1_2[31]);
2026-07-20 16:05:17 +00:00
obj = {};
2026-08-24 06:08:38 +00:00
let tmp = closure_1_0;
const merged = Object.assign(closure_1_0(closure_1_2[32]).collectGuildAnalyticsMetadata(closure_0));
2026-07-29 08:29:29 +00:00
obj.step = 0;
obj.skipped = true;
obj.back = false;
obj.options_selected = 0;
obj.in_onboarding = true;
obj.is_final_step = false;
2026-08-24 06:08:38 +00:00
obj.track(closure_1_16.GUILD_ONBOARDING_STEP_COMPLETED, obj);
let tmp5 = closure_3;
if (closure_4) {
let channel = closure_1_10.getChannel(closure_1_12.getLastSelectedChannelId());
2026-07-20 16:05:17 +00:00
if (null == channel) {
2026-08-24 06:08:38 +00:00
tmp(transitionTo[14]).transitionTo(closure_1_18.ME, { navigationReplace: true });
2026-07-29 08:29:29 +00:00
tmp5 = tmp5();
const tmpResult = tmp(transitionTo[14]);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp = tmp(transitionTo[14]);
transitionTo = tmp.transitionTo;
2026-08-24 06:08:38 +00:00
channel = transitionTo(closure_1_18.CHANNEL(channel.guild_id, channel.id));
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmp5();
2026-07-20 16:05:17 +00:00
}
});
navigation.setOptions(obj);
}
}
if (0 !== currentPromptIdx) {
let headerBackButton = guildId(prompts[34]).getHeaderBackButton(() => {
2026-08-24 06:08:38 +00:00
let obj = closure_1_1(closure_1_2[31]);
2026-07-20 16:05:17 +00:00
obj = {};
2026-08-24 06:08:38 +00:00
const merged = Object.assign(closure_1_0(closure_1_2[32]).collectGuildAnalyticsMetadata(closure_0));
2026-07-29 08:29:29 +00:00
obj.step = closure_1;
obj.skipped = false;
obj.back = true;
obj.options_selected = closure_15.length;
obj.in_onboarding = true;
obj.is_final_step = false;
2026-08-24 06:08:38 +00:00
obj.track(closure_1_16.GUILD_ONBOARDING_STEP_COMPLETED, obj);
const obj3 = closure_1_0(closure_1_2[32]);
2026-07-20 16:05:17 +00:00
obj = {};
2026-08-24 06:08:38 +00:00
const obj4 = closure_1_1(closure_1_2[31]);
const merged1 = Object.assign(closure_1_0(closure_1_2[32]).collectGuildAnalyticsMetadata(closure_0));
2026-07-29 08:29:29 +00:00
obj.step = closure_1 - 1;
obj.required = table[closure_1 - 1].required;
2026-08-24 06:08:38 +00:00
obj4.track(closure_1_16.GUILD_ONBOARDING_STEP_VIEWED, obj);
const obj6 = closure_1_0(closure_1_2[32]);
2026-07-20 16:05:17 +00:00
}, true);
const obj2 = guildId(prompts[34]);
}
headerBackButton = guildId(prompts[34]).getHeaderBackButton(() => {
2026-08-24 06:08:38 +00:00
let obj = closure_1_1(closure_1_2[31]);
2026-07-20 16:05:17 +00:00
obj = {};
2026-08-24 06:08:38 +00:00
const merged = Object.assign(closure_1_0(closure_1_2[32]).collectGuildAnalyticsMetadata(closure_0));
2026-07-29 08:29:29 +00:00
obj.step = 0;
obj.skipped = false;
obj.back = true;
obj.options_selected = closure_15.length;
obj.in_onboarding = true;
obj.is_final_step = false;
2026-08-24 06:08:38 +00:00
obj.track(closure_1_16.GUILD_ONBOARDING_STEP_COMPLETED, obj);
const obj3 = closure_1_0(closure_1_2[32]);
2026-07-20 16:05:17 +00:00
}, true);
}, items12);
2026-07-29 08:29:29 +00:00
obj5 = { style: tmp.flex, children: null };
let obj6 = { top: true, bottom: true, style: items13, children: null };
items13 = [, ];
2026-07-20 16:05:17 +00:00
({ flex: arr16[0], container: arr16[1] } = tmp);
2026-07-29 08:29:29 +00:00
const obj7 = { style: items14, children: null };
2026-07-23 10:11:24 +00:00
items14 = [tmp.flex, animatedStyle4];
2026-07-29 08:29:29 +00:00
let tmp34Result = null;
2026-07-20 16:05:17 +00:00
if (prompts.length > 0) {
2026-07-29 08:29:29 +00:00
tmp34Result = null;
if (null != tmp11) {
function handleOnPress() {
2026-08-24 06:08:38 +00:00
if (!required) {
if (closure_17) {
2026-07-29 08:29:29 +00:00
let arr = navigation.push(stateFromStoresArray.COMPLETED);
} else {
let obj = currentPromptIdx(prompts[31]);
obj = {};
const merged = Object.assign(guildId(prompts[32]).collectGuildAnalyticsMetadata(guildId));
obj.step = currentPromptIdx;
obj.options_selected = stateFromStoresArray.length;
obj.skipped = 0 === stateFromStoresArray.length;
obj.back = false;
obj.in_onboarding = true;
obj.is_final_step = false;
2026-08-24 06:08:38 +00:00
obj.track(required.GUILD_ONBOARDING_STEP_COMPLETED, obj);
2026-07-29 08:29:29 +00:00
arr = prompts;
if (currentPromptIdx < prompts.length - 1) {
obj = {};
let tmp5Result = tmp5(tmp3[32]);
const merged1 = Object.assign(tmp5Result.collectGuildAnalyticsMetadata(tmp6));
obj.step = tmp9 + 1;
obj.required = arr[tmp9 + 1].required;
tmp2(tmp3[31]).track(tmp4.GUILD_ONBOARDING_STEP_VIEWED, obj);
const tmp2Result = tmp2(tmp3[31]);
}
if (currentPromptIdx + 1 < arr.length) {
2026-08-24 06:08:38 +00:00
obj1 = { currentPrompt: null };
2026-07-29 08:29:29 +00:00
obj1[0] = tmp9 + 1;
arr = navigation.push(stateFromStoresArray.PROMPT, obj1);
} else {
tmp5Result = tmp5(tmp3[28]);
if (tmp5Result.showRulesInOnboarding(stateFromStores2, stateFromStores)) {
navigation.push(stateFromStoresArray.RULES);
}
}
const obj3 = guildId(prompts[32]);
tmp2 = currentPromptIdx;
2026-08-24 06:08:38 +00:00
tmp4 = required;
2026-07-29 08:29:29 +00:00
tmp6 = guildId;
}
}
}
const type = tmp11.type;
2026-07-23 10:11:24 +00:00
if (stateFromStores2.MULTIPLE_CHOICE === type) {
2026-07-29 08:29:29 +00:00
const obj8 = { guildId: null, currentPrompt: null, lastPrompt: null, currentPromptIndex: null, numberOfPrompts: null, selectOption: null, handleOnPress: null };
obj8[0] = guildId;
obj8[1] = tmp11;
obj8[2] = tmp18;
obj8[3] = currentPromptIdx;
obj8[4] = prompts.length;
obj8[5] = selectOption;
obj8[6] = handleOnPress;
tmp34Result = tmp34(tmp2(tmp3[36]).MultipleChoicePrompt, obj8);
} else if (tmp36.DROPDOWN === type) {
const obj9 = { guildId: null, currentPrompt: null, lastPrompt: null, currentPromptIndex: null, numberOfPrompts: null, selectOption: null, handleOnPress: null };
obj9[0] = guildId;
obj9[1] = tmp11;
obj9[2] = tmp18;
obj9[3] = currentPromptIdx;
obj9[4] = prompts.length;
obj9[5] = selectOption;
obj9[6] = handleOnPress;
tmp34Result = tmp34(tmp2(tmp3[36]).DropdownPrompt, obj9);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmp2(tmp3[37]).assertNever(tmp11.type);
const tmp2Result9 = tmp2(tmp3[37]);
2026-07-20 16:05:17 +00:00
}
}
}
2026-07-29 08:29:29 +00:00
obj7[1] = tmp34Result;
obj6[3] = guildSplashURL(currentPromptIdx(tmp3[26]).View, obj7);
const items15 = [guildSplashURL(guildId(tmp3[35]).SafeAreaPaddingView, obj6), ];
const obj10 = { style: stateFromStores1.absoluteFill, pointerEvents: "none", children: null };
const obj11 = { style: items16, pointerEvents: "none", children: null };
2026-07-23 10:11:24 +00:00
items16 = [, ];
2026-07-20 16:05:17 +00:00
({ flex: arr19[0], landingOverlay: arr19[1] } = tmp);
2026-07-29 08:29:29 +00:00
const obj12 = { style: items17, children: null };
2026-07-23 10:11:24 +00:00
items17 = [tmp.landingOverlay, animatedStyle3];
2026-07-29 08:29:29 +00:00
tmp34Result = null;
2026-07-20 16:05:17 +00:00
if (null != guildSplashURL) {
2026-07-29 08:29:29 +00:00
const obj13 = { splashUrl: null, color: null };
obj13[0] = guildSplashURL;
obj13[1] = tmp19[0];
tmp34Result = tmp34(BackgroundImageGradient, obj13);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const items18 = [tmp34Result, ];
const obj14 = { style: tmp.darkColorGradient, start: null, end: null, colors: null };
tmp6Result = tmp6(tmp3[21]);
obj14[1] = guildId(tmp3[22]).VerticalGradient.START;
obj14[2] = guildId(tmp3[22]).VerticalGradient.END;
let obj4 = { showPrompts: sharedValue, withDelay: guildId(tmp3[26]).withDelay, withTiming: guildId(tmp3[33]).withTiming, Easing: guildId(tmp3[26]).Easing, useReducedMotion: stateFromStores1 };
const items19 = [guildId(tmp3[19]).hexWithOpacity(currentPromptIdx(tmp3[17]).unsafe_rawColors.PRIMARY_800, 0.5), currentPromptIdx(tmp3[17]).unsafe_rawColors.PRIMARY_800];
obj14[3] = items19;
items18[1] = guildSplashURL(tmp6Result, obj14);
obj12[1] = items18;
const items20 = [closure_21(currentPromptIdx(tmp3[26]).View, obj12), , ];
2026-08-24 06:08:38 +00:00
const tmp2Result10 = guildId(tmp3[19]);
const items21 = [tmp.artWrapper, animatedStyle];
items20[1] = guildSplashURL(currentPromptIdx(tmp3[26]).View, { style: items21, children: guildSplashURL(currentPromptIdx(tmp3[38]), obj16) });
2026-07-29 08:29:29 +00:00
const obj17 = { style: items22, children: null };
2026-07-23 10:11:24 +00:00
items22 = [tmp.landingBody, animatedStyle1];
2026-07-29 08:29:29 +00:00
const obj18 = { style: tmp.subtitle, variant: "text-md/semibold", color: "text-overlay-light", children: null };
const intl = tmp2(tmp3[40]).intl;
let str;
if (stateFromStores2 != null) {
str = stateFromStores2.name;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (str == null) {
str = "";
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj18[3] = intl.format(guildId(tmp3[40]).t.O2bQlD, { guildName: str });
const items23 = [guildSplashURL(guildId(tmp3[39]).Text, obj18), ];
const obj19 = { style: tmp.onboardingTitle, accessibilityRole: "header", variant: "heading-xl/semibold", color: "text-overlay-light", children: null };
const intl2 = tmp2(tmp3[40]).intl;
obj19[4] = intl2.string(guildId(tmp3[40]).t["Alcl/e"]);
items23[1] = guildSplashURL(guildId(tmp3[39]).Text, obj19);
obj17[1] = items23;
items20[2] = closure_21(currentPromptIdx(tmp3[26]).View, obj17);
obj11[2] = items20;
const items24 = [closure_21(currentPromptIdx(tmp3[26]).View, obj11), ];
const obj20 = { style: items25, pointerEvents: "auto", children: null };
2026-07-23 10:11:24 +00:00
items25 = [tmp.onboardingPolicy, animatedStyle2, { bottom: currentPromptIdx(prompts[24])().bottom }];
2026-07-29 08:29:29 +00:00
const obj21 = { style: tmp.onboardingPolicyText, variant: "heading-sm/normal", color: "text-default", children: null };
const intl3 = tmp2(tmp3[40]).intl;
obj21[3] = intl3.format(guildId(tmp3[40]).t.kI6UoD, { privacyLink: constants.PRIVACY });
obj20[2] = guildSplashURL(guildId(tmp3[39]).Text, obj21);
items24[1] = guildSplashURL(currentPromptIdx(tmp3[26]).View, obj20);
obj10[2] = items24;
2026-08-24 06:08:38 +00:00
items15[1] = closure_21(closure_7, obj10);
2026-07-29 08:29:29 +00:00
obj5[1] = items15;
2026-08-24 06:08:38 +00:00
return closure_21(closure_7, obj5);
2026-07-20 16:05:17 +00:00
};