local l_Parent_0 = script:FindFirstAncestor("AppChat").Parent;
local l_AppPage_0 = require(l_Parent_0.RobloxAppEnums).AppPage;
local l_useSelector_0 = require(l_Parent_0.RoactUtils).Hooks.RoactRodux.useSelector;
return function()
    return l_useSelector_0(function(v3)
        if v3.Navigation then
            local l_history_0 = v3.Navigation.history;
            if l_history_0 then
                local v5 = l_history_0[#l_history_0];
                return (v5[#v5] and v5[#v5].name) == l_AppPage_0.Chat;
            else
                return false;
            end;
        else
            return true;
        end;
    end);
end;


local l_Parent_0 = script:FindFirstAncestor("AppChat").Parent;
local v1 = require(l_Parent_0.AppCommonLib);
local v2 = require(l_Parent_0.React);
local l_dependencyArray_0 = require(l_Parent_0.RoactUtils).Hooks.dependencyArray;
local l_useCallback_0 = v2.useCallback;
local l_useReducer_0 = v2.useReducer;
local l_Immutable_0 = v1.Immutable;
local function v9(v7, v8)
    if v8.callback == nil then
        return l_Immutable_0.RemoveFromDictionary(v7, v8.screen);
    else
        assert(v8.callback ~= nil, "");
        return l_Immutable_0.Set(v7, v8.screen, v8.callback);
    end;
end;
return function()
    local v10, v11 = l_useReducer_0(v9, {});
    return v10, (l_useCallback_0(function(v12, v13)
        v11({
            callback = v12,
            screen = v13
        });
    end, l_dependencyArray_0(v11)));
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_useSelector_0 = require(l_script_FirstAncestor_0.Parent.RoactUtils).Hooks.RoactRodux.useSelector;
local v2 = require(l_script_FirstAncestor_0.Utils.getDeepValue);
return function(v3)
    return l_useSelector_0(function(v4)
        return v2(v4, (("ChatAppReducer.Conversations.%*"):format(v3)));
    end);
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_useSelector_0 = require(l_script_FirstAncestor_0.Parent.RoactUtils).Hooks.RoactRodux.useSelector;
local v2 = require(l_script_FirstAncestor_0.Components.ChatLanding.Conversations.Selectors.selectConversations);
return function()
    return l_useSelector_0(function(v3)
        return v2(v3);
    end);
end;


local l_useSelector_0 = require(script:FindFirstAncestor("AppChat").Parent.RoactUtils).Hooks.RoactRodux.useSelector;
return function()
    return l_useSelector_0(function(v1)
        return v1.Users;
    end);
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_useSelector_0 = require(l_script_FirstAncestor_0.Parent.RoactUtils).Hooks.RoactRodux.useSelector;
local v2 = require(l_script_FirstAncestor_0.Components.ChatConversation.Conversations.Selectors.selectUsersTyping);
return function(v3)
    return l_useSelector_0(function(v4)
        return v2(v4, v3);
    end);
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local l_useSelector_0 = require(l_Parent_0.RoactUtils).Hooks.RoactRodux.useSelector;
local v3 = require(l_script_FirstAncestor_0.Utils.getDeepValue);
local v4 = require(l_Parent_0.Cryo);
return function()
    return l_useSelector_0(function(v5)
        return not v4.isEmpty(v3(v5, "ChatAppReducer.Conversations") or {});
    end);
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_useSelector_0 = require(l_script_FirstAncestor_0.Parent.RoactUtils).Hooks.RoactRodux.useSelector;
local v2 = require(l_script_FirstAncestor_0.Utils.getDeepValue);
return function()
    return l_useSelector_0(function(v3)
        return v2(v3, "ChatAppReducer.AppLoaded") or false;
    end);
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_useSelector_0 = require(l_script_FirstAncestor_0.Parent.RoactUtils).Hooks.RoactRodux.useSelector;
local v2 = require(l_script_FirstAncestor_0.Utils.getDeepValue);
return function()
    return l_useSelector_0(function(v3)
        return v2(v3, "ChatAppReducer.ChatSettings.chatEnabled") or false;
    end);
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_useSelector_0 = require(l_script_FirstAncestor_0.Parent.RoactUtils).Hooks.RoactRodux.useSelector;
local v2 = require(l_script_FirstAncestor_0.Utils.getDeepValue);
return function()
    return l_useSelector_0(function(v3)
        return v2(v3, "ChatAppReducer.ConversationsAsync.oldestConversationIsFetched");
    end);
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local v1 = require(l_script_FirstAncestor_0.Models.Conversation);
local v2 = require(l_script_FirstAncestor_0.Models.ConversationChannels);
return function(v3)
    if v3.conversationType ~= v1.Type.MULTI_USER_CONVERSATION then
        return false;
    elseif v3.userPendingStatus == v2.UserPendingStatus.Pending then
        return true;
    elseif v3.userPendingStatus == v2.UserPendingStatus.Invalid and v3.moderationType == v2.ModerationType.TrustedComms then
        return true;
    else
        return false;
    end;
end;


local l_Parent_0 = script:FindFirstAncestor("AppChat").Parent;
local l_useDispatch_0 = require(l_Parent_0.RoactUtils).Hooks.RoactRodux.useDispatch;
local v2 = require(l_Parent_0.React);
return function(v3)
    local v4 = l_useDispatch_0();
    return v2.useMemo(function()
        return v3(v4);
    end, {
        v4,
        v3
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.React);
local v3 = require(l_Parent_0.RoactUtils);
local v4 = require(l_script_FirstAncestor_0.EnumScreens);
local l_dependencyArray_0 = v3.Hooks.dependencyArray;
local l_useDispatch_0 = v3.Hooks.RoactRodux.useDispatch;
local l_useMemo_0 = v2.useMemo;
return function()
    return l_useMemo_0(function()
        return {
            [v4.GameDetail] = function()
            end,
            [v4.Notifications] = function()
            end,
            [v4.PrivacySettings] = function()
            end,
            [v4.ReportAbuse] = function()
            end,
            [v4.ViewUserProfile] = function()
            end,
            [v4.SquadLobby] = function()
            end,
            [v4.Groups] = function()
            end
        };
    end, l_dependencyArray_0((l_useDispatch_0())));
end;


local l_useSelector_0 = require(script:FindFirstAncestor("AppChat").Parent.RoactUtils).Hooks.RoactRodux.useSelector;
return function(v1)
    local v3 = l_useSelector_0(function(v2)
        return (tonumber(v2.LocalUserId));
    end);
    local v4 = not not v1 and v1.participants or {};
    local v5 = {};
    for _, v7 in v4, nil, nil do
        local v8 = tonumber(v7);
        if v8 and v8 ~= v3 then
            table.insert(v5, v8);
        end;
    end;
    return v5;
end;


return require(script:FindFirstAncestor("AppChat").Parent.LuaSocialLibrariesDeps).NetworkingChat.config({
    roduxNetworking = require(script.Parent.RoduxNetworking)
});


return require(script:FindFirstAncestor("AppChat").Parent.LuaSocialLibrariesDeps).NetworkingFriends.config({
    roduxNetworking = require(script.Parent.RoduxNetworking)
});


return require(script:FindFirstAncestor("AppChat").Parent.LuaSocialLibrariesDeps).NetworkingPresence.config({
    roduxNetworking = require(script.Parent.RoduxNetworking)
});


return require(script:FindFirstAncestor("AppChat").Parent.LuaSocialLibrariesDeps).NetworkingUsers.config({
    roduxNetworking = require(script.Parent.RoduxNetworking)
});


return require(script:FindFirstAncestor("AppChat").Parent.LuaSocialLibrariesDeps).RoduxAliases.config({
    keyPath = "ChatAppReducer.Aliases"
});


local l_Parent_0 = script:FindFirstAncestor("AppChat").Parent;
local v1 = require(l_Parent_0.HttpRequest);
local v2 = require(l_Parent_0.RoduxNetworking);
local v3 = require(l_Parent_0.Loggers).Logger:new("AppChat");
return v2.config({
    keyPath = "ChatAppReducer.networkStatus",
    networkImpl = v1.config({
        requestFunction = function(v4, v5, v6)
            v3:info("Fetching: {}", string.format("[ requestMethod = %q, url = %q ]", v5, v4));
            return v1.requestFunctions.HttpRbxApi(v4, v5, v6);
        end,
        postRequestFunction = function(v7, v8)
            v3:debug("Returned: {}", string.format("[ requestMethod = %q, url = %q, statusCode = %s, body = %s ]", v8.requestMethod, v8.url, v7.StatusCode, v7.Body));
        end
    }),
    killRequestWithFilteredIds = true
});


return require(script:FindFirstAncestor("AppChat").Parent.LuaSocialLibrariesDeps).RoduxPresence.config({
    keyPath = "ChatAppReducer.Presence"
});


return {
    NetworkingChat = require(script.NetworkingChat),
    NetworkingFriends = require(script.NetworkingFriends),
    NetworkingPresence = require(script.NetworkingPresence),
    RoduxAliases = require(script.RoduxAliases),
    RoduxNetworking = require(script.RoduxNetworking),
    RoduxPresence = require(script.RoduxPresence)
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.Roact);
local l_Analytics_0 = require(l_Parent_0.Analytics).Analytics;
local l_RbxAnalyticsService_0 = game:GetService("RbxAnalyticsService");
local v5 = require(script.Parent.RoactChatAnalytics);
local v6 = require(l_script_FirstAncestor_0.LegacyAnalytics.AnalyticsContext);
return function(v7)
    return v2.createElement(v6.Provider, {
        value = v5.new(l_Analytics_0.new(l_RbxAnalyticsService_0), v7.localUserId)
    }, v2.oneChild(v7[v2.Children]));
end;


local v0 = require(script:FindFirstAncestor("AppChat").Parent.Cryo);
local v1 = {};
v1.__index = v1;
v1.DiagCounters = {
    FetchedOlderConversation = game:DefineFastString("RoactChatFetchedOlderConversationCounter", "RoactChatFetchedOlderConversation"),
    LuaShareGameInputBarEntry = game:DefineFastString("LuaShareGameRoactChatInputBarEntryCounter", "LuaShareGameRoactChatInputBarEntry"),
    LuaShareGameInputBarInvite = game:DefineFastString("LuaShareGameRoactChatInputBarInviteCounter", "LuaShareGameRoactChatInputBarInvite"),
    UserLoadedChat = game:DefineFastString("RoactChatUserLoadedCounter", "RoactChatUserLoaded")
};
v1.DiagCounters.ChatDetailsProfile = game:DefineFastString("RoactChatNavigationChatDetailsProfileCounter", "RoactChatNavigationChatDetailsProfile");
v1.DiagCounters.ChatConversationProfile = game:DefineFastString("RoactChatNavigationChatConversationProfileCounter", "RoactChatNavigationChatConversationProfile");
v1.NavigationEvents = {
    ChatDetailsProfile = "ChatDetailsProfile",
    ChatConversationProfile = "ChatConversationProfile"
};
local v2 = {
    [v1.NavigationEvents.ChatConversationProfile] = {
        subpage = "peekView",
        page = "playerProfile",
        btn = "chatIcon"
    },
    [v1.NavigationEvents.ChatDetailsProfile] = {
        subpage = "peekView",
        page = "playerProfile",
        btn = "chatDetailsMenu"
    }
};
v1.new = function(v3, v4)
    assert(v4, "RoactChatAnalytics must be passed the ID of the local user");
    local v5 = {
        _diagImpl = v3.Diag,
        _eventStreamImpl = v3.EventStream,
        hasAlreadyFetchedOlderConversations = false,
        localUserId = v4
    };
    setmetatable(v5, v1);
    return v5;
end;
v1.withEventStream = function(v6, v7)
    v6._eventStreamImpl = v7;
    return v6;
end;
v1.withDiag = function(v8, v9)
    v8._diagImpl = v9;
    return v8;
end;
v1.userFetchedOlderConversations = function(v10)
    if not v10.hasAlreadyFetchedOlderConversations then
        v10.hasAlreadyFetchedOlderConversations = true;
        v10._eventStreamImpl:setRBXEventStream("roactChat", "userFetchedOlderConversations", {
            uid = v10.localUserId
        });
        v10._diagImpl:reportCounter(v1.DiagCounters.FetchedOlderConversation, 1);
        return ;
    else
        return ;
    end;
end;
v1.inputShareGameInviteSent = function(v11, v12, v13, v14, v15, v16)
    v11._eventStreamImpl:setRBXEventStream("touch", "inputShareGameInviteSent", {
        btn = "roactChatInputBar",
        placeId = tostring(v12),
        gameId = tostring(v13),
        senderId = v14,
        conversationId = tostring(v15),
        participants = table.concat(v16, ",")
    });
    v11._diagImpl:reportCounter(v1.DiagCounters.LuaShareGameInputBarInvite, 1);
end;
v1.inputShareGameEntryPoint = function(v17, v18)
    v17._eventStreamImpl:setRBXEventStream("touch", "inputShareGameInviteSent", {
        btn = "roactChatInputBar",
        uid = v17.localUserId,
        cid = tostring(v18)
    });
    v17._diagImpl:reportCounter(v1.DiagCounters.LuaShareGameInputBarEntry, 1);
end;
v1.loadGameLinkCardInChat = function(v19, v20, v21)
    v19._eventStreamImpl:setRBXEventStream("roactChat", "loadGameLinkCardInChat", {
        uid = v19.localUserId,
        cid = tostring(v20),
        pid = tostring(v21)
    });
end;
v1.userLoadedChat = function(v22)
    v22._eventStreamImpl:setRBXEventStream("roactChat", "userLoadedChat", {
        uid = v22.localUserId
    });
    v22._diagImpl:reportCounter(v1.DiagCounters.UserLoadedChat, 1);
end;
v1.navigate = function(v23, v24)
    assert(v2[v24], "Invalid navigation option given");
    v23._diagImpl:reportCounter(v1.DiagCounters[v24], 1);
    v23._eventStreamImpl:setRBXEventStream("chat", "buttonClick", v0.Dictionary.join({
        uid = v23.localUserId
    }, v2[v24]));
end;
return v1;


local v0 = require(script:FindFirstAncestor("AppChat").Parent.React);
local v1 = require(script.Parent.AnalyticsContext);
return function()
    return v0.useContext(v1);
end;


local v0 = require(script:FindFirstAncestor("AppChat").Parent.Roact);
local v1 = require(script.Parent.AnalyticsConsumer);
return function(v2)
    assert(type(v2) == "function", "Expect renderCallback to be a function.");
    return v0.createElement(v1, {
        render = v2
    });
end;


local v0 = require(script:FindFirstAncestor("AppChat").Parent.Roact);
local v1 = require(script.Parent.RoactChatAnalyticsConsumer);
return function(v2)
    assert(type(v2) == "function", "Expect renderCallback to be a function.");
    return v0.createElement(v1, {
        render = v2
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.React);
local v3 = require(script.Parent.LuaAppNavigationContext);
local v4 = require(script.Parent.EnumScreens);
local v5 = require(l_Parent_0.Loggers).Logger:new(script.Name);
local v6 = require(l_script_FirstAncestor_0.Analytics.EventNames);
local v7 = require(l_script_FirstAncestor_0.Analytics.useAnalytics);
local v8 = require(l_script_FirstAncestor_0.Flags.getFFlagEnableUnfilteredThreadsUI);
local v9 = require(l_script_FirstAncestor_0.Conversations.Thunks.OpenUnfilteredThreadsLearnMoreLink);
generateNavigateToGroups = function(v10, v11)
    return function()
        if v11 then
            v11();
        end;
        if v10 == nil then
            return ;
        else
            local v12 = v10[v4.Groups];
            if not v12 then
                v5:warning("Groups page was not set in navigateToLuaAppPages");
                return ;
            else
                v5:info("Navigate To Groups from App Chat");
                v12();
                return ;
            end;
        end;
    end;
end;
local function _(v13)
    return function()
        if v8() then
            if v13 then
                v13(v9());
                return ;
            else
                return ;
            end;
        else
            return ;
        end;
    end;
end;
LuaAppNavigationContextProvider = function(v15)
    local v16 = v2.useRef(function()
    end);
    local v17 = v7();
    if v17 then
        v16.current = function()
            v17.fireAnalyticsEvent(v6.ChatLandingGroupsBtnClicked);
        end;
    end;
    local l_createElement_0 = v2.createElement;
    local l_Provider_0 = v3.Provider;
    local v20 = {};
    local v21 = {
        navigateToGroups = generateNavigateToGroups(v15.navigateToLuaAppPages, v16.current)
    };
    local l_dispatch_0 = v15.dispatch;
    v21.navigateToUnfilteredThreadsLearnMore = function()
        if v8() then
            if l_dispatch_0 then
                l_dispatch_0(v9());
                return ;
            else
                return ;
            end;
        else
            return ;
        end;
    end;
    v20.value = v21;
    return l_createElement_0(l_Provider_0, v20, v15.children);
end;
return LuaAppNavigationContextProvider;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local l_MockId_0 = require(l_Parent_0.UnitTestHelpers).MockId;
local l_OrderedMap_0 = require(l_Parent_0.AppCommonLib).OrderedMap;
local v4 = require(l_script_FirstAncestor_0.Constants);
local l_DateTime_0 = require(l_Parent_0.Time).DateTime;
local l_Players_0 = game:GetService("Players");
local function v8(v7)
    return v7.id;
end;
local function v11(v9, v10)
    return v9.sent:GetUnixTimestamp() < v10.sent:GetUnixTimestamp();
end;
local function v14(v12, v13)
    return v12.order < v13.order;
end;
local v15 = {
    Type = {
        MULTI_USER_CONVERSATION = "MultiUserConversation",
        ONE_TO_ONE_CONVERSATION = "OneToOneConversation"
    }
};
v15.IdForFakeOneOnOne = function(v16)
    local l_ONE_TO_ONE_CONVERSATION_0 = v15.Type.ONE_TO_ONE_CONVERSATION;
    table.sort(v16);
    for _, v19 in ipairs(v16) do
        l_ONE_TO_ONE_CONVERSATION_0 = l_ONE_TO_ONE_CONVERSATION_0 .. "-" .. tostring(v19);
    end;
    return l_ONE_TO_ONE_CONVERSATION_0;
end;
v15.new = function()
    return {};
end;
v15.fromUser = function(v20)
    local v21 = v15.new();
    v21.messages = l_OrderedMap_0.new(v8, v11);
    v21.sendingMessages = l_OrderedMap_0.new(v8, v14);
    v21.clientId = l_MockId_0();
    v21.initiator = nil;
    v21.hasUnreadMessages = false;
    v21.conversationType = v15.Type.ONE_TO_ONE_CONVERSATION;
    v21.participants = {
        tostring(l_Players_0.LocalPlayer.UserId),
        v20.id
    };
    v21.usersTyping = {};
    v21.isUserLeaving = false;
    v21.fetchingOlderMessages = false;
    v21.fetchedOldestMessage = false;
    v21.serverState = v4.ServerState.NONE;
    v21.id = v15.IdForFakeOneOnOne(v21.participants);
    v21.lastUpdated = nil;
    v21.isDefaultTitle = true;
    v21.title = v20.displayName or v20.name;
    return v21;
end;
v15.empty = function(v22)
    local v23 = v15.new();
    v23.id = "-1";
    v23.messages = l_OrderedMap_0.new(v8, v11);
    v23.sendingMessages = l_OrderedMap_0.new(v8, v14);
    v23.title = "";
    v23.initiator = "0";
    v23.hasUnreadMessages = false;
    v23.conversationType = v15.Type.MULTI_USER_CONVERSATION;
    v23.participants = {};
    v23.usersTyping = {};
    v23.isUserLeaving = false;
    v23.fetchingOlderMessages = false;
    v23.serverState = v4.ServerState.NONE;
    v23.pinnedGame = {};
    v23.lastUpdated = l_DateTime_0.now();
    v23.isDefaultTitle = true;
    if v22 ~= nil then
        for v24, v25 in pairs(v22) do
            v23[v24] = v25;
        end;
    end;
    return v23;
end;
v15.fromWeb = function(v26, v27)
    local v28 = v15.new();
    v28.messages = l_OrderedMap_0.new(v8, v11);
    v28.sendingMessages = l_OrderedMap_0.new(v8, v14);
    v28.id = tostring(v26.id);
    v28.clientId = v27 or l_MockId_0();
    v28.title = v26.title;
    v28.initiator = tostring(v26.initiator.targetId);
    v28.hasUnreadMessages = v26.hasUnreadMessages;
    v28.conversationType = v26.conversationType;
    v28.participants = {};
    v28.usersTyping = {};
    v28.isUserLeaving = false;
    v28.fetchingOlderMessages = false;
    v28.serverState = v4.ServerState.CREATED;
    v28.pinnedGame = {};
    if v26.conversationUniverse ~= nil then
        v28.pinnedGame.universeId = tostring(v26.conversationUniverse.universeId);
        v28.pinnedGame.rootPlaceId = tostring(v26.conversationUniverse.rootPlaceId);
    end;
    v28.lastUpdated = l_DateTime_0.fromIsoDate(v26.lastUpdated);
    v28.titleForViewer = v26.conversationTitle.titleForViewer;
    v28.isDefaultTitle = v26.conversationTitle.isDefaultTitle;
    for _, v30 in ipairs(v26.participants) do
        table.insert(v28.participants, (tostring(v30.targetId)));
    end;
    return v28;
end;
return v15;


local l_Players_0 = game:GetService("Players");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local l_DateTime_0 = require(l_Parent_0.Time).DateTime;
local l_MockId_0 = require(l_Parent_0.UnitTestHelpers).MockId;
local v5 = require(l_script_FirstAncestor_0.Flags.getFFlagEnableUnfilteredThreadsUI);
local v6 = require(l_script_FirstAncestor_0.Flags.getFFlagEnableChatSystemMessages);
local v8 = {
    new = function(v7)
        return {
            universeId = tostring(v7)
        };
    end
};
local v9 = {
    SenderTypes = {
        User = "user",
        System = "system",
        UnknownType = "unknown_type"
    },
    MessageTypes = {
        PlainText = "PlainText",
        Link = "Link",
        System = "System"
    },
    LinkTypes = {
        Game = "Game"
    },
    ModerationTypes = {
        TrustedComms = "trusted_comms",
        Moderated = "moderated",
        Invalid = "invalid",
        UnknownType = "unknown_type"
    }
};
v9.new = function(v10)
    v9.__index = v9;
    local v11 = v10 or {};
    setmetatable(v11, v9);
    return v11;
end;
v9.fromWeb = function(v12, v13, v14)
    if v9.DoRequiredFieldsPresent(v12) then
        local v15 = v9.new();
        v15.id = v12.id;
        v15.senderTargetId = tostring(v12.senderTargetId);
        v15.senderType = v12.senderType;
        v15.read = v12.read;
        v15.sent = l_DateTime_0.fromIsoDate(v12.sent);
        v15.conversationId = tostring(v13);
        v15.previousMessageId = v14;
        v15.filteredForReceivers = false;
        v15:parseContentWeb(v12);
        return v15;
    else
        return nil;
    end;
end;
v9.fromSentWeb = function(v16, v17)
    if v9.DoRequiredFieldsPresentForSent(v16) then
        local v18 = v9.new();
        v18.id = v16.messageId;
        v18.senderTargetId = tostring(l_Players_0.LocalPlayer.UserId);
        v18.senderType = "User";
        v18.read = true;
        v18.sent = l_DateTime_0.fromIsoDate(v16.sent);
        v18.conversationId = tostring(v17);
        v18.previousMessageId = "";
        v18.filteredForReceivers = v16.filteredForReceivers;
        v18:parseContentSentWeb(v16);
        return v18;
    else
        return nil;
    end;
end;
v9.newSendingId = function()
    return "sending-message-" .. l_MockId_0();
end;
v9.newSending = function(v19)
    assert(v19, "props argument is missing");
    assert(v19.id, "props.id argument is missing");
    assert(v19.messageType, "props.messageType argument is missing");
    assert(v19.order, "props.order argument is missing");
    assert(v19.conversationId, "props.conversationId argument is missing");
    assert(v19.sent, "props.sent argument is missing");
    local v20 = v9.new(v19);
    v20.senderTargetId = tostring(l_Players_0.LocalPlayer.UserId);
    v20.senderType = v9.SenderTypes.User;
    v20.moderated = false;
    v20.failed = false;
    return v20;
end;
v9.DoRequiredFieldsPresent = function(v21)
    return (((v21 and v21.id) and v21.messageType) and v21.senderTargetId) and v21.sent;
end;
v9.DoRequiredFieldsPresentForSent = function(v22)
    return ((v22 and v22.messageId) and v22.messageType) and v22.sent;
end;
v9.parseContentWeb = function(v23, v24)
    v23:parseContent(v24);
    if not (not (not (not (v24.messageType == v9.MessageTypes.Link) or not v24.link) and v24.link.type == v9.LinkTypes.Game) or not v24.link.game) then
        v23.gameLink = v8.new(v24.link.game.universeId);
    end;
end;
v9.parseContentSentWeb = function(v25, v26)
    v25:parseContent(v26);
    if v26.messageType == v9.MessageTypes.Link and v26.chatMessageLinkType == v9.LinkTypes.Game then
        v25.gameLink = v8.new(v26.universeId);
    end;
end;
v9.parseContent = function(v27, v28)
    v27.messageType = v28.messageType;
    if v28.messageType == v9.MessageTypes.PlainText then
        v27.content = v28.content;
        return ;
    else
        v27.content = nil;
        return ;
    end;
end;
v9.fromChannelsApi = function(v29, v30, v31)
    if v9.DoRequiredFieldsPresentFromChannelsApi(v29) then
        local v32 = v9.new();
        if not v6() then
            v32.id = v29.id;
            v32.senderTargetId = tostring(v29.sender_user_id);
            v32.senderType = v9.SenderTypes.User;
            v32.read = true;
            v32.sent = l_DateTime_0.fromIsoDate(v29.created_at);
            v32.conversationId = tostring(v30);
            v32.previousMessageId = v31;
            v32.filteredForReceivers = false;
            if v5() then
                v32.moderationType = v29.moderation_type;
            end;
            v32:parseContentFromChannelsApi(v29);
        else
            v32.id = v29.id;
            v32.read = true;
            v32.sent = l_DateTime_0.fromIsoDate(v29.created_at);
            v32.conversationId = tostring(v30);
            v32.previousMessageId = v31;
            v32.filteredForReceivers = false;
            v32.content = v29.content;
            if v29.type == v9.SenderTypes.User then
                v32:serializeForUserMessage(v29);
                return v32;
            elseif v29.type == v9.SenderTypes.System then
                v32:serializeForSystemMessage(v29);
                return v32;
            end;
        end;
        return v32;
    else
        return nil;
    end;
end;
v9.serializeForUserMessage = function(v33, v34)
    v33.senderTargetId = tostring(v34.sender_user_id);
    v33.senderType = v9.SenderTypes.User;
    if v5() then
        v33.moderationType = v34.moderation_type;
    end;
    v33.messageType = v9.MessageTypes.PlainText;
end;
v9.serializeForSystemMessage = function(v35, _)
    v35.senderType = v9.SenderTypes.System;
    v35.messageType = v9.MessageTypes.System;
end;
v9.DoRequiredFieldsPresentFromChannelsApi = function(v37)
    if not v6() then
        return ((v37 and v37.id) and v37.sender_user_id) and v37.created_at;
    elseif v37 then
        if v37.type == v9.SenderTypes.User then
            return (v37.id and v37.sender_user_id) and v37.created_at;
        elseif v37.type == v9.SenderTypes.System then
            return v37.id and v37.created_at;
        else
            return false;
        end;
    else
        return false;
    end;
end;
v9.parseContentFromChannelsApi = function(v38, v39)
    v38.messageType = v9.MessageTypes.PlainText;
    v38.content = v39.content;
end;
v9.fromSentChannelsApi = function(v40, v41)
    if v9.DoRequiredFieldsPresentForSentFromChannelsApi(v40) then
        local v42 = v9.new();
        v42.id = v40.messages[1].id;
        v42.senderTargetId = tostring(v40.messages[1].sender_user_id);
        v42.senderType = v9.SenderTypes.User;
        v42.read = true;
        v42.sent = l_DateTime_0.fromIsoDate(v40.messages[1].created_at);
        v42.conversationId = tostring(v41);
        v42.previousMessageId = "";
        if v5() then
            v42.moderationType = v40.messages[1].moderation_type;
        end;
        v42.filteredForReceivers = false;
        v42.messageType = v9.MessageTypes.PlainText;
        v42.content = v40.messages[1].content;
        return v42;
    else
        return nil;
    end;
end;
v9.DoRequiredFieldsPresentForSentFromChannelsApi = function(v43)
    local l_v43_0 = v43;
    if l_v43_0 then
        l_v43_0 = v43.messages;
        if l_v43_0 then
            l_v43_0 = false;
            if #v43.messages > 0 then
                l_v43_0 = v43.messages[1].id and v43.messages[1].created_at;
            end;
        end;
    end;
    return l_v43_0;
end;
return v9;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local l_MockId_0 = require(l_Parent_0.UnitTestHelpers).MockId;
local l_OrderedMap_0 = require(l_Parent_0.AppCommonLib).OrderedMap;
local v4 = require(l_script_FirstAncestor_0.Constants);
local l_DateTime_0 = require(l_Parent_0.Time).DateTime;
local v6 = require(script.Parent.Conversation);
local function v8(v7)
    return v7.id;
end;
local function v11(v9, v10)
    return v9.sent:GetUnixTimestamp() < v10.sent:GetUnixTimestamp();
end;
local function v14(v12, v13)
    return v12.order < v13.order;
end;
local v15 = {};
v15.__index = v15;
v15.mock = function(v16)
    local v17 = v6.new();
    v17.messages = l_OrderedMap_0.new(v8, v11);
    v17.sendingMessages = l_OrderedMap_0.new(v8, v14);
    v17.id = l_MockId_0();
    v17.clientId = l_MockId_0();
    v17.title = "";
    v17.initiator = l_MockId_0();
    v17.hasUnreadMessages = false;
    v17.conversationType = v6.Type.MULTI_USER_CONVERSATION;
    v17.participants = {};
    v17.usersTyping = {};
    v17.isUserLeaving = false;
    v17.fetchingOlderMessages = false;
    v17.fetchedOldestMessage = false;
    v17.serverState = v4.ServerState.NONE;
    v17.pinnedGame = {};
    v17.pinnedGame.universeId = l_MockId_0();
    v17.pinnedGame.rootPlaceId = l_MockId_0();
    v17.lastUpdated = l_DateTime_0.now();
    v17.titleForViewer = "title";
    v17.isDefaultTitle = true;
    if v16 ~= nil then
        for v18, v19 in pairs(v16) do
            v17[v18] = v19;
        end;
    end;
    setmetatable(v17, {
        __index = v6
    });
    return v17;
end;
return v15;


local l_Parent_0 = script:FindFirstAncestor("AppChat").Parent;
local l_DateTime_0 = require(l_Parent_0.Time).DateTime;
local l_MockId_0 = require(l_Parent_0.UnitTestHelpers).MockId;
local v3 = require(script.Parent.MessageModel);
local v8 = {
    mock = function(v4)
        local v5 = v3.new();
        v5.id = l_MockId_0();
        v5.senderTargetId = l_MockId_0();
        v5.conversationId = l_MockId_0();
        v5.senderType = v3.SenderTypes.User;
        v5.content = "MESSAGE CONTENT";
        v5.messageType = v3.MessageTypes.PlainText;
        v5.read = false;
        v5.sent = l_DateTime_0.now();
        v5.previousMessageId = nil;
        v5.filteredForReceivers = false;
        if v4 ~= nil then
            for v6, v7 in pairs(v4) do
                v5[v6] = v7;
            end;
        end;
        return v5;
    end
};
setmetatable(v8, {
    __index = v3
});
return v8;


return {
    MessageModel = require(script.MessageModel),
    MockMessageModel = require(script.MockMessageModel),
    Conversation = require(script.Conversation),
    MockConversation = require(script.MockConversation)
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.RoactNavigation);
local v3 = require(l_script_FirstAncestor_0.EnumScreens);
local v4 = require(l_script_FirstAncestor_0.Components.ChatLanding.ChatLandingScreen);
local v5 = require(l_script_FirstAncestor_0.Components.ChatConversation.ChatConversationScreen);
local v6 = require(l_script_FirstAncestor_0.Components.ChatDetails.ChatDetailsScreen);
local v7 = require(l_script_FirstAncestor_0.Components.CreateNewChat.CreateNewChatScreen);
local v8 = require(l_script_FirstAncestor_0.Components.EditChatMembers.EditChatMembersScreen);
local l_default_0 = require(l_Parent_0.SocialCommon).Experiments.NewChatTabExperimentation.default;
return (v2.createRobloxStackNavigator({
    {
        [v3.ChatLanding] = {
            screen = v4,
            navigationOptions = if not not l_default_0.isEnabled() and l_default_0:getConnectTabLeadsToChatTab() then {
                isRoot = true,
                backButtonEnabled = false,
                tabBarVisible = true
            } else {
                isRoot = true
            }
        }
    },
    {
        [v3.ChatConversation] = {
            screen = v5,
            navigationOptions = if not require(l_script_FirstAncestor_0.Flags.getFFlagDisableAppChatConversationAbsorbInputLayerAndroid)() then {
                backButtonEnabled = true,
                tabBarVisible = false,
                lockIconEnabled = true
            } else {
                backButtonEnabled = true,
                tabBarVisible = false,
                lockIconEnabled = true,
                absorbInput = false
            }
        }
    },
    {
        [v3.ChatDetails] = {
            screen = v6,
            navigationOptions = {
                backButtonEnabled = true,
                tabBarVisible = false
            }
        }
    },
    {
        [v3.CreateNewChat] = {
            screen = v7,
            navigationOptions = {
                backButtonEnabled = true,
                tabBarVisible = false
            }
        }
    },
    {
        [v3.EditChatMembers] = {
            screen = v8,
            navigationOptions = {
                backButtonEnabled = true,
                tabBarVisible = false
            }
        }
    }
}));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.Roact);
local v3 = require(l_Parent_0.RoactNavigation);
local l_ChatDetails_0 = l_script_FirstAncestor_0.Components.ChatDetails;
local v5 = require(l_ChatDetails_0.Dialogs.GenericDialogType);
local v6 = require(l_ChatDetails_0.EditChatGroupNameDialog.EditChatGroupNameDialogScreen);
local v7 = require(l_ChatDetails_0.LeaveGroupDialog.LeaveGroupDialogScreen);
local v8 = require(l_ChatDetails_0.ParticipantDialog.ParticipantDialogScreen);
local v9 = require(l_ChatDetails_0.RemoveUserDialog.RemoveUserDialogScreen);
local v10 = require(l_ChatDetails_0.UnfilteredThreads.CreateUnfilteredChatDialogScreen);
local v11 = require(l_script_FirstAncestor_0.configureTopBarWithNavigationOptions);
local v12 = require(script.Parent.chatLandingStackNavigator);
local v13 = require(l_script_FirstAncestor_0.Flags.getFFlagEnableUnfilteredThreadsUI);
local v14 = v2.Component:extend("ChatLandingStackNavigatorConnector");
v14.router = v12.router;
v14.render = function(v15)
    return v2.createFragment({
        layout = v2.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder
        }),
        topBar = v11(v15.props.navigation),
        navigator = v2.createElement(v12, v15.props)
    });
end;
local v16 = {
    {
        ChatLandingStack = v14
    },
    {
        [v5.EditChatGroupNameDialog] = {
            screen = v6,
            navigationOptions = {
                backButtonEnabled = true,
                overlayEnabled = true,
                renderUnderlyingPage = true
            }
        }
    },
    {
        [v5.LeaveGroupDialog] = {
            screen = v7,
            navigationOptions = {
                backButtonEnabled = true,
                overlayEnabled = true,
                renderUnderlyingPage = true
            }
        }
    },
    {
        [v5.ParticipantDialog] = {
            screen = v8,
            navigationOptions = {
                backButtonEnabled = true,
                overlayEnabled = true,
                renderUnderlyingPage = true
            }
        }
    },
    {
        [v5.RemoveUserDialog] = {
            screen = v9,
            navigationOptions = {
                backButtonEnabled = true,
                overlayEnabled = true,
                renderUnderlyingPage = true
            }
        }
    }
};
if v13() then
    table.insert(v16, {
        [v5.CreateUnfilteredChatDialog] = {
            screen = v10,
            navigationOptions = {
                backButtonEnabled = true,
                overlayEnabled = true,
                renderUnderlyingPage = true
            }
        }
    });
end;
return v3.createRobloxStackNavigator(v16, {
    mode = v3.StackPresentationStyle.Overlay
});


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.Roact);
local v3 = require(l_Parent_0.RoactNavigation);
local v4 = require(l_script_FirstAncestor_0.EnumScreens);
local v5 = require(l_script_FirstAncestor_0.Components.Toast.ToastScreen);
local v6 = require(script.Parent.chatLandingWithDialogsNavigator);
local v7 = v2.Component:extend("ChatLandingWithDialogsNavigatorConnector");
v7.router = v6.router;
v7.render = function(v8)
    return v2.createElement(v6, v8.props);
end;
return v3.createRobloxStackNavigator({
    {
        ChatLandingWithDialogs = v7
    },
    {
        [v4.RoactChatToast] = {
            screen = v5,
            navigationOptions = {
                overlayEnabled = true,
                overlayTransparency = 1,
                absorbInput = false,
                renderUnderlyingPage = true
            }
        }
    }
}, {
    mode = v3.StackPresentationStyle.Overlay
});


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local _ = require(l_script_FirstAncestor_0.types);
local v3 = require(l_Parent_0.Cryo);
local l_memoize_0 = require(l_Parent_0.AppCommonLib).memoize;
local v5 = require(l_Parent_0.React);
local l_useStyle_0 = require(l_Parent_0.UIBlox).Core.Style.useStyle;
local v7 = require(l_script_FirstAncestor_0.configureTopBarWithNavigationOptions);
local v8 = require(script.Parent.conversationStackNavigator);
local v9 = {
    configureTopBar = v7,
    createNewNavigator = v8
};
ConversationStackNavigatorConnector = function(v10)
    local v11 = v3.Dictionary.join(v9, v10);
    return v5.createElement(v5.Fragment, nil, {
        layout = v5.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder
        }),
        topBar = v11.configureTopBar(v11.navigation),
        navigator = v5.createElement(l_memoize_0(function(v12)
            local v13 = v11.createNewNavigator({
                cardColor3 = v12
            });
            v11.setRouter(v13.router);
            return v13;
        end)(l_useStyle_0().Theme.BackgroundDefault.Color), v11)
    });
