local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.RoactRodux);
local l_ContextServices_0 = require(l_Packages_0.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v6 = require(l_Parent_0.Core.ContextServices.NetworkContext);
local l_Util_0 = l_Parent_0.Core.Util;
local v8 = require(l_Util_0.Constants);
local v9 = require(l_Util_0.ScreenSetup);
local v10 = require(l_Util_0.AssetConfigConstants);
local v11 = require(l_Util_0.AssetConfigUtil);
local l_Util_1 = require(l_Packages_0.Framework).Util;
local l_StyleModifier_0 = require(l_Packages_0.Framework).Util.StyleModifier;
local l_UI_0 = require(l_Packages_0.Framework).UI;
local l_Button_0 = l_UI_0.Button;
local l_DEPRECATED_TextInput_0 = l_UI_0.DEPRECATED_TextInput;
local v17 = require(l_Parent_0.Core.Types.ConfigTypes);
local l_Requests_0 = l_Parent_0.Core.Networking.Requests;
local v19 = require(l_Requests_0.ToggleOverrideRequest);
local v20 = require(l_Requests_0.ValidateAnimationRequest);
local v21 = require(l_Parent_0.Core.Components.AssetConfiguration.LinkButton);
local v22 = v2.Component:extend("AssetConfigFooter");
local l_AssetConfigFixBadIdVerifyState_0 = game:GetFastFlag("AssetConfigFixBadIdVerifyState");
local v24 = require(l_Parent_0.Core.Flags.getFFlagToolboxAddPackageVersionDescriptions);
local v25 = utf8.char(57346);
v22.init = function(v26, v27)
    v26.hideInvalidAnimationID = true;
    v26.onFlowButtonActivated = function()
        v27.toggleOverride(v26.props.currentTab);
    end;
    v26.state = {
        animationId = ""
    };
    v26.onAnimationIDChanged = function(v28)
        v28 = string.gsub(v28, "[\n\r]", " ");
        if v26.props.validateAnimation then
            v26.props.validateAnimation({
                networkInterface = v26.props.Network.networkInterface,
                assetId = v28
            });
        end;
        v26:setState({
            animationId = v28
        });
    end;
end;
v22.shouldUpdate = function(v29, v30, v31)
    if v31 ~= v29.state then
        return true;
    else
        if l_AssetConfigFixBadIdVerifyState_0 then
            local l_hideInvalidAnimationID_0 = v29.hideInvalidAnimationID;
            if v31.animationId == "" then
                v29.hideInvalidAnimationID = true;
            else
                v29.hideInvalidAnimationID = v30.validateAnimationSucceeded or tostring(v30.AssetId) == v31.animationId;
            end;
            if l_hideInvalidAnimationID_0 ~= v29.hideInvalidAnimationID then
                return true;
            end;
        end;
        if not l_Util_1.deepEqual(v30, v29.props) then
            return true;
        else
            return false;
        end;
    end;
end;
v22.getUploadFeeWithRobuxIcon = function(v33, v34)
    return v33.props.Localization:getText("AssetConfigFooter", "UploadFeeWithRobuxIcon", {
        price = v25 .. v34
    });
end;
v22.render = function(v35)
    local l_props_0 = v35.props;
    local l_state_0 = v35.state;
    local l_Stylizer_0 = v35.props.Stylizer;
    local l_Size_0 = l_props_0.Size;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_TryPublish_0 = l_props_0.TryPublish;
    local l_TryCancel_0 = l_props_0.TryCancel;
    local l_footer_0 = l_Stylizer_0.footer;
    local l_CanSave_0 = l_props_0.CanSave;
    local l_screenFlowType_0 = l_props_0.screenFlowType;
    local l_assetTypeEnum_0 = l_props_0.assetTypeEnum;
    local l_currentTab_0 = l_props_0.currentTab;
    local l_validateAnimationSucceeded_0 = l_props_0.validateAnimationSucceeded;
    local v49 = l_validateAnimationSucceeded_0 or l_state_0.animationId == "";
    if l_AssetConfigFixBadIdVerifyState_0 then
        v49 = v35.hideInvalidAnimationID;
    end;
    local v50 = v9.queryParam(l_screenFlowType_0, l_assetTypeEnum_0, v9.keys.SHOW_OVERRIDE_BUTTON);
    local v51 = nil;
    v51 = if not v17:isOverride(l_currentTab_0) then l_props_0.Localization:getText("AssetConfigFooter", "Override") else l_props_0.Localization:getText("AssetConfigFooter", "NewAsset");
    local v52 = false;
    if l_assetTypeEnum_0 == Enum.AssetType.Animation then
        v52 = v17:isOverride(l_currentTab_0);
    end;
    local v53 = v52 and v10.FLOW_TYPE.DOWNLOAD_FLOW == l_props_0.screenFlowType;
    local v54 = l_props_0.AssetId or l_state_0.animationID;
    local v55 = false;
    local l_l_CanSave_0_0 = l_CanSave_0;
    if v53 then
        if l_CanSave_0 then
            if not l_validateAnimationSucceeded_0 then
                l_l_CanSave_0_0 = false;
            end;
        else
            l_l_CanSave_0_0 = l_validateAnimationSucceeded_0;
        end;
        if v54 then
            v55 = utf8.len(v54) > 32;
        end;
    end;
    local v57 = nil;
    v57 = if not v24() then l_props_0.Localization:getText("Common", "Submit") else l_props_0.Localization:getText("Common", "Save");
    local v58 = v11.isCatalogAsset(l_assetTypeEnum_0) or v11.isUGCBundleType(l_assetTypeEnum_0);
    if not (not (l_screenFlowType_0 == v10.FLOW_TYPE.UPLOAD_FLOW) or not v58) then
        if not l_props_0.isUploadFeeEnabled then
            if l_props_0.isUploadFeeEnabled == nil then
                l_l_CanSave_0_0 = false;
            end;
        else
            if l_props_0.uploadFee > 0 then
                v57 = v35:getUploadFeeWithRobuxIcon(l_props_0.uploadFee);
            end;
            if not l_props_0.canAffordUploadFee then
                l_l_CanSave_0_0 = false;
            end;
        end;
    end;
    return v2.createElement("Frame", {
        Size = l_Size_0,
        BackgroundTransparency = 0,
        BackgroundColor3 = l_footer_0.backgroundColor,
        BorderColor3 = l_footer_0.borderColor,
        BorderSizePixel = 1,
        LayoutOrder = l_LayoutOrder_0
    }, {
        UIPadding = v2.createElement("UIPadding", {
            PaddingBottom = UDim.new(0, 0),
            PaddingLeft = UDim.new(0, 24),
            PaddingRight = UDim.new(0, 24),
            PaddingTop = UDim.new(0, 0)
        }),
        UIListLayout = v2.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Horizontal,
            HorizontalAlignment = Enum.HorizontalAlignment.Right,
            VerticalAlignment = Enum.VerticalAlignment.Center,
            SortOrder = Enum.SortOrder.LayoutOrder,
            Padding = UDim.new(0, 24)
        }),
        AnimationIdBox = v53 and v2.createElement("Frame", {
            Size = UDim2.new(0, 160, 0, 40),
            BackgroundTransparency = 1,
            BorderSizePixel = 0,
            LayoutOrder = 3
        }, {
            TextField = v2.createElement(l_DEPRECATED_TextInput_0, {
                ForceOnTextChange = true,
                OnTextChanged = v35.onAnimationIDChanged,
                PlaceholderText = l_props_0.Localization:getText("AssetConfigAnimation", "AnimationID"),
                Size = UDim2.new(1, 0, 1, 0),
                Style = not v55 and "FilledRoundedBorder" or "FilledRoundedRedBorder",
                Text = not not v54 and tostring(v54) or nil
            })
        }),
        InvalidAnimationLabel = (v53 and not v49) and v2.createElement("TextLabel", {
            BackgroundTransparency = 1,
            Font = v8.FONT,
            Text = l_props_0.Localization:getText("AssetConfigAnimation", "InvalidAnimationID"),
            TextColor3 = l_Stylizer_0.redText,
            TextSize = v8.FONT_SIZE_MEDIUM,
            Size = UDim2.new(0, 96, 1, 0),
            TextYAlignment = Enum.TextYAlignment.Center,
            TextXAlignment = Enum.TextXAlignment.Center,
            LayoutOrder = 2
        }),
        CancelButton = v2.createElement(l_Button_0, {
            LayoutOrder = 4,
            OnClick = l_TryCancel_0,
            Style = "Round",
            Size = UDim2.new(0, 140, 0, 40),
            Text = l_props_0.Localization:getText("General", "SearchOptionsCancel")
        }),
        PublishButton = v2.createElement(l_Button_0, {
            LayoutOrder = 5,
            OnClick = function()
                if l_l_CanSave_0_0 then
                    l_TryPublish_0(v35.state.animationId);
                end;
            end,
            Style = "RoundPrimary",
            StyleModifier = not l_l_CanSave_0_0 and l_StyleModifier_0.Disabled or nil,
            Size = UDim2.new(0, 140, 0, 40),
            Text = v57
        }),
        ToggleOverrideButton = v50 and v2.createElement(v21, {
            Size = UDim2.new(1, -328, 0, 20),
            Text = v51,
            TextSize = v8.FONT_SIZE_MEDIUM,
            Font = v8.FONT,
            onActivated = v35.onFlowButtonActivated,
            LayoutOrder = 1
        })
    });
