local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Roact);
local v3 = require(l_CorePackages_0.UIBlox);
local v4 = require(l_CorePackages_0.AvatarExperienceDeps);
local v5 = require(l_CorePackages_0.Cryo);
local l_RoactFitComponents_0 = v4.RoactFitComponents;
local l_FitFrameOnAxis_0 = l_RoactFitComponents_0.FitFrameOnAxis;
local l_FitFrameVertical_0 = l_RoactFitComponents_0.FitFrameVertical;
local l_withStyle_0 = v3.Style.withStyle;
local l_ImageSetLabel_0 = v3.Core.ImageSet.ImageSetLabel;
local l_Images_0 = v3.App.ImageSet.Images;
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local v13 = require(l_Modules_0.AvatarExperience.AvatarEditor.Components.BodyTypeSlider);
local v14 = l_Images_0["icons/menu/body_female"];
local v15 = l_Images_0["icons/menu/body_male"];
local v16 = l_Images_0["icons/menu/body_neutral"];
local v17 = v2.PureComponent:extend("BodyTypeRadar");
v17.render = function(v18)
    return l_withStyle_0(function(v19)
        return l_withLocalization_0({
            bodyType = "Feature.Avatar.Label.BodyType"
        })(function(v20)
            local l_lockNavigationCallback_0 = v18.props.lockNavigationCallback;
            local l_unlockNavigationCallback_0 = v18.props.unlockNavigationCallback;
            local l_LayoutOrder_0 = v18.props.LayoutOrder;
            local l_isDisabled_0 = v18.props.isDisabled;
            local l_Font_0 = v19.Font;
            local l_Theme_0 = v19.Theme;
            local l_Font_1 = l_Font_0.Header2.Font;
            local v28 = l_Font_0.BaseSize * l_Font_0.Header2.RelativeSize;
            return v2.createElement(l_FitFrameVertical_0, {
                width = UDim.new(1, 0),
                contentPadding = UDim.new(0, 36),
                FillDirection = Enum.FillDirection.Vertical,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                BackgroundTransparency = 1,
                LayoutOrder = l_LayoutOrder_0
            }, {
                BodyTypeLabel = v2.createElement("TextLabel", {
                    Size = UDim2.new(1, 0, 0, v28),
                    BackgroundTransparency = 1,
                    Text = v20.bodyType,
                    TextSize = v28,
                    TextColor3 = l_Theme_0.TextDefault.Color,
                    TextTransparency = l_Theme_0.TextDefault.TextTransparency,
                    TextXAlignment = Enum.TextXAlignment.Left,
                    LayoutOrder = 1,
                    Font = l_Font_1
                }),
                Container = v2.createElement(l_FitFrameVertical_0, {
                    width = UDim.new(1, 0),
                    FillDirection = Enum.FillDirection.Vertical,
                    HorizontalAlignment = Enum.HorizontalAlignment.Center,
                    BackgroundTransparency = 1,
                    LayoutOrder = 2
                }, {
                    UpperRow = v2.createElement(l_FitFrameVertical_0, {
                        width = UDim.new(1, 0),
                        FillDirection = Enum.FillDirection.Horizontal,
                        HorizontalAlignment = Enum.HorizontalAlignment.Center,
                        VerticalAlignment = Enum.VerticalAlignment.Top,
                        BackgroundTransparency = 1,
                        LayoutOrder = 1
                    }, {
                        RthroWomanIcon = v2.createElement(l_ImageSetLabel_0, {
                            AnchorPoint = Vector2.new(0, 0.5),
                            Size = UDim2.new(0, 36, 0, 36),
                            BackgroundTransparency = 1,
                            ImageColor3 = l_Theme_0.IconEmphasis.Color,
                            ImageTransparency = if not l_isDisabled_0 then l_Theme_0.IconEmphasis.Transparency else 0.5,
                            Image = v14,
                            LayoutOrder = 1
                        }),
                        BodyType = v2.createElement(v13, {
                            lockNavigationCallback = l_lockNavigationCallback_0,
                            unlockNavigationCallback = l_unlockNavigationCallback_0,
                            LayoutOrder = 2,
                            isDisabled = l_isDisabled_0,
                            NextSelectionLeft = v18.props.NextSelectionLeft,
                            NextSelectionRight = v18.props.NextSelectionRight,
                            NextSelectionUp = v18.props.NextSelectionUp,
                            NextSelectionDown = v18.props.NextSelectionDown,
                            [v2.Ref] = v18.props.forwardRef
                        }),
                        RthroManIcon = v2.createElement(l_ImageSetLabel_0, {
                            AnchorPoint = Vector2.new(0, 0.5),
                            Size = UDim2.new(0, 36, 0, 36),
                            BackgroundTransparency = 1,
                            Position = UDim2.new(1, -36, 0, 0),
                            ImageColor3 = l_Theme_0.IconEmphasis.Color,
                            ImageTransparency = if not l_isDisabled_0 then l_Theme_0.IconEmphasis.Transparency else 0.5,
                            Image = v15,
                            LayoutOrder = 3
                        })
                    }),
                    LowerRow = v2.createElement(l_FitFrameOnAxis_0, {
                        axis = l_FitFrameOnAxis_0.Axis.Both,
                        margin = l_RoactFitComponents_0.Rect.quad(8, 0, 0, 0),
                        BackgroundTransparency = 1,
                        LayoutOrder = 2
                    }, {
                        MiniFigIcon = v2.createElement(l_ImageSetLabel_0, {
                            AnchorPoint = Vector2.new(0.5, 0),
                            Size = UDim2.new(0, 36, 0, 36),
                            Position = UDim2.new(0.5, 0, 0, 0),
                            BackgroundTransparency = 1,
                            ImageColor3 = l_Theme_0.IconEmphasis.Color,
                            ImageTransparency = if not l_isDisabled_0 then l_Theme_0.IconEmphasis.Transparency else 0.5,
                            Image = v16
                        })
                    })
                })
            });
        end);
    end);
end;
return v2.forwardRef(function(v29, v30)
    return v2.createElement(v17, v5.Dictionary.join(v29, {
        forwardRef = v30
    }));
end);


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Cryo);
local v4 = require(l_CorePackages_0.Roact);
local v5 = require(l_CorePackages_0.RoactRodux);
local v6 = require(l_CorePackages_0.UIBlox);
local v7 = require(l_Modules_0.AvatarExperience.AvatarEditor.Constants);
local v8 = require(l_Modules_0.AvatarExperience.AvatarEditor.Actions.SetAvatarScales);
local v9 = require(l_Modules_0.AvatarExperience.AvatarEditor.Components.TwoAxisSlider);
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local l_withStyle_0 = v6.Style.withStyle;
local v12 = Vector2.new(224, 195);
local v13 = v4.PureComponent:extend("BodyTypeSlider");
v13.init = function(v14)
    local l_forwardRef_0 = v14.props.forwardRef;
    v14.mapPositionToScales = function(v16)
        local l_bodyTypeScaleRules_0 = v14.props.bodyTypeScaleRules;
        local v18 = math.clamp((1 - v16.Y) * (l_bodyTypeScaleRules_0.max - l_bodyTypeScaleRules_0.min) + l_bodyTypeScaleRules_0.min, l_bodyTypeScaleRules_0.min, l_bodyTypeScaleRules_0.max);
        local l_proportionScaleRules_0 = v14.props.proportionScaleRules;
        return math.clamp((1 - (v18 == 0 and 0.5 or (v16.X - 0.5 * v16.Y) / v18)) * (l_proportionScaleRules_0.max - l_proportionScaleRules_0.min) + l_proportionScaleRules_0.min, l_proportionScaleRules_0.min, l_proportionScaleRules_0.max), v18;
    end;
    v14.mapScalesToPosition = function(v20, v21)
        local l_bodyTypeScaleRules_1 = v14.props.bodyTypeScaleRules;
        local v23 = (v21 - l_bodyTypeScaleRules_1.min) / (l_bodyTypeScaleRules_1.max - l_bodyTypeScaleRules_1.min);
        local l_proportionScaleRules_1 = v14.props.proportionScaleRules;
        return Vector2.new((1 - (v20 - l_proportionScaleRules_1.min) / (l_proportionScaleRules_1.max - l_proportionScaleRules_1.min)) * v23 + 0.5 * (1 - v23), 1 - v23);
    end;
    v14.setScales = function(v25, v26)
        v14.props.setScales({
            proportion = v25,
            bodyType = v26
        });
    end;
    v14.getBackgroundAbsolutePosition = function()
        local v27 = l_forwardRef_0:getValue();
        if not v27 then
            return nil;
        else
            return v27.AbsolutePosition;
        end;
    end;
    v14.getBackgroundAbsoluteSize = function()
        local v28 = l_forwardRef_0:getValue();
        if not v28 then
            return nil;
        else
            return v28.AbsoluteSize;
        end;
    end;
end;
v13.render = function(v29)
    local l_proportion_0 = v29.props.proportion;
    local l_bodyType_0 = v29.props.bodyType;
    local l_proportionScaleRules_2 = v29.props.proportionScaleRules;
    local l_bodyTypeScaleRules_2 = v29.props.bodyTypeScaleRules;
    local l_LayoutOrder_0 = v29.props.LayoutOrder;
    local l_lockNavigationCallback_0 = v29.props.lockNavigationCallback;
    local l_unlockNavigationCallback_0 = v29.props.unlockNavigationCallback;
    local l_forwardRef_1 = v29.props.forwardRef;
    return l_withStyle_0(function(v38)
        local l_Theme_0 = v38.Theme;
        local v40 = v12.X / (v12.X / v12.Y);
        local l_isDisabled_0 = v29.props.isDisabled;
        return v4.createElement("ImageLabel", {
            AnchorPoint = Vector2.new(0.5, 0),
            Position = UDim2.new(0.5, 0, 0, 0),
            Image = "rbxasset://textures/AvatarEditorImages/Sliders/body-type-slider-background.png",
            LayoutOrder = l_LayoutOrder_0,
            Size = UDim2.new(0, v12.X, 0, v40),
            BackgroundTransparency = 1,
            ImageColor3 = l_Theme_0.BackgroundUIDefault.Color,
            ImageTransparency = if not l_isDisabled_0 then l_Theme_0.BackgroundUIDefault.Transparency else 0.5,
            [v4.Ref] = l_forwardRef_1
        }, {
            TwoAxisSlider = v4.createElement(v9, {
                mapPositionToScales = v29.mapPositionToScales,
                mapScalesToPosition = v29.mapScalesToPosition,
                setScales = v29.setScales,
                xScaleRules = l_proportionScaleRules_2,
                yScaleRules = l_bodyTypeScaleRules_2,
                xScale = l_proportion_0,
                yScale = l_bodyType_0,
                getBackgroundAbsolutePosition = v29.getBackgroundAbsolutePosition,
                getBackgroundAbsoluteSize = v29.getBackgroundAbsoluteSize,
                invertDPadX = true,
                isDisabled = l_isDisabled_0,
                onDragStart = l_lockNavigationCallback_0,
                onDragEnd = l_unlockNavigationCallback_0
            })
        });
    end);
