local l_Parent_0 = script.Parent.Parent;
local l_context_0 = l_Parent_0.context;
local v2 = require(l_Parent_0.dependencies);
local l_React_0 = v2.React;
local l_UIBlox_0 = v2.UIBlox;
local l_useStyle_0 = l_UIBlox_0.Core.Style.useStyle;
local v6 = require(l_Parent_0.type);
local l_ButtonStack_0 = l_UIBlox_0.App.Button.ButtonStack;
local l_ButtonType_0 = l_UIBlox_0.App.Button.Enum.ButtonType;
local v9 = require(l_Parent_0.constants);
local l_DefaultContentPadding_0 = v9.DefaultContentPadding;
local l_DefaultButtonHeight_0 = v9.DefaultButtonHeight;
local v12 = require(l_context_0.useNotificationCardState);
local v13 = require(l_context_0.useNotificationCardData);
local function _(v14)
    if v14 == v6.SENDERButtonStyleEnum.Growth then
        return l_ButtonType_0.PrimaryContextual;
    elseif v14 == v6.SENDERButtonStyleEnum.Primary then
        return l_ButtonType_0.PrimarySystem;
    elseif v14 == v6.SENDERButtonStyleEnum.Secondary then
        return l_ButtonType_0.Secondary;
    elseif v14 == v6.SENDERButtonStyleEnum.Alert then
        return l_ButtonType_0.Alert;
    else
        return l_ButtonType_0.Secondary;
    end;
end;
local function v25(v16, v17, v18)
    local l_CaptionHeader_0 = l_useStyle_0().Font.CaptionHeader;
    local v20 = {};
    if v16 then
        for _, v22 in ipairs(v16) do
            local v23 = {};
            local l_buttonStyle_0 = v22.buttonStyle;
            v23.buttonType = if l_buttonStyle_0 == v6.SENDERButtonStyleEnum.Growth then l_ButtonType_0.PrimaryContextual else if l_buttonStyle_0 == v6.SENDERButtonStyleEnum.Primary then l_ButtonType_0.PrimarySystem else if l_buttonStyle_0 == v6.SENDERButtonStyleEnum.Secondary then l_ButtonType_0.Secondary else if l_buttonStyle_0 == v6.SENDERButtonStyleEnum.Alert then l_ButtonType_0.Alert else l_ButtonType_0.Secondary;
            v23.props = {
                text = v22.label.text,
                fontStyle = l_CaptionHeader_0,
                onActivated = function()
                    if not (not v17 or not v18) then
                        v17(v22, v18);
                    end;
                end
            };
            table.insert(v20, v23);
        end;
    end;
    return v20;
end;
return function()
    local v26 = v12("button");
    local v27 = v13();
    local v28 = v25(v26, v27.handleActions, v27.notificationPayload);
    if #v28 > 0 then
        return (l_React_0.createElement("Frame", {
            Size = UDim2.new(1, 0, 0, 0),
            AutomaticSize = Enum.AutomaticSize.Y,
            BackgroundTransparency = 1,
            LayoutOrder = 3
        }, {
            UIPadding = l_React_0.createElement("UIPadding", {
                PaddingTop = UDim.new(0, l_DefaultContentPadding_0)
            }),
            ActionButtons = v28 and l_React_0.createElement(l_ButtonStack_0, {
                buttonHeight = l_DefaultButtonHeight_0,
                buttons = v28,
                marginBetween = l_DefaultContentPadding_0
            })
        }));
    else
        return nil;
    end;
end;


local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_context_0 = l_Parent_1.context;
local v3 = require(l_Parent_1.dependencies);
local l_React_0 = v3.React;
local l_UIBlox_0 = v3.UIBlox;
local v6 = require(l_Parent_0.NotificationContentFrame);
local l_useStyle_0 = l_UIBlox_0.Core.Style.useStyle;
local v8 = require(l_Parent_1.constants);
local v9 = require(l_context_0.useNotificationCardData);
local l_DefaultCardPadding_0 = v8.Padding.DefaultCardPadding;
local l_DefaultContentPadding_0 = v8.DefaultContentPadding;
local l_DefaultCardCornerRadius_0 = v8.DefaultCardCornerRadius;
return function(v13)
    local v14 = v9();
    local l_cardSize_0 = v14.cardSize;
    local v16 = if not v14.cardTransparency then v8.CardTransparency.Default else v14.cardTransparency;
    local v17 = if not not l_cardSize_0 and l_cardSize_0.cardPadding then l_cardSize_0.cardPadding else l_DefaultCardPadding_0;
    return l_React_0.createElement("Frame", {
        Size = UDim2.new(1, 0, 0, 0),
        BackgroundColor3 = l_useStyle_0().Theme.BackgroundUIDefault.Color,
        BackgroundTransparency = v16,
        BorderSizePixel = 0,
        AutomaticSize = Enum.AutomaticSize.Y,
        LayoutOrder = v13.layoutOrder
    }, {
        UICorner = l_React_0.createElement("UICorner", {
            CornerRadius = l_DefaultCardCornerRadius_0
        }),
        UIListLayout = l_React_0.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Vertical,
            Padding = UDim.new(0, l_DefaultContentPadding_0),
            SortOrder = Enum.SortOrder.LayoutOrder,
            VerticalAlignment = Enum.VerticalAlignment.Center
        }),
        UIPadding = l_React_0.createElement("UIPadding", {
            PaddingBottom = UDim.new(0, v17),
            PaddingLeft = UDim.new(0, v17),
            PaddingRight = UDim.new(0, v17),
            PaddingTop = UDim.new(0, v17)
        }),
        NotificationContentFrame = l_React_0.createElement(v6)
    });
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("NotificationsCommon");
local l_components_0 = l_script_FirstAncestor_0.components;
local l_context_0 = l_script_FirstAncestor_0.context;
local v3 = require(l_script_FirstAncestor_0.dependencies);
local v4 = require(l_components_0.NotificationStyledText);
local v5 = require(l_components_0.NotificationThumbnail);
local _ = require(l_script_FirstAncestor_0.type);
local l_React_0 = v3.React;
local l_UIBlox_0 = v3.UIBlox;
local l_useStyle_0 = l_UIBlox_0.Core.Style.useStyle;
local v10 = require(l_script_FirstAncestor_0.constants);
local v11 = require(l_context_0.useNotificationCardState);
local v12 = require(l_context_0.useNotificationCardData);
local v13 = require(l_components_0.NotificationActionsFrame);
local l_IconButton_0 = l_UIBlox_0.App.Button.IconButton;
local l_Images_0 = l_UIBlox_0.App.ImageSet.Images;
local l_IconSize_0 = l_UIBlox_0.App.ImageSet.Enum.IconSize;
local v17 = l_Images_0["icons/common/overflow"];
local l_DefaultContentPadding_0 = v10.DefaultContentPadding;
local l_DefaultTextContentPadding_0 = v10.DefaultTextContentPadding;
local l_MetaActionsWidth_0 = v10.MetaActionsWidth;
local l_TimestampWidth_0 = v10.TimestampWidth;
local l_TimestampHeight_0 = v10.TimestampHeight;
return function()
    local v23 = l_useStyle_0();
    local v24 = v23.Font.BaseSize * v23.Font.CaptionHeader.RelativeSize;
    local v25 = v23.Font.BaseSize * v23.Font.CaptionBody.RelativeSize;
    local v26 = v12();
    local l_cardSize_0 = v26.cardSize;
    local l_readOnly_0 = v26.readOnly;
    local v29 = not not l_cardSize_0 and l_cardSize_0.thumbnail or v10.CardSizeDefault.thumbnail;
    local l_openMetaActions_0 = v26.openMetaActions;
    local l_notificationPayload_0 = v26.notificationPayload;
    local l_handleActions_0 = v26.handleActions;
    local v33 = v11("textBody");
    local v34 = v33 and v33[1];
    local v35 = (v34 and v34.title) and {
        Text = v34.title,
        Size = UDim2.new(1, 0, 0, 0),
        AutomaticSize = Enum.AutomaticSize.Y,
        TextSize = v24,
        TextXAlignment = Enum.TextXAlignment.Left,
        LayoutOrder = 1,
        Font = v23.Font.CaptionHeader.Font,
        TextColor3 = v23.Theme.TextEmphasis.Color
    };
    local v36 = (v34 and v34.label) and {
        Text = v34.label,
        Size = UDim2.new(1, 0, 0, 0),
        AutomaticSize = Enum.AutomaticSize.Y,
        TextSize = v25,
        TextXAlignment = Enum.TextXAlignment.Left,
        LayoutOrder = 2,
        Font = v23.Font.CaptionBody.Font,
        TextColor3 = v23.Theme.TextEmphasis.Color
    };
    local v37 = (l_notificationPayload_0 and l_notificationPayload_0.timestamp) and {
        Text = {
            text = l_notificationPayload_0.timestamp
        },
        Size = UDim2.new(0, l_TimestampWidth_0 + l_DefaultTextContentPadding_0, 0, l_TimestampHeight_0),
        TextSize = v24,
        AutomaticSize = Enum.AutomaticSize.Y,
        TextXAlignment = Enum.TextXAlignment.Right,
        AnchorPoint = Vector2.new(1, 0),
        Position = UDim2.new(1, if not l_readOnly_0 then -(l_MetaActionsWidth_0 + l_DefaultTextContentPadding_0) else -l_DefaultTextContentPadding_0, 0, 0),
        LayoutOrder = 2,
        Font = v23.Font.CaptionHeader.Font,
        TextColor3 = v23.Theme.TextEmphasis.Color,
        TextTransparency = 0
    };
    return l_React_0.createElement("TextButton", {
        AutomaticSize = Enum.AutomaticSize.Y,
        LayoutOrder = 1,
        BackgroundTransparency = 1,
        Size = UDim2.new(1, 0, 0, 0),
        Text = "",
        AutoButtonColor = false,
        BorderSizePixel = 0,
        [l_React_0.Event.Activated] = function()
            if not ((not l_handleActions_0 or not v34) or not l_notificationPayload_0) then
                l_handleActions_0(v34, l_notificationPayload_0);
            end;
        end
    }, {
        UIListLayout = l_React_0.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Horizontal,
            SortOrder = Enum.SortOrder.LayoutOrder,
            VerticalAlignment = Enum.VerticalAlignment.Top,
            Padding = UDim.new(0, l_DefaultContentPadding_0)
        }),
        NotificationThumbnailFrame = l_React_0.createElement("Frame", {
            BackgroundTransparency = 1,
            LayoutOrder = 1,
            AutomaticSize = Enum.AutomaticSize.Y,
            Size = UDim2.new(0, v29, 0, v29)
        }, {
            NotificationThumbnail = l_React_0.createElement(v5)
        }),
        ContentFrame = l_React_0.createElement("Frame", {
            BackgroundTransparency = 1,
            LayoutOrder = 2,
            AutomaticSize = Enum.AutomaticSize.Y,
            Size = UDim2.new(1, -(v29 + l_DefaultContentPadding_0), 0, 0)
        }, {
            UIListLayout = l_React_0.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Vertical,
                SortOrder = Enum.SortOrder.LayoutOrder,
                VerticalAlignment = Enum.VerticalAlignment.Top,
                Padding = UDim.new(0, l_DefaultTextContentPadding_0)
            }),
            NotificationsBody = l_React_0.createElement("Frame", {
                Size = UDim2.new(1, 0, 0, v10.MetaActionsHeight),
                AutomaticSize = Enum.AutomaticSize.Y,
                LayoutOrder = 1,
                BackgroundTransparency = 1
            }, {
                NotificationsText = l_React_0.createElement("Frame", {
                    BackgroundTransparency = 1,
                    Size = UDim2.new(1, if not l_readOnly_0 then -((l_MetaActionsWidth_0 + l_TimestampWidth_0) + l_DefaultTextContentPadding_0 * 2) else -(l_TimestampWidth_0 + l_DefaultTextContentPadding_0), 0, 0),
                    AutomaticSize = Enum.AutomaticSize.Y
                }, {
                    UIPadding = l_React_0.createElement("UIPadding", {
                        PaddingTop = UDim.new(0, l_DefaultTextContentPadding_0)
                    }),
                    UIListLayout = l_React_0.createElement("UIListLayout", {
                        FillDirection = Enum.FillDirection.Vertical,
                        SortOrder = Enum.SortOrder.LayoutOrder,
                        VerticalAlignment = Enum.VerticalAlignment.Top,
                        Padding = UDim.new(0, l_DefaultTextContentPadding_0)
                    }),
                    Title = if not v35 then nil else l_React_0.createElement(v4, v35),
                    Subtitle = if not v36 then nil else l_React_0.createElement(v4, v36)
                }),
                Timestamp = if not v37 then nil else l_React_0.createElement(v4, v37),
                MetaActionsButton = if not l_openMetaActions_0 or l_readOnly_0 then nil else l_React_0.createElement(l_IconButton_0, {
                    anchorPoint = Vector2.new(1, 0),
                    position = UDim2.new(1, 0, 0, 0),
                    size = UDim2.fromOffset(0, 0),
                    iconSize = l_IconSize_0.Medium,
                    icon = v17,
                    layoutOrder = 3,
                    onActivated = function()
                        l_openMetaActions_0(l_notificationPayload_0);
                    end
                })
            }),
            NotificationActionsFrame = if l_readOnly_0 then nil else l_React_0.createElement(v13)
        })
    });