end;
return v3.connect(function(v59, _)
    v59 = v59 or {};
    return {
        currentTab = v59.currentTab,
        instances = v59.instances,
        screenFlowType = v59.screenFlowType,
        assetTypeEnum = v59.assetTypeEnum,
        isUploadFeeEnabled = v59.isUploadFeeEnabled,
        uploadFee = v59.uploadFee,
        canAffordUploadFee = v59.canAffordUploadFee,
        validateAnimationSucceeded = v59.validateAnimationSucceeded
    };
end, function(v61)
    return {
        toggleOverride = function(v62)
            v61(v19(v62));
        end,
        validateAnimation = function(v63)
            v61(v20(v63));
        end
    };
end)((l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer,
    Localization = l_ContextServices_0.Localization,
    Network = v6
})(v22)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_Util_0 = l_Parent_0.Core.Util;
local l_DebugBuiltInPluginModalsNotBlocking_0 = game:GetFastFlag("DebugBuiltInPluginModalsNotBlocking");
local l_Packages_0 = l_Parent_0.Packages;
local v4 = require(l_Packages_0.Roact);
local l_Components_0 = l_Parent_0.Core.Components;
local v6 = require(l_Components_0.PluginWidget.Dialog);
local v7 = require(l_Components_0.AssetConfiguration.ScreenSelect);
local v8 = require(l_Parent_0.Core.Themes.getAssetConfigTheme);
local v9 = require(l_Util_0.AssetConfigConstants);
local v10 = require(l_Util_0.makeTheme);
local l_ContextServices_0 = require(l_Packages_0.Framework).ContextServices;
local v12 = require(l_Parent_0.Core.ContextServices.ModalContext);
local v13 = require(l_Parent_0.Core.ContextServices.NetworkContext);
local v14 = v4.PureComponent:extend("AssetConfigWrapper");
v14.init = function(v15, _)
    v15.state = {
        popUpGui = nil
    };
    v15.popUpRefFunc = function(v17)
        v15.popUpGuiRef = v17;
    end;
    v15.onClose = function(_)
        if v15.props.onAssetConfigDestroy then
            v15.props.onAssetConfigDestroy();
        end;
    end;
end;
v14.didMount = function(v19)
    v19:setState({
        popUpGui = v19.popUpGuiRef
    });
end;
v14.render = function(v20)
    local l_props_0 = v20.props;
    local l_state_0 = v20.state;
    return v4.createElement(v6, {
        Title = "Asset Configuration",
        Resizable = true,
        MinSize = Vector2.new(v9.MIN_WIDTH, v9.MIN_HEIGHT),
        Size = Vector2.new(v9.WIDTH, v9.HEIGHT),
        ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
        Modal = not l_DebugBuiltInPluginModalsNotBlocking_0,
        InitialEnabled = true,
        plugin = l_props_0.plugin,
        [v4.Change.Enabled] = v20.onClose,
        [v4.Ref] = v20.popUpRefFunc,
        [v4.Event.AncestryChanged] = v20.onAncestryChanged
    }, {
        ContextServices = if not l_state_0.popUpGui then nil else l_ContextServices_0.provide({
            l_ContextServices_0.Focus.new(l_state_0.popUpGui),
            v12.new(l_state_0.popUpGui),
            v13.new(l_props_0.networkInterface),
            v10(v8())
        }, {
            ScreenSelect = v4.createElement(v7, {
                assetId = l_props_0.assetId,
                assetTypeEnum = l_props_0.assetTypeEnum,
                onClose = v20.onClose,
                pluginGui = l_state_0.popUpGui
            })
        })
    });
end;
return v14;


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.RoactRodux);
local v4 = require(l_Packages_0.Framework);
local l_Util_0 = l_Parent_0.Core.Util;
local v6 = require(l_Util_0.Constants);
local v7 = require(l_Util_0.Images);
local v8 = require(l_Util_0.AssetConfigUtil);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_UI_0 = v4.UI;
local l_Image_0 = l_UI_0.Image;
local l_Pane_0 = l_UI_0.Pane;
local l_Tooltip_0 = l_UI_0.Tooltip;
local v15 = require(l_Parent_0.Core.Components.RoundFrame);
local v16 = game:DefineFastInt("AssetConfigDescendantsPreviewLimit", 10000);
local l_EnableUGCBundleUnknownMeshPartFiltering_0 = game:GetFastFlag("EnableUGCBundleUnknownMeshPartFiltering");
local v18 = if not l_EnableUGCBundleUnknownMeshPartFiltering_0 then nil else require(l_Util_0.AssetThumbnailPreviewUtil);
local function v22(v19)
    for _, v21 in pairs(v19:GetDescendants()) do
        if v21:IsA("LuaSourceContainer") then
            v21:Destroy();
        end;
    end;
end;
local function v26(v23)
    for _, v25 in pairs(v23:GetDescendants()) do
        if not (not v25:IsA("Sound") or not v25.Playing) then
            v25.Playing = false;
        end;
    end;
end;
local function v30(v27, v28)
    local l_v28_ModelCFrame_0 = v28:GetModelCFrame();
    v27:SetImageServerView(l_v28_ModelCFrame_0);
    v27.CFrame = ((v27.CFrame - v27.CFrame.p) + l_v28_ModelCFrame_0.p) + (v27.CFrame.p - l_v28_ModelCFrame_0.p).unit * ((v28:GetExtentsSize().magnitude / 2) / math.tan(math.rad(v27.FieldOfView) / 2));
end;
local v31 = v2.PureComponent:extend("AssetThumbnailPreview");
v31.init = function(v32, _)
    v32.viewportRef = v2.createRef();
    v32.state = {
        shouldShow = v32:shouldShowInstances()
    };
end;
v31.didMount = function(v34)
    v34:setView();
end;
if l_EnableUGCBundleUnknownMeshPartFiltering_0 then
    v31.didUpdate = function(v35, v36, _)
        if v35.props.AssetType ~= v36.AssetType and v35.props.AssetType ~= nil then
            v35:setView();
        end;
    end;