end;
v13 = v5.connect(function(v42, _)
    local l_AvatarScales_0 = v42.AvatarExperience.AvatarEditor.Character.AvatarScales;
    local v45 = v42.AvatarExperience.AvatarEditor.AvatarSettings[v7.AvatarSettings.scalesRules];
    return {
        avatarType = v42.AvatarExperience.AvatarEditor.Character.AvatarType,
        bodyType = l_AvatarScales_0.bodyType,
        proportion = l_AvatarScales_0.proportion,
        bodyTypeScaleRules = v45.bodyType,
        proportionScaleRules = v45.proportion
    };
end, function(v46)
    return {
        setScales = function(v47)
            v46(v8(v47));
        end
    };
end)(v13);
return v4.forwardRef(function(v48, v49)
    return v4.createElement(v13, v3.Dictionary.join(v48, {
        forwardRef = v49
    }));
end);


local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(l_CorePackages_0.Roact);
local v2 = require(l_CorePackages_0.UIBlox);
local l_RoactFitComponents_0 = require(l_CorePackages_0.AvatarExperienceDeps).RoactFitComponents;
local l_FitFrameVertical_0 = l_RoactFitComponents_0.FitFrameVertical;
local v5 = require(l_CorePackages_0.Packages.RoactGamepad);
local v6 = require(l_CorePackages_0.Packages.t);
local l_withStyle_0 = v2.Style.withStyle;
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local v9 = v1.PureComponent:extend("EmptyPage");
local v10 = l_RoactFitComponents_0.Rect.quad(9, 0, 24, 0);
v9.validateProps = v6.strictInterface({
    page = v6.table,
    NextSelectionUp = v6.optional(v6.table),
    NextSelectionDown = v6.optional(v6.table)
});
v9.render = function(v11)
    local l_page_0 = v11.props.page;
    local v13 = l_page_0.EmptyString or l_page_0.Title;
    return l_withStyle_0(function(v14)
        return l_withLocalization_0({
            itemType = v13,
            noItemsLabel = "Feature.Avatar.Label.NoItems"
        })(function(v15)
            local v16 = v15.noItemsLabel:gsub("({itemType})", v15.itemType);
            local l_Theme_0 = v14.Theme;
            local l_Font_0 = v14.Font;
            local l_Font_1 = l_Font_0.Header2.Font;
            local v20 = l_Font_0.BaseSize * l_Font_0.Header2.RelativeSize;
            return v1.createElement(v5.Focusable[l_FitFrameVertical_0], {
                width = UDim.new(1, 0),
                contentPadding = UDim.new(0, 22),
                margin = v10,
                FillDirection = Enum.FillDirection.Vertical,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                BorderSizePixel = 0,
                BackgroundColor3 = l_Theme_0.BackgroundDefault.Color,
                BackgroundTransparency = l_Theme_0.BackgroundDefault.Transparency,
                NextSelectionUp = v11.props.NextSelectionUp,
                NextSelectionDown = v11.props.NextSelectionDown
            }, {
                NoItemsText = v1.createElement("TextLabel", {
                    Size = UDim2.new(1, 0, 0, v20),
                    BackgroundTransparency = 1,
                    Text = v16,
                    TextSize = v20,
                    TextColor3 = l_Theme_0.TextDefault.Color,
                    TextTransparency = l_Theme_0.TextDefault.TextTransparency,
                    TextXAlignment = Enum.TextXAlignment.Center,
                    LayoutOrder = 1,
                    Font = l_Font_1
                })
            });
        end);
    end);
end;
return v9;


local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(l_CorePackages_0.Cryo);
local v2 = require(l_CorePackages_0.Roact);
local v3 = require(l_CorePackages_0.Packages.RoactGamepad);
local l_useFocusController_0 = v3.useFocusController;
local l_SlotTray_0 = require(l_CorePackages_0.UIBlox).App.Control.Slot.SlotTray;
local l_useSelector_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.RoactRodux.useSelector;
local v7 = require(l_CorePackages_0.Packages.React);
local v8 = require(l_CorePackages_0.Workspace.Packages.ArgCheck);
local v9 = require(l_CorePackages_0.Packages.t);
local v10 = require(l_CorePackages_0.Workspace.Packages.UserLib);
local l_Constants_0 = v10.Utils.Constants;
local l_getRbxthumbWithTypeSizeAndOptions_0 = v10.Utils.getRbxthumbWithTypeSizeAndOptions;
local function v14(v13)
    return v13.AvatarExperience.AvatarEditor.EquippedEmotes.slotInfo;
end;
local function v16(v15)
    return v15.AvatarExperience.AvatarEditor.EquippedEmotes.selectedSlot;
end;
local v17 = v8.wrap(v9.strictInterface({
    slotsCount = v9.integer,
    lockNavigationCallback = v9.optional(v9.callback),
    unlockNavigationCallback = v9.optional(v9.callback),
    onActivated = v9.optional(v9.callback),
    LayoutOrder = v9.optional(v9.integer),
    NextSelectionUp = v9.optional(v9.table),
    NextSelectionDown = v9.optional(v9.table),
    itemsListRef = v9.table,
    forwardRef = v9.optional(v9.table),
    onFocusChanged = v9.optional(v9.callback),
    itemsListFocused = v9.optional(v9.boolean),
    darkenItemsGrid = v9.optional(v9.boolean)
}));
local function v18()
end;
local function v43(v19)
    assert(v17(v19));
    local v20 = l_useSelector_0(v14);
    local v21 = l_useSelector_0(v16);
    local v22 = l_useFocusController_0();
    local v23 = v7.useRef(nil);
    local v24, v25 = v7.useState(nil);
    local v27 = v7.useCallback(function(v26)
        v25((math.round(v26.AbsoluteSize.X)));
    end);
    local v28 = v19.lockNavigationCallback or v18;
    local v29 = v19.unlockNavigationCallback or v18;
    v7.useEffect(function()
        return function()
            if v23.current then
                v23.current = nil;
                v28();
            end;
        end;
    end, {
        v28
    });
    local v32 = v7.useCallback(function(_, v31)
        if v31.UserInputState == Enum.UserInputState.Begin then
            v23.current = v31;
            v28();
        end;
    end, {
        v28
    });
    local v35 = v7.useCallback(function(_, v34)
        if v34 == v23.current and v34.UserInputState == Enum.UserInputState.End then
            v23.current = nil;
            v29();
        end;
    end, {
        v29
    });
    local l_slotsCount_0 = v19.slotsCount;
    local v37 = {};
    local v38 = v19.itemsListFocused or v19.darkenItemsGrid;
    for v39 = 1, l_slotsCount_0 do
        local v40 = not not v20[v39] and v20[v39].assetId or nil;
        local v41 = v21 == v39;
        local v42 = nil;
        if v40 then
            v42 = l_getRbxthumbWithTypeSizeAndOptions_0(v40, l_Constants_0.RbxthumbTypes.Asset, 150);
        end;
        v37[v39] = {
            thumbnail = v42,
            displayText = if not v42 then tostring(v39) else nil,
            isDisabled = v38 and not v41
        };
    end;
    return v2.createElement("Frame", {
        BackgroundTransparency = 1,
        Size = UDim2.new(1, 0, 0, 72),
        [v2.Change.AbsoluteSize] = v27
    }, {
        SlotTray = v2.createElement(l_SlotTray_0, {
            defaultSelectedSlotIndex = v21,
            width = v24,
            inputBindings = {
                SelectSlot = v3.Input.onBegin(Enum.KeyCode.ButtonA, function()
                    v22.moveFocusTo(v19.itemsListRef);
                end, {
                    key = "Feature.Avatar.Action.SelectSlot"
                }),
                MoveToNav = v3.Input.onBegin(Enum.KeyCode.ButtonB, function()
                    v22.moveFocusUp();
                end)
            },
            slots = v37,
            onChange = v19.onActivated,
            onInputBegan = v32,
            onInputEnded = v35,
            darken = v38,
            onFocusChanged = v19.onFocusChanged,
            NextSelectionUp = v19.NextSelectionUp,
            NextSelectionDown = v19.NextSelectionDown,
            scrollingFrameRef = v19.forwardRef
        })
    });
end;
return v2.forwardRef(function(v44, v45)
    return v2.createElement(v43, v1.Dictionary.join(v44, {
        forwardRef = v45
    }));
end);


local l_CoreGui_0 = game:GetService("CoreGui");
local l_GuiService_0 = game:GetService("GuiService");
local l_CorePackages_0 = game:GetService("CorePackages");
local v3 = nil;
pcall(function()
    v3 = game:GetService("PlatformService");
end);
local v4 = require(l_CorePackages_0.Roact);
local v5 = require(l_CorePackages_0.RoactRodux);
local l_ExternalEventConnection_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).ExternalEventConnection;
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v8 = require(l_Modules_0.LuaApp.Services.RoactAnalytics);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v10 = require(l_Modules_0.LuaApp.Services.RoactNetworking);
local v11 = nil;
local v12 = nil;
if l_GuiService_0:IsTenFootInterface() then
    v11 = require(l_Modules_0.Shell.Utility);
    v12 = require(l_Modules_0.Shell.UserData);
end;
local v13 = require(l_Modules_0.AvatarExperience.AvatarEditor.Thunks.GrantAsset);
local v14 = require(l_Modules_0.LuaApp.Actions.SetUserRobux);
local v15 = v4.PureComponent:extend("AXPlatformServiceListener");
v15.init = function(v16)
    v16.consumePurchasedCallback = function(v17, v18)
        local l_networking_0 = v16.props.networking;
        local l_analytics_0 = v16.props.analytics;
        local l_grantAsset_0 = v16.props.grantAsset;
        local l_setUserRobux_0 = v16.props.setUserRobux;
        if v17 == 3 then
            for _, v24 in v18, nil, nil do
                if v24 and v24.Type == "Asset" then
                    l_grantAsset_0(v24.AssetTypeId, v24.AssetId, l_networking_0, l_analytics_0);
                end;
            end;
            if l_GuiService_0:IsTenFootInterface() then
                local l_localUserId_0 = v16.props.localUserId;
                if typeof(l_localUserId_0) == "string" and l_localUserId_0 ~= "" then
                    local l_robux_0 = v16.props.robux;
                    v11.ExponentialRepeat(function()
                        return v16.isMounted;
                    end, function()
                        local v27 = v12.GetTotalUserBalanceAsync();
                        if (not (not v27 or not v16.isMounted) and v27 ~= l_robux_0) and v27 ~= nil then
                            l_setUserRobux_0(l_localUserId_0, v27);
                            return true;
                        else
                            return false;
                        end;
                    end);
                end;
            end;
        end;
    end;
end;
v15.didMount = function(v28)
    v28.isMounted = true;
end;
v15.willUnmount = function(v29)
    v29.isMounted = false;
end;
v15.render = function(v30)
    if v3 then
        return v4.createElement(l_ExternalEventConnection_0, {
            event = v3.ConsumePurchased,
            callback = v30.consumePurchasedCallback
        });
    else
        return nil;
    end;
