local l_AdService_0 = game:GetService("AdService");
local l_CoreGui_0 = game:GetService("CoreGui");
local l_GuiService_0 = game:GetService("GuiService");
local l_TweenService_0 = game:GetService("TweenService");
local l_Parent_0 = script.Parent.Parent;
local v5 = require(l_Parent_0.Roact);
local v6 = require(l_Parent_0.UIBlox);
local v7 = require(script.Parent.AdsEuDsaPromptUI);
local l_game_EngineFeature_0 = game:GetEngineFeature("EnableAdsEudsaDynamicDisclosure");
local l_GetFFlagFixMouseForAdsEuDsaModal_0 = require(script.Parent.Flags).GetFFlagFixMouseForAdsEuDsaModal;
local _ = nil;
local v11 = nil;
if l_game_EngineFeature_0 then
    v11 = require(l_CoreGui_0:WaitForChild("RobloxGui").Modules.RobloxTranslator);
end;
local function v14(v12, v13)
    if v12 ~= "" and v13 == "" then
        return v11:FormatByKey("CoreScripts.Ads.Label.InExperienceDisclosureDynamic", {
            AdvertiserName = v12
        });
    elseif v12 ~= "" and v13 ~= "" then
        return v11:FormatByKey("CoreScripts.Ads.Label.InExperienceDisclosureDynamicWithPayer", {
            AdvertiserName = v12,
            PayerName = v13
        });
    else
        return v11:FormatByKey("CoreScripts.Ads.Label.InExperienceDisclosureStatic");
    end;
end;
local v15 = v5.PureComponent:extend("AdsEuDsaPromptHandler");
v15.init = function(v16)
    v16:setState({
        enabled = false
    });
    v16.animating = false;
    v16.canvasGroupRef = v5.createRef();
    v16.savedSelectedCoreObject = nil;
    if not l_game_EngineFeature_0 then
        l_AdService_0.ShowStaticEudsaDisclosure:Connect(function()
            v16:showPrompt();
        end);
        return ;
    else
        v16:setState({
            bodyText = ""
        });
        l_AdService_0.ShowDynamicEudsaDisclosure:Connect(function(v17, v18)
            v16:setState({
                bodyText = v14(v17, v18)
            });
            v16:showPrompt();
        end);
        return ;
    end;
end;
v15.saveSelectedObject = function(v19)
    v19.savedSelectedCoreObject = l_GuiService_0.SelectedCoreObject;
    l_GuiService_0.SelectedCoreObject = nil;
end;
v15.restoreSelectedObject = function(v20)
    if not (v20.savedSelectedCoreObject ~= nil and not v20.savedSelectedCoreObject:IsDescendantOf(l_CoreGui_0)) then
        l_GuiService_0.SelectedCoreObject = v20.savedSelectedCoreObject;
    end;
end;
v15.showPrompt = function(v21)
    if not v21.animating and v21.canvasGroupRef.current then
        v21:saveSelectedObject();
        v21:setState({
            enabled = true
        });
        v21.animating = true;
        local v22 = l_TweenService_0:Create(v21.canvasGroupRef.current, TweenInfo.new(1, Enum.EasingStyle.Linear), {
            GroupTransparency = 0
        });
        v22:Play();
        v22.Completed:Connect(function()
            v21.animating = false;
        end);
        return ;
    else
        return ;
    end;
end;
v15.hidePrompt = function(v23)
    if not v23.animating and v23.canvasGroupRef.current then
        v23.animating = true;
        local v24 = l_TweenService_0:Create(v23.canvasGroupRef.current, TweenInfo.new(1, Enum.EasingStyle.Linear), {
            GroupTransparency = 1
        });
        v24:Play();
        v24.Completed:Connect(function()
            v23.animating = false;
            v23:setState({
                enabled = false
            });
            l_AdService_0:HideEudsaDisclosure();
            v23:restoreSelectedObject();
        end);
        return ;
    else
        return ;
    end;
end;
v15.render = function(v25)
    local l_AppStyleProvider_0 = v6.App.Style.AppStyleProvider;
    local l_Constants_0 = v6.App.Style.Constants;
    local v28 = {
        Dark = {
            themeName = l_Constants_0.ThemeName.Dark,
            fontName = l_Constants_0.FontName.Gotham
        }
    };
    local _ = nil;
    return (v5.createElement("ScreenGui", {
        ResetOnSpawn = false,
        IgnoreGuiInset = true,
        DisplayOrder = 1,
        ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
        AutoLocalize = false,
        Enabled = v25.state.enabled
    }, v5.createElement(l_AppStyleProvider_0, {
        style = v28.Dark
    }, {
        CanvasGroup = v5.createElement("CanvasGroup", {
            [v5.Ref] = v25.canvasGroupRef,
            Selectable = false,
            GroupTransparency = 1,
            BackgroundTransparency = 1,
            BorderSizePixel = 0,
            Size = UDim2.fromScale(1, 1),
            Position = UDim2.fromScale(0.5, 0.5),
            AnchorPoint = Vector2.new(0.5, 0.5)
        }, {
            Prompt = if not l_game_EngineFeature_0 then v5.createElement(v7, {
                handler = v25
            }) else v5.createElement(v7, {
                handler = v25,
                bodyText = v25.state.bodyText
            }),
            ModalFix = l_GetFFlagFixMouseForAdsEuDsaModal_0() and v5.createElement("ImageButton", {
                BackgroundTransparency = 0,
                Modal = true,
                Size = UDim2.new(0, 0, 0, 0)
            })
        })
    })));
end;
return v15;


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Parent_0 = script.Parent.Parent;
local v3 = require(l_Parent_0.Roact);
local v4 = require(l_Parent_0.UIBlox);
local v5 = require(l_Parent_0.Cryo);
local l_RobloxGui_0 = l_CoreGui_0:WaitForChild("RobloxGui");
local v7 = require(l_RobloxGui_0.Modules.Common.CoreScriptsRootProvider);
local v8 = require(l_RobloxGui_0.Modules.Common.FocusNavigationEffectsWrapper);
local l_FocusNavigableSurfaceIdentifierEnum_0 = require(l_CorePackages_0.Workspace.Packages.FocusNavigationUtils).FocusNavigableSurfaceIdentifierEnum;
local v10 = require(l_RobloxGui_0.Modules.RobloxTranslator);
local l_ButtonType_0 = v4.App.Button.Enum.ButtonType;
local l_InteractiveAlert_0 = v4.App.Dialog.Alert.InteractiveAlert;
local l_useStyle_0 = v4.Core.Style.useStyle;
local v14 = v10:FormatByKey("CoreScripts.Ads.Label.WhyThisAd");
local v15 = v10:FormatByKey("CoreScripts.Ads.Label.InExperienceDisclosureStatic");
local v16 = v10:FormatByKey("CoreScripts.Ads.Action.Close");
local v17 = v3.Component:extend("InteractiveAlert");
local l_game_EngineFeature_0 = game:GetEngineFeature("EnableAdsEudsaDynamicDisclosure");
v17.init = function(v19)
    v19.state = {
        screenSize = Vector2.new(0, 0),
        animating = false
    };
end;
v17.renderWithStyle = function(v20, _)
    local v22 = {
        buttonType = l_ButtonType_0.PrimarySystem,
        props = {
            onActivated = function()
                v20.props.handler:hidePrompt();
            end,
            text = v16
        },
        isDefaultChild = true
    };
    local function _()
        if not l_game_EngineFeature_0 then
            return v15;
        else
            return v20.props.bodyText;
        end;
    end;
    return v3.createFragment({
        Frame = v3.createElement("Frame", {
            Selectable = false,
            BackgroundTransparency = 1,
            BorderSizePixel = 0,
            Size = UDim2.fromScale(1, 1),
            Position = UDim2.fromScale(0.5, 0.5),
            AnchorPoint = Vector2.new(0.5, 0.5),
            [v3.Change.AbsoluteSize] = function(v24)
                v20:setState({
                    screenSize = v24.AbsoluteSize
                });
            end
        }, {
            InteractiveAlert = v3.createElement(l_InteractiveAlert_0, {
                screenSize = v20.state.screenSize,
                title = v14,
                bodyText = if not l_game_EngineFeature_0 then v15 else v20.props.bodyText,
                buttonStackInfo = {
                    buttons = {
                        v22
                    }
                }
            })
        })
    });
end;
v17.render = function(v25)
    return v25:renderWithStyle(v25.props.style);
end;
local l_v17_0 = v17;
return function(v27)
    return v3.createElement(v7, {}, {
        FocusNavigationEffects = v3.createElement(v8, {
            selectionGroupName = "AdsEudsaPrompt",
            focusNavigableSurfaceIdentifier = l_FocusNavigableSurfaceIdentifierEnum_0.CentralOverlay
        }, {
            WrappedEuDsaPrompt = v3.createElement(l_v17_0, (v5.Dictionary.join(v27, {
                style = l_useStyle_0()
            })))
        })
    });
end;


game:DefineFastFlag("FixMouseForAdsEuDsaModal", false);
return {
    GetFFlagFixMouseForAdsEuDsaModal = function()
        return game:GetFastFlag("FixMouseForAdsEuDsaModal");
    end
};


local l_CoreGui_0 = game:GetService("CoreGui");
local v1 = require(script.Parent.Parent.Roact);
local v2 = require(script.Parent.AdsEuDsaPromptHandler);
return function()
    v1.mount(v1.createElement(v2), l_CoreGui_0, "AdsEuDsaPromptHandler");
end;


return {
    EventStream = {
        sendEventDeferred = require(script.Parent.sendEventDeferred)((game:GetService("EventIngestService")))
    }
};


return function(v0, v1, v2, v3)
    v0.sendEventDeferred(v1, "buttonClick", {
        origin = v2,
        btn = v3
    });
end;


local l_getPlatformTarget_0 = require(script:FindFirstAncestor("AmpUpsell").Parent.Analytics).getPlatformTarget;
return function(v1)
    return function(v2, v3, v4)
        v1:SendEventDeferred(l_getPlatformTarget_0(), v2, v3, v4);
    end;
end;


return function(v0, v1, v2, v3)
    v0.sendEventDeferred(v1, "modalAction", {
        aType = v3,
        origin = v2
    });
end;


return {
    AccountSettingsUpsell = "AccountSettingsUpsell",
    AmpWizardContainer = "AmpWizardContainer",
    IDVWithQRCodeUpsell = "IDVWithQRCodeUpsell",
    IDVDirectLinkUpsell = "IDVDirectLinkUpsell",
    GenericWebPage = "GenericWebPage"
};


