local l_StudioService_0 = game:GetService("StudioService");
local l_Parent_0 = script.Parent;
local l_Parent_1 = script.Parent.Parent.Parent;
local v3 = require(l_Parent_1.Packages.Roact);
local v4 = require(l_Parent_1.Packages.RoactRodux);
local l_ContextServices_0 = require(l_Parent_1.Packages.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v7 = require(l_Parent_1.Src.Util.Thread);
local v8 = require(l_Parent_1.Src.Actions.AddChange);
local v9 = require(l_Parent_1.Src.Actions.AddWarning);
local v10 = require(l_Parent_1.Src.Actions.DiscardWarning);
local v11 = require(l_Parent_0.Actions.SettingsSaveScaleBoundaries);
local v12 = require(l_Parent_1.Src.Util.AssetOverrides);
local v13 = require(l_Parent_1.Src.Actions.AddErrors);
local v14 = require(l_Parent_0.Components.RootPanelExternal);
local v15 = require(l_Parent_1.Src.Components.SettingsPages.SettingsPage);
local v16 = require(l_Parent_1.Src.Components.SettingsPages.InsufficientPermissionsPage);
local l_Name_0 = script.Name;
local function v58(v18, v19)
    local l_game_0 = v18:getState().Metadata.game;
    local l_universeAvatarController_0 = v19.universeAvatarController;
    return {
        function(v22)
            local v23 = l_universeAvatarController_0:getAvatarType(l_game_0);
            local _ = nil;
            v22.universeAvatarType = v23 == Enum.GameAvatarType.R6 and "MorphToR6" or (v23 == Enum.GameAvatarType.R15 and "MorphToR15" or "PlayerChoice");
        end,
        function(v25)
            v25.universeAnimationType = l_universeAvatarController_0:getAnimationType(l_game_0);
        end,
        function(v26)
            v26.universeCollisionType = l_universeAvatarController_0:getCollisionType(l_game_0).Name;
        end,
        function(v27)
            local v28 = {};
            local v29 = {};
            local v35 = {
                v7.new(function()
                    local v30 = l_universeAvatarController_0:getHeightRange(l_game_0);
                    v28.height = v30.Min;
                    v29.height = v30.Max;
                end),
                v7.new(function()
                    local v31 = l_universeAvatarController_0:getWidthRange(l_game_0);
                    v28.width = v31.Min;
                    v29.width = v31.Max;
                end),
                v7.new(function()
                    local v32 = l_universeAvatarController_0:getHeadScaleRange(l_game_0);
                    v28.head = v32.Min;
                    v29.head = v32.Max;
                end),
                v7.new(function()
                    local v33 = l_universeAvatarController_0:getBodyTypeRange(l_game_0);
                    v28.bodyType = v33.Min;
                    v29.bodyType = v33.Max;
                end),
                v7.new(function()
                    local v34 = l_universeAvatarController_0:getProportionsRange(l_game_0);
                    v28.proportion = v34.Min;
                    v29.proportion = v34.Max;
                end)
            };
            for _, v37 in ipairs(v35) do
                v37:start();
            end;
            for _, v39 in ipairs(v35) do
                v39:join();
            end;
            v27.universeAvatarMinScales = v28;
            v27.universeAvatarMaxScales = v29;
        end,
        function(v40)
            v40.universeAvatarAssetOverrides = l_universeAvatarController_0:getAssetOverrides(l_game_0);
        end,
        function(_)
            local v42 = {};
            local v53 = {
                v7.new(function()
                    local v43, v44 = l_universeAvatarController_0:getHeightRules();
                    v42.height = {
                        min = v43.Min,
                        max = v43.Max,
                        increment = v44
                    };
                end),
                v7.new(function()
                    local v45, v46 = l_universeAvatarController_0:getWidthRules();
                    v42.width = {
                        min = v45.Min,
                        max = v45.Max,
                        increment = v46
                    };
                end),
                v7.new(function()
                    local v47, v48 = l_universeAvatarController_0:getHeadScaleRules();
                    v42.head = {
                        min = v47.Min,
                        max = v47.Max,
                        increment = v48
                    };
                end),
                v7.new(function()
                    local v49, v50 = l_universeAvatarController_0:getBodyTypeRules();
                    v42.bodyType = {
                        min = v49.Min,
                        max = v49.Max,
                        increment = v50
                    };
                end),
                v7.new(function()
                    local v51, v52 = l_universeAvatarController_0:getProportionsRules();
                    v42.proportion = {
                        min = v51.Min,
                        max = v51.Max,
                        increment = v52
                    };
                end)
            };
            for _, v55 in ipairs(v53) do
                v55:start();
            end;
            for _, v57 in ipairs(v53) do
                v57:join();
            end;
            v18:dispatch(v11({
                scales = v42
            }));
        end
    };
end;
local function v76(v59, v60)
    local v61 = v59:getState();
    local l_game_1 = v61.Metadata.game;
    local l_universeAvatarController_1 = v60.universeAvatarController;
    return {
        function()
            local l_universeAvatarType_0 = v61.Settings.Changed.universeAvatarType;
            if l_universeAvatarType_0 ~= nil then
                local _ = nil;
                l_universeAvatarController_1:setAvatarType(l_game_1, if l_universeAvatarType_0 == "MorphToR6" then Enum.GameAvatarType.R6 else if l_universeAvatarType_0 == "MorphToR15" then Enum.GameAvatarType.R15 else Enum.GameAvatarType.PlayerChoice);
            end;
        end,
        function()
            local l_universeAnimationType_0 = v61.Settings.Changed.universeAnimationType;
            if l_universeAnimationType_0 ~= nil then
                l_universeAvatarController_1:setAnimationType(l_game_1, l_universeAnimationType_0);
            end;
        end,
        function()
            local l_universeCollisionType_0 = v61.Settings.Changed.universeCollisionType;
            if l_universeCollisionType_0 ~= nil then
                l_universeAvatarController_1:setCollisionType(l_game_1, Enum.R15CollisionType[l_universeCollisionType_0]);
            end;
        end,
        function()
            local l_universeAvatarAssetOverrides_0 = v61.Settings.Changed.universeAvatarAssetOverrides;
            if l_universeAvatarAssetOverrides_0 ~= nil then
                l_universeAvatarController_1:setAssetOverrides(l_game_1, l_universeAvatarAssetOverrides_0);
            end;
        end,
        function()
            local l_universeAvatarMinScales_0 = v61.Settings.Changed.universeAvatarMinScales;
            local l_universeAvatarMaxScales_0 = v61.Settings.Changed.universeAvatarMaxScales;
            if not (l_universeAvatarMinScales_0 == nil) or l_universeAvatarMaxScales_0 ~= nil then
                l_universeAvatarMinScales_0 = l_universeAvatarMinScales_0 or v61.Settings.Current.universeAvatarMinScales;
                l_universeAvatarMaxScales_0 = l_universeAvatarMaxScales_0 or v61.Settings.Current.universeAvatarMaxScales;
                local v71 = {
                    v7.new(function()
                        l_universeAvatarController_1:setHeightRange(l_game_1, NumberRange.new(l_universeAvatarMinScales_0.height, l_universeAvatarMaxScales_0.height));
                    end),
                    v7.new(function()
                        l_universeAvatarController_1:setWidthRange(l_game_1, NumberRange.new(l_universeAvatarMinScales_0.width, l_universeAvatarMaxScales_0.width));
                    end),
                    v7.new(function()
                        l_universeAvatarController_1:setHeadScaleRange(l_game_1, NumberRange.new(l_universeAvatarMinScales_0.head, l_universeAvatarMaxScales_0.head));
                    end),
                    v7.new(function()
                        l_universeAvatarController_1:setBodyTypeRange(l_game_1, NumberRange.new(l_universeAvatarMinScales_0.bodyType, l_universeAvatarMaxScales_0.bodyType));
                    end),
                    v7.new(function()
                        l_universeAvatarController_1:setProportionsRange(l_game_1, NumberRange.new(l_universeAvatarMinScales_0.proportion, l_universeAvatarMaxScales_0.proportion));
                    end)
                };
                for _, v73 in ipairs(v71) do
                    v73:start();
                end;
                for _, v75 in ipairs(v71) do
                    v75:join();
                end;
            end;
        end
    };
end;
local function v79(v77, v78)
    return {
        AvatarType = v77("universeAvatarType"),
        AvatarAnimation = v77("universeAnimationType"),
        AvatarCollision = v77("universeCollisionType"),
        AvatarAssetOverrides = v77("universeAvatarAssetOverrides"),
        AvatarScalingMin = v77("universeAvatarMinScales"),
        AvatarScalingMax = v77("universeAvatarMaxScales"),
        CurrentAvatarType = v78.Settings.Current.universeAvatarType,
        AssetOverrideErrors = v78.Settings.Errors.universeAvatarAssetOverrides,
        OwnerId = v78.GameOwnerMetadata.creatorId,
        OwnerType = v78.GameOwnerMetadata.creatorType
    };
end;
local function v87(v80, v81)
    return {
        AvatarAnimationChanged = v80("universeAnimationType"),
        AvatarCollisionChanged = v80("universeCollisionType"),
        AvatarScalingMinChanged = v80("universeAvatarMinScales"),
        AvatarScalingMaxChanged = v80("universeAvatarMaxScales"),
        AvatarTypeChanged = function(v82, v83)
            if not v83 then
                v81(v10("universeAvatarType"));
            else
                v81(v9("universeAvatarType"));
            end;
            v81(v8("universeAvatarType", v82));
        end,
        AvatarAssetOverridesChanged = function(v84)
            v81(v8("universeAvatarAssetOverrides", v84));
            local v85 = v12.getErrors(v84);
            if v85 then
                v81(v13({
                    universeAvatarAssetOverrides = v85
                }));
            end;
        end,
        SaveScaleBoundaries = function(v86)
            v81(v11({
                scales = v86
            }));
        end
    };
end;
local _ = function(_)
    return game.GameId ~= 0;
end;
local function _(v90, v91)
    local v92 = false;
    if v90 ~= "PlayerChoice" then
        v92 = v91 ~= v90;
    end;
    return v92;
end;
local v94 = v3.PureComponent:extend(script.Name);
v94.hasPermissionToEdit = function(v95)
    local l_props_0 = v95.props;
    local l_OwnerId_0 = l_props_0.OwnerId;
    local l_OwnerType_0 = l_props_0.OwnerType;
    local v99 = true;
    if l_OwnerType_0 ~= Enum.CreatorType.Group then
        v99 = l_OwnerId_0 == l_StudioService_0:GetUserId();
    end;
    return v99;
end;
v94.createChildren = function(v100)
    local l_props_1 = v100.props;
    local l_Stylizer_0 = l_props_1.Stylizer;
    local l_Mouse_0 = l_props_1.Mouse;
    local v104 = {};
    local l_createElement_0 = v3.createElement;
    local l_v14_0 = v14;
    local v107 = {
        ThemeData = l_Stylizer_0,
        IsEnabled = true
    };
    local l_CurrentAvatarType_0 = l_props_1.CurrentAvatarType;
    local l_AvatarType_0 = l_props_1.AvatarType;
    local v110 = false;
    if l_CurrentAvatarType_0 ~= "PlayerChoice" then
        v110 = l_AvatarType_0 ~= l_CurrentAvatarType_0;
    end;
    v107.IsGameShutdownRequired = v110;
    v107.AssetOverrideErrors = l_props_1.AssetOverrideErrors;
    v107.Mouse = l_Mouse_0:get();
    v107.IsPlacePublished = game.GameId ~= 0;
    v107.AvatarType = l_props_1.AvatarType;
    v107.AvatarAnimation = l_props_1.AvatarAnimation;
    v107.AvatarCollision = l_props_1.AvatarCollision;
    v107.AvatarAssetOverrides = l_props_1.AvatarAssetOverrides;
    v107.AvatarScalingMin = l_props_1.AvatarScalingMin;
    v107.AvatarScalingMax = l_props_1.AvatarScalingMax;
    v107.OnAvatarTypeChanged = function(v111)
        local l_l_props_1_0 = l_props_1;
        if not (game.GameId ~= 0) then
            l_props_1.AvatarTypeChanged(v111);
            return ;
        else
            l_l_props_1_0 = l_props_1.CurrentAvatarType;
            local v113 = false;
            if l_l_props_1_0 ~= "PlayerChoice" then
                v113 = v111 ~= l_l_props_1_0;
            end;
            l_props_1.AvatarTypeChanged(v111, v113);
            return ;
        end;
    end;
    v107.OnAvatarAnimationChanged = l_props_1.AvatarAnimationChanged;
    v107.OnAvatarCollisionChanged = l_props_1.AvatarCollisionChanged;
    v107.OnAvatarAssetOverridesChanged = l_props_1.AvatarAssetOverridesChanged;
    v107.OnAvatarScalingMinChanged = l_props_1.AvatarScalingMinChanged;
    v107.OnAvatarScalingMaxChanged = l_props_1.AvatarScalingMaxChanged;
    v104.Morpher = l_createElement_0(l_v14_0, v107);
    return v104;
end;
v94.render = function(v114)
    local l_Localization_0 = v114.props.Localization;
    if v114:hasPermissionToEdit() then
        return v3.createElement(v15, {
            SettingsLoadJobs = v58,
            SettingsSaveJobs = v76,
            Title = l_Localization_0:getText("General", "Category" .. l_Name_0),
            PageId = l_Name_0,
            CreateChildren = function()
                return v114:createChildren();
            end
        });
    else
        return v3.createElement(v16);
    end;
end;
v94 = l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer,
    Mouse = l_ContextServices_0.Mouse
})(v94);
local v116 = require(l_Parent_1.Src.Networking.settingFromState);
v94 = v4.connect(function(v117, _)
    if v117 then
        return (v79(function(v119)
            return v116(v117.Settings, v119);
        end, v117));
    else
        return ;
    end;
end, function(v120)
    return (v87(function(v121)
        return function(v122)
            v120(v8(v121, v122));
        end;
    end, v120));
end)(v94);
v94.LocalizationId = l_Name_0;
return v94;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local v2 = require(l_Parent_1.Packages.Roact);
local l_ContextServices_0 = require(l_Parent_1.Packages.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v5 = require(l_Parent_0.Util.ConstantTemplate);
local v6 = require(l_Parent_0.Util.StateInterfaceTemplates);
local v7 = require(l_Parent_0.Util.StateModelTemplate);
local v8 = require(l_Parent_0.Components.RadioButtonSetPanel);
local v9 = v2.Component:extend("ComponentAnimationPanel");
v9.render = function(v10)
    local v11 = {
        [v5.AnimationStandard] = v7.setAnimationStandard,
        [v5.PlayerChoice] = v7.setAnimationPlayerChoice
    };
    local l_props_0 = v10.props;
    local l_Localization_0 = l_props_0.Localization;
    return v2.createElement(v8, {
        Title = l_Localization_0:getText("General", "TitleAnimation"),
        Buttons = {
            {
                Id = v5.AnimationStandard,
                Title = l_Localization_0:getText("General", "AnimationStandard")
            },
            {
                Id = v5.PlayerChoice,
                Title = l_Localization_0:getText("General", "AnimationPlayerChoice")
            }
        },
        Enabled = v10.props.IsEnabled,
        LayoutOrder = v10.props.LayoutOrder,
        Selected = v6.getStateModelTemplate(v10.props).AnimationValue,
        Mouse = l_props_0.Mouse:get(),
        SelectionChanged = function(v14)
            local v15 = v6.getStateModelTemplateCopy(v10.props);
            v11[v14.Id](v15);
            v10.props.clobberTemplate(v10.props.template, v15);
        end
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Mouse = l_ContextServices_0.Mouse
})(v9));


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local v2 = require(l_Parent_1.Packages.Roact);
local v3 = require(l_Parent_1.Packages.Framework);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_UI_0 = v3.UI;
local l_ToggleButton_0 = l_UI_0.ToggleButton;
local l_TitledFrame_0 = l_UI_0.TitledFrame;
local l_TextInput_0 = l_UI_0.TextInput;
local v10 = require(l_Parent_0.Util.StateInterfaceTheme);
local v11 = nil;
local v12 = nil;
local v13 = v2.PureComponent:extend("AssetInput");
v13.init = function(v14)
    v14.onTextChanged = function(v15)
        v14.currentTextInputBoxText = v15;
    end;
    v14.onFocusLost = function()
        if v14.props.SetValue then
            v14.props.SetValue(v14.currentTextInputBoxText);
        end;
    end;
    v14.onValidateText = function(v16)
        local v17 = true;
        if v16 ~= "" then
            v17 = tonumber(v16) ~= nil;
        end;
        local v18 = nil;
        if not v17 then
            v18 = v14.props.Localization:getText("General", "NumberError");
        end;
        return v17, v18;
    end;