end;
return v5.connect(function(v31)
    return {
        localUserId = v31.LocalUserId,
        robux = v31.UserRobux[v31.LocalUserId]
    };
end, function(v32)
    return {
        setUserRobux = function(v33, v34)
            return v32(v14(v33, v34));
        end,
        grantAsset = function(v35, v36, v37, v38)
            return v32(v13(v35, v36, v37, v38));
        end
    };
end)((l_RoactServices_0.connect({
    networking = v10,
    analytics = v8
})(v15)));


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Roact);
local v4 = require(l_CorePackages_0.RoactRodux);
local v5 = require(l_Modules_0.LuaApp.Services.RoactAnalytics);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v7 = require(l_Modules_0.LuaApp.Services.RoactNetworking);
local v8 = require(l_Modules_0.AvatarExperience.AvatarEditor.Actions.SetConnectionState);
local v9 = require(l_Modules_0.AvatarExperience.AvatarEditor.Actions.RevokeOutfit);
local v10 = require(l_Modules_0.AvatarExperience.AvatarEditor.Thunks.GrantAsset);
local v11 = require(l_Modules_0.AvatarExperience.AvatarEditor.Thunks.RevokeAsset);
local v12 = require(l_Modules_0.AvatarExperience.AvatarEditor.Thunks.GrantOutfit);
local v13 = require(l_Modules_0.AvatarExperience.AvatarEditor.Thunks.UpdateOutfit);
local v14 = v3.PureComponent:extend("EventReceiver");
v14.init = function(v15)
    local l_RobloxEventReceiver_0 = v15.props.RobloxEventReceiver;
    local l_networking_0 = v15.props.networking;
    local l_analytics_0 = v15.props.analytics;
    local l_grantAsset_0 = v15.props.grantAsset;
    local l_revokeAsset_0 = v15.props.revokeAsset;
    local l_grantOutfit_0 = v15.props.grantOutfit;
    local l_revokeCostume_0 = v15.props.revokeCostume;
    local l_updateOutfit_0 = v15.props.updateOutfit;
    local l_setConnectionState_0 = v15.props.setConnectionState;
    v15.tokens = {
        l_RobloxEventReceiver_0:observeEvent("AvatarAssetOwnershipNotifications", function(v25)
            if v25.Type == "Grant" then
                l_grantAsset_0(tostring(v25.AssetTypeId), tostring(v25.AssetId), l_networking_0, l_analytics_0, v15.props.opaquePage);
                return ;
            else
                if v25.Type == "Revoke" then
                    l_revokeAsset_0(v25.AssetTypeId, v25.AssetId);
                end;
                return ;
            end;
        end),
        l_RobloxEventReceiver_0:observeEvent("signalR", function(v26)
            l_setConnectionState_0(v26);
        end),
        l_RobloxEventReceiver_0:observeEvent("AvatarOutfitOwnershipNotifications", function(v27)
            if v27.Type == "Grant" then
                l_grantOutfit_0(l_networking_0, v27.UserOutfitId, v15.props.opaquePage);
                return ;
            elseif v27.Type == "Revoke" then
                l_revokeCostume_0(v27.UserOutfitId);
                return ;
            else
                if v27.Type == "Update" then
                    l_updateOutfit_0(l_networking_0, v27.UserOutfitId);
                end;
                return ;
            end;
        end)
    };
end;
v14.render = function(_)
end;
v14.willUnmount = function(v29)
    for _, v31 in v29.tokens, nil, nil do
        v31:disconnect();
    end;
end;
return v4.connect(function(v32)
    local l_opaque_0 = v32.AvatarExperience.AvatarScene.AvatarRoute.opaque;
    return {
        opaquePage = not not l_opaque_0 and l_opaque_0.name or nil
    };
end, function(v34)
    return {
        grantAsset = function(v35, v36, v37, v38, v39)
            return v34(v10(v35, v36, v37, v38, v39));
        end,
        revokeAsset = function(v40, v41)
            return v34(v11(v40, v41));
        end,
        setConnectionState = function(v42)
            return v34(v8(v42));
        end,
        grantOutfit = function(v43, v44, v45)
            return v34(v12(v43, tostring(v44), v45));
        end,
        revokeCostume = function(v46)
            return v34(v9(v46));
        end,
        updateOutfit = function(v47, v48)
            return v34(v13(v47, (tostring(v48))));
        end
    };
end)((l_RoactServices_0.connect({
    networking = v7,
    analytics = v5
})(v14)));


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Cryo);
local v3 = require(l_CorePackages_0.Roact);
local v4 = require(l_CorePackages_0.RoactRodux);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v6 = require(l_CorePackages_0.UIBlox);
local v7 = require(l_Modules_0.AvatarExperience.AvatarEditor.Services.Analytics);
local v8 = require(l_Modules_0.AvatarExperience.AvatarEditor.Constants);
local v9 = require(l_Modules_0.AvatarExperience.AvatarEditor.Actions.SetAvatarScales);
local v10 = require(l_Modules_0.AvatarExperience.AvatarEditor.Thunks.SendAnalytics);
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local v12 = require(l_Modules_0.LuaApp.Actions.SetCurrentToastMessage);
local l_SystemSlider_0 = v6.App.Slider.SystemSlider;
local v14 = v3.PureComponent:extend("HeadSlider");
v14.init = function(v15)
    v15.moveListen = nil;
    v15.endListen = nil;
    v15.scaleRef = v3.createRef();
end;
v14.render = function(v16)
    local l_avatarType_0 = v16.props.avatarType;
    local l_head_0 = v16.props.head;
    local l_headScaleRules_0 = v16.props.headScaleRules;
    return v3.createElement(l_SystemSlider_0, {
        layoutOrder = v16.props.LayoutOrder,
        min = l_headScaleRules_0.min,
        max = l_headScaleRules_0.max,
        stepInterval = l_headScaleRules_0.increment,
        value = l_head_0,
        onValueChanged = function(v20)
            v16.props.setScales({
                head = v20
            });
        end,
        onDragStart = v16.props.lockNavigationCallback,
        onDragEnd = v16.props.unlockNavigationCallback,
        isDisabled = l_avatarType_0 == v8.AvatarType.R6,
        NextSelectionUp = v16.props.NextSelectionUp,
        NextSelectionDown = v16.props.NextSelectionDown,
        [v3.Ref] = v16.props.forwardRef
    });
end;
v14 = v4.connect(function(v21, _)
    return {
        avatarType = v21.AvatarExperience.AvatarEditor.Character.AvatarType,
        head = v21.AvatarExperience.AvatarEditor.Character.AvatarScales.head,
        headScaleRules = v21.AvatarExperience.AvatarEditor.AvatarSettings[v8.AvatarSettings.scalesRules].head
    };
end, function(v23)
    return {
        setScales = function(v24)
            v23(v9(v24));
        end,
        sendAnalytics = function(v25, v26)
            v23(v10(v25, v26));
        end,
        setCurrentToastMessage = function(v27)
            v23(v12(v27));
        end
    };
end)((l_RoactServices_0.connect({
    analytics = v7
})(v14)));
return v3.forwardRef(function(v28, v29)
    return v3.createElement(v14, v2.Dictionary.join(v28, {
        forwardRef = v29
    }));
end);


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Packages.t);
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local v4 = require(l_CorePackages_0.Roact);
local v5 = require(l_CorePackages_0.RoactRodux);
local v6 = require(l_CorePackages_0.Packages.RoactGamepad);
local l_Focusable_0 = v6.Focusable;
local v8 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local v9 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.withMappedNavigationParams);
local v10 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.NavigationUtils);
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local v12 = require(l_Modules_0.AvatarExperience.AvatarEditor.Selectors.GetDuplicateOutfit);
local v13 = require(l_Modules_0.AvatarExperience.Common.Components.withOverlayFocusHandling);
local v14 = require(l_Modules_0.AvatarExperience.Common.Components.NavOverlayContainer);
local v15 = require(l_CorePackages_0.UIBlox);
local l_ContextualMenu_0 = v15.App.Menu.ContextualMenu;
local l_MenuDirection_0 = v15.App.Menu.MenuDirection;
local v18 = v4.PureComponent:extend("CreateOrUpdateOutfitMenu");
v18.validateProps = v2.strictInterface({
    screenSize = v2.Vector2,
    duplicateOutfitId = v2.optional(v2.string),
    navigation = v2.table,
    focusController = v2.optional(v2.table),
    onOverlayClosed = v2.optional(v2.callback),
    saveTilePosition = v2.Vector2,
    defaultChildRef = v2.optional(v2.table)
});
v18.init = function(v19)
    v19.saveOutfitAsNew = function()
        if not v19.props.duplicateOutfitId then
            v10.navigateToNextOverlay(v19.props.navigation, v8.SaveOutfitPrompt);
            return ;
        else
            v10.navigateToNextOverlay(v19.props.navigation, v8.DuplicateOutfitInfoPrompt, {
                duplicateOutfitId = v19.props.duplicateOutfitId,
                saveAsNew = true
            });
            return ;
        end;
    end;
    v19.updateExistingOutfit = function()
        if not v19.props.duplicateOutfitId then
            v10.navigateFromOverlay(v19.props.navigation, v8.UpdateOutfitPage);
            return ;
        else
            v10.navigateToNextOverlay(v19.props.navigation, v8.DuplicateOutfitInfoPrompt, {
                duplicateOutfitId = v19.props.duplicateOutfitId,
                saveAsNew = false
            });
            return ;
        end;
    end;
    v19.closePrompt = function()
        v10.closeOverlay(v19.props.navigation);
    end;
    v19:setState({
        useFullWidth = false
    });
    v19.onNavOverlaySizeChanged = function(v20)
        if v20.AbsoluteSize.X < 640 then
            if not v19.state.useFullWidth then
                v19:setState({
                    useFullWidth = true
                });
                return ;
            end;
        elseif v19.state.useFullWidth then
            v19:setState({
                useFullWidth = false
            });
        end;
    end;
    local v21, v22 = v4.createBinding(UDim2.fromOffset(0, 0));
    v19.positionOffset = v21;
    v19.updatePositionOffset = v22;
    v19.onNavOverlayPositionChanged = function(v23)
        v19.updatePositionOffset(UDim2.fromOffset(-v23.AbsolutePosition.X, -v23.AbsolutePosition.Y));
    end;
end;
v18.renderLocalized = function(v24, v25)
    local v26 = {};
    table.insert(v26, {
        text = v25.saveAsNew,
        inputBindingKey = "CommonUI.Controls.Action.Confirm",
        onActivated = v24.saveOutfitAsNew
    });
    table.insert(v26, {
        text = v25.updateExistingCharacter,
        inputBindingKey = "CommonUI.Controls.Action.Confirm",
        onActivated = v24.updateExistingOutfit
    });
    local v27 = v24.props.saveTilePosition.Y + 25;
    local l_Down_0 = l_MenuDirection_0.Down;
    if v24.props.screenSize.Y < (v27 + 112) + 12 then
        v27 = v24.props.saveTilePosition.Y - 25;
        l_Down_0 = l_MenuDirection_0.Up;
    end;
    local v29 = UDim2.fromOffset(v24.props.saveTilePosition.X - 42, 0);
    local v30 = UDim2.new(0, 324, 1, 0);
    if v24.state.useFullWidth then
        v29 = UDim2.fromOffset(0, 0);
        v30 = UDim2.fromScale(1, 1);
    end;
    return v4.createElement(v14, {
        onAbsoluteSizeChanged = v24.onNavOverlaySizeChanged,
        onAbsolutePositionChanged = v24.onNavOverlayPositionChanged
    }, {
        SizeFrame = v4.createElement(l_Focusable_0.Frame, {
            BackgroundTransparency = 1,
            Position = v29,
            Size = v30,
            [v4.Ref] = v24.props.defaultChildRef,
            inputBindings = {
                NavigateBack = v6.Input.onBegin(Enum.KeyCode.ButtonB, v24.closePrompt)
            }
        }, {
            PositionOffsetFrame = v4.createElement("Frame", {
                BackgroundTransparency = 1,
                Position = not v24.state.useFullWidth and v24.positionOffset or nil,
                Size = UDim2.fromScale(1, 1)
            }, {
                ContextMenu = v4.createElement(l_ContextualMenu_0, {
                    buttonProps = v26,
                    open = true,
                    menuDirection = l_Down_0,
                    openPositionY = UDim.new(0, v27),
                    closeBackgroundVisible = true,
                    screenSize = v24.props.screenSize,
                    onDismiss = v24.closePrompt
                })
            })
        })
    });