local l_ActionTypeEnum_0 = require(script.Parent.Enums).ActionTypeEnum;
return {
    accountSettingsUpsellStrings = {
        [l_ActionTypeEnum_0.GovernmentId] = {
            title = "Feature.AgeVerificationUpsell.Modal.Title",
            message = "Feature.AgeVerificationUpsell.Modal.ContentText",
            buttonCancel = "Feature.AgeVerificationUpsell.Button.Cancel",
            buttonSettings = "Feature.AgeVerificationUpsell.Button.Settings"
        },
        [l_ActionTypeEnum_0.Phone] = {
            title = "Amp.AccountSettingsUpsell.Phone.Modal.Title",
            message = "Amp.AccountSettingsUpsell.Phone.Modal.ContentText",
            buttonCancel = "Amp.AccountSettingsUpsell.Phone.Button.Cancel",
            buttonSettings = "Amp.AccountSettingsUpsell.Phone.Button.Settings"
        },
        [l_ActionTypeEnum_0.Email] = {
            title = "Amp.AccountSettingsUpsell.Email.Modal.Title",
            message = "Amp.AccountSettingsUpsell.Email.Modal.ContentText",
            buttonCancel = "Amp.AccountSettingsUpsell.Email.Button.Cancel",
            buttonSettings = "Amp.AccountSettingsUpsell.Email.Button.Settings"
        },
        [l_ActionTypeEnum_0.AddedEmail] = {
            title = "Amp.AccountSettingsUpsell.Email.Modal.Title",
            message = "Amp.AccountSettingsUpsell.Email.Modal.ContentText",
            buttonCancel = "Amp.AccountSettingsUpsell.Email.Button.Cancel",
            buttonSettings = "Amp.AccountSettingsUpsell.Email.Button.Settings"
        }
    },
    idvWithQRCodeUpsellStrings = {
        title = "Amp.IDVUpsell.Modal.Title",
        beginText = "Amp.IDVUpsell.Modal.QRHeaderText",
        disclaimer = "Amp.IDVUpsell.Modal.Disclaimer",
        privacyLinkText = "Amp.IDVUpsell.Modal.PrivacyLinkText",
        idDirectionsHeader = "Amp.IDVUpsell.Directions.IDHeader",
        idDirectionsBody = "Amp.IDVUpsell.Directions.IDBody",
        phoneDirectionsHeader = "Amp.IDVUpsell.Directions.PhoneHeader",
        phoneDirectionsBody = "Amp.IDVUpsell.Directions.PhoneBody",
        privacyPageHeader = "Amp.IDVUpsell.PrivacyPageHeader",
        ageVerifyPrompt = "Verification.Identity.Label.AgeVerifyPrompt",
        verifyInBrowser = "Verification.Identity.Label.VerifyInBrowser",
        dontCloseWindowDisclaimer = "Verification.Identity.Label.PleaseDoNotClose",
        havingTroubleInfoText = "Verification.Identity.Label.HavingTroubleScanCode",
        startVerification = "Amp.IDVUpsell.Button.StartVerification",
        cancel = "Amp.IDVUpsell.Button.Cancel"
    },
    idvErrorScreenStrings = {
        timeout = "Amp.IDVErrorScreen.Timeout",
        declined = "Amp.IDVErrorScreen.Declined",
        retry = "Amp.IDVErrorScreen.Retry",
        close = "Amp.IDVErrorScreen.Close",
        title = "Amp.IDVErrorScreen.Title"
    }
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AmpUpsell");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.React);
local l_useLocalization_0 = require(l_Parent_0.Localization).Hooks.useLocalization;
local l_useSelector_0 = require(l_Parent_0.RoactUtils).Hooks.RoactRodux.useSelector;
local v5 = require(l_script_FirstAncestor_0.Analytics.AnalyticsService);
local v6 = require(l_Parent_0.UIBlox);
local l_InteractiveAlert_0 = v6.App.Dialog.Alert.InteractiveAlert;
local l_ButtonType_0 = v6.App.Button.Enum.ButtonType;
local v9 = require(l_script_FirstAncestor_0.Analytics.sendButtonClickEvent);
local function v11(v10)
    return v10.ScreenSize;
end;
return function(v12)
    local l_onRetry_0 = v12.onRetry;
    local l_onCancel_0 = v12.onCancel;
    local l_featureName_0 = v12.featureName;
    local v16 = l_useLocalization_0({
        title = "Amp.ErrorScreen.Title",
        bodyText = "Amp.ErrorScreen.BodyText",
        buttonRetry = "Amp.ErrorScreen.Retry",
        buttonCancel = "Amp.ErrorScreen.Cancel"
    });
    local v17 = if not v12.analyticsService then v5.EventStream else v12.analyticsService;
    return v2.createElement(l_InteractiveAlert_0, {
        anchorPoint = Vector2.new(0.5, 0.5),
        position = UDim2.new(0.5, 0, 0.5, 0),
        screenSize = l_useSelector_0(v11),
        title = v16.title,
        bodyText = v16.bodyText,
        buttonStackInfo = {
            buttons = {
                {
                    buttonType = l_ButtonType_0.Secondary,
                    props = {
                        isDisabled = false,
                        onActivated = function()
                            v9(v17, "AmpErrorScreen", l_featureName_0, "Cancel");
                            l_onCancel_0();
                        end,
                        text = v16.buttonCancel
                    }
                },
                {
                    buttonType = l_ButtonType_0.PrimarySystem,
                    props = {
                        isDisabled = false,
                        onActivated = function()
                            v9(v17, "AmpErrorScreen", l_featureName_0, "Retry");
                            l_onRetry_0();
                        end,
                        text = v16.buttonRetry
                    }
                }
            }
        }
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AmpUpsell");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.UIBlox);
local v3 = require(l_Parent_0.React);
local v4 = require(l_Parent_0.RoactRodux);
local l_useLocalization_0 = require(l_Parent_0.Localization).Hooks.useLocalization;
local v6 = require(l_script_FirstAncestor_0.Analytics.AnalyticsService);
local v7 = require(l_script_FirstAncestor_0.Analytics.sendButtonClickEvent);
local v8 = require(l_script_FirstAncestor_0.Common.AppScreens);
local l_PartialPageModal_0 = v2.App.Dialog.Modal.PartialPageModal;
local l_StyledTextLabel_0 = v2.App.Text.StyledTextLabel;
local l_ButtonType_0 = v2.App.Button.Enum.ButtonType;
local l_useStyle_0 = v2.Core.Style.useStyle;
AccountSettingsUpsell = function(v13)
    local l_onCloseModal_0 = v13.onCloseModal;
    local l_onCancelled_0 = v13.onCancelled;
    local l_localizationStrings_0 = v13.localizationStrings;
    local l_featureName_0 = v13.featureName;
    local v18 = l_useLocalization_0(l_localizationStrings_0);
    local v19 = l_useStyle_0();
    local v20 = if not v13.analyticsService then v6.EventStream else v13.analyticsService;
    return v3.createElement("ImageButton", {
        AutoButtonColor = false,
        Size = UDim2.new(1, 0, 1, 0),
        ImageTransparency = 1,
        BackgroundColor3 = Color3.new(0, 0, 0),
        BackgroundTransparency = 1,
        BorderSizePixel = 0
    }, {
        Overlay = v3.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, 0),
            BorderSizePixel = 0,
            BackgroundTransparency = 1
        }, {
            Content = v3.createElement(l_PartialPageModal_0, {
                title = v18.title,
                screenSize = v13.screenSize,
                onCloseClicked = function()
                    v7(v20, v8.AccountSettingsUpsell, l_featureName_0, "CloseModal");
                    l_onCloseModal_0();
                end,
                buttonStackProps = {
                    forcedFillDirection = Enum.FillDirection.Horizontal,
                    buttonHeight = 48,
                    buttons = {
                        {
                            buttonType = l_ButtonType_0.Secondary,
                            props = {
                                isDisabled = false,
                                onActivated = function()
                                    v7(v20, v8.AccountSettingsUpsell, l_featureName_0, "Cancelled");
                                    l_onCancelled_0();
                                end,
                                text = v18.buttonCancel
                            }
                        },
                        {
                            buttonType = l_ButtonType_0.PrimarySystem,
                            props = {
                                isDisabled = false,
                                onActivated = function()
                                    v7(v20, v8.AccountSettingsUpsell, l_featureName_0, "OpenAccountSettings");
                                    v13.openAccountSettings(v18.buttonSettings);
                                end,
                                text = v18.buttonSettings
                            }
                        }
                    }
                }
            }, {
                ViewFrame = v3.createElement("Frame", {
                    AutomaticSize = Enum.AutomaticSize.XY,
                    BackgroundTransparency = 1
                }, {
                    UIPadding = v3.createElement("UIPadding", {
                        PaddingTop = UDim.new(0, 24),
                        PaddingBottom = UDim.new(0, 24)
                    }),
                    Text = v3.createElement(l_StyledTextLabel_0, {
                        fontStyle = v19.Font.Body,
                        colorStyle = v19.Theme.TextEmphasis,
                        size = UDim2.new(1, 0, 0, 0),
                        fluidSizing = false,
                        textXAlignment = Enum.TextXAlignment.Left,
                        textYAlignment = Enum.TextYAlignment.Center,
                        automaticSize = Enum.AutomaticSize.Y,
                        text = v18.message
                    })
                })
            })
        })
    });
end;
AccountSettingsUpsell = v4.connect(function(v21, _)
    return {
        screenSize = v21.ScreenSize
    };
end)(AccountSettingsUpsell);
return AccountSettingsUpsell;


local l_Parent_0 = script:FindFirstAncestor("AmpUpsell").Parent;
local v1 = require(l_Parent_0.UIBlox);
local v2 = require(l_Parent_0.React);
local l_ImageSetLabel_0 = v1.Core.ImageSet.ImageSetLabel;
local l_IconSize_0 = v1.App.Constant.IconSize;
local l_Images_0 = v1.App.ImageSet.Images;
local l_useStyle_0 = v1.Core.Style.useStyle;
local l_StyledTextLabel_0 = v1.App.Text.StyledTextLabel;
return function(v8)
    local v9 = l_useStyle_0();
    local l_frameHeight_0 = v8.frameHeight;
    return v2.createElement("Frame", {
        Size = UDim2.new(1, 0, 0, l_frameHeight_0),
        BackgroundTransparency = 1,
        LayoutOrder = v8.layoutOrder
    }, {
        UIListLayout = v2.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            FillDirection = Enum.FillDirection.Horizontal,
            HorizontalAlignment = Enum.HorizontalAlignment.Center,
            VerticalAlignment = Enum.VerticalAlignment.Center
        }),
        ImageIcon = v2.createElement(l_ImageSetLabel_0, {
            AnchorPoint = Vector2.new(0, 0.5),
            Size = UDim2.new(0, l_IconSize_0.Large, 0, l_IconSize_0.Large),
            ScaleType = Enum.ScaleType.Fit,
            LayoutOrder = 1,
            BackgroundTransparency = 1,
            Image = l_Images_0[v8.imagePath],
            ImageTransparency = v9.Theme.SystemPrimaryDefault.Transparency
        }),
        TextFrame = v2.createElement("Frame", {
            BackgroundTransparency = 1,
            Size = UDim2.new(1, -48, 0, l_frameHeight_0),
            LayoutOrder = 2
        }, {
            TextLayout = v2.createElement("UIListLayout", {
                SortOrder = Enum.SortOrder.LayoutOrder,
                FillDirection = Enum.FillDirection.Vertical,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                VerticalAlignment = Enum.VerticalAlignment.Center
            }),
            Header = v2.createElement(l_StyledTextLabel_0, {
                text = v8.headerText,
                fontStyle = v9.Font.Header2,
                colorStyle = v9.Theme.TextEmphasis,
                size = UDim2.new(1, 0, 0.5, 0),
                lineHeight = 1,
                textTruncate = Enum.TextTruncate.AtEnd,
                textXAlignment = Enum.TextXAlignment.Left,
                textYAlignment = Enum.TextYAlignment.Center,
                layoutOrder = 1
            }),
            Body = v2.createElement(l_StyledTextLabel_0, {
                text = v8.descriptionText,
                fontStyle = v9.Font.CaptionBody,
                colorStyle = v9.Theme.TextDefault,
                size = UDim2.new(1, 0, 0.5, 0),
                lineHeight = 1,
                textTruncate = Enum.TextTruncate.AtEnd,
                textXAlignment = Enum.TextXAlignment.Left,
                textYAlignment = Enum.TextYAlignment.Center,
                layoutOrder = 2
            })
        })
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AmpUpsell");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.UIBlox);
local v3 = require(l_Parent_0.React);
local v4 = require(l_Parent_0.Roact);
local l_useLocalization_0 = require(l_Parent_0.Localization).Hooks.useLocalization;
local v6 = require(l_script_FirstAncestor_0.Analytics.AnalyticsService);
local v7 = require(l_script_FirstAncestor_0.Analytics.sendButtonClickEvent);
local v8 = require(l_script_FirstAncestor_0.Common.AppScreens);
local l_PartialPageModal_0 = v2.App.Dialog.Modal.PartialPageModal;
local l_useStyle_0 = v2.Core.Style.useStyle;
local l_LinkButton_0 = v2.App.Button.LinkButton;
local l_idvWithQRCodeUpsellStrings_0 = require(l_script_FirstAncestor_0.Common.LocalizationStrings).idvWithQRCodeUpsellStrings;
local v13 = require(script.Parent.DirectionsTile);
local v14 = require(script.Parent.ProgressChecklist);
local l_ButtonType_0 = v2.App.Button.Enum.ButtonType;
local l_useSelector_0 = require(l_Parent_0.RoactUtils).Hooks.RoactRodux.useSelector;
return function(v17)
    local l_featureName_0 = v17.featureName;
    local v19 = l_useLocalization_0(l_idvWithQRCodeUpsellStrings_0);
    local v20 = l_useStyle_0();
    local l_onClose_0 = v17.onClose;
    local l_openPrivacyPolicyLink_0 = v17.openPrivacyPolicyLink;
    local l_Font_0 = v20.Font.Body.Font;
    local l_BaseSize_0 = v20.Font.BaseSize;
    local l_Transparency_0 = v20.Theme.TextEmphasis.Transparency;
    local v26 = l_BaseSize_0 * v20.Font.CaptionBody.RelativeSize;
    local v27 = v17.analyticsService or v6.EventStream;
    local l_idvLink_0 = v17.idvLink;
    local l_latestStepCompleted_0 = v17.latestStepCompleted;
    local v30 = l_latestStepCompleted_0 > 0;
    local l_openIdvLink_0 = v17.openIdvLink;
    return v3.createElement(l_PartialPageModal_0, {
        title = v19.title,
        screenSize = l_useSelector_0(function(v32)
            return v32.ScreenSize;
        end),
        onCloseClicked = v3.useCallback(function()
            v7(v27, v8.IDVDirectLinkUpsell, l_featureName_0, "CloseModal");
            l_onClose_0();
        end, {
            v27,
            l_featureName_0
        }),
        buttonStackProps = {
            forcedFillDirection = Enum.FillDirection.Vertical,
            buttonHeight = 36,
            buttons = {
                {
                    buttonType = l_ButtonType_0.Secondary,
                    props = {
                        isDisabled = false,
                        onActivated = v3.useCallback(function()
                            v7(v27, v8.IDVDirectLinkUpsell, l_featureName_0, "CloseModal");
                            l_onClose_0();
                        end, {
                            v27,
                            l_featureName_0
                        }),
                        text = v19.cancel
                    }
                },
                {
                    buttonType = l_ButtonType_0.PrimarySystem,
                    props = {
                        isDisabled = false,
                        onActivated = v3.useCallback(function()
                            if l_idvLink_0 ~= nil then
                                v7(v27, v8.IDVDirectLinkUpsell, l_featureName_0, "OpenIdvLink");
                                l_openIdvLink_0(l_idvLink_0);
                            end;
                        end, {
                            l_openIdvLink_0,
                            l_idvLink_0,
                            v27,
                            l_featureName_0
                        }),
                        text = v19.startVerification
                    }
                }
            }
        }
    }, {
        DirectLinkViewFrame = v3.createElement("Frame", {
            AutomaticSize = Enum.AutomaticSize.XY,
            BackgroundTransparency = 1
        }, {
            UIPadding = v3.createElement("UIPadding", {
                PaddingTop = UDim.new(0, 24),
                PaddingBottom = UDim.new(0, 24)
            }),
            UIListLayout = v3.createElement("UIListLayout", {
                SortOrder = Enum.SortOrder.LayoutOrder,
                FillDirection = Enum.FillDirection.Vertical,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                VerticalAlignment = Enum.VerticalAlignment.Center,
                Padding = UDim.new(0, 24)
            }),
            DirectionsFrameOrProgressChecklist = if v30 then v3.createElement(v14, {
                entryHeight = 18,
                layoutOrder = 1,
                latestStepCompleted = l_latestStepCompleted_0
            }) else v3.createElement("Frame", {
                Size = UDim2.new(1, 0, 0, 72),
                BackgroundColor3 = v20.Theme.BackgroundContrast.Color,
                BackgroundTransparency = 0,
                LayoutOrder = 1
            }, {
                UIPadding = v3.createElement("UIPadding", {
                    PaddingTop = UDim.new(0, 12),
                    PaddingBottom = UDim.new(0, 12),
                    PaddingLeft = UDim.new(0, 12),
                    PaddingRight = UDim.new(0, 12)
                }),
                UICorner = v3.createElement("UICorner", {
                    CornerRadius = UDim.new(0, 8)
                }),
                IDDirection = v3.createElement(v13, {
                    imagePath = "icons/menu/document",
                    headerText = v19.idDirectionsHeader,
                    descriptionText = v19.idDirectionsBody,
                    frameHeight = 48
                })
            }),
            DisclaimerFrame = v3.createElement("Frame", {
                Size = UDim2.new(1, 0, 0, 100),
                BackgroundTransparency = 1,
                LayoutOrder = 2
            }, {
                UIListLayout = v3.createElement("UIListLayout", {
                    SortOrder = Enum.SortOrder.LayoutOrder,
                    FillDirection = Enum.FillDirection.Vertical,
                    HorizontalAlignment = Enum.HorizontalAlignment.Center,
                    VerticalAlignment = Enum.VerticalAlignment.Top
                }),
                Disclaimer = v3.createElement("TextLabel", {
                    Text = v19.disclaimer,
                    Font = l_Font_0,
                    TextSize = v26,
                    TextColor3 = v20.Theme.TextDefault.Color,
                    TextTransparency = l_Transparency_0,
                    TextXAlignment = Enum.TextXAlignment.Left,
                    TextWrapped = true,
                    AutomaticSize = Enum.AutomaticSize.XY,
                    BackgroundTransparency = 1,
                    LayoutOrder = 1
                }),
                PrivacyPolicy = v4.createElement(l_LinkButton_0, {
                    text = v19.privacyLinkText,
                    layoutOrder = 2,
                    fontStyle = "CaptionBody",
                    underlineAlwaysEnabled = true,
                    onActivated = function()
                        v7(v27, v8.IDVDirectLinkUpsell, l_featureName_0, "OpenPrivacyPolicy");
                        l_openPrivacyPolicyLink_0();
                    end
                })
            })
        })
    });
