local v0 = require(script.Parent.Parent.dependencies);
local l_Roact_0 = v0.Roact;
local l_RoactRodux_0 = v0.RoactRodux;
local l_UIBlox_0 = v0.UIBlox;
local l_t_0 = v0.t;
local l_RobloxAppEnums_0 = v0.RobloxAppEnums;
local l_AppPage_0 = l_RobloxAppEnums_0.AppPage;
local l_RoactServices_0 = v0.RoactServices.RoactServices;
local l_AppLinking_0 = v0.RoactServiceTags.AppLinking;
local l_NavigateDown_0 = v0.NavigationRodux.Thunks.NavigateDown;
local l_NotificationType_0 = l_RobloxAppEnums_0.NotificationType;
local l_withStyle_0 = l_UIBlox_0.Core.Style.withStyle;
local l_ArgCheck_0 = v0.ArgCheck;
local v13 = require(script.Parent.DEPRECATED_ImageSetLabel);
local l_withLocalization_0 = v0.Localization.withLocalization;
local l_FFlagEnableModularizedUserAgreementsList_0 = v0.SharedFlags.FFlagEnableModularizedUserAgreementsList;
local l_RoactAppPolicy_0 = v0.UniversalAppPolicy.RoactAppPolicy;
local l_FitFrame_0 = v0.FitFrame;
local l_ImageSetLabel_0 = l_UIBlox_0.Core.ImageSet.ImageSetLabel;
local l_Images_0 = l_UIBlox_0.App.ImageSet.Images;
local v20 = l_Roact_0.PureComponent:extend("UserAgreementsListItem");
v20.validateProps = l_t_0.strictInterface({
    LayoutOrder = l_t_0.integer,
    Size = l_t_0.UDim2,
    agreement = l_t_0.strictInterface({
        id = l_t_0.string,
        agreementType = l_t_0.string,
        clientType = l_t_0.string,
        displayUrl = l_t_0.string,
        regulationType = l_t_0.string
    }),
    margin = l_t_0.optional(l_t_0.strictInterface({
        top = l_t_0.integer,
        right = l_t_0.integer,
        bottom = l_t_0.integer,
        left = l_t_0.integer
    })),
    navigateDown = l_t_0.callback,
    agreementTypeExists = l_t_0.optional(l_t_0.boolean),
    useExternalBrowserForDisclaimerLinks = l_t_0.optional(l_t_0.boolean),
    linking = l_t_0.optional(l_t_0.table),
    hideLink = l_t_0.optional(l_t_0.boolean),
    checkBoxPresent = l_t_0.optional(l_t_0.boolean)
});
v20.defaultProps = {
    margin = l_FitFrame_0.Rect.square(0),
    agreementTypeExists = false
};
openExternalBrowser = function(v21, v22)
    l_ArgCheck_0.isNotNil(v21, "linking");
    l_ArgCheck_0.isType(v22, "string", "url");
    v21:openURL(v22);
end;
v20.init = function(v23)
    local v24, v25 = l_Roact_0.createBinding(false);
    v23.buttonPressed = v24;
    v23.updateButtonPressed = v25;
    v23.onButtonInputBegan = function(_, v27)
        if not (v27.UserInputType ~= Enum.UserInputType.Touch) or v27.UserInputType == Enum.UserInputType.MouseButton1 then
            if not v23.buttonPressed:getValue() then
                v23.updateButtonPressed(true);
            else
                return ;
            end;
        end;
    end;
    v23.onButtonInputEnded = function()
        if v23.buttonPressed:getValue() then
            v23.updateButtonPressed(false);
        end;
    end;
    v23.showLinkText = function()
        if not l_FFlagEnableModularizedUserAgreementsList_0 then
            return not v23.props.agreementTypeExists;
        else
            return not v23.props.hideLink and not v23.props.agreementTypeExists;
        end;
    end;
end;
v20.renderWithProviders = function(v28, v29, v30)
    local l_LayoutOrder_0 = v28.props.LayoutOrder;
    local l_Size_0 = v28.props.Size;
    local l_margin_0 = v28.props.margin;
    local l_agreement_0 = v28.props.agreement;
    local l_Font_0 = v30.Font;
    local l_Theme_0 = v30.Theme;
    local l_Tokens_0 = v30.Tokens;
    local v38 = -((l_margin_0.left + l_margin_0.right) + 14);
    local v39 = if not l_FFlagEnableModularizedUserAgreementsList_0 then l_Font_0.BaseSize * l_Font_0.Header2.RelativeSize else l_Tokens_0.Global.FontSize_100;
    local v40 = 20 / v39;
    local v41 = l_Font_0.BaseSize * l_Font_0.CaptionHeader.RelativeSize;
    local v42 = 14 / v41;
    local v43 = v28.props.checkBoxPresent or false;
    local l_displayUrl_0 = l_agreement_0.displayUrl;
    local l_agreementTitle_0 = v29.agreementTitle;
    local v46 = nil;
    local v47 = nil;
    local v48 = nil;
    if not l_FFlagEnableModularizedUserAgreementsList_0 then
        v46 = v13;
        v47 = 1;
        v48 = "LuaApp/icons/navigation/pushRight_small";
    else
        v46 = l_ImageSetLabel_0;
        v47 = 3;
        v48 = l_Images_0["icons/navigation/pushRight"];
    end;
    return l_Roact_0.createElement("ImageButton", {
        LayoutOrder = l_LayoutOrder_0,
        Size = l_Size_0,
        AutoButtonColor = false,
        BackgroundColor3 = v30.Theme.BackgroundOnPress.Color,
        BackgroundTransparency = v28.buttonPressed:map(function(v49)
            return not not v49 and v30.Theme.BackgroundOnPress.Transparency or 1;
        end),
        BorderSizePixel = 0,
        [l_Roact_0.Event.InputBegan] = v28.onButtonInputBegan,
        [l_Roact_0.Event.InputEnded] = v28.onButtonInputEnded,
        [l_Roact_0.Event.Activated] = function()
            if not v28.props.useExternalBrowserForDisclaimerLinks then
                v28.props.navigateDown({
                    name = l_AppPage_0.GenericWebPage,
                    detail = l_displayUrl_0,
                    extraProps = {
                        title = l_agreementTitle_0,
                        notificationType = l_NotificationType_0.OPEN_CUSTOM_WEBVIEW
                    }
                });
                return ;
            else
                openExternalBrowser(v28.props.linking, l_displayUrl_0);
                return ;
            end;
        end
    }, {
        Padding = l_Roact_0.createElement("UIPadding", {
            PaddingTop = UDim.new(0, l_margin_0.top),
            PaddingBottom = UDim.new(0, l_margin_0.bottom),
            PaddingLeft = UDim.new(0, l_margin_0.left),
            PaddingRight = if not not l_FFlagEnableModularizedUserAgreementsList_0 and v43 then UDim.new(0, l_margin_0.right * 2) else UDim.new(0, 0)
        }),
        TextLayout = l_Roact_0.createElement("Frame", {
            Size = UDim2.new(1, v38, 1, 0),
            BackgroundTransparency = 1,
            BorderSizePixel = 0
        }, {
            ListLayout = l_Roact_0.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Vertical,
                HorizontalAlignment = Enum.HorizontalAlignment.Left,
                VerticalAlignment = Enum.VerticalAlignment.Center,
                SortOrder = Enum.SortOrder.LayoutOrder
            }),
            TitleText = l_Roact_0.createElement("TextLabel", {
                LayoutOrder = 1,
                Size = UDim2.new(not l_FFlagEnableModularizedUserAgreementsList_0 and 1 or 0.9, 0, 0, not l_FFlagEnableModularizedUserAgreementsList_0 and 20 or 40),
                Position = UDim2.new(0, 0, 0.5, 0),
                AnchorPoint = Vector2.new(0, 0.5),
                BackgroundTransparency = 1,
                BorderSizePixel = 0,
                Text = l_agreementTitle_0,
                Font = if not l_FFlagEnableModularizedUserAgreementsList_0 then l_Font_0.Header2.Font else l_Font_0.Body.Font,
                TextSize = v39,
                LineHeight = v40,
                TextColor3 = l_Theme_0.TextMuted.Color,
                TextTransparency = l_Theme_0.TextMuted.Transparency,
                TextXAlignment = Enum.TextXAlignment.Left,
                TextWrapped = not not l_FFlagEnableModularizedUserAgreementsList_0 or false,
                TextYAlignment = Enum.TextYAlignment.Center
            }),
            LinkText = not not v28.showLinkText() and l_Roact_0.createElement("TextLabel", {
                LayoutOrder = 2,
                Size = UDim2.new(1, 0, 0, 14),
                BackgroundTransparency = 1,
                BorderSizePixel = 0,
                Text = l_displayUrl_0,
                Font = l_Font_0.Header2.Font,
                TextSize = v41,
                LineHeight = v42,
                TextColor3 = l_Theme_0.TextEmphasis.Color,
                TextTransparency = 0.5,
                TextXAlignment = Enum.TextXAlignment.Left,
                TextYAlignment = Enum.TextYAlignment.Center,
                TextTruncate = Enum.TextTruncate.AtEnd
            }) or nil
        }),
        RightImage = (function(v50, v51, v52)
            return l_Roact_0.createElement(v50, {
                AnchorPoint = Vector2.new(1, 0.5),
                Size = UDim2.new(0, 14 * v51, 0, 14 * v51),
                Position = UDim2.new(1, -l_margin_0.right, 0.5, 0),
                BackgroundTransparency = 1,
                BorderSizePixel = 0,
                Image = v52,
                ImageColor3 = if not l_FFlagEnableModularizedUserAgreementsList_0 then l_Theme_0.SecondaryDefault.Color else l_Theme_0.UIEmphasis.Color,
                ImageTransparency = if not l_FFlagEnableModularizedUserAgreementsList_0 then l_Theme_0.SecondaryDefault.Transparency else 0
            });
        end)(v46, v47, v48)
    });
end;
v20.render = function(v53)
    return l_withLocalization_0({
        agreementTitle = not not v53.props.agreementTypeExists and "CommonUI.UserAgreements.Popup.Agreement." .. v53.props.agreement.agreementType or "CommonUI.UserAgreements.Popup.DefaultAgreementTitle"
    })(function(v54)
        return l_withStyle_0(function(v55)
            return v53:renderWithProviders(v54, v55);
        end);
    end);
end;
return (l_RoactRodux_0.connect(nil, function(v56)
    return {
        navigateDown = function(v57)
            v56(l_NavigateDown_0(v57));
        end
    };
end)((l_RoactServices_0.connect({
    linking = l_AppLinking_0
})((l_RoactAppPolicy_0.connect(function(v58)
    return {
        useExternalBrowserForDisclaimerLinks = v58.shouldUseExternalBrowserForDisclaimerLinks()
    };
end)(v20))))));


local v0 = require(script.Parent.Parent.Dev.Promise);
local v1 = {};
v1.__index = v1;
v1.new = function()
    return (setmetatable({}, v1));
end;
v1.registerURL = function(_, _)
end;
v1.detectURL = function(_, _)
end;
v1.listenForLuaURLs = function(_, _)
end;
v1.stopListeningForLuaURLs = function(_)
end;
v1.openURL = function(v9, v10)
    v9.lastOpenedURL = v10;
    return v0.resolve(true);
end;
v1.isURLRegistered = function(_, _)
    return v0.resolve(true);
end;
return v1;


return {
    NoError = 0,
    ItemAlreadyExists = 6,
    InvalidState = 17,
    Exception = -1
};


local v0 = require(game:GetService("CorePackages").Logging);
local v1 = {
    TermsOfService = true,
    PrivacyPolicy = true,
    RiderTerms = true,
    ChildrenPrivacyPolicy = true,
    LuobuThirdPartyDataUse = true,
    TransferPersonalInformationPolicy = true,
    OptionalPersonalInformationPolicy = true,
    ThirdPartyPersonalInformationPolicy = true,
    PersonalInformationPolicy = true
};
setmetatable(v1, {
    __index = function(_, v3)
        v0.warn(string.format("Unknown User Agreement Type: %s", (tostring(v3))));
        return false;
    end
});
return {
    CheckAgreementTypeExists = function(v4)
        return v1[v4];
    end
};