end;
local v14 = v5.PureComponent:extend("ConversationStackNavigatorConnectorWrapper");
v14.router = v8().router;
v14.render = function(v15)
    return v5.createElement(ConversationStackNavigatorConnector, v3.Dictionary.join(v15.props, {
        setRouter = function(v16)
            v14.router = v16;
        end
    }));
end;
return v14;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.RoactNavigation);
local v3 = require(l_script_FirstAncestor_0.EnumScreens);
local v4 = require(l_script_FirstAncestor_0.Components.ChatLanding.ChatLandingScreenWithSwitchNavigator);
local v5 = require(l_script_FirstAncestor_0.Components.CreateNewChat.CreateNewChatScreen);
local v6 = require(l_script_FirstAncestor_0.Components.EditChatMembers.EditChatMembersScreen);
local v7 = require(script:FindFirstAncestor("Navigators").createOverlayTopBarStackNavigator);
local l_default_0 = require(l_Parent_0.SocialCommon).Experiments.NewChatTabExperimentation.default;
local function _(v9, v10)
    return v7({
        {
            [v9] = v10
        }
    });
end;
local v12 = {
    backButtonEnabled = true,
    tabBarVisible = true,
    overlayEnabled = true,
    overlayTransparency = 0.5,
    absorbInput = true,
    renderUnderlyingPage = false
};
return v2.createRobloxStackNavigator({
    {
        [v3.ChatLanding] = {
            screen = v4,
            navigationOptions = if not not l_default_0.isEnabled() and l_default_0:getConnectTabLeadsToChatTab() then {
                backButtonEnabled = false,
                tabBarVisible = true
            } else {}
        }
    },
    {
        CreateNewChatScreenWrapper = {
            screen = v7({
                {
                    [v3.CreateNewChat] = v5
                }
            }),
            navigationOptions = v12
        }
    },
    {
        EditChatMembersScreenWrapper = {
            screen = v7({
                {
                    [v3.EditChatMembers] = v6
                }
            }),
            navigationOptions = v12
        }
    }
}, {
    mode = v2.StackPresentationStyle.Overlay
});


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.Roact);
local v3 = require(l_Parent_0.RoactNavigation);
local l_ChatDetails_0 = l_script_FirstAncestor_0.Components.ChatDetails;
local v5 = require(l_ChatDetails_0.Dialogs.GenericDialogType);
local v6 = require(l_ChatDetails_0.EditChatGroupNameDialog.EditChatGroupNameDialogScreen);
local v7 = require(l_ChatDetails_0.LeaveGroupDialog.LeaveGroupDialogScreen);
local v8 = require(l_ChatDetails_0.ParticipantDialog.ParticipantDialogScreen);
local v9 = require(l_ChatDetails_0.RemoveUserDialog.RemoveUserDialogScreen);
local v10 = require(l_ChatDetails_0.UnfilteredThreads.CreateUnfilteredChatDialogScreen);
local v11 = require(l_script_FirstAncestor_0.Flags.getFFlagEnableUnfilteredThreadsUI);
local v12 = require(script.Parent.chatLandingStackNavigator);
local v13 = v2.Component:extend("ChatLandingStackNavigatorConnector");
v13.router = v12.router;
v13.render = function(v14)
    return v2.createElement(v12, v14.props);