end;


local l_Parent_0 = script:FindFirstAncestor("AmpUpsell").Parent;
local v1 = require(l_Parent_0.UIBlox);
local v2 = require(l_Parent_0.React);
local l_IconSize_0 = v1.App.Constant.IconSize;
local l_Images_0 = v1.App.ImageSet.Images;
local l_useStyle_0 = v1.Core.Style.useStyle;
local l_StyledTextLabel_0 = v1.App.Text.StyledTextLabel;
local l_PartialPageModal_0 = v1.App.Dialog.Modal.PartialPageModal;
local l_ButtonType_0 = v1.App.Button.Enum.ButtonType;
local l_ImageSetLabel_0 = v1.Core.ImageSet.ImageSetLabel;
local l_useSelector_0 = require(l_Parent_0.RoactUtils).Hooks.RoactRodux.useSelector;
return function(v11)
    local l_errorTitle_0 = v11.errorTitle;
    local l_errorDescription_0 = v11.errorDescription;
    local l_onClose_0 = v11.onClose;
    local l_buttonText_0 = v11.buttonText;
    local v16 = l_useStyle_0();
    return v2.createElement(l_PartialPageModal_0, {
        title = l_errorTitle_0,
        screenSize = l_useSelector_0(function(v17)
            return v17.ScreenSize;
        end),
        onCloseClicked = function()
            l_onClose_0();
        end,
        bottomPadding = 20,
        buttonStackProps = {
            forcedFillDirection = Enum.FillDirection.Horizontal,
            buttonHeight = 48,
            buttons = {
                {
                    buttonType = l_ButtonType_0.PrimarySystem,
                    props = {
                        isDisabled = false,
                        onActivated = function()
                            l_onClose_0();
                        end,
                        text = l_buttonText_0
                    }
                }
            }
        }
    }, {
        ViewFrame = v2.createElement("Frame", {
            AutomaticSize = Enum.AutomaticSize.XY,
            BackgroundTransparency = 1
        }, {
            UIPadding = v2.createElement("UIPadding", {
                PaddingTop = UDim.new(0, 24),
                PaddingBottom = UDim.new(0, 24)
            }),
            UIListLayout = v2.createElement("UIListLayout", {
                SortOrder = Enum.SortOrder.LayoutOrder,
                FillDirection = Enum.FillDirection.Vertical,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                VerticalAlignment = Enum.VerticalAlignment.Center,
                Padding = UDim.new(0, 20)
            }),
            ImageIcon = v2.createElement(l_ImageSetLabel_0, {
                Size = UDim2.new(0, l_IconSize_0.XXLarge, 0, l_IconSize_0.XXLarge),
                ScaleType = Enum.ScaleType.Fit,
                LayoutOrder = 1,
                BackgroundTransparency = 1,
                Image = l_Images_0["icons/graphic/error_xlarge"],
                ImageTransparency = v16.Theme.SystemPrimaryDefault.Transparency
            }),
            ErrorText = v2.createElement(l_StyledTextLabel_0, {
                text = l_errorDescription_0,
                fontStyle = v16.Font.CaptionBody,
                colorStyle = v16.Theme.TextEmphasis,
                size = UDim2.new(1, 0, 0, 0),
                lineHeight = 1,
                textTruncate = Enum.TextTruncate.AtEnd,
                textXAlignment = Enum.TextXAlignment.Center,
                textYAlignment = Enum.TextYAlignment.Center,
                automaticSize = Enum.AutomaticSize.XY,
                layoutOrder = 2
            })
        })
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AmpUpsell");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.React);
local l_useLocalization_0 = require(l_Parent_0.Localization).Hooks.useLocalization;
local v4 = require(l_script_FirstAncestor_0.Common.AppScreens);
local v5 = require(script.Parent.IDVWithQRCodeUpsell);
local v6 = require(l_script_FirstAncestor_0.Common.IDVApiProvider);
local v7 = require(l_script_FirstAncestor_0.Flags.GetFStringBiometricPrivacyPolicyLink);
local v8 = require(l_script_FirstAncestor_0.Flags.GetFIntIDVPollDelay);
local v9 = require(l_script_FirstAncestor_0.Flags.GetFIntIDVMaxRetries);
local l_useNavigation_0 = require(l_Parent_0.RoactUtils).Hooks.useNavigation;
local v11 = require(l_script_FirstAncestor_0.Common.Enums);
local l_IDVStep_0 = v11.IDVStep;
local l_IDVSessionStatusEnum_0 = v11.IDVSessionStatusEnum;
local l_ActionStatusEnum_0 = v11.ActionStatusEnum;
local v15 = require(script.Parent.IDVErrorScreen);
local v16 = require(l_script_FirstAncestor_0.Common.LocalizationStrings);
local l_idvErrorScreenStrings_0 = v16.idvErrorScreenStrings;
local l_idvWithQRCodeUpsellStrings_0 = v16.idvWithQRCodeUpsellStrings;
local v19 = require(script.Parent.IDVDirectLinkUpsell);
local v20 = require(l_Parent_0.RobloxAppHooks);
local l_useDeviceType_0 = v20.useDeviceType;
local l_useRoactService_0 = v20.useRoactService;
local l_AppLinking_0 = require(l_Parent_0.RoactServiceTags).AppLinking;
local l_DeviceType_0 = require(l_Parent_0.RobloxAppEnums).DeviceType;
local v25 = require(l_script_FirstAncestor_0.Flags.GetFFlagEnableDirectLinkForTablets);
local v26 = v8();
local v27 = v9();
local function _(v28)
    local v29 = true;
    if v28 ~= l_IDVSessionStatusEnum_0.Failure then
        v29 = true;
        if v28 ~= l_IDVSessionStatusEnum_0.RequiresManualReview then
            v29 = true;
            if v28 ~= l_IDVSessionStatusEnum_0.RequiresRetry then
                v29 = v28 == l_IDVSessionStatusEnum_0.Expired;
            end;
        end;
    end;
    return v29;
end;
local function _(v31, v32)
    if not (v31 ~= l_IDVSessionStatusEnum_0.Failure) or v31 == l_IDVSessionStatusEnum_0.RequiresManualReview then
        return v32.declined;
    elseif v31 == l_IDVSessionStatusEnum_0.RequiresRetry then
        return v32.retry;
    elseif v31 == l_IDVSessionStatusEnum_0.Expired then
        return v32.timeout;
    else
        return v32.retry;
    end;
end;
return function(v34)
    local l_featureName_0 = v34.featureName;
    local l_onSuccess_0 = v34.onSuccess;
    local l_onFailure_0 = v34.onFailure;
    local l_onCancelled_0 = v34.onCancelled;
    local v39 = if not v34.idvApiProvider then v6 else v34.idvApiProvider;
    local v40 = v34.deviceType or l_useDeviceType_0();
    local v41 = l_useNavigation_0();
    local v42 = l_useLocalization_0(l_idvErrorScreenStrings_0);
    local v43 = l_useLocalization_0(l_idvWithQRCodeUpsellStrings_0);
    local v44, v45 = v2.useState(nil);
    local v46, v47 = v2.useState(true);
    local v48, v49 = v2.useState(l_ActionStatusEnum_0.Unknown);
    local v50, v51 = v2.useState(false);
    local v52, v53 = v2.useState(v42.retry);
    local v54, v55 = v2.useState(0);
    local v56;
    if v25() then
        v56 = true;
        if not (v40 ~= l_DeviceType_0.Tablet) then
            goto label0;
        end;
    end;
    v56 = v40 == l_DeviceType_0.Phone;
    ::label0::;
    local v57 = l_useRoactService_0(l_AppLinking_0);
    local v59 = v34.openIdvLink or function(v58)
        v57:openURL(v58);
    end;
    local function v60()
        v41.navigate(v4.GenericWebPage, {
            detail = v7(),
            extraProps = {
                title = v43.privacyPageHeader,
                transitionAnimation = "SlideInFromBottom"
            }
        });
    end;
    local function v62(v61)
        if v61 == l_IDVSessionStatusEnum_0.Stored then
            v55(l_IDVStep_0.UpdatedRobloxProfile);
            return ;
        elseif v61 == l_IDVSessionStatusEnum_0.Success then
            v55(l_IDVStep_0.Verified);
            return ;
        elseif v61 == l_IDVSessionStatusEnum_0.Submitted then
            v55(l_IDVStep_0.GotResults);
            return ;
        else
            if v61 == l_IDVSessionStatusEnum_0.Started then
                v55(l_IDVStep_0.ConnectedMobile);
            end;
            return ;
        end;
    end;
    local function v63(v64, v65)
        if v65 == 0 then
            v51(true);
            v53(v42.timeout);
            return ;
        else
            v39.getVerifiedStatus(v64):andThen(function(v66)
                local l_isVerified_0 = v66.isVerified;
                local l_sessionStatus_0 = v66.sessionStatus;
                v62(l_sessionStatus_0);
                if l_isVerified_0 and l_sessionStatus_0 == l_IDVSessionStatusEnum_0.Stored then
                    v49(l_ActionStatusEnum_0.Success);
                    return ;
                else
                    local v69 = true;
                    if l_sessionStatus_0 ~= l_IDVSessionStatusEnum_0.Failure then
                        v69 = true;
                        if l_sessionStatus_0 ~= l_IDVSessionStatusEnum_0.RequiresManualReview then
                            v69 = true;
                            if l_sessionStatus_0 ~= l_IDVSessionStatusEnum_0.RequiresRetry then
                                v69 = l_sessionStatus_0 == l_IDVSessionStatusEnum_0.Expired;
                            end;
                        end;
                    end;
                    if not v69 then
                        spawn(function()
                            wait(v26);
                            if v46 then
                                v63(v64, v65 - 1);
                            end;
                        end);
                        return ;
                    else
                        v49(l_ActionStatusEnum_0.Failure);
                        v69 = v53;
                        local l_v42_0 = v42;
                        v69(if not (l_sessionStatus_0 ~= l_IDVSessionStatusEnum_0.Failure) or l_sessionStatus_0 == l_IDVSessionStatusEnum_0.RequiresManualReview then l_v42_0.declined else if l_sessionStatus_0 == l_IDVSessionStatusEnum_0.RequiresRetry then l_v42_0.retry else if l_sessionStatus_0 == l_IDVSessionStatusEnum_0.Expired then l_v42_0.timeout else l_v42_0.retry);
                        return ;
                    end;
                end;
            end):catch(function(_)
                v51(true);
                v53(v42.retry);
            end);
            return ;
        end;
    end;
    v2.useEffect(function()
        v47(true);
        v39.startVerification():andThen(function(v72)
            v63(v72.sessionIdentifier, v27);
            v45(v72.verificationLink);
        end):catch(function(_)
            v51(true);
            v53(v42.retry);
        end);
        return function()
            v47(false);
        end;
    end, {});
    v2.useEffect(function()
        if v48 == l_ActionStatusEnum_0.Success then
            l_onSuccess_0();
            return ;
        elseif v48 == l_ActionStatusEnum_0.Cancelled then
            l_onCancelled_0();
            return ;
        else
            if v48 == l_ActionStatusEnum_0.Failure then
                v51(true);
            end;
            return ;
        end;
    end, {
        v48
    });
    if not v50 then
        if not v56 then
            return v2.createElement(v5, {
                qrCodeLink = v44,
                featureName = l_featureName_0,
                openPrivacyPolicyLink = v60,
                latestStepCompleted = v54,
                onClose = function()
                    v49(l_ActionStatusEnum_0.Cancelled);
                end
            });
        else
            return v2.createElement(v19, {
                featureName = l_featureName_0,
                idvLink = v44,
                openIdvLink = v59,
                onClose = function()
                    v49(l_ActionStatusEnum_0.Cancelled);
                end,
                openPrivacyPolicyLink = v60,
                latestStepCompleted = v54
            });
        end;
    else
        return v2.createElement(v15, {
            errorTitle = v42.title,
            errorDescription = v52,
            buttonText = v42.close,
            onClose = function()
                l_onFailure_0();
            end
        });
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AmpUpsell");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.UIBlox);
local v3 = require(l_Parent_0.React);
local l_useLocalization_0 = require(l_Parent_0.Localization).Hooks.useLocalization;
local v5 = require(l_script_FirstAncestor_0.Analytics.AnalyticsService);
local v6 = require(l_script_FirstAncestor_0.Analytics.sendButtonClickEvent);
local v7 = require(l_script_FirstAncestor_0.Common.AppScreens);
local l_PartialPageModal_0 = v2.App.Dialog.Modal.PartialPageModal;
local l_useStyle_0 = v2.Core.Style.useStyle;
local l_LinkButton_0 = v2.App.Button.LinkButton;
local v11 = require(script.Parent.DirectionsTile);
local l_StyledTextLabel_0 = v2.App.Text.StyledTextLabel;
local v13 = require(l_Parent_0.QRCodeDisplay);
local l_DisplayQRCode_0 = v13.DisplayQRCode;
local l_ECLevels_0 = v13.ECLevels;
local l_LoadingSpinner_0 = v2.App.Loading.LoadingSpinner;
local v17 = require(script.Parent.ProgressChecklist);
local l_useSelector_0 = require(l_Parent_0.RoactUtils).Hooks.RoactRodux.useSelector;
local l_idvWithQRCodeUpsellStrings_0 = require(l_script_FirstAncestor_0.Common.LocalizationStrings).idvWithQRCodeUpsellStrings;
return function(v20)
    local l_featureName_0 = v20.featureName;
    local l_qrCodeLink_0 = v20.qrCodeLink;
    local v23 = l_useLocalization_0(l_idvWithQRCodeUpsellStrings_0);
    local v24 = l_useStyle_0();
    local l_onClose_0 = v20.onClose;
    local l_openPrivacyPolicyLink_0 = v20.openPrivacyPolicyLink;
    local l_Font_0 = v24.Font.Body.Font;
    local l_BaseSize_0 = v24.Font.BaseSize;
    local l_Transparency_0 = v24.Theme.TextEmphasis.Transparency;
    local v30 = l_BaseSize_0 * v24.Font.CaptionBody.RelativeSize;
    local v31 = if not v20.analyticsService then v5.EventStream else v20.analyticsService;
    local v32 = UDim2.fromOffset(153, 153);
    local l_latestStepCompleted_0 = v20.latestStepCompleted;
    local v34 = l_latestStepCompleted_0 > 0;
    return v3.createElement(l_PartialPageModal_0, {
        title = v23.title,
        screenSize = l_useSelector_0(function(v35)
            return v35.ScreenSize;
        end),
        onCloseClicked = function()
            v6(v31, v7.IDVWithQRCodeUpsell, l_featureName_0, "CloseModal");
            l_onClose_0();
        end,
        bottomPadding = 0
    }, {
        QRCodeViewFrame = v3.createElement("Frame", {
            AutomaticSize = Enum.AutomaticSize.XY,
            BackgroundTransparency = 1
        }, {
            UIPadding = v3.createElement("UIPadding", {
                PaddingTop = UDim.new(0, 24),
                PaddingBottom = UDim.new(0, 24)
            }),
            UIListLayout = v3.createElement("UIListLayout", {
                SortOrder = Enum.SortOrder.LayoutOrder,
                FillDirection = Enum.FillDirection.Vertical,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                VerticalAlignment = Enum.VerticalAlignment.Center,
                Padding = UDim.new(0, 24)
            }),
            HeaderText = v3.createElement(l_StyledTextLabel_0, {
                text = if not v34 then v23.ageVerifyPrompt else v23.verifyInBrowser,
                fontStyle = v24.Font.Header2,
                colorStyle = v24.Theme.TextEmphasis,
                size = UDim2.new(1, 0, 0, 0),
                lineHeight = 1,
                textTruncate = Enum.TextTruncate.AtEnd,
                textXAlignment = Enum.TextXAlignment.Center,
                textYAlignment = Enum.TextYAlignment.Center,
                automaticSize = Enum.AutomaticSize.XY,
                layoutOrder = 0
            }),
            DirectionsFrame = if v34 then nil else v3.createElement("Frame", {
                Size = UDim2.new(1, 0, 0, 144),
                BackgroundColor3 = v24.Theme.BackgroundContrast.Color,
                BackgroundTransparency = 0,
                LayoutOrder = 1
            }, {
                UICorner = v3.createElement("UICorner", {
                    CornerRadius = UDim.new(0, 8)
                }),
                UIPadding = v3.createElement("UIPadding", {
                    PaddingTop = UDim.new(0, 12),
                    PaddingBottom = UDim.new(0, 12),
                    PaddingLeft = UDim.new(0, 12),
                    PaddingRight = UDim.new(0, 12)
                }),
                UIListLayout = v3.createElement("UIListLayout", {
                    SortOrder = Enum.SortOrder.LayoutOrder,
                    FillDirection = Enum.FillDirection.Vertical,
                    HorizontalAlignment = Enum.HorizontalAlignment.Center,
                    VerticalAlignment = Enum.VerticalAlignment.Center,
                    Padding = UDim.new(0, 24)
                }),
                IDDirection = v3.createElement(v11, {
                    imagePath = "icons/menu/document",
                    headerText = v23.idDirectionsHeader,
                    descriptionText = v23.idDirectionsBody,
                    frameHeight = 48,
                    layoutOrder = 1
                }),
                PhoneDirection = v3.createElement(v11, {
                    imagePath = "icons/menu/mobile",
                    headerText = v23.phoneDirectionsHeader,
                    descriptionText = v23.phoneDirectionsBody,
                    frameHeight = 48,
                    layoutOrder = 2
                })
            }),
            Checklist = if not v34 then nil else v3.createElement(v17, {
                entryHeight = 18,
                layoutOrder = 1,
                latestStepCompleted = l_latestStepCompleted_0
            }),
            BeginText = if v34 then nil else v3.createElement(l_StyledTextLabel_0, {
                text = v23.beginText,
                fontStyle = v24.Font.Header1,
                colorStyle = v24.Theme.TextEmphasis,
                size = UDim2.new(1, 0, 0, 0),
                lineHeight = 1,
                textTruncate = Enum.TextTruncate.AtEnd,
                textXAlignment = Enum.TextXAlignment.Center,
                textYAlignment = Enum.TextYAlignment.Center,
                automaticSize = Enum.AutomaticSize.XY,
                layoutOrder = 2
            }),
            QRCodeWrapper = v3.createElement("Frame", {
                Size = v32,
                BackgroundColor3 = Color3.fromHex("#FFFFFF"),
                BackgroundTransparency = 0,
                LayoutOrder = 3
            }, {
                QrCode = if l_qrCodeLink_0 ~= nil then v3.createElement(l_DisplayQRCode_0, {
                    ecLevel = l_ECLevels_0.EC_LEVEL_1,
                    sideLength = 150,
                    backgroundTransparency = 1,
                    toEncode = l_qrCodeLink_0
                }) else v3.createElement(l_LoadingSpinner_0, {
                    size = UDim2.fromOffset(42, 42)
                }),
                UIListLayout = v3.createElement("UIListLayout", {
                    HorizontalAlignment = Enum.HorizontalAlignment.Center,
                    VerticalAlignment = Enum.VerticalAlignment.Center
                }),
                UICorner = v3.createElement("UICorner", {
                    CornerRadius = UDim.new(0, 8)
                }),
                UIPadding = v3.createElement("UIPadding", {
                    PaddingBottom = UDim.new(0, 4),
                    PaddingLeft = UDim.new(0, 4),
                    PaddingRight = UDim.new(0, 4),
                    PaddingTop = UDim.new(0, 4)
                })
            }),
            DisclaimerFrame = v3.createElement("Frame", {
                Size = UDim2.new(1, 0, 0, 100),
                BackgroundTransparency = 1,
                LayoutOrder = 4
            }, {
                UIListLayout = v3.createElement("UIListLayout", {
                    SortOrder = Enum.SortOrder.LayoutOrder,
                    FillDirection = Enum.FillDirection.Vertical,
                    HorizontalAlignment = Enum.HorizontalAlignment.Center,
                    VerticalAlignment = Enum.VerticalAlignment.Top
                }),
                Disclaimer = if v34 then nil else v3.createElement("TextLabel", {
                    Text = v23.disclaimer,
                    Font = l_Font_0,
                    TextSize = v30,
                    TextColor3 = v24.Theme.TextDefault.Color,
                    TextTransparency = l_Transparency_0,
                    TextXAlignment = Enum.TextXAlignment.Center,
                    TextWrapped = true,
                    AutomaticSize = Enum.AutomaticSize.XY,
                    Size = UDim2.new(1, 0, 0, 24),
                    BackgroundTransparency = 1,
                    LayoutOrder = 1
                }),
                PrivacyPolicy = if v34 then nil else v3.createElement(l_LinkButton_0, {
                    text = v23.privacyLinkText,
                    layoutOrder = 2,
                    fontStyle = "CaptionBody",
                    underlineAlwaysEnabled = true,
                    onActivated = function()
                        v6(v31, v7.IDVWithQRCodeUpsell, l_featureName_0, "OpenPrivacyPolicy");
                        l_openPrivacyPolicyLink_0();
                    end
                }),
                HavingTroubleInfoText = if not v34 then nil else v3.createElement(l_StyledTextLabel_0, {
                    text = v23.havingTroubleInfoText,
                    size = UDim2.new(1, 0, 0.5, 0),
                    fontStyle = v24.Font.CaptionBody,
                    colorStyle = v24.Theme.TextEmphasis,
                    lineHeight = 1,
                    textTruncate = Enum.TextTruncate.AtEnd,
                    textXAlignment = Enum.TextXAlignment.Center,
                    textYAlignment = Enum.TextYAlignment.Center,
                    layoutOrder = 1
                }),
                DontCloseWindowDisclaimer = if not v34 then nil else v3.createElement(l_StyledTextLabel_0, {
                    text = v23.dontCloseWindowDisclaimer,
                    fontStyle = v24.Font.CaptionBody,
                    size = UDim2.new(1, 0, 0.5, 0),
                    colorStyle = v24.Theme.TextEmphasis,
                    lineHeight = 1,
                    textTruncate = Enum.TextTruncate.AtEnd,
                    textXAlignment = Enum.TextXAlignment.Center,
                    textYAlignment = Enum.TextYAlignment.Center,
                    layoutOrder = 2
                })
            })
        })
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AmpUpsell");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local v2 = require(l_Parent_0.React);
local v3 = require(script.Parent.ProgressTile);
local l_useLocalization_0 = require(l_Parent_0.Localization).Hooks.useLocalization;
local l_IDVStep_0 = require(l_script_FirstAncestor_0.Common.Enums).IDVStep;
return function(v6)
    local v7 = l_useLocalization_0({
        connectedMobile = "Verification.Identity.Label.ConnectingToMobile",
        verifyingYou = "Verification.Identity.Label.VerifyingYou",
        waitingForResults = "Verification.Identity.Label.VerificationWaitingForResults",
        updatingRbxProfile = "Verification.Identity.Label.UpdatingRoblox"
    });
    return v2.createElement("Frame", {
        Size = UDim2.new(1, 0, 0, 4 * v6.entryHeight),
        BackgroundTransparency = 1,
        LayoutOrder = v6.layoutOrder
    }, {
        UIListLayout = v2.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            FillDirection = Enum.FillDirection.Vertical,
            HorizontalAlignment = Enum.HorizontalAlignment.Center,
            VerticalAlignment = Enum.VerticalAlignment.Center
        }),
        MobileCheck = v2.createElement(v3, {
            frameHeight = v6.entryHeight,
            layoutOrder = 1,
            finished = l_IDVStep_0.ConnectedMobile <= v6.latestStepCompleted,
            progressText = v7.connectedMobile
        }),
        VerifiedCheck = v2.createElement(v3, {
            frameHeight = v6.entryHeight,
            layoutOrder = 2,
            finished = l_IDVStep_0.Verified <= v6.latestStepCompleted,
            progressText = v7.verifyingYou
        }),
        GotResultsCheck = v2.createElement(v3, {
            frameHeight = v6.entryHeight,
            layoutOrder = 3,
            finished = l_IDVStep_0.GotResults <= v6.latestStepCompleted,
            progressText = v7.waitingForResults
        }),
        UpdateProfileCheck = v2.createElement(v3, {
            frameHeight = v6.entryHeight,
            layoutOrder = 4,
            finished = l_IDVStep_0.UpdatedRobloxProfile <= v6.latestStepCompleted,
            progressText = v7.updatingRbxProfile
        })
    });
end;


local l_Parent_0 = script:FindFirstAncestor("AmpUpsell").Parent;
local v1 = require(l_Parent_0.UIBlox);
local v2 = require(l_Parent_0.React);
local l_StyledTextLabel_0 = v1.App.Text.StyledTextLabel;
local l_LoadingSpinner_0 = v1.App.Loading.LoadingSpinner;
local l_ImageSetLabel_0 = v1.Core.ImageSet.ImageSetLabel;
local l_Images_0 = v1.App.ImageSet.Images;
local l_useStyle_0 = v1.Core.Style.useStyle;
return function(v8)
    local l_frameHeight_0 = v8.frameHeight;
    local l_layoutOrder_0 = v8.layoutOrder;
    local l_finished_0 = v8.finished;
    local l_progressText_0 = v8.progressText;
    local v13 = l_useStyle_0();
    return v2.createElement("Frame", {
        Size = UDim2.new(1, 0, 0, l_frameHeight_0),
        BackgroundTransparency = 1,
        LayoutOrder = l_layoutOrder_0
    }, {
        UIListLayout = v2.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            FillDirection = Enum.FillDirection.Horizontal,
            HorizontalAlignment = Enum.HorizontalAlignment.Center,
            VerticalAlignment = Enum.VerticalAlignment.Center,
            Padding = UDim.new(0, 12)
        }),
        StatusIcon = if not l_finished_0 then v2.createElement(l_LoadingSpinner_0, {
            size = UDim2.fromOffset(l_frameHeight_0, l_frameHeight_0)
        }) else v2.createElement(l_ImageSetLabel_0, {
            Size = UDim2.new(0, l_frameHeight_0, 0, l_frameHeight_0),
            ScaleType = Enum.ScaleType.Fit,
            LayoutOrder = 1,
            BackgroundTransparency = 1,
            Image = l_Images_0["icons/status/success"],
            ImageTransparency = v13.Theme.SystemPrimaryDefault.Transparency,
            ImageColor3 = v13.Theme.IconEmphasis.Color
        }),
        TextFrame = v2.createElement("Frame", {
            Size = UDim2.new(1, -l_frameHeight_0 - 12, 0, l_frameHeight_0),
            BackgroundTransparency = 1,
            LayoutOrder = 2
        }, {
            ProgressText = v2.createElement(l_StyledTextLabel_0, {
                text = l_progressText_0,
                fontStyle = v13.Font.CaptionBody,
                colorStyle = v13.Theme.TextDefault,
                size = UDim2.new(1, 0, 1, 0),
                lineHeight = 1,
                textTruncate = Enum.TextTruncate.AtEnd,
                textXAlignment = Enum.TextXAlignment.Left,
                textYAlignment = Enum.TextYAlignment.Center
            })
        })
    });