end;
v31.setView = function(v38)
    if v38.state.shouldShow then
        if v38.props.instances then
            local l_current_0 = v38.viewportRef.current;
            l_current_0:ClearAllChildren();
            local l_Camera_0 = Instance.new("Camera");
            l_Camera_0.Name = "Camera";
            l_Camera_0.Parent = l_current_0;
            l_current_0.CurrentCamera = l_Camera_0;
            local l_Model_0 = Instance.new("Model");
            l_Model_0.Parent = l_current_0;
            for _, v43 in pairs(v38.props.instances) do
                if not v43:IsA("LuaSourceContainer") then
                    pcall(function()
                        local v44 = v43:Clone();
                        v22(v44);
                        if not (not l_EnableUGCBundleUnknownMeshPartFiltering_0 or not v8.isUGCBundleType(v38.props.AssetType)) then
                            v18.removeAllUGCBUndleUnknownMeshParts(v44, v38.props.AssetType, v38.props.AllowedBundleTypeSettings);
                        end;
                        v44.Parent = l_Model_0;
                    end);
                end;
            end;
            v26(l_Model_0);
            local v45 = #v38.props.instances == 1 and v38.props.instances[1] or l_Model_0;
            local l_ThumbnailConfiguration_0 = v45:FindFirstChild("ThumbnailConfiguration");
            local l_ThumbnailCamera_0 = v45:FindFirstChild("ThumbnailCamera");
            if not l_ThumbnailConfiguration_0 or not l_ThumbnailConfiguration_0:IsA("Configuration") then
                if not l_ThumbnailCamera_0 or not l_ThumbnailCamera_0:IsA("Camera") then
                    v30(l_Camera_0, l_Model_0);
                else
                    l_current_0.CurrentCamera = l_ThumbnailCamera_0;
                    return ;
                end;
            else
                local l_ThumbnailCameraTarget_0 = l_ThumbnailConfiguration_0:FindFirstChild("ThumbnailCameraTarget");
                local l_ThumbnailCameraValue_0 = l_ThumbnailConfiguration_0:FindFirstChild("ThumbnailCameraValue");
                if not (((not l_ThumbnailCameraTarget_0 or not l_ThumbnailCameraTarget_0:IsA("ObjectValue")) or not l_ThumbnailCameraValue_0) or not l_ThumbnailCameraValue_0:IsA("CFrameValue")) then
                    local l_Value_0 = l_ThumbnailCameraTarget_0.Value;
                    if not (not l_Value_0 or not l_Value_0:IsA("BasePart")) then
                        l_Camera_0.CFrame = l_Value_0.CFrame:toWorldSpace(l_ThumbnailCameraValue_0.Value);
                        return ;
                    end;
                end;
            end;
        end;
        return ;
    else
        return ;
    end;
end;
v31.getName = function(v51)
    if v51.props.instances and #v51.props.instances > 0 then
        return v51.props.instances[1].Name;
    else
        return "";
    end;
end;
v31.shouldShowInstances = function(v52)
    if v52.props.instances == nil then
        return false;
    else
        local v53 = 0;
        for _, v55 in v52.props.instances, nil, nil do
            v53 = v53 + #v55:GetDescendants();
            if v16 <= v53 then
                return false;
            end;
        end;
        return true;
    end;
end;
v31.render = function(v56)
    local l_props_0 = v56.props;
    local l_Localization_0 = l_props_0.Localization;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local v60 = l_props_0.title or v56:getName();
    local v61 = true;
    if l_props_0.ShowTitle ~= nil then
        v61 = l_props_0.showTitle;
    end;
    local v62 = l_props_0.Position or UDim2.new(1, 0, 1, 0);
    local v63 = l_props_0.titleHeight or 24;
    return v2.createElement("Frame", {
        BackgroundTransparency = 1,
        Size = l_props_0.Size,
        Position = v62,
        LayoutOrder = l_props_0.LayoutOrder or 1
    }, {
        PreviewFrame = v2.createElement(v15, {
            BackgroundColor3 = l_Stylizer_0.thumbnailPreview.background,
            BorderColor3 = l_Stylizer_0.thumbnailPreview.border,
            Size = not not v61 and UDim2.new(1, 0, 1, -(v63 + (l_props_0.titlePadding or 12))) or UDim2.new(1, 0, 1, 0)
        }, {
            Viewport = if not v56.state.shouldShow then v2.createElement(l_Pane_0, {}, {
                Image = v2.createElement(l_Image_0, {
                    AnchorPoint = Vector2.new(0.5, 0.5),
                    Image = v7.WARNING_ICON,
                    ImageColor3 = l_Stylizer_0.thumbnailPreview.text,
                    Position = UDim2.fromScale(0.5, 0.5),
                    Size = l_Stylizer_0.thumbnailPreview.warningIconSize
                }),
                Tooltip = v2.createElement(l_Tooltip_0, {
                    Text = l_Localization_0:getText("AssetThumbnailPreview", "PreviewTooBig")
                })
            }) else v2.createElement("ViewportFrame", {
                [v2.Ref] = v56.viewportRef,
                Size = UDim2.new(1, 0, 1, 0),
                BackgroundColor3 = l_Stylizer_0.thumbnailPreview.background,
                BackgroundTransparency = 1
            })
        }),
        Title = v61 and v2.createElement("TextLabel", {
            Text = v60,
            Font = v6.FONT,
            TextSize = v6.FONT_SIZE_MEDIUM,
            TextColor3 = l_Stylizer_0.thumbnailPreview.text,
            Position = UDim2.new(0, 0, 1, -v63),
            Size = UDim2.new(1, 0, 0, v63),
            BackgroundTransparency = 1
        })
    });
end;
return v3.connect(function(v64, _)
    return {
        instances = (v64 or {}).instances
    };
end)((l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer
})(v31)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.RoactRodux);
local v4 = require(l_Packages_0.Framework);
local l_Util_0 = l_Parent_0.Core.Util;
local _ = require(l_Util_0.AssetConfigConstants);
local v7 = require(l_Util_0.AssetConfigUtil);
local v8 = require(l_Util_0.getAllowedAssetTypeEnums);
local v9 = require(l_Parent_0.Core.Localization.getLocalizedAssetTextMap);
local l_Components_0 = l_Parent_0.Core.Components;
local v11 = require(l_Components_0.NavButton);
local v12 = require(l_Components_0.AssetConfiguration.AssetThumbnailPreview);
local v13 = require(l_Components_0.AssetConfiguration.DefaultThumbnailPreview);
local v14 = require(l_Components_0.AssetConfiguration.AssetTypeSelector);
local l_UseDefaultThumbnailForAnimation_0 = game:GetFastFlag("UseDefaultThumbnailForAnimation");
local l_Actions_0 = l_Parent_0.Core.Actions;
local _ = require(l_Actions_0.SetCurrentScreen);
local v18 = require(l_Actions_0.SetUploadAssetType);
local v19 = require(l_Parent_0.Core.Thunks.AssetConfiguration.GoToNextScreen);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v22 = v2.PureComponent:extend("AssetTypeSelection");
v22.didMount = function(v23)
    if v23:canSkip() then
        v23.props.goToNextScreen();
    end;
end;
v22.getSelectorItems = function(v24)
    local v25 = {
        {
            name = "Game development assets",
            selectable = false
        },
        {
            name = "Model",
            selectable = true,
            type = Enum.AssetType.Model
        }
    };
    table.insert(v25, {
        name = "Animation",
        selectable = true,
        type = Enum.AssetType.Animation
    });
    local v26 = v8(v24.props.allowedAssetTypesForRelease);
    if #v26 > 0 then
        v25[#v25 + 1] = {
            name = v24.props.Localization:getText("General", "CategoryCreationsCatalogSectionDivider") or "",
            selectable = false
        };
        for _, v28 in pairs(v26) do
            v25[#v25 + 1] = {
                name = v9(v24.props.Localization)[v28] or "",
                selectable = true,
                type = v28
            };
        end;
    end;
    return v25;