end;
local v15 = {
    {
        ChatLandingStack = v13
    },
    {
        [v5.EditChatGroupNameDialog] = {
            screen = v6,
            navigationOptions = {
                backButtonEnabled = true,
                overlayEnabled = true,
                renderUnderlyingPage = true
            }
        }
    },
    {
        [v5.LeaveGroupDialog] = {
            screen = v7,
            navigationOptions = {
                backButtonEnabled = true,
                overlayEnabled = true,
                renderUnderlyingPage = true
            }
        }
    },
    {
        [v5.ParticipantDialog] = {
            screen = v8,
            navigationOptions = {
                backButtonEnabled = true,
                overlayEnabled = true,
                renderUnderlyingPage = true
            }
        }
    },
    {
        [v5.RemoveUserDialog] = {
            screen = v9,
            navigationOptions = {
                backButtonEnabled = true,
                overlayEnabled = true,
                renderUnderlyingPage = true
            }
        }
    }
};
if v11() then
    table.insert(v15, {
        [v5.CreateUnfilteredChatDialog] = {
            screen = v10,
            navigationOptions = {
                backButtonEnabled = true,
                overlayEnabled = true,
                renderUnderlyingPage = true
            }
        }
    });
end;
return v3.createRobloxStackNavigator(v15, {
    mode = v3.StackPresentationStyle.Overlay
});


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.RoactNavigation);
local v3 = require(l_Parent_0.Cryo);
local v4 = require(l_script_FirstAncestor_0.EnumScreens);
local v5 = require(l_script_FirstAncestor_0.Components.ChatConversation.ChatConversationScreen);
local v6 = require(l_script_FirstAncestor_0.Components.ChatDetails.ChatDetailsScreen);
return function(v7)
    return v2.createRobloxStackNavigator({
        {
            [v4.ChatConversation] = {
                screen = v5,
                navigationOptions = v3.Dictionary.join({
                    backButtonEnabled = false,
                    isRoot = true,
                    lockIconEnabled = true
                }, v7 or {})
            }
        },
        {
            [v4.ChatDetails] = {
                screen = v6,
                navigationOptions = v3.Dictionary.join({
                    backButtonEnabled = true
                }, v7 or {})
            }
        }
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
return (require(l_script_FirstAncestor_0.Parent.RoactNavigation).createRobloxSwitchNavigator({
    {
        [require(l_script_FirstAncestor_0.EnumScreens).EmptyConversation] = {
            screen = require(l_script_FirstAncestor_0.Components.ChatConversation.EmptyConversationScreen),
            navigationOptions = {
                headerText = {
                    raw = "testing",
                    shouldLocalize = false
                },
                backButtonEnabled = false,
                isRoot = true
            }
        }
    },
    {
        ConversationStackNavigator = require(script.Parent.ConversationStackNavigatorConnector)
    }
}));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.React);
local v3 = require(l_Parent_0.RoactNavigation);
local l_useStyle_0 = require(l_Parent_0.UIBlox).Core.Style.useStyle;
local v5 = require(l_script_FirstAncestor_0.configureTopBarWithNavigationOptions);
local v6 = UDim2.new(1, -360, 1, -72);
local function _(v7)
    return function(v8)
        return v2.createElement("ImageLabel", {
            AnchorPoint = Vector2.new(0.5, 0.5),
            BackgroundTransparency = 1,
            ClipsDescendants = true,
            Position = UDim2.new(0.5, 0, 0.5, 0),
            Size = v6,
            Image = "rbxasset://textures/ui/LuaChat/9-slice/modal.png",
            ImageColor3 = l_useStyle_0().Theme.BackgroundUIDefault.Color,
            ScaleType = Enum.ScaleType.Slice,
            SliceCenter = Rect.new(Vector2.new(5, 5), Vector2.new(6, 6))
        }, {
            padding = v2.createElement("UIPadding", {
                PaddingBottom = UDim.new(0, 2.5),
                PaddingLeft = UDim.new(0, 2.5),
                PaddingRight = UDim.new(0, 2.5),
                PaddingTop = UDim.new(0, 2.5)
            }),
            layout = v2.createElement("UIListLayout", {
                SortOrder = Enum.SortOrder.LayoutOrder
            }),
            topBar = v5(v8.navigation),
            overlayContent = v2.createElement(v7, v8)
        });
    end;
end;
return function(v10)
    local v11 = v3.createRobloxStackNavigator(v10);
    local v12 = v2.PureComponent:extend("OverlayNavigatorConnector");
    v12.router = v11.router;
    local function v14(v13)
        return v2.createElement("ImageLabel", {
            AnchorPoint = Vector2.new(0.5, 0.5),
            BackgroundTransparency = 1,
            ClipsDescendants = true,
            Position = UDim2.new(0.5, 0, 0.5, 0),
            Size = v6,
            Image = "rbxasset://textures/ui/LuaChat/9-slice/modal.png",
            ImageColor3 = l_useStyle_0().Theme.BackgroundUIDefault.Color,
            ScaleType = Enum.ScaleType.Slice,
            SliceCenter = Rect.new(Vector2.new(5, 5), Vector2.new(6, 6))
        }, {
            padding = v2.createElement("UIPadding", {
                PaddingBottom = UDim.new(0, 2.5),
                PaddingLeft = UDim.new(0, 2.5),
                PaddingRight = UDim.new(0, 2.5),
                PaddingTop = UDim.new(0, 2.5)
            }),
            layout = v2.createElement("UIListLayout", {
                SortOrder = Enum.SortOrder.LayoutOrder
            }),
            topBar = v5(v13.navigation),
            overlayContent = v2.createElement(v11, v13)
        });
    end;
    v12.render = function(v15)
        return v2.createElement(v14, v15.props);
    end;
    return v12;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.Roact);