end;


game:DefineFastFlag("EnableAmpEmailUpsellSupport", false);
return function()
    return game:GetFastFlag("EnableAmpEmailUpsellSupport");
end;


game:DefineFastFlag("EnableAmpIDVUpsellSupport", false);
return function()
    return game:GetFastFlag("EnableAmpIDVUpsellSupport");
end;


game:DefineFastFlag("EnableAmpUpsellGQL", true);
return function()
    return game:GetFastFlag("EnableAmpUpsellGQL");
end;


game:DefineFastFlag("EnableDirectLinkForTablets", false);
return function()
    return game:GetFastFlag("EnableDirectLinkForTablets");
end;


game:DefineFastInt("IDVMaxRetries", 20);
return function()
    return game:GetFastInt("IDVMaxRetries");
end;


game:DefineFastInt("IDVPollDelay", 15);
return function()
    return game:GetFastInt("IDVPollDelay");
end;


game:DefineFastString("BiometricPrivacyPolicyLink", "https://en.help.roblox.com/hc/en-us/articles/4412863575316");
return function()
    return game:GetFastString("BiometricPrivacyPolicyLink");
end;


return {
    AccountSettingsUpsell = require(script.Components.Upsells.AccountSettingsUpsell),
    WizardContainer = require(script.Components.WizardContainer),
    AmpEnums = require(script.Common.Enums),
    AmpApiProvider = require(script.Common.AmpApiProvider),
    IDVUpsellContainer = require(script.Components.Upsells.IdentityVerification.IDVUpsellContainer),
    GetFFlagEnableAmpEmailUpsellSupport = require(script.Flags.GetFFlagEnableAmpEmailUpsellSupport),
    GetFFlagEnableAmpIDVUpsellSupport = require(script.Flags.GetFFlagEnableAmpIDVUpsellSupport),
    ["jest.config"] = script["jest.config"]
};


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