end;
v22.canSkip = function(v29)
    if not v7.isBuyableMarketplaceAsset(v29.props.assetTypeEnum) then
        local v30 = 0;
        for _, v32 in pairs(v29:getSelectorItems()) do
            if v32.selectable then
                v30 = v30 + 1;
            end;
        end;
        return v30 == 2;
    else
        return true;
    end;
end;
v22.render = function(v33)
    local l_props_0 = v33.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local v36 = l_UseDefaultThumbnailForAnimation_0 and v33.props.assetTypeEnum == Enum.AssetType.Animation;
    return v2.createElement("Frame", {
        BackgroundColor3 = l_Stylizer_0.typeSelection.background,
        BackgroundTransparency = 0,
        BorderSizePixel = 0,
        Size = l_props_0.Size
    }, {
        AssetThumbnailPreview = not v36 and v2.createElement(v12, {
            Size = UDim2.new(0, 150, 0, 186),
            Position = UDim2.new(0.5, -75, 0, 48),
            titleHeight = 24,
            titlePadding = 12
        }),
        DefaultThumbnailPreview = v36 and v2.createElement(v13, {
            Size = UDim2.new(0, 150, 0, 186),
            Position = UDim2.new(0.5, -75, 0, 48)
        }),
        AssetTypeSelector = v2.createElement(v14, {
            Position = UDim2.new(0.5, -200, 0, 310),
            height = 40,
            width = 400,
            assetTypeEnum = v33.props.assetTypeEnum,
            onAssetTypeSelected = v33.props.onAssetTypeSelected,
            items = v33:getSelectorItems()
        }),
        Footer = v2.createElement("Frame", {
            Size = UDim2.new(1, 0, 0, 62),
            Position = UDim2.new(0, 0, 1, -62),
            BackgroundColor3 = l_Stylizer_0.typeSelection.configFooter.background,
            BorderColor3 = l_Stylizer_0.typeSelection.configFooter.border
        }, {
            UIListLayout = v2.createElement("UIListLayout", {
                Padding = UDim.new(0, 24),
                FillDirection = Enum.FillDirection.Horizontal,
                HorizontalAlignment = Enum.HorizontalAlignment.Right,
                VerticalAlignment = Enum.VerticalAlignment.Center
            }),
            UIPadding = v2.createElement("UIPadding", {
                PaddingRight = UDim.new(0, 24)
            }),
            CancelButton = v2.createElement(v11, {
                Size = UDim2.new(0, 120, 0, 32),
                LayoutOrder = 0,
                titleText = "Cancel",
                onClick = l_props_0.onClose
            }),
            NextButton = v2.createElement(v11, {
                Size = UDim2.new(0, 120, 0, 32),
                LayoutOrder = 1,
                titleText = "Next",
                isPrimary = true,
                onClick = function()
                    v33.props.goToNextScreen();
                end
            })
        })
    });
end;
return v3.connect(function(v37, _)
    v37 = v37 or {};
    return {
        instances = v37.instances,
        currentScreen = v37.currentScreen,
        screenFlowType = v37.screenFlowType,
        allowedAssetTypesForRelease = v37.allowedAssetTypesForRelease,
        assetTypeEnum = v37.assetTypeEnum
    };
end, function(v39)
    return {
        goToNextScreen = function()
            v39(v19());
        end,
        onAssetTypeSelected = function(v40)
            v39(v18(v40));
        end
    };
end)((l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer,
    Localization = l_ContextServices_0.Localization
})(v22)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.Framework);
local v4 = require(l_Parent_0.Core.Util.Constants);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v7 = require(l_Parent_0.Core.Components.DropdownMenu);
local v8 = v2.PureComponent:extend("AssetTypeSelector");
v8.init = function(v9, _)
    v9.onItemClicked = function(v11)
        v9:setState({
            dropDownIndex = v11
        });
        if not (v9.props.assetTypeEnum ~= Enum.AssetType.Plugin) or v9.props.assetTypeEnum == Enum.AssetType.Animation then
            if v9.props.onAssetTypeSelected then
                v9.props.onAssetTypeSelected(v9.props.assetTypeEnum);
                return ;
            end;
        elseif v9.props.onAssetTypeSelected then
            local v12 = v9.props.items[v11];
            if not (not v12 or not v12.type) then
                v9.props.onAssetTypeSelected(v12.type);
            end;
        end;
    end;
    v9.onItemClicked(v9:getFirstSelectableIndex());
end;
v8.getFirstSelectableIndex = function(v13)
    for v14 = 1, #v13.props.items do
        if v13.props.items[v14].selectable then
            return v14;
        end;
    end;
end;
v8.render = function(v15)
    local l_props_0 = v15.props;
    local l_state_0 = v15.state;
    local l_Stylizer_0 = l_props_0.Stylizer;
    return v2.createElement("Frame", {
        BackgroundTransparency = 1,
        Size = UDim2.new(0, l_props_0.width, 0, l_props_0.height),
        Position = l_props_0.Position,
        Active = true
    }, {
        Title = v2.createElement("TextLabel", {
            BackgroundTransparency = 1,
            Position = UDim2.new(0, 0, 0, -28),
            Size = UDim2.new(1, 0, 0, 24),
            TextColor3 = l_Stylizer_0.typeSelection.selector.title,
            TextSize = 16,
            Font = v4.FONT,
            Text = "Choose asset type",
            TextXAlignment = Enum.TextXAlignment.Left
        }),
        Dropdown = v2.createElement(v7, {
            Position = UDim2.new(0.5, -l_props_0.width / 2, 0, 0),
            Size = UDim2.new(1, 0, 1, 0),
            selectedDropDownIndex = l_state_0.dropDownIndex,
            visibleDropDOwnCount = 5,
            items = v15.props.items,
            rowHeight = 24,
            fontSize = 20,
            onItemClicked = v15.onItemClicked
        }),
        Description = v2.createElement("TextLabel", {
            BackgroundTransparency = 1,
            Position = UDim2.new(0, 0, 1, 0),
            Size = UDim2.new(1, 0, 0, 18),
            TextColor3 = l_Stylizer_0.typeSelection.selector.description,
            TextSize = 12,
            Font = v4.FONT,
            Text = "Once published, this model can be shared in Marketplace",
            TextXAlignment = Enum.TextXAlignment.Left
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v8));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.RoactRodux);
local v4 = require(l_Packages_0.Framework);
local l_Util_0 = l_Parent_0.Core.Util;
local v6 = require(l_Util_0.AssetConfigConstants);
local l_PreviewTypes_0 = v6.PreviewTypes;
local v8 = require(l_Util_0.AssetConfigUtil);
local v9 = require(l_Parent_0.Core.Actions.SetCurrentScreen);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_AssetConfiguration_0 = l_Parent_0.Core.Components.AssetConfiguration;
local v13 = require(l_AssetConfiguration_0.LoadingBarWrapper);
local v14 = require(l_AssetConfiguration_0.ProgressBarWrapper);
local v15 = require(l_AssetConfiguration_0.AssetThumbnailPreview);
local v16 = require(l_Parent_0.Core.Util.SharedFlags.getFFlagToolboxFilterMeshPartsInBundleUpload);
local v17 = v2.PureComponent:extend("AssetUpload");
v17.init = function(v18, _)
    v18.state = {
        isLoading = true
    };
end;
v17.render = function(v20)
    local l_props_0 = v20.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local v23 = v8.getPreviewType(l_props_0.assetTypeEnum, l_props_0.instances);
    local v24 = v23 == l_PreviewTypes_0.ModelPreview;
    local v25 = true;
    if v23 ~= l_PreviewTypes_0.Thumbnail then
        v25 = v23 == l_PreviewTypes_0.ImagePicker;
    end;
    return v2.createElement("Frame", {
        BackgroundColor3 = l_Stylizer_0.typeValidation.background,
        BackgroundTransparency = 0,
        BorderSizePixel = 0,
        Size = l_props_0.Size
    }, {
        ModelPreview = v24 and v2.createElement(v15, {
            title = l_props_0.assetName,
            titleHeight = 24,
            titlePadding = 12,
            Position = UDim2.new(0.5, -75, 0, 48),
            Size = UDim2.new(0, 150, 0, 186),
            AssetType = if not v16() then nil else l_props_0.assetTypeEnum,
            AllowedBundleTypeSettings = if not not v16() and v8.isUGCBundleType(l_props_0.assetTypeEnum) then l_props_0.allowedBundleTypeSettings else nil
        }),
        ThumbnailPreview = v25 and v2.createElement("ImageLabel", {
            Position = UDim2.new(0.5, -75, 0, 48),
            Size = UDim2.new(0, 150, 0, 150),
            Image = v8.getResultThumbnail(l_props_0.assetId, l_props_0.iconFile),
            BackgroundTransparency = 1,
            BorderSizePixel = 0
        }),
        LoadingBar = if not v8.isUGCBundleType(l_props_0.assetTypeEnum) then v2.createElement(v13, {
            loadingText = "Uploading",
            loadingTime = 0.5,
            holdPercent = 0.92,
            Size = UDim2.new(0, 400, 0, 6),
            Position = UDim2.new(0.5, -200, 0, 314),
            onFinish = l_props_0.uploadSucceeded ~= nil and l_props_0.onNext or nil
        }) else v2.createElement(v14, {
            onFinish = l_props_0.onNext
        })
    });
end;
return v3.connect(function(v26, _)
    v26 = v26 or {};
    return {
        uploadSucceeded = v26.uploadSucceeded,
        instances = v26.instances,
        assetId = v26.assetId,
        assetName = not not v26.changed and v26.changed.AssetConfigName or v26.assetName,
        screenFlowType = v26.screenFlowType,
        assetTypeEnum = v26.assetTypeEnum,
        thumbnailStatus = v26.thumbnailStatus,
        iconFile = v26.iconFile,
        allowedBundleTypeSettings = if not v16() then nil else v26.allowedBundleTypeSettings
    };
end, function(v28)
    return {
        onNext = function()
            v28(v9(v6.SCREENS.UPLOAD_ASSET_RESULT));
        end
    };
end)((l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v17)));