end;
v18.render = function(v31)
    return l_withLocalization_0({
        saveAsNew = "Feature.Avatar.Action.SaveAsNew",
        updateExistingCharacter = "Feature.Avatar.Action.UpdateExistingCharacter"
    })(function(v32)
        return v31:renderLocalized(v32);
    end);
end;
return (v9((v13((v5.connect(function(v33, _)
    return {
        duplicateOutfitId = v12(v33),
        screenSize = v33.ScreenSize
    };
end, nil)(v18))))));


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Roact);
local v3 = require(l_CorePackages_0.RoactRodux);
local v4 = require(l_CorePackages_0.Packages.RoactGamepad);
local v5 = require(l_CorePackages_0.Packages.t);
local v6 = require(l_CorePackages_0.Promise);
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local v8 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.NavigationUtils);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local l_memoize_0 = require(l_CorePackages_0.Workspace.Packages.AppCommonLib).memoize;
local v12 = require(l_CorePackages_0.UIBlox);
local l_InteractiveAlert_0 = v12.App.Dialog.Alert.InteractiveAlert;
local l_ButtonType_0 = v12.App.Button.Enum.ButtonType;
local l_Focusable_0 = v4.Focusable;
local v16 = require(l_Modules_0.AvatarExperience.Common.Components.withOverlayFocusHandling);
local v17 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.withMappedNavigationParams);
local v18 = require(l_Modules_0.AvatarExperience.AvatarEditor.Services.Analytics);
local v19 = require(l_Modules_0.AvatarExperience.AvatarEditor.Thunks.DeleteOutfit);
local v20 = require(l_Modules_0.AvatarExperience.AvatarEditor.Components.AssetManagement.ItemsBulletList);
local v21 = v2.PureComponent:extend("DeleteOutfitPrompt");
v21.validateProps = v5.strictInterface({
    outfitIds = v5.array(v5.string),
    onOverlayClosed = v5.optional(v5.callback),
    defaultChildRef = v5.optional(v5.table),
    focusController = v5.optional(v5.table),
    avatarEditorAnalytics = v5.table,
    navigation = v5.table,
    outfitInfos = v5.table,
    screenSize = v5.Vector2,
    deleteOutfit = v5.callback
});
local v27 = l_memoize_0(function(v22, v23)
    local v24 = {};
    for _, v26 in v22, nil, nil do
        if v23[v26] then
            table.insert(v24, v23[v26].name);
        end;
    end;
    return v24;
end);
v21.init = function(v28)
    v28.mounted = false;
    v28:setState({
        maxContentSize = 10000,
        itemListScrollable = false,
        isDeleting = false
    });
    v28.middleContentRef = v2.createRef();
    v28.closePrompt = function()
        v8.closeOverlay(v28.props.navigation);
    end;
    v28.deleteOutfits = function()
        local v29 = {};
        local v30 = #v28.props.outfitIds > 1;
        for v31, v32 in v28.props.outfitIds, nil, nil do
            v29[v31] = v28.props.deleteOutfit(v32);
            v28.props.avatarEditorAnalytics.outfitDeleted(v32, v30);
        end;
        v28:setState({
            isDeleting = true
        });
        v6.all(v29):andThen(function()
            if v28.mounted then
                v28.closePrompt();
            end;
        end):catch(function(_)
            v28:setState({
                isDeleting = false
            });
        end);
    end;
    v28.itemListScrollableUpdated = function(v34)
        if v28.state.itemListScrollable ~= v34 then
            v28:setState({
                itemListScrollable = v34
            });
        end;
    end;
    v28.renderAlertMiddleContent = function()
        return v2.createElement(v20, {
            items = v27(v28.props.outfitIds, v28.props.outfitInfos),
            maxHeight = v28.state.maxContentSize,
            onScrollableUpdated = v28.itemListScrollableUpdated,
            [v2.Ref] = v28.middleContentRef
        });
    end;
    v28.onAbsoluteSizeChanged = function(v35)
        local v36 = v28.middleContentRef:getValue();
        if v36 then
            local v37 = (v28.props.screenSize.Y - 60) - (v35.AbsoluteSize.Y - v36.AbsoluteSize.Y);
            if v28.state.maxContentSize ~= v37 then
                v28:setState({
                    maxContentSize = v37
                });
            end;
            return ;
        else
            return ;
        end;
    end;
end;
v21.renderLocalized = function(v38, v39)
    local l_deleteSingleCharacter_0 = v39.deleteSingleCharacter;
    local l_singleNoLongerAvailable_0 = v39.singleNoLongerAvailable;
    local v42 = nil;
    local v43 = nil;
    local v44 = nil;
    if #v38.props.outfitIds > 1 then
        l_deleteSingleCharacter_0 = v39.deleteAssets;
        l_singleNoLongerAvailable_0 = v39.multiNoLongerAvailable;
        v42 = v38.renderAlertMiddleContent;
        v43 = v38.state.itemListScrollable;
        v44 = v38.onAbsoluteSizeChanged;
    end;
    return v2.createElement(l_Focusable_0.Frame, {
        Size = UDim2.fromScale(1, 1),
        BackgroundTransparency = 1,
        inputBindings = {
            NavigateBack = v4.Input.onBegin(Enum.KeyCode.ButtonB, v38.closePrompt),
            Confirm = v4.Input.onBegin(Enum.KeyCode.ButtonA, function()
            end, {
                key = "CommonUI.Controls.Action.Confirm"
            })
        }
    }, {
        Alert = v2.createElement(l_InteractiveAlert_0, {
            title = l_deleteSingleCharacter_0,
            bodyText = l_singleNoLongerAvailable_0,
            buttonStackInfo = {
                buttons = {
                    {
                        props = {
                            onActivated = v38.closePrompt,
                            text = v39.cancelButtonText
                        },
                        isDefaultChild = true
                    },
                    {
                        buttonType = l_ButtonType_0.PrimarySystem,
                        props = {
                            isLoading = v38.state.isDeleting,
                            onActivated = v38.deleteOutfits,
                            text = v39.confirmButtonText
                        }
                    }
                }
            },
            position = UDim2.fromScale(0.5, 0.5),
            screenSize = v38.props.screenSize,
            defaultChildRef = v38.props.defaultChildRef,
            middleContent = v42,
            isMiddleContentFocusable = v43,
            onAbsoluteSizeChanged = v44
        })
    });
end;
v21.render = function(v45)
    return l_withLocalization_0({
        deleteSingleCharacter = "Feature.Avatar.Heading.DeleteCharacter",
        singleNoLongerAvailable = "Feature.Avatar.Label.NoLongerAvailableInCollection",
        deleteAssets = "Feature.Avatar.Heading.DeleteAssets",
        multiNoLongerAvailable = "Feature.Avatar.Label.MultiNoLongerAvailableInCollection",
        confirmButtonText = "Feature.Avatar.Action.Delete",
        cancelButtonText = "Feature.Avatar.Action.Cancel"
    })(function(v46)
        return v45:renderLocalized(v46);
    end);
end;
v21.didMount = function(v47)
    v47.mounted = true;
end;
v21.willUnmount = function(v48)
    v48.mounted = false;
end;
return (v17((v16((l_RoactServices_0.connect({
    avatarEditorAnalytics = v18
})((v3.connect(function(v49, _)
    return {
        outfitInfos = v49.AvatarExperience.AvatarEditor.OutfitInfos,
        screenSize = v49.ScreenSize
    };
end, function(v51)
    return {
        deleteOutfit = function(v52)
            v51(v19(v52));
        end
    };
end)(v21))))))));


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Roact);
local v3 = require(l_CorePackages_0.RoactRodux);
local v4 = require(l_CorePackages_0.Packages.t);
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local v6 = require(l_CorePackages_0.UIBlox);
local v7 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local v8 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.NavigationUtils);
local _ = require(l_Modules_0.AvatarExperience.Common.Types);
local l_RoactAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).RoactAppPolicy;
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local v12 = require(l_Modules_0.AvatarExperience.Common.Components.withOverlayFocusHandling);
local v13 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.withMappedNavigationParams);
local l_InteractiveAlert_0 = v6.App.Dialog.Alert.InteractiveAlert;
local l_ButtonType_0 = v6.App.Button.Enum.ButtonType;
local v16 = v2.PureComponent:extend("DuplicateOutfitInfoPrompt");
v16.validateProps = v4.strictInterface({
    saveAsNew = v4.boolean,
    duplicateOutfitId = v4.string,
    onOverlayClosed = v4.optional(v4.callback),
    defaultChildRef = v4.optional(v4.table),
    focusController = v4.optional(v4.table),
    showCustomOutfitNames = v4.boolean,
    navigation = v4.table,
    screenSize = v4.Vector2,
    duplicateOutfitName = v4.optional(v4.string)
});
v16.init = function(v17)
    v17.saveOutfit = function()
        v8.navigateToNextOverlay(v17.props.navigation, v7.SaveOutfitPrompt);
    end;
    v17.updateExisting = function()
        v8.navigateFromOverlay(v17.props.navigation, v7.UpdateOutfitPage);
    end;
    v17.closePrompt = function()
        v8.closeOverlay(v17.props.navigation);
    end;
end;
v16.renderLocalized = function(v18, v19)
    local v20 = nil;
    v20 = if not not v18.props.duplicateOutfitName and v18.props.showCustomOutfitNames then v19.savedSimilarCharacter .. "\n" .. v18.props.duplicateOutfitName else v19.savedSimilarCharacterNoName;
    local v21 = nil;
    local v22 = nil;
    if not v18.props.saveAsNew then
        v21 = v19.updateExistingConfirmText;
        v22 = v18.updateExisting;
    else
        v21 = v19.saveAsNewConfirmText;
        v22 = v18.saveOutfit;
    end;
    return v2.createElement(l_InteractiveAlert_0, {
        title = v19.titleText,
        bodyText = v20,
        buttonStackInfo = {
            buttons = {
                {
                    props = {
                        onActivated = v18.closePrompt,
                        text = v19.cancelButtonText
                    },
                    isDefaultChild = true
                },
                {
                    buttonType = l_ButtonType_0.PrimarySystem,
                    props = {
                        onActivated = v22,
                        text = v21
                    }
                }
            }
        },
        position = UDim2.fromScale(0.5, 0.5),
        screenSize = v18.props.screenSize,
        defaultChildRef = v18.props.defaultChildRef
    });
end;
v16.render = function(v23)
    return l_withLocalization_0({
        titleText = "Feature.Avatar.Heading.DuplicateCharacter",
        savedSimilarCharacter = "Feature.Avatar.Label.SavedSimilarCharacter",
        savedSimilarCharacterNoName = "Feature.Avatar.Label.SavedSimilarCharacterNoName",
        saveAsNewConfirmText = "Feature.Avatar.Action.Save",
        updateExistingConfirmText = "Feature.Avatar.Action.GotIt",
        cancelButtonText = "Feature.Avatar.Action.Cancel"
    })(function(v24)
        return v23:renderLocalized(v24);
    end);