local v3 = require(l_Parent_0.UIBlox);
local v4 = require(l_script_FirstAncestor_0.SocialLibraries);
local v5 = require(l_Parent_0.Cryo);
local v6 = require(l_script_FirstAncestor_0.EnumScreens);
local v7 = require(l_script_FirstAncestor_0.Components.ChatDetails.Dialogs.GenericDialogType);
local v8 = require(l_script_FirstAncestor_0.createChatTopBar);
local l_ModalBottomSheet_0 = v3.ModalBottomSheet;
local l_Warning_0 = v4.Components.AlertViews.Warning;
local function v12(v11)
    return v2.createElement("TextButton", {
        AnchorPoint = v11.AnchorPoint or Vector2.new(0.5, 0),
        BackgroundColor3 = Color3.new(1, 1, 1),
        Font = Enum.Font.Gotham,
        LayoutOrder = v11.LayoutOrder or 1,
        Size = v11.Size or UDim2.new(0, 200, 0, 30),
        Position = v11.Position or UDim2.new(0, 0, 0, 0),
        Text = v11.Text,
        TextColor3 = Color3.new(0, 0, 0),
        TextSize = 18,
        [v2.Event.Activated] = v11.onActivated
    });
end;
return {
    ChatLanding = function(v13)
        local l_navigation_0 = v13.navigation;
        return v2.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundColor3 = Color3.new(1, 1, 0),
            BorderSizePixel = 0
        }, {
            ChatTopBar = v8(v5.Dictionary.join(v13, {
                backButtonDisabled = true,
                barHeight = l_navigation_0.getScreenProps("topBarHeight", 0),
                headerText = "Chat"
            })),
            CreateNewChat = v2.createElement(v12, {
                Position = UDim2.new(0.5, 0, 0, 90),
                Text = "CreateNewChat",
                onActivated = function()
                    l_navigation_0.navigate(v6.CreateNewChat);
                end
            }),
            ChatConversation1 = v2.createElement(v12, {
                Position = UDim2.new(0.5, 0, 0, 150),
                Text = "ChatConversation123",
                onActivated = function()
                    l_navigation_0.navigate(v6.ChatConversation, {
                        conversationId = 123
                    });
                end
            }),
            ChatConversation2 = v2.createElement(v12, {
                Position = UDim2.new(0.5, 0, 0, 180),
                Text = "ChatConversation456",
                onActivated = function()
                    l_navigation_0.navigate(v6.ChatConversation, {
                        conversationId = 456
                    });
                end
            }),
            EmptyConversation = l_navigation_0.getScreenProps("wideMode", false) and v2.createElement(v12, {
                Position = UDim2.new(0.5, 0, 0, 220),
                Text = "Empty Conv",
                onActivated = function()
                    l_navigation_0.navigate("EmptyConversation");
                end
            })
        });
    end,
    CreateNewChat = function(v15)
        local l_navigation_1 = v15.navigation;
        local v17 = l_navigation_1.getScreenProps("wideMode", false);
        return v2.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundColor3 = Color3.new(0, 1, 0),
            BorderSizePixel = 0
        }, {
            ChatTopBar = v8(v5.Dictionary.join(v15, {
                barHeight = l_navigation_1.getScreenProps("topBarHeight", 0),
                headerText = "CreateNewChat"
            })),
            ChatConversation = v2.createElement(v12, {
                Position = UDim2.new(0.5, 0, 0, 120),
                Text = "ChatConversation123",
                onActivated = function()
                    if not v17 then
                        l_navigation_1.replace(v6.ChatConversation, {
                            conversationId = 123
                        });
                        return ;
                    else
                        l_navigation_1.navigate(v6.ChatConversation, {
                            conversationId = 123
                        });
                        return ;
                    end;
                end
            })
        });
    end,
    EmptyConversation = function(v18)
        return v2.createElement("TextLabel", {
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundColor3 = Color3.new(1, 0, 0),
            BorderSizePixel = 0,
            Font = Enum.Font.Gotham,
            Text = "Empty Conversation page",
            TextColor3 = Color3.new(0, 0, 0),
            TextSize = 18
        }, {
            ChatTopBar = v8(v5.Dictionary.join(v18, {
                backButtonDisabled = true,
                barHeight = v18.navigation.getScreenProps("topBarHeight", 0),
                headerText = "No Title"
            }))
        });
    end,
    ChatConversation = function(v19)
        local l_navigation_2 = v19.navigation;
        local v21 = l_navigation_2.getParam("conversationId", 0);
        return v2.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundColor3 = Color3.new(1, 0, 0),
            BorderSizePixel = 0
        }, {
            ChatTopBar = v8(v5.Dictionary.join(v19, {
                backButtonDisabled = l_navigation_2.getScreenProps("wideMode", false),
                barHeight = l_navigation_2.getScreenProps("topBarHeight", 0),
                headerText = "Conversation" .. tostring(v21)
            })),
            ChatDetails = v2.createElement(v12, {
                Position = UDim2.new(0.5, 0, 0, 120),
                Text = "ChatDetails",
                onActivated = function()
                    l_navigation_2.navigate(v6.ChatDetails, {
                        conversationId = v21
                    });
                end
            })
        });
    end,
    ChatDetails = function(v22)
        local l_navigation_3 = v22.navigation;
        local v24 = l_navigation_3.getParam("conversationId", 0);
        return v2.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundColor3 = Color3.new(0, 0, 1),
            BorderSizePixel = 0
        }, {
            ChatTopBar = v8(v5.Dictionary.join(v22, {
                barHeight = l_navigation_3.getScreenProps("topBarHeight", 0),
                headerText = "ChatDetails" .. v24
            })),
            EditChatMembers = v2.createElement(v12, {
                Position = UDim2.new(0.5, 0, 0, 120),
                Text = "EditChatMembers",
                onActivated = function()
                    l_navigation_3.push(v6.EditChatMembers, {
                        conversationId = v24
                    });
                end
            })
        });
    end,
    EditChatMembers = function(v25)
        local l_navigation_4 = v25.navigation;
        local v27 = l_navigation_4.getParam("conversationId", 0);
        return v2.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundColor3 = Color3.new(0, 1, 1),
            BorderSizePixel = 0
        }, {
            ChatTopBar = v8(v5.Dictionary.join(v25, {
                barHeight = l_navigation_4.getScreenProps("topBarHeight", 0),
                headerText = "EditChatMembers"
            })),
            ChatConversation = v2.createElement(v12, {
                Position = UDim2.new(0.5, 0, 0, 120),
                Text = "Back To Conversation",
                onActivated = function()
                    l_navigation_4.navigate(v6.ChatConversation, {
                        conversationId = v27
                    });
                end
            })
        });
    end,
    ChatDetailsWithModals = function(v28)
        local l_navigation_5 = v28.navigation;
        return v2.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundColor3 = Color3.new(0, 0, 1),
            BorderSizePixel = 0
        }, {
            UIListLayout = v2.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Vertical,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                Padding = UDim.new(0, 10),
                SortOrder = Enum.SortOrder.LayoutOrder
            }),
            ChatTopBar = v8(v5.Dictionary.join(v28, {
                backButtonDisabled = true,
                barHeight = l_navigation_5.getScreenProps("topBarHeight", 0),
                contentHeight = l_navigation_5.getScreenProps("contentHeight", 0),
                headerText = "ChatDetails",
                LayoutOrder = 0
            })),
            EditChatGroupName = v2.createElement(v12, {
                LayoutOrder = 1,
                Text = "EditChatGroupName",
                onActivated = function()
                    l_navigation_5.navigate(v7.EditChatGroupNameDialog);
                end
            }),
            LeaveGroup = v2.createElement(v12, {
                LayoutOrder = 2,
                Text = "LeaveGroup",
                onActivated = function()
                    l_navigation_5.navigate(v7.LeaveGroupDialog);
                end
            }),
            RemoveUser = v2.createElement(v12, {
                LayoutOrder = 3,
                Text = "RemoveUser",
                onActivated = function()
                    l_navigation_5.navigate(v7.RemoveUserDialog);
                end
            }),
            ModalBottomSheet = v2.createElement(v12, {
                LayoutOrder = 4,
                Text = "ModalBottomSheet",
                onActivated = function()
                    l_navigation_5.navigate(v7.ParticipantDialog);
                end
            })
        });
    end,
    EditChatGroupNameDialog = function(v30)
        return v2.createElement(l_Warning_0, {
            titleText = "EditChatGroupName",
            bodyText = "Change to new name?",
            onModalClose = function()
                v30.navigation.goBack();
            end
        });
    end,
    LeaveGroupDialog = function(v31)
        return v2.createElement(l_Warning_0, {
            titleText = "LeaveGroup",
            bodyText = "Leave group?",
            onModalClose = function()
                v31.navigation.goBack();
            end
        });
    end,
    ParticipantDialog = function(v32)
        return v2.createElement(l_ModalBottomSheet_0, {
            bottomGap = 10,
            onDismiss = function()
                v32.navigation.goBack();
            end,
            buttonModels = {
                {
                    text = "ViewProfile",
                    onActivated = function()
                        v32.navigation.replace("Webview");
                    end
                },
                {
                    text = "ReportUser",
                    onActivated = function()
                        v32.navigation.replace("Webview");
                    end
                },
                {
                    text = "RemoveUser",
                    onActivated = function()
                        v32.navigation.replace(v7.RemoveUserDialog);
                    end
                },
                {
                    text = "Cancel",
                    onActivated = function()
                    end
                }
            },
            screenWidth = 400,
            showImages = false
        });
    end,
    RemoveUserDialog = function(v33)
        return v2.createElement(l_Warning_0, {
            titleText = "RemoveUser",
            bodyText = "Remove user?",
            onModalClose = function()
                v33.navigation.goBack();
            end
        });
    end,
    Webview = function(v34)
        return v2.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, 0),
            BackgroundColor3 = Color3.new(0, 0, 1),
            BorderSizePixel = 0
        }, {
            BackButton = v2.createElement(v12, {
                AnchorPoint = Vector2.new(0, 0),
                Text = "Back",
                onActivated = function()
                    v34.navigation.goBack();
                end
            })
        });
    end
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local v1 = require(l_script_FirstAncestor_0.Parent.UnitTestHelpers);
local l_mountFrame_0 = v1.mountFrame;
local l_mountStyledFrame_0 = v1.mountStyledFrame;
local v4 = require(l_script_FirstAncestor_0.LegacyAnalytics.Mock.mockAnalytics);
local v5 = require(script.Parent.mockApolloProvider);
local v6 = require(script.Parent.mockTopBar);
return {
    mountFrameWithApollo = function(v7, v8)
        return l_mountFrame_0(v5(v4(v7)), v8);
    end,
    mountFrame = l_mountFrame_0,
    mountStyledFrame = function(v9, v10)
        return l_mountStyledFrame_0(v4(v9), v10);
    end,
    mountFrameWithAnalytics = function(v11, v12)
        return l_mountFrame_0(v4(v11), v12);
    end,
    mountFrameWithTopBar = function(v13, v14)
        return l_mountFrame_0(v5(v4(v6(v13))), v14);
    end
};