local l_Parent_0 = script.Parent.Parent;
return {
    AppCommonLib = require(l_Parent_0.AppCommonLib),
    ArgCheck = require(l_Parent_0.ArgCheck),
    AuthCommon = require(l_Parent_0.AuthCommon),
    AuthenticationStatus = require(l_Parent_0.AuthenticationStatus),
    CentralOverlay = require(l_Parent_0.CentralOverlay),
    Cryo = require(l_Parent_0.Cryo),
    FitFrame = require(l_Parent_0.FitFrame),
    Http = require(l_Parent_0.Http),
    Localization = require(l_Parent_0.Localization),
    Loggers = require(l_Parent_0.Loggers),
    NavigationRodux = require(l_Parent_0.NavigationRodux),
    React = require(l_Parent_0.React),
    Roact = require(l_Parent_0.Roact),
    RoactRodux = require(l_Parent_0.RoactRodux),
    RoactServices = require(l_Parent_0.RoactServices),
    RoactServiceTags = require(l_Parent_0.RoactServiceTags),
    RoactUtils = require(l_Parent_0.RoactUtils),
    RobloxAppAssets = require(l_Parent_0.RobloxAppAssets),
    RobloxAppEnums = require(l_Parent_0.RobloxAppEnums),
    RobloxAppHooks = require(l_Parent_0.RobloxAppHooks),
    SharedFlags = require(l_Parent_0.SharedFlags),
    t = require(l_Parent_0.t),
    UIBlox = require(l_Parent_0.UIBlox),
    UniversalAppPolicy = require(l_Parent_0.UniversalAppPolicy),
    Dash = require(l_Parent_0.Dash)
};


return {
    ["jest.config"] = script["jest.config"],
    useUserAgreements = require(script.useUserAgreements),
    FetchUpdatedUserAgreements = require(script.FetchUpdatedUserAgreements),
    UserAgreementsCounterNames = require(script.UserAgreementsCounterNames),
    UserAgreementErrorCodes = require(script.UserAgreementErrorCodes),
    UserAgreementUtils = require(script.UserAgreementUtils),
    UserAgreementsList = require(script.Components.UserAgreementsList)
};


local v0 = require(script.Parent.Parent.Dev.JestConfigs);
return {
    displayName = "UserAgreements",
    testMatch = {
        "**/*.test"
    },
    setupFilesAfterEnv = {
        v0.setupFiles.LogHandler,
        v0.setupFiles.UIBloxInitializer,
        v0.setupFiles.createPromiseRejectionHandler()
    }
};


local l_Parent_0 = script:FindFirstAncestor("UserAgreements").Parent;
local v1 = require(l_Parent_0.React);
local l_useSelector_0 = require(l_Parent_0.RoactUtils).Hooks.RoactRodux.useSelector;
local l_useDispatch_0 = require(l_Parent_0.RoactUtils).Hooks.RoactRodux.useDispatch;
local l_useRoactService_0 = require(l_Parent_0.RobloxAppHooks).useRoactService;
local l_RoactNetworking_0 = require(l_Parent_0.RoactServiceTags).RoactNetworking;
local l_RoactAnalytics_0 = require(l_Parent_0.RoactServiceTags).RoactAnalytics;
local l_AppPlatformService_0 = require(l_Parent_0.RoactServiceTags).AppPlatformService;
local l_AppAppLifecycleService_0 = require(l_Parent_0.RoactServiceTags).AppAppLifecycleService;
local l_LoginStatus_0 = require(l_Parent_0.RobloxAppEnums).LoginStatus;
local l_SetCentralOverlay_0 = require(l_Parent_0.CentralOverlay).Actions.SetCentralOverlay;
local l_CentralOverlayType_0 = require(l_Parent_0.RobloxAppEnums).CentralOverlayType;
local v12 = require(script.Parent.FetchUpdatedUserAgreements);
local l_useAppPolicy_0 = require(l_Parent_0.UniversalAppPolicy).useAppPolicy;
local l_GetFFlagUserAgreementsOnAppForegrounded_0 = require(l_Parent_0.SharedFlags).GetFFlagUserAgreementsOnAppForegrounded;
local l_GetFFlagUseUpdatedVNGAgreementsWorkflow_0 = require(l_Parent_0.SharedFlags).GetFFlagUseUpdatedVNGAgreementsWorkflow;
local function v17(v16)
    return v16.AuthenticationStatus.status == l_LoginStatus_0.LOGGED_IN;
end;
local function v22(v18, v19, v20, v21)
    v18(l_SetCentralOverlay_0(v19, {
        agreements = v20,
        agreementAccepted = v21
    }, {
        DisableBackButtonClose = true
    }));
end;
local _ = function(v23)
    for _, v25 in v23, nil, nil do
        if v25.action == "ConvertToVngUser" then
            return true;
        end;
    end;
    return false;
end;
local function v39()
    local v27 = l_useRoactService_0(l_RoactNetworking_0);
    local v28 = l_useRoactService_0(l_RoactAnalytics_0);
    local v29 = l_useDispatch_0();
    local v31 = if not l_GetFFlagUseUpdatedVNGAgreementsWorkflow_0() then nil else l_useAppPolicy_0(function(v30)
        return v30.getVNGFormRequired();
    end);
    local function v32()
    end;
    if not (not l_GetFFlagUseUpdatedVNGAgreementsWorkflow_0() or not v31) then
        v32 = function()
            v29(l_SetCentralOverlay_0(l_CentralOverlayType_0.VngContactInfoFormWebviewPopup, {}, {
                DisableBackButtonClose = true
            }));
        end;
    end;
    return v1.useCallback(function()
        if not (not v27 or not v28) and v29 then
            if not (not l_GetFFlagUseUpdatedVNGAgreementsWorkflow_0() or not v31) then
                v29(l_SetCentralOverlay_0(l_CentralOverlayType_0.VngComplianceLoadingPopup, {}, {
                    DisableBackButtonClose = true
                }));
            end;
            v12(v27, v28):andThen(function(v33)
                if not v33 or #v33 == 0 then
                    if l_GetFFlagUseUpdatedVNGAgreementsWorkflow_0() then
                        v32();
                    end;
                    return ;
                else
                    local v34;
                    for _, v36 in v33, nil, nil do
                        if v36.action == "ConvertToVngUser" then
                            v34 = true;
                            goto label0 --[[  true, false  ]];
                        end;
                    end;
                    v34 = false;
                    ::label0::;
                    if not v34 then
                        v22(v29, l_CentralOverlayType_0.UserAgreementsUpdatedPopup, v33, nil);
                        return ;
                    elseif not l_GetFFlagUseUpdatedVNGAgreementsWorkflow_0() then
                        v22(v29, l_CentralOverlayType_0.VNGUserAgreementsPopup, v33, function(_)
                            v29(l_SetCentralOverlay_0(l_CentralOverlayType_0.VngContactInfoFormWebviewPopup, {}));
                        end);
                        return ;
                    else
                        v22(v29, l_CentralOverlayType_0.VNGUserAgreementsPopup, v33, v32);
                        return ;
                    end;
                end;
            end, function(_)
                if l_GetFFlagUseUpdatedVNGAgreementsWorkflow_0() then
                    v32();
                end;
            end);
            return ;
        else
            return ;
        end;
    end, {
        v27,
        v28,
        v29
    });
end;
local function v45()
    local v40 = v39();
    local v41 = l_useRoactService_0(l_AppPlatformService_0);
    local v42 = l_useRoactService_0(l_AppAppLifecycleService_0);
    local v43 = l_useSelector_0(v17);
    v1.useEffect(function()
        if (v41 or v42) and v43 then
            local v44 = nil;
            if not v42 then
                if v41 then
                    v44 = v41.OnLeaveConstrained:connect(v40);
                end;
            else
                v44 = v42:RegisterCallback(Enum.AppLifecycleState.Active, v40, true, false);
            end;
            if v44 ~= nil then
                return function()
                    v44:Disconnect();
                    v44 = nil;
                end;
            else
                return ;
            end;
        else
            return ;
        end;
    end, {
        v43,
        v40,
        v41,
        v42
    });
end;
local function v52()
    local v46 = v39();
    local v47 = l_useSelector_0(v17);
    local v49 = l_useAppPolicy_0(function(v48)
        return v48.getCheckUserAgreementsUpdatedOnLogin();
    end);
    local v50, v51 = v1.useState(false);
    v1.useEffect(function()
        if v47 then
            if not (not v49 or v50) then
                v51(true);
                v46();
            end;
            return ;
        else
            v51(false);
            return ;
        end;
    end, {
        v46,
        v47,
        v50,
        v49
    });
end;
return function()
    if not l_GetFFlagUserAgreementsOnAppForegrounded_0() then
        local v53 = l_useRoactService_0(l_RoactNetworking_0);
        local v54 = l_useRoactService_0(l_RoactAnalytics_0);
        local v55 = l_useDispatch_0();
        local v56 = l_useSelector_0(v17);
        local v58 = l_useAppPolicy_0(function(v57)
            return v57.getCheckUserAgreementsUpdatedOnLogin();
        end);
        local v60 = if not l_GetFFlagUseUpdatedVNGAgreementsWorkflow_0() then nil else l_useAppPolicy_0(function(v59)
            return v59.getVNGFormRequired();
        end);
        local function v61()
        end;
        if v60 then
            v61 = function()
                v55(l_SetCentralOverlay_0(l_CentralOverlayType_0.VngContactInfoFormWebviewPopup, {}, {
                    DisableBackButtonClose = true
                }));
            end;
        end;
        local v62, v63 = v1.useState(false);
        v1.useEffect(function()
            if not (not v53 or not v54) and v55 then
                if v56 then
                    if not (not v58 or v62) then
                        if not (not l_GetFFlagUseUpdatedVNGAgreementsWorkflow_0() or not v60) then
                            v55(l_SetCentralOverlay_0(l_CentralOverlayType_0.VngComplianceLoadingPopup, {}, {
                                DisableBackButtonClose = true
                            }));
                        end;
                        v63(true);
                        v12(v53, v54):andThen(function(v64)
                            if v64 and #v64 > 0 then
                                local v65 = false;
                                for _, v67 in ipairs(v64) do
                                    if v67.action == "ConvertToVngUser" then
                                        v65 = true;
                                        break;
                                    end;
                                end;
                                if not v65 then
                                    v55(l_SetCentralOverlay_0(l_CentralOverlayType_0.UserAgreementsUpdatedPopup, {
                                        agreements = v64
                                    }, {
                                        DisableBackButtonClose = true
                                    }));
                                    return ;
                                elseif not l_GetFFlagUseUpdatedVNGAgreementsWorkflow_0() then
                                    v55(l_SetCentralOverlay_0(l_CentralOverlayType_0.VNGUserAgreementsPopup, {
                                        agreements = v64,
                                        agreementAccepted = function(_)
                                            v55(l_SetCentralOverlay_0(l_CentralOverlayType_0.VngContactInfoFormWebviewPopup, {}));
                                        end
                                    }, {
                                        DisableBackButtonClose = true
                                    }));
                                    return ;
                                else
                                    v55(l_SetCentralOverlay_0(l_CentralOverlayType_0.VNGUserAgreementsPopup, {
                                        agreements = v64,
                                        agreementAccepted = v61
                                    }, {
                                        DisableBackButtonClose = true
                                    }));
                                    return ;
                                end;
                            else
                                if l_GetFFlagUseUpdatedVNGAgreementsWorkflow_0() then
                                    v61();
                                end;
                                return ;
                            end;
                        end, function(_)
                            if l_GetFFlagUseUpdatedVNGAgreementsWorkflow_0() then
                                v61();
                            end;
                        end);
                    end;
                    return ;
                else
                    v63(false);
                    return ;
                end;
            else
                return ;
            end;
        end, {
            v53,
            v54,
            v55,
            v56,
            v62,
            v58
        });
        return ;
    else
        v52();
        v45();
        return ;
    end;
end;


return require(script:FindFirstAncestor("UserLib").Parent.Rodux).makeActionCreator(script.Name, function(v0)
    return {
        user = v0
    };
end);


return require(script:FindFirstAncestor("UserLib").Parent.Rodux).makeActionCreator(script.Name, function(v0)
    return {
        users = v0
    };
end);


return require(script:FindFirstAncestor("UserLib").Parent.Rodux).makeActionCreator(script.Name, function(v0, v1)
    return {
        userId = tostring(v0),
        displayName = v1
    };
end);


local l_Parent_0 = script:FindFirstAncestor("UserLib").Parent;
local l_makeActionCreator_0 = require(l_Parent_0.Rodux).makeActionCreator;
local l_DateTime_0 = require(l_Parent_0.Time).DateTime;
return l_makeActionCreator_0(script.Name, function(v3, v4, v5, v6, v7, v8, v9, v10, v11)
    local v12 = 0;
    if v9 ~= nil then
        local v13 = l_DateTime_0.fromIsoDate(v9);
        if v13 ~= nil then
            v12 = v13:GetUnixTimestamp();
        end;
    end;
    return {
        userId = v3,
        presence = v4,
        lastLocation = v5,
        placeId = v6,
        rootPlaceId = v7,
        gameInstanceId = v8,
        lastOnline = v12,
        universeId = v10,
        previousUniverseId = v11
    };
end);