end;


local l_Parent_0 = script:FindFirstAncestor("NotificationsCommon").Parent;
local l_Parent_1 = script.Parent.Parent;
local v2 = require(l_Parent_1.dependencies);
local l_useStyle_0 = v2.UIBlox.Core.Style.useStyle;
local _ = require(l_Parent_1.type);
local l_Text_0 = require(l_Parent_0.AppCommonLib).Text;
local l_React_0 = v2.React;
local v9 = {
    highlight = function(v7)
        return "" .. v7 .. "";
    end,
    warning = function(v8)
        return "" .. v8 .. "";
    end
};
utf8Sub = function(v10, v11, v12)
    local v13 = utf8.offset(v10, v11);
    local v14 = utf8.offset(v10, v12 + 1);
    if not (v13 ~= nil) or v14 == nil then
        return (string.sub(v10, v11, v12));
    else
        return (string.sub(v10, v13, v14 - 1));
    end;
end;
local function v33(v15)
    local v16 = v15.text .. " ";
    local l_styledElements_0 = v15.styledElements;
    local v18 = {
        {
            Position = 0,
            ReferenceCount = 0,
            Format = "highlight"
        },
        {
            Position = utf8.len(v15.text),
            ReferenceCount = 0,
            Format = "highlight"
        }
    };
    if l_styledElements_0 then
        for _, v20 in pairs(l_styledElements_0) do
            table.insert(v18, {
                Position = v20.offset,
                ReferenceCount = 1,
                Format = v20.styledElementType
            });
            table.insert(v18, {
                Position = v20.offset + v20.length,
                ReferenceCount = -1,
                Format = v20.styledElementType
            });
        end;
    end;
    table.sort(v18, function(v21, v22)
        return v21.Position < v22.Position;
    end);
    local v23 = {};
    for v24 in pairs(v9) do
        v23[v24] = 0;
    end;
    local v25 = "";
    for v26 = 1, #v18 - 1 do
        local v27 = v18[v26];
        local v28 = v18[v26 + 1];
        if v27.Format then
            local l_Format_0 = v27.Format;
            v23[l_Format_0] = v23[l_Format_0] + v27.ReferenceCount;
        end;
        if v27.Position ~= v28.Position then
            local v30 = utf8Sub(v16, v27.Position + 1, v28.Position);
            for v31, v32 in pairs(v9) do
                if v23[v31] > 0 then
                    v30 = v32(v30);
                end;
            end;
            v25 = v25 .. v30;
        end;
    end;
    return l_Text_0.Trim(v25);
end;
return function(v34)
    local v35 = l_useStyle_0();
    return l_React_0.createElement("TextLabel", {
        RichText = true,
        Text = not v34.Text and "" or v33(v34.Text),
        BackgroundTransparency = 1,
        TextColor3 = v34.TextColor3 or v35.Theme.TextDefault.Color,
        TextTransparency = v34.TextTransparency or v35.Theme.TextDefault.Transparency,
        Font = v34.Font or v35.Font.Body.Font,
        AutomaticSize = v34.AutomaticSize,
        Size = v34.Size,
        TextSize = v34.TextSize,
        Position = v34.Position,
        AnchorPoint = v34.AnchorPoint,
        TextXAlignment = v34.TextXAlignment,
        TextWrapped = true,
        LayoutOrder = v34.LayoutOrder
    });
end;


local l_Parent_0 = script.Parent.Parent;
local l_context_0 = l_Parent_0.context;
local v2 = require(l_Parent_0.dependencies);
local l_React_0 = v2.React;
local l_UIBlox_0 = v2.UIBlox;
local l_useStyle_0 = l_UIBlox_0.Core.Style.useStyle;
local l_LoadableImage_0 = l_UIBlox_0.App.Loading.LoadableImage;
local v7 = require(l_Parent_0.type);
local l_getRbxthumbWithTypeSizeAndOptions_0 = v2.getRbxthumbWithTypeSizeAndOptions;
local l_UserLibConstants_0 = v2.UserLibConstants;
local l_Images_0 = l_UIBlox_0.App.ImageSet.Images;
local l_ImageSetLabel_0 = l_UIBlox_0.Core.ImageSet.ImageSetLabel;
local v12 = l_Images_0["icons/graphic/logomark-gradient_xlarge"];
local v13 = require(l_context_0.useNotificationCardState);
local function v15(v14)
    if v14 == v7.SENDERThumbnailTypeEnum.Game then
        return l_UserLibConstants_0.RbxthumbTypes.GameIcon;
    elseif v14 == v7.SENDERThumbnailTypeEnum.User then
        return l_UserLibConstants_0.RbxthumbTypes.AvatarHeadShot;
    elseif v14 == v7.SENDERThumbnailTypeEnum.Group then
        return l_UserLibConstants_0.RbxthumbTypes.GroupIcon;
    elseif v14 == v7.SENDERThumbnailTypeEnum.Asset then
        return l_UserLibConstants_0.RbxthumbTypes.Asset;
    elseif v14 == v7.SENDERThumbnailTypeEnum.Bundle then
        return l_UserLibConstants_0.RbxthumbTypes.BundleThumbnail;
    else
        return l_UserLibConstants_0.RbxthumbTypes.GameIcon;
    end;
end;
local function _(v16)
    return v16.idType == v7.SENDERThumbnailTypeEnum.User;
end;
return function()
    local v18 = v13("thumbnail");
    if not (v18 ~= nil) or #v18 == 0 then
        return nil;
    else
        local v19 = v18[1];
        if v19 == nil then
            return nil;
        else
            local v20 = l_useStyle_0();
            if v19.idType == v7.SENDERThumbnailTypeEnum.Icon then
                return l_React_0.createElement("Frame", {
                    BackgroundTransparency = 0,
                    Size = UDim2.fromScale(1, 1),
                    SizeConstraint = Enum.SizeConstraint.RelativeXX,
                    BackgroundColor3 = v20.Tokens.Global.Color.Black.Color3,
                    BorderSizePixel = 0
                }, {
                    UICorner = l_React_0.createElement("UICorner", {
                        CornerRadius = UDim.new(0, 8)
                    }),
                    Icon = l_React_0.createElement(l_ImageSetLabel_0, {
                        Size = UDim2.fromScale(0.8, 0.8),
                        AnchorPoint = Vector2.new(0.5, 0.5),
                        Position = UDim2.fromScale(0.5, 0.5),
                        LayoutOrder = 1,
                        Image = v12,
                        BackgroundTransparency = 1
                    })
                });
            else
                return l_React_0.createElement("Frame", {
                    BackgroundTransparency = 1,
                    Size = UDim2.fromScale(1, 1),
                    SizeConstraint = Enum.SizeConstraint.RelativeXX,
                    BorderSizePixel = 0
                }, {
                    Thumbnail = l_React_0.createElement(l_LoadableImage_0, {
                        BackgroundTransparency = 0,
                        BackgroundColor3 = v20.Theme.BackgroundDefault.Color,
                        Image = l_getRbxthumbWithTypeSizeAndOptions_0(v19.id, v15(v19.idType), 150),
                        Size = UDim2.fromScale(1, 1),
                        cornerRadius = if not (v19.idType == v7.SENDERThumbnailTypeEnum.User) then UDim.new(0, 8) else UDim.new(0.5, 0),
                        showFailedStateWhenLoadingFailed = true,
                        useShimmerAnimationWhileLoading = true,
                        ZIndex = 1
                    })
                });
            end;
        end;
    end;
end;


local l_UserInputService_0 = game:GetService("UserInputService");
local v1 = require(script.Parent.Parent.Parent.React);
return function(v2)
    local v3 = v1.createRef();
    local v4, v5 = v1.useState(false);
    v1.useEffect(function()
        if not v2.swipeEnabled or not v2.swipeCallback then
            v5(false);
            return nil;
        else
            local v9 = l_UserInputService_0.TouchStarted:Connect(function(v6)
                local v7 = v3 and v3.current;
                if v7 then
                    local v8 = Vector2.new(v6.Position.X, v6.Position.Y) - v7.AbsolutePosition;
                    if ((v8.X >= 0 and v8.Y >= 0) and v8.X <= v7.AbsoluteSize.X) and v8.Y <= v7.AbsoluteSize.Y then
                        v5(true);
                    end;
                    return ;
                else
                    return ;
                end;
            end);
            local v10 = l_UserInputService_0.TouchEnded:Connect(function()
                v5(false);
            end);
            local v12 = if not v4 then nil else l_UserInputService_0.TouchSwipe:Connect(function(v11)
                if v4 then
                    v2.swipeCallback(v11);
                end;
            end);
            return function()
                v9:Disconnect();
                v10:Disconnect();
                if v12 then
                    v12:Disconnect();
                end;
            end;
        end;
    end, {
        v2.swipeEnabled,
        v2.swipeCallback,
        v3,
        v4
    });
    return v1.createElement("Frame", {
        Size = v2.Size,
        AutomaticSize = v2.AutomaticSize,
        BackgroundTransparency = 1,
        Active = true,
        ref = v3
    }, v2.children);
end;


return {
    Padding = {
        CompactCardPadding = 8,
        DefaultCardPadding = 12
    },
    CardTopMargin = {
        App = 68,
        Experience = 12
    },
    DefaultCardCornerRadius = UDim.new(0, 12),
    DefaultCardCloseButtonCornerRadius = UDim.new(0, 4),
    DefaultContentPadding = 8,
    DefaultTextContentPadding = 4,
    DefaultButtonHeight = 32,
    DisplayNotificationDelay = 1,
    DefaultNotificationDisplayTime = 4,
    DefaultNotificationDisplayTimeOnUnpause = 2,
    InAppToastWidth = 400,
    InExperienceToastWidth = 300,
    FullWidthDeviceThreshold = 500,
    CompactCardThreashold = 900,
    CardTransparency = {
        Default = 0,
        Compact = 0.1
    },
    CardSizeDefault = {
        thumbnail = 48,
        closeButton = 22,
        closeIcon = 16
    },
    CardSizeCompact = {
        thumbnail = 32,
        closeButton = 22,
        closeIcon = 16
    },
    DeliveryChannel = "Toast",
    Destinations = {
        App = "InApp",
        Experience = "InExperience"
    },
    ToastStructuralIdentifier = {
        Level1 = "level1",
        ToastNotification = "toastNotification"
    },
    MetaActionsWidth = 36,
    MetaActionsHeight = 36,
    TimestampWidth = 36,
    TimestampHeight = 36,
    NotificationsClientEventNameDefault = "NotificationsClientEvent"
};


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Parent.React);
local _ = require(l_Parent_0.type);
return (v1.createContext({
    notificationPayload = nil,
    state = nil,
    cardSize = nil,
    handleActions = nil,
    openMetaActions = nil,
    readOnly = nil,
    cardTransparency = nil
}));