end;
return (v13((v12((l_RoactAppPolicy_0.connect(function(v25, _)
    return {
        showCustomOutfitNames = v25.getCustomOutfitNames()
    };
end)((v3.connect(function(v27, v28)
    local l_OutfitInfos_0 = v27.AvatarExperience.AvatarEditor.OutfitInfos;
    local v30 = nil;
    if l_OutfitInfos_0[v28.duplicateOutfitId] then
        v30 = l_OutfitInfos_0[v28.duplicateOutfitId].name;
    end;
    return {
        screenSize = v27.ScreenSize,
        duplicateOutfitName = v30
    };
end, nil)(v16))))))));


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Roact);
local v3 = require(l_CorePackages_0.RoactRodux);
local v4 = require(l_CorePackages_0.Packages.RoactGamepad);
local v5 = require(l_CorePackages_0.Packages.t);
local l_PerformFetch_0 = require(l_CorePackages_0.Workspace.Packages.Http).PerformFetch;
local l_RetrievalStatus_0 = require(l_CorePackages_0.Workspace.Packages.Http).Enum.RetrievalStatus;
local v8 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.NavigationUtils);
local _ = require(l_Modules_0.AvatarExperience.Common.Types);
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local v12 = require(l_CorePackages_0.UIBlox);
local l_InteractiveAlert_0 = v12.App.Dialog.Alert.InteractiveAlert;
local l_ButtonType_0 = v12.App.Button.Enum.ButtonType;
local l_Focusable_0 = v4.Focusable;
local v16 = require(l_Modules_0.AvatarExperience.Common.Components.withOverlayFocusHandling);
local v17 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.withMappedNavigationParams);
local v18 = require(l_Modules_0.AvatarExperience.Common.Utils);
local v19 = v2.PureComponent:extend("DuplicateOutfitNamePrompt");
v19.validateProps = v5.strictInterface({
    outfitName = v5.string,
    sourcePrompt = v5.string,
    sourceParams = v5.table,
    saveCallback = v5.callback,
    saveFetchingStateKey = v5.string,
    onOverlayClosed = v5.optional(v5.callback),
    defaultChildRef = v5.optional(v5.table),
    focusController = v5.optional(v5.table),
    navigation = v5.table,
    screenSize = v5.Vector2,
    fetchingState = v5.string
});
v19.init = function(v20)
    v20.goBack = function()
        v8.navigateToNextOverlay(v20.props.navigation, v20.props.sourcePrompt, v20.props.sourceParams);
    end;
end;
v19.willUpdate = function(v21, v22, _)
    if v18.isFetchingDoneOrFailed(v21.props.fetchingState, v22.fetchingState) then
        v8.closeOverlay(v21.props.navigation);
    end;
end;
v19.renderLocalized = function(v24, v25)
    return v2.createElement(l_Focusable_0.Frame, {
        Size = UDim2.fromScale(1, 1),
        BackgroundTransparency = 1,
        inputBindings = {
            NavigateBack = v4.Input.onBegin(Enum.KeyCode.ButtonB, v24.goBack),
            Confirm = v4.Input.onBegin(Enum.KeyCode.ButtonA, function()
            end, {
                key = "CommonUI.Controls.Action.Confirm"
            })
        }
    }, {
        Alert = v2.createElement(l_InteractiveAlert_0, {
            title = v25.titleText,
            bodyText = v25.messageText,
            buttonStackInfo = {
                buttons = {
                    {
                        props = {
                            onActivated = v24.goBack,
                            text = v25.cancelButtonText
                        },
                        isDefaultChild = true
                    },
                    {
                        buttonType = l_ButtonType_0.PrimarySystem,
                        props = {
                            isLoading = v24.props.fetchingState == l_RetrievalStatus_0.Fetching,
                            onActivated = v24.props.saveCallback,
                            text = v25.confirmButtonText
                        }
                    }
                }
            },
            position = UDim2.fromScale(0.5, 0.5),
            screenSize = v24.props.screenSize,
            defaultChildRef = v24.props.defaultChildRef
        })
    });
end;
v19.render = function(v26)
    return l_withLocalization_0({
        titleText = "Feature.Avatar.Heading.UsedName",
        messageText = "Feature.Avatar.Label.UsedNameLong",
        confirmButtonText = "Feature.Avatar.Action.Save",
        cancelButtonText = "Feature.Avatar.Label.Back"
    })(function(v27)
        return v26:renderLocalized(v27);
    end);
end;
return (v17((v16((v3.connect(function(v28, v29)
    return {
        screenSize = v28.ScreenSize,
        fetchingState = l_PerformFetch_0.GetStatus(v28, v29.saveFetchingStateKey)
    };
end, nil)(v19))))));


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Roact);
local v4 = require(l_CorePackages_0.RoactRodux);
local v5 = require(l_CorePackages_0.UIBlox);
local v6 = require(l_CorePackages_0.Packages.t);
local l_InteractiveAlert_0 = v5.App.Dialog.Alert.InteractiveAlert;
local l_ButtonType_0 = v5.App.Button.Enum.ButtonType;
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v10 = require(l_Modules_0.AvatarExperience.AvatarEditor.Services.Analytics);
local _ = require(l_Modules_0.AvatarExperience.Common.Types);
local v12 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.withMappedNavigationParams);
local v13 = require(l_Modules_0.AvatarExperience.Common.Components.withOverlayFocusHandling);
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local v15 = require(l_Modules_0.AvatarExperience.AvatarEditor.Thunks.EquipOutfit);
local v16 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.NavigationUtils);
local v17 = v3.PureComponent:extend("EquipOutfitConfirmation");
local v18 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagFixAvatarCostumeChange);
v17.validateProps = v6.strictInterface({
    outfitInfo = v6.table,
    onOverlayClosed = v6.optional(v6.callback),
    screenSize = v6.Vector2,
    equipOutfit = v6.callback,
    defaultChildRef = v6.optional(v6.table),
    focusController = v6.optional(v6.table),
    analytics = v6.optional(v6.table),
    navigation = v6.table
});
v17.init = function(v19)
    v19.equipCostume = function()
        local l_outfitInfo_0 = v19.props.outfitInfo;
        local l_analytics_0 = v19.props.analytics;
        local l_navigation_0 = v19.props.navigation;
        if not v18() then
            v19.props.equipOutfit(l_outfitInfo_0, l_analytics_0, l_navigation_0, nil);
            v19.closePrompt();
            return ;
        else
            v19.closePrompt();
            v19.props.equipOutfit(l_outfitInfo_0, l_analytics_0, l_navigation_0, nil);
            return ;
        end;
    end;
    v19.closePrompt = function()
        v16.closeOverlay(v19.props.navigation);
    end;
end;
v17.renderLocalized = function(v23, v24)
    return v3.createElement(l_InteractiveAlert_0, {
        title = v24.titleText,
        bodyText = v24.messageText,
        buttonStackInfo = {
            buttons = {
                {
                    props = {
                        onActivated = v23.closePrompt,
                        text = v24.cancelButtonText
                    },
                    isDefaultChild = true
                },
                {
                    buttonType = l_ButtonType_0.PrimarySystem,
                    props = {
                        onActivated = v23.equipCostume,
                        text = v24.confirmButtonText
                    }
                }
            }
        },
        screenSize = v23.props.screenSize,
        defaultChildRef = v23.props.defaultChildRef
    });
end;
v17.render = function(v25)
    return l_withLocalization_0({
        titleText = "Feature.Avatar.Action.Switch",
        messageText = "Feature.Avatar.Message.EquipCostumeConfirmation",
        confirmButtonText = "Feature.Avatar.Action.Switch",
        cancelButtonText = "Feature.Catalog.Action.Cancel"
    })(function(v26)
        return v25:renderLocalized(v26);
    end);
end;
return (l_RoactServices_0.connect({
    analytics = v10
})((v12((v13((v4.connect(function(v27, _)
    return {
        screenSize = v27.ScreenSize
    };
end, function(v29)
    return {
        equipOutfit = function(v30, v31, v32, v33)
            v29(v15({
                outfitInfo = v30,
                analytics = v31,
                navigation = v32,
                isSelected = v33
            }));
        end
    };
end)(v17))))))));


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Roact);
local v3 = require(l_CorePackages_0.RoactRodux);
local v4 = require(l_CorePackages_0.Packages.t);
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local v6 = require(l_CorePackages_0.UIBlox);
local v7 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.NavigationUtils);
local _ = require(l_Modules_0.AvatarExperience.Common.Types);
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local v10 = require(l_Modules_0.AvatarExperience.Common.Components.withOverlayFocusHandling);
local v11 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.withMappedNavigationParams);
local v12 = require(l_Modules_0.AvatarExperience.AvatarEditor.Actions.SetAvatarType);
local v13 = require(l_Modules_0.AvatarExperience.AvatarEditor.Thunks.RemoveLayeredClothing);
local v14 = require(l_Modules_0.AvatarExperience.Common.Constants);
local l_InteractiveAlert_0 = v6.App.Dialog.Alert.InteractiveAlert;
local l_ButtonType_0 = v6.App.Button.Enum.ButtonType;
local v17 = v2.PureComponent:extend("LayeredClothingR6SwitchPrompt");
v17.validateProps = v4.strictInterface({
    onOverlayClosed = v4.optional(v4.callback),
    defaultChildRef = v4.optional(v4.table),
    focusController = v4.optional(v4.table),
    navigation = v4.table,
    screenSize = v4.Vector2,
    setAvatarType = v4.callback,
    removeLayeredClothing = v4.callback
});
v17.init = function(v18)
    v18.switchToR6 = function()
        v18.props.removeLayeredClothing();
        v18.props.setAvatarType(v14.AvatarType.R6);
        v18.closePrompt();
    end;
    v18.closePrompt = function()
        v7.closeOverlay(v18.props.navigation);
    end;
end;
v17.renderLocalized = function(v19, v20)
    return v2.createElement(l_InteractiveAlert_0, {
        title = v20.titleText,
        bodyText = v20.bodyText,
        buttonStackInfo = {
            buttons = {
                {
                    props = {
                        onActivated = v19.closePrompt,
                        text = v20.cancelButtonText
                    },
                    isDefaultChild = true
                },
                {
                    buttonType = l_ButtonType_0.PrimarySystem,
                    props = {
                        onActivated = v19.switchToR6,
                        text = v20.confirmButtonText
                    }
                }
            }
        },
        position = UDim2.fromScale(0.5, 0.5),
        screenSize = v19.props.screenSize,
        defaultChildRef = v19.props.defaultChildRef
    });
end;
v17.render = function(v21)
    return l_withLocalization_0({
        titleText = "Common.AlertsAndOptions.Title.Warning",
        bodyText = "Feature.Avatar.Label.LayeredClothingSwitchR6Warning",
        confirmButtonText = "CommonUI.Controls.Action.Confirm",
        cancelButtonText = "Feature.Avatar.Action.Cancel"
    })(function(v22)
        return v21:renderLocalized(v22);
    end);