local l_DebugDisableLocalUGCValidation_0 = game:GetFastFlag("DebugDisableLocalUGCValidation");
local l_StudioService_0 = game:GetService("StudioService");
local l_ToolboxAdjustValidationReasonSize_0 = game:GetFastFlag("ToolboxAdjustValidationReasonSize");
local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v5 = require(l_Packages_0.Roact);
local v6 = require(l_Packages_0.RoactRodux);
local l_ScrollingFrame_0 = require(l_Packages_0.Framework).UI.ScrollingFrame;
local l_Util_0 = l_Parent_0.Core.Util;
local v9 = require(l_Util_0.Constants);
local v10 = require(l_Util_0.AssetConfigConstants);
local v11 = require(l_Util_0.AssetConfigUtil);
local v12 = require(l_Util_0.fixUpPreValidation);
local v13 = require(l_Util_0.getUGCValidationRestrictedUserTable);
local v14 = require(l_Packages_0.UGCValidation);
local l_ContextServices_0 = require(l_Packages_0.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v17 = require(l_Parent_0.Core.Actions.SetCurrentScreen);
local l_Components_0 = l_Parent_0.Core.Components;
local v19 = require(l_Components_0.AssetConfiguration.LoadingBarWrapper);
local v20 = require(l_Components_0.AssetConfiguration.AssetThumbnailPreview);
local v21 = require(l_Components_0.NavButton);
local v22 = require(l_Parent_0.Core.Flags.getFFlagToolboxAddNewUGCAssetTypes);
local v23 = require(l_Util_0.SharedFlags.getFFlagEnableUGCToolboxFixAccessories);
local v24 = not l_ToolboxAdjustValidationReasonSize_0 and 400 or 600;
local v25 = not l_ToolboxAdjustValidationReasonSize_0 and 72 or 400;
local v26 = v5.PureComponent:extend("AssetValidation");
v26.init = function(v27, _)
    v27.state = {
        failed = false,
        isLoading = true
    };
    local function v35(v29)
        local v30 = {};
        local v31 = v29 or {};
        for v32, v33 in v31, nil, nil do
            local v34 = v33:Clone();
            v12(v34);
            v30[v32] = v34;
        end;
        return v30;
    end;
    if l_DebugDisableLocalUGCValidation_0 and l_StudioService_0:HasInternalPermission() or not v11.isCatalogAsset(v27.props.assetTypeEnum) then
        v27.props.nextScreen();
        return ;
    elseif not v22() then
        v14.validateAsync(if not v23() then v27.props.instances else v35(v27.props.instances), v27.props.assetTypeEnum, function(v36, v37)
            if not v36 then
                v27:setState({
                    onFinish = function()
                        v27:setState({
                            isLoading = false,
                            reasons = v37
                        });
                    end
                });
                return ;
            else
                v27:setState({
                    onFinish = v27.props.nextScreen
                });
                return ;
            end;
        end);
        return ;
    else
        local function v40(v38, v39)
            if not v38 then
                v27:setState({
                    onFinish = function()
                        v27:setState({
                            isLoading = false,
                            reasons = v39
                        });
                    end
                });
                return ;
            else
                v27:setState({
                    onFinish = v27.props.nextScreen
                });
                return ;
            end;
        end;
        if Enum.AssetType.DynamicHead == v27.props.assetTypeEnum then
            v14.validateAsyncMeshPartFormat(if not v23() then v27.props.instances else v35(v27.props.instances), v27.props.assetTypeEnum, v40, false, false, v13());
            return ;
        else
            v14.validateAsync(if not v23() then v27.props.instances else v35(v27.props.instances), v27.props.assetTypeEnum, v40, false, false, v13());
            return ;
        end;
    end;
end;
v26.render = function(v41)
    local l_props_0 = v41.props;
    local l_state_0 = v41.state;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local v45 = "Reason:\n" .. if not l_ToolboxAdjustValidationReasonSize_0 then table.concat(v41.state.reasons or {}, "\n") else table.concat(v41.state.reasons or {}, "\n\n");
    return v5.createElement("Frame", {
        BackgroundColor3 = l_Stylizer_0.typeValidation.background,
        BackgroundTransparency = 0,
        BorderSizePixel = 0,
        Size = l_props_0.Size
    }, {
        Preview = v5.createElement(v20, {
            titleHeight = 24,
            titlePadding = 12,
            Position = UDim2.new(0.5, -75, 0, 48),
            Size = UDim2.new(0, 150, 0, 186)
        }),
        LoadingBar = v41.state.isLoading and v5.createElement(v19, {
            loadingText = "Validating",
            loadingTime = 0.5,
            holdPercent = 0.92,
            Size = UDim2.new(0, 400, 0, 6),
            Position = UDim2.new(0.5, -200, 0, 314),
            onFinish = l_state_0.onFinish
        }),
        LoadingResult = not v41.state.isLoading and v5.createElement("Frame", {
            Position = UDim2.new(0, 0, 0, 279),
            Size = UDim2.new(1, 0, 1, -279),
            BackgroundTransparency = 1
        }, {
            Title = v5.createElement("TextLabel", {
                BackgroundTransparency = 1,
                Font = v9.FONT,
                Position = UDim2.new(0.5, -200, 0, 0),
                Size = UDim2.new(0, 400, 0, 36),
                Text = "Validation Failed",
                TextColor3 = l_Stylizer_0.loading.text,
                TextSize = v9.FONT_SIZE_TITLE,
                TextXAlignment = Enum.TextXAlignment.Center,
                TextYAlignment = Enum.TextYAlignment.Center
            }),
            Reason = not l_ToolboxAdjustValidationReasonSize_0 and v5.createElement("TextLabel", {
                BackgroundTransparency = 1,
                Font = v9.FONT,
                Position = UDim2.new(0.5, -v24 / 2, 0, 49),
                Size = UDim2.new(0, v24, 0, v25),
                Text = v45,
                TextWrapped = true,
                TextColor3 = l_Stylizer_0.loading.text,
                TextSize = v9.FONT_SIZE_MEDIUM,
                TextXAlignment = Enum.TextXAlignment.Center,
                TextYAlignment = Enum.TextYAlignment.Top
            }),
            ScrollingFrame = l_ToolboxAdjustValidationReasonSize_0 and v5.createElement(l_ScrollingFrame_0, {
                BackgroundTransparency = 1,
                Position = UDim2.new(0.5, -v24 / 2, 0, 49),
                Size = UDim2.new(0, v24, 1, -111),
                CanvasSize = UDim2.new(0, v24, 0, v25)
            }, {
                Reason = v5.createElement("TextLabel", {
                    BackgroundTransparency = 1,
                    Font = v9.FONT,
                    Position = UDim2.new(0.5, -v24 / 2, 0, 49),
                    Size = UDim2.new(0, v24, 0, v25),
                    Text = v45,
                    TextWrapped = true,
                    TextColor3 = l_Stylizer_0.loading.text,
                    TextSize = v9.FONT_SIZE_MEDIUM,
                    TextXAlignment = Enum.TextXAlignment.Left,
                    TextYAlignment = Enum.TextYAlignment.Top
                })
            })
        }),
        Footer = not v41.state.isLoading and v5.createElement("Frame", {
            BackgroundTransparency = 1,
            Position = UDim2.new(0, 0, 1, -62),
            Size = UDim2.new(1, 0, 0, 62)
        }, {
            CloseButton = v5.createElement(v21, {
                onClick = l_props_0.onClose,
                titleText = "Close",
                LayoutOrder = 0,
                Position = UDim2.new(0.5, -60, 0.5, -16),
                Size = UDim2.new(0, 120, 0, 32)
            })
        })
    });
end;
return v6.connect(function(v46, _)
    v46 = v46 or {};
    return {
        instances = v46.instances,
        assetTypeEnum = v46.assetTypeEnum
    };
end, function(v48)
    return {
        nextScreen = function()
            v48(v17(v10.SCREENS.CONFIGURE_ASSET));
        end
    };
end)((l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v26)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v2 = require(l_Packages_0.Roact);
local l_Util_0 = l_Parent_0.Core.Util;
local v4 = require(l_Util_0.Constants);
local v5 = require(l_Util_0.Images);
local v6 = require(l_Packages_0.Framework);
local l_ContextServices_0 = v6.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_RoundBox_0 = v6.UI.RoundBox;
local l_Container_0 = v6.UI.Container;
local v11 = v2.PureComponent:extend("CatalogTag");
v11.render = function(v12)
    local l_props_0 = v12.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    return v2.createElement(l_Container_0, {
        Background = l_RoundBox_0,
        BackgroundStyle = "CatalogTag",
        Position = l_props_0.Position,
        Size = l_props_0.Size
    }, {
        Title = v2.createElement("TextLabel", {
            TextColor3 = l_Stylizer_0.tags.textColor,
            Text = l_props_0.Text,
            TextSize = v4.FONT_SIZE_TITLE,
            Font = v4.FONT,
            Size = UDim2.new(0, l_props_0.textSize.X, 0, l_props_0.textSize.Y),
            Position = UDim2.new(0, 3, 0, 3),
            BackgroundTransparency = 1
        }),
        Close = v2.createElement("ImageButton", {
            BackgroundTransparency = 1,
            Image = v5.CLOSE_BUTTON,
            Size = UDim2.new(0, 16, 0, 16),
            ImageColor3 = l_Stylizer_0.tags.textColor,
            Position = UDim2.new(0, (3 + l_props_0.textSize.X) + 3, 0.5, -8),
            [v2.Event.MouseButton1Click] = l_props_0.onClose
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v11));


local l_Parent_0 = script.Parent.Parent.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.RoactRodux);
local v4 = require(l_Packages_0.Cryo);
local v5 = require(l_Packages_0.Framework);
local l_Util_0 = l_Parent_0.Core.Util;
local v7 = require(l_Util_0.Constants);
local v8 = require(l_Util_0.AssetConfigConstants);
local v9 = require(l_Util_0.trimString);
local v10 = require(l_Util_0.TagsUtil);
local l_ContextServices_0 = v5.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v13 = require(l_Parent_0.Core.ContextServices.NetworkContext);
local l_StyleModifier_0 = v5.Util.StyleModifier;
local l_GetTextSize_0 = v5.Util.GetTextSize;
local l_RoundBox_0 = v5.UI.RoundBox;
local l_withForwardRef_0 = v5.Wrappers.withForwardRef;
local l_Components_0 = l_Parent_0.Core.Components;
local v19 = require(l_Components_0.DropdownItemsList);
local v20 = require(l_Components_0.AssetConfiguration.CatalogTags.CatalogTag);
local v21 = require(l_Parent_0.Core.Networking.Requests.GetTagSuggestionsRequest);
local v22 = require(l_Parent_0.Core.Actions.SetTagSuggestions);
local v23 = (5 + v7.FONT_SIZE_MEDIUM) + 5;
local v24 = v2.PureComponent:extend("TagsComponent");
v24.init = function(v25)
    v25.state = {
        active = false,
        textFieldPosition = Vector2.new(),
        textFieldSize = Vector2.new()
    };
    v25.textBoxRef = v2.createRef();
    v25.textFieldRef = v2.createRef();
    v25.lastText = " ";
    v25.onTextFieldAbsoluteSizeChanged = function(v26)
        v25:setState({
            textFieldSize = v26.AbsoluteSize
        });
    end;
    v25.onTextFieldAbsolutePositionChanged = function(v27)
        v25:setState({
            textFieldPosition = v27.AbsolutePosition
        });
    end;
    v25.onTextBoxFocused = function()
        if not ((v25.state.active or not v25.textBoxRef) or not v25.textBoxRef.current) then
            v25.textBoxRef.current.CursorPosition = 9999;
            v25:setState({
                active = true
            });
        end;
    end;
    v25.onTextBoxFocusLost = function(v28, v29)
        if not v29 then
            if not v25.state.active or #v25.props.suggestions == 0 then
                v25:setState({
                    active = false
                });
                return ;
            else
                v28:CaptureFocus();
                return ;
            end;
        else
            if #v9(v28.Text) > 0 and #v25.props.suggestions > 0 then
                v25:addTag(v25.props.suggestions[1]);
                v25.props.clearSuggestions();
                v28.Text = " ";
            end;
            v28:CaptureFocus();
            return ;
        end;
    end;
    v25.onTextBoxTextChanged = function(v30)
        local l_networkInterface_0 = v25.props.Network.networkInterface;
        local l_Text_0 = v30.Text;
        if l_Text_0 ~= v25.lastText then
            local v33 = false;
            if string.sub(l_Text_0, 1, 1) ~= " " then
                l_Text_0 = " " .. l_Text_0;
                local l_tags_0 = v25.props.tags;
                if #v25.lastText == 1 and #l_tags_0 > 0 then
                    v25:removeTag(l_tags_0[#l_tags_0].tagId);
                end;
                v33 = true;
            end;
            if string.sub(l_Text_0, #l_Text_0, #l_Text_0) == "\r" then
                l_Text_0 = string.sub(l_Text_0, 1, #l_Text_0 - 1);
                v33 = true;
            end;
            if not v25:canAddTags() then
                l_Text_0 = " ";
                v33 = true;
            end;
            if v33 then
                v30.Text = l_Text_0;
                v30:ReleaseFocus();
                v30:CaptureFocus();
            end;
            v25.lastText = l_Text_0;
        end;
        local v35 = v9(l_Text_0);
        if #v35 > 0 then
            v25.props.getSuggestions(l_networkInterface_0, v25.props.tags, v35);
            return ;
        else
            v25.props.clearSuggestions();
            return ;
        end;
    end;
    v25.onTextBoxCursorPositionChanged = function(v36)
        if v36.CursorPosition < 2 then
            v36.CursorPosition = 2;
        end;
    end;
end;
v24.canAddTags = function(v37)
    return #v37.props.tags < v37.props.maximumItemTagsPerItem;
end;
v24.addTag = function(v38, v39)
    if not (not v38:canAddTags() or v10.hasTag(v38.props.tags, v39.tagId)) then
        v38.props.onTagsChange(v4.List.join(v38.props.tags, {
            v39
        }));
    end;
end;
v24.removeTag = function(v40, v41)
    local v42 = {};
    for v43 = 1, #v40.props.tags do
        local v44 = v40.props.tags[v43];
        if v44.tagId ~= v41 then
            table.insert(v42, v44);
        end;
    end;
    v40.props.onTagsChange(v42);
end;
v24.getDropdownItems = function(v45)
    local v46 = {};
    for _, v48 in pairs(v45.props.suggestions) do
        table.insert(v46, {
            name = v48.localizedDisplayName,
            selectable = true
        });
    end;
    return v46;
end;
v24.clearSuggestions = function(v49)
    v49.props.clearSuggestions();
end;
v24.didMount = function(v50)
    if v50.textFieldRef.current then
        v50:setState({
            textFieldPosition = v50.textFieldRef.current.AbsolutePosition,
            textFieldSize = v50.textFieldRef.current.AbsoluteSize
        });
    end;
end;
v24.render = function(v51)
    local l_props_0 = v51.props;
    local l_state_0 = v51.state;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_Title_0 = l_props_0.Title;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_publishAsset_0 = l_Stylizer_0.publishAsset;
    local v58 = {};
    local v59 = (3 + v7.FONT_SIZE_TITLE) + 3;
    local v60 = 0;
    local v61 = 10;
    local function _(v62)
        local l_v61_0 = v61;
        if l_state_0.textFieldSize.X - 10 < v61 + v62 then
            v60 = v60 + 1;
            v61 = 10;
            l_v61_0 = v61;
        end;
        v61 = (v61 + v62) + 3;
        return l_v61_0, 10 + v60 * (10 + v59);
    end;
    for v65 = 1, #l_props_0.tags do
        local v66 = l_props_0.tags[v65];
        local v67 = l_GetTextSize_0(v66.localizedDisplayName, v7.FONT_SIZE_TITLE, v7.FONT, Vector2.new(0, 0));
        local v68 = (((3 + v67.X) + 3) + 16) + 3;
        local v69 = (3 + v67.Y) + 3;
        local l_v61_1 = v61;
        if l_state_0.textFieldSize.X - 10 < v61 + v68 then
            v60 = v60 + 1;
            v61 = 10;
            l_v61_1 = v61;
        end;
        v61 = (v61 + v68) + 3;
        v58["Tag" .. v65] = v2.createElement(v20, {
            Text = v66.localizedDisplayName,
            Position = UDim2.new(0, l_v61_1, 0, 10 + v60 * (10 + v59)),
            Size = UDim2.new(0, v68, 0, v69),
            textSize = v67,
            onClose = function()
                v51:removeTag(v66.tagId);
            end
        });
    end;
    local l_v61_2 = v61;
    if l_state_0.textFieldSize.X - 10 < v61 + 100 then
        v60 = v60 + 1;
        v61 = 10;
        l_v61_2 = v61;
    end;
    v61 = (v61 + 100) + 3;
    local l_l_v61_2_0 = l_v61_2;
    v58.TextBox = v2.createElement("TextBox", {
        BackgroundTransparency = 1,
        ClearTextOnFocus = false,
        ClipsDescendants = true,
        Font = v7.FONT,
        Position = UDim2.new(0, l_l_v61_2_0, 0, 10 + v60 * (10 + v59)),
        Size = UDim2.new(0, l_state_0.textFieldSize.X - l_l_v61_2_0, 0, v59),
        TextColor3 = l_Stylizer_0.tags.textColor,
        TextSize = v7.FONT_SIZE_TITLE,
        TextXAlignment = Enum.TextXAlignment.Left,
        TextYAlignment = Enum.TextYAlignment.Center,
        Text = v51.lastText,
        [v2.Event.Focused] = v51.onTextBoxFocused,
        [v2.Event.FocusLost] = v51.onTextBoxFocusLost,
        [v2.Change.Text] = v51.onTextBoxTextChanged,
        [v2.Change.CursorPosition] = v51.onTextBoxCursorPositionChanged,
        [v2.Ref] = v51.textBoxRef
    });
    l_v61_2 = v9(v51.lastText);
    local v73 = false;
    if #l_v61_2 > 0 then
        v73 = false;
        if #l_props_0.suggestions == 0 then
            v73 = l_v61_2 == l_props_0.latestTagSearchQuery;
        end;
    end;
    local v74 = nil;
    local v75 = nil;
    if not v73 then
        v74 = l_Stylizer_0.inputFields.toolTip;
        v75 = l_props_0.Localization:getText("Tags", "MaxTagsDescription", {
            max = l_props_0.maximumItemTagsPerItem
        });
    else
        v74 = l_Stylizer_0.inputFields.error;
        v75 = l_props_0.Localization:getText("Tags", "NoTagFound");
    end;
    local v76 = (((10 + v59) + v60 * (10 + v59)) + 10) + v23;
    local l_createElement_0 = v2.createElement;
    local v78 = "Frame";
    local v79 = {
        Active = true,
        BackgroundTransparency = 1,
        BorderSizePixel = 0,
        LayoutOrder = l_LayoutOrder_0,
        Size = UDim2.new(1, 0, 0, v76 + 10),
        [v2.Ref] = l_props_0.ForwardRef
    };
    local v80 = {
        UIListLayout = v2.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Horizontal,
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            Padding = UDim.new(0, 0),
            SortOrder = Enum.SortOrder.LayoutOrder,
            VerticalAlignment = Enum.VerticalAlignment.Top
        }),
        Title = v2.createElement("TextLabel", {
            BackgroundTransparency = 1,
            BorderSizePixel = 0,
            Font = v7.FONT,
            Size = UDim2.new(0, v8.TITLE_GUTTER_WIDTH, 1, 0),
            Text = l_Title_0,
            TextColor3 = l_publishAsset_0.titleTextColor,
            TextSize = v7.FONT_SIZE_TITLE,
            TextXAlignment = Enum.TextXAlignment.Left,
            TextYAlignment = Enum.TextYAlignment.Top,
            LayoutOrder = 1
        }),
        Content = v2.createElement("Frame", {
            BackgroundTransparency = 1,
            LayoutOrder = 2,
            Size = UDim2.new(1, -v8.TITLE_GUTTER_WIDTH, 0, v76)
        }, {
            Textfield = v2.createElement("Frame", {
                BackgroundTransparency = 1,
                Size = UDim2.new(1, 0, 1, -v23),
                [v2.Change.AbsoluteSize] = v51.onTextFieldAbsoluteSizeChanged,
                [v2.Change.AbsolutePosition] = v51.onTextFieldAbsolutePositionChanged,
                [v2.Ref] = v51.textFieldRef
            }, {
                Textfield = v2.createElement(l_RoundBox_0, {
                    Style = not v73 and "TagsComponent" or "TagsComponentError",
                    StyleModifier = (not v51:canAddTags() and l_StyleModifier_0.Disabled or l_state_0.active and l_StyleModifier_0.Selected) or nil
                }, v58)
            }),
            Description = v2.createElement("TextLabel", {
                BackgroundTransparency = 1,
                Size = UDim2.new(1, 0, 0, v23),
                Position = UDim2.new(0, 0, 1, -v23),
                LayoutOrder = 2,
                Text = v75,
                TextColor3 = v74,
                TextXAlignment = Enum.TextXAlignment.Left
            })
        })
    };
    local l_active_0 = l_state_0.active;
    if l_active_0 then
        l_active_0 = v51:canAddTags();
        if l_active_0 then
            l_active_0 = false;
            if #l_props_0.suggestions > 0 then
                l_active_0 = v2.createElement(v19, {
                    items = v51:getDropdownItems(),
                    onItemClicked = function(v82)
                        v51.lastText = " ";
                        v51:addTag(l_props_0.suggestions[v82]);
                        v51.props.clearSuggestions();
                        if not (not v51.textBoxRef or not v51.textBoxRef.current) then
                            v51.textBoxRef.current:CaptureFocus();
                        end;
                    end,
                    closeDropdown = function()
                        v51:setState({
                            active = false
                        });
                        if not (not v51.textBoxRef or not v51.textBoxRef.current) then
                            v51.textBoxRef.current:ReleaseFocus();
                        end;
                    end,
                    dropDownWidth = l_state_0.textFieldSize.X,
                    top = l_state_0.textFieldPosition.Y + l_state_0.textFieldSize.Y,
                    left = l_state_0.textFieldPosition.X,
                    windowPosition = l_state_0.textFieldPosition,
                    windowSize = l_state_0.textFieldSize,
                    setDropdownHeight = l_props_0.setDropdownHeight
                });
            end;
        end;
    end;
    v80.Suggestions = l_active_0;
    return l_createElement_0(v78, v79, v80);
end;
return l_withForwardRef_0((v3.connect(function(v83, _)
    v83 = v83 or {};
    return {
        suggestions = v83.tagSuggestions or {},
        latestTagSuggestionTime = v83.latestTagSuggestionTime or 0,
        latestTagSearchQuery = v83.latestTagSearchQuery
    };
end, function(v85)
    return {
        getSuggestions = function(v86, v87, v88)
            v85(v21(v86, v87, v88));
        end,
        clearSuggestions = function()
            v85(v22({}, tick(), ""));
        end
    };
end)((l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer,
    Localization = l_ContextServices_0.Localization,
    Network = v13
})(v24)))));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.RoactRodux);
local v4 = require(l_Packages_0.Framework);
local l_Util_0 = l_Parent_0.Core.Util;
local v6 = require(l_Util_0.Constants);
local v7 = require(l_Util_0.AssetConfigConstants);
local v8 = require(l_Util_0.getUserId);
local v9 = require(l_Util_0.AssetConfigUtil);
local v10 = require(l_Parent_0.Core.Components.DropdownMenu);
local l_Requests_0 = l_Parent_0.Core.Networking.Requests;
local v12 = require(l_Requests_0.GetAssetConfigManageableGroupsRequest);
local v13 = require(l_Requests_0.GetAssetTypeAgentsRequest);
local _ = require(l_Parent_0.Core.Thunks.GetGroupMetadata);
local v15 = require(l_Parent_0.Core.Types.ConfigTypes);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v18 = require(l_Parent_0.Core.ContextServices.NetworkContext);
local v19 = v2.PureComponent:extend("ConfigAccess");
v19.init = function(v20, v21)
    v20.allowOwnerEdit = v21.screenFlowType == v7.FLOW_TYPE.UPLOAD_FLOW;
end;
v19.didMount = function(v22)
    if not v9.isCatalogAsset(v22.props.assetTypeEnum) then
        v22.props.getManageableGroups(v22.props.Network.networkInterface);
        return ;
    else
        v22.props.getAssetTypeAgents(v22.props.Network.networkInterface, v22.props.assetTypeEnum);
        return ;
    end;
end;
v19.render = function(v23)
    local l_props_0 = v23.props;
    local _ = v23.state;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_Title_0 = l_props_0.Title;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_TotalHeight_0 = l_props_0.TotalHeight;
    local v30 = l_props_0.owner or {};
    local v31 = v30.typeId or 1;
    v23.dropdownContent = v9.getOwnerDropDownContent(not not v9.isCatalogAsset(l_props_0.assetTypeEnum) and l_props_0.assetTypeAgents or l_props_0.manageableGroups, l_props_0.Localization);
    local l_onDropDownSelect_0 = l_props_0.onDropDownSelect;
    local l_publishAsset_0 = l_Stylizer_0.publishAsset;
    local v34 = "";
    if not (v23.allowOwnerEdit or not v30.typeId) then
        if v30.typeId == v15.OWNER_TYPES.User then
            v34 = if v30.targetId ~= v8() then v30.username else l_props_0.Localization:getText("General", "Me");
        elseif l_props_0.assetGroupData then
            v34 = l_props_0.assetGroupData.Name;
        end;
    end;
    return v2.createElement("Frame", {
        Size = UDim2.new(1, 0, 0, l_TotalHeight_0),
        BackgroundTransparency = 1,
        BackgroundColor3 = Color3.fromRGB(227, 227, 227),
        BorderSizePixel = 0,
        LayoutOrder = l_LayoutOrder_0
    }, {
        UIListLayout = v2.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Horizontal,
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            VerticalAlignment = Enum.VerticalAlignment.Top,
            SortOrder = Enum.SortOrder.LayoutOrder,
            Padding = UDim.new(0, 0)
        }),
        Title = v2.createElement("TextLabel", {
            Size = UDim2.new(0, v7.TITLE_GUTTER_WIDTH, 1, 0),
            BackgroundTransparency = 1,
            BorderSizePixel = 0,
            Text = l_Title_0,
            TextXAlignment = Enum.TextXAlignment.Left,
            TextYAlignment = Enum.TextYAlignment.Top,
            TextSize = v6.FONT_SIZE_TITLE,
            TextColor3 = l_publishAsset_0.titleTextColor,
            Font = v6.FONT,
            LayoutOrder = 1
        }),
        DropDown = v23.allowOwnerEdit and v2.createElement(v10, {
            Size = UDim2.new(0, 220, 0, 38),
            visibleDropDownCount = 5,
            selectedDropDownIndex = v31,
            fontSize = v6.FONT_SIZE_LARGE,
            items = v23.dropdownContent,
            onItemClicked = l_onDropDownSelect_0,
            LayoutOrder = 2
        }),
        OwnerType = not v23.allowOwnerEdit and v2.createElement("TextLabel", {
            Size = UDim2.new(1, -v7.TITLE_GUTTER_WIDTH, 0, v6.FONT_SIZE_TITLE),
            BackgroundTransparency = 1,
            BorderSizePixel = 0,
            Text = v34,
            Font = v6.FONT,
            TextXAlignment = Enum.TextXAlignment.Left,
            TextYAlignment = Enum.TextYAlignment.Center,
            TextSize = v6.FONT_SIZE_TITLE,
            TextColor3 = l_publishAsset_0.textColor,
            LayoutOrder = 2
        })
    });
end;
return v3.connect(function(v35, v36)
    v35 = v35 or {};
    return {
        assetTypeEnum = v35.assetTypeEnum,
        screenFlowType = v35.screenFlowType,
        manageableGroups = v35.manageableGroups or {},
        assetTypeAgents = v35.assetTypeAgents or {},
        assetGroupData = (not not v36.owner and v35[v36.owner.targetId]) and v35[v36.owner.targetId].groupMetadata or v36.assetGroupData,
        owner = not not v35.assetConfigData and v35.assetConfigData.Creator or v36.owner
    };
end, function(v37)
    return {
        getManageableGroups = function(v38)
            v37(v12(v38));
        end,
        getAssetTypeAgents = function(v39, v40)
            v37(v13(v39, v40));
        end
    };
end)((l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer,
    Localization = l_ContextServices_0.Localization,
    Network = v18
})(v19)));