local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v2 = require(l_Parent_0.NotificationCardContext);
local v3 = require(l_Parent_1.Parent.React);
local _ = require(l_Parent_1.type);
local v5 = require(l_Parent_1.constants);
return function(v6)
    local v7 = {
        thumbnail = v5.CardSizeDefault.thumbnail,
        cardPadding = v5.Padding.DefaultCardPadding
    };
    if v6.isCompact then
        v7.thumbnail = v5.CardSizeCompact.thumbnail;
        v7.cardPadding = v5.Padding.CompactCardPadding;
    end;
    return v3.createElement(v2.Provider, {
        value = {
            notificationPayload = v6.notificationPayload,
            state = v6.state,
            cardSize = v7,
            handleActions = v6.handleActions,
            openMetaActions = v6.openMetaActions,
            readOnly = v6.readOnly,
            cardTransparency = if not v6.isCompact then v5.CardTransparency.Default else v5.CardTransparency.Compact
        }
    }, v6.children);
end;


local l_Parent_0 = script.Parent;
local v1 = require(l_Parent_0.Parent.Parent.React);
local v2 = require(l_Parent_0.NotificationCardContext);
return function()
    return (v1.useContext(v2));
end;


local l_Parent_0 = script.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local v2 = require(l_Parent_1.Parent.React);
local v3 = require(l_Parent_0.NotificationCardContext);
local _ = require(l_Parent_1.type);
return function(v5)
    local v6 = v2.useContext(v3);
    if not v5 then
        return v6.state;
    else
        return (not not v6.state and v6.state.visualItems) and v6.state.visualItems[v5] or {};
    end;
end;


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.UserLib);
return {
    ToastNotificationsProtocol = require(l_Parent_0.ToastNotificationsProtocol).ToastNotificationProtocol,
    React = require(l_Parent_0.React),
    UIBlox = require(l_Parent_0.UIBlox),
    UserLib = v1,
    getRbxthumbWithTypeSizeAndOptions = v1.Utils.getRbxthumbWithTypeSizeAndOptions,
    UserLibConstants = v1.Utils.Constants
};


local _ = require(script.type);
return {
    dependencies = require(script.dependencies),
    ["jest.config"] = script["jest.config"],
    ReducerDependencies = require(script.utils.ReducerDependencies),
    LocalizationHelper = require(script.utils.StringLocalizationHelper),
    DeeplinkConfirmationModal = require(script.components.DeeplinkConfirmationModal),
    JoinExperience = require(script.JoinExperience),
    Debounce = require(script.utils.debounce),
    Throttle = require(script.utils.throttle),
    DeviceInfo = require(script.utils.deviceInfo),
    NotificationCardProvider = require(script.context.NotificationCardProvider),
    NotificationCard = require(script.components.NotificationCard),
    NotificationHelper = require(script.utils.NotificationHelper),
    type = require(script.type),
    constants = require(script.constants),
    ixpHelper = require(script.utils.ixpHelper),
    sendEventDeferred = require(script.analytics.sendEventDeferred)
};


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


local _ = require(script.Parent.Parent.ToastNotificationsProtocol);
return {
    ChannelListEnum = {
        App = "toast-in-app-notifications",
        Experience = "toast-in-experience-notifications",
        Dual = "toast-in-app-and-experience-notifications",
        Desktop = "toast-in-app-and-experience-desktop-notifications"
    },
    ActionTypeEnum = {
        Report = "reportNotification",
        Deeplink = "deeplink",
        NotificationApi = "notificationAPI",
        Dismiss = "dismiss",
        Reload = "reload",
        None = "none",
        VoltronBroadcast = "voltronBroadcast"
    },
    SENDERButtonStyleEnum = {
        Primary = "Primary",
        Secondary = "Secondary",
        Alert = "Alert",
        Growth = "Growth"
    },
    SENDERThumbnailTypeEnum = {
        User = "userThumbnail",
        Game = "gameThumbnail",
        Group = "groupThumbnail",
        Asset = "assetThumbnail",
        Bundle = "bundleThumbnail",
        Icon = "icon"
    },
    ToastNotificationActionsEnum = {
        ModalCancel = "modalCancel",
        ModalConfirm = "modalConfirm",
        Dismissed = "dismissed",
        Display = "displayed",
        Hover = "hoverOver",
        Ignored = "ignored",
        Update = "update",
        DeeplinkFailed = "deeplinkFailed"
    },
    RenderLocationEnum = {
        UniversalApp = "universalApp",
        CoreScript = "coreScript"
    },
    DeviceOrientationEnum = {
        Portrait = "Portrait",
        Landscape = "Landscape",
        Unknown = "Unknown"
    },
    VisualItemTypeEnum = {
        Button = "button",
        TextBody = "textBody",
        Thumbnail = "thumbnail",
        MetaAction = "metaAction"
    },
    NotificationTypeEnum = {
        CallReceived = "CallReceived"
    }
};


local l_UserInputService_0 = game:GetService("UserInputService");
local l_GuiService_0 = game:GetService("GuiService");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("NotificationsCommon");
local v3 = require(l_script_FirstAncestor_0.Parent.Cryo);
local v4 = require(l_script_FirstAncestor_0.type);
local v5 = require(l_script_FirstAncestor_0.constants);
local v6 = game:DefineFastFlag("FFlagLuaAppFixToastNotificationClosePosition", false);
return {
    calculateToastPosition = function(v7, v8, v9)
        local v10 = 60;
        if not (not v6 or not l_GuiService_0) then
            v10 = l_GuiService_0:GetGuiInset().Y + 20;
        end;
        if not v7 then
            if not v8 then
                return {
                    positionX = 0.5,
                    positionXOffset = 0,
                    positionY = 0,
                    positionYOffset = not v6 and -50 or -1 * v10,
                    anchorX = 0.5,
                    anchorY = 1
                };
            else
                return {
                    positionX = 1,
                    positionXOffset = 20,
                    positionY = 0,
                    positionYOffset = v9,
                    anchorX = 0,
                    anchorY = 0
                };
            end;
        elseif not v8 then
            return {
                positionX = 0.5,
                positionXOffset = 0,
                positionY = 0,
                positionYOffset = v9,
                anchorX = 0.5,
                anchorY = 0
            };
        else
            return {
                positionX = 1,
                positionXOffset = -20,
                positionY = 0,
                positionYOffset = v9,
                anchorX = 1,
                anchorY = 0
            };
        end;
    end,
    getDeviceOrientation = function(v11)
        if v11.Y < v11.X then
            return v4.DeviceOrientationEnum.Landscape;
        else
            return v4.DeviceOrientationEnum.Portrait;
        end;
    end,
    getNotificationSize = function(v12, v13)
        if v13 < v5.FullWidthDeviceThreshold then
            return UDim2.new(0, v13 - 24, 0, 0);
        elseif not v12 then
            return UDim2.new(0, v5.InAppToastWidth, 0, 0);
        elseif v13 < v5.CompactCardThreashold then
            return UDim2.new(0, v5.InExperienceToastWidth, 0, 0);
        else
            return UDim2.new(0, v5.InAppToastWidth, 0, 0);
        end;
    end,
    marshalStreamNotificationData = function(v14, _)
        local v16 = {
            currentState = v14.content.currentState,
            notificationType = v14.content.notificationType,
            id = v14.id
        };
        if v14.content.states then
            local v17 = v14.content.states[v14.content.currentState];
            v16.state = {
                layoutKey = v17.layoutKey,
                name = v17.name,
                visualItems = v17.visualItems
            };
        end;
        return v16;
    end,
    isToastToRight = function(v18)
        if v18 == v4.DeviceOrientationEnum.Landscape then
            return true;
        else
            return false;
        end;
    end,
    isDesktopDevice = function()
        local l_None_0 = Enum.Platform.None;
        pcall(function()
            l_None_0 = l_UserInputService_0:GetPlatform();
        end);
        local v20 = true;
        if l_None_0 ~= Enum.Platform.Windows then
            v20 = true;
            if l_None_0 ~= Enum.Platform.OSX then
                v20 = l_None_0 == Enum.Platform.UWP;
            end;
        end;
        return v20;
    end,
    fireEvent = function(v21, v22, v23, v24)
        local v25 = {
            streamContext = "InApp"
        };
        if not (v23 ~= nil) or v23 == "" then
            v23 = v5.NotificationsClientEventNameDefault;
        end;
        v21.sendEventDeferred(v22, v23, v3.Dictionary.join(v24, v25));
    end
};


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.LuaSocialLibrariesDeps);
local v2 = require(l_Parent_0.Lumberyak);
local l_RoduxShareLinks_0 = v1.RoduxShareLinks;
local l_NetworkingShareLinks_0 = v1.NetworkingShareLinks;
local l_RoduxNetworking_0 = v1.RoduxNetworking;
local l_httpRequest_0 = v1.httpRequest;
local v7 = v2.Logger.new(nil, "ShareGame");
local v8 = game:DefineFastInt("ShareGameHttpRetryCount", 3);
local v9 = v7:new("ShareGame Networking");
local v15 = l_RoduxNetworking_0.config({
    keyPath = "NetworkStatus",
    networkImpl = l_httpRequest_0.config({
        requestFunction = function(v10, v11, v12)
            v9:info("Fetching: {}", string.format("[ requestMethod = %q, url = %q ]", v11, v10));
            return l_httpRequest_0.requestFunctions.HttpRbxApi(v10, v11, v12);
        end,
        postRequestFunction = function(v13, v14)
            v9:debug("Returned: {}", string.format("[ requestMethod = %q, url = %q, statusCode = %s, body = %s ]", v14.requestMethod, v14.url, v13.StatusCode, v13.Body));
        end,
        maxRetryCount = v8
    })
});
return {
    RoduxShareLinks = l_RoduxShareLinks_0.config({
        keyPath = "ShareGame.ShareLinks"
    }),
    NetworkingShareLinks = l_NetworkingShareLinks_0.config({
        roduxNetworking = v15
    }),
    RoduxNetworking = v15
};


local l_RobloxGui_0 = game:GetService("CoreGui"):WaitForChild("RobloxGui");
local l_Parent_0 = script.Parent.Parent.Parent;
local v2 = require(l_Parent_0.React);
local l_LocalizationRoactContext_0 = require(l_Parent_0.Localization).LocalizationRoactContext;
local l_useLocalization_0 = require(l_Parent_0.Localization).Hooks.useLocalization;
local _ = require(script:FindFirstAncestor("NotificationsCommon").type);
local v6 = nil;
local l_RobloxTranslator_0 = l_RobloxGui_0.Modules:FindFirstChild("RobloxTranslator");
if l_RobloxTranslator_0 then
    local l_status_0, l_result_0 = pcall(function()
        return require(l_RobloxTranslator_0);
    end);
    if l_status_0 then
        v6 = l_result_0;
    end;
end;
return {
    getLocalizedStrings = function(v10)
        if v2.useContext(l_LocalizationRoactContext_0) ~= nil then
            return l_useLocalization_0(v10);
        elseif not v6 then
            return v10;
        else
            local v11 = {};
            for v12, v13 in pairs(v10) do
                local l_status_1, l_result_1 = pcall(function()
                    return v6:FormatByKey(v13);
                end);
                if not l_status_1 then
                    v11[v12] = v13;
                else
                    v11[v12] = l_result_1;
                end;
            end;
            return v11;
        end;
    end
};


local l_UserInputService_0 = game:GetService("UserInputService");
local l_GuiService_0 = game:GetService("GuiService");
return {
    isDesktopDevice = function()
        local l_None_0 = Enum.Platform.None;
        pcall(function()
            l_None_0 = l_UserInputService_0:GetPlatform();
        end);
        local v3 = true;
        if l_None_0 ~= Enum.Platform.Windows then
            v3 = true;
            if l_None_0 ~= Enum.Platform.OSX then
                v3 = l_None_0 == Enum.Platform.UWP;
            end;
        end;
        return v3;
    end,
    isConsole = function()
        return l_GuiService_0:IsTenFootInterface();
    end
};