end;
v13.render = function(v19)
    local l_Localization_0 = v19.props.Localization;
    local l_Stylizer_0 = v19.props.Stylizer;
    v19.currentTextInputBoxText = v12(v19);
    local v22 = l_Localization_0:getText("General", "AvatarOverrideItem");
    local v23 = v11(v22, 22, Enum.Font.SourceSans);
    return v2.createElement(l_TitledFrame_0, {
        LayoutOrder = v19.props.LayoutOrder or 1,
        Title = v19.props.Title
    }, {
        ToggleButton = v2.createElement(l_ToggleButton_0, {
            Enabled = v19.props.IsEnabled,
            OnClick = v19.props.SetPlayerChoiceValue,
            Selected = not v19.props.PlayerChoice
        }),
        CustomItemLabel = v2.createElement("TextLabel", {
            Position = UDim2.new(0, 59, 0, 0),
            Size = UDim2.new(0, v23.X, 0, 24),
            BackgroundTransparency = 1,
            TextColor3 = if not v10.getRadioButtonTextColor(v19.props) then l_Stylizer_0.fontStyle.Header.TextColor3 else v10.getRadioButtonTextColor(v19.props),
            TextTransparency = (not v19.props.IsEnabled or v19.props.PlayerChoice) and 0.5 or 0,
            Font = Enum.Font.SourceSans,
            TextSize = 22,
            Text = v22,
            TextXAlignment = Enum.TextXAlignment.Left,
            TextYAlignment = Enum.TextYAlignment.Center
        }),
        InputBox = v2.createElement(l_TextInput_0, {
            Disabled = not v19.props.IsEnabled,
            ErrorText = v19.props.ErrorMessage,
            OnTextChanged = v19.onTextChanged,
            OnFocusLost = v19.onFocusLost,
            OnValidateText = v19.onValidateText,
            PlaceholderText = l_Localization_0:getText("General", "AvatarOverrideId"),
            Position = UDim2.new(0, (59 + v23.X) + 8, 0, 0),
            Width = 175,
            Text = v19.currentTextInputBoxText
        })
    });
end;
v13 = l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Mouse = l_ContextServices_0.Mouse,
    Stylizer = l_ContextServices_0.Stylizer
})(v13);
v11 = function(v24, v25, v26)
    return game:GetService("TextService"):GetTextSize(v24, v25, v26, (Vector2.new(5000, 5000)));
end;
v12 = function(v27)
    if not (v27.props.InputBoxText ~= nil) or v27.props.InputBoxText == "0" then
        return "";
    else
        return v27.props.InputBoxText;
    end;
end;
return v13;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local v2 = require(l_Parent_1.Packages.Roact);
local l_ContextServices_0 = require(l_Parent_1.Packages.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_LayoutOrderIterator_0 = require(l_Parent_1.Packages.Framework).Util.LayoutOrderIterator;
local v6 = require(l_Parent_0.Util.ConstantAvatar);
local v7 = require(l_Parent_0.Util.ConstantLayout);
local v8 = require(l_Parent_0.Util.StateModelTemplate);
local v9 = require(l_Parent_0.Util.StateInterfaceTemplates);
local v10 = require(l_Parent_0.Util.StateInterfaceTheme);
local v11 = require(l_Parent_0.Components.AssetInput);
local v12 = require(l_Parent_0.Components.DividerRow);
local v13 = require(l_Parent_0.Components.TitleBar);
local v14 = v2.Component:extend("ComponentAssetsPanel");
local v15 = nil;
local v16 = nil;
v14.init = function(v17)
    v17.frameRef = v2.createRef();
end;
v14.render = function(v18)
    local v19 = l_LayoutOrderIterator_0.new();
    local v21 = {
        UIListLayoutVertical = v2.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            HorizontalAlignment = Enum.HorizontalAlignment.Center,
            FillDirection = Enum.FillDirection.Vertical,
            Padding = v7.VirticalPadding,
            [v2.Change.AbsoluteContentSize] = function(v20)
                v18.frameRef.current.Size = UDim2.new(1, 0, 0, v20.AbsoluteContentSize.y);
            end
        })
    };
    local l_Localization_0 = v18.props.Localization;
    v15(v18, v21, v19, l_Localization_0);
    v16(v18, v21, v19, l_Localization_0);
    return v2.createElement("Frame", {
        Size = UDim2.new(1, 0, 1, 0),
        BorderSizePixel = 0,
        BackgroundColor3 = v10.getBackgroundColor(v18.props),
        LayoutOrder = v18.props.LayoutOrder,
        [v2.Ref] = v18.frameRef
    }, v21);
end;
v14 = l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Mouse = l_ContextServices_0.Mouse
})(v14);
local function v43(v23, v24, v25, v26)
    local v27 = v9.getStateModelTemplate(v23.props);
    local v28, v29 = v27:getAsset(v25);
    local v30 = v26:getNextOrder();
    local l_Localization_1 = v23.props.Localization;
    local l_createElement_0 = v2.createElement;
    local l_v11_0 = v11;
    local v34 = {
        InputBoxText = tostring(v28),
        Title = v24,
        LayoutOrder = v30,
        PlayerChoice = v29,
        IsEnabled = v23.props.IsEnabled
    };
    local v35 = not not v23.props.AssetOverrideErrors and v23.props.AssetOverrideErrors[v25] or nil;
    v34.ErrorMessage = v35 and l_Localization_1:getText("General", "Error" .. v35);
    v34.Mouse = v23.props.Mouse;
    v34.SetValue = function(v36)
        local v37, _ = string.gsub(v36, " ", "");
        local v39 = string.len(v37) > 0 and tonumber(v36) or 0;
        if v39 ~= v28 then
            local v40 = v8.makeCopy(v27);
            v40:setAsset(v25, v39, not (v39 ~= 0));
            v23.props.clobberTemplate(v23.props.template, v40);
        end;
    end;
    v34.SetPlayerChoiceValue = function(v41)
        local v42 = v8.makeCopy(v27);
        v42:setAsset(v25, nil, not v41);
        v23.props.clobberTemplate(v23.props.template, v42);
    end;
    return l_createElement_0(l_v11_0, v34);
end;
local function v51(v44, v45, v46, v47, v48)
    v45[v47 .. "Separator"] = v2.createElement(v12, {
        ThemeData = v44.props.ThemeData,
        LayoutOrder = v46:getNextOrder()
    });
    v45[v47] = v2.createElement(v13, {
        ThemeData = v44.props.ThemeData,
        LayoutOrder = v46:getNextOrder(),
        IsEnabled = v44.props.IsEnabled,
        Text = v47,
        IsPlayerChoiceTitleStyle = true
    });
    for _, v50 in pairs(v48) do
        v45[v50[1]] = v43(v44, v50[1], v50[2], v46);
    end;
end;
v15 = function(v52, v53, v54, v55)
    v51(v52, v53, v54, v55:getText("General", "TitleBodyParts"), {
        {
            v55:getText("General", "PartFace"),
            v6.AssetTypes.Face
        },
        {
            v55:getText("General", "PartHead"),
            v6.AssetTypes.Head
        },
        {
            v55:getText("General", "PartTorso"),
            v6.AssetTypes.Torso
        },
        {
            v55:getText("General", "PartLeftArm"),
            v6.AssetTypes.LeftArm
        },
        {
            v55:getText("General", "PartRightArm"),
            v6.AssetTypes.RightArm
        },
        {
            v55:getText("General", "PartLeftLeg"),
            v6.AssetTypes.LeftLeg
        },
        {
            v55:getText("General", "PartRightLeg"),
            v6.AssetTypes.RightLeg
        }
    });
end;
v16 = function(v56, v57, v58, v59)
    v51(v56, v57, v58, v59:getText("General", "TitleClothing"), {
        {
            v59:getText("General", "ClothingTShirt"),
            v6.AssetTypes.ShirtGraphic
        },
        {
            v59:getText("General", "ClothingShirt"),
            v6.AssetTypes.Shirt
        },
        {
            v59:getText("General", "ClothingPants"),
            v6.AssetTypes.Pants
        }
    });
end;
return v14;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local v2 = require(l_Parent_1.Packages.Roact);
local l_ContextServices_0 = require(l_Parent_1.Packages.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v5 = require(l_Parent_0.Util.ConstantTemplate);
local v6 = require(l_Parent_0.Util.StateInterfaceTemplates);
local v7 = require(l_Parent_0.Util.StateModelTemplate);
local v8 = require(l_Parent_0.Components.RadioButtonSetPanel);
local v9 = v2.Component:extend("ComponentAvatarTypePanel");
v9.render = function(v10)
    local v11 = {
        [v5.R6] = v7.setRigTypeR6,
        [v5.R15] = v7.setRigTypeR15,
        [v5.PlayerChoice] = v7.setRigTypePlayerChoice
    };
    local l_props_0 = v10.props;
    local l_Localization_0 = l_props_0.Localization;
    return v2.createElement(v8, {
        Title = l_Localization_0:getText("General", "TitleAvatarType"),
        Buttons = {
            {
                Id = v5.R6,
                Title = l_Localization_0:getText("General", "AvatarTypeR6")
            },
            {
                Id = v5.R15,
                Title = l_Localization_0:getText("General", "AvatarTypeR15")
            },
            {
                Id = v5.PlayerChoice,
                Title = l_Localization_0:getText("General", "AvatarTypePlayerChoice")
            }
        },
        Enabled = v10.props.IsEnabled,
        LayoutOrder = v10.props.LayoutOrder,
        Selected = v6.getStateModelTemplate(v10.props).RigTypeValue,
        SubDescription = not not v10.props.IsGameShutdownRequired and l_Localization_0:getText("General", "AvatarTypeWarning") or nil,
        Mouse = l_props_0.Mouse:get(),
        SelectionChanged = function(v14)
            local v15 = v6.getStateModelTemplateCopy(v10.props);
            v11[v14.Id](v15);
            v10.props.clobberTemplate(v10.props.template, v15);
        end
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Mouse = l_ContextServices_0.Mouse
})(v9));