local l_RbxAnalyticsService_0 = game:GetService("RbxAnalyticsService");
local l_AnalyticsReporters_0 = script.Parent.AnalyticsReporters;
local v2 = require(l_AnalyticsReporters_0.Diag);
local v3 = require(l_AnalyticsReporters_0.EventStream);
local v4 = require(l_AnalyticsReporters_0.GoogleAnalytics);
local v5 = require(l_AnalyticsReporters_0.Influx);
local v6 = {};
v6.__index = v6;
v6.new = function(v7)
    if not v7 then
        v7 = l_RbxAnalyticsService_0;
    end;
    local v8 = {
        Diag = v2.new(v7),
        EventStream = v3.new(v7),
        GoogleAnalytics = v4.new(v7),
        InfluxDb = v5.new(v7)
    };
    setmetatable(v8, v6);
    return v8;
end;
v6.mock = function()
    return v6.new({
        ReportCounter = function()
        end,
        ReportInfluxSeries = function()
        end,
        ReportStats = function()
        end,
        SetRBXEvent = function()
        end,
        SetRBXEventStream = function()
        end,
        TrackEvent = function()
        end,
        UpdateHeartbeatObject = function()
        end,
        SendEventDeferred = function()
        end
    });
end;
return v6;


local l_UserInputService_0 = game:GetService("UserInputService");
local v1 = {};
v1.__index = v1;
v1.new = function(v2)
    local v3 = type(v2);
    local v4 = true;
    if v3 ~= "table" then
        v4 = v3 == "userdata";
    end;
    assert(v4, "Unexpected value for reportingService");
    local v5 = {
        _reporter = v2,
        _isEnabled = true
    };
    setmetatable(v5, v1);
    return v5;
end;
v1.setEnabled = function(v6, v7)
    assert(type(v7) == "boolean", "Expected isEnabled to be a boolean");
    v6._isEnabled = v7;
end;
v1.reportCounter = function(v8, v9, v10)
    assert(type(v9) == "string", "Expected counterName to be a string");
    assert(type(v10) == "number", "Expected amount to be a number");
    assert(v8._isEnabled, "This reporting service is disabled");
    local l_None_0 = Enum.Platform.None;
    pcall(function()
        l_None_0 = l_UserInputService_0:GetPlatform();
    end);
    if l_None_0 == Enum.Platform.XBoxOne then
        v9 = "Xbox-" .. tostring(v9);
    end;
    v8._reporter:ReportCounter(v9, v10);
end;
v1.reportCounterSimple = function(v12, v13, v14)
    if v12._isEnabled then
        v12._reporter:ReportCounter(v13, v14);
    end;
end;
v1.reportStats = function(v15, v16, v17)
    assert(type(v16) == "string", "Expected category to be a string");
    assert(type(v17) == "number", "Expected value to be a number");
    assert(v15._isEnabled, "This reporting service is disabled");
    v15._reporter:ReportStats(v16, v17);
end;
return v1;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("Analytics");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local l_UserInputService_0 = game:GetService("UserInputService");
local l_GetFFlagShareGetPlatformTargetImpl_0 = require(l_Parent_0.SharedFlags).GetFFlagShareGetPlatformTargetImpl;
local v4 = nil;
v4 = not l_GetFFlagShareGetPlatformTargetImpl_0() and function()
    local v5 = "unknownLua";
    local l_None_0 = Enum.Platform.None;
    pcall(function()
        l_None_0 = l_UserInputService_0:GetPlatform();
    end);
    local v7 = true;
    if l_None_0 ~= Enum.Platform.Windows then
        v7 = l_None_0 == Enum.Platform.OSX;
    end;
    local v8 = true;
    if l_None_0 ~= Enum.Platform.IOS then
        v8 = l_None_0 == Enum.Platform.Android;
    end;
    v8 = v8 or l_None_0 == Enum.Platform.UWP;
    local v9 = true;
    if l_None_0 ~= Enum.Platform.XBox360 then
        v9 = l_None_0 == Enum.Platform.XBoxOne;
    end;
    local l_v9_0 = v9;
    if not l_v9_0 then
        l_v9_0 = true;
        if l_None_0 ~= Enum.Platform.PS3 then
            l_v9_0 = true;
            if l_None_0 ~= Enum.Platform.PS4 then
                l_v9_0 = game:GetEngineFeature("PlatformEnumPS5") and l_None_0 == Enum.Platform.PS5;
            end;
        end;
    end;
    return if not v7 then v8 and "mobile" or ((l_v9_0 or l_None_0 == Enum.Platform.WiiU) and "console" or v5 .. tostring(l_None_0)) else "client";