local l_Mock_0 = require(script:FindFirstAncestor("AppChat").Parent.LuaSocialLibrariesDeps).Mock;
return function(v1)
    local v2 = l_Mock_0.MagicMock.new();
    v2.id = v1.title;
    v2.title = v1.title;
    v2.participants = v1.participants or {};
    v2.lastUpdated = {
        GetShortRelativeTime = function()
            return v1.shortRelativeTime or "0";
        end,
        GetLongRelativeTime = function()
            return v1.longRelativeTime or "0";
        end,
        GetUnixTimestamp = function()
            return v1.unixTime or 0;
        end
    };
    v2.serverState = "CREATED";
    v2.messages = v1.messages;
    v2.isDefaultTitle = if v1.isDefaultTitle ~= nil then v1.isDefaultTitle else false;
    return v2;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local v1 = require(l_script_FirstAncestor_0.Components.ChatConversation.EnumMessageTypes);
local v2 = require(l_script_FirstAncestor_0.Models.MessageModel);
return function(v3, v4)
    local v5 = {};
    for v6 = 1, v4 do
        local v7 = v3.messageIdPrefix .. tostring(v6);
        table.insert(v5, {
            messageId = v7,
            content = v3.content or "Message " .. v7,
            isIncoming = v3.isIncoming or false,
            messageType = v3.type or v1.PlainText,
            sender = v6 == v4 and v3.sender or {},
            gameLink = v3.gameLink or nil,
            sent = v3.sent or nil,
            read = v3.read or nil,
            senderType = v3.senderType or v2.SenderTypes.User
        });
    end;
    return v5;
end;