local l_Parent_0 = script.Parent.Parent;
local v1 = require(script.Parent.Parent.Parent.Parent.Packages.Roact);
local v2 = require(l_Parent_0.Util.LifetimeManagerAvatar);
local v3 = v1.Component:extend("ComponentAvatarUpdater");
v3.applyRigUpdates = function(v4)
    if not (not v4.props.StateTemplates or not v4.props.StateTemplates.templates) then
        v2.apply(v4.props.StateTemplates.templates);
    end;
end;
v3.didMount = function(v5)
    v5:applyRigUpdates();
end;
v3.render = function(_)
    return nil;
end;
v3.didUpdate = function(v7)
    v7:applyRigUpdates();
end;
v3.willUnmount = function(_)
    v2:destroy();
end;
return v3;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local v2 = require(l_Parent_1.Packages.Roact);
local l_ContextServices_0 = require(l_Parent_1.Packages.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v5 = require(l_Parent_0.Util.ConstantTemplate);
local v6 = require(l_Parent_0.Util.StateInterfaceTemplates);
local v7 = require(l_Parent_0.Util.StateModelTemplate);
local v8 = require(l_Parent_0.Components.RadioButtonSetPanel);
local v9 = v2.Component:extend("ComponentCollisionPanel");
v9.render = function(v10)
    local v11 = {
        [v5.OuterCollision] = v7.setCollisionOuterBox,
        [v5.InnerCollision] = v7.setCollisionInnerBox
    };
    local l_props_0 = v10.props;
    local l_Localization_0 = l_props_0.Localization;
    return v2.createElement(v8, {
        Title = l_Localization_0:getText("General", "TitleCollision"),
        Buttons = {
            {
                Id = v5.OuterCollision,
                Title = l_Localization_0:getText("General", "CollisionOuterBox")
            },
            {
                Id = v5.InnerCollision,
                Title = l_Localization_0:getText("General", "CollisionInnerBox")
            }
        },
        Enabled = v10.props.IsEnabled,
        LayoutOrder = v10.props.LayoutOrder,
        Selected = v6.getStateModelTemplate(v10.props).CollisionValue,
        Mouse = l_props_0.Mouse:get(),
        SelectionChanged = function(v14)
            local v15 = v6.getStateModelTemplateCopy(v10.props);
            v11[v14.Id](v15);
            v10.props.clobberTemplate(v10.props.template, v15);
        end
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Mouse = l_ContextServices_0.Mouse
})(v9));


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local v2 = require(l_Parent_1.Packages.Roact);
local l_LayoutOrderIterator_0 = require(l_Parent_1.Packages.Framework).Util.LayoutOrderIterator;
local v4 = require(l_Parent_0.Util.StateInterfaceTheme);
return function(v5)
    return v2.createElement("Frame", {
        LayoutOrder = v5.LayoutOrder,
        Size = UDim2.new(1, 0, 0, 2),
        BorderSizePixel = 0,
        BackgroundTransparency = 1
    }, {
        UIListLayoutHorizontal = v2.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            VerticalAlignment = Enum.VerticalAlignment.Center,
            FillDirection = Enum.FillDirection.Horizontal
        }),
        DividerFrame = v2.createElement("Frame", {
            Size = UDim2.new(1, 0, 0, 1),
            LayoutOrder = l_LayoutOrderIterator_0.new():getNextOrder(),
            BorderSizePixel = 0,
            BackgroundColor3 = v4.getDividerColor(v5)
        })
    });
end;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local v2 = require(l_Parent_1.Packages.Roact);
local l_LayoutOrderIterator_0 = require(l_Parent_1.Packages.Framework).Util.LayoutOrderIterator;
local v4 = require(l_Parent_0.Util.ConstantLayout);
local v5 = require(l_Parent_0.Util.StateInterfaceTheme);
local v6 = require(l_Parent_0.Components.PublishingHint);
local v7 = require(l_Parent_0.Components.PresetsPanel);
local v8 = require(l_Parent_0.Components.AvatarTypePanel);
local v9 = require(l_Parent_0.Components.AnimationPanel);
local v10 = require(l_Parent_0.Components.CollisionPanel);
local v11 = require(l_Parent_0.Components.ScalePanel);
local v12 = require(l_Parent_0.Components.AssetsPanel);
local v13 = v2.Component:extend("ComponentMorpherTemplate");
v13.init = function(v14)
    v14.frameRef = v2.createRef();
end;
v13.render = function(v15)
    local v16 = l_LayoutOrderIterator_0.new();
    local function v17()
        return {
            ThemeData = v15.props.ThemeData,
            LayoutOrder = v16:getNextOrder(),
            template = v15.props.template,
            StateTemplates = v15.props.StateTemplates,
            IsEnabled = v15.props.IsEnabled,
            IsGameShutdownRequired = v15.props.IsGameShutdownRequired,
            AssetOverrideErrors = v15.props.AssetOverrideErrors,
            Mouse = v15.props.Mouse,
            clobberTemplate = v15.props.clobberTemplate
        };
    end;
    local function _()
        local v18 = v17();
        v18.IsEnabled = v15.props.IsPlacePublished;
        return v18;
    end;
    local l_createElement_0 = v2.createElement;
    local v21 = "Frame";
    local v22 = {
        Size = UDim2.new(1, 0, 1, 0),
        BorderSizePixel = 0,
        BackgroundColor3 = v5.getBackgroundColor(v15.props),
        [v2.Ref] = v15.frameRef
    };
    local v24 = {
        UIListLayoutVertical = v2.createElement("UIListLayout", {
            SortOrder = Enum.SortOrder.LayoutOrder,
            HorizontalAlignment = Enum.HorizontalAlignment.Center,
            FillDirection = Enum.FillDirection.Vertical,
            Padding = v4.VirticalPadding,
            [v2.Change.AbsoluteContentSize] = function(v23)
                v15.frameRef.current.Size = UDim2.new(1, 0, 0, v23.AbsoluteContentSize.y);
            end
        })
    };
    local l_createElement_1 = v2.createElement;
    local l_v6_0 = v6;
    local v27 = v17();
    v27.IsEnabled = v15.props.IsPlacePublished;
    v24.PublishingHint = l_createElement_1(l_v6_0, v27);
    v24.PresetsPanel = v2.createElement(v7, (v17()));
    v24.AvatarTypePanel = v2.createElement(v8, (v17()));
    v24.AnimationPanel = v2.createElement(v9, (v17()));
    v24.CollisionPanel = v2.createElement(v10, (v17()));
    v24.ScalePanel = v2.createElement(v11, (v17()));
    v24.AssetsPanel = v2.createElement(v12, (v17()));
    return l_createElement_0(v21, v22, v24);
end;
return v13;


local l_Parent_0 = script.Parent.Parent;
local v1 = require(script.Parent.Parent.Parent.Parent.Packages.Roact);
local v2 = require(l_Parent_0.Components.MorpherTemplate);
local v3 = v1.Component:extend("ComponentMorpherTemplateContainer");
v3.init = function(v4)
    v4.frameRef = v1.createRef();
end;
v3.render = function(v5)
    local v7 = {
        UIListLayoutVertical = v1.createElement("UIListLayout", {
            [v1.Change.AbsoluteContentSize] = function(v6)
                v5.frameRef.current.Size = UDim2.new(1, 0, 0, v6.AbsoluteContentSize.y);
            end
        })
    };
    if not (not v5.props.StateTemplates or not v5.props.StateTemplates.templates) then
        for v8, _ in pairs(v5.props.StateTemplates.templates) do
            v7[tostring(v8)] = v1.createElement(v2, {
                ThemeData = v5.props.ThemeData,
                template = v8,
                StateTemplates = v5.props.StateTemplates,
                IsEnabled = v5.props.IsEnabled,
                IsGameShutdownRequired = v5.props.IsGameShutdownRequired,
                AssetOverrideErrors = v5.props.AssetOverrideErrors,
                Mouse = v5.props.Mouse,
                IsPlacePublished = v5.props.IsPlacePublished,
                clobberTemplate = v5.props.clobberTemplate
            });
            break;
        end;
    end;
    return v1.createElement("Frame", {
        Size = UDim2.new(1, 0, 1, 0),
        BorderSizePixel = 0,
        BackgroundTransparency = 1,
        [v1.Ref] = v5.frameRef
    }, v7);
end;
return v3;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local v2 = require(l_Parent_1.Packages.Roact);
local v3 = require(l_Parent_1.Packages.RoactRodux);
local l_RoactStudioWidgets_0 = l_Parent_1.Packages.RoactStudioWidgets;
local l_ContextServices_0 = require(l_Parent_1.Packages.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v7 = require(l_Parent_0.Util.ConstantAvatar);
local v8 = require(l_Parent_0.Util.StateModelTemplate);
local v9 = require(l_RoactStudioWidgets_0.ButtonBar);
local v10 = v2.Component:extend("ComponentPresetsPanel");
v10.init = function(v11)
    v11.createDefaultModel = function(v12)
        local v13 = v8.new(v12);
        v13:setScaleHeightMin(1, v12);
        v13:setScaleHeightMax(1, v12);
        v13:setScaleWidthMin(1, v12);
        v13:setScaleWidthMax(1, v12);
        v13:setScaleHeadMin(1, v12);
        v13:setScaleHeadMax(1, v12);
        v13:setScaleBodyTypeMin(0, v12);
        v13:setScaleBodyTypeMax(0, v12);
        v13:setScaleProportionMin(0, v12);
        v13:setScaleProportionMax(0, v12);
        v13:setRigTypeR15();
        return v13;
    end;
    v11.createClassicModel1 = function(v14)
        local v15 = v8.new(v14);
        v15:setScaleHeightMin(1, v14);
        v15:setScaleHeightMax(1, v14);
        v15:setScaleWidthMin(1, v14);
        v15:setScaleWidthMax(1, v14);
        v15:setScaleHeadMin(1, v14);
        v15:setScaleHeadMax(1, v14);
        v15:setScaleBodyTypeMin(0, v14);
        v15:setScaleBodyTypeMax(0, v14);
        v15:setScaleProportionMin(0, v14);
        v15:setScaleProportionMax(0, v14);
        v15:setRigTypeR15();
        return v15;
    end;
    v11.createClassicModel2 = function(v16)
        local v17 = v8.new(v16);
        v17:setScaleHeightMin(1, v16);
        v17:setScaleHeightMax(1, v16);
        v17:setScaleWidthMin(1, v16);
        v17:setScaleWidthMax(1, v16);
        v17:setScaleHeadMin(1, v16);
        v17:setScaleHeadMax(1, v16);
        v17:setScaleBodyTypeMin(0, v16);
        v17:setScaleBodyTypeMax(0, v16);
        v17:setScaleProportionMin(0, v16);
        v17:setScaleProportionMax(0, v16);
        v17:setRigTypeR15();
        v17:setAsset(v7.AssetTypes.Head, 2432102561, false);
        return v17;
    end;
    v11.createRthroModel = function(v18)
        local v19 = v8.new(v18);
        v19:setScaleHeightMin(1, v18);
        v19:setScaleHeightMax(1, v18);
        v19:setScaleWidthMin(1, v18);
        v19:setScaleWidthMax(1, v18);
        v19:setScaleHeadMin(1, v18);
        v19:setScaleHeadMax(1, v18);
        v19:setScaleBodyTypeMin(1, v18);
        v19:setScaleBodyTypeMax(1, v18);
        v19:setScaleProportionMin(0, v18);
        v19:setScaleProportionMax(0, v18);
        v19:setRigTypeR15();
        return v19;
    end;
    v11.createPlayerChoiceModel = function(v20)
        return v8.new(v20);
    end;
end;
v10.render = function(v21)
    local l_props_0 = v21.props;
    local l_Localization_0 = l_props_0.Localization;
    local v24 = l_props_0.Mouse:get();
    local l_IsEnabled_0 = l_props_0.IsEnabled;
    return v2.createElement(v9, {
        Padding = 10,
        Buttons = {
            {
                Name = l_Localization_0:getText("General", "PresetDefault"),
                Enabled = l_IsEnabled_0,
                Value = v21.createDefaultModel,
                ShowPressed = true,
                Mouse = v24
            },
            {
                Name = l_Localization_0:getText("General", "PresetClassicScale"),
                Enabled = l_IsEnabled_0,
                Value = v21.createClassicModel1,
                ShowPressed = true,
                Mouse = v24
            },
            {
                Name = l_Localization_0:getText("General", "PresetFullClassic"),
                Enabled = l_IsEnabled_0,
                Value = v21.createClassicModel2,
                ShowPressed = true,
                Mouse = v24
            },
            {
                Name = l_Localization_0:getText("General", "PresetRthro"),
                Enabled = l_IsEnabled_0,
                Value = v21.createRthroModel,
                ShowPressed = true,
                Mouse = v24
            },
            {
                Name = l_Localization_0:getText("General", "PresetPlayerChoice"),
                Enabled = l_IsEnabled_0,
                Value = v21.createPlayerChoiceModel,
                ShowPressed = true,
                Mouse = v24
            }
        },
        HorizontalAlignment = Enum.HorizontalAlignment.Left,
        Title = l_Localization_0:getText("General", "TitlePresets"),
        ButtonClicked = function(v26)
            v21.props.clobberTemplate(v21.props.template, v26(v21.props.boundaries));
        end,
        ShowPressed = true,
        LayoutOrder = v21.props.LayoutOrder
    });
end;
return (v3.UNSTABLE_connect2(function(v27, _)
    return {
        boundaries = v27.MorpherEditorRoot.StateMorpher.StateSettings.scaleBoundaries.boundaries
    };
end)((l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Mouse = l_ContextServices_0.Mouse
})(v10))));