end;
return (v11((v10((v3.connect(function(v23, _)
    return {
        screenSize = v23.ScreenSize
    };
end, function(v25)
    return {
        setAvatarType = function(v26)
            v25(v12(v26));
        end,
        removeLayeredClothing = function()
            v25(v13());
        end
    };
end)(v17))))));


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local l_UserInputService_0 = game:GetService("UserInputService");
local v3 = require(l_CorePackages_0.Roact);
local v4 = require(l_CorePackages_0.RoactRodux);
local v5 = require(l_CorePackages_0.Packages.RoactGamepad);
local v6 = require(l_CorePackages_0.UIBlox);
local v7 = require(l_CorePackages_0.Packages.t);
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local l_ExternalEventConnection_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).ExternalEventConnection;
local l_PerformFetch_0 = require(l_CorePackages_0.Workspace.Packages.Http).PerformFetch;
local l_RetrievalStatus_0 = require(l_CorePackages_0.Workspace.Packages.Http).Enum.RetrievalStatus;
local v12 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.NavigationUtils);
local v13 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v16 = require(l_Modules_0.LuaApp.Services.RoactNetworking);
local v17 = require(l_Modules_0.AvatarExperience.AvatarEditor.Services.Analytics);
local l_InteractiveAlert_0 = v6.App.Dialog.Alert.InteractiveAlert;
local l_ButtonType_0 = v6.App.Button.Enum.ButtonType;
local l_Focusable_0 = v5.Focusable;
local v21 = require(l_Modules_0.AvatarExperience.AvatarEditor.Constants);
local v22 = require(l_Modules_0.AvatarExperience.Common.Utils);
local v23 = require(l_Modules_0.AvatarExperience.AvatarEditor.Utils);
local v24 = require(l_Modules_0.AvatarExperience.Common.Components.withOverlayFocusHandling);
local v25 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.withMappedNavigationParams);
local v26 = require(l_Modules_0.AvatarExperience.AvatarEditor.Components.AssetManagement.OutfitNameTextBox);
local v27 = require(l_Modules_0.AvatarExperience.AvatarEditor.Selectors.CheckShouldPreloadEditableCostumes);
local v28 = require(l_Modules_0.AvatarExperience.AvatarEditor.Thunks.RenameOutfit);
local v29 = require(l_Modules_0.AvatarExperience.AvatarEditor.Thunks.GetEditableOutfits);
local v30 = v3.PureComponent:extend("RenameOutfitPrompt");
v30.validateProps = v7.strictInterface({
    costumeId = v7.string,
    containerWidth = v7.optional(v7.number),
    defaultChildRef = v7.optional(v7.table),
    onOverlayClosed = v7.optional(v7.callback),
    focusController = v7.optional(v7.table),
    networking = v7.callback,
    avatarEditorAnalytics = v7.table,
    navigation = v7.table,
    screenSize = v7.Vector2,
    fetchingState = v7.string,
    shouldPreloadEditableCostumes = v7.boolean,
    ownedItemIdsBySubtype = v7.table,
    outfitInfos = v7.table,
    renameOutfit = v7.callback,
    getEditableUserCostumes = v7.callback
});
v30.init = function(v31)
    v31:setState({
        isKeyboardRepositioned = false,
        costumeName = "",
        isNameInvalid = true
    });
    v31.renameOutfit = function()
        if not v31.state.isNameInvalid then
            local l_costumeName_0 = v31.state.costumeName;
            if not v23.isDuplicateOutfitName(v31.props.ownedItemIdsBySubtype, v31.props.outfitInfos, l_costumeName_0) then
                v31.props.renameOutfit(v31.props.avatarEditorAnalytics, v31.props.costumeId, l_costumeName_0);
                return ;
            else
                local l_costumeId_0 = v31.props.costumeId;
                v12.navigateToNextOverlay(v31.props.navigation, v13.DuplicateOutfitNamePrompt, {
                    outfitName = l_costumeName_0,
                    sourcePrompt = v13.RenameOutfitPrompt,
                    sourceParams = {
                        costumeId = v31.props.costumeId
                    },
                    saveCallback = function()
                        v31.props.renameOutfit(v31.props.avatarEditorAnalytics, l_costumeId_0, l_costumeName_0);
                    end,
                    saveFetchingStateKey = v21.RenameOutfitKey .. l_costumeId_0
                });
                return ;
            end;
        else
            return ;
        end;
    end;
    v31.onOutfitNameUpdated = function(v34, v35)
        v31:setState({
            costumeName = v34,
            isNameInvalid = v35
        });
    end;
    v31.renderMiddleContent = function()
        return v3.createElement(v26, {
            onOutfitNameUpdated = v31.onOutfitNameUpdated
        });
    end;
    v31.onScreenKeyboardVisibleChanged = function()
        if v31.state.isKeyboardRepositioned ~= l_UserInputService_0.OnScreenKeyboardVisible then
            v31:setState({
                isKeyboardRepositioned = l_UserInputService_0.OnScreenKeyboardVisible
            });
        end;
    end;
    v31.closePrompt = function()
        v12.closeOverlay(v31.props.navigation);
    end;
end;
v30.checkFetchEditableCostumes = function(v36)
    if v36.props.shouldPreloadEditableCostumes then
        v36.props.getEditableUserCostumes(v36.props.networking);
    end;
end;
v30.didMount = function(v37)
    v37:checkFetchEditableCostumes();
end;
v30.willUpdate = function(v38, v39, _)
    if v22.isFetchingDoneOrFailed(v38.props.fetchingState, v39.fetchingState) then
        v38.closePrompt();
    end;
end;
v30.renderWithProviders = function(v41, v42)
    local l_screenSize_0 = v41.props.screenSize;
    local v44 = UDim2.new(0.5, 0, 0.5, 0);
    if v41.state.isKeyboardRepositioned then
        v44 = UDim2.new(0.5, 0, 0, (l_screenSize_0.Y - l_UserInputService_0.OnScreenKeyboardSize.Y) / 2);
    end;
    return v3.createElement(l_Focusable_0.Frame, {
        Size = UDim2.fromScale(1, 1),
        BackgroundTransparency = 1,
        inputBindings = {
            NavigateBack = v5.Input.onBegin(Enum.KeyCode.ButtonB, v41.closePrompt),
            Confirm = v5.Input.onBegin(Enum.KeyCode.ButtonA, function()
            end, {
                key = "CommonUI.Controls.Action.Confirm"
            })
        }
    }, {
        KeyboardConnection = v3.createElement(l_ExternalEventConnection_0, {
            event = l_UserInputService_0:GetPropertyChangedSignal("OnScreenKeyboardVisible"),
            callback = v41.onScreenKeyboardVisibleChanged
        }),
        Alert = v3.createElement(l_InteractiveAlert_0, {
            title = v42.titleText,
            bodyText = v42.messageText,
            buttonStackInfo = {
                buttons = {
                    {
                        props = {
                            onActivated = v41.closePrompt,
                            text = v42.cancelButtonText
                        },
                        isDefaultChild = true
                    },
                    {
                        buttonType = l_ButtonType_0.PrimarySystem,
                        props = {
                            isDisabled = v41.state.isNameInvalid,
                            isLoading = v41.props.fetchingState == l_RetrievalStatus_0.Fetching,
                            onActivated = v41.renameOutfit,
                            text = v42.confirmButtonText
                        }
                    }
                }
            },
            middleContent = v41.renderMiddleContent,
            isMiddleContentFocusable = true,
            position = v44,
            screenSize = v41.props.screenSize,
            defaultChildRef = v41.props.defaultChildRef
        })
    });
end;
v30.render = function(v45)
    return l_withLocalization_0({
        titleText = "Feature.Avatar.Heading.RenameCharacter",
        messageText = "Feature.Avatar.Label.EnterNewCostumeName",
        confirmButtonText = "Feature.Avatar.Action.Save",
        cancelButtonText = "Feature.Avatar.Action.Cancel"
    })(function(v46)
        return v45:renderWithProviders(v46);
    end);
end;
v30.didUpdate = function(v47, _, _)
    v47:checkFetchEditableCostumes();
end;
return (v25((v24((l_RoactServices_0.connect({
    networking = v16,
    avatarEditorAnalytics = v17
})((v4.connect(function(v50, v51)
    return {
        fetchingState = l_PerformFetch_0.GetStatus(v50, v21.RenameOutfitKey .. v51.costumeId),
        screenSize = v50.ScreenSize,
        shouldPreloadEditableCostumes = v27(v50),
        ownedItemIdsBySubtype = v50.AvatarExperience.AvatarEditor.Character.OwnedItemIdsBySubtype,
        outfitInfos = v50.AvatarExperience.AvatarEditor.OutfitInfos
    };
end, function(v52)
    return {
        renameOutfit = function(v53, v54, v55)
            v52(v28(v53, v54, v55));
        end,
        getEditableUserCostumes = function(v56)
            return v52(v29(v56));
        end
    };
end)(v30))))))));


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local l_UserInputService_0 = game:GetService("UserInputService");
local v3 = require(l_CorePackages_0.Cryo);
local v4 = require(l_CorePackages_0.Roact);
local v5 = require(l_CorePackages_0.RoactRodux);
local v6 = require(l_CorePackages_0.Packages.t);
local v7 = require(l_CorePackages_0.Packages.RoactGamepad);
local l_RetrievalStatus_0 = require(l_CorePackages_0.Workspace.Packages.Http).Enum.RetrievalStatus;
local l_Focusable_0 = v7.Focusable;
local v10 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.NavigationUtils);
local v11 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v13 = require(l_Modules_0.LuaApp.Services.RoactNetworking);
local l_RoactAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).RoactAppPolicy;
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local v16 = require(l_CorePackages_0.UIBlox);
local l_InteractiveAlert_0 = v16.App.Dialog.Alert.InteractiveAlert;
local l_ButtonType_0 = v16.App.Button.Enum.ButtonType;
local l_withSelectionCursorProvider_0 = v16.App.SelectionImage.withSelectionCursorProvider;
local l_PerformFetch_0 = require(l_CorePackages_0.Workspace.Packages.Http).PerformFetch;
local v21 = require(l_Modules_0.AvatarExperience.AvatarEditor.Constants);
local v22 = require(l_Modules_0.AvatarExperience.Common.Util.CharacterManagerUtils);
local v23 = require(l_Modules_0.AvatarExperience.Common.Utils);
local v24 = require(l_Modules_0.AvatarExperience.AvatarEditor.Utils);
local v25 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.withMappedNavigationParams);
local v26 = require(l_Modules_0.AvatarExperience.Common.Components.withOverlayFocusHandling);
local v27 = require(l_Modules_0.AvatarExperience.AvatarEditor.Components.AssetManagement.OutfitNameTextBox);
local v28 = require(l_Modules_0.AvatarExperience.AvatarEditor.Services.Analytics);
local v29 = require(l_Modules_0.AvatarExperience.AvatarEditor.Selectors.CheckShouldPreloadEditableCostumes);
local v30 = require(l_Modules_0.AvatarExperience.AvatarEditor.Thunks.CreateOutfit);
local v31 = require(l_Modules_0.AvatarExperience.AvatarEditor.Thunks.GetEditableOutfits);
local v32 = v4.PureComponent:extend("SaveOutfitPrompt");
v32.validateProps = v6.strictInterface({
    lookId = v6.optional(v6.string),
    onComplete = v6.optional(v6.callback),
    containerWidth = v6.optional(v6.number),
    defaultChildRef = v6.optional(v6.table),
    onOverlayClosed = v6.optional(v6.callback),
    focusController = v6.optional(v6.table),
    showCustomOutfitNames = v6.boolean,
    networking = v6.callback,
    avatarEditorAnalytics = v6.table,
    navigation = v6.table,
    screenSize = v6.Vector2,
    fetchingState = v6.string,
    shouldPreloadEditableCostumes = v6.boolean,
    ownedItemIdsBySubtype = v6.table,
    outfitInfos = v6.table,
    combinedTryOnHumanoidDescription = v6.optional(v6.Instance),
    createOutfit = v6.callback,
    getEditableUserCostumes = v6.callback,
    forwardRef = v6.optional(v6.table)
});
v32.init = function(v33)
    v33.getShowCustomCostumeNames = function()
        return v33.props.showCustomOutfitNames;
    end;
    v33.outfitName = if not v33.getShowCustomCostumeNames() then nil else "";
    v33.isMounted = false;
    v33.checkIsMounted = function()
        return v33.isMounted;
    end;
    v33.state = {
        isKeyboardRepositioned = false,
        isNameInvalid = not not v33.getShowCustomCostumeNames() or false
    };
    v33.saveOutfit = function()
        if not v33.state.isNameInvalid then
            local l_networking_0 = v33.props.networking;
            if v33.getShowCustomCostumeNames() then
                if not v24.isDuplicateOutfitName(v33.props.ownedItemIdsBySubtype, v33.props.outfitInfos, v33.outfitName) then
                    v33.props.createOutfit(l_networking_0, v33.outfitName, v33.props.avatarEditorAnalytics, v33.checkIsMounted, v33.props.onComplete, if v33.props.lookId ~= nil then v33.props.combinedTryOnHumanoidDescription else nil);
                    return ;
                else
                    local l_outfitName_0 = v33.outfitName;
                    v10.navigateToNextOverlay(v33.props.navigation, v11.DuplicateOutfitNamePrompt, {
                        outfitName = v33.outfitName,
                        sourcePrompt = v11.SaveOutfitPrompt,
                        sourceParams = {},
                        saveCallback = function()
                            v33.props.createOutfit(l_networking_0, l_outfitName_0, v33.props.avatarEditorAnalytics, v33.checkIsMounted, v33.props.onComplete, if v33.props.lookId ~= nil then v33.props.combinedTryOnHumanoidDescription else nil);
                        end,
                        saveFetchingStateKey = v21.CreateOutfitKey
                    });
                    return ;
                end;
            else
                v33.props.createOutfit(l_networking_0, v33.outfitName, v33.props.avatarEditorAnalytics, v33.checkIsMounted, v33.props.onComplete, if v33.props.lookId ~= nil then v33.props.combinedTryOnHumanoidDescription else nil);
                return ;
            end;
        else
            return ;
        end;
    end;
    v33.onOutfitNameUpdated = function(v36, v37)
        if v33.isMounted then
            v33.outfitName = v36;
            v33:setState({
                isNameInvalid = v37
            });
            return ;
        else
            return ;
        end;
    end;
    v33.renderMiddleContent = function()
        return v4.createElement(v27, {
            onOutfitNameUpdated = v33.onOutfitNameUpdated
        });
    end;
    v33.keyboardConnection = l_UserInputService_0:GetPropertyChangedSignal("OnScreenKeyboardVisible"):connect(function()
        if v33.isMounted then
            if not (v33.state.isKeyboardRepositioned or not l_UserInputService_0.OnScreenKeyboardVisible) then
                v33:setState({
                    isKeyboardRepositioned = true
                });
            end;
            return ;
        else
            return ;
        end;
    end);
    v33.closePrompt = function()
        v10.closeOverlay(v33.props.navigation);
        if v33.props.onComplete then
            v33.props.onComplete();
        end;
    end;