end or require(l_script_FirstAncestor_0.getPlatformTarget);
local v11 = {};
v11.__index = v11;
v11.new = function(v12)
    local v13 = type(v12);
    local v14 = true;
    if v13 ~= "table" then
        v14 = v13 == "userdata";
    end;
    assert(v14, "Unexpected value for eventIngestService");
    local v15 = {
        _eventIngest = v12
    };
    setmetatable(v15, v11);
    return v15;
end;
v11.setRBXEvent = function(v16, v17, v18, v19)
    local v20 = v4();
    v19 = v19 or {};
    assert(type(v17) == "string", "Expected eventContext to be a string");
    assert(type(v18) == "string", "Expected eventName to be a string");
    assert(type(v19) == "table", "Expected additionalArgs to be a table");
    v16._eventIngest:SetRBXEvent(v20, v17, v18, v19);
end;
v11.setRBXEventStream = function(v21, v22, v23, v24)
    local v25 = v4();
    v24 = v24 or {};
    assert(type(v22) == "string", "Expected eventContext to be a string");
    assert(type(v23) == "string", "Expected eventName to be a string");
    assert(type(v24) == "table", "Expected additionalArgs to be a table");
    v21._eventIngest:SetRBXEventStream(v25, v22, v23, v24);
end;
v11.sendEventDeferred = function(v26, v27, v28, v29)
    local v30 = v4();
    v29 = v29 or {};
    assert(type(v27) == "string", "Expected eventContext to be a string");
    assert(type(v28) == "string", "Expected eventName to be a string");
    assert(type(v29) == "table", "Expected additionalArgs to be a table");
    v26._eventIngest:SendEventDeferred(v30, v27, v28, v29);
end;
v11.sendEventImmediately = function(v31, v32, v33, v34)
    local v35 = v4();
    v34 = v34 or {};
    assert(type(v32) == "string", "Expected eventContext to be a string");
    assert(type(v33) == "string", "Expected eventName to be a string");
    assert(type(v34) == "table", "Expected additionalArgs to be a table");
    v31._eventIngest:SendEventImmediately(v35, v32, v33, v34);
end;
return v11;


local l_Parent_0 = script:FindFirstAncestor("Analytics").Parent;
local l_UserInputService_0 = game:GetService("UserInputService");
local l_GetFFlagShareGetPlatformTargetImpl_0 = require(l_Parent_0.SharedFlags).GetFFlagShareGetPlatformTargetImpl;
local v3 = nil;
v3 = not l_GetFFlagShareGetPlatformTargetImpl_0() and function()
    local v4 = "unknownLua";
    local l_None_0 = Enum.Platform.None;
    pcall(function()
        l_None_0 = l_UserInputService_0:GetPlatform();
    end);
    local v6 = true;
    if l_None_0 ~= Enum.Platform.Windows then
        v6 = l_None_0 == Enum.Platform.OSX;
    end;
    local v7 = true;
    if l_None_0 ~= Enum.Platform.IOS then
        v7 = l_None_0 == Enum.Platform.Android;
    end;
    v7 = v7 or l_None_0 == Enum.Platform.UWP;
    local v8 = true;
    if l_None_0 ~= Enum.Platform.XBox360 then
        v8 = l_None_0 == Enum.Platform.XBoxOne;
    end;
    local l_v8_0 = v8;
    if not l_v8_0 then
        l_v8_0 = true;
        if l_None_0 ~= Enum.Platform.PS3 then
            l_v8_0 = true;
            if l_None_0 ~= Enum.Platform.PS4 then
                l_v8_0 = game:GetEngineFeature("PlatformEnumPS5") and l_None_0 == Enum.Platform.PS5;
            end;
        end;
    end;
    return if not v6 then v7 and "mobile" or ((l_v8_0 or l_None_0 == Enum.Platform.WiiU) and "console" or v4 .. tostring(l_None_0)) else "client";
end or require(script.Parent.Parent.getPlatformTarget);
local v10 = {};
v10.__index = v10;
v10.new = function(v11)
    local v12 = type(v11);
    local v13 = true;
    if v12 ~= "table" then
        v13 = v12 == "userdata";
    end;
    assert(v13, "Unexpected value for reportingService");
    local v14 = {
        _reporter = v11,
        _isEnabled = true
    };
    setmetatable(v14, v10);
    return v14;
end;
v10.setEnabled = function(v15, v16)
    assert(type(v16) == "boolean", "Expected isEnabled to be a boolean");
    v15._isEnabled = v16;
end;
v10.setRBXEvent = function(v17, v18, v19, v20)
    local v21 = v3();
    v20 = v20 or {};
    assert(type(v18) == "string", "Expected eventContext to be a string");
    assert(type(v19) == "string", "Expected eventName to be a string");
    assert(type(v20) == "table", "Expected additionalArgs to be a table");
    assert(v17._isEnabled, "This reporting service is disabled");
    v17._reporter:SetRBXEvent(v21, v18, v19, v20);
end;
v10.setRBXEventStream = function(v22, v23, v24, v25)
    local v26 = v3();
    v25 = v25 or {};
    assert(type(v23) == "string", "Expected eventContext to be a string");
    assert(type(v24) == "string", "Expected eventName to be a string");
    assert(type(v25) == "table", "Expected additionalArgs to be a table");
    assert(v22._isEnabled, "This reporting service is disabled");
    v22._reporter:SetRBXEventStream(v26, v23, v24, v25);
end;
v10.releaseRBXEventStream = function(v27)
    assert(v27._isEnabled, "This reporting service is disabled");
    v27._reporter:ReleaseRBXEventStream(v3());
end;
v10.sendEventDeferred = function(v28, v29, v30, v31)
    local v32 = v3();
    v31 = v31 or {};
    assert(type(v29) == "string", "Expected eventContext to be a string");
    assert(type(v30) == "string", "Expected eventName to be a string");
    assert(type(v31) == "table", "Expected additionalArgs to be a table");
    assert(v28._isEnabled, "This reporting service is disabled");
    v28._reporter:SendEventDeferred(v32, v29, v30, v31);
end;
v10.sendEventImmediately = function(v33, v34, v35, v36)
    local v37 = v3();
    v36 = v36 or {};
    assert(type(v34) == "string", "Expected eventContext to be a string");
    assert(type(v35) == "string", "Expected eventName to be a string");
    assert(type(v36) == "table", "Expected additionalArgs to be a table");
    assert(v33._isEnabled, "This reporting service is disabled");
    v33._reporter:SendEventImmediately(v37, v34, v35, v36);
end;
v10.updateHeartbeatObject = function(v38, v39)
    v39 = v39 or {};
    assert(type(v39) == "table", "Expected additionalArgs to be a table");
    assert(v38._isEnabled, "This reporting service is disabled");
    v38._reporter:UpdateHeartbeatObject(v39);
end;
return v10;


local v0 = {};
v0.__index = v0;
v0.new = function(v1)
    local v2 = type(v1);
    local v3 = true;
    if v2 ~= "table" then
        v3 = v2 == "userdata";
    end;
    assert(v3, "Unexpected value for reportingService");
    local v4 = {
        _reporter = v1,
        _isEnabled = true
    };
    setmetatable(v4, v0);
    return v4;
end;
v0.setEnabled = function(v5, v6)
    assert(type(v6) == "boolean", "Expected isEnabled to be a boolean");
    v5._isEnabled = v6;
end;
v0.trackEvent = function(v7, v8, v9, v10, v11)
    assert(type(v8) == "string", "Expected category to be a string");
    assert(type(v9) == "string", "Expected action to be a string");
    if v10 then
        assert(type(v10) == "string", "Expected label to be a string");
    end;
    if v11 then
        assert(type(v11) == "number", "Expected value to be a number");
        assert(v11 >= 0, "Expected value must not be a negative value");
    end;
    assert(v7._isEnabled, "This reporting service is disabled");
    v7._reporter:TrackEvent(v8, v9, v10, v11);
end;
return v0;


local v0 = {};
v0.__index = v0;
v0.new = function(v1)
    local v2 = type(v1);
    local v3 = true;
    if v2 ~= "table" then
        v3 = v2 == "userdata";
    end;
    assert(v3, "Unexpected value for reportingService");
    local v4 = {
        _reporter = v1,
        _isEnabled = true
    };
    setmetatable(v4, v0);
    return v4;
end;
v0.setEnabled = function(v5, v6)
    assert(type(v6) == "boolean", "Expected isEnabled to be a boolean");
    v5._isEnabled = v6;
end;
v0.reportSeries = function(v7, v8, v9, v10)
    v9 = v9 or {};
    assert(type(v8) == "string", "Expected seriesName to be a string");
    assert(type(v9) == "table", "Expected additionalArgs to be a table");
    assert(type(v10) == "number", "Expected throttlingPercent to be a number");
    local v11 = false;
    if v10 >= 0 then
        v11 = v10 <= 10000;
    end;
    assert(v11, "throttlingPercent must be between 0 - 10,000");
    assert(v7._isEnabled, "This reporting service is disabled");
    v7._reporter:ReportInfluxSeries(v8, v9, v10);
end;
return v0;


return {
    Diag = require(script.Diag),
    EventIngest = require(script.EventIngest),
    EventStream = require(script.EventStream),
    GoogleAnalytics = require(script.GoogleAnalytics),
    Influx = require(script.Influx)
};


local l_RbxAnalyticsService_0 = game:GetService("RbxAnalyticsService");
math.randomseed(tick());
return function(v1, v2, v3, v4)
    if v4 < 100 * math.random() then
        return ;
    else
        l_RbxAnalyticsService_0:ReportToDiagByCountryCode(v1, v2, v3);
        return ;
    end;
end;


local v0 = require(script.Parent.ReportToDiagByCountryCode);
local v1 = {};
v1.__index = v1;
v1.new = function(v2, v3)
    assert(v3, "metricName is required");
    return (setmetatable({
        metricName = v3,
        startTime = tick()
    }, v2));
end;
v1.report = function(v4)
    v0(v4.metricName, "RoundTripTime", tick() - v4.startTime, 100);
end;
return v1;


return function(v0)
    return function()
        local v1 = "unknownLua";
        local l_None_0 = Enum.Platform.None;
        pcall(function()
            l_None_0 = v0:GetPlatform();
        end);
        local v3 = true;
        if l_None_0 ~= Enum.Platform.Windows then
            v3 = l_None_0 == Enum.Platform.OSX;
        end;
        local v4 = true;
        if l_None_0 ~= Enum.Platform.IOS then
            v4 = l_None_0 == Enum.Platform.Android;
        end;
        v4 = v4 or l_None_0 == Enum.Platform.UWP;
        local v5 = true;
        if l_None_0 ~= Enum.Platform.XBox360 then
            v5 = l_None_0 == Enum.Platform.XBoxOne;
        end;
        local l_v5_0 = v5;
        if not l_v5_0 then
            l_v5_0 = true;
            if l_None_0 ~= Enum.Platform.PS3 then
                l_v5_0 = true;
                if l_None_0 ~= Enum.Platform.PS4 then
                    l_v5_0 = game:GetEngineFeature("PlatformEnumPS5") and l_None_0 == Enum.Platform.PS5;
                end;
            end;
        end;
        return if not v3 then v4 and "mobile" or ((l_v5_0 or l_None_0 == Enum.Platform.WiiU) and "console" or v1 .. tostring(l_None_0)) else "client";
    end;
end;


return {
    Analytics = require(script.Analytics),
    AnalyticsReporters = require(script.AnalyticsReporters),
    getPlatformTarget = require(script.getPlatformTarget),
    ReportToDiagByCountryCode = require(script.ReportToDiagByCountryCode),
    RequestTimeDiag = require(script.RequestTimeDiag)
};


local l_Parent_0 = script:FindFirstAncestor("ApolloFriends").Parent;
local v1 = require(l_Parent_0.Cryo);
local l_utils_0 = require(l_Parent_0.ApolloLocalState).typePolicies.utils;
local v3 = require(script.Parent.createFriendInCache);
return function(v4, v5)
    local v6 = v3(v4, {
        userId = v5.userId,
        targetUserId = v5.targetUserId,
        hasVerifiedBadge = v5.hasVerifiedBadge
    });
    v4.cache:modify({
        id = v4.cache:identify({
            __typename = "AllFriendsPage"
        }),
        fields = {
            allFriendsByUserId = function(_, v8, _)
                if v8.targetUserId == v5.targetUserId then
                    return (v1.Dictionary.join(v8, {
                        friends = l_utils_0.mergeListsWithoutDuplicates(v8.friends, {
                            v6
                        }, "__ref")
                    }));
                else
                    return v8;
                end;
            end
        }
    });
end;