local l_StudioService_0 = game:GetService("StudioService");
local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local v3 = require(l_Parent_1.Packages.Roact);
local l_ContextServices_0 = require(l_Parent_1.Packages.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_RoactStudioWidgets_0 = l_Parent_1.Packages.RoactStudioWidgets;
local v7 = require(l_Parent_0.Util.StateInterfaceTheme);
local v8 = require(l_RoactStudioWidgets_0.Hyperlink);
local v9 = v3.PureComponent:extend("PublishingHint");
v9.render = function(v10)
    local l_props_0 = v10.props;
    local l_Localization_0 = l_props_0.Localization;
    local l_Stylizer_0 = v10.props.Stylizer;
    if not l_props_0.IsEnabled then
        local function _(v14, v15, v16)
            return game:GetService("TextService"):GetTextSize(v14, v15, v16, (Vector2.new(5000, 5000)));
        end;
        local v18 = l_Localization_0:getText("General", "PublishingHintLink");
        local l_TextSize_0 = game:GetService("TextService"):GetTextSize(v18, 22, Enum.Font.SourceSans, (Vector2.new(5000, 5000)));
        return v3.createElement("Frame", {
            Size = UDim2.new(1, 0, 0, l_TextSize_0.Y),
            BackgroundTransparency = 1,
            LayoutOrder = l_props_0.LayoutOrder
        }, {
            HyperLink = v3.createElement(v8, {
                Text = v18,
                Size = UDim2.new(0, l_TextSize_0.X, 0, l_TextSize_0.Y),
                Enabled = true,
                Mouse = l_props_0.Mouse,
                OnClick = function()
                    l_StudioService_0:ShowPublishToRoblox();
                end
            }),
            TextLabel = v3.createElement("TextLabel", {
                BackgroundTransparency = 1,
                Position = UDim2.new(0, l_TextSize_0.X, 0, 0),
                Size = UDim2.new(1, 0, 1, 0),
                TextColor3 = if not v7.getRadioButtonTextColor(l_props_0) then l_Stylizer_0.fontStyle.Header.TextColor3 else v7.getRadioButtonTextColor(l_props_0),
                Font = Enum.Font.SourceSans,
                TextSize = 22,
                TextXAlignment = Enum.TextXAlignment.Left,
                Text = l_Localization_0:getText("General", "PublishingHintLinkExplanation")
            })
        });
    else
        return nil;
    end;
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer
})(v9));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.RoactStudioWidgets.RadioButtonSet);
local v3 = v1.Component:extend("ComponentRadioButtonSetPanel");
v3.render = function(v4)
    if v4.props.IsVisible == nil and true or v4.props.IsVisible then
        return v1.createElement(v2, {
            Title = v4.props.Title,
            Buttons = v4.props.Buttons,
            Enabled = v4.props.Enabled,
            LayoutOrder = v4.props.LayoutOrder,
            Selected = v4.props.Selected,
            SubDescription = v4.props.SubDescription,
            SelectionChanged = v4.props.SelectionChanged,
            Mouse = v4.props.Mouse
        });
    else
        return v1.createElement("Frame", {
            Size = UDim2.new(0, 0, 0, 0),
            BorderSizePixel = 0
        });
    end;
end;
return v3;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local v2 = require(l_Parent_1.Packages.Roact);
local v3 = require(l_Parent_1.Packages.Rodux);
local v4 = require(l_Parent_1.Packages.RoactRodux);
local v5 = require(l_Parent_0.Reducers.MorpherEditorRoot);
local v6 = require(l_Parent_0.Components.RootPanel);
local v7 = v2.Component:extend("ComponentRootApp");
v7.init = function(v8)
    v8.state = {
        store = v3.Store.new(v5, nil, {
            v3.thunkMiddleware
        })
    };
end;
v7.render = function(v9)
    return v2.createElement(v4.StoreProvider, {
        store = v9.state.store
    }, {
        v2.createElement(v6, {
            Mouse = v9.props.Mouse
        })
    });
end;
return v7;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local v2 = require(l_Parent_1.Packages.Roact);
local v3 = require(l_Parent_1.Packages.RoactRodux);
local l_RoactStudioWidgets_0 = l_Parent_1.Packages.RoactStudioWidgets;
local v5 = require(l_Parent_0.Actions.TemplatesAdd);
local v6 = require(l_Parent_0.Actions.TemplatesClobberTemplate);
local v7 = require(l_Parent_0.Components.AvatarUpdater);
local v8 = require(l_Parent_0.Components.MorpherTemplateContainer);
local v9 = require(l_RoactStudioWidgets_0.StyledScrollingFrame);
local v10 = v2.Component:extend("ComponentRootPanel");
v10.init = function(v11)
    v11.canvasRef = v2.createRef();
    v11.contentHeightChanged = function(v12)
        local l_current_0 = v11.canvasRef.current;
        if l_current_0 then
            l_current_0.CanvasSize = UDim2.new(1, 0, 0, v12);
        end;
    end;
end;
v10.didMount = function(v14)
    v14.props.addTemplates();
end;
v10.render = function(v15)
    return v2.createElement(v9, {
        [v2.Ref] = v15.canvasRef
    }, {
        v2.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, 0),
            BorderSizePixel = 0,
            BackgroundTransparency = 1
        }, {
            MorpherTemplateContainer = v2.createElement(v8, {
                ThemeData = v15.props.StateTheme,
                StateTemplates = v15.props.StateTemplates,
                IsEnabled = true,
                Mouse = v15.props.Mouse,
                clobberTemplate = v15.props.clobberTemplate,
                ContentHeightChanged = v15.contentHeightChanged
            }),
            RigUpdater = if not game:GetFastFlag("DisableGameSettingsAvatarPreview") then v2.createElement(v7, {
                StateTemplates = v15.props.StateTemplates
            }) else nil
        })
    });
end;
return (v3.UNSTABLE_connect2(function(v16, _)
    return {
        StateTemplates = v16.MorpherEditorRoot.StateMorpher.StateTemplates,
        StateTheme = v16.MorpherEditorRoot.StateMorpher.StateTheme
    };
end, function(v18)
    return {
        addTemplates = function()
            return v18(v5());
        end,
        clobberTemplate = function(v19, v20)
            v18(v6(v19, v20));
        end
    };
end)(v10));


local l_Parent_0 = script.Parent.Parent;
local v1 = require(script.Parent.Parent.Parent.Parent.Packages.Roact);
local v2 = require(l_Parent_0.Util.StateModelTemplate);
local v3 = require(l_Parent_0.Components.AvatarUpdater);
local v4 = require(l_Parent_0.Components.MorpherTemplateContainer);
local v5 = v1.Component:extend("ComponentRootPanelExternal");
local v6 = nil;
v5.init = function(v7)
    local v8, v9 = v1.createBinding(0);
    v7.absoluteSizeChange = v8;
    v7.updateAbsoluteSizeChange = v9;
end;
v5.render = function(v10)
    return v1.createElement("Frame", {
        Size = v10.absoluteSizeChange:map(function(v11)
            return UDim2.new(1, 0, 0, v11);
        end),
        BorderSizePixel = 0,
        BackgroundTransparency = 1
    }, {
        v1.createElement("UIListLayout", {
            [v1.Change.AbsoluteContentSize] = function(v12)
                v10.updateAbsoluteSizeChange(v12.AbsoluteContentSize.y);
            end
        }),
        v1.createElement(v4, {
            ThemeData = {
                theme = v10.props.ThemeData
            },
            StateTemplates = {
                templates = {
                    v2.fromUniverseData(v10.props)
                }
            },
            IsEnabled = v10.props.IsEnabled,
            IsGameShutdownRequired = v10.props.IsGameShutdownRequired,
            AssetOverrideErrors = v10.props.AssetOverrideErrors,
            Mouse = v10.props.Mouse,
            IsPlacePublished = v10.props.IsPlacePublished,
            clobberTemplate = function(_, v14)
                v6(v10, v14);
            end
        }),
        if not game:GetFastFlag("DisableGameSettingsAvatarPreview") then v1.createElement(v3, {
            StateTemplates = v10.props.StateTemplates
        }) else nil
    });
end;
v6 = function(v15, v16)
    if not (not v16 or not v15.props.IsEnabled) then
        local v17 = v2.fromUniverseData(v15.props);
        if not v16:isAvatarTypeEqualTo(v17) then
            v15.props.OnAvatarTypeChanged(v16.RigTypeValue);
        end;
        if not v16:isAnimationEqualTo(v17) then
            v15.props.OnAvatarAnimationChanged(v16.AnimationValue);
        end;
        if not v16:isCollisionEqualTo(v17) then
            v15.props.OnAvatarCollisionChanged(v16.CollisionValue);
        end;
        if not v16:areAssetsEqualTo(v17) then
            v15.props.OnAvatarAssetOverridesChanged(v16:extractAssetOverridesForSaving());
        end;
        if not v16:areMinScalesEqualTo(v17) then
            v15.props.OnAvatarScalingMinChanged(v16:extractScalingMinForSaving());
        end;
        if not v16:areMaxScalesEqualTo(v17) then
            v15.props.OnAvatarScalingMaxChanged(v16:extractScalingMaxForSaving());
        end;
    end;