end;
v32.checkFetchEditableOutfits = function(v38)
    if v38.props.shouldPreloadEditableCostumes then
        v38.props.getEditableUserCostumes(v38.props.networking);
    end;
end;
v32.didMount = function(v39)
    v39.isMounted = true;
    v39:checkFetchEditableOutfits();
end;
v32.willUpdate = function(v40, v41, _)
    if v23.isFetchingDoneOrFailed(v40.props.fetchingState, v41.fetchingState) then
        v40.closePrompt();
    end;
end;
v32.renderAlertLocalized = function(v43, v44, _)
    local v46 = v43.getShowCustomCostumeNames();
    local l_screenSize_0 = v43.props.screenSize;
    local v48 = UDim2.new(0.5, 0, 0.5, 0);
    if v43.state.isKeyboardRepositioned then
        v48 = UDim2.new(0.5, 0, 0, (l_screenSize_0.Y - l_UserInputService_0.OnScreenKeyboardSize.Y) / 2);
    end;
    return v4.createElement(l_Focusable_0.Frame, {
        Size = UDim2.fromScale(1, 1),
        BackgroundTransparency = 1,
        inputBindings = {
            NavigateBack = v7.Input.onBegin(Enum.KeyCode.ButtonB, v43.closePrompt),
            Confirm = v7.Input.onBegin(Enum.KeyCode.ButtonA, function()
            end, {
                key = "CommonUI.Controls.Action.Confirm"
            })
        }
    }, {
        Alert = v4.createElement(l_InteractiveAlert_0, {
            title = v44.titleText,
            bodyText = not not v46 and v44.messageText or nil,
            buttonStackInfo = {
                buttons = {
                    {
                        props = {
                            onActivated = v43.closePrompt,
                            text = v44.cancelButtonText
                        },
                        isDefaultChild = true
                    },
                    {
                        buttonType = l_ButtonType_0.PrimarySystem,
                        props = {
                            isLoading = v43.props.fetchingState == l_RetrievalStatus_0.Fetching,
                            isDisabled = not not v46 and (v43.state.isNameInvalid or false),
                            onActivated = v43.saveOutfit,
                            text = v44.confirmButtonText
                        }
                    }
                }
            },
            middleContent = not not v46 and v43.renderMiddleContent or nil,
            isMiddleContentFocusable = v46,
            position = v48,
            screenSize = v43.props.screenSize,
            defaultChildRef = v43.props.defaultChildRef
        })
    });
end;
v32.render = function(v49)
    return l_withLocalization_0({
        titleText = "Feature.Avatar.Heading.SaveCostume",
        messageText = "Feature.Avatar.Label.EnterCostumeName",
        confirmButtonText = "Feature.Avatar.Action.Save",
        cancelButtonText = "Feature.Avatar.Action.Cancel",
        warningText = "Feature.Avatar.Label.CostumeWarning"
    })(function(v50)
        return l_withSelectionCursorProvider_0(function(v51)
            return v49:renderAlertLocalized(v50, v51);
        end);
    end);
end;
v32.didUpdate = function(v52, _, _)
    v52:checkFetchEditableOutfits();
end;
v32.willUnmount = function(v55)
    v55.keyboardConnection:disconnect();
    v55.keyboardConnection = nil;
    v55.isMounted = false;
end;
v32 = v25((v26((l_RoactServices_0.connect({
    networking = v13,
    avatarEditorAnalytics = v28
})((l_RoactAppPolicy_0.connect(function(v56, _)
    return {
        showCustomOutfitNames = v56.getCustomOutfitNames()
    };
end)((v5.connect(function(v58, v59)
    return {
        fetchingState = l_PerformFetch_0.GetStatus(v58, v21.CreateOutfitKey),
        screenSize = v58.ScreenSize,
        shouldPreloadEditableCostumes = v29(v58),
        ownedItemIdsBySubtype = v58.AvatarExperience.AvatarEditor.Character.OwnedItemIdsBySubtype,
        outfitInfos = v58.AvatarExperience.AvatarEditor.OutfitInfos,
        combinedTryOnHumanoidDescription = if v59.lookId ~= nil then v22.getCombinedHumanoidDescriptionFromEquippedAndOutfitTryOn(v58) else nil
    };
end, function(v60)
    local _ = nil;
    return {
        createOutfit = function(v62, v63, v64, v65, v66, v67)
            v60(v30(v62, v63, v64, v65, v66, v67));
        end,
        getEditableUserCostumes = function(v68)
            return v60(v31(v68));
        end
    };
end)(v32)))))))));
return v4.forwardRef(function(v69, v70)
    return v4.createElement(v32, v3.Dictionary.join(v69, {
        forwardRef = v70
    }));
end);


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v3 = require(l_CorePackages_0.Roact);
local v4 = require(l_CorePackages_0.RoactRodux);
local v5 = require(l_Modules_0.AvatarExperience.Catalog.CatalogConstants);
local v6 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v7 = require(l_Modules_0.AvatarExperience.Common.Selectors.DEPRECATED_ItemData);
local v8 = require(l_Modules_0.AvatarExperience.Catalog.Components.ItemsList.CatalogItemCard);
local l_PerformFetch_0 = require(l_CorePackages_0.Workspace.Packages.Http).PerformFetch;
local v10 = require(l_Modules_0.LuaApp.Enum.RetrievalStatus);
local v11 = require(l_Modules_0.AvatarExperience.Common.Actions.ClearTryOns);
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local v13 = require(l_Modules_0.AvatarExperience.Flags.FFlagAXFixItemTypeHandling);
local v14 = require(l_Modules_0.AvatarExperience.Common.Selectors.selectItemInfo);
local v15 = v3.PureComponent:extend("RecommendedItemCard");
v15.didUpdate = function(v16, v17)
    local l_getRecommendedItems_0 = v16.props.getRecommendedItems;
    local l_clearTryOns_0 = v16.props.clearTryOns;
    if v17.purchasingStatus == v10.Fetching and v16.props.purchasingStatus == v10.Done then
        l_getRecommendedItems_0();
        l_clearTryOns_0();
    end;
end;
v15.render = function(v20)
    return v3.createElement(v8, {
        itemId = v20.props.itemId,
        itemType = v20.props.itemType,
        index = v20.props.index,
        analyticsItemCountPerPage = v6.NumRecommendedItems,
        analyticsContext = v5.AnalyticsContext.AvatarEditorRecommendedItem,
        itemDetailsPeekViewRefs = v20.props.itemDetailsPeekViewRefs,
        resultsListRef = v20.props.resultsListRef
    });
end;
return v4.connect(function(v21, v22)
    local v23 = nil;
    if not v13 then
        local v24 = v7(v21.AvatarExperience.Common, v22.itemId, v22.itemType);
        v23 = (not not v24 and v24.product) and tostring(v24.product.id) or "";
    else
        local v25 = v14(v21.AvatarExperience, v22.itemId, v22.itemType);
        v23 = v25 and v25.productId;
    end;
    local v26 = nil;
    if v23 then
        v26 = l_PerformFetch_0.GetStatus(v21, v5.PurchaseProductKey .. v23);
    end;
    return {
        purchasingStatus = v26
    };
end, function(v27)
    return {
        clearTryOns = function()
            v27(v11());
        end
    };
end)(v15);


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_UserInputService_0 = game:GetService("UserInputService");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v4 = require(l_CorePackages_0.Otter);
local v5 = require(l_CorePackages_0.Roact);
local v6 = require(l_CorePackages_0.Packages.RoactGamepad);
local l_GamepadUtils_0 = require(l_CorePackages_0.Workspace.Packages.AppCommonLib).Utils.GamepadUtils;
local l_Focusable_0 = v6.Focusable;
local v9 = require(l_CorePackages_0.UIBlox);
local v10 = require(l_CorePackages_0.Packages.t);
local v11 = require(l_Modules_0.AvatarExperience.Common.Utils);
local l_ImageSetLabel_0 = v9.Core.ImageSet.ImageSetLabel;
local l_Images_0 = v9.App.ImageSet.Images;
local l_Colors_0 = v9.App.Style.Colors;
local l_CursorKind_0 = v9.App.SelectionImage.CursorKind;
local l_withSelectionCursorProvider_0 = v9.App.SelectionImage.withSelectionCursorProvider;
local v17 = l_Images_0["component_assets/dropshadow_28"];
local v18 = l_Images_0["component_assets/circle_29"];
local l_White_0 = l_Colors_0.White;
local l_Pumice_0 = l_Colors_0.Pumice;
local l_Pumice_1 = l_Colors_0.Pumice;
local v22 = {
    frequency = 5
};
local v23 = v5.PureComponent:extend("TwoAxisSlider");
v23.validateProps = v10.strictInterface({
    mapPositionToScales = v10.callback,
    mapScalesToPosition = v10.callback,
    setScales = v10.callback,
    xScaleRules = v10.table,
    yScaleRules = v10.table,
    xScale = v10.number,
    yScale = v10.number,
    getBackgroundAbsolutePosition = v10.callback,
    getBackgroundAbsoluteSize = v10.callback,
    invertDPadX = v10.optional(v10.boolean),
    invertDPadY = v10.optional(v10.boolean),
    isDisabled = v10.optional(v10.boolean),
    onDragStart = v10.optional(v10.callback),
    onDragEnd = v10.optional(v10.callback)
});
v23.disconnectDragConnections = function(v24)
    if v24.dragChangeListen then
        v24.dragChangeListen:Disconnect();
        v24.dragChangeListen = nil;
    end;
    if v24.dragEndListen then
        v24.dragEndListen:Disconnect();
        v24.dragEndListen = nil;
    end;