local l_gql_0 = require(script:FindFirstAncestor("ApolloFriends").Parent.ApolloClient).gql;
return function(v1, v2)
    return (v1.cache:writeFragment({
        data = {
            __typename = "Friend",
            id = v2.userId,
            targetUserId = v2.targetUserId,
            hasVerifiedBadge = v2.hasVerifiedBadge or false,
            displayName = ""
        },
        fragment = l_gql_0("\t\t\tfragment NewFriend on Friend {\n\t\t\t\tid\n\t\t\t\ttargetUserId\n\t\t\t\thasVerifiedBadge\n\t\t\t\tdisplayName\n\t\t\t}\n\t\t")
    }));
end;


return {
    addFriendToFriendsByUserIdCache = require(script.addFriendToFriendsByUserIdCache),
    removeFriendFromCache = require(script.removeFriendFromCache),
    createFriendInCache = require(script.createFriendInCache)
};


return function(v0, v1)
    v0.cache:evict({
        id = v0.cache:identify({
            __typename = "Friend",
            id = v1.userId,
            targetUserId = v1.targetUserId
        })
    });
    v0.cache:gc();
end;


return {
    Cache = require(script.Cache),
    Hooks = require(script.Hooks),
    Mutations = require(script.Mutations),
    Enums = require(script.Enums),
    ["jest.config"] = script["jest.config"]
};


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


game:DefineFastFlag("EnableMergeOmniFeedSorts3", false);
return function()
    return game:GetFastFlag("EnableMergeOmniFeedSorts3");
end;


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


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


return {
    reactiveVars = require(script.reactiveVars),
    typePolicies = require(script.typePolicies),
    queries = require(script.queries),
    fragments = require(script.fragments),
    Flags = require(script.Flags),
    ["jest.config"] = script["jest.config"]
};


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


return (require(script:FindFirstAncestor("ApolloLocalState").Parent.ApolloClient).gql("\tquery AllFriendsByUserId($userId: ID Int, $pageLimit: Int, $pageCursor: String) {\n\t\tallFriendsByUserId(userId: $userId, sort: $sort, pageLimit: $pageLimit, pageCursor: $pageCursor) {\n\t\t\ttargetUserId\n\t\t\tprevCursor\n\t\t\tnextCursor\n\t\t\tcurCursor\n\t\t\tfriends {\n\t\t\t\tid\n\t\t\t\ttargetUserId\n\t\t\t\thasVerifiedBadge\n\t\t\t}\n\t\t}\n\t}\n"));


local l_gql_0 = require(script:FindFirstAncestor("ApolloLocalState").Parent.ApolloClient).gql;
return {
    omniFeed = l_gql_0("  query Feed($sessionId: String, $pageType: String, $nextPageToken: String, $supportedTreatmentTypes: [String]) {\n    omniFeed(sessionId: $sessionId, pageType: $pageType, nextPageToken: $nextPageToken, supportedTreatmentTypes: $supportedTreatmentTypes) {\n      nextPageToken\n      omniSessionId\n      recommendationsId\n      pageType\n      globalLayoutData\n      sorts {\n        topic\n        topicId\n        topicLayoutData\n        treatmentType\n        recommendations {\n          contentId\n          contentMetadata\n          contentType\n        }\n      }\n    }\n  }\n"),
    omniFeedWithMetadata = l_gql_0("  query Feed($sessionId: String, $pageType: String, $nextPageToken: String, $supportedTreatmentTypes: [String]) {\n    omniFeed(sessionId: $sessionId, pageType: $pageType, nextPageToken: $nextPageToken, supportedTreatmentTypes: $supportedTreatmentTypes) {\n      metadata {\n        GameJSON\n        CatalogBundleJSON\n        CatalogAssetJSON\n        RecommendedFriendJSON\n      }\n      isSessionExpired\n      nextPageToken\n      omniSessionId\n      pageType\n      globalLayoutData\n      recommendationsId\n      sortsExpirationTime\n      sorts {\n        topic\n        topicId\n        topicLayoutData\n        treatmentType\n        recommendations {\n          contentId\n          contentMetadata\n          contentType\n        }\n      }\n    }\n  }\n")
};


return (require(script:FindFirstAncestor("ApolloLocalState").Parent.ApolloClient).gql("    query OnlineFriendsByUserId($userId: ID Int) {\n        onlineFriendsByUserId(userId: $userId, sort: $sort) {\n            id\n            targetUserId\n            presence {\n                id\n                userPresenceType\n                lastLocation\n                lastOnline\n                placeId\n                rootPlaceId\n                gameId\n                universeId\n            }\n        }\n    }\n"));


return (require(script:FindFirstAncestor("ApolloLocalState").Parent.ApolloClient).gql("\tquery ProfilesInsights($userIds: [String] Int) {\n\t\tprofilesInsightsByUserIds(userIds: $userIds, count: $count) {\n\t\t\ttargetUserId\n\t\t\tisOfflineFrequents\n\t\t\tmutualFriends {\n\t\t\t\tid\n\t\t\t\tusername\n\t\t\t\tdisplayName\n\t\t\t}\n\t\t}\n\t}\n"));


local l_gql_0 = require(script:FindFirstAncestor("ApolloLocalState").Parent.ApolloClient).gql;
local v1 = l_gql_0("\tquery UserProfiles($userIds: [String] $userIds) {\n\t\t\tid\n\t\t\tnames {\n\t\t\t\tcombinedName\n\t\t\t\tusername\n\t\t\t\talias\n\t\t\t\tdisplayName\n\t\t\t\tcontactName\n\t\t\t\tplatformName\n\t\t\t}\n\t\t\tplatformProfileId\n\t\t}\n\t}\n");
local v2 = l_gql_0("\tquery UserProfiles($userIds: [String] $userIds) {\n\t\t\tid\n\t\t\tnames {\n\t\t\t\tcombinedName\n\t\t\t\tusername\n\t\t\t\talias\n\t\t\t\tdisplayName\n\t\t\t\tcontactName\n\t\t\t\tplatformName\n\t\t\t}\n\t\t}\n\t}\n");
if not game:GetEngineFeature("PlatformFriendsService") or not game:GetEngineFeature("PlatformFriendsProfile") then
    return v2;
else
    return v1;
end;


return (require(script:FindFirstAncestor("ApolloLocalState").Parent.ApolloClient).gql("\tquery UserProfiles($userIds: [String] $userIds) {\n\t\t\tid\n\t\t\tnames {\n\t\t\t\tcombinedName\n                platformName\n\t\t\t}\n\t\t}\n\t}\n"));


return (require(script:FindFirstAncestor("ApolloLocalState").Parent.ApolloClient).gql("\tquery UserProfiles($userIds: [String] $userIds) {\n\t\t\tid\n\t\t\tnames {\n\t\t\t\tcombinedName\n\t\t\t\talias\n\t\t\t}\n\t\t}\n\t}\n"));


return (require(script:FindFirstAncestor("ApolloLocalState").Parent.ApolloClient).gql("\tquery UserProfiles($userIds: [String] $userIds) {\n\t\t\tid\n\t\t\tnames {\n\t\t\t\tcombinedName\n\t\t\t\tusername\n\t\t\t}\n\t\t}\n\t}\n"));


return (require(script:FindFirstAncestor("ApolloLocalState").Parent.ApolloClient).gql("\tquery UserProfiles($userIds: [String] $userIds) {\n\t\t\tid\n\t\t\tnames {\n\t\t\t\tcombinedName\n\t\t\t}\n\t\t}\n\t}\n"));


return (require(script:FindFirstAncestor("ApolloLocalState").Parent.ApolloClient).gql("\tquery UserProfiles($userIds: [String] $userIds) {\n\t\t\tid\n\t\t\tnames {\n\t\t\t\tusername\n\t\t\t\tdisplayName\n\t\t\t}\n\t\t}\n\t}\n"));


return (require(script:FindFirstAncestor("ApolloLocalState").Parent.ApolloClient).gql("\tquery UserProfiles($userIds: [String] $userIds) {\n\t\t\tid\n\t\t\tnames {\n\t\t\t\tplatformName\n\t\t\t}\n\t\t}\n\t}\n"));


return (require(script:FindFirstAncestor("ApolloLocalState").Parent.ApolloClient).gql("\tquery UserProfiles($userIds: [String] $userIds) {\n\t\t\tid\n\t\t\tplatformProfileId\n\t\t}\n\t}\n"));


local l_makeVar_0 = require(script:FindFirstAncestor("ApolloLocalState").Parent.ApolloClient).makeVar;
return {
    nextPageToken = l_makeVar_0(nil),
    omniSessionId = l_makeVar_0(""),
    localSorts = l_makeVar_0({}),
    homeGameSorts = l_makeVar_0({}),
    supportedTreatmentTypes = l_makeVar_0({})
};


local l_Object_0 = require(script:FindFirstAncestor("ApolloLocalState").Parent.LuauPolyfill).Object;
local v1 = require(script.OmniFeedVars);
local v2 = {};
l_Object_0.assign(v2, v1);
return v2;


local l_Parent_0 = script:FindFirstAncestor("ApolloLocalState").Parent;
local l_GetFFlagApolloClientFetchThumbnails_0 = require(l_Parent_0.SharedFlags).GetFFlagApolloClientFetchThumbnails;
local l_GetFFlagApolloClientFetchExperiences_0 = require(l_Parent_0.SharedFlags).GetFFlagApolloClientFetchExperiences;
return {
    keyFields = if not l_GetFFlagApolloClientFetchThumbnails_0() then nil else {
        "universeId"
    },
    fields = {
        adId = if not l_GetFFlagApolloClientFetchExperiences_0() then nil else {
            read = function(_, _, v5)
                local v6 = v5:toReference({
                    __typename = "OmniFeedRecommendation",
                    contentId = v5:readField("universeId")
                });
                local v7 = if not v6 then nil else v6.contentMetadata;
                if not v7 or not v7.EncryptedAdTrackingData then
                    return "";
                else
                    return v7.EncryptedAdTrackingData;
                end;
            end
        },
        isSponsored = {
            read = if not l_GetFFlagApolloClientFetchExperiences_0() then nil else function(_, _, v10)
                local v11 = v10:readField("adId");
                local v12 = false;
                if v11 ~= nil then
                    v12 = v11 ~= "";
                end;
                return v12;
            end
        },
        thumbnails = {
            read = require(script.Parent.utils.makeDefaultReadPolicy)({})
        }
    }
};


return {
    fields = {
        imageId = {
            read = require(script.Parent.utils.makeDefaultReadPolicy)("-1")
        }
    }
};


local v0 = require(script.Parent.utils.makeDefaultReadPolicy);
return {
    fields = {
        alias = {
            read = v0("")
        },
        contactName = {
            read = v0("")
        },
        platformName = {
            read = v0("")
        }
    }
};


local v0 = require(script.Parent.utils.makeDefaultReadPolicy);
return {
    keyFields = {
        "pageType"
    },
    fields = {
        sorts = {
            merge = if not require(script.Parent.Parent.Flags).GetFFlagEnableMergeOmniFeedSorts() then nil else require(script.Parent.utils.makeMergeOverlappingArraysPolicy)("topicId")
        },
        nextPageToken = {
            read = v0("")
        },
        globalLayoutData = {
            read = v0({})
        }
    }
};


local l_Parent_0 = script:FindFirstAncestor("ApolloLocalState").Parent;
local l_GetFFlagApolloClientFetchThumbnails_0 = require(l_Parent_0.SharedFlags).GetFFlagApolloClientFetchThumbnails;
local l_GetFFlagApolloClientFetchExperiences_0 = require(l_Parent_0.SharedFlags).GetFFlagApolloClientFetchExperiences;
local l_GetFFlagEnableMergeOmniFeedSorts_0 = require(script.Parent.Parent.Flags).GetFFlagEnableMergeOmniFeedSorts;
local _ = require(l_Parent_0.ApolloClient);
local v5 = require(script.Parent.utils.makeMergeOverlappingArraysPolicy);
local v6 = require(script.Parent.utils.makeDefaultReadPolicy);
return {
    keyFields = if not l_GetFFlagApolloClientFetchThumbnails_0() then nil else {
        "topicId"
    },
    fields = {
        topicLayoutData = {
            read = v6({})
        },
        recommendations = {
            read = v6({}),
            merge = if not l_GetFFlagEnableMergeOmniFeedSorts_0() then nil else v5("contentId")
        },
        experiences = {
            merge = if not l_GetFFlagApolloClientFetchExperiences_0() then nil else function(_, v8, v9, v10)
                if v8 == nil then
                    return v9;
                else
                    local v11 = {};
                    local v12 = {};
                    for v13, v14 in v8, nil, nil do
                        v11[v10:readField("universeId", v14)] = v13;
                        table.insert(v12, v14);
                    end;
                    for _, v16 in v9, nil, nil do
                        local v17 = v10:readField("universeId", v16);
                        if v11[v17] == nil then
                            table.insert(v12, v16);
                        else
                            v12[v11[v17]] = v16;
                        end;
                    end;
                    return v12;
                end;
            end
        },
        hasMoreRows = {
            read = if not l_GetFFlagApolloClientFetchExperiences_0() then nil else function(_, _, v20)
                local v21 = v20:readField("experiences");
                local v22 = v20:readField("recommendations");
                if v22 == nil then
                    return false;
                elseif v21 == nil then
                    return #v22 > 0;
                else
                    return #v21 < #v22;
                end;
            end
        }
    }
};