end;
return v5;


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local v2 = require(l_Parent_1.Packages.Roact);
local v3 = require(l_Parent_1.Packages.RoactRodux);
local l_RoactStudioWidgets_0 = l_Parent_1.Packages.RoactStudioWidgets;
local l_ContextServices_0 = require(l_Parent_1.Packages.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_LayoutOrderIterator_0 = require(l_Parent_1.Packages.Framework).Util.LayoutOrderIterator;
local v8 = require(l_Parent_0.Util.ConstantLayout);
local v9 = require(l_Parent_0.Util.StateInterfaceSettings);
local v10 = require(l_Parent_0.Util.StateInterfaceTemplates);
local v11 = require(l_Parent_0.Util.StateInterfaceTheme);
local v12 = require(l_Parent_0.Util.StateModelTemplate);
local v13 = require(l_Parent_0.Components.DividerRow);
local v14 = require(l_RoactStudioWidgets_0.RangeSlider);
local v15 = require(l_Parent_0.Components.TitleBar);
local v16 = v2.Component:extend("ComponentScalePanel");
local function v48(v17, v18, v19, v20, v21, v22, v23, v24)
    local v25 = v10.getStateModelTemplate(v17.props);
    local l_boundaries_0 = v17.props.StateSettings.scaleBoundaries.boundaries;
    local function _(v27)
        local v28 = v27 * 100;
        return not not (v28 - math.floor(v28) >= 0.5) and math.ceil(v28) or math.floor(v28);
    end;
    local function v33(v30)
        v30 = v30 / 100;
        if v20.increment > 0.001 then
            local v31 = math.max(v20.increment * math.floor(v30 / v20.increment), v20.min);
            local v32 = math.min(v31 + v20.increment, v20.max);
            return math.abs(v31 - v30) < math.abs(v32 - v30) and v31 or v32;
        else
            return (math.min(v20.max, (math.max(v20.min, v30))));
        end;
    end;
    local v34 = v20.min * 100;
    local v35 = not not (v34 - math.floor(v34) >= 0.5) and math.ceil(v34) or math.floor(v34);
    local v36 = v20.max * 100;
    local v37 = not not (v36 - math.floor(v36) >= 0.5) and math.ceil(v36) or math.floor(v36);
    v34 = v17.props;
    v36 = v34.Localization;
    local l_Mouse_0 = v34.Mouse;
    local l_createElement_0 = v2.createElement;
    local l_v14_0 = v14;
    local v41 = {
        LayoutOrder = v18,
        Title = v19,
        Enabled = v17.props.IsEnabled,
        Min = v35,
        Max = v37
    };
    local v42 = v20.increment * 100;
    v41.SnapIncrement = not not (v42 - math.floor(v42) >= 0.5) and math.ceil(v42) or math.floor(v42);
    v42 = v21(v25) * 100;
    v41.LowerRangeValue = not not (v42 - math.floor(v42) >= 0.5) and math.ceil(v42) or math.floor(v42);
    v42 = v22(v25) * 100;
    v41.UpperRangeValue = not not (v42 - math.floor(v42) >= 0.5) and math.ceil(v42) or math.floor(v42);
    v41.Mouse = l_Mouse_0:get();
    v41.MinLabelText = v36:getText("General", "ScaleSliderLabel", {
        number = tostring(v35)
    });
    v41.MaxLabelText = v36:getText("General", "ScaleSliderLabel", {
        number = tostring(v37)
    });
    v41.UnitsLabelText = v36:getText("General", "ScaleSliderUnits");
    v41.SetValues = function(v43, v44)
        local v45 = v12.makeCopy(v25);
        v23(v45, math.min(v22(v25), (v33(v43))), l_boundaries_0);
        v24(v45, math.max(v21(v25), (v33(v44))), l_boundaries_0);
        v17.props.clobberTemplate(v17.props.template, v45);
    end;
    v41.SetUpperRangeValue = function(v46)
        local v47 = v12.makeCopy(v10.getStateModelTemplate(v17.props));
        v24(v47, math.max(v21(v47), (v33(v46))), l_boundaries_0);
        v17.props.clobberTemplate(v17.props.template, v47);
    end;
    return l_createElement_0(l_v14_0, v41);
end;
v16.init = function(v49)
    v49.frameRef = v2.createRef();
end;
v16.render = function(v50)
    local l_Localization_0 = v50.props.Localization;
    if not v10.getStateModelTemplate(v50.props):isRigTypeR6() then
        local v52 = l_LayoutOrderIterator_0.new();
        local v54 = {
            UIListLayoutVertical = v2.createElement("UIListLayout", {
                SortOrder = Enum.SortOrder.LayoutOrder,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                FillDirection = Enum.FillDirection.Vertical,
                Padding = v8.VirticalPadding,
                [v2.Change.AbsoluteContentSize] = function(v53)
                    v50.frameRef.current.Size = UDim2.new(1, 0, 0, v53.AbsoluteContentSize.y);
                end
            }),
            ComponentDividerRowAboveScale = v2.createElement(v13, {
                ThemeData = v50.props.ThemeData,
                LayoutOrder = v52:getNextOrder()
            }),
            ComponentTitleBar = v2.createElement(v15, {
                ThemeData = v50.props.ThemeData,
                LayoutOrder = v52:getNextOrder(),
                IsEnabled = v50.props.IsEnabled,
                Text = l_Localization_0:getText("General", "TitleScale"),
                IsPlayerChoiceTitleStyle = false
            })
        };
        local l_v12_0 = v12;
        for _, v57 in ipairs({
            {
                l_Localization_0:getText("General", "ScaleHeight"),
                v9.getHeightBoundaries(v50.props),
                l_v12_0.getScaleHeightMin,
                l_v12_0.getScaleHeightMax,
                l_v12_0.setScaleHeightMin,
                l_v12_0.setScaleHeightMax
            },
            {
                l_Localization_0:getText("General", "ScaleWidth"),
                v9.getWidthBoundaries(v50.props),
                l_v12_0.getScaleWidthMin,
                l_v12_0.getScaleWidthMax,
                l_v12_0.setScaleWidthMin,
                l_v12_0.setScaleWidthMax
            },
            {
                l_Localization_0:getText("General", "ScaleHead"),
                v9.getHeadBoundaries(v50.props),
                l_v12_0.getScaleHeadMin,
                l_v12_0.getScaleHeadMax,
                l_v12_0.setScaleHeadMin,
                l_v12_0.setScaleHeadMax
            },
            {
                l_Localization_0:getText("General", "ScaleBodyType"),
                v9.getBodyTypeBoundaries(v50.props),
                l_v12_0.getScaleBodyTypeMin,
                l_v12_0.getScaleBodyTypeMax,
                l_v12_0.setScaleBodyTypeMin,
                l_v12_0.setScaleBodyTypeMax
            },
            {
                l_Localization_0:getText("General", "ScaleProportions"),
                v9.getProportionBoundaries(v50.props),
                l_v12_0.getScaleProportionMin,
                l_v12_0.getScaleProportionMax,
                l_v12_0.setScaleProportionMin,
                l_v12_0.setScaleProportionMax
            }
        }) do
            v54[v57[1]] = v48(v50, v52:getNextOrder(), v57[1], v57[2], v57[3], v57[4], v57[5], v57[6]);
        end;
        return v2.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, 0),
            BorderSizePixel = 0,
            BackgroundColor3 = v11.getBackgroundColor(v50.props),
            LayoutOrder = v50.props.LayoutOrder,
            [v2.Ref] = v50.frameRef
        }, v54);
    else
        return nil;
    end;
end;
return (v3.UNSTABLE_connect2(function(v58, _)
    return {
        StateSettings = v58.MorpherEditorRoot.StateMorpher.StateSettings
    };
end)((l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Mouse = l_ContextServices_0.Mouse
})(v16))));


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local v2 = require(l_Parent_1.Packages.Roact);
local v3 = require(l_Parent_1.Packages.Framework);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_TitledFrame_0 = v3.UI.TitledFrame;
local v7 = require(l_Parent_0.Util.StateInterfaceTheme);
local v8 = v2.Component:extend("ComponentTitleBar");
v8.render = function(v9)
    local l_Localization_0 = v9.props.Localization;
    local l_Stylizer_0 = v9.props.Stylizer;
    local v12 = {};
    if v9.props.IsPlayerChoiceTitleStyle then
        v12.PlayerChoiceLabel = v2.createElement("TextLabel", {
            BackgroundTransparency = 1,
            BorderSizePixel = 0,
            TextXAlignment = Enum.TextXAlignment.Left,
            TextYAlignment = Enum.TextYAlignment.Top,
            TextColor3 = if not v7.getRadioButtonTextColor(v9.props) then l_Stylizer_0.fontStyle.Header.TextColor3 else v7.getRadioButtonTextColor(v9.props),
            Font = Enum.Font.SourceSans,
            TextSize = 22,
            Text = l_Localization_0:getText("General", "AvatarOverridePrompt")
        });
    end;
    return v2.createElement(l_TitledFrame_0, {
        LayoutOrder = v9.props.LayoutOrder or 1,
        Title = v9.props.Text
    }, v12);
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer
})(v8));


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Reducers.MorpherEditorSettings);
local v2 = require(l_Parent_0.Reducers.MorpherEditorTemplates);
return function(v3, v4)
    v3 = v3 or {
        StateMorpher = {}
    };
    return {
        StateMorpher = {
            StateTemplates = v2(v3.StateMorpher.StateTemplates, v4),
            StateSettings = v1(v3.StateMorpher.StateSettings, v4)
        }
    };
end;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Cryo);
local v2 = require(l_Parent_0.Packages.Rodux);
local function v3()
    return {
        scaleBoundaries = {
            boundaries = {}
        }
    };
end;
return v2.createReducer(v3(), {
    ResetStore = function(_, _)
        return (v3());
    end,
    SettingsSaveScaleBoundaries = function(v6, v7)
        return v1.Dictionary.join(v6, {
            scaleBoundaries = v1.Dictionary.join(v6.scaleBoundaries, {
                boundaries = v7.rulesData.scales
            })
        });
    end
});


local l_Parent_0 = script.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local v2 = require(l_Parent_1.Packages.Cryo);
local v3 = require(l_Parent_1.Packages.Rodux);
local v4 = require(l_Parent_0.Util.UtilityFunctionsTable);
local v5 = {
    templates = {}
};
return v3.createReducer(v5, {
    ResetStore = function(_, _)
        return v5;
    end,
    TemplatesAdd = function(v8, v9)
        return v2.Dictionary.join(v8, {
            templates = v9.templatesArrayToAdd
        });
    end,
    TemplatesClobberTemplate = function(v10, v11)
        return v2.Dictionary.join(v10, {
            templates = v4.immutableSetExistingDictionaryEntry(v10.templates, v11.templateToClobber, v11.newTemplateModel)
        });
    end
});


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Util.AvatarRigManager);
local v2 = require(l_Parent_0.Networking.AvatarWebAPI);
local v3 = require(l_Parent_0.Util.ConstantAvatar);
local v4 = {};
v4.__index = v4;
local v5 = nil;
local v6 = nil;
local v7 = nil;
v4.loadWithTemplates = function(v8, v9, v10)
    local v11 = setmetatable({}, v4);
    v11.avatarData = v5();
    if v11.avatarData then
        v11.playerChoiceAvatarType = v3.AvatarType[v11.avatarData.playerAvatarType];
        v11.characterManager = v1.new(v8, v9);
        v11:applyTemplates(v10);
        return v11;
    else
        return ;
    end;
end;
v4.applyTemplates = function(v12, v13)
    local v14 = v7(v12);
    local v15 = v13 and v13[next(v13)];
    v6(v12, v15);
    if v15 then
        v15:apply(v14);
    end;
    spawn(function()
        if v12.characterManager then
            v12.characterManager:applyDescription(v14);
        end;
    end);
end;
v4.setPosition = function(v16, v17)
    v16.characterManager:setPosition(v17);
end;
v4.destroy = function(v18)
    v18.characterManager:stop();
end;
local function v23(v19, v20)
    if v20 then
        for _, v22 in ipairs(v20) do
            if v3.AssetTypes.Hat == v22.assetType.id then
                v19.HatAccessory = v19.HatAccessory .. "," .. tostring(v22.id);
            elseif v3.AssetTypes.Hair == v22.assetType.id then
                v19.HairAccessory = v19.HairAccessory .. "," .. tostring(v22.id);
            elseif v3.AssetTypes.FaceAccessory == v22.assetType.id then
                v19.FaceAccessory = v19.FaceAccessory .. "," .. tostring(v22.id);
            elseif v3.AssetTypes.Neck == v22.assetType.id then
                v19.NeckAccessory = v19.NeckAccessory .. "," .. tostring(v22.id);
            elseif v3.AssetTypes.Shoulder == v22.assetType.id then
                v19.ShouldersAccessory = v19.ShouldersAccessory .. "," .. tostring(v22.id);
            elseif v3.AssetTypes.Front == v22.assetType.id then
                v19.FrontAccessory = v19.FrontAccessory .. "," .. tostring(v22.id);
            elseif v3.AssetTypes.Back == v22.assetType.id then
                v19.BackAccessory = v19.BackAccessory .. "," .. tostring(v22.id);
            elseif v3.AssetTypes.Waist == v22.assetType.id then
                v19.WaistAccessory = v19.WaistAccessory .. "," .. tostring(v22.id);
            elseif v3.AssetTypes.Shirt == v22.assetType.id then
                v19.Shirt = v22.id;
            elseif v3.AssetTypes.ShirtGraphic == v22.assetType.id then
                v19.GraphicTShirt = v22.id;
            elseif v3.AssetTypes.Pants == v22.assetType.id then
                v19.Pants = v22.id;
            elseif v3.AssetTypes.Face == v22.assetType.id then
                v19.Face = v22.id;
            elseif v3.AssetTypes.Head == v22.assetType.id then
                v19.Head = v22.id;
            elseif v3.AssetTypes.Torso == v22.assetType.id then
                v19.Torso = v22.id;
            elseif v3.AssetTypes.LeftArm == v22.assetType.id then
                v19.LeftArm = v22.id;
            elseif v3.AssetTypes.RightArm == v22.assetType.id then
                v19.RightArm = v22.id;
            elseif v3.AssetTypes.LeftLeg == v22.assetType.id then
                v19.LeftLeg = v22.id;
            elseif v3.AssetTypes.RightLeg == v22.assetType.id then
                v19.RightLeg = v22.id;
            end;
        end;
    end;
end;
local function _(v24, v25)
    if v25 then
        v24.HeightScale = v25.height or v24.HeightScale;
        v24.WidthScale = v25.width or v24.WidthScale;
        v24.HeadScale = v25.head or v24.HeadScale;
        v24.DepthScale = v25.depth or v24.DepthScale;
        v24.BodyTypeScale = v25.bodyType or v24.BodyTypeScale;
        v24.ProportionScale = v25.proportion or v24.ProportionScale;
    end;
end;
local function v29(v27, v28)
    if v28 then
        v27.HeadColor = not not v28.headColorId and BrickColor.new(v28.headColorId).Color or v27.HeadColor;
        v27.TorsoColor = not not v28.torsoColorId and BrickColor.new(v28.torsoColorId).Color or v27.TorsoColor;
        v27.RightArmColor = not not v28.rightArmColorId and BrickColor.new(v28.rightArmColorId).Color or v27.RightArmColor;
        v27.LeftArmColor = not not v28.leftArmColorId and BrickColor.new(v28.leftArmColorId).Color or v27.LeftArmColor;
        v27.RightLegColor = not not v28.rightLegColorId and BrickColor.new(v28.rightLegColorId).Color or v27.RightLegColor;
        v27.LeftLegColor = not not v28.rightLegColorId and BrickColor.new(v28.rightLegColorId).Color or v27.LeftLegColor;
    end;