end;
v23.init = function(v25)
    v25.dragChangeListen = nil;
    v25.dragEndListen = nil;
    v25.knobRef = v5.createRef();
    v25.selectionObjectRef = v5.createRef();
    v25.totalMoveTime = 0;
    v25.unhandledTime = 0;
    v25.firstMove = true;
    v25.state = {
        gamepadActive = false
    };
    local v26, v27 = v5.createBinding(0);
    local v28, v29 = v5.createBinding(0);
    local v30 = v5.joinBindings({
        pressed = v26,
        hovered = v28
    });
    v25.knobColorMapping = v26:map(function(v31)
        return l_White_0:lerp(l_Pumice_0, v31);
    end);
    v25.knobShadowTransparencyMapping = v30:map(function(v32)
        return v11.lerp(v11.lerp(0.7, 0.5, v32.hovered), 1, v32.pressed);
    end);
    v25.pressedMotor = v4.createSingleMotor(0);
    v25.pressedMotor:onStep(v27);
    v25.hoveredMotor = v4.createSingleMotor(0);
    v25.hoveredMotor:onStep(v29);
    v25.mouseEnter = function()
        v25.hoveredMotor:setGoal(v4.spring(1, v22));
    end;
    v25.mouseLeave = function()
        v25.hoveredMotor:setGoal(v4.spring(0, v22));
    end;
    v25.nonGamepadInputChanged = function(v33)
        if v33.UserInputType ~= Enum.UserInputType.MouseMovement and v33.UserInputType ~= Enum.UserInputType.Touch then
            return ;
        else
            local v34 = v25.props.getBackgroundAbsolutePosition();
            local v35 = v25.props.getBackgroundAbsoluteSize();
            if not (not v34 or not v35) then
                local l_Position_0 = v33.Position;
                v25.props.setScales(v25.props.mapPositionToScales((Vector2.new((l_Position_0.X - v34.X) / v35.X, (l_Position_0.Y - v34.Y) / v35.Y))));
            end;
            return ;
        end;
    end;
    v25.nonGamepadInputEnded = function(v37)
        if v37.UserInputType ~= Enum.UserInputType.MouseButton1 and v37.UserInputType ~= Enum.UserInputType.Touch then
            return ;
        else
            if v25.props.onDragEnd then
                v25.props.onDragEnd();
            end;
            v25:disconnectDragConnections();
            v25.pressedMotor:setGoal(v4.spring(0, v22));
            return ;
        end;
    end;
    v25.nonGamepadInputBegan = function(_, v39)
        local v40 = false;
        if v39.UserInputState == Enum.UserInputState.Begin then
            v40 = true;
            if v39.UserInputType ~= Enum.UserInputType.MouseButton1 then
                v40 = v39.UserInputType == Enum.UserInputType.Touch;
            end;
        end;
        if not (v25.props.isDisabled or v25.dragChangeListen) and v40 then
            if v25.props.onDragStart then
                v25.props.onDragStart();
            end;
            v25.dragChangeListen = l_UserInputService_0.InputChanged:connect(v25.nonGamepadInputChanged);
            v25.dragEndListen = l_UserInputService_0.InputEnded:connect(v25.nonGamepadInputEnded);
            v25.pressedMotor:setGoal(v4.spring(1, v22));
            return ;
        else
            return ;
        end;
    end;
    v25.disableGamepadInput = function()
        v25:setState({
            gamepadActive = false
        });
    end;
    v25.onAPressed = function(_)
        if not v25.state.gamepadActive then
            if not v25.props.isDisabled then
                v25:setState({
                    gamepadActive = true
                });
            end;
            return ;
        else
            v25:setState({
                gamepadActive = false
            });
            return ;
        end;
    end;
    v25.moveSlider = function(v42, v43)
        local v44 = l_GamepadUtils_0.normalizeStickByDeadzone(v42[Enum.KeyCode.Thumbstick1].Position);
        local v45 = v44 ~= Vector2.new(0, 0);
        local v46 = Vector2.new((v42[Enum.KeyCode.DPadLeft].Position.z == 1 and -1 or 0) + (v42[Enum.KeyCode.DPadRight].Position.z == 1 and 1 or 0), (v42[Enum.KeyCode.DPadUp].Position.z == 1 and 1 or 0) + (v42[Enum.KeyCode.DPadDown].Position.z == 1 and -1 or 0));
        local l_xScale_0 = v25.props.xScale;
        local l_yScale_0 = v25.props.yScale;
        local l_l_xScale_0_0 = l_xScale_0;
        local l_l_yScale_0_0 = l_yScale_0;
        if not v45 then
            if v46 ~= Vector2.new(0, 0) then
                v25.totalMoveTime = v25.totalMoveTime + v43;
                local v51 = nil;
                if not v25.firstMove then
                    if v25.totalMoveTime > 0.2 then
                        local v52 = (v43 - math.max(0.2 - (v25.totalMoveTime - v43), 0)) + v25.unhandledTime;
                        v51 = math.floor(8 * v52);
                        v25.unhandledTime = v52 - v51 / 8;
                    else
                        v51 = 0;
                        v25.unhandledTime = 0;
                    end;
                else
                    v51 = 1;
                    v25.unhandledTime = 0;
                    v25.firstMove = false;
                end;
                local v53 = Vector2.new(not v25.props.invertDPadX and 1 or -1, not v25.props.invertDPadY and 1 or -1);
                local v54 = (v51 - 1) + 0.51;
                if v46.x == 0 then
                    l_l_xScale_0_0 = l_xScale_0;
                else
                    local l_xScaleRules_0 = v25.props.xScaleRules;
                    l_l_xScale_0_0 = math.clamp(l_xScaleRules_0.min + v11.Round((l_xScale_0 + ((v46.x * v53.x) * l_xScaleRules_0.increment) * v54) - l_xScaleRules_0.min, l_xScaleRules_0.increment), l_xScaleRules_0.min, l_xScaleRules_0.max);
                end;
                if v46.y == 0 then
                    l_l_yScale_0_0 = l_yScale_0;
                else
                    local l_yScaleRules_0 = v25.props.yScaleRules;
                    l_l_yScale_0_0 = math.clamp(l_yScaleRules_0.min + v11.Round((l_yScale_0 + ((v46.y * v53.y) * l_yScaleRules_0.increment) * v54) - l_yScaleRules_0.min, l_yScaleRules_0.increment), l_yScaleRules_0.min, l_yScaleRules_0.max);
                end;
            else
                v25.totalMoveTime = 0;
                v25.unhandledTime = 0;
                v25.firstMove = true;
            end;
        else
            v25.totalMoveTime = v25.totalMoveTime + v43;
            local v57, v58 = v25.props.mapPositionToScales(v25.props.mapScalesToPosition(l_xScale_0, l_yScale_0) + (Vector2.new(v44.x, -v44.y) * 1) * v43);
            l_l_xScale_0_0 = v57;
            l_l_yScale_0_0 = v58;
            v25.unhandledTime = 0;
            v25.firstMove = false;
        end;
        if not (l_l_xScale_0_0 == l_xScale_0) or l_l_yScale_0_0 ~= l_yScale_0 then
            v25.props.setScales(l_l_xScale_0_0, l_l_yScale_0_0);
        end;
    end;
end;
v23.render = function(v59)
    local l_gamepadActive_0 = v59.state.gamepadActive;
    local l_isDisabled_0 = v59.props.isDisabled;
    local v62 = v59.props.mapScalesToPosition(v59.props.xScale, v59.props.yScale);
    return l_withSelectionCursorProvider_0(function(v63)
        return v5.createFragment({
            Knob = v5.createElement(l_Focusable_0[l_ImageSetLabel_0], {
                AnchorPoint = Vector2.new(0.5, 0.5),
                Position = UDim2.new(v62.X, 0, v62.Y, 0),
                Size = UDim2.fromOffset(30, 30),
                Image = v18,
                ImageColor3 = not not l_isDisabled_0 and l_Pumice_1 or v59.knobColorMapping,
                ImageTransparency = not l_isDisabled_0 and 0 or 0.5,
                Active = true,
                BackgroundTransparency = 1,
                ZIndex = 2,
                [v5.Event.InputBegan] = v59.nonGamepadInputBegan,
                [v5.Event.MouseEnter] = v59.mouseEnter,
                [v5.Event.MouseLeave] = v59.mouseLeave,
                [v5.Ref] = v59.knobRef,
                onFocusLost = v59.disableGamepadInput,
                inputBindings = {
                    ToggleGamepadInput = v6.Input.onBegin(Enum.KeyCode.ButtonA, v59.onAPressed),
                    DisableGamepadInput = if not l_gamepadActive_0 then nil else v6.Input.onBegin(Enum.KeyCode.ButtonB, v59.disableGamepadInput),
                    MoveSlider = not not l_gamepadActive_0 and v6.Input.onMoveStep(v59.moveSlider) or nil
                },
                NextSelectionLeft = not not l_gamepadActive_0 and v59.knobRef or nil,
                NextSelectionRight = not not l_gamepadActive_0 and v59.knobRef or nil,
                NextSelectionUp = not not l_gamepadActive_0 and v59.knobRef or nil,
                NextSelectionDown = not not l_gamepadActive_0 and v59.knobRef or nil,
                SelectionImageObject = v63(not not l_gamepadActive_0 and l_CursorKind_0.SelectedKnob or l_CursorKind_0.UnselectedKnob)
            }),
            KnobShadow = v5.createElement(l_ImageSetLabel_0, {
                AnchorPoint = Vector2.new(0.5, 0.5),
                Position = UDim2.new(v62.X, 0, v62.Y, 0),
                Size = UDim2.new(0, 48, 0, 48),
                Image = v17,
                ImageTransparency = if not l_isDisabled_0 then v59.knobShadowTransparencyMapping else 1,
                Active = true,
                BackgroundTransparency = 1,
                ZIndex = 1
            })
        });
    end);
end;
v23.willUnmount = function(v64)
    v64:disconnectDragConnections();
    v64.pressedMotor:destroy();
    v64.hoveredMotor:destroy();
end;
return v23;