local l_IXPService_0 = game:GetService("IXPService");
return {
    getIxpLayerData = function(v1)
        local l_status_0, l_result_0 = pcall(function()
            return l_IXPService_0:GetUserLayerVariables(v1);
        end);
        return not not l_status_0 and l_result_0 or nil;
    end,
    logUserLayerExposure = function(v4)
        pcall(function()
            l_IXPService_0:LogUserLayerExposure(v4);
        end);
    end
};


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.React);
local v2 = require(l_Parent_0.Rodux);
local v3 = require(l_Parent_0.RoactRodux);
local l_RoactServices_0 = require(l_Parent_0.RoactServices).RoactServices;
local l_AppStyleProvider_0 = require(l_Parent_0.Style).AppStyleProvider;
local l_Constants_0 = require(l_Parent_0.Style).Constants;
local v7 = {
    themeName = l_Constants_0.ThemeName.Dark,
    fontName = l_Constants_0.FontName.Gotham
};
local v8 = {
    ScreenSize = Vector2.new(500, 500),
    SetAlias = {
        Aliases = {
            byUserId = {
                ["1"] = "foo"
            }
        }
    }
};
local function v12(v9, v10)
    return v2.Store.new(v10 or function(v11)
        return v11;
    end, v9 or {}, {
        v2.thunkMiddleware
    });
end;
return {
    mockServices = function(v13)
        return (v1.createElement(l_RoactServices_0.ServiceProvider, {}, {
            storeProvider = v1.createElement(v3.StoreProvider, {
                store = v12(v8)
            }, {
                styleProvider = v1.createElement(l_AppStyleProvider_0, {
                    style = v7
                }, v13)
            })
        }));
    end
};


return function(v0, v1)
    local v2 = false;
    local v3 = v1 or 1;
    return function(...)
        if not v2 then
            v2 = true;
            v0(...);
            task.delay(v3, function()
                v2 = false;
            end);
            return ;
        else
            return ;
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent;
return {
    projects = {
        require(l_Parent_0.GameInvite)["jest.config"],
        require(l_Parent_0.NotificationsCommon)["jest.config"],
        require(l_Parent_0.ToastNotification)["jest.config"],
        require(l_Parent_0.StreamNotifications)["jest.config"],
        require(l_Parent_0.NotificationModalsManager)["jest.config"],
        require(l_Parent_0.NotificationsUpsell)["jest.config"]
    }
};


return {
    Opened = "opened",
    Closed = "closed",
    Clicked = "clicked",
    BackendRequested = "BackendRequested",
    BackendSuccess = "BackendSuccess",
    BackendFailed = "BackendFailed",
    Cancel = "cancel",
    Confirm = "confirm",
    ModalContext = "uenUpsellModal",
    OptInEventName = "experienceNotificationClientPromptOptInEvent",
    ActionType = "actionType",
    Button = "btn",
    UniverseId = "universeId"
};


local l_Url_0 = require(script.Parent.Parent.Parent.Http).Url;
local l_HttpService_0 = game:GetService("HttpService");
return function(v2, v3, v4)
    assert(type(v3) == "string", "FollowingsPostFollow request expects userId to be a string");
    assert(type(v4) == "string", "FollowingsPostFollow request expects universeId to be a string");
    return v2(string.format("%s/v1/users/%s/universes/%s", l_Url_0.FOLLOWINGS_URL, v3, v4), "POST", {
        postBody = l_HttpService_0:JSONEncode({})
    });
end;


return {
    ["jest.config"] = script["jest.config"],
    setupNotificationsUpsell = require(script.setupNotificationsUpsell)
};


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.NotificationModalsManager);
local v2 = require(script.Parent.Components.NotificationsUpsellModal);
local l_GetGameNameAndDescription_0 = require(l_Parent_0.GameDetailRodux).GetGameNameAndDescription;
local l_sendEventDeferred_0 = require(l_Parent_0.NotificationsCommon).sendEventDeferred;
local v5 = require(script.Parent.Analytics.ModalEventConstants);
local v6 = require(l_Parent_0.HttpRequest);
local v7 = v6.config({
    requestFunction = v6.requestFunctions.HttpRbxApi
});
local function v16(v8)
    local function v9()
        game:GetService("ExperienceNotificationService"):InvokeOptInPromptClosed();
        l_sendEventDeferred_0(v5.ModalContext, v5.OptInEventName, {
            [v5.ActionType] = v5.Closed,
            [v5.UniverseId] = v8
        });
    end;
    local function v10()
        v1.CloseModal("UENUpsell");
    end;
    local v11 = false;
    local v12 = nil;
    if v8 ~= "0" and v8 ~= "" then
        local v14, v15 = l_GetGameNameAndDescription_0(v7, v8):andThen(function(v13)
            return v13 and v13.Name;
        end, function()
            return nil;
        end):await();
        v11 = v14;
        v12 = v15;
    end;
    l_sendEventDeferred_0(v5.ModalContext, v5.OptInEventName, {
        [v5.ActionType] = v5.Opened,
        [v5.UniverseId] = v8
    });
    v1.OpenModal("UENUpsell", v2, {
        CloseCallback = v9,
        Props = {
            CloseModal = v10,
            ExperienceId = v8,
            ExperienceName = if not v11 then nil else v12
        }
    });
end;
return function()
    game:GetService("ExperienceNotificationService").PromptOptInRequested:Connect(function()
        v16((tostring(game.GameId)));
    end);
end;


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


local l_Parent_0 = script:FindFirstAncestor("OtaPatchLoader").Parent;
local l_default_0 = require(l_Parent_0.LoggingProtocol).default;
local l_Logger_0 = require(l_Parent_0.Loggers).Logger;
local v3 = game:DefineFastInt("OtaLoaderInfoEventHundredthsPercent", 0);
local v4 = game:DefineFastInt("OtaLoaderErrorEventHundredthsPercent", 0);
local v5 = {
    INFO = "INFO",
    ERROR = "ERROR"
};
local function _(v6, v7)
    return {
        Type = v6,
        Description = v7
    };
end;
local v9 = {
    PatchLoadEntryPoint = {
        Type = v5.INFO,
        Description = "Patch load entry point"
    },
    NoUserId = {
        Type = v5.INFO,
        Description = "No User Id; can't load patch"
    },
    NoPatchFound = {
        Type = v5.INFO,
        Description = "No patch found"
    },
    PatchInvalidDeps = {
        Type = v5.INFO,
        Description = "Patch does not match package dependencies"
    },
    PatchLoadedOk = {
        Type = v5.INFO,
        Description = "Patch loaded successfully"
    },
    PatchPackageFound = {
        Type = v5.INFO,
        Description = "Package found in patch; attemping to require"
    },
    PatchPackageRequiredOk = {
        Type = v5.INFO,
        Description = "Package successfully required from patch; using patch's package"
    },
    NoValidatorScript = {
        Type = v5.INFO,
        Description = "No validation script specified"
    },
    ValidatorScriptFailed = {
        Type = v5.INFO,
        Description = "Patch failed validator script"
    },
    PackageValidationFailed = {
        Type = v5.INFO,
        Description = "Package validation failed"
    },
    StarterFileIncompatible = {
        Type = v5.INFO,
        Description = "Patch starter file type incompatible"
    },
    PatchLoadFailed = {
        Type = v5.INFO,
        Description = "Patch failed to load"
    },
    MissingPatchRoot = {
        Type = v5.ERROR,
        Description = "Could not find root of patch"
    },
    PatchLoadError = {
        Type = v5.ERROR,
        Description = "Error when loading a patch"
    },
    RequirePackageError = {
        Type = v5.ERROR,
        Description = "Script error on requiring the patch package"
    },
    RequirePackageEmpty = {
        Type = v5.ERROR,
        Description = "Patch package was empty"
    },
    PatchPackageMissing = {
        Type = v5.ERROR,
        Description = "Package missing in patch"
    },
    ValidatorScriptError = {
        Type = v5.ERROR,
        Description = "Script error on patch validation script"
    },
    PackageValidationError = {
        Type = v5.ERROR,
        Description = "Package validation script error"
    }
};
local function v12(v10, v11)
    return {
        eventName = ("OtaPatch_Info_%*"):format(v10),
        backends = {
            l_default_0.TelemetryBackends.Points
        },
        throttlingPercentage = v3,
        lastUpdated = {
            24,
            2,
            7
        },
        description = v11,
        links = ""
    };
end;
local function v15(v13, v14)
    return {
        eventName = ("OtaPatch_Error_%*"):format(v13),
        backends = {
            l_default_0.TelemetryBackends.Points
        },
        throttlingPercentage = v4,
        lastUpdated = {
            24,
            2,
            7
        },
        description = v14,
        links = ""
    };
end;
local v16 = {};
local v17 = {};
for v18, _ in pairs(v9) do
    v17[v18] = v18;
end;
v16.Events = v17;
setmetatable(v16.Events, {
    __newindex = function(_, v21, v22)
        error((("Trying to modify static table with key %*, index %*"):format(v21, v22)));
    end,
    __index = function(_, v24)
        error((("OtaPatchLoaderTelemetry - Could not find telemetry event for %*"):format(v24)));
    end
});
v16.sendTelemetryEvent = function(v25, v26, v27)
    if v25 then
        local v28 = nil;
        local v29 = v9[v26];
        if v29 then
            if v29.Type == v5.ERROR then
                v28 = v15(v26, v29.Description);
            elseif v29.Type == v5.INFO then
                v28 = v12(v26, v29.Description);
            else
                error((("OtaPatchLoaderTelemetry - Unknown event type %* for event %*"):format(v29.Type, v26)));
                return ;
            end;
            if not v27.extraMessage then
                l_Logger_0:info((("[OtaPatchLoaderTelemetry] Event %*"):format(v26)));
            else
                l_Logger_0:info((("[OtaPatchLoaderTelemetry] Event %* - %*"):format(v26, v27.extraMessage)));
            end;
            v25:logRobloxTelemetryEvent(v28, {
                v25.StandardizedFields.addOsInfo
            }, v27);
            return ;
        else
            error((("OtaPatchLoaderTelemetry - Could not find telemetry event for %*"):format(v26)));
            return ;
        end;
    else
        return ;
    end;
end;
return v16;


return {
    requireOtaPackage = require(script.requireOtaPackage),
    ["jest.config"] = script["jest.config"]
};


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


local v0 = require(script.Parent.validatePackageDependencies_deprecated);
local v1 = require(script.Parent.OtaPatchLoaderTelemetry);
local l_Events_0 = v1.Events;
local l_FFlagLuaAppRedoOtaValidation_0 = require(script.Parent.Flags).FFlagLuaAppRedoOtaValidation;
local v4 = {};
local _ = function(v5, v6)
    local l_v5_0 = v5;
    for _, v9 in v6, nil, nil do
        l_v5_0 = l_v5_0:FindFirstChild(v9, false);
        if not l_v5_0 then
            return nil;
        end;
    end;
    return l_v5_0;
end;
local function _(v11, v12, v13, v14)
    v1.sendTelemetryEvent(v11, v12, {
        patchName = v13,
        extraMessage = v14
    });