end;
v7 = function(v30)
    local l_HumanoidDescription_0 = Instance.new("HumanoidDescription");
    v23(l_HumanoidDescription_0, v30.avatarData.assets);
    local l_scales_0 = v30.avatarData.scales;
    if l_scales_0 then
        l_HumanoidDescription_0.HeightScale = l_scales_0.height or l_HumanoidDescription_0.HeightScale;
        l_HumanoidDescription_0.WidthScale = l_scales_0.width or l_HumanoidDescription_0.WidthScale;
        l_HumanoidDescription_0.HeadScale = l_scales_0.head or l_HumanoidDescription_0.HeadScale;
        l_HumanoidDescription_0.DepthScale = l_scales_0.depth or l_HumanoidDescription_0.DepthScale;
        l_HumanoidDescription_0.BodyTypeScale = l_scales_0.bodyType or l_HumanoidDescription_0.BodyTypeScale;
        l_HumanoidDescription_0.ProportionScale = l_scales_0.proportion or l_HumanoidDescription_0.ProportionScale;
    end;
    v29(l_HumanoidDescription_0, v30.avatarData.bodyColors);
    return l_HumanoidDescription_0;
end;
v6 = function(v33, v34)
    if v34 ~= nil and not v34:isRigTypePlayerChoice() then
        v33.characterManager:updateAvatarType(v34.RigTypeValue);
        return ;
    else
        v33.characterManager:updateAvatarType(v33.playerChoiceAvatarType);
        return ;
    end;
end;
v5 = function()
    local v35, v36 = v2.GetAvatarData();
    if v35 ~= v2.Status.OK then
        warn("Avatar:getAvatarData() failure in AvatarWebAPI:GetAvatarData()");
        return ;
    else
        if v36 == nil then
            warn("Avatar:getAvatarData() failure in AvatarWebAPI:GetAvatarData() as result avatar data is nil");
        end;
        return v36;
    end;
end;
return v4;


local v0 = require(script.Parent.Parent.Util.ConstantAvatar);
local l_ReplicatedStorage_0 = game:GetService("ReplicatedStorage");
local v2 = {};
v2.__index = v2;
v2.new = function(v3, v4)
    local v5 = {};
    setmetatable(v5, v2);
    v5.r6 = v3:clone();
    v5.r6.Archivable = false;
    v5.r15 = v4:clone();
    v5.r15.Archivable = false;
    v5.rigs = {
        [v0.AvatarType.R6] = v5.r6,
        [v0.AvatarType.R15] = v5.r15
    };
    v5.currentCharacter = v5.r15;
    v5.characterRoot = Instance.new("Folder");
    v5.characterRoot.Archivable = false;
    v5.characterRoot.Parent = game:GetService("StarterPlayer");
    v5.characterRoot.Name = "CharacterRoot";
    v5.r15:SetPrimaryPartCFrame(v5.r6.PrimaryPart.CFrame);
    game:GetService("StarterPlayer"):ClearDefaults();
    v5.r6.Parent = v5.characterRoot;
    v5.r6.Humanoid:CacheDefaults();
    v5.r6.Parent = nil;
    v5.r15.Parent = v5.characterRoot;
    v5.r15.Humanoid:CacheDefaults();
    v5.characterRoot.Parent = game.Workspace;
    return v5;
end;
v2.applyDescription = function(v6, v7)
    pcall(function()
        v6.currentCharacter.Humanoid:ApplyDescription(v7);
    end);
end;
v2.updateAvatarType = function(v8, v9)
    local v10 = v8.rigs[v9] ~= nil;
    if not (not (v8.rigs[v9] ~= v8.currentCharacter) or not v10) then
        local v11 = nil;
        local v12 = nil;
        if v9 == v0.AvatarType.R6 then
            v11 = v8.r6;
            v12 = v8.r15;
        else
            v11 = v8.r15;
            v12 = v8.r6;
        end;
        v11.Parent = v8.characterRoot;
        v12.Parent = l_ReplicatedStorage_0;
        v8.currentCharacter = v11;
        v8.currentCharacter.HumanoidRootPart.CFrame = v12.HumanoidRootPart.CFrame;
    end;
end;
v2.setPosition = function(v13, v14)
    if v13.currentCharacter then
        v13.currentCharacter.HumanoidRootPart.CFrame = v14;
    end;
end;
v2.stop = function(v15)
    v15.r6.Parent = nil;
    v15.r6:Destroy();
    v15.r6 = nil;
    v15.r15.Parent = nil;
    v15.r15:Destroy();
    v15.r15 = nil;
    v15.characterRoot.Parent = nil;
    v15.characterRoot:Destroy();
    v15.characterRoot = nil;
    game:GetService("StarterPlayer"):ClearDefaults();
end;
return v2;


return {
    AvatarType = {
        R6 = "MorphToR6",
        R15 = "MorphToR15"
    },
    AssetTypes = {
        Hat = 8,
        Hair = 41,
        FaceAccessory = 42,
        Neck = 43,
        Shoulder = 44,
        Front = 45,
        Back = 46,
        Waist = 47,
        ShirtGraphic = 2,
        Shirt = 11,
        Pants = 12,
        Gear = 19,
        Head = 17,
        Face = 18,
        Torso = 27,
        RightArm = 28,
        LeftArm = 29,
        LeftLeg = 30,
        RightLeg = 31,
        ClimbAnim = 48,
        FallAnim = 50,
        IdleAnim = 51,
        JumpAnim = 52,
        RunAnim = 53,
        SwimAnim = 54,
        WalkAnim = 55
    }
};


local v0 = {
    DarkGrey2 = Color3.fromRGB(66, 66, 66),
    DarkGrey = Color3.fromRGB(60, 60, 60),
    White = Color3.fromRGB(255, 255, 255),
    Black = Color3.fromRGB(0, 0, 0),
    DefaultColor = Color3.fromRGB(160, 160, 160),
    TitleText = Color3.fromRGB(0, 0, 0)
};
v0.BodyText = v0.DefaultColor;
return v0;


return {
    BodyText = {
        Type = Enum.Font.SourceSans,
        Size = 16
    },
    TitleText = {
        Type = Enum.Font.SourceSansBold,
        Size = 22
    }
};


return {
    RowHeight = 26,
    PlayerChoiceHorizontalOffset = 400,
    TextLabelIdentifierWidth = 100,
    InputWidgetWidth = 200,
    VirticalPadding = UDim.new(0, 32)
};


return {
    Height = {
        min = 0.9,
        max = 1.05,
        increment = 0.05
    },
    Width = {
        min = 0.7,
        max = 1,
        increment = 0.05
    },
    Head = {
        min = 0.95,
        max = 1,
        increment = 0.05
    },
    BodyType = {
        min = 0,
        max = 0.3,
        increment = 0.05
    },
    Proportion = {
        min = 0,
        max = 1,
        increment = 0.05
    }
};


local v0 = require(script.Parent.Parent.Util.ConstantAvatar);
return {
    PlayerChoice = "PlayerChoice",
    AnimationStandard = "Standard",
    OuterCollision = "OuterBox",
    InnerCollision = "InnerBox",
    R6 = v0.AvatarType.R6,
    R15 = v0.AvatarType.R15
};


local v0 = require(script.Parent.Parent.Util.Avatar);
local l_InsertService_0 = game:GetService("InsertService");
local v2 = {
    Handle = nil,
    Loading = false,
    WaitingToDestroy = false
};
local v3 = nil;
local v4 = nil;
game:DefineFastFlag("DisableGameSettingsAvatarPreview", false);
v2.apply = function(v5)
    if v2.Handle == nil then
        v4(v5);
        return ;
    else
        v2.Handle:applyTemplates(v5);
        return ;
    end;
end;
v4 = function(v6)
    v2.WaitingToDestroy = false;
    if not v2.Loading and v2.Handle == nil then
        v2.Loading = true;
        spawn(function()
            local v7 = nil;
            local v8 = nil;
            local l_status_0, l_result_0 = pcall(function()
                v7 = l_InsertService_0:LoadLocalAsset("rbxasset://avatar/morpherEditorR15.rbxmx");
                v8 = l_InsertService_0:LoadLocalAsset("rbxasset://avatar/morpherEditorR6.rbxmx");
            end);
            if not ((not l_status_0 or not v7) or not v8) then
                v2.Handle = v0.loadWithTemplates(v8, v7, v6);
                if v2.Handle then
                    v3(v2);
                end;
            end;
            if l_result_0 then
                warn(l_result_0);
            end;
            v2.Loading = false;
        end);
    end;
end;
local function _(v11)
    if v11.Handle ~= nil then
        v11.Handle:destroy();
        v11.Handle = nil;
    end;
end;
local function _(v13)
    if not (not v2.Loading or v2.WaitingToDestroy) then
        v2.WaitingToDestroy = true;
        spawn(function()
            while v2.Loading do
                wait();
            end;
            if v2.WaitingToDestroy then
                local l_v13_0 = v13;
                if l_v13_0.Handle ~= nil then
                    l_v13_0.Handle:destroy();
                    l_v13_0.Handle = nil;
                end;
                v2.WaitingToDestroy = false;
            end;
        end);
    end;
end;
v2.destroy = function(v16)
    if v16.Handle ~= nil then
        v16.Handle:destroy();
        v16.Handle = nil;
    end;
    if not (not v2.Loading or v2.WaitingToDestroy) then
        v2.WaitingToDestroy = true;
        spawn(function()
            while v2.Loading do
                wait();
            end;
            if v2.WaitingToDestroy then
                local l_v16_0 = v16;
                if l_v16_0.Handle ~= nil then
                    l_v16_0.Handle:destroy();
                    l_v16_0.Handle = nil;
                end;
                v2.WaitingToDestroy = false;
            end;
        end);
    end;
end;
v3 = function(v18)
    local l_CurrentCamera_0 = workspace.CurrentCamera;
    if not l_CurrentCamera_0 then
        v18.Handle:setPosition((CFrame.new((Vector3.new(0, 0, 0)))));
        return ;
    else
        local l_p_0 = (l_CurrentCamera_0.CFrame + l_CurrentCamera_0.CFrame.lookVector * 8).p;
        v2.Handle:setPosition(CFrame.new(l_p_0, l_p_0 - l_CurrentCamera_0.CFrame.lookVector.Unit));
        return ;
    end;
end;
return v2;


local v0 = require(script.Parent.Parent.Util.ConstantScaleBoundaries);
local v1 = {};
local v2 = nil;
v1.getHeightBoundaries = function(v3)
    return not not v2(v3) and v2(v3).height or v0.Height;
end;
v1.getWidthBoundaries = function(v4)
    return not not v2(v4) and v2(v4).width or v0.Width;
end;
v1.getHeadBoundaries = function(v5)
    return not not v2(v5) and v2(v5).head or v0.Head;
end;
v1.getBodyTypeBoundaries = function(v6)
    return not not v2(v6) and v2(v6).bodyType or v0.BodyType;
end;
v1.getProportionBoundaries = function(v7)
    return not not v2(v7) and v2(v7).proportion or v0.Proportion;
end;
v2 = function(v8)
    return v8.StateSettings and v8.StateSettings.scaleBoundaries.boundaries;
end;
return v1;


local v0 = require(script.Parent.Parent.Util.StateModelTemplate);
local v2 = {
    getStateModelTemplate = function(v1)
        return ((v1.StateTemplates and v1.StateTemplates.templates) and v1.template) and v1.StateTemplates.templates[v1.template];
    end
};
v2.getStateModelTemplateCopy = function(v3)
    return v0.makeCopy(v2.getStateModelTemplate(v3));
end;
return v2;


local v0 = require(script.Parent.Parent.Util.ConstantColors);
local v1 = {};
local v2 = nil;
local v3 = nil;
v1.getBackgroundColor = function(v4)
    return not not v2(v4) and v2(v4).backgroundColor or v0.White;
end;
v1.getTitleTextColor = function(v5)
    return not not v2(v5) and v2(v5).titledFrame.text or v0.TitleText;
end;
v1.getBodyTextColor = function(v6)
    return not not v3(v6) and v2(v6).textBox.text or v0.BodyText;
end;
v1.getBodyTextInputColor = function(v7)
    if not v7.PlayerChoice then
        return not not v3(v7) and v2(v7).textBox.text or v0.TitleText;
    else
        return not not v3(v7) and v2(v7).textBox.text or v0.BodyText;
    end;
end;
v1.getButtonPressedTextColor = function(_)
    return v0.White;
end;
v1.getButtonHoveredTextColor = function(v9)
    return v1.getTitleTextColor(v9);
end;
v1.getButtonTextColor = function(v10)
    return v1.getTitleTextColor(v10);
end;
v1.getButtonPressedImageColor = function(_)
    return v0.White;
end;
v1.getButtonHoveredImageColor = function(v12)
    return not not v3(v12) and v0.DarkGrey2 or v0.White;
end;
v1.getButtonImageColor = function(v13)
    return not not v3(v13) and v0.DarkGrey or v0.White;