return require(script:FindFirstAncestor("UserLib").Parent.Rodux).makeActionCreator(script.Name, function(v0)
    return {
        userId = v0
    };
end);


return require(script:FindFirstAncestor("UserLib").Parent.Rodux).makeActionCreator(script.Name, function(v0, v1)
    return {
        userId = v0,
        isFriend = v1
    };
end);


return require(script:FindFirstAncestor("UserLib").Parent.Rodux).makeActionCreator(script.Name, function(v0, v1)
    return {
        userId = v0,
        membershipType = v1
    };
end);


return require(script:FindFirstAncestor("UserLib").Parent.Rodux).makeActionCreator(script.Name, function(v0, v1, v2)
    return {
        userId = tostring(v0),
        presence = v1,
        lastLocation = v2
    };
end);


return {
    AddUser = require(script.AddUser),
    AddUsers = require(script.AddUsers),
    ReceivedDisplayName = require(script.ReceivedDisplayName),
    RemoveUser = require(script.RemoveUser),
    SetUserIsFriend = require(script.SetUserIsFriend),
    SetUserMembershipType = require(script.SetUserMembershipType),
    ReceivedUserPresence = require(script.ReceivedUserPresence),
    SetUserPresence = require(script.SetUserPresence)
};


local v0 = require(script:FindFirstAncestor("UserLib").Models.User);
return {
    [0] = v0.PresenceType.OFFLINE,
    [1] = v0.PresenceType.ONLINE,
    [2] = v0.PresenceType.IN_GAME,
    [3] = v0.PresenceType.IN_STUDIO
};


local l_Players_0 = game:GetService("Players");
local l_GetFFlagInviteListRerank_0 = require(script:FindFirstAncestor("UserLib").Parent.SharedFlags).GetFFlagInviteListRerank;
local v2 = {
    PresenceType = {
        OFFLINE = "OFFLINE",
        ONLINE = "ONLINE",
        IN_GAME = "IN_GAME",
        IN_STUDIO = "IN_STUDIO"
    },
    new = function()
        return {};
    end
};
v2.fromData = function(v3, v4, v5, v6)
    local v7 = v2.new();
    v7.id = tostring(v3);
    v7.isFetching = false;
    v7.isFriend = v5;
    v7.friendRank = v6 or 0;
    v7.lastLocation = nil;
    v7.name = v4;
    v7.displayName = v4;
    v7.externalAppDisplayName = v4;
    v7.universeId = nil;
    v7.placeId = nil;
    v7.rootPlaceId = nil;
    v7.gameInstanceId = nil;
    v7.presence = (not not l_Players_0.LocalPlayer and v7.id == tostring(l_Players_0.LocalPlayer.UserId)) and v2.PresenceType.ONLINE or nil;
    v7.DEPRECATED_thumbnails = nil;
    v7.lastOnline = nil;
    return v7;
end;
v2.fromDataTable = function(v8)
    local v9 = v2.new();
    v9.id = tostring(v8.id);
    v9.isFriend = v8.isFriend;
    v9.friendRank = v8.friendRank;
    v9.presence = (not not l_Players_0.LocalPlayer and v9.id == tostring(l_Players_0.LocalPlayer.UserId)) and v2.PresenceType.ONLINE or nil;
    v9.isFetching = false;
    v9.lastLocation = nil;
    v9.name = v8.name;
    v9.displayName = v8.displayName or v8.name;
    v9.externalAppDisplayName = v8.externalAppDisplayName;
    v9.universeId = nil;
    v9.placeId = nil;
    v9.rootPlaceId = nil;
    v9.gameInstanceId = nil;
    v9.DEPRECATED_thumbnails = nil;
    v9.lastOnline = nil;
    v9.hasVerifiedBadge = v8.hasVerifiedBadge;
    if l_GetFFlagInviteListRerank_0() then
        v9.friendFrequentRank = v8.friendFrequentRank;
    end;
    return v9;
end;
v2.compare = function(v10, v11)
    local v12 = false;
    if v10 == nil then
        v12 = v11 == nil;
    end;
    assert(not v12, "user1 and user2 cannot both be nil");
    local v13 = true;
    if v10 ~= nil then
        v13 = typeof(v10) == "table";
    end;
    assert(v13, "user1 must be a table or nil");
    v13 = true;
    if v11 ~= nil then
        v13 = typeof(v11) == "table";
    end;
    assert(v13, "user2 must be a table or nil");
    if v10 and v11 then
        for v14, v15 in pairs(v11) do
            if v10[v14] ~= v15 then
                return false;
            end;
        end;
        for v16, v17 in pairs(v10) do
            if v11[v16] ~= v17 then
                return false;
            end;
        end;
        return true;
    else
        return false;
    end;
end;
v2.userPresenceToText = function(v18, v19)
    local l_presence_0 = v19.presence;
    local l_lastLocation_0 = v19.lastLocation;
    if l_presence_0 then
        if l_presence_0 == v2.PresenceType.OFFLINE then
            return v18:Format("Common.Presence.Label.Offline");
        elseif l_presence_0 == v2.PresenceType.ONLINE then
            return v18:Format("Common.Presence.Label.Online");
        elseif not (l_presence_0 ~= v2.PresenceType.IN_GAME) or l_presence_0 == v2.PresenceType.IN_STUDIO then
            if l_lastLocation_0 ~= nil then
                return l_lastLocation_0;
            else
                return v18:Format("Common.Presence.Label.Online");
            end;
        else
            return ;
        end;
    else
        return "";
    end;
end;
return v2;