local l_MockUser_0 = require(script:FindFirstAncestor("AppChat").Parent.UserLib).Models.MockUser;
return function(v1)
    local v2 = l_MockUser_0.new();
    v2.name = v1.name;
    v2.displayName = v1.displayName;
    v2.id = v1.id;
    v2.isFriend = v1.isFriend or true;
    return v2;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.RoactNavigation);
local v3 = require(l_Parent_0.Roact);
local l_mountFrameWithTopBar_0 = require(l_script_FirstAncestor_0.Tests.MountFrameHelpers).mountFrameWithTopBar;
local v5 = require(l_script_FirstAncestor_0.TopBarContext);
local v6 = require(l_script_FirstAncestor_0.configureTopBarWithNavigationOptions);
local v7 = require(l_script_FirstAncestor_0.getRoactChatStackNavigator);
return function(v8, v9)
    local v10 = v2.createRobloxStackNavigator(v9.navigator);
    local v11 = v3.Component:extend("testNavigatorConnector");
    v11.router = v10.router;
    v11.render = function(v12)
        return v3.createFragment({
            layout = v3.createElement("UIListLayout", {
                SortOrder = Enum.SortOrder.LayoutOrder
            }),
            testButton = v3.createElement("TextButton", {
                LayoutOrder = -2,
                Size = UDim2.new(0, 100, 0, 20),
                Text = "test button",
                [v3.Event.Activated] = function()
                    v12.props.navigation.navigate(v9.testRoute, v9.testRouteParams);
                end
            }),
            topBar = v6(v12.props.navigation),
            testNavigator = v3.createElement(v10, v12.props)
        });
    end;
    local v13 = v2.createAppContainer(v7(v11));
    local v15 = v3.createElement(v5.Consumer, {
        render = function(v14)
            return v3.createElement(v13, {
                screenProps = {
                    topBarHeight = 64,
                    getScreenTopBar = v14.getScreenTopBar,
                    setScreenTopBar = v14.setScreenTopBar
                }
            });
        end
    });
    local l_ScreenGui_0 = Instance.new("ScreenGui");
    l_ScreenGui_0.Parent = game:GetService("CoreGui");
    l_ScreenGui_0.ZIndexBehavior = Enum.ZIndexBehavior.Sibling;
    local v17, v18 = l_mountFrameWithTopBar_0(v15, {
        store = v8,
        parent = l_ScreenGui_0
    });
    return v17, v18;
end;


return {
    ChatConversationHeaderGroupDetails = true,
    ChatHeaderSearch = true,
    ChatHeaderCreateChatGroup = true,
    ChatHeaderHomeButton = true,
    ChatHeaderNotifications = true,
    ChatPlayTogether = true,
    ChatShareGameToChatFromChat = true,
    ChatTapConversationThumbnail = true,
    ChatReportingDisabled = false,
    ChatViewProfileOption = true
};


local v0 = require(script:FindFirstAncestor("AppChat").Http.RoduxNetworking);
return function(v1)
    local v2 = v0.getNetworkImpl();
    v0.setNetworkImpl(v1);
    return function()
        v0.setNetworkImpl(v2);
    end;
end;