end;
v1.getDividerColor = function(v14)
    return not not v2(v14) and v2(v14).separator or v0.DefaultColor;
end;
v1.getBorderColor = function(v15)
    return not not v2(v15) and v2(v15).separator or v0.DefaultColor;
end;
v1.getRadioButtonTextColor = function(v16)
    if not v2(v16) or not v2(v16).radioButton then
        return nil;
    else
        return v2(v16).radioButton.title;
    end;
end;
v2 = function(v17)
    return v17.ThemeData and v17.ThemeData.theme;
end;
v3 = function(v18)
    return v2(v18) and v2(v18).isDarkerTheme;
end;
return v1;


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Util.ConstantAvatar);
local v2 = require(l_Parent_0.Util.ConstantScaleBoundaries);
local v3 = require(l_Parent_0.Util.ConstantTemplate);
local v4 = require(l_Parent_0.Util.UtilityFunctionsTable);
local v5 = {};
v5.__index = v5;
local v6 = nil;
local v7 = nil;
local v8 = nil;
local v9 = nil;
local v10 = nil;
local v11 = nil;
local v12 = nil;
local v13 = nil;
local v14 = {
    v1.AssetTypes.Face,
    v1.AssetTypes.Head,
    v1.AssetTypes.Torso,
    v1.AssetTypes.LeftArm,
    v1.AssetTypes.RightArm,
    v1.AssetTypes.LeftLeg,
    v1.AssetTypes.RightLeg,
    v1.AssetTypes.Shirt,
    v1.AssetTypes.Pants,
    v1.AssetTypes.ShirtGraphic
};
v5.new = function(v15)
    local v16 = setmetatable({}, v5);
    v6(v16);
    if not v15 then
        v15 = v2;
        v16.ScalesMin = v7(v15.Height.min, v15.Width.min, v15.Head.min, v15.BodyType.min, v15.Proportion.min, 0);
        v16.ScalesMax = v7(v15.Height.max, v15.Width.max, v15.Head.max, v15.BodyType.max, v15.Proportion.max, 0);
    else
        v16.ScalesMin = v7(v15.height.min, v15.width.min, v15.head.min, v15.bodyType.min, v15.proportion.min, 0);
        v16.ScalesMax = v7(v15.height.max, v15.width.max, v15.head.max, v15.bodyType.max, v15.proportion.max, 0);
    end;
    v16.CollisionValue = v3.OuterCollision;
    v16.AnimationValue = v3.PlayerChoice;
    v16.RigTypeValue = v3.PlayerChoice;
    return v16;
end;
v5.makeCopy = function(v17)
    local v18 = v5.new();
    local v19 = {
        AssetsOverrides = v11,
        ScalesMin = v12,
        ScalesMax = v12
    };
    if v17 then
        for v20, v21 in pairs(v17) do
            v18[v20] = (v19[v20] or function(v22)
                return v22;
            end)(v21);
        end;
    end;
    return v18;
end;
v5.fromUniverseData = function(v23)
    local v24 = v5.new();
    v24.RigTypeValue = v23.AvatarType or v24.RigTypeValue;
    v24.AnimationValue = v23.AvatarAnimation or v24.AnimationValue;
    v24.CollisionValue = v23.AvatarCollision or v24.CollisionValue;
    v8(v24, v23.AvatarAssetOverrides);
    v9(v24, v23.AvatarScalingMin);
    v10(v24, v23.AvatarScalingMax);
    return v24;
end;
v5.apply = function(v25, v26)
    v26.HeightScale = math.clamp(v26.HeightScale, v25.ScalesMin.height, v25.ScalesMax.height);
    v26.WidthScale = math.clamp(v26.WidthScale, v25.ScalesMin.width, v25.ScalesMax.width);
    v26.HeadScale = math.clamp(v26.HeadScale, v25.ScalesMin.head, v25.ScalesMax.head);
    v26.BodyTypeScale = math.clamp(v26.BodyTypeScale, v25.ScalesMin.bodyType, v25.ScalesMax.bodyType);
    v26.ProportionScale = math.clamp(v26.ProportionScale, v25.ScalesMin.proportion, v25.ScalesMax.proportion);
    for v27, v28 in pairs({
        [v1.AssetTypes.Face] = "Face",
        [v1.AssetTypes.Head] = "Head",
        [v1.AssetTypes.Torso] = "Torso",
        [v1.AssetTypes.LeftArm] = "LeftArm",
        [v1.AssetTypes.RightArm] = "RightArm",
        [v1.AssetTypes.LeftLeg] = "LeftLeg",
        [v1.AssetTypes.RightLeg] = "RightLeg",
        [v1.AssetTypes.Shirt] = "Shirt",
        [v1.AssetTypes.Pants] = "Pants",
        [v1.AssetTypes.ShirtGraphic] = "GraphicTShirt"
    }) do
        if not v25.AssetsOverrides[v27].isPlayerChoice and v25.AssetsOverrides[v27].assetID ~= 0 then
            v26[v28] = v25.AssetsOverrides[v27].assetID;
        end;
    end;
end;
v5.extractAssetOverridesForSaving = function(v29)
    local v30 = {};
    for _, v32 in ipairs(v14) do
        local v33, v34 = v29:getAsset(v32);
        v30[#v30 + 1] = {
            assetTypeID = v32,
            assetID = v33,
            isPlayerChoice = v34
        };
    end;
    return v30;
end;
v5.extractScalingMinForSaving = function(v35)
    return v12(v35.ScalesMin);
end;
v5.extractScalingMaxForSaving = function(v36)
    return v12(v36.ScalesMax);
end;
v5.isAvatarTypeEqualTo = function(v37, v38)
    return v37.RigTypeValue == v38.RigTypeValue;
end;
v5.isAnimationEqualTo = function(v39, v40)
    return v39.AnimationValue == v40.AnimationValue;
end;
v5.isCollisionEqualTo = function(v41, v42)
    return v41.CollisionValue == v42.CollisionValue;
end;
v5.areAssetsEqualTo = function(v43, v44)
    for _, v46 in ipairs(v14) do
        local v47, v48 = v43:getAsset(v46);
        local v49, v50 = v44:getAsset(v46);
        if not (v47 == v49) or v48 ~= v50 then
            return false;
        end;
    end;
    return true;
end;
v5.areMinScalesEqualTo = function(v51, v52)
    return v13(v51.ScalesMin, v52.ScalesMin);
end;
v5.areMaxScalesEqualTo = function(v53, v54)
    return v13(v53.ScalesMax, v54.ScalesMax);
end;
v5.isRigTypePlayerChoice = function(v55)
    return v55.RigTypeValue == v3.PlayerChoice;
end;
v5.isRigTypeR6 = function(v56)
    return v56.RigTypeValue == v3.R6;
end;
v5.isRigTypeR15 = function(v57)
    return v57.RigTypeValue == v3.R15;
end;
v5.setRigTypeR6 = function(v58)
    v58.RigTypeValue = v3.R6;
end;
v5.setRigTypeR15 = function(v59)
    v59.RigTypeValue = v3.R15;
end;
v5.setRigTypePlayerChoice = function(v60)
    v60.RigTypeValue = v3.PlayerChoice;
end;
v5.isAnimationStandard = function(v61)
    return v61.AnimationValue == v3.AnimationStandard;
end;
v5.isAnimationPlayerChoice = function(v62)
    return v62.AnimationValue == v3.PlayerChoice;
end;
v5.setAnimationStandard = function(v63)
    v63.AnimationValue = v3.AnimationStandard;
end;
v5.setAnimationPlayerChoice = function(v64)
    v64.AnimationValue = v3.PlayerChoice;
end;
v5.isCollisionInnerBox = function(v65)
    return v65.CollisionValue == v3.InnerCollision;
end;
v5.setCollisionInnerBox = function(v66)
    v66.CollisionValue = v3.InnerCollision;
end;
v5.isCollisionOuterBox = function(v67)
    return v67.CollisionValue == v3.OuterCollision;
end;
v5.setCollisionOuterBox = function(v68)
    v68.CollisionValue = v3.OuterCollision;
end;
v5.setScaleHeightMin = function(v69, v70, v71)
    v69.ScalesMin.height = math.max(v71.height.min, (math.min(v71.height.max, v70)));
end;
v5.setScaleWidthMin = function(v72, v73, v74)
    v72.ScalesMin.width = math.max(v74.width.min, (math.min(v74.width.max, v73)));
end;
v5.setScaleHeadMin = function(v75, v76, v77)
    v75.ScalesMin.head = math.max(v77.head.min, (math.min(v77.head.max, v76)));
end;
v5.setScaleBodyTypeMin = function(v78, v79, v80)
    v78.ScalesMin.bodyType = math.max(v80.bodyType.min, (math.min(v80.bodyType.max, v79)));
end;
v5.setScaleProportionMin = function(v81, v82, v83)
    v81.ScalesMin.proportion = math.max(v83.proportion.min, (math.min(v83.proportion.max, v82)));
end;
v5.setScaleHeightMax = function(v84, v85, v86)
    v84.ScalesMax.height = math.max(v86.height.min, (math.min(v86.height.max, v85)));
end;
v5.setScaleWidthMax = function(v87, v88, v89)
    v87.ScalesMax.width = math.max(v89.width.min, (math.min(v89.width.max, v88)));
end;
v5.setScaleHeadMax = function(v90, v91, v92)
    v90.ScalesMax.head = math.max(v92.head.min, (math.min(v92.head.max, v91)));
end;
v5.setScaleBodyTypeMax = function(v93, v94, v95)
    v93.ScalesMax.bodyType = math.max(v95.bodyType.min, (math.min(v95.bodyType.max, v94)));
end;
v5.setScaleProportionMax = function(v96, v97, v98)
    v96.ScalesMax.proportion = math.max(v98.proportion.min, (math.min(v98.proportion.max, v97)));
end;
v5.getScaleHeightMin = function(v99)
    return v99.ScalesMin.height;
end;
v5.getScaleWidthMin = function(v100)
    return v100.ScalesMin.width;
end;
v5.getScaleHeadMin = function(v101)
    return v101.ScalesMin.head;
end;
v5.getScaleBodyTypeMin = function(v102)
    return v102.ScalesMin.bodyType;
end;
v5.getScaleProportionMin = function(v103)
    return v103.ScalesMin.proportion;
end;
v5.getScaleHeightMax = function(v104)
    return v104.ScalesMax.height;
end;
v5.getScaleWidthMax = function(v105)
    return v105.ScalesMax.width;
end;
v5.getScaleHeadMax = function(v106)
    return v106.ScalesMax.head;
end;
v5.getScaleBodyTypeMax = function(v107)
    return v107.ScalesMax.bodyType;
end;
v5.getScaleProportionMax = function(v108)
    return v108.ScalesMax.proportion;
end;
v5.setAsset = function(v109, v110, v111, v112)
    if v109.AssetsOverrides[v110] then
        if v111 ~= nil then
            v109.AssetsOverrides[v110].assetID = v111;
        end;
        if v112 ~= nil then
            v109.AssetsOverrides[v110].isPlayerChoice = v112;
        end;
    end;
end;
v5.getAsset = function(v113, v114)
    if not v113.AssetsOverrides[v114] then
        return nil, nil;
    else
        return v113.AssetsOverrides[v114].assetID, v113.AssetsOverrides[v114].isPlayerChoice;
    end;
end;
v6 = function(v115)
    v115.AssetsOverrides = {};
    for _, v117 in ipairs(v14) do
        v115.AssetsOverrides[v117] = {
            assetID = 0,
            isPlayerChoice = true
        };
    end;
end;
v7 = function(v118, v119, v120, v121, v122, v123)
    return {
        height = v118,
        width = v119,
        head = v120,
        bodyType = v121,
        proportion = v122,
        depth = v123
    };
end;
v8 = function(v124, v125)
    if v125 then
        for _, v127 in pairs(v125) do
            v124:setAsset(v127.assetTypeID, v127.assetID, v127.isPlayerChoice);
        end;
    end;
end;
v9 = function(v128, v129)
    if v129 then
        v128.ScalesMin = v7(v129.height, v129.width, v129.head, v129.bodyType, v129.proportion, v129.depth);
    end;
end;
v10 = function(v130, v131)
    if v131 then
        v130.ScalesMax = v7(v131.height, v131.width, v131.head, v131.bodyType, v131.proportion, v131.depth);
    end;
end;
v11 = function(v132)
    local v133 = {};
    for v134, v135 in pairs(v132) do
        v133[v134] = {
            assetID = v135.assetID,
            isPlayerChoice = v135.isPlayerChoice
        };
    end;
    return v133;
end;
v12 = function(v136)
    local v137 = {};
    for v138, v139 in pairs(v136) do
        v137[v138] = v139;
    end;
    return v137;
end;
v13 = function(v140, v141)
    for v142, v143 in pairs(v140) do
        if v143 ~= v141[v142] then
            return false;
        end;
    end;
    return v4.countDictionaryKeys(v140) == v4.countDictionaryKeys(v141);
end;
return v5;