end;
return function(v16, v17, v18, v19, v20, v21, v22, v23)
    if v17 then
        local l_loggingProtocol_0 = v22.loggingProtocol;
        local l_dataModelPatchService_0 = v22.dataModelPatchService;
        if not l_dataModelPatchService_0 then
            error("DataModelPatchService not provided to loadOtaPackages");
        end;
        if not v16 or v16 == 0 then
            v1.sendTelemetryEvent(l_loggingProtocol_0, l_Events_0.NoUserId, {
                patchName = v17,
                extraMessage = nil
            });
            return nil;
        else
            local v26 = ("%*:%*"):format(v16, v17);
            local v27 = v4[v26];
            if v27 ~= nil then
                if v27 == "NONE" then
                    return nil;
                else
                    return v4[v26];
                end;
            else
                v1.sendTelemetryEvent(l_loggingProtocol_0, l_Events_0.PatchLoadEntryPoint, {
                    patchName = v17,
                    extraMessage = nil
                });
                local l_status_0, l_result_0 = pcall(function()
                    assert(v18, "patchBehavior is nil");
                    assert(v19, "patchConfig is nil");
                    assert(v20, "patchPackagesRoot is nil");
                    l_dataModelPatchService_0:RegisterPatch(v17, v18, v19, v16);
                    local l_l_dataModelPatchService_0_Patch_0 = l_dataModelPatchService_0:GetPatch(v17);
                    task.defer(function()
                        l_dataModelPatchService_0:UpdatePatch(v16, v17, function()
                        end);
                    end);
                    if l_l_dataModelPatchService_0_Patch_0 then
                        local l_v20_0 = v20;
                        local l_l_l_dataModelPatchService_0_Patch_0_0 = l_l_dataModelPatchService_0_Patch_0;
                        local v31;
                        for _, v33 in l_v20_0, nil, nil do
                            l_l_l_dataModelPatchService_0_Patch_0_0 = l_l_l_dataModelPatchService_0_Patch_0_0:FindFirstChild(v33, false);
                            if not l_l_l_dataModelPatchService_0_Patch_0_0 then
                                v31 = nil;
                                goto label0 --[[  true, false  ]];
                            end;
                        end;
                        v31 = l_l_l_dataModelPatchService_0_Patch_0_0;
                        ::label0::;
                        if v31 then
                            assert(v31, "otaPackagesRoot is nil");
                            if not l_FFlagLuaAppRedoOtaValidation_0 then
                                l_v20_0, l_l_l_dataModelPatchService_0_Patch_0_0 = v0(v31, v23);
                                if not l_v20_0 then
                                    v1.sendTelemetryEvent(l_loggingProtocol_0, l_Events_0.PatchInvalidDeps, {
                                        patchName = v17,
                                        extraMessage = l_l_l_dataModelPatchService_0_Patch_0_0
                                    });
                                    return nil;
                                end;
                            end;
                            if v21 then
                                l_l_l_dataModelPatchService_0_Patch_0_0 = v21;
                                local l_l_l_dataModelPatchService_0_Patch_0_1 = l_l_dataModelPatchService_0_Patch_0;
                                for _, v36 in l_l_l_dataModelPatchService_0_Patch_0_0, nil, nil do
                                    l_l_l_dataModelPatchService_0_Patch_0_1 = l_l_l_dataModelPatchService_0_Patch_0_1:FindFirstChild(v36, false);
                                    if not l_l_l_dataModelPatchService_0_Patch_0_1 then
                                        l_v20_0 = nil;
                                        goto label1 --[[  true, false  ]];
                                    end;
                                end;
                                l_v20_0 = l_l_l_dataModelPatchService_0_Patch_0_1;
                                ::label1::;
                                if l_v20_0 then
                                    l_l_l_dataModelPatchService_0_Patch_0_0 = require(l_v20_0);
                                end;
                            end;
                            return v31;
                        else
                            v1.sendTelemetryEvent(l_loggingProtocol_0, l_Events_0.MissingPatchRoot, {
                                patchName = v17,
                                extraMessage = table.concat(v20, ".")
                            });
                            return nil;
                        end;
                    else
                        v1.sendTelemetryEvent(l_loggingProtocol_0, l_Events_0.NoPatchFound, {
                            patchName = v17,
                            extraMessage = nil
                        });
                        return nil;
                    end;
                end);
                if not l_status_0 or not l_result_0 then
                    if l_status_0 then
                        v1.sendTelemetryEvent(l_loggingProtocol_0, l_Events_0.PatchLoadFailed, {
                            patchName = v17,
                            extraMessage = nil
                        });
                    else
                        v1.sendTelemetryEvent(l_loggingProtocol_0, l_Events_0.PatchLoadError, {
                            patchName = v17,
                            extraMessage = tostring(l_result_0)
                        });
                    end;
                    v4[v26] = "NONE";
                    return nil;
                else
                    v1.sendTelemetryEvent(l_loggingProtocol_0, l_Events_0.PatchLoadedOk, {
                        patchName = v17,
                        extraMessage = nil
                    });
                    v4[v26] = l_result_0;
                    return l_result_0;
                end;
            end;
        end;
    else
        return nil;
    end;
end;


local l_Players_0 = game:GetService("Players");
local l_DataModelPatchService_0 = game:GetService("DataModelPatchService");
local l_AppStorageService_0 = game:GetService("AppStorageService");
local v3 = require(script.Parent.requireOtaPackageInternal);
local l_Parent_0 = script:FindFirstAncestor("OtaPatchLoader").Parent;
local l_OtaPackagesStatus_0 = require(l_Parent_0.OtaPatchPackagesStatus).OtaPackagesStatus;
local l_FFlagLuaAppShowOtaPackagesLoaded_0 = require(l_Parent_0.SharedFlags).FFlagLuaAppShowOtaPackagesLoaded;
local v7 = game:DefineFastFlag("LuaAppDisableAllOtaPackages", false);
return function(v8, v9, v10, v11, v12, v13)
    local v14 = require(v9);
    if not v7 then
        if not _G.__TESTEZ_RUNNING_TEST__ then
            if not v8 then
                error("requireOtaPackage must specify a package by name");
            end;
            if not v9 then
                error("requireOtaPackage must specify a starter script");
            end;
            if not v11 then
                error("requireOtaPackage must specify a patch info");
            end;
            local l_v9_FirstAncestor_0 = v9:FindFirstAncestor("CorePackages");
            if l_v9_FirstAncestor_0 then
                if l_v9_FirstAncestor_0 ~= game:GetService("CorePackages") then
                    return v14;
                else
                    local v16 = not not l_Players_0.LocalPlayer and l_Players_0.LocalPlayer.UserId or nil;
                    if not v16 or v16 == 0 then
                        v16 = tonumber(l_AppStorageService_0:GetItem("UserId")) or 0;
                    end;
                    assert(v16, "userId should always exist; assert to workaround static analysis");
                    local v17 = {
                        loggingProtocol = v12,
                        dataModelPatchService = l_DataModelPatchService_0
                    };
                    if not l_FFlagLuaAppShowOtaPackagesLoaded_0 then
                        return v3(v16, v8, v14, v10, v11, v17, v13, nil);
                    else
                        local v18 = v3(v16, v8, v14, v10, v11, v17, v13, nil);
                        l_OtaPackagesStatus_0.AddPackageStatus(v11.patchName, v8, v18 ~= v14);
                        return v18;
                    end;
                end;
            else
                return v14;
            end;
        else
            return v14;
        end;
    else
        return v14;
    end;
end;


local l_defaultOtaValidator_0 = require(script:FindFirstAncestor("OtaPatchLoader").Parent.OtaPatchValidation).defaultOtaValidator;
local v1 = require(script.Parent.loadOtaPackages);
local v2 = require(script.Parent.OtaPatchLoaderTelemetry);
local l_Events_0 = v2.Events;
local l_FFlagLuaAppRedoOtaValidation_0 = require(script.Parent.Flags).FFlagLuaAppRedoOtaValidation;
local function _(v5, v6, v7, v8, v9)
    v2.sendTelemetryEvent(v5, v6, {
        patchName = v7,
        packageName = v8,
        extraMessage = v9
    });
end;
local function v18(v11, v12)
    local v13 = type(v11);
    local v14 = type(v12);
    if v13 ~= v14 then
        return false, (("starter types did not match; local %* ~= ota %*"):format(v13, v14));
    else
        if v13 == "table" then
            for v15, v16 in pairs(v11) do
                local v17 = v12[v15];
                if v17 then
                    if type(v17) ~= type(v16) then
                        return false, (("interface %* types did not match; local %* ~= ota %*"):format(v15, type(v16), (type(v17))));
                    end;
                else
                    return false, (("missing value for interface %* in ota"):format(v15));
                end;
            end;
        end;
        return true, "";
    end;
end;
return function(v19, v20, v21, v22, v23, v24, v25, v26)
    if not v24 then
        error("requireOtaPackageInternal missing services");
    end;
    local l_loggingProtocol_0 = v24.loggingProtocol;
    local l_patchName_0 = v23.patchName;
    local v29 = v1(v19, l_patchName_0, v23.patchBehavior, v23.patchConfig, v23.patchPackagesRoot, v23.patchStarterScriptPath, v24, v26);
    if v29 then
        assert(v29, "always true, only for lint");
        local l_v29_FirstChild_0 = v29:FindFirstChild(v20);
        if l_v29_FirstChild_0 then
            assert(l_v29_FirstChild_0, "always true, only for lint");
            v2.sendTelemetryEvent(l_loggingProtocol_0, l_Events_0.PatchPackageFound, {
                patchName = l_patchName_0,
                packageName = v20,
                extraMessage = nil
            });
            local l_status_0, l_result_0 = pcall(function()
                return (require(l_v29_FirstChild_0));
            end);
            if l_status_0 then
                if l_result_0 == nil then
                    v2.sendTelemetryEvent(l_loggingProtocol_0, l_Events_0.RequirePackageEmpty, {
                        patchName = l_patchName_0,
                        packageName = v20,
                        extraMessage = nil
                    });
                    return v21;
                else
                    if not l_FFlagLuaAppRedoOtaValidation_0 then
                        local v33, v34 = v18(v21, l_result_0);
                        if v33 then
                            if not v22 then
                                v2.sendTelemetryEvent(l_loggingProtocol_0, l_Events_0.NoValidatorScript, {
                                    patchName = l_patchName_0,
                                    packageName = v20,
                                    extraMessage = nil
                                });
                            else
                                local v35, v36, v37 = pcall(function()
                                    return require(v22)(v21, l_result_0);
                                end);
                                if v35 then
                                    if not v36 then
                                        v2.sendTelemetryEvent(l_loggingProtocol_0, l_Events_0.ValidatorScriptFailed, {
                                            patchName = l_patchName_0,
                                            packageName = v20,
                                            extraMessage = v37
                                        });
                                        return v21;
                                    end;
                                else
                                    v2.sendTelemetryEvent(l_loggingProtocol_0, l_Events_0.ValidatorScriptError, {
                                        patchName = l_patchName_0,
                                        packageName = v20,
                                        extraMessage = tostring(v36)
                                    });
                                    return v21;
                                end;
                            end;
                        else
                            v2.sendTelemetryEvent(l_loggingProtocol_0, l_Events_0.StarterFileIncompatible, {
                                patchName = l_patchName_0,
                                packageName = v20,
                                extraMessage = v34
                            });
                            return v21;
                        end;
                    else
                        local v38 = nil;
                        if v25 then
                            local v39 = nil;
                            local l_status_1, l_result_1 = pcall(function()
                                local v40 = l_result_0[v25];
                                if not v40 then
                                    return nil;
                                else
                                    return v40;
                                end;
                            end);
                            v39 = l_status_1;
                            v38 = l_result_1;
                            if v39 then
                                if not v38 then
                                    v2.sendTelemetryEvent(l_loggingProtocol_0, l_Events_0.PackageValidationError, {
                                        patchName = l_patchName_0,
                                        packageName = v20,
                                        extraMessage = ("custom validation key %* not found, using default validator"):format(v25)
                                    });
                                end;
                            else
                                v38 = nil;
                                v2.sendTelemetryEvent(l_loggingProtocol_0, l_Events_0.PackageValidationError, {
                                    patchName = l_patchName_0,
                                    packageName = v20,
                                    extraMessage = ("custom validation key %* error on access, using default validator"):format(v25)
                                });
                            end;
                        end;
                        if not v38 then
                            v38 = l_defaultOtaValidator_0;
                        end;
                        local v43, v44, v45 = pcall(function()
                            return v38(v26, v29, v21, l_result_0);
                        end);
                        if v43 then
                            if v44 then
                                --[[ close >= 14 ]]
                            else
                                v2.sendTelemetryEvent(l_loggingProtocol_0, l_Events_0.PackageValidationFailed, {
                                    patchName = l_patchName_0,
                                    packageName = v20,
                                    extraMessage = v45
                                });
                                return v21;
                            end;
                        else
                            v2.sendTelemetryEvent(l_loggingProtocol_0, l_Events_0.PackageValidationError, {
                                patchName = l_patchName_0,
                                packageName = v20,
                                extraMessage = tostring(v44)
                            });
                            return v21;
                        end;
                    end;
                    v2.sendTelemetryEvent(l_loggingProtocol_0, l_Events_0.PatchPackageRequiredOk, {
                        patchName = l_patchName_0,
                        packageName = v20,
                        extraMessage = nil
                    });
                    return l_result_0;
                end;
            else
                v2.sendTelemetryEvent(l_loggingProtocol_0, l_Events_0.RequirePackageError, {
                    patchName = l_patchName_0,
                    packageName = v20,
                    extraMessage = tostring(l_result_0)
                });
                return v21;
            end;
        else
            v2.sendTelemetryEvent(l_loggingProtocol_0, l_Events_0.PatchPackageMissing, {
                patchName = l_patchName_0,
                packageName = v20,
                extraMessage = nil
            });
            return v21;
        end;
    else
        return v21;
    end;