local l_Parent_0 = script:FindFirstAncestor("AppChat").Parent;
local v1 = require(l_Parent_0.React);
local v2 = require(l_Parent_0.UserProfiles);
local v3 = require(l_Parent_0.ApolloClient);
local l_mockApolloClient_0 = require(l_Parent_0.GraphQLServer).ApolloClientTestUtils.mockApolloClient;
return function(v5)
    local v6 = l_mockApolloClient_0({});
    v2.TestUtils.writeProfileDataToCache(v6, {
        ["1989"] = {
            combinedName = "Test Primary Name",
            alias = "Test Primary Name",
            contactName = "Test Contact Name",
            displayName = "Test Display Name",
            username = "username"
        },
        ["1969"] = {
            combinedName = "OrangeClement",
            alias = "OrangeClement",
            contactName = "Test Contact Name",
            displayName = "ClementOrange",
            username = "username"
        }
    });
    return v1.createElement(v3.ApolloProvider, {
        client = v6
    }, {
        AnalyticsElement = v5
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.ArgCheck);
local v3 = require(l_Parent_0.Cryo);
local v4 = require(l_Parent_0.Roact);
local v5 = require(l_script_FirstAncestor_0.TopBarContext);
local v6 = v4.Component:extend("MockTopBarProvider");
v6.init = function(v7)
    v7.state = {
        topBar = {}
    };
    v7.getScreenTopBar = function(v8)
        v2.isType(v8, "string", "screen");
        return v7.state.topBar[v8] or {};
    end;
    v7.setScreenTopBar = function(v9, v10)
        v2.isType(v9, "string", "screen");
        v2.isType(v10, "table", "state");
        v7:setState(function(v11)
            return {
                topBar = v3.Dictionary.join(v11.topBar, {
                    [v9] = v3.Dictionary.join(v11.topBar[v9] or {}, v10)
                })
            };
        end);
    end;
end;
v6.render = function(v12)
    return v4.createElement(v5.Provider, {
        value = v3.Dictionary.join(v12.state.topBar, {
            getScreenTopBar = v12.getScreenTopBar,
            setScreenTopBar = v12.setScreenTopBar
        })
    }, {
        Element = v12.props[v4.Children]
    });
end;
return function(v13)
    return v4.createElement(v6, {}, v13);
end;


local l_Parent_0 = script:FindFirstAncestor("AppChat").Parent;
local l_RoactFitComponents_0 = require(l_Parent_0.LuaSocialLibrariesDeps).RoactFitComponents;
local v2 = require(l_Parent_0.Roact);
local v3 = v2.PureComponent:extend("ThreeSectionBar");
v3.Rect = l_RoactFitComponents_0.Rect;
v3.defaultProps = {
    marginLeft = v3.Rect.square(0),
    marginRight = v3.Rect.square(0),
    contentPaddingLeft = UDim.new(0, 0),
    contentPaddingRight = UDim.new(0, 0),
    height = UDim.new(0, 0)
};
v3.init = function(v4)
    local v5, v6 = v2.createBinding(0);
    v4.leftWidth = v5;
    v4.updateLeftWidth = v6;
    v5, v6 = v2.createBinding(0);
    v4.rightWidth = v5;
    v4.updateRightWidth = v6;
    v5, v6 = v2.createBinding(0);
    v4.fullWidth = v5;
    v4.updateFullWidth = v6;
end;
v3.render = function(v7)
    return v2.createElement("Frame", {
        Size = UDim2.new(UDim.new(1, 0), v7.props.height),
        LayoutOrder = v7.props.LayoutOrder,
        [v2.Change.AbsoluteSize] = function(v8)
            v7.updateFullWidth(v8.AbsoluteSize.X);
        end
    }, {
        leftFrame = v2.createElement(l_RoactFitComponents_0.FitFrameHorizontal, {
            Transparency = 1,
            AnchorPoint = Vector2.new(0, 0),
            Position = UDim2.fromScale(0, 0),
            minimumSize = UDim.new(0, 0),
            height = UDim.new(1, 0),
            FillDirection = Enum.FillDirection.Horizontal,
            contentPadding = v7.props.contentPaddingLeft,
            margin = v7.props.marginLeft,
            [v2.Change.AbsoluteSize] = function(v9)
                v7.updateLeftWidth(v9.AbsoluteSize.X);
            end
        }, {
            leftContent = v7.props.renderLeft(v7.props)
        }),
        centerFrame = v2.createElement("Frame", {
            AnchorPoint = Vector2.new(0.5, 0),
            Position = UDim2.fromScale(0.5, 0),
            Size = v2.joinBindings({
                v7.leftWidth,
                v7.rightWidth,
                v7.fullWidth
            }):map(function(v10)
                return UDim2.new(0, (Vector2.new(v10[3] / 2, 0) - Vector2.new(math.max(v10[1], v10[2]), 0)).Magnitude * 2, 1, 0);
            end)
        }, {
            ["$layout"] = v2.createElement("UIListLayout", {
                HorizontalAlignment = Enum.HorizontalAlignment.Center
            }),
            centerContent = v7.props.renderCenter(v7.props)
        }),
        rightFrame = v2.createElement(l_RoactFitComponents_0.FitFrameHorizontal, {
            AnchorPoint = Vector2.new(1, 0),
            Position = UDim2.fromScale(1, 0),
            minimumSize = UDim.new(0, 0),
            height = UDim.new(1, 0),
            FillDirection = Enum.FillDirection.Horizontal,
            contentPadding = v7.props.contentPaddingRight,
            margin = v7.props.marginRight,
            [v2.Change.AbsoluteSize] = function(v11)
                v7.updateRightWidth(v11.AbsoluteSize.X);
            end
        }, {
            rightContent = v7.props.renderRight(v7.props)
        })
    });
end;
return v3;


local l_Parent_0 = script:FindFirstAncestor("AppChat").Parent;
local v1 = require(l_Parent_0.Cryo);
local l_getStandardSizeAvatarHeadShotRbxthumb_0 = require(l_Parent_0.UserLib).Utils.getStandardSizeAvatarHeadShotRbxthumb;
return function(v3)
    return v1.List.map(v3, function(v4)
        return l_getStandardSizeAvatarHeadShotRbxthumb_0((tostring(v4)));
    end);
end;


return {
    getThumbnailsForUserIds = require(script.getThumbnailsForUserIds),
    populateUserWithState = require(script.populateUserWithState),
    userPresenceUtils = require(script.userPresenceUtils)
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local v1 = require(l_script_FirstAncestor_0.Parent.Cryo);
local l_getUserDisplayName_0 = require(l_script_FirstAncestor_0.SocialLibraries).User.getUserDisplayName;
local v3 = require(script.Parent.getThumbnailsForUserIds);
local v4 = require(l_script_FirstAncestor_0.Http.RoduxPresence);
local v5 = require(script.Parent.userPresenceUtils);
return function(v6, v7, v8)
    local v9 = v5.getUserDisplayPresence(v4.Selectors.getUserPresenceByUserId(v6, v7.id), v7.id == v6.LocalUserId);
    return v1.Dictionary.join(v7, {
        isLocalUser = v6.LocalUserId == v7.id,
        displayName = if not v8 then l_getUserDisplayName_0(v6, v7) else v8.names.combinedName,
        presenceText = v9.text,
        presenceImage = v9.image,
        thumbnail = v3({
            v7.id
        })[1]
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local l_PresenceType_0 = require(l_script_FirstAncestor_0.Http.RoduxPresence).Enums.PresenceType;
local v3 = require(l_Parent_0.UIBlox).App.ImageSet.Images["component_assets/circle_25"];
local v4 = {
    [l_PresenceType_0.Offline] = "Common.Presence.Label.Offline",
    [l_PresenceType_0.Online] = "Common.Presence.Label.Online",
    [l_PresenceType_0.InGame] = "",
    [l_PresenceType_0.InStudio] = ""
};
local v5 = {
    [l_PresenceType_0.Offline] = "",
    [l_PresenceType_0.Online] = v3,
    [l_PresenceType_0.InGame] = v3,
    [l_PresenceType_0.InStudio] = v3
};
return {
    getUserDisplayPresence = function(v6, v7)
        if v6 then
            local v8, v9, v10;
            if v7 then
                v8 = {
                    text = v4[l_PresenceType_0.Online],
                    image = v5[l_PresenceType_0.Online]
                };
                if v8 then
                    goto label0;
                end;
            end;
            v8 = {};
            v9 = v6.userPresenceType;
            v10 = v6.lastLocation;
            v8.text = if v9 == l_PresenceType_0.Offline then v4[l_PresenceType_0.Offline] else if v9 == l_PresenceType_0.Online then v4[l_PresenceType_0.Online] else if not (v9 ~= l_PresenceType_0.InGame) or v9 == l_PresenceType_0.InStudio then if v10 then tostring(v10) else v4[l_PresenceType_0.Online] else "";
            v8.image = v5[v6.userPresenceType];
            ::label0::;
            return v8;
        else
            return {
                text = ""
            };
        end;
    end,
    getUserPresenceText = function(v11)
        local l_userPresenceType_0 = v11.userPresenceType;
        local l_lastLocation_0 = v11.lastLocation;
        if l_userPresenceType_0 == l_PresenceType_0.Offline then
            return v4[l_PresenceType_0.Offline];
        elseif l_userPresenceType_0 == l_PresenceType_0.Online then
            return v4[l_PresenceType_0.Online];
        elseif not (l_userPresenceType_0 ~= l_PresenceType_0.InGame) or l_userPresenceType_0 == l_PresenceType_0.InStudio then
            if not l_lastLocation_0 then
                return v4[l_PresenceType_0.Online];
            else
                return (tostring(l_lastLocation_0));
            end;
        else
            return "";
        end;
    end,
    userPresenceImage = v5,
    userPresenceText = v4
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_script_FirstAncestor_0.Models.Conversation);
local l_Immutable_0 = require(l_Parent_0.AppCommonLib).Immutable;
return function(v4, v5)
    if v5.conversationType == v2.Type.ONE_TO_ONE_CONVERSATION then
        local v6 = v2.IdForFakeOneOnOne(v5.participants);
        if v4[v6] ~= nil then
            v4 = l_Immutable_0.Set(v4, v6, nil);
        end;
    end;
    if v4[v5.id] then
        return v4;
    else
        return l_Immutable_0.Set(v4, v5.id, v5);
    end;
end;


return {
    addConversation = require(script.addConversation),
    reportToDiagByCountryCode = require(script.reportToDiagByCountryCode),
    updateConversation = require(script.updateConversation)
};


local l_Players_0 = game:GetService("Players");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Analytics_0 = require(l_script_FirstAncestor_0.Parent.Analytics).Analytics;
local l_RbxAnalyticsService_0 = game:GetService("RbxAnalyticsService");
local v4 = require(l_script_FirstAncestor_0.LegacyAnalytics.RoactChatAnalytics);
local v5 = require(l_script_FirstAncestor_0.Components.ChatConversation.Utils.filterForLinksWithPolicy);
local v6 = require(l_script_FirstAncestor_0.Components.ChatConversation.EnumMessageTypes);
return function(v7, v8, v9)
    local v10 = nil;
    v10 = v9 or v4.new(l_Analytics_0.new(l_RbxAnalyticsService_0), (tostring(l_Players_0.LocalPlayer.UserId)));
    if v7.messageType == v6.PlainText then
        for _, v12 in pairs(v5(v7)) do
            if v12.messageType == v6.Link then
                v10:loadGameLinkCardInChat(v8, v12.placeId);
            end;
        end;
        return ;
    else
        if v7.messageType == v6.Link then
            v10:loadGameLinkCardInChat(v8, v7.gameLink.universeId);
        end;
        return ;
    end;
end;


local l_ReportToDiagByCountryCode_0 = require(script:FindFirstAncestor("AppChat").Parent.Analytics).ReportToDiagByCountryCode;
local v1 = tonumber(settings():GetFVariable("PercentReportingByCountryCode")) or 0;
return function(v2, v3, v4)
    l_ReportToDiagByCountryCode_0(v2, v3, v4 * 1000, v1);
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Immutable_0 = require(l_script_FirstAncestor_0.Parent.AppCommonLib).Immutable;
local v2 = require(l_script_FirstAncestor_0.Conversations.hasSameParticipants);
local v3 = require(script.Parent.addConversation);
local v4 = require(l_script_FirstAncestor_0.Flags.getFFlagEnableUnfilteredThreadsUI);
return function(v5, v6)
    local v7 = v5[v6.id];
    if v7 then
        if v6.title ~= v7.title then
            local v8 = l_Immutable_0.JoinDictionaries(v7, {
                lastUpdated = v6.lastUpdated,
                title = v6.title,
                isDefaultTitle = v6.isDefaultTitle
            });
            v5 = l_Immutable_0.Set(v5, v6.id, v8);
            if v4() then
                v7 = v8;
            end;
        end;
        if not v2({
            existing = v7.participants,
            new = v6.participants
        }) then
            local v9 = l_Immutable_0.JoinDictionaries(v7, {
                participants = v6.participants,
                lastUpdated = v6.lastUpdated,
                title = v6.title
            });
            v5 = l_Immutable_0.Set(v5, v6.id, v9);
            if v4() then
                v7 = v9;
            end;
        end;
        if not (not v6.hasUnreadMessages or v7.hasUnreadMessages) then
            local v10 = l_Immutable_0.JoinDictionaries(v7, {
                hasUnreadMessages = true,
                lastUpdated = v6.lastUpdated
            });
            v5 = l_Immutable_0.Set(v5, v6.id, v10);
            if v4() then
                v7 = v10;
            end;
        end;
        if v4() then
            if v7.moderationType ~= v6.moderationType then
                local v11 = l_Immutable_0.JoinDictionaries(v7, {
                    moderationType = v6.moderationType,
                    lastUpdated = v6.lastUpdated
                });
                v5 = l_Immutable_0.Set(v5, v6.id, v11);
                v7 = v11;
            end;
            if v7.userPendingStatus ~= v6.userPendingStatus then
                local v12 = l_Immutable_0.JoinDictionaries(v7, {
                    userPendingStatus = v6.userPendingStatus,
                    lastUpdated = v6.lastUpdated
                });
                v5 = l_Immutable_0.Set(v5, v6.id, v12);
                v7 = v12;
            end;
        end;
        return v5;
    else
        return v3(v5, v6);
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.ArgCheck);
local v3 = require(l_Parent_0.Cryo);
local v4 = require(l_Parent_0.Roact);
local v5 = require(l_Parent_0.RoactNavigation);
local v6 = require(l_script_FirstAncestor_0.createChatTopBar);
local v7 = require(l_script_FirstAncestor_0.TopBarContext);
return function(v8)
    local v9 = v5.getActiveChildNavigationOptions(v8);
    return v4.createElement(v7.Consumer, {
        render = function(v10)
            local l_state_0 = v8.state;
            local v12 = v10.getScreenTopBar(l_state_0.routes[l_state_0.index].routeName);
            v2.isType(v12, "table", "screenTopBar");
            return v6(v3.Dictionary.join(v12, v9, {
                navigation = v8
            }));
        end
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_script_FirstAncestor_0.EnumScreens);
local v3 = require(l_Parent_0.Roact);
local l_withLocalization_0 = require(l_Parent_0.Localization).withLocalization;
local v5 = require(l_Parent_0.UIBlox);
local l_withStyle_0 = v5.Style.withStyle;
local l_ImageSetLabel_0 = v5.Core.ImageSet.ImageSetLabel;
local l_getEnableCommunicationsContactConsent_0 = require(l_Parent_0.CommunicationsContactConsent).getEnableCommunicationsContactConsent;
local v9 = game:DefineFastFlag("EnableAppChatTopBarRootTitleFontFix2", false);
local l_GetFFlagUIBloxUseNewHeaderBar_0 = require(l_Parent_0.SharedFlags).UIBlox.GetFFlagUIBloxUseNewHeaderBar;
local l_HeaderBar_0 = v5.App.Bar.HeaderBar;
local v12 = require(l_Parent_0.AppHeaderBar);
local function v13()
    return nil;
end;
return function(v14)
    local v15 = v14.navigation.getScreenProps("navigateToRootStack", nil);
    local v16 = v14.shouldRenderCenter and v14.renderCenter ~= nil;
    local v17 = v14.headerText or {};
    local v18 = if not l_GetFFlagUIBloxUseNewHeaderBar_0() then l_HeaderBar_0.renderLeft.backButton else v12.makeBackButton;
    return l_withLocalization_0({
        headerText = not not v17.shouldLocalize and v17.raw or nil
    })(function(v19)
        local v20 = not not v17.shouldLocalize and v19.headerText or v17.raw;
        local v21 = nil;
        local v22 = nil;
        local v23 = nil;
        if not v16 then
            v21 = function()
                return not not v14.renderRight and v14.renderRight() or nil;
            end;
            v22 = nil;
            if not l_getEnableCommunicationsContactConsent_0() then
                v23 = if not v15 then not not v14.backButtonEnabled and v18(function()
                    v14.navigation.pop();
                end) or v13 else not not v14.backButtonEnabled and v18(function()
                    if v14.closeInputBar then
                        v14.closeInputBar();
                    end;
                    if not v14.isRoot then
                        v14.navigation.pop();
                        return ;
                    else
                        v14.navigation.navigate(v2.EmptyConversation);
                        v15();
                        return ;
                    end;
                end) or v13;
            else
                local v24 = if not v14.backButtonEnabled then nil else v3.createElement("Frame", {
                    AutomaticSize = Enum.AutomaticSize.XY,
                    BackgroundTransparency = 1,
                    LayoutOrder = 1
                }, {
                    BackButton = v3.createElement(v18(not v15 and function()
                        v14.navigation.pop();
                    end or function()
                        if v14.closeInputBar then
                            v14.closeInputBar();
                        end;
                        if not v14.isRoot then
                            v14.navigation.pop();
                            return ;
                        else
                            v14.navigation.navigate(v2.EmptyConversation);
                            v15();
                            return ;
                        end;
                    end))
                });
                local v26 = if not not v14.lockIconEnabled and v14.isPrivateConversation then l_withStyle_0(function(v25)
                    return v3.createElement(l_ImageSetLabel_0, {
                        Size = UDim2.fromOffset(v25.Tokens.Semantic.Icon.Size.Medium, v25.Tokens.Semantic.Icon.Size.Medium),
                        BackgroundTransparency = 1,
                        Image = v5.App.ImageSet.Images["icons/graphic/lock_xxlarge"],
                        ImageColor3 = v25.Theme.SystemPrimaryDefault.Color,
                        ImageTransparency = v25.Theme.SystemPrimaryDefault.Transparency,
                        LayoutOrder = 2
                    });
                end) else nil;
                v23 = (v24 or v26) and function(_)
                    return v3.createElement("Frame", {
                        BackgroundTransparency = 1,
                        Size = UDim2.new(0, 72, 1, 0)
                    }, {
                        UIListLayout = v3.createElement("UIListLayout", {
                            FillDirection = Enum.FillDirection.Horizontal,
                            SortOrder = Enum.SortOrder.LayoutOrder,
                            VerticalAlignment = Enum.VerticalAlignment.Center
                        }),
                        BackButton = v24,
                        LockIcon = v26
                    });
                end or v13;
            end;
        else
            v20 = "";
            v21 = nil;
            v23 = nil;
            v22 = v14.renderCenter;
        end;
        local v28 = not v14.backButtonEnabled and not v16;
        if not (not v9 or not v14.shouldBoldHeader) and v23 == v13 then
            v23 = nil;
        end;
        if not v15 then
            return v3.createElement("Frame", {
                BackgroundTransparency = 1,
                Size = UDim2.new(1, 0, 0, 56),
                LayoutOrder = -1
            }, {
                headerBar = v3.createElement(l_HeaderBar_0, {
                    title = v20 or "",
                    barHeight = 56,
                    renderLeft = not v28 and v23 or nil,
                    renderCenter = not v28 and v22 or nil,
                    renderRight = v21
                })
            });
        else
            return v3.createElement("Frame", {
                BackgroundTransparency = 1,
                Size = UDim2.new(1, 0, 0, 56),
                LayoutOrder = -1
            }, {
                headerBar = v3.createElement(l_HeaderBar_0, {
                    title = v20 or "",
                    barHeight = 56,
                    renderLeft = v23,
                    renderCenter = v22,
                    renderRight = v21
                })
            });
        end;
    end);
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_script_FirstAncestor_0.EnumScreens);
local v3 = require(l_Parent_0.Roact);
local v4 = require(l_Parent_0.RoactNavigation);
local _ = require(l_script_FirstAncestor_0.types);
local v6 = game:DefineFastFlag("AppChatExitResetActiveConversation", false);
local v7 = require(l_script_FirstAncestor_0.Flags.getFFlagEnableAppChatTabBarVisibilityPrevention);
local v8 = require(l_script_FirstAncestor_0.Flags.getFFlagEnableNewChatTabExperimentAndroidBackButtonFix);
local function v9(v10)
    local v11 = v10.routes and v10.routes[v10.index];
    if not v11 then
        return v10.params;
    else
        return v9(v11);
    end;
end;
local function v12(v13)
    local l_state_0 = v13.state;
    local v15 = l_state_0.routes and l_state_0.routes[l_state_0.index];
    if not v15 or not v15.routes then
        return v4.getActiveChildNavigationOptions(v13);
    else
        return v12((v13.getChildNavigation(v15.key)));
    end;
end;
local function _(v16)
    if not v16 then
        return nil;
    elseif not v16.conversation then
        return v16.conversationId;
    else
        return v16.conversation.id;
    end;
end;
return function(v18, v19, v20, v21)
    local v22 = v3.PureComponent:extend("RoactChatStackNavigator");
    v22.defaultProps = {
        navigation = nil,
        parameters = nil,
        setActiveConversationId = function()
        end,
        setBackButtonEnabled = function()
        end,
        setTabBarVisible = function()
        end,
        notificationCount = 0
    };
    v22.init = function(v23)
        v23.backButtonConnection = nil;
        v23.onBackButtonPressed = function()
            local l_navigation_0 = v23.props.navigation;
            local l_state_1 = l_navigation_0.state;
            local v26 = l_state_1.routes and l_state_1.routes[l_state_1.index];
            local v27 = if not not v26 and v26.routes then v12((l_navigation_0.getChildNavigation(v26.key))) else v4.getActiveChildNavigationOptions(l_navigation_0);
            if not v19 or not v27.isRoot then
                v23.props.navigation.pop();
            else
                v23.props.navigation.navigate(v2.EmptyConversation);
                v19();
                if not ((not v8() or not v21) or not v23.props.chatIsVisible) then
                    v21.showExitDialog();
                    return ;
                end;
            end;
        end;
    end;
    v22.willUpdate = function(v28, v29)
        local l_state_2 = v28.props.navigation.state;
        local v31 = l_state_2.routes and l_state_2.routes[l_state_2.index];
        local v32 = if not v31 then l_state_2.params else v9(v31);
        local l_state_3 = v29.navigation.state;
        local v34 = l_state_3.routes and l_state_3.routes[l_state_3.index];
        l_state_2 = if not v34 then l_state_3.params else v9(v34);
        l_state_3 = if not v32 then nil else if v32.conversation then v32.conversation.id else v32.conversationId;
        v31 = if not l_state_2 then nil else if l_state_2.conversation then l_state_2.conversation.id else l_state_2.conversationId;
        if l_state_3 ~= v31 then
            v28.props.setActiveConversationId(v31);
        end;
        if not v7() or v29.chatIsVisible then
            local l_navigation_1 = v29.navigation;
            local l_state_4 = l_navigation_1.state;
            local v37 = l_state_4.routes and l_state_4.routes[l_state_4.index];
            v34 = if not not v37 and v37.routes then v12((l_navigation_1.getChildNavigation(v37.key))) else v4.getActiveChildNavigationOptions(l_navigation_1);
            if v34 then
                if v34.backButtonEnabled ~= nil then
                    v28.props.setBackButtonEnabled(v34.backButtonEnabled);
                end;
                if v34.tabBarVisible ~= nil then
                    v28.props.setTabBarVisible(v34.tabBarVisible);
                end;
            end;
            return ;
        else
            return ;
        end;
    end;
    v22.didMount = function(v38)
        if not (not v20 or not v19) then
            v38.backButtonConnection = v20:connect(v38.onBackButtonPressed);
        end;
        local l_parameters_0 = v38.props.parameters;
        local v40 = l_parameters_0 and l_parameters_0.conversationId;
        if v40 then
            v38.props.navigation.navigate(v2.ChatConversation, {
                conversationId = v40
            });
        end;
    end;
    v22.willUnmount = function(v41)
        if v6 then
            v41.props.setActiveConversationId(nil);
        end;
        if v41.backButtonConnection then
            v41.backButtonConnection:disconnect();
        end;
    end;
    v22.render = function(v42)
        return v3.createElement(v18, {
            navigation = v42.props.navigation
        });
    end;
    v22.router = v18.router;
    return v22;
end;


return {
    Actions = require(script.Actions),
    Analytics = require(script.Analytics),
    App = require(script.App),
    Components = require(script.Components),
    Constants = require(script.Constants),
    Conversations = require(script.Conversations),
    EntryPoint = require(script.AppChatEntryPoint),
    EntryPointUA = require(script.AppChatEntryPointUA),
    Flags = require(script.Flags),
    Http = require(script.Http),
    installReducer = require(script.installReducer),
    Models = require(script.Models),
    Screens = require(script.EnumScreens),
    Users = require(script.Users),
    Utils = require(script.Utils),
    LegacyAnalytics = require(script.LegacyAnalytics),
    ["jest.config"] = script["jest.config"]
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
return require(l_script_FirstAncestor_0.Parent.Rodux).createReducer(false, {
    [require(l_script_FirstAncestor_0.Actions.SetAppLoaded).name] = function(_, v2)
        return v2.value;
    end
});


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.Cryo);
return require(l_Parent_0.Rodux).createReducer({
    screen = nil,
    params = nil,
    requestId = 0,
    completedRequestId = 0
}, {
    [require(l_script_FirstAncestor_0.Actions.NavigateIntoChat).name] = function(v3, v4)
        return v2.Dictionary.join(v3, {
            screen = v4.screen,
            params = v4.params,
            requestId = v3.requestId + 1
        });
    end,
    [require(l_script_FirstAncestor_0.Actions.CompleteExternalNavigationIntoChat).name] = function(v5, v6)
        return v2.Dictionary.join(v5, {
            completedRequestId = v6.requestId
        });
    end
});


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.Rodux);
local _ = require(l_Parent_0.SocialCommon);
return v2.createReducer("NotSet", {
    [require(l_script_FirstAncestor_0.Actions.EnteredChatFromEntryPoint).name] = function(_, v5)
        return v5.entryPoint;
    end
});


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_llama_0 = require(l_script_FirstAncestor_0.Parent.LuaSocialLibrariesDeps).llama;
local v2 = require(l_script_FirstAncestor_0.Http.RoduxPresence);
local v3 = {
    "OFFLINE",
    "ONLINE",
    "IN_GAME",
    "IN_STUDIO"
};
local function v5(v4)
    return v2.Actions.ReceivedUserPresence((v2.Models.Presence.new(l_llama_0.Dictionary.join(v4, {
        presence = l_llama_0.None,
        userPresenceType = (table.find(v3, v4.presence) or 1) - 1,
        gameInstanceId = l_llama_0.None,
        gameId = v4.gameInstanceId,
        lastOnline = not not DateTime.now() and DateTime.fromUnixTimestamp(v4.lastOnline or 0):ToIsoDate() or "1970-01-01T00:00:00Z"
    }))));
end;
local v7 = {
    ReceivedUserPresence = function(v6)
        if not v6.payload then
            return {
                v5(v6)
            };
        else
            return v6;
        end;
    end
};
local v8 = v2.installReducer();
return function(v9, v10)
    v9 = v9 or {
        byUserId = {},
        byGameId = {},
        byGameInstanceId = {},
        byPlaceId = {}
    };
    local v11 = {
        v10
    };
    local v12 = v7[v10.type];
    if v12 then
        v11 = v12(v10);
    end;
    return l_llama_0.List.reduce(v11, v8, v9);
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local v1 = require(l_script_FirstAncestor_0.Parent.Rodux);
local v2 = require(l_script_FirstAncestor_0.Actions.ToggleChatPaused);
if not game:DefineFastFlag("LuaAppChatTabBarVisibilityFix", false) then
    return v1.createReducer(true, {
        [v2.name] = function(_, v4)
            return v4.value;
        end
    });
else
    return v1.createReducer(false, {});
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.Rodux);
local v3 = require(l_script_FirstAncestor_0.Flags.getFFlagEnableUnfilteredThreadsUI);
return function()
    return v2.combineReducers({
        PlaceInfos = require(l_Parent_0.PlaceInfoRodux).Reducers.PlaceInfosReducer,
        PlaceInfosAsync = require(l_Parent_0.PlaceInfoRodux).Reducers.PlaceInfosAsyncReducer,
        Aliases = require(script.Aliases),
        AppLoaded = require(l_script_FirstAncestor_0.installReducer.AppLoaded),
        ChatSettings = require(l_script_FirstAncestor_0.installReducer.ChatSettings),
        Conversations = require(l_script_FirstAncestor_0.installReducer.Conversations),
        ConversationsAsync = require(l_script_FirstAncestor_0.installReducer.ConversationsAsync),
        ExternalNavigationRequest = require(l_script_FirstAncestor_0.installReducer.ExternalNavigationRequest),
        LastEntryPoint = require(script.LastEntryPoint),
        Presence = require(script.Presence),
        ToggleChatPaused = require(l_script_FirstAncestor_0.installReducer.ToggleChatPaused),
        networkStatus = require(l_script_FirstAncestor_0.Http.RoduxNetworking).installReducer(),
        UnfilteredThreads = if not v3() then nil else require(l_script_FirstAncestor_0.installReducer.UnfilteredThreads)
    });
end;


local v0 = require(game:GetService("CorePackages").Workspace.Packages.JestConfigs);
return {
    displayName = "AppChat",
    testMatch = {
        "**/*.test"
    },
    setupFilesAfterEnv = {
        v0.setupFiles.UIBloxInitializer,
        v0.setupFiles.createPromiseRejectionHandler(),
        script.Parent.setupJest,
        script.Parent.setupLogger
    }
};


return function(v0, _)
    return {
        localUserId = v0.LocalUserId,
        globalGuiInset = v0.GlobalGuiInset
    };
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChat");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local l_Logger_0 = require(l_Parent_0.Loggers).Logger;
local l_beforeAll_0 = require(l_Parent_0.Dev.JestGlobals).beforeAll;
local v4 = require(l_script_FirstAncestor_0.Logger);
l_beforeAll_0(function()
    v4:setParent(l_Logger_0);
end);


local l_Parent_0 = script:FindFirstAncestor("AppChat").Parent;
local _ = require(l_Parent_0.LuauPolyfill);
local _ = require(l_Parent_0.SocialCommon);
return {};


local l_HttpService_0 = game:GetService("HttpService");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChatNetworking");
local v2 = require(l_script_FirstAncestor_0.Parent.LuauPolyfill);
local v3 = require(l_script_FirstAncestor_0.url.CHAT_PLATFORM_BASE_URL);
return function(v4, v5, v6, v7)
    return v4(("%*/v1/create-conversations"):format(v3), "POST", {
        postBody = l_HttpService_0:JSONEncode({
            conversations = {
                {
                    type = v5,
                    name = v7,
                    participant_user_ids = v2.Array.map(v6, function(v8)
                        return (tonumber(v8));
                    end)
                }
            }
        })
    });
end;


local l_HttpService_0 = game:GetService("HttpService");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChatNetworking");
local v2 = require(l_script_FirstAncestor_0.url.CHAT_PLATFORM_BASE_URL);
local l_default_0 = require(l_script_FirstAncestor_0.url.HttpRequest).default;
return function(v4, v5)
    return l_default_0(("%*/v1/send-messages"):format(v2), "POST", {
        postBody = l_HttpService_0:JSONEncode({
            conversation_id = v4,
            messages = {
                {
                    content = v5
                }
            }
        })
    });
end;


return {
    CreateConversation = require(script.CreateConversation),
    SendChatTextMessage = require(script.SendChatTextMessage)
};


local v0 = require(script.Parent.Parent.Dev.JestConfigs);
return {
    displayName = "AppChatNetworking",
    setupFilesAfterEnv = {
        v0.setupFiles.LogHandler,
        v0.setupFiles.UIBloxInitializer,
        v0.setupFiles.createPromiseRejectionHandler()
    }
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AppChatNetworking");
local v1 = require(l_script_FirstAncestor_0.Parent.LuauPolyfill);
local v2 = require(l_script_FirstAncestor_0.url.CHAT_PLATFORM_BASE_URL);
return require(script.Parent.RoduxNetworking).POST(script, function(v3, v4, v5)
    return v3(v2):path("v1"):path("add-users"):body({
        conversation_id = v4,
        user_ids = v1.Array.map(v5, function(v6)
            return (tonumber(v6));
        end)
    });
end);