return {
    keyFields = if not require(script:FindFirstAncestor("ApolloLocalState").Parent.SharedFlags).GetFFlagApolloClientFetchExperiences() then nil else {
        "contentId"
    },
    fields = {
        contentMetadata = {
            read = require(script.Parent.utils.makeDefaultReadPolicy)({})
        }
    }
};


local v0 = require(script.Parent.utils.mergeLists);
return {
    fields = {
        profileInsights = {
            merge = function(_, v2, v3)
                return v0(v2, v3);
            end
        }
    }
};


local l_Parent_0 = script:FindFirstAncestor("ApolloLocalState").Parent;
local _ = require(l_Parent_0.ApolloClient);
local v2 = require(l_Parent_0.Cryo);
local v3 = require(script.Parent.utils.mergeListsWithoutDuplicates);
return {
    fields = {
        omniFeedItem = {
            read = if not require(l_Parent_0.SharedFlags).GetFFlagApolloClientFetchThumbnails() then nil else function(_, _, v6)
                return v6:toReference({
                    __typename = "OmniFeedItem",
                    topicId = v6.args.sortId
                });
            end
        },
        profilesInsightsByUserIds = {
            read = function(_, _, v9)
                local v10 = {};
                for _, v12 in pairs(v9.args.userIds) do
                    local v13 = v9:toReference({
                        __typename = "ProfileInsights",
                        targetUserId = v12
                    });
                    table.insert(v10, v13);
                    if not v9:canRead(v13) then
                        return nil;
                    end;
                end;
                return v10;
            end
        },
        userProfiles = {
            read = function(_, _, v16)
                local v17 = {};
                for _, v19 in v16.args.userIds, nil, nil do
                    local v20 = v16:toReference({
                        __typename = "UserProfile",
                        id = v19
                    });
                    table.insert(v17, v20);
                    if not v16:canRead(v20) then
                        return nil;
                    end;
                end;
                return v17;
            end
        },
        allFriendsByUserId = if not require(l_Parent_0.SharedFlags).FFlagApolloClientAllFriendsQueryPolicy then nil else {
            keyArgs = {
                "userId",
                "sort"
            },
            merge = function(_, v22, v23)
                if v22 then
                    if v22.nextCursor == v23.curCursor then
                        return v2.Dictionary.join(v23, {
                            friends = v3(v22 and v22.friends, v23 and v23.friends, "__ref")
                        });
                    else
                        return v22;
                    end;
                else
                    return v23;
                end;
            end
        },
        onlineFriendsByUserId = if not require(l_Parent_0.SharedFlags).FFlagApolloClientOnlineFriendsQueryPolicy then nil else {
            keyArgs = {
                "userId",
                "sort"
            },
            read = function(_, v25, v26)
                if v25 then
                    return (v2.List.filter(v25, function(v27)
                        local v28 = v26:readField("userPresenceType", (v26:readField("presence", v27)));
                        return v28 and v28 ~= "Offline";
                    end));
                else
                    return v25;
                end;
            end
        }
    }
};


return {
    fields = {
        platformProfileId = {
            read = require(script.Parent.utils.makeDefaultReadPolicy)("")
        }
    }
};


return {
    Names = require(script.Names),
    OmniFeed = require(script.OmniFeed),
    OmniFeedRecommendation = require(script.OmniFeedRecommendation),
    OmniFeedItem = require(script.OmniFeedItem),
    Experience = require(script.Experience),
    ExperienceMedia = require(script.ExperienceMedia),
    Query = require(script.Query),
    ProfileInsightsPages = require(script.ProfileInsightsPages),
    ProfileInsights = require(script.ProfileInsights),
    UserProfile = require(script.UserProfile),
    utils = {
        mergeListsWithoutDuplicates = require(script.utils.mergeListsWithoutDuplicates)
    }
};


return function(v0)
    return function(_, v2)
        return v2 or v0;
    end;
end;


return function(v0)
    return function(_, v2, v3, v4)
        v2 = v2 or {};
        v3 = v3 or {};
        if #v3 == 0 then
            return v2;
        elseif #v2 == 0 then
            return v3;
        else
            local v5 = {};
            local v6 = table.clone(v2);
            for v7, v8 in v6, nil, nil do
                local v9 = v4:readField(v0, v8);
                if v9 then
                    v5[v9] = v7;
                end;
            end;
            for _, v11 in v3, nil, nil do
                local v12 = v4:readField(v0, v11);
                if not v12 or not v5[v12] then
                    table.insert(v6, v11);
                else
                    local v13 = v5[v12];
                    v6[v13] = v4:mergeObjects(v6[v13], v11);
                end;
            end;
            return v6;
        end;
    end;
end;


local l_Array_0 = require(script:FindFirstAncestor("ApolloLocalState").Parent.LuauPolyfill).Array;
return function(_, v2, v3)
    v2 = v2 or {};
    v3 = v3 or {};
    if #v3 == 0 then
        return v2;
    elseif #v2 == 0 then
        return v3;
    else
        return l_Array_0.concat(table.clone(v2), v3);
    end;
end;


local l_Array_0 = require(script:FindFirstAncestor("ApolloLocalState").Parent.LuauPolyfill).Array;
return function(v1, v2)
    v1 = v1 or {};
    v2 = v2 or {};
    if #v2 == 0 then
        return v1;
    elseif #v1 == 0 then
        return v2;
    else
        return l_Array_0.concat(table.clone(v1), v2);
    end;
end;


local v0 = require(script:FindFirstAncestor("ApolloLocalState").Parent.Cryo);
return function(v1, v2, v3)
    if not v2 or #v2 == 0 then
        return v1;
    elseif not v1 or #v1 == 0 then
        return v2;
    else
        local v5 = v0.List.toSet(v0.List.map(v1, function(v4)
            if not v3 then
                return v4;
            else
                return v4[v3];
            end;
        end));
        return v0.List.join(table.clone(v1), (v0.List.filter(v2, function(v6)
            return not v5[if not v3 then v6 else v6[v3]];
        end)));
    end;
end;


local l_Parent_0 = script:FindFirstAncestor("ApolloPresence").Parent;
local v1 = require(l_Parent_0.Cryo);
local l_PresenceType_0 = require(l_Parent_0.GraphQLServer).types.PresenceType;
local v3 = {
    [l_PresenceType_0.Offline] = 0,
    [l_PresenceType_0.Online] = 1,
    [l_PresenceType_0.InGame] = 2,
    [l_PresenceType_0.InStudio] = 3
};
local v6 = v1.List.foldLeft(v1.Dictionary.keys(v3), function(v4, v5)
    v4[tostring(v3[v5])] = v5;
    return v4;
end, {});
local function _(v7)
    if not v7 then
        return "";
    else
        return (tostring(v7));
    end;
end;
return {
    formatNumberToPresenceType = function(v9)
        return not not v9 and v6[tostring(v9)] or l_PresenceType_0.Offline;
    end,
    formatPresenceTypeToNumber = function(v10)
        return not not v10 and v3[v10] or v3[l_PresenceType_0.Offline];
    end,
    formatUserPresence = function(v11)
        local v12 = {
            id = v11.id
        };
        local v13;
        if not v11.userPresenceType then
            local l_userPresenceNumber_0 = v11.userPresenceNumber;
            v13 = not not l_userPresenceNumber_0 and v6[tostring(l_userPresenceNumber_0)] or l_PresenceType_0.Offline;
        else
            v13 = v11.userPresenceType;
        end;
        v12.userPresenceType = v13;
        v12.lastLocation = v11.lastLocation or "";
        v12.lastOnline = v11.lastOnline or "";
        local l_gameId_0 = v11.gameId;
        v12.gameId = not l_gameId_0 and "" or tostring(l_gameId_0);
        l_gameId_0 = v11.placeId;
        v12.placeId = not l_gameId_0 and "" or tostring(l_gameId_0);
        l_gameId_0 = v11.rootPlaceId;
        v12.rootPlaceId = not l_gameId_0 and "" or tostring(l_gameId_0);
        l_gameId_0 = v11.universeId;
        v12.universeId = not l_gameId_0 and "" or tostring(l_gameId_0);
        return v12;
    end
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("ApolloPresence");
local l_Parent_0 = l_script_FirstAncestor_0.Parent;
local l_fragments_0 = require(l_Parent_0.ApolloLocalState).fragments;
local v3 = require(l_Parent_0.Cryo);
local v4 = require(l_script_FirstAncestor_0.Formatters);
return function(v5, v6)
    return (v5.cache:writeFragment({
        data = v3.Dictionary.join({
            __typename = "UserPresence"
        }, v4.formatUserPresence(v6)),
        fragment = l_fragments_0.userPresenceAllFields
    }));
end;


return {
    updateUserPresenceCache = require(script.updateUserPresenceCache),
    createUserPresenceCache = require(script.createUserPresenceCache)
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("ApolloPresence");
local l_fragments_0 = require(l_script_FirstAncestor_0.Parent.ApolloLocalState).fragments;
local v2 = require(l_script_FirstAncestor_0.Formatters);
return function(v3, v4)
    return (v3.cache:writeFragment({
        id = v3.cache:identify({
            __typename = "UserPresence",
            id = v4.id
        }),
        fragment = l_fragments_0.userPresenceAllFields,
        data = v2.formatUserPresence(v4)
    }));
end;


local l_fragments_0 = require(script:FindFirstAncestor("ApolloPresence").Parent.ApolloLocalState).fragments;
return function(v1, v2)
    return (v1.cache:readFragment({
        id = v1.cache:identify({
            __typename = "UserPresence",
            id = v2.userId
        }),
        fragment = l_fragments_0.userPresenceAllFields
    }));
end;


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


return {
    Hooks = require(script.Hooks),
    Mutations = require(script.Mutations),
    Formatters = require(script.Formatters),
    Selectors = require(script.Selectors),
    ["jest.config"] = script["jest.config"]
};


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


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


local l_Parent_0 = script:FindFirstAncestor("ApolloProfileInsights").Parent;
local v1 = require(l_Parent_0.ApolloClient);
local v2 = require(l_Parent_0.ApolloLocalState);
local l_useQuery_0 = v1.useQuery;
local l_queries_0 = v2.queries;
return function(v5)
    return (l_useQuery_0(l_queries_0.profilesInsightsByUserIds, {
        errorPolicy = "all",
        skip = not v5.userIds or v5.skip,
        variables = {
            userIds = v5.userIds
        }
    }));
end;


local l_Parent_0 = script:FindFirstAncestor("ApolloProfileInsights").Parent;
local v1 = require(script.Parent.getProfileInsightsByUserIdFromData);
local _ = require(l_Parent_0.GraphQLServer);
return function(v3, v4)
    local v5 = v1(v3, v4);
    local v6;
    if not v5 then
        v6 = {};
    else
        v6 = v5.mutualFriends;
        if not v6 then
            return {};
        end;
    end;
    return v6;
end;


local v0 = require(script.Parent.getProfileInsightsByUserIdFromData);
return function(v1, v2)
    local v3 = v0(v1, v2);
    if not v3 then
        return false;
    else
        return v3.isOfflineFrequents or false;
    end;
end;


local l_Parent_0 = script:FindFirstAncestor("ApolloProfileInsights").Parent;
local v1 = require(l_Parent_0.Cryo);
local _ = require(l_Parent_0.GraphQLServer);
return function(v3, v4)
    if v3 and v3.profilesInsightsByUserIds then
        local l_profilesInsightsByUserIds_0 = v3.profilesInsightsByUserIds;
        return l_profilesInsightsByUserIds_0[v1.List.findWhere(l_profilesInsightsByUserIds_0, function(v6, _)
            return v6.targetUserId == tostring(v4);
        end)];
    else
        return nil;
    end;
end;


return {
    getProfileInsightsByUserIdFromData = require(script.getProfileInsightsByUserIdFromData),
    getMutualFriendsByUserIdFromData = require(script.getMutualFriendsByUserIdFromData),
    getOfflineFrequentsByUserIdFromData = require(script.getOfflineFrequentsByUserIdFromData)
};


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