end;


return function(v0, v1)
    v1 = v1 or game:GetService("CorePackages");
    assert(v1, "corePackages should always exist");
    local l_v1_FirstChild_0 = v1:FindFirstChild("_GlobalPackageVersions", false);
    if l_v1_FirstChild_0 then
        local v3 = require(l_v1_FirstChild_0);
        local l_v0_FirstChild_0 = v0:FindFirstChild("_RequiredDependencyVersions", false);
        if l_v0_FirstChild_0 then
            local v5 = require(l_v0_FirstChild_0);
            local l_FileVersion_0 = v3.FileVersion;
            local l_FileVersion_1 = v5.FileVersion;
            if l_FileVersion_0 == 0 then
                return false, (("invalid global packages version %*"):format(l_FileVersion_0));
            elseif l_FileVersion_1 == 0 then
                return false, (("invalid patch packages version %*"):format(l_FileVersion_1));
            else
                if l_FileVersion_1 <= l_FileVersion_0 then
                    local l_MaxAppVersion_0 = v3.MaxAppVersion;
                    local l_IsDota_0 = v3.IsDota;
                    local l_MaxAppVersion_1 = v5.MaxAppVersion;
                    if l_IsDota_0 then
                        if l_MaxAppVersion_0 and l_MaxAppVersion_1 then
                            if l_MaxAppVersion_1 < l_MaxAppVersion_0 then
                                return false, (("global packages are newer than the patch (patch: %* <= global: %*), (patch app: %* < global app: %*)"):format(v5.FileVersion, v3.FileVersion, l_MaxAppVersion_1, l_MaxAppVersion_0));
                            end;
                        else
                            return false, (("global packages are newer than the patch (patch: %* <= global: %*), app versions missing"):format(v5.FileVersion, v3.FileVersion));
                        end;
                    else
                        return false, (("global packages are newer than the patch (patch: %* <= global: %*), not DOTA"):format(v5.FileVersion, v3.FileVersion));
                    end;
                end;
                local l_Packages_0 = v3.Packages;
                for v12, v13 in pairs(v5.Packages) do
                    if not (l_Packages_0[v12] ~= nil) or l_Packages_0[v12].source_hash == nil then
                        return false, (("hash for %* missing in global packages"):format(v12));
                    elseif v13.source_hash == nil then
                        return false, (("hash for %* missing in patch packages"):format(v12));
                    elseif v13.source_hash ~= l_Packages_0[v12].source_hash then
                        return false, (("hash mismatch for %*. Patch: [%*]; Global: [%*]."):format(v12, v13.source_hash, l_Packages_0[v12].source_hash));
                    end;
                end;
                return true, "";
            end;
        else
            return false, "_RequiredDependencyVersions not found in patch.";
        end;
    else
        return false, "_GlobalPackageVersions not found in CorePackages";
    end;
end;


local v0 = {
    None = "0",
    All = "1",
    Partial = "2"
};
local v1 = {
    PackagesByPatch = {}
};
v1.AddPackageStatus = function(v2, v3, v4)
    if v2 then
        if v3 then
            if not v1.PackagesByPatch[v2] then
                v1.PackagesByPatch[v2] = {};
            end;
            v1.PackagesByPatch[v2][v3] = v4 or false;
            return ;
        else
            return ;
        end;
    else
        return ;
    end;
end;
v1.AllPatchPackagesLoaded = function(v5)
    if v5 then
        local v6 = v1.PackagesByPatch[v5];
        if v6 then
            local v7 = 0;
            local v8 = 0;
            for _, v10 in v6, nil, nil do
                if not v10 then
                    v8 = v8 + 1;
                else
                    v7 = v7 + 1;
                end;
            end;
            if v7 == 0 then
                return v0.None;
            elseif v8 == 0 then
                assert(v7 > 0, "Success <=0, should be impossible");
                return v0.All;
            else
                assert(v7 > 0, "Success <=0, should be impossible");
                assert(v8 > 0, "Failed <= 0, should be impossible");
                return v0.Partial;
            end;
        else
            return nil;
        end;
    else
        return nil;
    end;
end;
return v1;


return {
    OtaPackagesStatus = require(script.OtaPackagesStatus),
    ["jest.config"] = script["jest.config"]
};


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


local v0 = require(script.Parent.validatePackageDependencies);
local v1 = require(script.Parent.validateInterface);
return function(v2, v3, v4, v5)
    local v6, v7 = v0(v2, v3);
    if v6 then
        local v8, v9 = v1(v4, v5, true);
        if v8 then
            return true, "";
        else
            return false, v9;
        end;
    else
        return false, v7;
    end;
end;


return {
    defaultOtaValidator = require(script.defaultOtaValidator),
    validateInterface = require(script.validateInterface),
    validatePackageDependencies = require(script.validatePackageDependencies),
    ["jest.config"] = script["jest.config"]
};


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


local function v0(v1, v2, v3)
    if v1 == nil then
        return true, "";
    else
        local v4 = type(v1);
        local v5 = type(v2);
        if v4 ~= v5 then
            return false, (("interface types did not match; required %* ~= given %*"):format(v4, v5));
        else
            if v4 == "table" then
                for v6, v7 in v1, nil, nil do
                    if v6 ~= "__index" and v6 ~= "jest.config" then
                        local v8 = v2[v6];
                        if v8 == nil then
                            return false, (("missing required value for interface %*"):format(v6));
                        else
                            local v9 = type(v7);
                            local v10 = type(v8);
                            if v10 ~= v9 then
                                return false, (("interface %* types did not match; required %* ~= given %*"):format(v6, v9, v10));
                            elseif not (not (v3 and v9 == "table") or v7.isReactComponent) then
                                local v11, v12 = v0(v7, v8, v3);
                                if not v11 then
                                    return v11, v12;
                                end;
                            end;
                        end;
                    end;
                end;
            end;
            return true, "";
        end;
    end;
end;
return v0;


return function(v0, v1)
    v0 = v0 or game:GetService("CorePackages");
    assert(v0, "corePackages should always exist");
    local l_v0_FirstChild_0 = v0:FindFirstChild("_GlobalPackageVersions", false);
    if l_v0_FirstChild_0 then
        local v3 = require(l_v0_FirstChild_0);
        local l_v1_FirstChild_0 = v1:FindFirstChild("_RequiredDependencyVersions", false);
        if l_v1_FirstChild_0 then
            local v5 = require(l_v1_FirstChild_0);
            local l_FileVersion_0 = v3.FileVersion;
            local l_FileVersion_1 = v5.FileVersion;
            if l_FileVersion_0 == 0 then
                return false, (("invalid global packages version %*"):format(l_FileVersion_0));
            elseif l_FileVersion_1 == 0 then
                return false, (("invalid patch packages version %*"):format(l_FileVersion_1));
            else
                if l_FileVersion_1 <= l_FileVersion_0 then
                    local l_MaxAppVersion_0 = v3.MaxAppVersion;
                    local l_IsDota_0 = v3.IsDota;
                    local l_MaxAppVersion_1 = v5.MaxAppVersion;
                    if l_IsDota_0 then
                        if l_MaxAppVersion_0 and l_MaxAppVersion_1 then
                            if l_MaxAppVersion_1 < l_MaxAppVersion_0 then
                                return false, (("global packages are newer than the patch (patch: %* <= global: %*), (patch app: %* < global app: %*)"):format(v5.FileVersion, v3.FileVersion, l_MaxAppVersion_1, l_MaxAppVersion_0));
                            end;
                        else
                            return false, (("global packages are newer than the patch (patch: %* <= global: %*), app versions missing"):format(v5.FileVersion, v3.FileVersion));
                        end;
                    else
                        return false, (("global packages are newer than the patch (patch: %* <= global: %*), not DOTA"):format(v5.FileVersion, v3.FileVersion));
                    end;
                end;
                local l_Packages_0 = v3.Packages;
                for v12, v13 in pairs(v5.Packages) do
                    if not (l_Packages_0[v12] ~= nil) or l_Packages_0[v12].source_hash == nil then
                        return false, (("hash for %* missing in global packages"):format(v12));
                    elseif v13.source_hash == nil then
                        return false, (("hash for %* missing in patch packages"):format(v12));
                    elseif v13.source_hash ~= l_Packages_0[v12].source_hash then
                        return false, (("hash mismatch for %*. Patch: [%*]; Global: [%*]."):format(v12, v13.source_hash, l_Packages_0[v12].source_hash));
                    end;
                end;
                return true, "";
            end;
        else
            return false, "_RequiredDependencyVersions not found in patch.";
        end;
    else
        return false, "_GlobalPackageVersions not found in CorePackages";
    end;
end;


local v0 = require(script.Parent.Parent.dependencies);
local v1 = require(script.Parent.EventConstants);
local v2 = v0.Analytics.AnalyticsReporters.EventIngest.new((game:GetService("EventIngestService")));
return {
    sendPageLoadEvent = function(v3, v4)
        v2:sendEventDeferred(v3, v1.eventNames.pageLoad, {
            origin = v4
        });
    end,
    sendFormInteractionEvent = function(v5, v6, v7)
        v2:sendEventDeferred(v5, v1.eventNames.formInteraction, {
            origin = v6,
            field = v7
        });
    end,
    sendButtonClickEvent = function(v8, v9, v10)
        v2:sendEventDeferred(v8, v1.eventNames.buttonClick, {
            origin = v9,
            btn = v10
        });
    end,
    sendMsgShownEvent = function(v11, v12, v13, v14)
        v2:sendEventDeferred(v11, v1.eventNames.msgShown, {
            origin = v12,
            field = v13,
            errorCode = tostring(v14)
        });
    end
};