return {
    UserModel = require(script.User),
    MockUser = require(script.MockUser)
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UserLib");
local l_Immutable_0 = require(l_script_FirstAncestor_0.Parent.AppCommonLib).Immutable;
local l_AddUser_0 = require(l_script_FirstAncestor_0.Actions).AddUser;
local l_AddUsers_0 = require(l_script_FirstAncestor_0.Actions).AddUsers;
local l_ReceivedUserPresence_0 = require(l_script_FirstAncestor_0.Actions).ReceivedUserPresence;
local l_RemoveUser_0 = require(l_script_FirstAncestor_0.Actions).RemoveUser;
local l_SetUserIsFriend_0 = require(l_script_FirstAncestor_0.Actions).SetUserIsFriend;
local l_SetUserMembershipType_0 = require(l_script_FirstAncestor_0.Actions).SetUserMembershipType;
local l_SetUserPresence_0 = require(l_script_FirstAncestor_0.Actions).SetUserPresence;
local l_ReceivedDisplayName_0 = require(l_script_FirstAncestor_0.Actions).ReceivedDisplayName;
return function(v10, v11)
    v10 = v10 or {};
    assert(v10, "");
    if v11.type == l_AddUser_0.name then
        local l_user_0 = v11.user;
        return (l_Immutable_0.Set(v10, l_user_0.id, l_user_0));
    elseif v11.type == l_AddUsers_0.name then
        local l_users_0 = v11.users;
        local v14 = {};
        for v15, v16 in pairs(l_users_0) do
            local v17 = v10[v15];
            if not v17 then
                v14[v15] = v16;
            else
                v14[v15] = l_Immutable_0.JoinDictionaries(v17, v16);
            end;
        end;
        return (l_Immutable_0.JoinDictionaries(v10, v14));
    elseif v11.type == l_SetUserIsFriend_0.name then
        local v18 = v10[v11.userId];
        if not v18 then
            warn("Setting isFriend on user", v11.userId, "who doesn't exist yet");
            return v10;
        else
            return (l_Immutable_0.Set(v10, v18.id, (l_Immutable_0.Set(v18, "isFriend", v11.isFriend))));
        end;
    elseif v11.type == l_SetUserPresence_0.name then
        local v19 = v10[v11.userId];
        if not v19 then
            warn("Setting presence on user", v11.userId, "who doesn't exist yet");
            return v10;
        else
            return (l_Immutable_0.Set(v10, v19.id, (l_Immutable_0.JoinDictionaries(v19, {
                presence = v11.presence,
                lastLocation = v11.lastLocation
            }))));
        end;
    else
        if v11.type == l_ReceivedUserPresence_0.name then
            local v20 = v10[v11.userId];
            if v20 then
                return (l_Immutable_0.JoinDictionaries(v10, {
                    [v11.userId] = l_Immutable_0.JoinDictionaries(v20, {
                        presence = v11.presence,
                        lastLocation = v11.lastLocation,
                        placeId = v11.placeId,
                        rootPlaceId = v11.rootPlaceId,
                        gameInstanceId = v11.gameInstanceId,
                        lastOnline = v11.lastOnline,
                        universeId = v11.universeId
                    })
                }));
            end;
        elseif v11.type == l_SetUserMembershipType_0.name then
            local v21 = v10[v11.userId];
            if v21 then
                return (l_Immutable_0.JoinDictionaries(v10, {
                    [v11.userId] = l_Immutable_0.JoinDictionaries(v21, {
                        membership = v11.membershipType
                    })
                }));
            end;
        elseif v11.type == l_RemoveUser_0.name then
            if v10[v11.userId] then
                return (l_Immutable_0.RemoveFromDictionary(v10, v11.userId));
            end;
        elseif v11.type == l_ReceivedDisplayName_0.name then
            local v22 = v10[v11.userId];
            if v22 then
                v10 = l_Immutable_0.JoinDictionaries(v10, {
                    [v11.userId] = l_Immutable_0.JoinDictionaries(v22, {
                        displayName = v11.displayName
                    })
                });
            end;
        end;
        return v10;
    end;
end;


local l_HttpService_0 = game:GetService("HttpService");
local l_Url_0 = require(script:FindFirstAncestor("UserLib").Parent.Http).Url;
return function(v2, v3)
    local v4 = {};
    for _, v6 in pairs(v3) do
        local v7 = tonumber(v6);
        if v7 then
            table.insert(v4, v7);
        end;
    end;
    return v2(string.format("%s/presence/users", l_Url_0.PRESENCE_URL), "POST", {
        postBody = l_HttpService_0:JSONEncode({
            userIds = v4
        })
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UserLib");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.Cryo);
local l_PromiseUtilities_0 = require(l_Parent_0.AppCommonLib).Utils.PromiseUtilities;
local _ = require(l_script_FirstAncestor_0.Utils);
local v5 = require(l_Parent_0.Promise);
local v6 = require(l_script_FirstAncestor_0.Utils.Constants);
local l_getRbxthumbWithTypeSizeAndOptions_0 = require(l_script_FirstAncestor_0.Utils).getRbxthumbWithTypeSizeAndOptions;
local l_FFlagFixPreloadingThumbsNilEntries_0 = require(l_Parent_0.SharedFlags).FFlagFixPreloadingThumbsNilEntries;
local function v13(v9, v10)
    local v11 = {};
    for v12 = 1, #v9, v10 do
        table.insert(v11, (v2.List.getRange(v9, v12, (v12 + v10) - 1)));
    end;
    return v11;
end;
local _ = function(_, v15, v16)
    return (v5.new(function(v17, _)
        local v19 = {};
        local v20 = {};
        for _, v22 in v15, nil, nil do
            v20[v22] = {};
            for _, v24 in v16, nil, nil do
                v20[v22][v24.thumbnailType] = v20[v22][v24.thumbnailType] or {};
                local v25 = l_getRbxthumbWithTypeSizeAndOptions_0(v22, v6.RbxAvatarThumbnailTypeFromEnumToRbxthumbType[v24.thumbnailType], v6.RbxThumbnailSizeToNumberSize[v24.thumbnailSize]);
                v20[v22][v24.thumbnailType][v24.thumbnailSize] = v25;
                table.insert(v19, v25);
            end;
        end;
        game:GetService("ContentProvider"):PreloadAsync(v19);
        v17();
    end));
end;
return function(v27, v28)
    if l_FFlagFixPreloadingThumbsNilEntries_0 then
        assert(v27 ~= nil, "userIds should not be nil");
    end;
    return function(_)
        local v30 = {};
        for _, v32 in pairs((v13(v27, 100))) do
            local l_v28_0 = v28;
            table.insert(v30, (v5.new(function(v34, _)
                local v36 = {};
                local v37 = {};
                for _, v39 in v32, nil, nil do
                    v37[v39] = {};
                    for _, v41 in l_v28_0, nil, nil do
                        v37[v39][v41.thumbnailType] = v37[v39][v41.thumbnailType] or {};
                        local v42 = l_getRbxthumbWithTypeSizeAndOptions_0(v39, v6.RbxAvatarThumbnailTypeFromEnumToRbxthumbType[v41.thumbnailType], v6.RbxThumbnailSizeToNumberSize[v41.thumbnailSize]);
                        v37[v39][v41.thumbnailType][v41.thumbnailSize] = v42;
                        table.insert(v36, v42);
                    end;
                end;
                game:GetService("ContentProvider"):PreloadAsync(v36);
                v34();
            end)));
        end;
        return l_PromiseUtilities_0.Batch(v30);
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UserLib");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_script_FirstAncestor_0.Models.User);
local v3 = require(l_script_FirstAncestor_0.Actions.AddUsers);
local l_SetFriendCount_0 = require(l_Parent_0.LegacyFriendsRodux).Actions.SetFriendCount;
return function(v5)
    return function(v6)
        local v7 = 0;
        local v8 = {};
        for _, v10 in pairs(v5) do
            local v11 = false;
            local l_id_0 = v10.id;
            local l_isFriend_0 = v10.isFriend;
            local v14 = 0;
            assert(typeof(l_isFriend_0) == "boolean", "Expected isFriend to be a string");
            local v15 = v6:getState().Users[l_id_0];
            if not v15 then
                v11 = true;
                v14 = not l_isFriend_0 and 0 or 1;
            elseif not v2.compare(v15, v10) then
                v11 = true;
                if v15.isFriend ~= l_isFriend_0 then
                    v14 = not l_isFriend_0 and -1 or 1;
                end;
            end;
            if v11 then
                v7 = v7 + v14;
                v8[l_id_0] = v10;
            end;
        end;
        if next(v8) then
            v6:dispatch(v3(v8));
        end;
        if v7 ~= 0 then
            v6:dispatch(l_SetFriendCount_0(v6:getState().FriendCount + v7));
        end;
    end;
end;


return {
    ApiFetchUsersPresences = require(script.ApiFetchUsersPresences),
    PreloadUsersThumbnail = require(script.PreloadUsersThumbnail),
    UpdateUsers = require(script.UpdateUsers)
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UserLib");
local v1 = require(l_script_FirstAncestor_0.Utils.Constants);
local v2 = require(l_script_FirstAncestor_0.Utils.ThumbnailRequest);
return {
    USER_CAROUSEL = {
        v2.fromData(v1.RbxAvatarThumbnailTypesFromEnum.AvatarThumbnail, v1.RbxThumbnailSizes.Size100x100)
    },
    USER_CAROUSEL_HEAD_SHOT = {
        v2.fromData(v1.RbxAvatarThumbnailTypesFromEnum.HeadShot, v1.RbxThumbnailSizes.Size150x150)
    },
    USER_CAROUSEL_AVATAR_THUMBNAIL = {
        v2.fromData(v1.RbxAvatarThumbnailTypesFromEnum.AvatarThumbnail, v1.RbxThumbnailSizes.Size150x150)
    },
    HOME_HEADER_USER = {
        v2.fromData(v1.RbxAvatarThumbnailTypesFromEnum.HeadShot, v1.RbxThumbnailSizes.Size150x150)
    },
    FRIEND_CAROUSEL = {
        v2.fromData(v1.RbxAvatarThumbnailTypesFromEnum.HeadShot, v1.RbxThumbnailSizes.Size48x48)
    },
    CUSTOMIZE_BUTTON = {
        v2.fromData(v1.RbxAvatarThumbnailTypesFromEnum.AvatarThumbnail, v1.RbxThumbnailSizes.Size720x720)
    }
};


local v0 = {
    RbxAvatarThumbnailTypesFromEnum = {
        HeadShot = Enum.ThumbnailType.HeadShot.Name,
        AvatarBust = Enum.ThumbnailType.AvatarBust.Name,
        AvatarThumbnail = Enum.ThumbnailType.AvatarThumbnail.Name
    },
    RbxthumbTypes = {
        Asset = "Asset",
        AutoGeneratedAsset = "AutoGeneratedAsset",
        Avatar = "Avatar",
        AvatarBust = "AvatarBust",
        AvatarHeadShot = "AvatarHeadShot",
        BadgeIcon = "BadgeIcon",
        BundleThumbnail = "BundleThumbnail",
        DeveloperProduct = "DeveloperProduct",
        FontFamily = "FontFamily",
        GameIcon = "GameIcon",
        GamePass = "GamePass",
        GameThumbnail = "GameThumbnail",
        GroupIcon = "GroupIcon",
        Outfit = "Outfit"
    }
};
v0.RbxAvatarThumbnailTypeFromEnumToRbxthumbType = {
    [v0.RbxAvatarThumbnailTypesFromEnum.HeadShot] = v0.RbxthumbTypes.AvatarHeadShot,
    [v0.RbxAvatarThumbnailTypesFromEnum.AvatarBust] = v0.RbxthumbTypes.AvatarBust,
    [v0.RbxAvatarThumbnailTypesFromEnum.AvatarThumbnail] = v0.RbxthumbTypes.Avatar
};
v0.RbxThumbnailSizes = {
    Size48x48 = "Size48x48",
    Size60x60 = "Size60x60",
    Size100x100 = "Size100x100",
    Size150x150 = "Size150x150",
    Size352x352 = "Size352x352",
    Size720x720 = "Size720x720"
};
v0.RbxThumbnailSizeToNumberSize = {
    [v0.RbxThumbnailSizes.Size48x48] = 48,
    [v0.RbxThumbnailSizes.Size60x60] = 60,
    [v0.RbxThumbnailSizes.Size100x100] = 100,
    [v0.RbxThumbnailSizes.Size150x150] = 150,
    [v0.RbxThumbnailSizes.Size352x352] = 352,
    [v0.RbxThumbnailSizes.Size720x720] = 720
};
return v0;


local v0 = require(script:FindFirstAncestor("UserLib").Utils.Constants);
local v1 = {
    new = function()
        return {
            thumbnailType = v0.RbxAvatarThumbnailTypesFromEnum.HeadShot,
            thumbnailSize = v0.RbxThumbnailSizes.Size150x150
        };
    end
};
v1.fromData = function(v2, v3)
    local v4 = v1.new();
    v4.thumbnailType = v2;
    v4.thumbnailSize = v3;
    return v4;
end;
return v1;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UserLib");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_script_FirstAncestor_0.Models.User);
local v3 = require(l_script_FirstAncestor_0.Enum.WebPresenceMap);
local l_ConvertUniverseIdToString_0 = require(l_Parent_0.SharedFlags).ConvertUniverseIdToString;
game:DefineFastFlag("LuaAppFixActiveGameLoadingCheck", false);
return function(v5, v6)
    local v7 = {};
    if not game:GetFastFlag("LuaAppFixActiveGameLoadingCheck") or v6:getState().UniversePlaceInfos then
        for _, v9 in pairs(v5) do
            local v10 = l_ConvertUniverseIdToString_0(v9.universeId);
            if not (not (v3[v9.userPresenceType] == v2.PresenceType.IN_GAME) or v6:getState().UniversePlaceInfos[v10]) then
                table.insert(v7, v9.placeId);
            end;
        end;
        return v7;
    else
        return v7;
    end;
end;


local _ = require(script.Parent.Constants);
return function(v1, v2, v3, v4)
    local v5 = string.format("rbxthumb://type=%s&id=%s&w=%d&h=%d", v2, tostring(v1), v3, v3);
    if v4 then
        v5 = v5 .. "&filters=circular";
    end;
    return v5;
end;


local v0 = require(script.Parent.getRbxthumbWithTypeSizeAndOptions);
local v1 = require(script.Parent.Constants);
return function(v2)
    return v0(v2, v1.RbxthumbTypes.AvatarHeadShot, 150);
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UserLib");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_script_FirstAncestor_0.Actions.ReceivedUserPresence);
local l_UpdateFriendPresenceCounts_0 = require(l_Parent_0.LegacyFriendsRodux).Actions.UpdateFriendPresenceCounts;
local v4 = require(l_script_FirstAncestor_0.Enum.WebPresenceMap);
return function(v5, v6)
    for _, v8 in pairs(v5) do
        local v9 = v6:getState().Users[tostring(v8.userId)];
        v6:dispatch(v2(tostring(v8.userId), v4[v8.userPresenceType], v8.lastLocation, not not v8.placeId and tostring(v8.placeId) or nil, not not v8.rootPlaceId and tostring(v8.rootPlaceId) or nil, not not v8.gameId and tostring(v8.gameId) or nil, not not v8.lastOnline and tostring(v8.lastOnline) or nil, v8.universeId, not not v9 and v9.universeId or nil));
    end;
    local v10 = {};
    for _, v12 in pairs(v6:getState().Users) do
        if not (not v12.isFriend or not v12.presence) then
            v10[v12.presence] = (v10[v12.presence] or 0) + 1;
        end;
    end;
    v6:dispatch(l_UpdateFriendPresenceCounts_0(v10));
end;


return {
    Enum = require(script.Enum),
    Models = require(script.Models),
    Reducers = require(script.Reducers),
    Actions = require(script.Actions),
    Utils = require(script.Utils),
    Thunks = require(script.Thunks),
    Requests = require(script.Requests)
};


local v0 = require(script.Parent.EventNames);
local l_DiagEventTypes_0 = require(script:FindFirstAncestor("UserProfiles").Parent.SocialLuaAnalytics).Analytics.Enums.DiagEventTypes;
local v2 = require(script.Parent.ErrorCodesForLogging);
return {
    [v0.UserProfilesRequestBegin] = {
        name = game:DefineFastString("UserProfilesRequestBegin", "UserProfilesRequestBegin")
    },
    [v0.UserProfilesRequestSuccess] = {
        name = game:DefineFastString("UserProfilesRequestSuccess", "UserProfilesRequestSuccess")
    },
    [v0.UserProfilesRequestFail] = {
        name = game:DefineFastString("UserProfilesRequestFail", "UserProfilesRequestFail")
    },
    [v0.UserProfilesRequestFailAfterRetry] = {
        name = game:DefineFastString("UserProfilesRequestFailAfterRetry", "UserProfilesRequestFailAfterRetry")
    },
    [v0.UserProfilesRequestSuccessAfterRetry] = {
        name = game:DefineFastString("UserProfilesRequestSuccessAfterRetry", "UserProfilesRequestSuccessAfterRetry")
    },
    [v0.UserProfilesErrorCode] = {
        type = l_DiagEventTypes_0.Counter,
        name = function(v3)
            local v4 = tostring(v3.status);
            local l_UserProfilesErrorCode_0 = v0.UserProfilesErrorCode;
            if not v2[v4] then
                return l_UserProfilesErrorCode_0 .. "Other";
            else
                return l_UserProfilesErrorCode_0 .. v4;
            end;
        end
    },
    [v0.UserProfilesUnmountEarly] = {
        type = l_DiagEventTypes_0.Counter,
        name = game:DefineFastString("UserProfilesUnmountEarly", "UserProfilesUnmountEarly")
    }
};


return {
    UserProfilesRequestBegin = "UserProfilesRequestBegin",
    UserProfilesRequestSuccess = "UserProfilesRequestSuccess",
    UserProfilesRequestFail = "UserProfilesRequestFail",
    UserProfilesRequestFailAfterRetry = "UserProfilesRequestFailAfterRetry",
    UserProfilesRequestSuccessAfterRetry = "UserProfilesRequestSuccessAfterRetry",
    UserProfilesRequestFailDuration = game:DefineFastString("UserProfilesRequestFailDuration", "UserProfilesRequestFailDuration"),
    UserProfilesRequestFailAfterRetryDuration = game:DefineFastString("UserProfilesRequestFailAfterRetryDuration", "UserProfilesRequestFailAfterRetryDuration"),
    UserProfilesRequestSuccessDuration = game:DefineFastString("UserProfilesRequestSuccessDuration", "UserProfilesRequestSuccessDuration"),
    UserProfilesRequestSuccessAfterRetryDuration = game:DefineFastString("UserProfilesRequestSuccessAfterRetryDuration", "UserProfilesRequestSuccessAfterRetryDuration"),
    UserProfilesErrorCode = "UserProfilesErrorCode",
    UserProfilesUnmountEarly = "UserProfilesUnmountEarly"
};


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Parent.SocialLuaAnalytics);
local l_fireDiagCounter_0 = v1.Analytics.FireEvent.fireDiagCounter;
local l_fireDiag_0 = v1.Analytics.FireEvent.fireDiag;
local v4 = require(l_Parent_0.Flags.FFlagUserProfilesLogErrorCodes);
local v5 = require(script.Parent.DiagCountersList);
local _ = require(script.Parent.EventNames);
return function(v7)
    if not v4 then
        local v8 = l_fireDiagCounter_0({
            diagImpl = v7.analytics.Diag,
            eventList = v5
        });
        return function(v9)
            if not v5[v9] then
                return v9;
            else
                return v8(v9);
            end;
        end;
    else
        local v10 = l_fireDiag_0({
            diagImpl = v7.analytics.Diag,
            eventList = v5
        });
        return function(v11, v12)
            if not v5[v11] then
                return v11;
            else
                return v10(v11, v12);
            end;
        end;
    end;
end;


game:DefineFastFlag("UplevelAliasIXPSetupEnabled_v4", false);
game:DefineFastFlag("UplevelAliasIXPEnabled", false);
game:DefineFastFlag("UplevelAliasEnabledForAll", false);
local l_Parent_0 = script:FindFirstAncestor("UserProfiles").Parent;
local v1 = require(l_Parent_0.RoactAppExperiment);
local l_getFStringSocialFriendsLayer_0 = require(l_Parent_0.SharedFlags).getFStringSocialFriendsLayer;
local l_useUserExperiment_0 = v1.useUserExperiment;
local function v4()
    return game:GetFastFlag("UplevelAliasIXPSetupEnabled_v4");
end;
local function _()
    return game:GetFastFlag("UplevelAliasIXPEnabled");
end;
local function _()
    return game:GetFastFlag("UplevelAliasEnabledForAll");
end;
local function v10(v7)
    local v8 = (v7 or {})[l_getFStringSocialFriendsLayer_0()] or {};
    local v9;
    if game:GetFastFlag("UplevelAliasIXPEnabled") then
        v9 = true;
        if not (v8.include_alias_in_combined_name ~= true) then
            goto label0;
        end;
    end;
    v9 = game:GetFastFlag("UplevelAliasEnabledForAll");
    ::label0::;
    return v9;
end;
return {
    isSetupEnabled = v4,
    isExperimentEnabled = v10,
    useIsExperimentEnabled = function()
        return l_useUserExperiment_0({
            l_getFStringSocialFriendsLayer_0()
        }, v10);
    end
};


local v0 = require(script:FindFirstAncestor("UserProfiles").Parent.VerifiedBadges);
return function(v1, v2)
    if not v2.hasVerifiedBadge then
        if not v2.hasPremiumMembership then
            return v1;
        else
            return (("%*%*"):format(v1, v0.emoji.premium));
        end;
    else
        return (("%*%*"):format(v1, v0.emoji.verified));
    end;
end;


return {
    formatPrimaryName = require(script.formatPrimaryName),
    formatUsername = require(script.formatUsername)
};


return {
    useUserProfilesFetch = require(script.useUserProfilesFetch)
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UserProfiles");
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.Analytics.setupFireDiag);
local v5 = require(l_script_FirstAncestor_0.Analytics.EventNames);
local v6 = require(l_script_FirstAncestor_0.Analytics.UserProfilesAnalytics);
local v7 = require(l_Parent_0.SocialCommon);
local l_getDeepValue_0 = require(l_Parent_0.LuaSocialLibrariesDeps).SocialLibraries.config({}).Dictionary.getDeepValue;
local l_useApolloAutoRetry_0 = v7.Hooks.useApolloAutoRetry;
local l_useEffectOnce_0 = v3.Hooks.useEffectOnce;
local l_useEffectOnMount_0 = v3.Hooks.useEffectOnMount;
local l_useQuery_0 = require(l_Parent_0.ApolloClient).useQuery;
local v13 = game:DefineFastFlag("UserProfilesEnableRetries", false);
local v14 = require(l_script_FirstAncestor_0.Flags.FFlagUserProfilesLogCancelledRequests);
local v15 = require(l_script_FirstAncestor_0.Flags.FFlagUserProfilesLogErrorCodes);
local v16 = game:DefineFastInt("UserProfileDefaultRetryCount", 2);
return function(v17)
    local v18 = l_useQuery_0(v17.query, {
        errorPolicy = "all",
        variables = {
            userIds = v17.userIds
        }
    });
    local l_v18_0 = v18;
    if v13 then
        l_v18_0 = l_useApolloAutoRetry_0(v18, {
            retryCount = if not v17.overrideRetryCount then v16 else v17.overrideRetryCount
        });
    end;
    local v20 = v2.useRef(l_v18_0.loading or l_v18_0.isRetrying);
    if v14 then
        v20.current = l_v18_0.loading or l_v18_0.isRetrying;
    end;
    local v21 = v2.useMemo(function()
        return v4({
            analytics = {
                Diag = v6.Diag
            }
        });
    end, {});
    local v22 = v2.useRef(DateTime.now());
    l_useEffectOnMount_0(function()
        v22.current = DateTime.now();
        v21(v5.UserProfilesRequestBegin);
    end);
    if v13 then
        l_useEffectOnce_0(function()
            local v23 = nil;
            if v22.current then
                v23 = DateTime.now().UnixTimestampMillis - v22.current.UnixTimestampMillis;
                v21(v5.UserProfilesRequestFail);
                v6.Diag:reportStats(v5.UserProfilesRequestFailDuration, v23);
                if v15 then
                    local v24 = l_getDeepValue_0(l_v18_0, "error.graphQLErrors");
                    if v24 then
                        v21(v5.UserProfilesErrorCode, {
                            status = l_getDeepValue_0(v24[1] or {}, "extensions.status")
                        });
                    end;
                end;
            end;
        end, l_v18_0.error);
        local l_l_useEffectOnce_0_0 = l_useEffectOnce_0;
        local function v28()
            local v26 = nil;
            if v22.current then
                v26 = DateTime.now().UnixTimestampMillis - v22.current.UnixTimestampMillis;
                if l_v18_0.data and l_v18_0.retryCount == 0 then
                    v21(v5.UserProfilesRequestSuccess);
                    v6.Diag:reportStats(v5.UserProfilesRequestSuccessDuration, v26);
                    return ;
                elseif not l_v18_0.data then
                    v21(v5.UserProfilesRequestFailAfterRetry);
                    v6.Diag:reportStats(v5.UserProfilesRequestFailAfterRetryDuration, v26);
                    if v15 then
                        local v27 = l_getDeepValue_0(l_v18_0, "error.graphQLErrors");
                        if v27 then
                            v21(v5.UserProfilesErrorCode, {
                                status = l_getDeepValue_0(v27[1] or {}, "extensions.status")
                            });
                        end;
                    end;
                else
                    v21(v5.UserProfilesRequestSuccessAfterRetry);
                    v6.Diag:reportStats(v5.UserProfilesRequestSuccessAfterRetry, v26);
                    return ;
                end;
            end;
        end;
        local v29;
        if not v14 then
            v29 = false;
            if l_v18_0.loading == false then
                v29 = l_v18_0.isRetrying == false;
            end;
        else
            v29 = not v20.current;
        end;
        l_l_useEffectOnce_0_0(v28, v29);
    end;
    if v14 then
        v2.useEffect(function()
            return function()
                if v20.current then
                    v21(v5.UserProfilesUnmountEarly);
                end;
            end;
        end, {});
    end;
    return l_v18_0;
end;


local _ = require(script:FindFirstAncestor("UserProfiles").Parent.ApolloClient);
return function(v1)
    local l_client_0 = v1.client;
    local l_query_0 = v1.query;
    local l_userId_0 = v1.userId;
    local l_names_0 = v1.names;
    local _ = "";
    l_client_0:writeQuery({
        variables = {
            userIds = {
                l_userId_0
            }
        },
        query = l_query_0,
        data = {
            userProfiles = {
                {
                    __typename = "UserProfile",
                    id = l_userId_0,
                    names = {
                        __typename = "Names",
                        combinedName = if l_names_0.alias ~= "" then l_names_0.alias else if l_names_0.contactName ~= "" then l_names_0.contactName else if l_names_0.displayName ~= "" then l_names_0.displayName else l_names_0.username,
                        alias = l_names_0.alias,
                        contactName = l_names_0.contactName,
                        displayName = l_names_0.displayName,
                        username = l_names_0.username
                    }
                }
            }
        }
    });
end;


local v0 = require(script.Parent.getUserProfileFromId);
return function(v1, v2)
    local v3 = v0(v1, v2);
    if not v3.names then
        return nil;
    else
        return v3.names.combinedName;
    end;
end;


local v0 = require(script.Parent.getUserProfileFromId);
return function(v1, v2)
    local v3 = v0(v1, v2);
    if not v3.names then
        return nil;
    else
        return v3.names.displayName;
    end;
end;


local v0 = require(script.Parent.getUserProfileFromId);
return function(v1, v2)
    local v3 = v0(v1, v2);
    if not v3.names then
        return nil;
    else
        return v3.names.platformName;
    end;
end;


local v0 = require(script.Parent.getUserProfileFromId);
return function(v1, v2)
    return v0(v1, v2).platformProfileId;
end;


local v0 = require(script:FindFirstAncestor("UserProfiles").Parent.Cryo);
return function(v1, v2)
    return v1.userProfiles[v0.List.findWhere(v1.userProfiles, function(v3, _)
        return v3.id == tostring(v2);
    end)] or {};
end;


local v0 = require(script.Parent.getUserProfileFromId);
return function(v1, v2)
    local v3 = v0(v1, v2);
    if not v3.names then
        return nil;
    else
        return v3.names.username;
    end;
end;


return {
    getUserProfileFromId = require(script.getUserProfileFromId),
    getCombinedNameFromId = require(script.getCombinedNameFromId),
    getUsernameFromId = require(script.getUsernameFromId),
    getDisplayNameFromId = require(script.getDisplayNameFromId),
    getPlatformNameFromId = require(script.getPlatformNameFromId),
    getPlatformProfileIdFromId = require(script.getPlatformProfileIdFromId)
};


return {
    writeProfileDataToCache = require(script.writeProfileDataToCache)
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UserProfiles");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_script_FirstAncestor_0.Common.Queries);
local v3 = require(l_Parent_0.Cryo);
local _ = require(l_Parent_0.ApolloClient);
return function(v5, v6, v7)
    local v8 = if not not v7 and v7.query then v7.query else v2.userProfilesAllNamesByUserIds;
    for v9, v10 in v6, nil, nil do
        v5:writeQuery({
            variables = {
                userIds = v9
            },
            query = v8,
            data = {
                userProfiles = {
                    {
                        __typename = "UserProfile",
                        id = v9,
                        names = v3.Dictionary.join({
                            __typename = "Names",
                            alias = "",
                            contactName = "",
                            displayName = "",
                            username = "",
                            platformName = ""
                        }, v10)
                    }
                }
            }
        });
    end;
end;


local l_Parent_0 = script:FindFirstAncestor("UserProfiles").Parent;
local _ = require(l_Parent_0.ApolloClient);
local _ = require(l_Parent_0.React);
local l_useUserProfilesFetch_0 = require(script.Parent.Hooks).useUserProfilesFetch;
return function(v4)
    return v4.renderComponent((l_useUserProfilesFetch_0({
        userIds = v4.userIds,
        query = v4.query
    })));
end;


local v0 = require(script:FindFirstAncestor("UserProfiles").Parent.Dev.JestConfigs);
return {
    displayName = "UserProfiles",
    testMatch = {
        "**/*.test"
    },
    setupFilesAfterEnv = {
        v0.setupFiles.LogHandler,
        v0.setupFiles.UIBloxInitializer,
        v0.setupFiles.createPromiseRejectionHandler()
    }
};


return {
    Hooks = require(script.Parent.Hooks),
    Flags = require(script.Parent.Flags),
    Formatters = require(script.Parent.Formatters),
    Selectors = require(script.Parent.Selectors),
    Queries = require(script.Parent.Common.Queries),
    Mutations = require(script.Parent.Mutations),
    TestUtils = require(script.Parent.TestUtils),
    UserProfilesFetchWrapper = require(script.Parent.UserProfilesFetchWrapper),
    ["jest.config"] = script.Parent["jest.config"]
};


local l_Parent_0 = script.Parent.Parent;
return {
    projects = {
        require(l_Parent_0.AbuseReportMenu)["jest.config"],
        require(l_Parent_0.InGameAssetReporting)["jest.config"]
    }
};


local l_DiagEventTypes_0 = require(script:FindFirstAncestor("UserSearch").Parent.SocialLuaAnalytics).Analytics.Enums.DiagEventTypes;
local v1 = require(script.Parent.EventNames);
local v2 = {
    Done = game:DefineFastString("UserSearchLoadingTimeDoneStats", "UserSearchLoadingTimeDone"),
    Failed = game:DefineFastString("UserSearchLoadingTimeFailedStats", "UserSearchLoadingTimeFailed")
};
local v3 = {
    Done = game:DefineFastString("UserSearchLoadingTimeNextPageDoneStats", "UserSearchLoadingTimeNextPageDone"),
    Failed = game:DefineFastString("UserSearchLoadingTimeNextPageFailedStats", "UserSearchLoadingTimeNextPageFailed")
};
return {
    [v1.PlayerFriendRequest] = {
        type = l_DiagEventTypes_0.Counter,
        name = game:DefineFastString("UserSearchPlayerFriendRequestCounter", "UserSearchPlayerFriendRequest")
    },
    [v1.PlayerFriendAccept] = {
        type = l_DiagEventTypes_0.Counter,
        name = game:DefineFastString("UserSearchPlayerFriendAcceptCounter", "UserSearchPlayerFriendAccept")
    },
    [v1.PlayerTileClick] = {
        type = l_DiagEventTypes_0.Counter,
        name = game:DefineFastString("UserSearchPlayerTileClickCounter", "UserSearchPlayerTileClick")
    },
    [v1.PlayerTileImpressions] = {
        type = l_DiagEventTypes_0.Counter,
        name = game:DefineFastString("UserSearchPlayerTileImpressionsCounter", "UserSearchPlayerTileImpressions"),
        count = function(v4)
            if not v4 or not v4.playerId then
                return 0;
            else
                return #v4.playerId;
            end;
        end
    },
    [v1.UserSearchLoadingTime] = {
        type = l_DiagEventTypes_0.Stats,
        name = function(v5)
            if not v5.nextPage then
                return v2[v5.status];
            else
                return v3[v5.status];
            end;
        end,
        stats = function(v6)
            return v6.loadingTime or 0;
        end
    }
};


return {
    PlayerTileImpressions = "PlayerTileImpressions",
    NavigateToAddFriendsBtn = "NavigateToAddFriendsBtn",
    PlayerFriendRequest = "PlayerFriendRequest",
    PlayerFriendAccept = "PlayerFriendAccept",
    PlayerTileClick = "PlayerTileClick",
    UserSearchLoadingTime = "UserSearchLoadingTime"
};


local l_Parent_0 = script:FindFirstAncestor("UserSearch").Parent;
local l_LocalizationService_0 = game:GetService("LocalizationService");
local l_Enums_0 = require(l_Parent_0.SocialLuaAnalytics).Analytics.Enums;
local l_Contexts_0 = l_Enums_0.Contexts;
local l_EventTypes_0 = l_Enums_0.EventTypes;
local v5 = require(script.Parent.EventNames);
local v6 = require(script.Parent.BtnValues);
local function v8(v7)
    if not v7 then
        return "";
    else
        return (table.concat(v7, ","));
    end;
end;
local function v10(v9)
    return v9;
end;
return {
    [v5.PlayerTileImpressions] = {
        context = l_Contexts_0.PlayerSearch,
        eventType = l_EventTypes_0.PlayerTileImpressions,
        formatRulesForAdditionalInfo = {
            tilePos = v8,
            playerId = v8,
            playerName = v8
        }
    },
    [v5.NavigateToAddFriendsBtn] = {
        context = l_Contexts_0.PlayerSearch,
        eventType = l_EventTypes_0.ButtonClick,
        additionalInfo = {
            btn = v6.NavigateToAddFriends
        }
    },
    [v5.PlayerFriendRequest] = {
        context = l_Contexts_0.PlayerSearch,
        eventType = l_EventTypes_0.PlayerFriendAdd,
        formatRulesForAdditionalInfo = {
            playerId = v10,
            tilePos = v10,
            contextualInfoType = v10
        },
        additionalInfo = {
            locale = l_LocalizationService_0.RobloxLocaleId
        }
    },
    [v5.PlayerFriendAccept] = {
        context = l_Contexts_0.PlayerSearch,
        eventType = l_EventTypes_0.PlayerFriendAccept,
        formatRulesForAdditionalInfo = {
            playerId = v10,
            tilePos = v10,
            contextualInfoType = v10
        },
        additionalInfo = {
            locale = l_LocalizationService_0.RobloxLocaleId
        }
    },
    [v5.PlayerTileClick] = {
        context = l_Contexts_0.PlayerSearch,
        eventType = l_EventTypes_0.PlayerTileClick,
        formatRulesForAdditionalInfo = {
            playerId = v10,
            tilePos = v10,
            contextualInfoType = v10
        },
        additionalInfo = {
            locale = l_LocalizationService_0.RobloxLocaleId
        }
    },
    [v5.UserSearchLoadingTime] = {
        context = l_Contexts_0.PlayerSearch,
        eventType = l_EventTypes_0.LoadingTime,
        formatRulesForAdditionalInfo = {
            status = v10,
            loadingTime = v10,
            loadingThreshold = v10,
            nextPage = v10
        },
        additionalInfo = {
            fetch = "userSearch",
            locale = l_LocalizationService_0.RobloxLocaleId
        }
    }
};


local v0 = require(script:FindFirstAncestor("UserSearch").Parent.SocialLuaAnalytics);
local l_createFireEvent_0 = v0.Analytics.FireEvent.createFireEvent;
local l_AnalyticsFactory_0 = v0.Analytics.AnalyticsFactory;
local l_DefaultAnalyticsService_0 = v0.Analytics.DefaultAnalyticsService;
local v4 = require(script.EventStreamActionList);
return {
    setupFireEvent = l_createFireEvent_0({
        EventStream = v4
    }),
    EventNames = require(script.EventNames),
    Analytics = l_AnalyticsFactory_0.setUpAnalyticsFactory({
        eventLists = {
            EventStream = v4,
            Diag = require(script.DiagEventsList)
        },
        analyticsImpl = {
            EventStream = l_DefaultAnalyticsService_0.EventStream,
            Diag = l_DefaultAnalyticsService_0.Diag
        }
    })
};


return {
    query = require(script:FindFirstAncestor("UserSearch").Parent.ApolloClient).gql("\tquery ProfilesInsights($userIds: [String] Int, $pageId: String) {\n\t\tprofilesInsights(userIds: $userIds, count: $count, pageId: $pageId) {\n\t\t\tid\n\t\t\tprofileInsights {\n\t\t\t\ttargetUserId\n\t\t\t\tisOfflineFrequents\n\t\t\t\tmutualFriends {\n\t\t\t\t\tid\n\t\t\t\t\tusername\n\t\t\t\t\tdisplayName\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"),
    createPageId = function(v0)
        return "PROFILE_INSIGHTS_SEARCH_PAGE_ID" .. ":" .. v0;
    end
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UserSearch");
local _ = require(l_script_FirstAncestor_0.Parent.React);
local v2 = require(script.Parent.usePaginatedProfileInsightsFetch);
local _ = require(l_script_FirstAncestor_0.Common.LocalTypes);
return function(v4)
    return v4.renderComponent(v2({
        users = v4.users or {},
        searchKeyword = v4.searchParameters.searchKeyword
    }) or {});
end;


local l_Parent_0 = script:FindFirstAncestor("UserSearch").Parent;
local v1 = require(l_Parent_0.React);
local v2 = require(l_Parent_0.Dash);
local function v5(v3, v4)
    return v2.slice(v3, v4 + 1);
end;
return function(v6)
    local v7 = v6.users or {};
    local v8, v9 = v1.useState(0);
    local v10, v11 = v1.useState(v7);
    v1.useEffect(function()
        v11(v5(v7, v8));
        v9(#v7);
    end, {
        #v7
    });
    return v10;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UserSearch");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.React);
local v3 = require(l_Parent_0.Dash);
local v4 = require(script.Parent.useProfileInsightsFetch);
local v5 = require(script.Parent.useMatchSearchPagination);
local _ = require(l_script_FirstAncestor_0.Common.LocalTypes);
local _ = require(l_Parent_0.GraphQLServer);
local function v11(v8)
    return v3.reduce(v8, function(v9, v10)
        v9[v10.targetUserId] = v10;
        return v9;
    end, {});
end;
return function(v12)
    local v13 = v5({
        users = v12.users or {}
    });
    local v15 = v4(v2.useMemo(function()
        return v3.map(v13, function(v14)
            return v14.id;
        end);
    end, {
        v13
    }), v12.searchKeyword);
    local v16 = if not not v15.data and v15.data.profilesInsights then v15.data.profilesInsights.profileInsights else {};
    return (v2.useMemo(function()
        return v11(v16);
    end, {
        v16
    }));
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UserSearch");
local l_useQuery_0 = require(l_script_FirstAncestor_0.Parent.ApolloClient).useQuery;
local v2 = require(l_script_FirstAncestor_0.Apollo.ProfilesInsightsQuery);
return function(v3, v4)
    return (l_useQuery_0(v2.query, {
        errorPolicy = "all",
        skip = not v3 or #v3 == 0,
        variables = {
            userIds = v3,
            pageId = v2.createPageId(v4)
        }
    }));
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UserSearch");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.React);
local v3 = require(l_Parent_0.Cryo);
local v4 = require(l_Parent_0.UIBlox);
local l_PlayerTile_0 = v4.App.Tile.PlayerTile;
local l_useStyle_0 = v4.Core.Style.useStyle;
local l_Enums_0 = require(l_Parent_0.LuaSocialLibrariesDeps).NetworkingFriends.Enums;
local v8 = nil;
v8 = if not require(l_Parent_0.SharedFlags).GetFFlagEnableAppCommonInputHooks() then require(l_Parent_0.ReactFocusNavigation).useLastInputMode else require(l_Parent_0.FocusNavigationUtils).useLastInputMode;
local l_SetCentralOverlay_0 = require(l_Parent_0.CentralOverlay).Actions.SetCentralOverlay;
local l_useDispatch_0 = require(l_Parent_0.RoactUtils).Hooks.RoactRodux.useDispatch;
local v11 = require(script.Parent.useContextualInfo);
local v12 = require(script.Parent.useSearchTileButtons);
local v13 = require(script.Parent.useProfileNames);
local v14 = require(script.Parent.useRelationshipSelector);
local v15 = require(l_script_FirstAncestor_0.Analytics.EventNames);
local _ = require(l_script_FirstAncestor_0.Common.LocalTypes);
local _ = require(l_Parent_0.GraphQLServer);
local l_FFlagEnableFriendsLandingControllerBar_0 = require(l_Parent_0.SharedFlags).FFlagEnableFriendsLandingControllerBar;
local function _(v19)
    return string.format("rbxthumb://type=Avatar&id=%s&w=720&h=720", (tostring(v19)));
end;
return function(v21)
    local l_user_0 = v21.user;
    local v23 = l_useStyle_0();
    local v24 = l_useDispatch_0();
    local v25 = v14(l_user_0.id);
    local v26 = if not l_FFlagEnableFriendsLandingControllerBar_0 then nil else v8();
    local v27, v28 = v11({
        userId = l_user_0.id,
        previousUsernames = l_user_0.previousUsernames,
        searchKeyword = v21.searchParameters.searchKeyword,
        profileInsight = v21.profileInsight
    });
    local function v31(v29, v30)
        if v21.fireAnalyticsEvent then
            v21.fireAnalyticsEvent(v29, v3.Dictionary.join({
                playerId = l_user_0.id,
                tilePos = v21.index,
                contextualInfoType = v28
            }, v30 or {}));
        end;
    end;
    local function v32()
        if l_FFlagEnableFriendsLandingControllerBar_0 and v26 == "Focus" then
            v24(l_SetCentralOverlay_0("PlayerContextualMenu", {
                subjectUserId = l_user_0.id,
                robloxFriendshipStatus = v25.status,
                friendshipOriginSourceType = l_Enums_0.FriendshipOriginSourceType.PlayerSearch.rawValue()
            }));
        else
            v21.luaAppNavigation.navigateToUserInfo({
                userId = l_user_0.id,
                index = v21.index,
                hasEmphasis = v21.hasEmphasis,
                contextualInfoType = v28,
                contextualInfoDisplay = v27
            });
        end;
        if v31 then
            v31(v15.PlayerTileClick, {
                hasEmphasis = v21.hasEmphasis
            });
        end;
    end;
    local v33 = v12({
        userId = l_user_0.id,
        index = v21.index,
        contextualInfoType = v28
    }, v21.luaAppNetworkingRequests, v31);
    local v34 = not not v27 and {
        text = v27.text,
        fontStyle = v23.Font.CaptionBody,
        icon = v27.icon
    } or nil;
    local v35 = v13({
        userId = l_user_0.id
    });
    return v2.createElement(l_PlayerTile_0, {
        tileSize = v21.size,
        title = v35 and v35.combinedName,
        subtitle = v35 and v35.username,
        thumbnail = string.format("rbxthumb://type=Avatar&id=%s&w=720&h=720", (tostring(l_user_0.id))),
        onActivated = v32,
        buttons = if not not l_FFlagEnableFriendsLandingControllerBar_0 and v26 == "Focus" then nil else v33,
        relevancyInfo = v34,
        Selectable = not not l_FFlagEnableFriendsLandingControllerBar_0 or nil
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UserSearch");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local l_useLocalization_0 = require(l_Parent_0.Localization).Hooks.useLocalization;
local v3 = require(script.Parent.useRelationshipSelector);
local _ = require(l_script_FirstAncestor_0.Common.LocalTypes);
local _ = require(l_Parent_0.GraphQLServer);
local l_Images_0 = require(l_Parent_0.UIBlox).App.ImageSet.Images;
local v7 = require(l_Parent_0.SocialCommon);
local l_useMutualFriendsText_0 = v7.Hooks.useMutualFriendsText;
local l_ContextualInfoTypes_0 = v7.Enums.ContextualInfoTypes;
local v10 = l_Images_0["icons/status/player/friend"];
local v11 = l_Images_0["icons/status/player/following"];
local function _(v12, v13)
    if not v12 or #v12 == 0 then
        return false;
    else
        for v14 = 1, #v12 do
            if v12[v14] == v13 then
                return true;
            end;
        end;
        return false;
    end;
end;
return function(v16)
    local v17 = v3(v16.userId);
    local v18 = l_useLocalization_0({
        youAreFriends = "Feature.PlayerSearchResults.Label.YouAreFriends",
        youAreFollowing = "Feature.PlayerSearchResults.Label.YouAreFollowing",
        previously = "Feature.PlayerSearchResults.Label.Previously",
        thisIsYou = "Feature.PlayerSearchResults.Label.ThisIsYou",
        frequents = "Feature.Friends.Label.Frequent"
    });
    local l_profileInsight_0 = v16.profileInsight;
    local v20 = (not not l_profileInsight_0 and l_profileInsight_0.mutualFriends) and #l_profileInsight_0.mutualFriends or 0;
    local v21 = l_useMutualFriendsText_0(v20);
    if not v17.isMyself then
        local l_previousUsernames_0 = v16.previousUsernames;
        local l_searchKeyword_0 = v16.searchKeyword;
        local v24;
        if not l_previousUsernames_0 or #l_previousUsernames_0 == 0 then
            v24 = false;
        else
            for v25 = 1, #l_previousUsernames_0 do
                if l_previousUsernames_0[v25] == l_searchKeyword_0 then
                    v24 = true;
                    goto label0 --[[  true, false  ]];
                end;
            end;
            v24 = false;
        end;
        ::label0::;
        if not v24 then
            if v17.status == Enum.FriendStatus.Friend then
                return {
                    text = v18.youAreFriends,
                    icon = v10
                }, l_ContextualInfoTypes_0.Friend;
            elseif v17.following == true then
                return {
                    text = v18.youAreFollowing,
                    icon = v11
                }, l_ContextualInfoTypes_0.Following;
            else
                if l_profileInsight_0 then
                    if v20 > 0 then
                        return {
                            text = v21,
                            icon = v10
                        }, l_ContextualInfoTypes_0.MutualFriends;
                    elseif l_profileInsight_0.isOfflineFrequents then
                        return {
                            text = v18.frequents
                        }, l_ContextualInfoTypes_0.Frequents;
                    end;
                end;
                return nil, nil;
            end;
        else
            return {
                text = v18.previously .. " @" .. v16.searchKeyword
            }, l_ContextualInfoTypes_0.PreviousUsername;
        end;
    else
        return {
            text = v18.thisIsYou
        }, l_ContextualInfoTypes_0.IsMyself;
    end;
end;


local v0 = require(script:FindFirstAncestor("UserSearch").Parent.UserProfiles);
return function(v1)
    local v2 = v0.Hooks.useUserProfilesFetch({
        userIds = {
            v1.userId
        },
        query = v0.Queries.userProfilesCombinedNameAndUsernameByUserIds
    });
    local v3 = if not v2.data then nil else v0.Selectors.getUsernameFromId(v2.data, v1.userId);
    return {
        username = if not v3 then nil else v0.Formatters.formatUsername(v3),
        combinedName = if not v2.data then nil else v0.Selectors.getCombinedNameFromId(v2.data, v1.userId)
    };
end;


local l_useSelector_0 = require(script:FindFirstAncestor("UserSearch").Parent.RoactUtils).Hooks.RoactRodux.useSelector;
return function(v1)
    return l_useSelector_0(function(v2)
        return {
            status = if not v2.FriendStatuses then nil else v2.FriendStatuses[v1],
            following = not not v2.FriendFollowings and (v2.FriendFollowings[v1] or false),
            isMyself = v2.LocalUserId == v1
        };
    end);
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UserSearch");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.Dash);
local l_Images_0 = require(l_Parent_0.UIBlox).App.ImageSet.Images;
local _ = require(l_script_FirstAncestor_0.Common.LocalTypes);
local v5 = require(script.Parent.useRelationshipSelector);
local v6 = require(l_script_FirstAncestor_0.Analytics.EventNames);
return function(v7, v8, v9)
    local v10 = v5(v7.userId);
    if v10.isMyself or v10.status == Enum.FriendStatus.Friend then
        return nil;
    elseif v10.status == Enum.FriendStatus.FriendRequestReceived then
        return {
            {
                icon = l_Images_0["icons/actions/friends/friendAdd"],
                isSecondary = false,
                isDisabled = false,
                onActivated = function()
                    v8.acceptFriendRequest(v7);
                    if v9 then
                        v9(v6.PlayerFriendAccept);
                    end;
                end
            }
        };
    elseif v10.status == Enum.FriendStatus.FriendRequestSent then
        return {
            {
                icon = l_Images_0["icons/actions/friends/friendpending"],
                isSecondary = false,
                isDisabled = true,
                onActivated = v2.noop()
            }
        };
    elseif not v10.status or v10.status == Enum.FriendStatus.NotFriend then
        return {
            {
                icon = l_Images_0["icons/actions/friends/friendAdd"],
                isSecondary = false,
                isDisabled = false,
                onActivated = function()
                    v8.requestFriendship(v7);
                    if v9 then
                        v9(v6.PlayerFriendRequest);
                    end;
                end
            }
        };
    else
        return nil;
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UserSearch");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.React);
local v3 = require(l_Parent_0.Dash);
local v4 = require(l_script_FirstAncestor_0.TestHelpers.mockedUsersInfo);
local v5 = require(l_script_FirstAncestor_0.Components.UserSearchTile);
local function _(v6)
    local l_user_0 = v6.user;
    return function(v8)
        return v2.createElement("Frame", {
            Size = UDim2.new(0, 200, 0, 350),
            BackgroundTransparency = 1
        }, {
            UserSearchTile = v2.createElement(v5, v3.join({
                index = 1,
                size = UDim2.new(0, 200, 0, 250),
                user = {
                    id = l_user_0.id,
                    name = l_user_0.name or "Name:" .. l_user_0.id,
                    displayName = l_user_0.displayName or "DisplayName:" .. l_user_0.id,
                    previousUsernames = l_user_0.previousUsernames or {}
                },
                profileInsight = l_user_0.profileInsight,
                searchParameters = v6.searchParameters or {
                    searchKeyword = ""
                },
                luaAppNetworkingRequests = {
                    requestFriendship = function()
                    end,
                    acceptFriendRequest = function()
                    end
                },
                luaAppNavigation = {
                    navigateToUserInfo = function()
                    end
                },
                fireAnalyticsEvent = v3.noop
            }, v8))
        });
    end;
end;
local l_users_0 = v4.users;
local v11 = {};
local v12 = {
    user = l_users_0.yourself
};
local l_user_1 = v12.user;
local l_l_user_1_0 = l_user_1 --[[ copy: 11 -> 12 ]];
local l_v12_0 = v12 --[[ copy: 10 -> 13 ]];
v11.yourself = function(v16)
    return v2.createElement("Frame", {
        Size = UDim2.new(0, 200, 0, 350),
        BackgroundTransparency = 1
    }, {
        UserSearchTile = v2.createElement(v5, v3.join({
            index = 1,
            size = UDim2.new(0, 200, 0, 250),
            user = {
                id = l_l_user_1_0.id,
                name = l_l_user_1_0.name or "Name:" .. l_l_user_1_0.id,
                displayName = l_l_user_1_0.displayName or "DisplayName:" .. l_l_user_1_0.id,
                previousUsernames = l_l_user_1_0.previousUsernames or {}
            },
            profileInsight = l_l_user_1_0.profileInsight,
            searchParameters = l_v12_0.searchParameters or {
                searchKeyword = ""
            },
            luaAppNetworkingRequests = {
                requestFriendship = function()
                end,
                acceptFriendRequest = function()
                end
            },
            luaAppNavigation = {
                navigateToUserInfo = function()
                end
            },
            fireAnalyticsEvent = v3.noop
        }, v16))
    });
end;
v12 = {
    user = l_users_0.following
};
l_user_1 = v12.user;
local l_l_user_1_1 = l_user_1 --[[ copy: 11 -> 14 ]];
local l_v12_1 = v12 --[[ copy: 10 -> 15 ]];
v11.following = function(v19)
    return v2.createElement("Frame", {
        Size = UDim2.new(0, 200, 0, 350),
        BackgroundTransparency = 1
    }, {
        UserSearchTile = v2.createElement(v5, v3.join({
            index = 1,
            size = UDim2.new(0, 200, 0, 250),
            user = {
                id = l_l_user_1_1.id,
                name = l_l_user_1_1.name or "Name:" .. l_l_user_1_1.id,
                displayName = l_l_user_1_1.displayName or "DisplayName:" .. l_l_user_1_1.id,
                previousUsernames = l_l_user_1_1.previousUsernames or {}
            },
            profileInsight = l_l_user_1_1.profileInsight,
            searchParameters = l_v12_1.searchParameters or {
                searchKeyword = ""
            },
            luaAppNetworkingRequests = {
                requestFriendship = function()
                end,
                acceptFriendRequest = function()
                end
            },
            luaAppNavigation = {
                navigateToUserInfo = function()
                end
            },
            fireAnalyticsEvent = v3.noop
        }, v19))
    });
end;
v12 = {
    user = l_users_0.friend
};
l_user_1 = v12.user;
local l_l_user_1_2 = l_user_1 --[[ copy: 11 -> 16 ]];
local l_v12_2 = v12 --[[ copy: 10 -> 17 ]];
v11.friend = function(v22)
    return v2.createElement("Frame", {
        Size = UDim2.new(0, 200, 0, 350),
        BackgroundTransparency = 1
    }, {
        UserSearchTile = v2.createElement(v5, v3.join({
            index = 1,
            size = UDim2.new(0, 200, 0, 250),
            user = {
                id = l_l_user_1_2.id,
                name = l_l_user_1_2.name or "Name:" .. l_l_user_1_2.id,
                displayName = l_l_user_1_2.displayName or "DisplayName:" .. l_l_user_1_2.id,
                previousUsernames = l_l_user_1_2.previousUsernames or {}
            },
            profileInsight = l_l_user_1_2.profileInsight,
            searchParameters = l_v12_2.searchParameters or {
                searchKeyword = ""
            },
            luaAppNetworkingRequests = {
                requestFriendship = function()
                end,
                acceptFriendRequest = function()
                end
            },
            luaAppNavigation = {
                navigateToUserInfo = function()
                end
            },
            fireAnalyticsEvent = v3.noop
        }, v22))
    });
end;
v12 = {
    user = l_users_0.incomingFriendship
};
l_user_1 = v12.user;
local l_l_user_1_3 = l_user_1 --[[ copy: 11 -> 18 ]];
local l_v12_3 = v12 --[[ copy: 10 -> 19 ]];
v11.incomingFriendship = function(v25)
    return v2.createElement("Frame", {
        Size = UDim2.new(0, 200, 0, 350),
        BackgroundTransparency = 1
    }, {
        UserSearchTile = v2.createElement(v5, v3.join({
            index = 1,
            size = UDim2.new(0, 200, 0, 250),
            user = {
                id = l_l_user_1_3.id,
                name = l_l_user_1_3.name or "Name:" .. l_l_user_1_3.id,
                displayName = l_l_user_1_3.displayName or "DisplayName:" .. l_l_user_1_3.id,
                previousUsernames = l_l_user_1_3.previousUsernames or {}
            },
            profileInsight = l_l_user_1_3.profileInsight,
            searchParameters = l_v12_3.searchParameters or {
                searchKeyword = ""
            },
            luaAppNetworkingRequests = {
                requestFriendship = function()
                end,
                acceptFriendRequest = function()
                end
            },
            luaAppNavigation = {
                navigateToUserInfo = function()
                end
            },
            fireAnalyticsEvent = v3.noop
        }, v25))
    });
end;
v12 = {
    user = l_users_0.outgoingFriendship
};
l_user_1 = v12.user;
local l_l_user_1_4 = l_user_1 --[[ copy: 11 -> 20 ]];
local l_v12_4 = v12 --[[ copy: 10 -> 21 ]];
v11.outgoingFriendship = function(v28)
    return v2.createElement("Frame", {
        Size = UDim2.new(0, 200, 0, 350),
        BackgroundTransparency = 1
    }, {
        UserSearchTile = v2.createElement(v5, v3.join({
            index = 1,
            size = UDim2.new(0, 200, 0, 250),
            user = {
                id = l_l_user_1_4.id,
                name = l_l_user_1_4.name or "Name:" .. l_l_user_1_4.id,
                displayName = l_l_user_1_4.displayName or "DisplayName:" .. l_l_user_1_4.id,
                previousUsernames = l_l_user_1_4.previousUsernames or {}
            },
            profileInsight = l_l_user_1_4.profileInsight,
            searchParameters = l_v12_4.searchParameters or {
                searchKeyword = ""
            },
            luaAppNetworkingRequests = {
                requestFriendship = function()
                end,
                acceptFriendRequest = function()
                end
            },
            luaAppNavigation = {
                navigateToUserInfo = function()
                end
            },
            fireAnalyticsEvent = v3.noop
        }, v28))
    });
end;
v12 = {
    user = l_users_0.previousUserName,
    searchParameters = {
        searchKeyword = "searchKeyword"
    }
};
l_user_1 = v12.user;
local l_l_user_1_5 = l_user_1 --[[ copy: 11 -> 22 ]];
local l_v12_5 = v12 --[[ copy: 10 -> 23 ]];
v11.previousUserName = function(v31)
    return v2.createElement("Frame", {
        Size = UDim2.new(0, 200, 0, 350),
        BackgroundTransparency = 1
    }, {
        UserSearchTile = v2.createElement(v5, v3.join({
            index = 1,
            size = UDim2.new(0, 200, 0, 250),
            user = {
                id = l_l_user_1_5.id,
                name = l_l_user_1_5.name or "Name:" .. l_l_user_1_5.id,
                displayName = l_l_user_1_5.displayName or "DisplayName:" .. l_l_user_1_5.id,
                previousUsernames = l_l_user_1_5.previousUsernames or {}
            },
            profileInsight = l_l_user_1_5.profileInsight,
            searchParameters = l_v12_5.searchParameters or {
                searchKeyword = ""
            },
            luaAppNetworkingRequests = {
                requestFriendship = function()
                end,
                acceptFriendRequest = function()
                end
            },
            luaAppNavigation = {
                navigateToUserInfo = function()
                end
            },
            fireAnalyticsEvent = v3.noop
        }, v31))
    });
end;
v12 = {
    user = l_users_0.random
};
l_user_1 = v12.user;
local l_l_user_1_6 = l_user_1 --[[ copy: 11 -> 24 ]];
local l_v12_6 = v12 --[[ copy: 10 -> 25 ]];
v11.random = function(v34)
    return v2.createElement("Frame", {
        Size = UDim2.new(0, 200, 0, 350),
        BackgroundTransparency = 1
    }, {
        UserSearchTile = v2.createElement(v5, v3.join({
            index = 1,
            size = UDim2.new(0, 200, 0, 250),
            user = {
                id = l_l_user_1_6.id,
                name = l_l_user_1_6.name or "Name:" .. l_l_user_1_6.id,
                displayName = l_l_user_1_6.displayName or "DisplayName:" .. l_l_user_1_6.id,
                previousUsernames = l_l_user_1_6.previousUsernames or {}
            },
            profileInsight = l_l_user_1_6.profileInsight,
            searchParameters = l_v12_6.searchParameters or {
                searchKeyword = ""
            },
            luaAppNetworkingRequests = {
                requestFriendship = function()
                end,
                acceptFriendRequest = function()
                end
            },
            luaAppNavigation = {
                navigateToUserInfo = function()
                end
            },
            fireAnalyticsEvent = v3.noop
        }, v34))
    });
end;
v12 = {
    user = l_users_0.notFriend
};
l_user_1 = v12.user;
local l_l_user_1_7 = l_user_1 --[[ copy: 11 -> 26 ]];
local l_v12_7 = v12 --[[ copy: 10 -> 27 ]];
v11.notFriend = function(v37)
    return v2.createElement("Frame", {
        Size = UDim2.new(0, 200, 0, 350),
        BackgroundTransparency = 1
    }, {
        UserSearchTile = v2.createElement(v5, v3.join({
            index = 1,
            size = UDim2.new(0, 200, 0, 250),
            user = {
                id = l_l_user_1_7.id,
                name = l_l_user_1_7.name or "Name:" .. l_l_user_1_7.id,
                displayName = l_l_user_1_7.displayName or "DisplayName:" .. l_l_user_1_7.id,
                previousUsernames = l_l_user_1_7.previousUsernames or {}
            },
            profileInsight = l_l_user_1_7.profileInsight,
            searchParameters = l_v12_7.searchParameters or {
                searchKeyword = ""
            },
            luaAppNetworkingRequests = {
                requestFriendship = function()
                end,
                acceptFriendRequest = function()
                end
            },
            luaAppNavigation = {
                navigateToUserInfo = function()
                end
            },
            fireAnalyticsEvent = v3.noop
        }, v37))
    });
end;
v12 = {
    user = l_users_0.mutualFriends
};
l_user_1 = v12.user;
local l_l_user_1_8 = l_user_1 --[[ copy: 11 -> 28 ]];
local l_v12_8 = v12 --[[ copy: 10 -> 29 ]];
v11.mutualFriends = function(v40)
    return v2.createElement("Frame", {
        Size = UDim2.new(0, 200, 0, 350),
        BackgroundTransparency = 1
    }, {
        UserSearchTile = v2.createElement(v5, v3.join({
            index = 1,
            size = UDim2.new(0, 200, 0, 250),
            user = {
                id = l_l_user_1_8.id,
                name = l_l_user_1_8.name or "Name:" .. l_l_user_1_8.id,
                displayName = l_l_user_1_8.displayName or "DisplayName:" .. l_l_user_1_8.id,
                previousUsernames = l_l_user_1_8.previousUsernames or {}
            },
            profileInsight = l_l_user_1_8.profileInsight,
            searchParameters = l_v12_8.searchParameters or {
                searchKeyword = ""
            },
            luaAppNetworkingRequests = {
                requestFriendship = function()
                end,
                acceptFriendRequest = function()
                end
            },
            luaAppNavigation = {
                navigateToUserInfo = function()
                end
            },
            fireAnalyticsEvent = v3.noop
        }, v40))
    });
end;
v12 = {
    user = l_users_0.frequents
};
l_user_1 = v12.user;
v11.frequents = function(v41)
    return v2.createElement("Frame", {
        Size = UDim2.new(0, 200, 0, 350),
        BackgroundTransparency = 1
    }, {
        UserSearchTile = v2.createElement(v5, v3.join({
            index = 1,
            size = UDim2.new(0, 200, 0, 250),
            user = {
                id = l_user_1.id,
                name = l_user_1.name or "Name:" .. l_user_1.id,
                displayName = l_user_1.displayName or "DisplayName:" .. l_user_1.id,
                previousUsernames = l_user_1.previousUsernames or {}
            },
            profileInsight = l_user_1.profileInsight,
            searchParameters = v12.searchParameters or {
                searchKeyword = ""
            },
            luaAppNetworkingRequests = {
                requestFriendship = function()
                end,
                acceptFriendRequest = function()
                end
            },
            luaAppNavigation = {
                navigateToUserInfo = function()
                end
            },
            fireAnalyticsEvent = v3.noop
        }, v41))
    });
end;
return v11;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UserSearch");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_script_FirstAncestor_0.TestHelpers.ProfileInsightsMocks);
local l_ContextualInfoTypes_0 = require(l_Parent_0.SocialCommon).Enums.ContextualInfoTypes;
local v4 = {
    yourself = "1111",
    following = "2222",
    friend = "3333",
    incomingFriendship = "4444",
    outgoingFriendship = "5555",
    previousUserName = "6666",
    random = "7777",
    notFriend = "8888",
    mutualFriends = "9999",
    frequents = "101010"
};
return {
    ids = v4,
    state = {
        LocalUserId = v4.yourself,
        FriendStatuses = {
            [v4.friend] = Enum.FriendStatus.Friend,
            [v4.incomingFriendship] = Enum.FriendStatus.FriendRequestReceived,
            [v4.outgoingFriendship] = Enum.FriendStatus.FriendRequestSent,
            [v4.notFriend] = Enum.FriendStatus.NotFriend,
            [v4.mutualFriends] = Enum.FriendStatus.NotFriend,
            [v4.frequents] = Enum.FriendStatus.NotFriend
        },
        FriendFollowings = {
            [v4.following] = true
        }
    },
    users = {
        yourself = {
            id = v4.yourself
        },
        following = {
            id = v4.following
        },
        friend = {
            id = v4.friend
        },
        incomingFriendship = {
            id = v4.incomingFriendship
        },
        outgoingFriendship = {
            id = v4.outgoingFriendship
        },
        previousUserName = {
            id = v4.previousUserName,
            previousUsernames = {
                "random1",
                "random1",
                "searchKeyword"
            }
        },
        random = {
            id = v4.random
        },
        notFriend = {
            id = v4.notFriend
        },
        mutualFriends = {
            id = v4.mutualFriends,
            profileInsight = v2.mockProfileInsightWithMutualFriends(v4.mutualFriends)
        },
        frequents = {
            id = v4.frequents,
            profileInsight = v2.mockProfileInsight(v4.frequents)
        }
    },
    contextualInfoType = {
        yourself = l_ContextualInfoTypes_0.IsMyself,
        following = l_ContextualInfoTypes_0.Following,
        friend = l_ContextualInfoTypes_0.Friend,
        incomingFriendship = nil,
        outgoingFriendship = nil,
        previousUserName = l_ContextualInfoTypes_0.PreviousUsername,
        random = nil,
        notFriend = nil,
        mutualFriends = l_ContextualInfoTypes_0.MutualFriends,
        frequents = l_ContextualInfoTypes_0.Frequents
    }
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("UserSearch");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.Roact);
local v3 = require(l_Parent_0.Dash);
local v4 = require(l_Parent_0.UIBlox);
local v5 = require(l_Parent_0.RoactRodux);
local v6 = require(l_Parent_0.Rodux);
local l_mockLocale_0 = require(l_Parent_0.Dev.SocialTestHelpers).StoryHelpers.mockLocale;
local v8 = require(l_Parent_0.ApolloClient);
local l_mockApolloClient_0 = require(l_Parent_0.GraphQLServer).ApolloClientTestUtils.mockApolloClient;
v4.init((require(l_Parent_0.Dev.RobloxAppUIBloxConfig)));
local l_AppStyleProvider_0 = v4.App.Style.AppStyleProvider;
v2.setGlobalConfig({
    elementTracing = true
});
local v11 = {
    Default = {
        themeName = "Light",
        fontName = "Gotham"
    },
    Light = {
        themeName = "Light",
        fontName = "Gotham"
    },
    Dark = {
        themeName = "Dark",
        fontName = "Gotham"
    }
};
local v12 = {
    language = "en-us"
};
local function v14(v13)
    return v6.Store.new(function()
        return v13;
    end, {}, {
        v6.thunkMiddleware
    });
end;
return {
    name = "UserSearch",
    storyRoot = l_script_FirstAncestor_0,
    roact = v2,
    mapDefinition = function(v15)
        return v3.join(v15, {
            controls = v3.join(v12, v15.controls or {}),
            state = v15.state or {}
        });
    end,
    mapStory = function(v16)
        return function(v17)
            return v2.createElement(l_AppStyleProvider_0, {
                style = not not v17 and v11[v17.theme] or v11.Default
            }, {
                storeProvider = v2.createElement(v5.StoreProvider, {
                    store = v14(v17.definition.state or {})
                }, {
                    apolloClient = v2.createElement(v8.ApolloProvider, {
                        client = l_mockApolloClient_0({})
                    }, {
                        Child = l_mockLocale_0(v16, v17)
                    })
                })
            });
        end;
    end
};


return {
    ["jest.config"] = script.Parent["jest.config"],
    UserSearchTile = require(script.Parent.Components.UserSearchTile),
    ProfileInsightsContextFetchWrapper = require(script.Parent.Components.ProfileInsightsContextFetchWrapper),
    Analytics = require(script.Parent.Analytics)
};


local v0 = require(script.Parent.Parent.Dev.JestConfigs);
return {
    displayName = "UserSearch",
    testMatch = {
        "**/*.test"
    },
    setupFilesAfterEnv = {
        v0.setupFiles.LogHandler,
        v0.setupFiles.UIBloxInitializer,
        v0.setupFiles.createPromiseRejectionHandler(),
        script.Parent.TestHelpers.collisionMatcherSetup
    }
};


return {
    projects = {
        require(script.Parent.Parent.UserSearch)["jest.config"]
    }
};