return {
    immutableSetExistingDictionaryEntry = function(v0, v1, v2)
        local v3 = {};
        for v4, v5 in pairs(v0) do
            if v4 == v1 then
                v3[v4] = v2;
            else
                v3[v4] = v5;
            end;
        end;
        return v3;
    end,
    countDictionaryKeys = function(v6)
        local v7 = 0;
        for _, _ in pairs(v6) do
            v7 = v7 + 1;
        end;
        return v7;
    end
};


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_GameSettingsExperienceGuidelines_0 = game:GetFastFlag("GameSettingsExperienceGuidelines");
local l_GameSettingsFixGuidelinesQuestionnareInfo_0 = game:GetFastFlag("GameSettingsFixGuidelinesQuestionnareInfo");
local v3 = require(l_Parent_0.Packages.Roact);
local v4 = v3.PureComponent:extend(script.Name);
local l_OpenExperienceQuestionnaire_0 = require(l_Parent_0.Src.Util.BrowserUtils).OpenExperienceQuestionnaire;
local v6 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v6.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v9 = require(l_Parent_0.Packages.Cryo);
local l_LayoutOrderIterator_0 = v6.Util.LayoutOrderIterator;
local l_UI_0 = v6.UI;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_Button_0 = l_UI_0.Button;
local l_GetTextSize_0 = v6.Util.GetTextSize;
v4.init = function(v15)
    assert(l_GameSettingsExperienceGuidelines_0);
    v15.frameRef = v3.createRef();
    v15.state = {
        maxChildWidth = 0,
        questionnaireButtonClicked = false
    };
    v15.updateSize = function()
        v15:setState({
            maxChildWidth = v15.frameRef.current.AbsoluteSize.x
        });
    end;
end;
v4.didMount = function(v16)
    v16.updateSize();
end;
v4.render = function(v17)
    assert(l_GameSettingsExperienceGuidelines_0);
    local l_props_0 = v17.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_Localization_0 = l_props_0.Localization;
    local l_GameId_0 = l_props_0.GameId;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local v23 = l_LayoutOrderIterator_0.new();
    local v24 = l_Localization_0:getText("Guidelines", "SectionTitle");
    local v25 = nil;
    local v26 = nil;
    local v27 = nil;
    v26 = if not l_props_0.GameGuideline then l_Localization_0:getText("Guidelines", "SubmitQuestionnaire") else l_Localization_0:getText("Guidelines", "UpdateQuestionnaire");
    v27 = l_GetTextSize_0(v26, l_Stylizer_0.fontStyle.Normal.TextSize, l_Stylizer_0.fontStyle.Normal.Font, Vector2.new(math.huge, math.huge));
    v25 = l_Localization_0:getText("Guidelines", "17PlusWarning");
    if not l_props_0.GameGuideline then
        v25 = v25 .. " " .. l_Localization_0:getText("Guidelines", "UnavailableNoticeText");
    end;
    return v3.createElement("Frame", v9.Dictionary.join({
        LayoutOrder = l_LayoutOrder_0
    }, l_Stylizer_0.guidelinesFrame), {
        Title = v3.createElement(l_TextLabel_0, v9.Dictionary.join({
            Text = v24
        }, l_Stylizer_0.guidelinesTitle)),
        DescriptionFrame = v3.createElement("Frame", v9.Dictionary.join({
            [v3.Ref] = v17.frameRef,
            [v3.Change.AbsoluteSize] = v17.updateSize
        }, l_Stylizer_0.guidelinesDescriptionFrame), {
            Layout = v3.createElement("UIListLayout", l_Stylizer_0.guidelinesDescriptionListLayout),
            ChosenGuideline = v3.createElement(l_TextLabel_0, v9.Dictionary.join({
                Text = l_props_0.GameGuideline or l_Localization_0:getText("Guidelines", not v17.state.questionnaireButtonClicked and "NotSubmitted" or "Pending"),
                LayoutOrder = v23:getNextOrder(),
                TextTransparency = not l_props_0.GameGuideline and 0.5 or 0
            }, l_Stylizer_0.chosenGuidelineText)),
            OpenQuestionnaireButton = v3.createElement(l_Button_0, v9.Dictionary.join({
                Size = UDim2.new(0, v27.X + l_Stylizer_0.openQuestionnaireButton.PaddingX, 0, v27.Y + l_Stylizer_0.openQuestionnaireButton.PaddingY),
                Text = v26,
                OnClick = function()
                    v17:setState({
                        questionnaireButtonClicked = true
                    });
                    l_OpenExperienceQuestionnaire_0(l_GameId_0)();
                end,
                LayoutOrder = v23:getNextOrder()
            }, l_Stylizer_0.openQuestionnaireButton)),
            GuidelinesQuestionnaireInfo = v3.createElement(l_TextLabel_0, if not l_GameSettingsFixGuidelinesQuestionnareInfo_0 then {
                Text = l_Localization_0:getText("Guidelines", not l_props_0.GameGuideline and "GetAnAgeRecommendation" or "RetakeQuestionnaire"),
                TextProps = l_Stylizer_0.guidelinesDescriptionText,
                TextXAlignment = Enum.TextXAlignment.Left,
                TextYAlignment = Enum.TextYAlignment.Top,
                LayoutOrder = v23:getNextOrder()
            } else v9.Dictionary.join({
                Text = l_Localization_0:getText("Guidelines", not l_props_0.GameGuideline and "GetAnAgeRecommendation" or "RetakeQuestionnaire"),
                TextXAlignment = Enum.TextXAlignment.Left,
                TextYAlignment = Enum.TextYAlignment.Top,
                LayoutOrder = v23:getNextOrder()
            }, l_Stylizer_0.guidelinesDescriptionText))
        })
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer
})(v4));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.RoactRodux);
local v3 = require(l_Parent_0.Packages.Framework);
local v4 = require(l_Parent_0.Src.Flags.getFFlagGameSettingsFixMoreLayoutIssues)();
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v7 = require(l_Parent_0.Src.Components.ToggleButtonWithTitle);
local v8 = require(l_Parent_0.Src.ContextServices.Dialog);
local l_LayoutOrderIterator_0 = v3.Util.LayoutOrderIterator;
local v10 = require(l_Parent_0.Src.Components.SettingsPages.SettingsPage);
local v11 = require(l_Parent_0.Src.Actions.AddChange);
local v12 = require(l_Parent_0.Src.Util.KeyProvider);
local l_GuiService_0 = game:GetService("GuiService");
local v14 = game:DefineFastFlag("AvatarChatSettingsAudioLinkEnabled", false);
local v15 = game:DefineFastFlag("AvatarChatSettingsVideoLinkEnabled", false);
local l_AvatarChatSettingsEnabled2_0 = game:GetFastFlag("AvatarChatSettingsEnabled2");
local v17 = game:DefineFastFlag("AvatarChatMicCameraCouple", false);
local v18 = game:DefineFastString("AvatarChatSettingsAudioLink", "https://developer.roblox.com/articles/chat-with-avatars-audio");
local v19 = game:DefineFastString("AvatarChatSettingsVideoLink", "https://developer.roblox.com/articles/chat-with-avatars-video");
local v20 = game:DefineFastString("SpatialVoiceChatLink", "https://create.roblox.com/docs/chat/spatial-voice");
local v21 = v12.getAvatarChatAudioEnabledKeyName();
local v22 = v12.getAvatarChatVideoEnabledKeyName();
local l_Name_0 = script.Name;
local function v30(v24, v25)
    local l_gameId_0 = v24:getState().Metadata.gameId;
    local l_communicationController_0 = v25.communicationController;
    return {
        function(v28)
            local v29 = l_communicationController_0:getAvatarChatSettings(l_gameId_0);
            v28[v21] = v29.audioEnabled;
            v28[v22] = v29.videoEnabled;
        end
    };
end;
local function v38(v31, v32)
    local v33 = v31:getState();
    local l_gameId_1 = v33.Metadata.gameId;
    local l_communicationController_1 = v32.communicationController;
    return {
        function()
            local l_AvatarChatAudioEnabled_0 = v33.Settings.Changed.AvatarChatAudioEnabled;
            local l_AvatarChatVideoEnabled_0 = v33.Settings.Changed.AvatarChatVideoEnabled;
            if not (l_AvatarChatAudioEnabled_0 == nil) or l_AvatarChatVideoEnabled_0 ~= nil then
                l_communicationController_1:setAvatarChatSettings(l_gameId_1, l_AvatarChatAudioEnabled_0, l_AvatarChatVideoEnabled_0);
            end;
        end
    };
end;
local _ = function(v39, _)
    return {
        AvatarChatAudioEnabled = v39(v21),
        AvatarChatVideoEnabled = v39(v22)
    };
end;
local _ = function(v42, _)
    return {
        AvatarChatAudioEnabledChanged = v42(v21),
        AvatarChatVideoEnabledChanged = v42(v22)
    };
end;
local v45 = v1.PureComponent:extend(script.Name);
v45.render = function(v46)
    local l_props_0 = v46.props;
    local l_Localization_0 = l_props_0.Localization;
    local v49 = l_LayoutOrderIterator_0.new();
    local v50 = false;
    if not (not v17 or l_props_0.AvatarChatAudioEnabled) then
        v50 = true;
    end;
    return v1.createElement(v10, {
        SettingsLoadJobs = v30,
        SettingsSaveJobs = v38,
        Title = l_Localization_0:getText("General", "Category" .. l_Name_0),
        PageId = l_Name_0,
        CreateChildren = function()
            local l_props_1 = v46.props;
            local l_Localization_1 = l_props_1.Localization;
            if not l_AvatarChatSettingsEnabled2_0 then
                return {
                    EnableAvatarChatAudio = v1.createElement(v7, {
                        Title = l_Localization_1:getText("General", "VoiceChatTitle"),
                        LinkProps = {
                            Text = l_Localization_1:getText("General", "VoiceChatBody"),
                            LinkText = l_Localization_1:getText("General", "VoiceChatLink"),
                            OnLinkClicked = function()
                                l_GuiService_0:OpenBrowserWindow(v20);
                            end
                        },
                        LayoutOrder = v49:getNextOrder(),
                        Disabled = false,
                        Selected = l_props_1.AvatarChatAudioEnabled,
                        OnClick = function()
                            l_props_1.AvatarChatAudioEnabledChanged(not l_props_1.AvatarChatAudioEnabled);
                        end
                    })
                };
            else
                local v53 = {
                    Title = l_Localization_1:getText("AvatarChat", "AudioTitle"),
                    LayoutOrder = v49:getNextOrder(),
                    Disabled = false,
                    Selected = l_props_1.AvatarChatAudioEnabled,
                    OnClick = function()
                        l_props_1.AvatarChatAudioEnabledChanged(not l_props_1.AvatarChatAudioEnabled);
                        if not (not v17 or not l_props_1.AvatarChatVideoEnabled) then
                            l_props_1.AvatarChatVideoEnabledChanged(false);
                        end;
                    end
                };
                if v14 then
                    v53.LinkProps = {
                        Text = l_Localization_1:getText("AvatarChat", "AudioBody"),
                        LinkText = l_Localization_1:getText("General", "LearnMoreLink"),
                        OnLinkClicked = function()
                            l_GuiService_0:OpenBrowserWindow(v18);
                        end
                    };
                end;
                local v54 = {
                    Title = l_Localization_1:getText("AvatarChat", "VideoTitle"),
                    LayoutOrder = v49:getNextOrder(),
                    Disabled = v50,
                    Selected = (not v17 or l_props_1.AvatarChatAudioEnabled) and l_props_1.AvatarChatVideoEnabled,
                    OnClick = function()
                        l_props_1.AvatarChatVideoEnabledChanged(not l_props_1.AvatarChatVideoEnabled);
                    end
                };
                if v15 then
                    v54.LinkProps = {
                        Text = l_Localization_1:getText("AvatarChat", "VideoBody"),
                        LinkText = l_Localization_1:getText("General", "LearnMoreLink"),
                        OnLinkClicked = function()
                            l_GuiService_0:OpenBrowserWindow(v19);
                        end
                    };
                end;
                return {
                    EnableAvatarChatAudio = v1.createElement(v7, v53),
                    EnableAvatarChatVideo = v1.createElement(v7, v54)
                };
            end;
        end
    });
end;
v45 = l_withContext_0({
    Stylizer = if not v4 then l_ContextServices_0.Stylizer else nil,
    Localization = l_ContextServices_0.Localization,
    Dialog = v8
})(v45);
local v55 = require(l_Parent_0.Src.Networking.settingFromState);
v45 = v2.connect(function(v56, _)
    if v56 then
        local function v59(v58)
            return v55(v56.Settings, v58);
        end;
        return {
            AvatarChatAudioEnabled = v59(v21),
            AvatarChatVideoEnabled = v59(v22)
        };
    else
        return ;
    end;
end, function(v60)
    local function v63(v61)
        return function(v62)
            v60(v11(v61, v62));
        end;
    end;
    return {
        AvatarChatAudioEnabledChanged = v63(v21),
        AvatarChatVideoEnabledChanged = v63(v22)
    };
end)(v45);
v45.LocalizationId = l_Name_0;
return v45;