return {
    eventNames = {
        buttonClick = "authButtonClick",
        formInteraction = "authFormInteraction",
        msgShown = "authMsgShown",
        pageLoad = "authPageload"
    },
    ctx = {
        enterOtp = "enterOtp",
        sendOtp = "sendOtp"
    },
    btn = {
        cancel = "cancel",
        changeEmail = "changeEmail",
        login = "login",
        resendCode = "resendCode",
        sendCode = "sendCode"
    },
    field = {
        code = "code",
        email = "email",
        errorMessage = "errorMessage",
        resendErrorMessage = "resendErrorMessage"
    }
};


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.dependencies);
local l_React_0 = v1.React;
local l_RoactRodux_0 = v1.RoactRodux;
local l_RoactServiceTags_0 = v1.RoactServiceTags;
local l_RobloxAppHooks_0 = v1.RobloxAppHooks;
local l_useLocalization_0 = v1.Localization.Hooks.useLocalization;
local l_NavigateDown_0 = v1.NavigationRodux.Thunks.NavigateDown;
local l_CloseCentralOverlay_0 = v1.CentralOverlay.Thunks.CloseCentralOverlay;
local l_UserInputService_0 = game:GetService("UserInputService");
local _ = require(l_Parent_0.Common.otpLoginTypes);
local v11 = require(l_Parent_0.Common.otpLoginConstants);
local v12 = require(l_Parent_0.Utils.isStringValidEmail);
local v13 = require(l_Parent_0.Utils.debounce);
local v14 = require(script.Parent.EnterEmailView);
local v15 = require(script.Parent.EnterCodeView);
local v16 = require(l_Parent_0.Thunks.SendCode);
local v17 = require(l_Parent_0.Thunks.ResendCode);
local v18 = require(l_Parent_0.Analytics.AnalyticsEvents);
local v19 = require(l_Parent_0.Analytics.EventConstants);
local v20 = game:DefineFastFlag("ShouldEnableOtpSignup", false);
local l_useState_0 = l_React_0.useState;
local v22 = {
    EnterEmail = "sendOtp",
    EnterCode = "enterOtp"
};
return (l_RoactRodux_0.connect(function(v23, _)
    return {
        screenSize = v23.screenSize
    };
end, function(v25)
    return {
        sendCode = function(v26, v27)
            return v25(v16(v26, v27));
        end,
        resendCode = function(v28, v29)
            return v25(v17(v28, v29));
        end,
        navigateToPage = function(v30)
            return v25(l_NavigateDown_0(v30));
        end,
        closeCentralOverlay = function()
            return v25(l_CloseCentralOverlay_0());
        end
    };
end)(function(v31)
    local v32 = l_useLocalization_0({
        enterEmailTitle = v31.enterEmailTitleKey,
        enterEmailDescription = v31.enterEmailDescriptionKey,
        enterCodeTitle = v31.enterCodeTitleKey,
        enterCodeDescription = v31.enterCodeDescriptionKey
    });
    local v33 = l_useLocalization_0(v11.errorMessageKeys);
    local v34, v35 = l_useState_0(v22.EnterEmail);
    local v36, v37 = l_useState_0("");
    local v38, v39 = l_useState_0("");
    local v40, v41 = l_useState_0("");
    local v42, v43 = l_useState_0(false);
    local v44, v45 = l_useState_0(false);
    local v46, v47 = l_useState_0(0);
    local v48 = l_React_0.useRef(false);
    local v49 = l_RobloxAppHooks_0.useRoactService(l_RoactServiceTags_0.RoactNetworking);
    local v50 = nil;
    local v51 = l_React_0.useCallback(function()
        v18.sendButtonClickEvent(v19.ctx.enterOtp, v31.origin, v19.btn.changeEmail);
        v35(v22.EnterEmail);
    end, {
        v35,
        v31.origin
    });
    local v52 = l_React_0.useCallback(function()
        v31.navigateToPage({
            name = "GenericWebPage",
            detail = "https://en.help.roblox.com/hc/articles/11014749736980",
            extraProps = {
                title = "",
                transitionAnimation = "SlideInFromBottom"
            }
        });
    end, {
        v31.navigateToPage
    });
    local v53 = l_React_0.useCallback(function()
        v41("");
    end, {
        v41
    });
    local v55 = l_React_0.useCallback(v13(function(v54)
        v18.sendFormInteractionEvent(v19.ctx.sendOtp, v31.origin, v19.field.email);
        v53();
        if v54.Text then
            v37(v54.Text);
            if not v12(v54.Text) then
                v41(v33.InvalidEmail);
            end;
        end;
    end, 0.5), {
        v37,
        v31.origin
    });
    local function v58(v56)
        local v57 = nil;
        if v56 then
            v57 = v11.statusCodeMap[v56];
        end;
        if not v57 or not v33[v57] then
            v41(v33.Unknown);
            if v34 == v22.EnterEmail then
                v18.sendMsgShownEvent(v34, v31.origin, v19.field.errorMessage, 1);
                return ;
            else
                v18.sendMsgShownEvent(v34, v31.origin, v19.field.resendErrorMessage, 1);
                return ;
            end;
        else
            v41(v33[v57]);
            if v34 == v22.EnterEmail then
                v18.sendMsgShownEvent(v34, v31.origin, v19.field.errorMessage, v56);
                return ;
            else
                v18.sendMsgShownEvent(v34, v31.origin, v19.field.resendErrorMessage, v56);
                return ;
            end;
        end;
    end;
    local function _(v59)
        return v59 == "signup" and v11.otpServiceOriginSignup or v11.otpServiceOrigin;
    end;
    local function v65(v61)
        v43(true);
        local v62 = v31.sendCode(v49, {
            origin = v31.origin == "signup" and v11.otpServiceOriginSignup or v11.otpServiceOrigin,
            contactType = v11.otpServiceContactType,
            contactValue = v61
        });
        if v62 then
            v62:andThen(function(v63)
                v43(false);
                v39(v63.otpSessionToken);
                v35(v22.EnterCode);
            end):catch(function(v64)
                v43(false);
                v58((tonumber(v64)));
            end);
        end;
    end;
    local v66 = l_React_0.useCallback(function()
        v18.sendButtonClickEvent(v19.ctx.sendOtp, v31.origin, v19.btn.sendCode);
        v65(v36);
    end, {
        v36,
        v31.origin
    });
    local function v71(v67)
        local v68 = v31.resendCode(v49, {
            origin = v31.origin == "signup" and v11.otpServiceOriginSignup or v11.otpServiceOrigin,
            contactType = v11.otpServiceContactType,
            otpSessionToken = v67
        });
        if v68 then
            v68:andThen(function(v69)
                v39(v69.otpSessionToken);
            end):catch(function(v70)
                v58((tonumber(v70)));
            end);
        end;
    end;
    local v72 = l_React_0.useCallback(function()
        v18.sendButtonClickEvent(v19.ctx.enterOtp, v31.origin, v19.btn.resendCode);
        v71(v38);
    end, {
        v38,
        v31.origin
    });
    local v79 = l_React_0.useCallback(function(v73)
        v18.sendButtonClickEvent(v19.ctx.enterOtp, v31.origin, v19.btn.login);
        v43(true);
        v48.current = true;
        local v74 = v31.onSubmitCode(v38, v73);
        if not v20 then
            v74:andThen(function(v75)
                if v75 and type(v75) == "string" then
                    for v76, v77 in v11.errorMessageKeys, nil, nil do
                        if v75 == v77 then
                            v41(v33[v76]);
                        end;
                    end;
                    v48.current = false;
                end;
                v43(false);
            end);
        elseif v74 then
            if v31.origin == v11.otpServiceOriginSignup then
                v74:andThen(function()
                end):catch(function(v78)
                    v58((tonumber(v78)));
                    v48.current = false;
                end);
            end;
            v43(false);
            return ;
        end;
    end, {
        v38,
        v31.origin
    });
    local function v80()
        v18.sendButtonClickEvent(v34, v31.origin, v19.btn.cancel);
        v31.closeCentralOverlay();
    end;
    l_React_0.useEffect(function()
        v50 = l_UserInputService_0:GetPropertyChangedSignal("OnScreenKeyboardVisible"):Connect(function()
            v45(l_UserInputService_0.OnScreenKeyboardVisible);
            v47(not not l_UserInputService_0.OnScreenKeyboardVisible and l_UserInputService_0.OnScreenKeyboardSize.Y or 0);
        end);
        return function()
            if v50 then
                v50:Disconnect();
            end;
            v50 = nil;
            if not v48.current then
                v31.onModalAbandoned();
            end;
        end;
    end, {});
    local l_createElement_0 = l_React_0.createElement;
    local l_Fragment_0 = l_React_0.Fragment;
    local v83 = nil;
    local v84 = {};
    local v85 = false;
    if v34 == v22.EnterEmail then
        v85 = l_React_0.createElement(v14, {
            origin = v31.origin,
            enterEmailTitle = v32.enterEmailTitle,
            enterEmailDescription = v32.enterEmailDescription,
            email = v36,
            onEmailTextChange = v55,
            errorMessage = v40,
            handleContinue = v66,
            onClose = v80,
            isDisabled = v42,
            isKeyboardShowing = v44,
            keyboardHeight = v46,
            screenSize = v31.screenSize
        });
    end;
    v84.EnterEmail = v85;
    v85 = false;
    if v34 == v22.EnterCode then
        v85 = l_React_0.createElement(v15, {
            origin = v31.origin,
            enterCodeTitle = v32.enterCodeTitle,
            enterCodeDescription = v32.enterCodeDescription,
            email = v36,
            errorMessage = v40,
            clearErrorMessage = v53,
            onResendCode = v72,
            onSubmitCode = v79,
            complianceCheckboxMessageKey = v31.complianceCheckboxMessageKey,
            returnToEnterEmail = v51,
            navigateToHelp = v52,
            onClose = v80,
            isDisabled = v42,
            isKeyboardShowing = v44,
            keyboardHeight = v46,
            screenSize = v31.screenSize
        });
    end;
    v84.EnterCode = v85;
    return l_createElement_0(l_Fragment_0, v83, v84);
end));


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.dependencies);
local l_React_0 = v1.React;
local l_UIBlox_0 = v1.UIBlox;
local l_useStyle_0 = l_UIBlox_0.Core.Style.useStyle;
local l_ButtonType_0 = l_UIBlox_0.App.Button.Enum.ButtonType;
local l_PartialPageModal_0 = l_UIBlox_0.App.Dialog.Modal.PartialPageModal;
local l_LinkButton_0 = l_UIBlox_0.App.Button.LinkButton;
local l_Checkbox_0 = l_UIBlox_0.App.InputButton.Checkbox;
local v9 = require(l_Parent_0.Utils.debounce);
local l_useLocalization_0 = v1.Localization.Hooks.useLocalization;
local l_useDesignTokens_0 = v1.Style.useDesignTokens;
local l_useState_0 = l_React_0.useState;
local v13 = require(l_Parent_0.Analytics.AnalyticsEvents);
local v14 = require(l_Parent_0.Analytics.EventConstants);
local v15 = require(l_Parent_0.Common.otpLoginConstants);
local v16 = require(script.Parent.InputField);
local v17 = game:DefineFastFlag("EnableKoreaKISAComplianceModularized", false);
return function(v18)
    local v19 = l_useStyle_0();
    local v20 = l_useDesignTokens_0();
    local v21 = l_PartialPageModal_0:getMiddleContentWidth(v18.screenSize.X);
    local v22, v23 = l_React_0.useState(true);
    local v24, v25 = l_React_0.useState(v15.DEFAULT_TIMER_COOLDOWN);
    local v26 = l_useLocalization_0({
        placeholderKey = "Authentication.OneTimePasscode.Label.SixDigitCode",
        buttonKey = "Authentication.OneTimePasscode.Action.Resend",
        buttonDisabledKey = "Authentication.OneTimePasscode.Label.CodeSent",
        footerDescriptionKey = "Authentication.OneTimePasscode.Description.DidntReceiveCode",
        changeEmailKey = "Authentication.OneTimePasscode.Action.ChangeEmailV2",
        helpButtonKey = "Authentication.OneTimePasscode.Action.GetHelp",
        complianceCheckboxMessageKey = v18.complianceCheckboxMessageKey
    });
    local v27, v28 = l_useState_0("");
    local v29, v30 = l_useState_0(false);
    local function _(v31)
        v30(v31);
    end;
    local function v33(v34, v35)
        local v36 = v35 - (tick() - v34);
        if v36 > 0 then
            v25((math.round(v36)));
            task.delay(1, function()
                v33(v34, v35);
            end);
            return ;
        else
            v25(0);
            v23(false);
            return ;
        end;
    end;
    local function v43(v37, v38, v39, v40)
        local function v41()
            v40();
            v23(true);
            v25(v39);
            v33(tick(), v39);
        end;
        local function _()
            if not v22 then
                return v37;
            else
                return v38 .. " (" .. v24 .. ")";
            end;
        end;
        return {
            buttonHeight = v20.Global.Size_600,
            forcedFillDirection = Enum.FillDirection.Vertical,
            buttons = {
                {
                    buttonType = l_ButtonType_0.Secondary,
                    props = {
                        onActivated = v41,
                        text = if not v22 then v37 else v38 .. " (" .. v24 .. ")",
                        isDisabled = v22 or v18.isDisabled
                    }
                }
            }
        };
    end;
    local v45 = l_React_0.useCallback(function(v44)
        return v44:gsub("{email}", v18.email);
    end, {
        v18.email
    });
    local v47 = l_React_0.useCallback(v9(function(v46)
        v13.sendFormInteractionEvent(v14.ctx.enterOtp, v18.origin, v14.field.code);
        if v46.Text then
            v46.Text = string.sub(v46.Text:gsub("%D", ""), 1, v15.DEFAULT_CODE_LENGTH);
            v28(v46.Text);
            v18.clearErrorMessage();
        end;
    end, 0.5), {
        v28
    });
    local function v48()
        return l_React_0.createElement("Frame", {
            BackgroundTransparency = 1,
            AutomaticSize = Enum.AutomaticSize.Y,
            Size = UDim2.new(1, 0, 0, 0)
        }, {
            Padding = l_React_0.createElement("UIPadding", {
                PaddingTop = UDim.new(0, v20.Global.Size_200)
            }),
            ListLayout = l_React_0.createElement("UIListLayout", {
                SortOrder = Enum.SortOrder.LayoutOrder,
                VerticalAlignment = Enum.VerticalAlignment.Center,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                FillDirection = Enum.FillDirection.Vertical,
                Padding = UDim.new(0, v20.Global.Size_100)
            }),
            FooterText = l_React_0.createElement("TextLabel", {
                BackgroundTransparency = 1,
                AutomaticSize = Enum.AutomaticSize.Y,
                Text = v26.footerDescriptionKey,
                TextSize = v20.Global.FontSize_100,
                TextColor3 = v19.Theme.TextDefault.Color,
                TextTransparency = v19.Theme.TextDefault.Transparency,
                Font = v19.Font.Body.Font,
                LayoutOrder = 4
            }),
            LinkFrame = l_React_0.createElement("Frame", {
                BackgroundTransparency = 1,
                AutomaticSize = Enum.AutomaticSize.Y,
                LayoutOrder = 5
            }, {
                LinkListLayout = l_React_0.createElement("UIListLayout", {
                    SortOrder = Enum.SortOrder.LayoutOrder,
                    VerticalAlignment = Enum.VerticalAlignment.Center,
                    HorizontalAlignment = Enum.HorizontalAlignment.Center,
                    FillDirection = Enum.FillDirection.Horizontal
                }),
                ChangeEmailButton = l_React_0.createElement(l_LinkButton_0, {
                    text = v26.changeEmailKey,
                    onActivated = v18.returnToEnterEmail,
                    layoutOrder = 6,
                    position = UDim2.fromScale(0.25, 0)
                }),
                Hyphen = l_React_0.createElement("TextLabel", {
                    BackgroundTransparency = 1,
                    Text = "-",
                    TextSize = v20.Global.FontSize_100,
                    TextColor3 = v19.Theme.TextDefault.Color,
                    TextTransparency = v19.Theme.TextDefault.Transparency,
                    Font = v19.Font.Footer.Font,
                    LayoutOrder = 7
                }),
                HelpButton = l_React_0.createElement(l_LinkButton_0, {
                    text = v26.helpButtonKey,
                    onActivated = v18.navigateToHelp,
                    layoutOrder = 8,
                    position = UDim2.fromScale(0.75, 0)
                })
            })
        });
    end;
    local function _()
        return (v17 and v18.complianceCheckboxMessageKey) and v18.complianceCheckboxMessageKey ~= "";
    end;
    l_React_0.useEffect(function()
        v33(tick(), v15.DEFAULT_TIMER_COOLDOWN);
        v13.sendPageLoadEvent(v14.ctx.enterOtp, v18.origin);
    end, {});
    l_React_0.useEffect(function()
        if string.len(v27) == v15.DEFAULT_CODE_LENGTH then
            if not v18.complianceCheckboxMessageKey then
                v18.onSubmitCode(v27);
            elseif v29 then
                v18.onSubmitCode(v27);
                return ;
            end;
        end;
    end, {
        v27,
        (tostring(v29))
    });
    return l_React_0.createElement(l_PartialPageModal_0, {
        title = v18.enterCodeTitle,
        screenSize = v18.screenSize,
        buttonStackProps = v43(v26.buttonKey, v26.buttonDisabledKey, v15.DEFAULT_TIMER_COOLDOWN, v18.onResendCode),
        footerContent = v48,
        onCloseClicked = v18.onClose,
        position = not not v18.isKeyboardShowing and UDim2.new(0.5, 0, 1, -v18.keyboardHeight) or nil,
        anchorPoint = not not v18.isKeyboardShowing and Vector2.new(0.5, 1) or nil
    }, {
        Middle = l_React_0.createElement("Frame", {
            BackgroundTransparency = 1,
            AutomaticSize = Enum.AutomaticSize.Y,
            Size = UDim2.new(1, 0, 0, 0)
        }, {
            ContentPadding = l_React_0.createElement("UIPadding", {
                PaddingTop = UDim.new(0, v20.Global.Size_300),
                PaddingBottom = UDim.new(0, v20.Global.Size_300)
            }),
            ListLayout = l_React_0.createElement("UIListLayout", {
                SortOrder = Enum.SortOrder.LayoutOrder,
                HorizontalAlignment = Enum.HorizontalAlignment.Left,
                Padding = UDim.new(0, v20.Global.Size_150)
            }),
            BodyText = l_React_0.createElement("TextLabel", {
                BackgroundTransparency = 1,
                Text = v45(v18.enterCodeDescription),
                TextSize = v19.Font.BaseSize,
                TextColor3 = v19.Theme.TextDefault.Color,
                TextTransparency = v19.Theme.TextDefault.Transparency,
                Font = v19.Font.Body.Font,
                TextXAlignment = Enum.TextXAlignment.Left,
                AutomaticSize = Enum.AutomaticSize.Y,
                TextWrapped = true,
                Size = UDim2.new(0, v21, 0, 0),
                LayoutOrder = 1
            }),
            ComplianceCheckboxContainer = ((v17 and v18.complianceCheckboxMessageKey) and v18.complianceCheckboxMessageKey ~= "") and l_React_0.createElement("Frame", {
                BackgroundTransparency = 1,
                AutomaticSize = Enum.AutomaticSize.Y,
                Size = UDim2.new(0, v21, 0, 0),
                LayoutOrder = 4
            }, {
                Layout = l_React_0.createElement("UIListLayout", {
                    Padding = UDim.new(0, 8),
                    FillDirection = Enum.FillDirection.Horizontal,
                    HorizontalAlignment = Enum.HorizontalAlignment.Left,
                    SortOrder = Enum.SortOrder.LayoutOrder
                }),
                Checkbox = l_React_0.createElement(l_Checkbox_0, {
                    text = "",
                    isSelected = v29,
                    onActivated = function()
                        v30(not v29);
                    end,
                    layoutOrder = 2
                }),
                CheckboxBodyText = l_React_0.createElement("TextLabel", {
                    BackgroundTransparency = 1,
                    Text = v26.complianceCheckboxMessageKey,
                    TextSize = v19.Font.BaseSize,
                    TextColor3 = v19.Theme.TextDefault.Color,
                    TextTransparency = v19.Theme.TextDefault.Transparency,
                    Font = v19.Font.Body.Font,
                    TextXAlignment = Enum.TextXAlignment.Left,
                    AutomaticSize = Enum.AutomaticSize.Y,
                    TextWrapped = true,
                    Size = UDim2.new(0, v21 * 0.9, 0, 0),
                    LayoutOrder = 3
                })
            }),
            CodeInput = l_React_0.createElement(v16, {
                text = v27,
                disabled = v18.isDisabled,
                onChange = v47,
                errorMessage = v18.errorMessage,
                placeholder = v26.placeholderKey,
                LayoutOrder = 3
            })
        })
    });
end;


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.dependencies);
local l_React_0 = v1.React;
local l_UIBlox_0 = v1.UIBlox;
local l_useStyle_0 = l_UIBlox_0.Core.Style.useStyle;
local l_useDesignTokens_0 = v1.Style.useDesignTokens;
local l_PartialPageModal_0 = l_UIBlox_0.App.Dialog.Modal.PartialPageModal;
local l_ButtonType_0 = l_UIBlox_0.App.Button.Enum.ButtonType;
local l_useLocalization_0 = v1.Localization.Hooks.useLocalization;
local v9 = require(script.Parent.InputField);
local v10 = require(l_Parent_0.Analytics.AnalyticsEvents);
local v11 = require(l_Parent_0.Analytics.EventConstants);
local function v16(v12, v13, v14, v15)
    return {
        buttonHeight = v15,
        forcedFillDirection = Enum.FillDirection.Vertical,
        buttons = {
            {
                buttonType = l_ButtonType_0.PrimarySystem,
                props = {
                    onActivated = v13,
                    text = v12,
                    isDisabled = v14
                }
            }
        }
    };
end;
return function(v17)
    local v18 = l_useStyle_0();
    local v19 = l_useDesignTokens_0();
    local v20 = l_useLocalization_0({
        emailPlaceholder = "Authentication.Login.Label.Email",
        continueButton = "Authentication.OneTimePasscode.Action.Continue"
    });
    local v21 = l_PartialPageModal_0:getMiddleContentWidth(v17.screenSize.X);
    local v23 = l_React_0.useCallback(function()
        local l_isDisabled_0 = v17.isDisabled;
        if not l_isDisabled_0 then
            l_isDisabled_0 = true;
            if string.len(v17.errorMessage) <= 0 then
                l_isDisabled_0 = string.len(v17.email) == 0;
            end;
        end;
        return l_isDisabled_0;
    end, {
        v17.isDisabled,
        v17.errorMessage,
        v17.email
    });
    l_React_0.useEffect(function()
        v10.sendPageLoadEvent(v11.ctx.sendOtp, v17.origin);
    end, {});
    return l_React_0.createElement(l_PartialPageModal_0, {
        title = v17.enterEmailTitle,
        screenSize = v17.screenSize,
        buttonStackProps = v16(v20.continueButton, v17.handleContinue, v23(), v19.Global.Size_600),
        onCloseClicked = v17.onClose,
        position = not not v17.isKeyboardShowing and UDim2.new(0.5, 0, 1, -v17.keyboardHeight) or nil,
        anchorPoint = not not v17.isKeyboardShowing and Vector2.new(0.5, 1) or nil
    }, {
        Middle = l_React_0.createElement("Frame", {
            BackgroundTransparency = 1,
            AutomaticSize = Enum.AutomaticSize.Y,
            Size = UDim2.new(1, 0, 0, 0)
        }, {
            ContentPadding = l_React_0.createElement("UIPadding", {
                PaddingTop = UDim.new(0, v19.Global.Size_300),
                PaddingBottom = UDim.new(0, v19.Global.Size_300)
            }),
            ListLayout = l_React_0.createElement("UIListLayout", {
                SortOrder = Enum.SortOrder.LayoutOrder,
                HorizontalAlignment = Enum.HorizontalAlignment.Left,
                Padding = UDim.new(0, v19.Global.Size_150)
            }),
            BodyText = l_React_0.createElement("TextLabel", {
                BackgroundTransparency = 1,
                Text = v17.enterEmailDescription,
                TextSize = v18.Font.BaseSize,
                TextColor3 = v18.Theme.TextDefault.Color,
                TextTransparency = v18.Theme.TextDefault.Transparency,
                Font = v18.Font.Body.Font,
                TextXAlignment = Enum.TextXAlignment.Left,
                AutomaticSize = Enum.AutomaticSize.Y,
                TextWrapped = true,
                Size = UDim2.new(0, v21, 0, 0),
                LayoutOrder = 1
            }),
            EmailInput = l_React_0.createElement(v9, {
                text = v17.email,
                disabled = v17.isDisabled,
                onChange = v17.onEmailTextChange,
                errorMessage = v17.errorMessage,
                placeholder = v20.emailPlaceholder,
                LayoutOrder = 2
            })
        })
    });
end;