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 l_ContextServices_0 = require(l_Parent_0.Packages.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v5 = v1.PureComponent:extend("ProgressSpinner");
local function v9(v6)
    local v7 = false;
    local v8 = {
        bail = function()
            v7 = true;
        end
    };
    spawn(function()
        while not v7 do
            wait(0.01);
            v6.Rotation = v6.Rotation + 7;
        end;
    end);
    return v8;
end;
v5.init = function(v10)
    v10.progressSpinnerRef = v1.createRef();
end;
v5.didUpdate = function(v11)
    local l_current_0 = v11.progressSpinnerRef.current;
    if v11._currentSpinnerTask then
        v11._currentSpinnerTask.bail();
    end;
    if l_current_0 then
        v11._currentSpinnerTask = v9(l_current_0);
    end;
end;
v5.willUnmount = function(v13)
    if v13._currentSpinnerTask then
        v13._currentSpinnerTask.bail();
    end;
end;
v5.render = function(v14)
    local l_props_0 = v14.props;
    local l_IsBusy_0 = l_props_0.IsBusy;
    local l_Stylizer_0 = l_props_0.Stylizer;
    return l_IsBusy_0 and v1.createElement("ImageLabel", {
        Position = UDim2.new(0.5, 0, 0.5, 0),
        Size = UDim2.new(0, l_Stylizer_0.Size, 0, l_Stylizer_0.Size),
        AnchorPoint = Vector2.new(0.5, 0.5),
        BorderSizePixel = 0,
        BackgroundTransparency = 1,
        ZIndex = 10,
        Image = l_Stylizer_0.ProgressSpinnerImageUrl,
        ImageRectSize = Vector2.new(l_Stylizer_0.ImageRectSize, l_Stylizer_0.ImageRectSize),
        ImageRectOffset = Vector2.new(0.5, 0.5),
        [v1.Ref] = v14.progressSpinnerRef
    });
end;
return v2.connect(function(v18, _)
    return {
        IsBusy = v18.CloudTable.IsBusy
    };
end)((l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v5)));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v2.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_UI_0 = v2.UI;
local l_Button_0 = l_UI_0.Button;
local l_HoverArea_0 = l_UI_0.HoverArea;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_Pane_0 = l_UI_0.Pane;
local v10 = v1.PureComponent:extend("WarningDialog");
v10.render = function(v11)
    local l_props_0 = v11.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_Localization_0 = l_props_0.Localization;
    return v1.createElement(l_Pane_0, {
        AutomaticSize = Enum.AutomaticSize.Y,
        Layout = Enum.FillDirection.Vertical,
        HorizontalAlignment = Enum.HorizontalAlignment.Center,
        BackgroundTransparency = 0,
        BackgroundColor3 = l_Stylizer_0.MainBackground,
        Size = UDim2.new(1, 0, 1, 0),
        Spacing = 15
    }, {
        Message = v1.createElement(l_TextLabel_0, {
            TextXAlignment = Enum.TextXAlignment.Left,
            BackgroundTransparency = 1,
            Text = l_props_0.Text,
            Size = UDim2.new(0, 400, 0, 0),
            AutomaticSize = Enum.AutomaticSize.Y,
            TextWrapped = true,
            TextColor3 = l_Stylizer_0.WarningText,
            LayoutOrder = 1
        }),
        Buttons = v1.createElement(l_Pane_0, {
            AutomaticSize = Enum.AutomaticSize.Y,
            Layout = Enum.FillDirection.Horizontal,
            HorizontalAlignment = Enum.HorizontalAlignment.Center,
            BackgroundTransparency = 0,
            BackgroundColor3 = l_Stylizer_0.MainBackground,
            Size = UDim2.new(1, 0, 0, 0),
            Spacing = 40,
            LayoutOrder = 2
        }, {
            Confirm = v1.createElement(l_Button_0, {
                LayoutOrder = 1,
                OnClick = l_props_0.OkCallback,
                Size = UDim2.new(0, l_Stylizer_0.ButtonWidth, 0, l_Stylizer_0.ButtonHeight),
                Style = "PrimeTextButton",
                Text = l_Localization_0:getText("UploadDialogContent", "ConfirmButton")
            }, {
                v1.createElement(l_HoverArea_0, {
                    Cursor = "PointingHand"
                })
            }),
            Cancel = v1.createElement(l_Button_0, {
                LayoutOrder = 2,
                OnClick = l_props_0.CancelCallback,
                Size = UDim2.new(0, l_Stylizer_0.ButtonWidth, 0, l_Stylizer_0.ButtonHeight),
                Style = "TextButton",
                Text = l_Localization_0:getText("UploadDialogContent", "CancelButton")
            }, {
                v1.createElement(l_HoverArea_0, {
                    Cursor = "PointingHand"
                })
            })
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer,
    Localization = l_ContextServices_0.Localization
})(v10));


local v0 = require(script.Parent.Parent.Parent.Packages.Framework).ContextServices.ContextItem:extend("Analytics");
v0.new = function(v1)
    assert(v1, "Analytics.new expects analyticsImpl.");
    local v2 = {
        analyticsImpl = v1
    };
    setmetatable(v2, v0);
    return v2;
end;
v0.get = function(v3)
    return v3.analyticsImpl;
end;
return v0;


local l_StudioFixPluginWidgetLocalizedIds_0 = game:GetFastFlag("StudioFixPluginWidgetLocalizedIds");
local l_RunService_0 = game:GetService("RunService");
local l_Parent_0 = script.Parent.Parent;
local v3 = require(l_Parent_0.Packages.Roact);
local v4 = require(l_Parent_0.Packages.Rodux);
local v5 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v5.ContextServices;
local l_Plugin_0 = l_ContextServices_0.Plugin;
local l_Mouse_0 = l_ContextServices_0.Mouse;
local l_Store_0 = l_ContextServices_0.Store;
local l_DockWidget_0 = v5.UI.DockWidget;
local v11 = require(l_Parent_0.Src.ContextServices.AnalyticsContext);
local v12 = require(l_Parent_0.Src.Resources.PluginTheme);
local l_SourceStrings_0 = l_Parent_0.Src.Resources.Localization.SourceStrings;
local l_LocalizedStrings_0 = l_Parent_0.Src.Resources.Localization.LocalizedStrings;
local v15 = require(l_Parent_0.Src.Components.MainView);
local v16 = require(l_Parent_0.Src.Reducers.MainReducer);
local v17 = require(l_Parent_0.Src.Thunks.LoadPluginMetadata);
local v18 = require(l_Parent_0.Src.Util.Analytics);
local v19 = Vector2.new(380, 250);
local v20 = v3.PureComponent:extend("MainPlugin");
v20.init = function(v21)
    v21.state = {
        enabled = false
    };
    v21.store = v4.Store.new(v16, {}, {
        v4.thunkMiddleware
    });
    v21.localization = l_ContextServices_0.Localization.new({
        stringResourceTable = l_SourceStrings_0,
        translationResourceTable = l_LocalizedStrings_0,
        pluginName = "LocalizationTools"
    });
    v21.theme = v12();
    v21.api = l_ContextServices_0.API.new();
    v21.analyticsImpl = v18.new();
    v21.toggleState = function()
        local l_enabled_0 = v21.state.enabled;
        v21:setState({
            enabled = not l_enabled_0
        });
        if not l_enabled_0 then
            v21.analyticsImpl:reportToolOpened(1);
            v21.analyticsImpl:reportButtonPress("tools", "open");
            return ;
        else
            v21.analyticsImpl:reportButtonPress("tools", "closed");
            return ;
        end;
    end;
    v21.onRestore = function(v23)
        v21:setState({
            enabled = v23
        });
    end;
    v21.onDockWidgetCreated = function()
        v21.props.pluginLoaderContext.mainButtonClickedSignal:Connect(v21.toggleState);
    end;
    v21.onDockWidgetEnabledChanged = function(v24)
        v21:setState({
            enabled = v24.Enabled
        });
    end;
    v21.onClose = function()
        v21:setState({
            enabled = false
        });
    end;
    v21.button = v21.props.pluginLoaderContext.mainButton;
end;
v20.didMount = function(v25)
    if l_RunService_0:IsEdit() then
        local v26 = v25.api:get();
        local l_localization_0 = v25.localization;
        local l_store_0 = v25.store;
        l_store_0:dispatch(v17.GetAll(v26, l_localization_0));
        game:GetPropertyChangedSignal("GameId"):Connect(function()
            l_store_0:dispatch(v17.OnGameIdChanged(v26, l_localization_0));
        end);
        return ;
    else
        return ;
    end;
end;
v20.didUpdate = function(v29)
    v29.button:SetActive(v29.state.enabled);
end;
v20.render = function(v30)
    local l_props_0 = v30.props;
    local l_state_0 = v30.state;
    local l_Plugin_1 = l_props_0.Plugin;
    local l_enabled_1 = l_state_0.enabled;
    return l_ContextServices_0.provide({
        l_Plugin_0.new(l_Plugin_1)
    }, {
        MainWidget = l_RunService_0:IsEdit() and v3.createElement(l_DockWidget_0, {
            Id = if not l_StudioFixPluginWidgetLocalizedIds_0 then nil else "LocalizationTools",
            Enabled = l_enabled_1,
            Widget = l_props_0.pluginLoaderContext.mainDockWidget,
            Title = v30.localization:getText("Plugin", "WindowTitle"),
            ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
            InitialDockState = Enum.InitialDockState.Left,
            MinSize = v19,
            Size = v19,
            OnClose = v30.onClose,
            ShouldRestore = true,
            OnWidgetRestored = v30.onRestore,
            OnWidgetCreated = v30.onDockWidgetCreated,
            [v3.Change.Enabled] = v30.onDockWidgetEnabledChanged
        }, {
            MainProvider = l_enabled_1 and l_ContextServices_0.provide({
                l_Mouse_0.new(l_Plugin_1:getMouse()),
                l_Store_0.new(v30.store),
                v30.api,
                v30.localization,
                v30.theme,
                v11.new(v30.analyticsImpl)
            }, {
                MainView = v3.createElement(v15)
            })
        })
    });
end;
return v20;


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.Rodux);
local v3 = require(l_Parent_0.Src.Reducers.MainReducer);
local l_ContextServices_0 = require(l_Parent_0.Packages.Framework).ContextServices;
local v5 = require(l_Parent_0.Src.Resources.PluginTheme);
local v6 = require(l_Parent_0.Src.ContextServices.AnalyticsContext);
local v7 = require(l_Parent_0.Src.Util.Analytics);
local v8 = v1.PureComponent:extend("MockPlugin");
local function _()
    return Instance.new("ScreenGui");
end;
local function v19(v10)
    local v12 = {
        GetMouse = function(_)
            return {};
        end
    };
    local function _()
        local l_ScreenGui_0 = Instance.new("ScreenGui");
        l_ScreenGui_0.Name = "MockPluginGui";
        if v10 then
            l_ScreenGui_0.Parent = v10;
        end;
        return l_ScreenGui_0;
    end;
    v12.CreateQWidgetPluginGui = function(_)
        local l_ScreenGui_1 = Instance.new("ScreenGui");
        l_ScreenGui_1.Name = "MockPluginGui";
        if v10 then
            l_ScreenGui_1.Parent = v10;
        end;
        return l_ScreenGui_1;
    end;
    v12.CreateDockWidgetPluginGui = function(_)
        local l_ScreenGui_2 = Instance.new("ScreenGui");
        l_ScreenGui_2.Name = "MockPluginGui";
        if v10 then
            l_ScreenGui_2.Parent = v10;
        end;
        return l_ScreenGui_2;
    end;
    return v12;
end;
v8.init = function(v20, v21)
    v20.plugin = v19(v21.Container);
    v20.target = v21.FocusTarget or Instance.new("ScreenGui");
    v20.store = v2.Store.new(v3, v21.StoreState, {
        v2.thunkMiddleware
    });
    v20.analyticsImpl = v7.mock();
end;
v8.render = function(v22)
    return l_ContextServices_0.provide({
        l_ContextServices_0.API.new(),
        l_ContextServices_0.Localization.mock(),
        l_ContextServices_0.Plugin.new(v22.plugin),
        l_ContextServices_0.Mouse.new({}),
        v5(true),
        l_ContextServices_0.Focus.new(v22.target),
        l_ContextServices_0.Store.new(v22.store),
        v6.new(v22.analyticsImpl)
    }, v22.props[v1.Children]);
end;
return function(v23, v24)
    return v1.createElement(v8, v24, {
        Element = v23
    });
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Cryo);
return require(l_Parent_0.Packages.Rodux).createReducer({
    IsBusy = false
}, {
    SetIsBusy = function(v2, v3)
        return v1.Dictionary.join(v2, {
            IsBusy = v3.isBusy
        });
    end
});


local l_Parent_0 = script.Parent.Parent.Parent;
return require(l_Parent_0.Packages.Rodux).combineReducers({
    PluginMetadata = require(l_Parent_0.Src.Reducers.PluginMetadata),
    Message = require(l_Parent_0.Src.Reducers.Message),
    CloudTable = require(l_Parent_0.Src.Reducers.CloudTable)
});


return require(script.Parent.Parent.Parent.Packages.Rodux).createReducer("", {
    SetMessage = function(_, v1)
        return v1.message;
    end
});


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Cryo);
return require(l_Parent_0.Packages.Rodux).createReducer({
    AllLanguages = {},
    LocalesToLanguages = {},
    CanManageTranslation = nil,
    CloudTableId = ""
}, {
    LoadLanguagesAndLocalesInfo = function(v2, v3)
        return v1.Dictionary.join(v2, {
            AllLanguages = v3.allLanguages,
            LocalesToLanguages = v3.localesToLanguages
        });
    end,
    LoadManageTranslationPermission = function(v4, v5)
        return v1.Dictionary.join(v4, {
            CanManageTranslation = v5.canManageTranslation
        });
    end,
    SetCloudTableId = function(v6, v7)
        return v1.Dictionary.join(v6, {
            CloudTableId = v7.cloudTableId
        });
    end
});


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Cryo);
local l_StyleModifier_0 = v1.Util.StyleModifier;
local l_Style_0 = v1.Style;
local l_StudioTheme_0 = l_Style_0.Themes.StudioTheme;
local l_ComponentSymbols_0 = l_Style_0.ComponentSymbols;
local l_StyleKey_0 = l_Style_0.StyleKey;
local l_getRawComponentStyle_0 = l_Style_0.getRawComponentStyle;
local l_DarkTheme_0 = l_Style_0.Themes.DarkTheme;
local l_createDefaultTheme_0 = l_Style_0.createDefaultTheme;
local l_Box_0 = v1.UI.Box;
local v12 = string.format("rbxasset://studio_svg_textures/Lua/Localization/%s/Large/", "Light/");
local v13 = string.format("rbxasset://studio_svg_textures/Lua/Localization/%s/Large/", "Dark/");
local v14 = string.format("rbxasset://studio_svg_textures/Shared/Navigation/%s/Standard/", "Light/");
local v15 = string.format("rbxasset://studio_svg_textures/Shared/Navigation/%s/Standard/", "Dark/");
local v16 = {
    [l_StyleKey_0.ProgressSpinnerImage] = "rbxasset://textures/DarkThemeLoadingCircle.png",
    [l_StyleKey_0.Import] = v13 .. "ImportCSV.png",
    [l_StyleKey_0.Export] = v13 .. "ExportCSV.png",
    [l_StyleKey_0.TextCapture] = v13 .. "TextCapture.png",
    [l_StyleKey_0.TextCaptureOn] = v13 .. "TextCaptureStop.png",
    [l_StyleKey_0.ArrowExpanded] = v15 .. "ArrowDown.png",
    [l_StyleKey_0.ArrowCollapsed] = v15 .. "ArrowRight.png"
};
local v17 = {
    [l_StyleKey_0.ProgressSpinnerImage] = "rbxasset://textures/LightThemeLoadingCircle.png",
    [l_StyleKey_0.Import] = v12 .. "ImportCSV.png",
    [l_StyleKey_0.Export] = v12 .. "ExportCSV.png",
    [l_StyleKey_0.TextCapture] = v12 .. "TextCapture.png",
    [l_StyleKey_0.TextCaptureOn] = v12 .. "TextCaptureStop.png",
    [l_StyleKey_0.ArrowExpanded] = v14 .. "ArrowDown.png",
    [l_StyleKey_0.ArrowCollapsed] = v14 .. "ArrowRight.png"
};
return function(v18)
    l_ComponentSymbols_0:add("MainView");
    l_ComponentSymbols_0:add("MessageFrame");
    l_ComponentSymbols_0:add("CloudTableSection");
    l_ComponentSymbols_0:add("ProgressSpinner");
    l_ComponentSymbols_0:add("LabeledTextButton");
    l_ComponentSymbols_0:add("Collapsible");
    l_ComponentSymbols_0:add("EmbeddedTableSection");
    l_ComponentSymbols_0:add("UploadDialogContent");
    l_ComponentSymbols_0:add("ErrorDialog");
    l_ComponentSymbols_0:add("WarningDialog");
    l_ComponentSymbols_0:add("LabeledImageButton");
    l_ComponentSymbols_0:add("ImageLocalizationSection");
    local v19 = {
        [l_ComponentSymbols_0.Button] = v2.Dictionary.join(l_getRawComponentStyle_0("Button"), {
            Background = l_Box_0,
            BackgroundStyle = {
                Color = l_StyleKey_0.Button,
                BorderColor = l_StyleKey_0.Border,
                BorderSize = 1
            },
            ["&TextButton"] = {
                TextColor = l_StyleKey_0.BrightText,
                [l_StyleModifier_0.Hover] = {
                    BackgroundStyle = {
                        Color = l_StyleKey_0.ButtonHover
                    }
                }
            },
            ["&DisabledTextButton"] = {
                TextColor = l_StyleKey_0.DimmedText
            },
            ["&PrimeTextButton"] = {
                TextColor = l_StyleKey_0.DialogMainButtonText,
                BackgroundStyle = {
                    Color = l_StyleKey_0.DialogMainButton,
                    BorderColor = l_StyleKey_0.Border,
                    BorderSize = 1
                },
                [l_StyleModifier_0.Hover] = {
                    BackgroundStyle = {
                        Color = l_StyleKey_0.DialogMainButtonHover
                    }
                }
            }
        }),
        [l_ComponentSymbols_0.LinkText] = v2.Dictionary.join(l_getRawComponentStyle_0("LinkText"), {
            EnableHover = true,
            Font = Enum.Font.SourceSans,
            TextColor = l_StyleKey_0.LinkText,
            TextSize = 16
        }),
        [l_ComponentSymbols_0.TitledFrame] = v2.Dictionary.join(l_getRawComponentStyle_0("TitledFrame"), {
            TextColor = l_StyleKey_0.BrightText,
            TextSize = 16
        }),
        [l_ComponentSymbols_0.MainView] = {
            EmptyFrameHeight = 1000,
            MainBackground = l_StyleKey_0.MainBackground,
            Padding = 5,
            PaddingRight = 20,
            PaddingTop = 10,
            ScrollBarBorderColor = l_StyleKey_0.Border,
            ScrollBarColor = l_StyleKey_0.ScrollBar,
            ScrollingFrameackground = l_StyleKey_0.ScrollBarBackground,
            ScrollingFrameCanvasHeight = 450,
            ScrollingFrameHeight = -20
        },
        [l_ComponentSymbols_0.MessageFrame] = {
            BackgroundColor = l_StyleKey_0.RibbonTab,
            BorderColor = l_StyleKey_0.Border,
            Height = 20,
            Padding = 5,
            TextColor = l_StyleKey_0.BrightText
        },
        [l_ComponentSymbols_0.CloudTableSection] = {
            LeftIndent = 15,
            MessageFrameBackground = l_StyleKey_0.MainBackground,
            MessageFrameBorder = l_StyleKey_0.Border,
            PaddingTop = 5,
            SectionLabelSize = 20,
            SectionLabelTextSize = 10,
            TextColor = l_StyleKey_0.BrightText,
            LinkTextHeight = 50,
            PublishMessageHeight = 150
        },
        [l_ComponentSymbols_0.ProgressSpinner] = {
            ImageRectSize = 80,
            ProgressSpinnerImageUrl = l_StyleKey_0.ProgressSpinnerImage,
            Size = 81
        },
        [l_ComponentSymbols_0.LabeledTextButton] = {
            ButtonWidth = 100,
            ButtonHeight = 35,
            Height = 50,
            LabelWidth = 250,
            TextColor = l_StyleKey_0.BrightText,
            DisabledTextColor = l_StyleKey_0.DimmedText
        },
        [l_ComponentSymbols_0.Collapsible] = {
            DisabledTextColor = l_StyleKey_0.DimmedText,
            IconSize = 16,
            IconColor = l_StyleKey_0.BrightText,
            IconImageOpen = l_StyleKey_0.ArrowExpanded,
            IconImageClosed = l_StyleKey_0.ArrowCollapsed,
            TextColor = l_StyleKey_0.BrightText,
            TopBarHeight = 24
        },
        [l_ComponentSymbols_0.EmbeddedTableSection] = {
            ExportButtonImage = l_StyleKey_0.Export,
            ImportButtonImage = l_StyleKey_0.Import,
            LeftIndent = 15,
            PaddingTop = 5,
            SectionLabelSize = 20,
            SectionLabelTextSize = 10,
            TextColor = l_StyleKey_0.BrightText,
            TextCaptureButtonImage = {
                On = l_StyleKey_0.TextCaptureOn,
                Off = l_StyleKey_0.TextCapture
            }
        },
        [l_ComponentSymbols_0.LabeledImageButton] = {
            BackgroundColor = l_StyleKey_0.Button,
            BackgroundColorHovered = l_StyleKey_0.ButtonHover,
            Height = 50,
            ImageButtonSize = 50,
            ImageLabelSize = 30,
            LabelWidth = 260,
            TextColor = l_StyleKey_0.BrightText,
            DisabledTextColor = l_StyleKey_0.DimmedText,
            TextLabelSize = 20,
            TextLabelTextSize = 6
        },
        [l_ComponentSymbols_0.UploadDialogContent] = {
            BrightText = l_StyleKey_0.BrightText,
            DimmedText = l_StyleKey_0.DimmedText,
            ErrorText = l_StyleKey_0.ErrorText,
            WarningText = l_StyleKey_0.WarningText,
            Padding = 15,
            PatchInfoFrameHeight = 290,
            TableContentsFrameHeight = 90,
            TableContentPaddingLeft = 30,
            TableContentPaddingTop = 5,
            ThisPatchWIllFrameHeight = 130,
            ButtonFrameHeight = 40,
            ButtonWidth = 100,
            ButtonHeight = 35,
            BorderColor = l_StyleKey_0.Border,
            MainBackground = l_StyleKey_0.MainBackground,
            MainButton = l_StyleKey_0.MainButton
        },
        [l_ComponentSymbols_0.ErrorDialog] = {
            BrightText = l_StyleKey_0.BrightText,
            DimmedText = l_StyleKey_0.DimmedText,
            ErrorText = l_StyleKey_0.ErrorText,
            WarningText = l_StyleKey_0.WarningText,
            Padding = 15,
            ButtonFrameHeight = 40,
            ButtonWidth = 100,
            ButtonHeight = 35,
            BorderColor = l_StyleKey_0.Border,
            MainBackground = l_StyleKey_0.MainBackground,
            MainButton = l_StyleKey_0.MainButton
        },
        [l_ComponentSymbols_0.WarningDialog] = {
            BrightText = l_StyleKey_0.BrightText,
            DimmedText = l_StyleKey_0.DimmedText,
            ErrorText = l_StyleKey_0.ErrorText,
            WarningText = l_StyleKey_0.WarningText,
            Padding = 15,
            ButtonFrameHeight = 40,
            ButtonWidth = 100,
            ButtonHeight = 35,
            BorderColor = l_StyleKey_0.Border,
            MainBackground = l_StyleKey_0.MainBackground,
            MainButton = l_StyleKey_0.MainButton
        },
        [l_ComponentSymbols_0.ImageLocalizationSection] = {
            LeftIndent = 15,
            PaddingTop = 20,
            Spacing = 15,
            SectionLabelSize = 20,
            SectionLabelTextSize = 10,
            TextColor = l_StyleKey_0.BrightText,
            LabelWidth = 260,
            ButtonWidth = 100,
            ButtonHeight = 35
        }
    };
    local _ = nil;
    return (if v18 then l_createDefaultTheme_0({
        getThemeName = function()
            return "Dark";
        end,
        themesList = {
            Dark = v2.Dictionary.join(l_DarkTheme_0, v16)
        }
    }) else l_StudioTheme_0.new(v16, v17)):extend(v19);
end;


local l_HttpService_0 = game:GetService("HttpService");
local l_RbxAnalyticsService_0 = game:GetService("RbxAnalyticsService");
local l_StudioService_0 = game:GetService("StudioService");
local l_Parent_0 = script.Parent.Parent.Parent;
local v4 = require(l_Parent_0.Packages.Cryo);
local v5 = require(l_Parent_0.Src.Util.RbxEntriesToWebEntries);
local v6 = {};
v6.__index = v6;
v6.new = function(v7, v8)
    local v9 = {
        sender = v7 or l_RbxAnalyticsService_0,
        context = "localizationPlugin",
        target = "studio",
        userId = l_StudioService_0:GetUserId(),
        logEvents = v8
    };
    setmetatable(v9, v6);
    return v9;
end;
v6.logEvent = function(v10, v11, v12)
    if v10.logEvents then
        print(string.format("Analytics: sendEventDeferred: \"%s\", %s", v11, (l_HttpService_0:JSONEncode(v12))));
    end;
end;
v6.sendEventDeferred = function(v13, v14, v15)
    local v16 = v4.Dictionary.join(v15, {
        uid = v13.userId,
        gameId = game.GameId,
        placeId = game.PlaceId
    });
    v13.sender:SendEventDeferred(v13.target, v13.context, v14, v16);
    v13:logEvent(v14, v16);
end;
v6.reportButtonPress = function(v17, v18, v19)
    v17:sendEventDeferred("buttonPressed", {
        btnName = v18,
        status = v19
    });
end;
v6.reportToolOpened = function(v20, v21)
    v20:sendEventDeferred("toolOpened", {
        method = v21
    });
end;
v6.reportUploadPatch = function(v22, v23, v24)
    v22:sendEventDeferred("logLocalizationPerfStats", {
        btnName = v24,
        totalRows = v23.totalRows,
        totalTranslations = v23.totalTranslations,
        supportedLocales = v23.supportedLocales,
        unsupportedLocales = v23.unsupportedLocales,
        numChangedTranslations = v23.numChangedTranslations,
        numRemovedTranslations = v23.numRemovedTranslations,
        numAddedTranslations = v23.numAddedTranslations,
        addedSupportedLanguages = v23.newLanguages
    });
end;
v6.reportDownloadTable = function(v25, v26, v27, v28, v29)
    local v30 = v5(v26:GetEntries(), v28, v29);
    v25:sendEventDeferred("logLocalizationPerfStats", {
        btnName = v27,
        totalRows = v30.totalRows,
        totalTranslations = v30.totalTranslations,
        supportedLocales = v30.supportedLocales,
        unsupportedLocales = v30.unsupportedLocales
    });
end;
v6.reportUploadTable = function(v31, v32, v33)
    v31:sendEventDeferred("logLocalizationPerfStats", {
        btnName = v33,
        totalRows = v32.totalRows,
        totalTranslations = v32.totalTranslations,
        supportedLocales = v32.supportedLocales,
        unsupportedLocales = v32.unsupportedLocales,
        numChangedTranslations = v32.numChangedTranslations,
        numRemovedTranslations = v32.numRemovedTranslations,
        numAddedTranslations = v32.numAddedTranslations,
        addedSupportedLanguages = v32.newLanguages
    });
end;
v6.mock = function()
    return v6.new({
        SendEventDeferred = function()
        end
    });
end;
return v6;


local l_Workspace_0 = game:GetService("Workspace");
local function _(v1, v2)
    v2 = v2 or false;
    return function()
        local l_LocalizationToolsFlags_0 = l_Workspace_0:FindFirstChild("LocalizationToolsFlags");
        if l_LocalizationToolsFlags_0 and l_LocalizationToolsFlags_0:FindFirstChild(v1) then
            return l_LocalizationToolsFlags_0[v1].Value;
        else
            return v2;
        end;
    end;
end;
local v5 = {};
local v6 = nil or false;
local v7 = "RunningUnderCLI";
local l_v7_0 = v7 --[[ copy: 5 -> 6 ]];
local v9;
do
    local l_v6_0 = v6;
    v9 = function()
        local l_LocalizationToolsFlags_1 = l_Workspace_0:FindFirstChild("LocalizationToolsFlags");
        if l_LocalizationToolsFlags_1 and l_LocalizationToolsFlags_1:FindFirstChild(l_v7_0) then
            return l_LocalizationToolsFlags_1[l_v7_0].Value;
        else
            return l_v6_0;
        end;
    end;
end;
v5.RunningUnderCLI = v9;
v6 = false or false;
v7 = "RunTests";
local l_v7_1 = v7 --[[ copy: 5 -> 7 ]];
do
    local l_v6_1 = v6;
    v9 = function()
        local l_LocalizationToolsFlags_2 = l_Workspace_0:FindFirstChild("LocalizationToolsFlags");
        if l_LocalizationToolsFlags_2 and l_LocalizationToolsFlags_2:FindFirstChild(l_v7_1) then
            return l_LocalizationToolsFlags_2[l_v7_1].Value;
        else
            return l_v6_1;
        end;
    end;
end;
v5.RunTests = v9;
v6 = nil or false;
v7 = "LogTestsQuiet";
local l_v7_2 = v7 --[[ copy: 5 -> 8 ]];
do
    local l_v6_2 = v6;
    v9 = function()
        local l_LocalizationToolsFlags_3 = l_Workspace_0:FindFirstChild("LocalizationToolsFlags");
        if l_LocalizationToolsFlags_3 and l_LocalizationToolsFlags_3:FindFirstChild(l_v7_2) then
            return l_LocalizationToolsFlags_3[l_v7_2].Value;
        else
            return l_v6_2;
        end;
    end;
end;
v5.LogTestsQuiet = v9;
v6 = nil or false;
v7 = "LogAnalytics";
local l_v7_3 = v7 --[[ copy: 5 -> 9 ]];
do
    local l_v6_3 = v6;
    v9 = function()
        local l_LocalizationToolsFlags_4 = l_Workspace_0:FindFirstChild("LocalizationToolsFlags");
        if l_LocalizationToolsFlags_4 and l_LocalizationToolsFlags_4:FindFirstChild(l_v7_3) then
            return l_LocalizationToolsFlags_4[l_v7_3].Value;
        else
            return l_v6_3;
        end;
    end;
end;
v5.LogAnalytics = v9;
v6 = nil or false;
v7 = "RunDeveloperFrameworkTests";
do
    local l_v6_4 = v6;
    v9 = function()
        local l_LocalizationToolsFlags_5 = l_Workspace_0:FindFirstChild("LocalizationToolsFlags");
        if l_LocalizationToolsFlags_5 and l_LocalizationToolsFlags_5:FindFirstChild(v7) then
            return l_LocalizationToolsFlags_5[v7].Value;
        else
            return l_v6_4;
        end;
    end;
end;
v5.RunDeveloperFrameworkTests = v9;
return v5;


local l_LocalizationService_0 = game:GetService("LocalizationService");
local v1 = {};
local l_game_EngineFeature_0 = game:GetEngineFeature("EnableLocalizedLocalizationToolsErrorsApi");
local v3 = nil;
if l_game_EngineFeature_0 then
    v3 = require(script.Parent.MapEngineErrors);
end;
v1.toggleTextScraperEnabled = function(v4)
    if l_LocalizationService_0.IsTextScraperRunning then
        l_LocalizationService_0:StopTextScraper();
        v4:reportButtonPress("textCapture", "stop");
        return ;
    else
        l_LocalizationService_0:StartTextScraper();
        v4:reportButtonPress("textCapture", "start");
        return ;
    end;
end;
v1.promptExportToCSVs = function(v5)
    local l_status_0, l_result_0 = pcall(function()
        return l_LocalizationService_0:PromptExportToCSVs();
    end);
    if not l_status_0 then
        if l_result_0 == "No file selected" then
            v5:reportButtonPress("export", "canceled");
            return ;
        else
            v5:reportButtonPress("export", "error");
            return ;
        end;
    else
        v5:reportButtonPress("export", "success");
        return ;
    end;
end;
v1.promptImportFromCSVs_deprecated = function(v8)
    assert(not l_game_EngineFeature_0, "expected FFlagLocalizedLocalizationToolsErrors to be false");
    local l_status_1, l_result_1 = pcall(function()
        return l_LocalizationService_0:PromptImportFromCSVs();
    end);
    if not l_status_1 then
        if l_result_1 == "No file selected" then
            v8:reportButtonPress("import", "canceled");
            return ;
        else
            v8:reportButtonPress("import", "error");
            return ;
        end;
    else
        v8:reportButtonPress("import", "success");
        return ;
    end;
end;
v1.promptImportFromCSVs = function(v11, v12)
    assert(l_game_EngineFeature_0, "expected FFlagLocalizedLocalizationToolsErrors to be true");
    local l_status_2, l_result_2 = pcall(function()
        return l_LocalizationService_0:PromptImportFromCSVs();
    end);
    if not l_status_2 then
        if l_result_2 == "No file selected" then
            v11:reportButtonPress("import", "canceled");
            return ;
        else
            warn(v3.getTranslationForEngineError(l_result_2, v12));
            v11:reportButtonPress("import", "error");
            return ;
        end;
    else
        v11:reportButtonPress("import", "success");
        return ;
    end;
end;
return v1;


local l_game_EngineFeature_0 = game:GetEngineFeature("EnableLocalizedLocalizationToolsErrorsApi");
local function v7(v1, v2)
    assert(l_game_EngineFeature_0, "expected FFlagLocalizedLocalizationToolsErrors to be true");
    for _, v4 in {
        {
            pattern = "^Error reading (.-): Missing a Key or Source header column.$",
            key = "MissingKeyOrSource",
            numArguments = 1
        },
        {
            pattern = "^.+%s(.+)%s?: Missing a Key or Source header column.%s?.*$",
            key = "MissingKeyOrSource",
            numArguments = 1
        },
        {
            pattern = "^.+%s(.+)%s?: Error opening CSV .-: Invalid UTF%-8. File must be UTF%-8 encoded.%s?.*$",
            key = "NonUtf8",
            numArguments = 1
        },
        {
            pattern = "^Error opening CSV (.-): Invalid UTF%-8. File must be UTF%-8 encoded.$",
            key = "NonUtf8",
            numArguments = 1
        }
    }, nil, nil do
        local v5, v6 = matchPatternToMessage(v1, v4, v2);
        if v5 then
            return v6;
        end;
    end;
    return v1;
end;
matchPatternToMessage = function(v8, v9, v10)
    local v11 = {
        string.match(v8, v9.pattern)
    };
    local v12 = nil;
    local v13 = #v11 == v9.numArguments;
    if v13 then
        v12 = v10:getText("EngineErrors", v9.key, v11);
    end;
    return v13, v12;
end;
return {
    getTranslationForEngineError = v7
};


local function _(v0, v1)
    if v1 ~= nil and v1[v0] ~= nil then
        return string.gsub(v0, "-", "_");
    else
        return v0;
    end;
end;
local function v10(v3)
    local v4 = {};
    for v5, v6 in ipairs(v3) do
        local v7 = v6.identifier.key or "";
        local v8 = v6.identifier.source or "";
        local v9 = v6.identifier.context or "";
        v4[v7] = v4[v7] or {};
        v4[v7][v8] = v4[v7][v8] or {};
        v4[v7][v8][v9] = v4[v7][v8][v9] or v5;
    end;
    return v4;
end;
local _ = function(v11)
    local v12 = {};
    for _, v14 in ipairs(v11.translations) do
        v12[v14.locale] = v14.translationText;
    end;
    return v12;
end;
local function v45(v16, v17, v18, v19, v20, v21, v22)
    local v23 = {};
    local v24 = {};
    local v25 = {};
    for _, v27 in ipairs(v17.translations) do
        v25[v27.locale] = v27.translationText;
    end;
    local l_v25_0 = v25;
    local v29 = {};
    for _, v31 in ipairs(v16.translations) do
        v29[v31.locale] = v31.translationText;
    end;
    v25 = v29;
    for _, v33 in ipairs(v16.translations) do
        v24[v33.locale] = true;
        if not (not (l_v25_0[v33.locale] == nil) or not v19) then
            local l_locale_0 = v33.locale;
            table.insert(v23, {
                locale = if v21 ~= nil and v21[l_locale_0] ~= nil then string.gsub(l_locale_0, "-", "_") else l_locale_0,
                translationText = v33.translationText,
                delete = true
            });
            v18.numRemovedTranslations = v18.numRemovedTranslations + 1;
            v24[v33.locale] = false;
        end;
    end;
    v29 = {};
    for _, v36 in ipairs(v17.translations) do
        local v37 = v25[v36.locale];
        if ((v37 == nil and v21 ~= nil) and v21[v36.locale] ~= nil) and v21[v36.locale] ~= v20 then
            table.insert(v29, v36);
        elseif v37 ~= v36.translationText then
            local v38 = {};
            local l_locale_1 = v36.locale;
            v38.locale = if v21 ~= nil and v21[l_locale_1] ~= nil then string.gsub(l_locale_1, "-", "_") else l_locale_1;
            v38.translationText = v36.translationText;
            v38.delete = false;
            table.insert(v23, v38);
            v24[v36.locale] = true;
            if v37 ~= nil then
                v18.numChangedTranslations = v18.numChangedTranslations + 1;
            else
                v18.numAddedTranslations = v18.numAddedTranslations + 1;
            end;
        end;
    end;
    for _, v41 in ipairs(v29) do
        local v42 = v21[v41.locale];
        if not v24[v42] then
            warn(v22:getText("UploadDialogContent", "ParentLangaugeTranslationMissing", {
                locale = "\"" .. v41.locale .. "\"",
                language = "\"" .. v42 .. "\"",
                key = "\"" .. v17.identifier.key .. "\"",
                source = "\"" .. v17.identifier.source .. "\"",
                context = "\"" .. v17.identifier.context .. "\""
            }));
        else
            local v43 = {};
            local l_locale_2 = v41.locale;
            v43.locale = if v21 ~= nil and v21[l_locale_2] ~= nil then string.gsub(l_locale_2, "-", "_") else l_locale_2;
            v43.translationText = v41.translationText;
            v43.delete = false;
            table.insert(v23, v43);
            v18.numAddedTranslations = v18.numAddedTranslations + 1;
        end;
    end;
    return {
        identifier = {
            key = v17.identifier.key,
            source = v17.identifier.source,
            context = v17.identifier.context
        },
        metadata = v17.metadata,
        translations = v23,
        delete = false
    };
end;
local function v63(v46, v47, v48, v49, v50)
    v47.numAddedEntries = v47.numAddedEntries + 1;
    local v51 = {};
    local v52 = {};
    local v53 = {};
    for _, v55 in ipairs(v46.translations) do
        if (v49 ~= nil and v49[v55.locale] ~= nil) and v49[v55.locale] ~= v48 then
            table.insert(v52, v55);
        else
            local v56 = {};
            local l_locale_3 = v55.locale;
            v56.locale = if v49 ~= nil and v49[l_locale_3] ~= nil then string.gsub(l_locale_3, "-", "_") else l_locale_3;
            v56.translationText = v55.translationText;
            v56.delete = false;
            table.insert(v51, v56);
            v47.numAddedTranslations = v47.numAddedTranslations + 1;
            v53[v55.locale] = true;
        end;
    end;
    for _, v59 in ipairs(v52) do
        local v60 = v49[v59.locale];
        if not v53[v60] then
            warn(v50:getText("UploadDialogContent", "ParentLangaugeTranslationMissing", {
                locale = "\"" .. v59.locale .. "\"",
                language = "\"" .. v60 .. "\"",
                key = "\"" .. v46.identifier.key .. "\"",
                source = "\"" .. v46.identifier.source .. "\"",
                context = "\"" .. v46.identifier.context .. "\""
            }));
        else
            local v61 = {};
            local l_locale_4 = v59.locale;
            v61.locale = if v49 ~= nil and v49[l_locale_4] ~= nil then string.gsub(l_locale_4, "-", "_") else l_locale_4;
            v61.translationText = v59.translationText;
            v61.delete = false;
            table.insert(v51, v61);
            v47.numAddedTranslations = v47.numAddedTranslations + 1;
        end;
    end;
    return {
        identifier = {
            key = v46.identifier.key,
            source = v46.identifier.source,
            context = v46.identifier.context
        },
        metadata = v46.metadata,
        translations = v51,
        delete = false
    };
end;
local function v71(v64, v65, v66)
    v65.numRemovedEntries = v65.numRemovedEntries + 1;
    local v67 = {};
    for _, v69 in ipairs(v64.translations) do
        local l_locale_5 = v69.locale;
        table.insert(v67, {
            locale = if v66 ~= nil and v66[l_locale_5] ~= nil then string.gsub(l_locale_5, "-", "_") else l_locale_5,
            translationText = v69.translationText,
            delete = true
        });
        v65.numRemovedTranslations = v65.numRemovedTranslations + 1;
    end;
    return {
        identifier = {
            key = v64.identifier.key,
            source = v64.identifier.source,
            context = v64.identifier.context
        },
        metadata = v64.metadata,
        translations = v67,
        delete = true
    };
end;
local function v99(v72, v73, v74, v75, v76, v77, v78)
    local v79 = v10(v74);
    local v80 = v10(v73);
    local v81 = {};
    local v82 = {
        numAddedTranslations = 0,
        numChangedTranslations = 0,
        numRemovedTranslations = 0,
        numAddedEntries = 0,
        numRemovedEntries = 0,
        makePatch = function()
            return {
                name = v72,
                entries = v81
            };
        end
    };
    local function _(v83, v84, v85, v86)
        if (v83[v84] ~= nil and v83[v84][v85] ~= nil) and v83[v84][v85][v86] ~= nil then
            return v83[v84][v85][v86];
        else
            return 0;
        end;
    end;
    for _, v89 in pairs(v73) do
        local l_key_0 = v89.identifier.key;
        local l_source_0 = v89.identifier.source;
        local l_context_0 = v89.identifier.context;
        local v93 = if (v79[l_key_0] ~= nil and v79[l_key_0][l_source_0] ~= nil) and v79[l_key_0][l_source_0][l_context_0] ~= nil then v79[l_key_0][l_source_0][l_context_0] else 0;
        if v93 == 0 then
            if v75 then
                table.insert(v81, (v71(v89, v82, v77)));
            end;
        else
            l_key_0 = nil;
            l_key_0 = v45(v89, v74[v93], v82, v75, v76, v77, v78);
            if not (next(l_key_0.translations) == nil) or l_key_0.metadata.example ~= v89.metadata.example then
                table.insert(v81, l_key_0);
            end;
        end;
    end;
    for _, v95 in pairs(v74) do
        local l_key_1 = v95.identifier.key;
        local l_source_1 = v95.identifier.source;
        local l_context_1 = v95.identifier.context;
        if if (v80[l_key_1] ~= nil and v80[l_key_1][l_source_1] ~= nil) and v80[l_key_1][l_source_1][l_context_1] ~= nil then v80[l_key_1][l_source_1][l_context_1] else 0 == 0 then
            table.insert(v81, (v63(v95, v82, v76, v77, v78)));
        end;
    end;
    return v82;
end;
local function v101(v100)
    return {
        identifier = {
            key = v100.identifier.key,
            source = v100.identifier.source,
            context = v100.identifier.context
        },
        metadata = {
            example = v100.metadata and v100.metadata.example
        },
        translations = {},
        delete = v100.delete
    };
end;
return {
    MakePatchEntryToChangeRow = v45,
    DiffTables = v99,
    SplitByLimits = function(v102, v103, v104)
        local v105 = {};
        local v106 = nil;
        local v107 = nil;
        local v108 = nil;
        local v109 = nil;
        local function _()
            v106 = nil;
            v107 = nil;
        end;
        local function _()
            v107 = nil;
            v109 = v109 + 1;
            if v103 <= v109 then
                v106 = nil;
            end;
        end;
        local function v113(v112)
            if not v106 then
                v106 = {
                    name = v102.name,
                    entries = {}
                };
                v108 = 0;
                v109 = 0;
                table.insert(v105, v106);
            end;
            if not v107 then
                v107 = v101(v112);
                table.insert(v106.entries, v107);
            end;
        end;
        for _, v115 in ipairs(v102.entries) do
            if v115.translations then
                v113(v115);
                for _, v117 in ipairs(v115.translations) do
                    v113(v115);
                    table.insert(v107.translations, v117);
                    v108 = v108 + 1;
                    if v104 <= v108 then
                        v106 = nil;
                        v107 = nil;
                    end;
                end;
                v107 = nil;
                v109 = v109 + 1;
                if v103 <= v109 then
                    v106 = nil;
                end;
            end;
        end;
        return v105;
    end
};


local function _(v0)
    local v1 = {};
    for v2 in pairs(v0) do
        table.insert(v1, v2);
    end;
    return v1;
end;
local function _(v4)
    local v5 = {};
    for v6 in pairs(v4) do
        table.insert(v5, v6);
    end;
    local l_v5_0 = v5;
    table.sort(l_v5_0);
    return l_v5_0;
end;
return function(v9, v10, v11, v12)
    local v13 = {};
    local v14 = 0;
    local v15 = 0;
    local v16 = {};
    local v17 = {};
    local v18 = {};
    local function _(v19)
        local v20 = v10[v19];
        if not v20 then
            v20 = false;
            if v11 ~= nil then
                v20 = v11[v19] ~= nil;
            end;
        end;
        return v20;
    end;
    local function v28(v22)
        local v23 = {};
        for v24, v25 in pairs(v22) do
            local v26 = v24:lower();
            local v27 = v10[v26];
            if not v27 then
                v27 = false;
                if v11 ~= nil then
                    v27 = v11[v26] ~= nil;
                end;
            end;
            if not v27 then
                v17[v24] = true;
            else
                table.insert(v23, {
                    locale = v26,
                    translationText = v25
                });
                v16[v26] = true;
                v15 = v15 + 1;
                if v12 ~= nil then
                    v27 = v11[v26] or v26;
                    if not v12[v27] then
                        v18[v27] = true;
                    end;
                end;
            end;
        end;
        return v23;
    end;
    for _, v30 in ipairs(v9) do
        table.insert(v13, {
            identifier = {
                key = v30.Key or "",
                context = v30.Context or "",
                source = v30.Source or ""
            },
            metadata = {
                example = v30.Example or ""
            },
            translations = v28(v30.Values),
            delete = false
        });
        v14 = v14 + 1;
    end;
    local v31 = {
        entries = v13,
        totalRows = v14,
        totalTranslations = v15
    };
    local l_concat_0 = table.concat;
    local v33 = {};
    for v34 in pairs(v16) do
        table.insert(v33, v34);
    end;
    local l_v33_0 = v33;
    table.sort(l_v33_0);
    v31.supportedLocales = l_concat_0(l_v33_0, ", ");
    l_concat_0 = table.concat;
    v33 = {};
    for v36 in pairs(v17) do
        table.insert(v33, v36);
    end;
    l_v33_0 = v33;
    table.sort(l_v33_0);
    v31.unsupportedLocales = l_concat_0(l_v33_0, ", ");
    l_concat_0 = table.concat;
    v33 = {};
    for v37 in pairs(v18) do
        table.insert(v33, v37);
    end;
    l_v33_0 = v33;
    table.sort(l_v33_0);
    v31.newLanguages = l_concat_0(l_v33_0, ", ");
    v31.newLanguagesSet = v18;
    return v31;
end;


local function v0(v1, v2)
    if type(v1) ~= type(v2) then
        return false;
    elseif type(v1) ~= "table" then
        return v1 == v2;
    else
        for v3, v4 in pairs(v1) do
            if not v0(v4, v2[v3]) then
                return false;
            end;
        end;
        for v5, v6 in pairs(v2) do
            if not v0(v6, v1[v5]) then
                return false;
            end;
        end;
        return true;
    end;
end;
return v0;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v2.ContextServices;
local l_Promise_0 = v2.Util.Promise;
local v5 = require(l_Parent_0.Src.Resources.PluginTheme);
local _ = Vector2.new(300, 370);
return function(v7, v8, _, v10)
    return function(v11, v12, v13)
        return l_Promise_0.new(function(v14, _)
            spawn(function()
                local v16 = nil;
                local l_v7_QWidgetPluginGui_0 = v7:CreateQWidgetPluginGui(v11, {
                    Size = v12,
                    Modal = true
                });
                l_v7_QWidgetPluginGui_0.Enabled = true;
                l_v7_QWidgetPluginGui_0.Title = v11;
                local function v18()
                    v1.unmount(v16);
                    l_v7_QWidgetPluginGui_0:Destroy();
                    v14(true);
                end;
                local function v19()
                    v1.unmount(v16);
                    l_v7_QWidgetPluginGui_0:Destroy();
                    v14(false);
                end;
                l_v7_QWidgetPluginGui_0:GetPropertyChangedSignal("Enabled"):connect(function()
                    v1.unmount(v16);
                    l_v7_QWidgetPluginGui_0:Destroy();
                    v14(false);
                end);
                v16 = v1.mount(l_ContextServices_0.provide({
                    v8,
                    v5(),
                    v10
                }, {
                    Content = v13(v18, v19)
                }), l_v7_QWidgetPluginGui_0);
            end);
        end);
    end;
end;


local function v1(v0)
    return #v0 == 0;
end;
local function _(v2)
    local v3 = true;
    if v2 ~= nil then
        v3 = v2 == "";
    end;
    return v3;
end;
local function v12(v5, v6, v7, v8, v9, v10, v11)
    table.insert(v5, v7:getText("UploadTable", v6, {
        key = "\"" .. v8 .. "\"",
        source = "\"" .. v9 .. "\"",
        context = "\"" .. v10 .. "\"",
        example = "\"" .. v11 .. "\""
    }));
end;
local function _(v13)
    local v14 = true;
    if v13 ~= nil then
        v14 = v13 == "";
    end;
    if not v14 then
        if v13 ~= nil then
            return v13;
        else
            return "";
        end;
    else
        return "";
    end;
end;
local function v30(v16, v17, v18, v19, v20, v21)
    local v22 = true;
    if v20 ~= nil then
        v22 = v20 == "";
    end;
    local v23 = if not v22 then if v20 ~= nil then v20 else "" else "";
    local v24 = true;
    if v18 ~= nil then
        v24 = v18 == "";
    end;
    v22 = if not v24 then if v18 ~= nil then v18 else "" else "";
    local v25 = true;
    if v21 ~= nil then
        v25 = v21 == "";
    end;
    v24 = if not v25 then if v21 ~= nil then v21 else "" else "";
    local v26 = true;
    if v19 ~= nil then
        v26 = v19 == "";
    end;
    v25 = if not v26 then if v19 ~= nil then v19 else "" else "";
    v26 = utf8.len(v23);
    local v27 = utf8.len(v22);
    local v28 = utf8.len(v24);
    local v29 = utf8.len(v25);
    if not (type(v26) == "number") or game:GetFastInt("LocalizationToolsCloudTableContextLength") < v26 then
        v12(v16, "ContextTooLong", v17, v22, v25, v23, v24);
    end;
    if not (type(v27) == "number") or game:GetFastInt("LocalizationToolsCloudTableKeyLength") < v27 then
        v12(v16, "KeyTooLong", v17, v22, v25, v23, v24);
    end;
    if not (type(v28) == "number") or game:GetFastInt("LocalizationToolsCloudTableExampleLength") < v28 then
        v12(v16, "ExampleTooLong", v17, v22, v25, v23, v24);
    end;
    if not (type(v29) == "number") or game:GetFastInt("LocalizationToolsCloudTableSourceLength") < v29 then
        v12(v16, "SourceTooLong", v17, v22, v25, v23, v24);
    end;
    return v22, v25, v23, v24;
end;
return {
    isTableEmpty = v1,
    tableContainsInvalidEntries = function(v31, v32)
        local v33 = {};
        local v34 = {};
        for _, v36 in ipairs(v31) do
            if v36.Values ~= nil then
                for v37, v38 in pairs(v36.Values) do
                    local v39 = utf8.len(v37);
                    if not (type(v39) == "number") or game:GetFastInt("LocalizationToolsCloudTableLocaleLength") < v39 then
                        table.insert(v34, v32:getText("UploadTable", "LocaleTooLong", {
                            locale = "\"" .. v37 .. "\"",
                            translation = "\"" .. v38 .. "\""
                        }));
                    end;
                    local v40 = utf8.len(v38);
                    if not (type(v40) == "number") or game:GetFastInt("LocalizationToolsCloudTableTranslationLength") < v40 then
                        table.insert(v34, v32:getText("UploadTable", "TranslationTooLong", {
                            locale = "\"" .. v37 .. "\"",
                            translation = "\"" .. v38 .. "\""
                        }));
                    end;
                end;
            end;
            local v41, v42, v43, _ = v30(v34, v32, v36.Key, v36.Source, v36.Context, v36.Example);
            local v45 = true;
            if v42 ~= nil then
                v45 = v42 == "";
            end;
            if not v45 then
                if v33[v42] ~= nil and v33[v42][v43] ~= nil then
                    table.insert(v34, v32:getText("UploadTable", "DuplicateSourceContextError", {
                        key = "\"" .. v41 .. "\"",
                        source = "\"" .. v42 .. "\"",
                        context = "\"" .. v43 .. "\""
                    }));
                else
                    if v33[v42] == nil then
                        v33[v42] = {};
                    end;
                    v33[v42][v43] = true;
                end;
            else
                table.insert(v34, v32:getText("UploadTable", "EmptySourceError", {
                    key = "\"" .. v41 .. "\"",
                    source = "\"" .. v42 .. "\"",
                    context = "\"" .. v43 .. "\""
                }));
            end;
        end;
        return #v34 ~= 0, v34;
    end
};


return function(v0)
    assert(v0 ~= nil, "object must not be nil");
    return next(v0) == nil;
end;


if not game:getFastFlag("ImprovePluginSpeed_ManageCollaborators") then
    require(script.Parent.main)(plugin);
    return ;
else
    return ;
end;


game:DefineFastInt("TeamCreateMaxCollaborators", 200);
game:DefineFastFlag("ApiProxyToUsersApiGetUserByUsernamesEnabled", false);
game:DefineFastFlag("COLLAB2699FixSaveChangesLogic", false);
game:DefineFastFlag("COLLAB2850_FixMcTooltips", false);
game:DefineFastFlag("COLLAB4802_FixManageCollabLanguageBug", false);
game:DefineFastFlag("StudioManageCollabWideBox2", false);
game:DefineFastFlag("StudioManageCollabFixFocusError", false);
return nil;


return function(v0, v1)
    if v0 then
        require(script.Parent.defineLuaFlags);
        require(script.Parent.commonInit)();
        local l_Parent_0 = script.Parent.Parent;
        if require(l_Parent_0.Src.Util.shouldPluginRun)() then
            local v3 = require(l_Parent_0.Packages.Roact);
            local v4 = require(l_Parent_0.Packages.Dev.DeveloperTools);
            local v5 = require(l_Parent_0.Src.MainPlugin);
            local v6 = require(l_Parent_0.Src.Util.hasInternalPermission)();
            local v7 = nil;
            local v8 = nil;
            if v6 then
                v8 = v4.forPlugin(l_Parent_0.Name, v0);
            end;
            local function v9()
                v0.Name = l_Parent_0.Name;
                v7 = v3.mount((v3.createElement(v5, {
                    Plugin = v0,
                    PluginLoaderContext = v1
                })));
                if v8 then
                    v8:addRoactTree("Roact tree", v7);
                end;
            end;
            v0.Unloading:Connect(function()
                if v8 then
                    v8:destroy();
                end;
                if v7 then
                    v3.unmount(v7);
                    v7 = nil;
                end;
            end);
            v9();
            return ;
        else
            return ;
        end;
    else
        return ;
    end;
end;


local v0 = game:getFastFlag("ImprovePluginSpeed_ManageCollaborators");
local l_Parent_0 = script.Parent.Parent;
if not v0 then
    require(script.Parent.commonInit)();
end;
local v2 = require(l_Parent_0.Src.Util.DebugFlags);
local v3 = nil;
if not v0 then
    v3 = require(l_Parent_0.Packages.Framework);
end;
if not (not v2.RunningUnderCLI() and not v2.RunTests()) then
    if v0 then
        require(script.Parent.commonInit)();
        v3 = require(l_Parent_0.Packages.Framework);
    end;
    local v4 = require(l_Parent_0.Packages.Dev.TestEZ);
    local l_TestBootstrap_0 = v4.TestBootstrap;
    local v6 = not not _G.TEAMCITY and v4.Reporters.TeamCityReporter or v4.Reporters.TextReporter;
    local l_Src_0 = l_Parent_0.Src;
    local v8 = {
        showTimingInfo = false,
        testNamePattern = nil,
        extraEnvironment = {}
    };
    print("----- All " .. l_Parent_0.Name .. " Tests ------");
    l_TestBootstrap_0:run({
        l_Src_0
    }, v6, v8);
    print("----------------------------------");
    if v2.RunDeveloperFrameworkTests() then
        print("");
        print("----- All DeveloperFramework Tests ------");
        v3.TestHelpers.runFrameworkTests(v4, v6);
        print("----------------------------------");
    end;
end;
if v2.RunningUnderCLI() then
    pcall(function()
        game:GetService("ProcessService"):ExitAsync(0);
    end);
end;


local l_Action_0 = require(script.Parent.Parent.Parent.Packages.Framework).Util.Action;
return {
    LoadWebResults = l_Action_0("LoadWebResults", function(v1)
        return {
            searchTerm = v1
        };
    end),
    LoadedWebResults = l_Action_0("LoadedWebResults", function(v2, v3, v4)
        return {
            success = v2,
            key = v3,
            results = v4
        };
    end),
    SearchTextChanged = l_Action_0("SearchTextChanged", function(v5)
        return {
            text = v5
        };
    end)
};


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        currentGroupMetadata = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        currentPermissions = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        newGroupMetadata = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    assert(typeof(v0) == "number", script.Name .. " expected groupOwnerId to be a number, not " .. typeof(v0));
    return {
        groupOwnerId = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        groupRolePermissions = v0
    };
end);


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Action_0 = require(l_Parent_0.Packages.Framework).Util.Action;
local v2 = require(l_Parent_0.Src.Util.LoadState);
local v3 = 0;
local v4 = 0;
for _, v6 in pairs(v2) do
    v3 = math.min(v3, v6);
    v4 = math.max(v4, v6);
end;
return l_Action_0(script.Name, function(v7)
    local v8 = false;
    if typeof(v7) == "number" then
        v8 = false;
        if v3 <= v7 then
            v8 = v7 <= v4;
        end;
    end;
    assert(v8, string.format(script.Name .. " requires loadState to be a LoadState, not %s", (typeof(v7))));
    return {
        loadState = v7
    };
end);


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Action_0 = require(l_Parent_0.Packages.Framework).Util.Action;
local v2 = require(l_Parent_0.Src.Util.SaveState);
local v3 = 0;
local v4 = 0;
for _, v6 in pairs(v2) do
    v3 = math.min(v3, v6);
    v4 = math.max(v4, v6);
end;
return l_Action_0(script.Name, function(v7)
    local v8 = false;
    if typeof(v7) == "number" then
        v8 = false;
        if v3 <= v7 then
            v8 = v7 <= v4;
        end;
    end;
    assert(v8, string.format(script.Name .. " requires loadState to be a LoadState, not %s", (typeof(v7))));
    return {
        saveState = v7
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        MinimumAge = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    return {
        newPermissions = v0
    };
end);


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.Framework);
local l_Stylizer_0 = v2.Style.Stylizer;
local l_withContext_0 = require(l_Parent_0.Packages.Framework).ContextServices.withContext;
local v5 = require(l_Parent_0.Src.Util.Constants);
local l_Button_0 = v2.UI.Button;
local v7 = v1.PureComponent:extend("ButtonBar");
v7.render = function(v8)
    local l_props_0 = v8.props;
    local l_Stylizer_1 = l_props_0.Stylizer;
    local l_HorizontalAlignment_0 = l_props_0.HorizontalAlignment;
    local l_Buttons_0 = l_props_0.Buttons;
    local v13 = {
        Layout = v1.createElement("UIListLayout", {
            Padding = UDim.new(0, l_Stylizer_1.buttonBar.padding),
            HorizontalAlignment = l_HorizontalAlignment_0,
            SortOrder = Enum.SortOrder.LayoutOrder,
            FillDirection = Enum.FillDirection.Horizontal
        }, l_props_0[v1.Children])
    };
    if l_HorizontalAlignment_0 ~= Enum.HorizontalAlignment.Center then
        table.insert(v13, v1.createElement("UIPadding", {
            PaddingRight = UDim.new(0, l_Stylizer_1.buttonBar.edgePadding),
            PaddingLeft = UDim.new(0, 0)
        }));
    end;
    for v14, v15 in ipairs(l_Buttons_0) do
        table.insert(v13, v1.createElement(l_Button_0, {
            LayoutOrder = v14,
            Style = v15.Style,
            Size = UDim2.new(0, v5.BUTTON_WIDTH, 1, 0),
            StyleModifier = v15.StyleModifier,
            Text = v15.Name,
            ZIndex = l_props_0.ZIndex or 1,
            OnClick = v15.OnPressed
        }));
    end;
    return v1.createElement("Frame", {
        LayoutOrder = l_props_0.LayoutOrder or 1,
        Size = UDim2.new(1, 0, 0, v5.BUTTON_HEIGHT),
        AnchorPoint = l_props_0.AnchorPoint or Vector2.new(0, 0.5),
        Position = l_props_0.Position or UDim2.new(0, 0, 0.5, 0),
        BackgroundTransparency = 1
    }, v13);
end;
return (l_withContext_0({
    Stylizer = l_Stylizer_0
})(v7));


local l_COLLAB2850_FixMcTooltips_0 = game:GetFastFlag("COLLAB2850_FixMcTooltips");
local l_Parent_0 = script.Parent.Parent.Parent;
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.Cryo);
local v4 = require(l_Parent_0.Packages.Framework);
local l_Stylizer_0 = v4.Style.Stylizer;
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_UI_0 = v4.UI;
local l_Util_0 = v4.Util;
local l_SelectInput_0 = l_UI_0.SelectInput;
local l_Button_0 = l_UI_0.Button;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_Separator_0 = l_UI_0.Separator;
local l_Tooltip_0 = l_UI_0.Tooltip;
local l_LoadingIndicator_0 = v4.UI.LoadingIndicator;
local l_LayoutOrderIterator_0 = l_Util_0.LayoutOrderIterator;
local v18 = require(l_Parent_0.Src.Util.PermissionsConstants);
local v19 = v2.PureComponent:extend("DeleteButton");
v19.init = function(v20)
    v20.state = {
        isHovered = false
    };
end;
v19.render = function(v21)
    local l_props_0 = v21.props;
    local l_Enabled_0 = l_props_0.Enabled;
    local l_OnClicked_0 = l_props_0.OnClicked;
    local l_Stylizer_1 = l_props_0.Stylizer;
    return v2.createElement("ImageButton", {
        Size = UDim2.new(0, l_Stylizer_1.collaboratorItem.deleteButton.size, 0, l_Stylizer_1.collaboratorItem.deleteButton.size),
        Position = UDim2.new(1, l_Stylizer_1.collaboratorItem.xOffset, 0.5, 0),
        AnchorPoint = Vector2.new(1, 0.5),
        Image = l_Stylizer_1.deleteIcon,
        BackgroundTransparency = not v21.state.isHovered and 1 or 0,
        BackgroundColor3 = l_Stylizer_1.collaboratorItem.deleteButton.hovered,
        [v2.Event.Activated] = function()
            if not (not l_Enabled_0 or not l_OnClicked_0) then
                l_OnClicked_0();
            end;
        end,
        [v2.Event.MouseEnter] = function()
            v21:setState({
                isHovered = true
            });
        end,
        [v2.Event.MouseLeave] = function()
            v21:setState({
                isHovered = false
            });
        end
    });
end;
v19 = l_withContext_0({
    Stylizer = l_Stylizer_0
})(v19);
local v26 = v2.PureComponent:extend("CollaboratorItem");
v26.defaultProps = {
    Writable = true,
    Loading = false
};
v26.getCurrentPermissionLabel = function(v27)
    local l_props_1 = v27.props;
    local l_CurrentPermission_0 = l_props_1.CurrentPermission;
    local l_AvailablePermissions_0 = l_props_1.AvailablePermissions;
    local l_Localization_1 = l_props_1.Localization;
    if l_CurrentPermission_0 == v18.MultipleKey then
        return l_Localization_1:getText("PermissionLabels", "Multiple");
    else
        for _, v33 in ipairs(l_AvailablePermissions_0) do
            if v33.Key == l_CurrentPermission_0 then
                return v33.Display;
            end;
        end;
        assert(false);
        return ;
    end;
end;
createTextLabel = function(v34, v35, v36, v37, v38)
    return v2.createElement(l_TextLabel_0, {
        LayoutOrder = v38,
        Size = UDim2.new(1, 0, 0, v36),
        Style = v35,
        Text = v34,
        TextWrapped = true,
        TextXAlignment = Enum.TextXAlignment.Left
    }, {
        Padding = v2.createElement("UIPadding", {
            PaddingTop = UDim.new(0, v37),
            PaddingLeft = UDim.new(0, v37)
        })
    });
end;
v26.init = function(v39)
    v39.onItemActivated = function(v40)
        if v39.props.Writable and v40.Key ~= v39.props.CurrentPermission then
            v39.props.OnPermissionChanged(v40.Key);
        end;
    end;
    v39.onRenderItem = function(v41, v42, v43)
        local l_Stylizer_2 = v39.props.Stylizer;
        return v2.createElement(l_Button_0, {
            Size = UDim2.new(1, 0, 0, l_Stylizer_2.selectInput.button.height),
            LayoutOrder = v42,
            OnClick = v43
        }, {
            UILayout = v2.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Vertical,
                Padding = UDim.new(0, 0),
                SortOrder = Enum.SortOrder.LayoutOrder,
                VerticalAlignment = Enum.VerticalAlignment.Top
            }),
            MainTextLabel = createTextLabel(v41.Display, "Normal", l_Stylizer_2.fontStyle.Normal.TextSize, l_Stylizer_2.selectInput.padding, 0),
            DescriptionTextLabel = createTextLabel(v41.Description, "SubText", l_Stylizer_2.fontStyle.Subtext.TextSize, l_Stylizer_2.selectInput.padding, 1)
        });
    end;
end;
v26.render = function(v45)
    local l_props_2 = v45.props;
    local l_LayoutOrder_0 = l_props_2.LayoutOrder;
    local l_Name_0 = l_props_2.Name;
    local l_Icon_0 = l_props_2.Icon;
    local l_Writable_0 = l_props_2.Writable;
    local l_Loading_0 = l_props_2.Loading;
    local l_Removable_0 = l_props_2.Removable;
    local l_OnRemoved_0 = l_props_2.OnRemoved;
    local l_AvailablePermissions_1 = l_props_2.AvailablePermissions;
    local l_IsRolesetCollaborator_0 = l_props_2.IsRolesetCollaborator;
    local l_HideSeparator_0 = l_props_2.HideSeparator;
    local v57 = if l_COLLAB2850_FixMcTooltips_0 then nil else l_props_2.hidePermissionsForNonGroupOwner;
    local v58 = if not l_COLLAB2850_FixMcTooltips_0 then nil else l_props_2.TooltipText;
    local v59 = if not l_COLLAB2850_FixMcTooltips_0 then nil else l_props_2.IsOwner;
    local l_Localization_2 = l_props_2.Localization;
    local l_Stylizer_3 = l_props_2.Stylizer;
    local v62 = if not l_COLLAB2850_FixMcTooltips_0 then l_Writable_0 and #l_AvailablePermissions_1 > 1 else l_Writable_0;
    local v63 = if not l_COLLAB2850_FixMcTooltips_0 then l_Writable_0 and l_Removable_0 else l_Removable_0;
    local v64 = if not l_IsRolesetCollaborator_0 then l_Stylizer_3.collaboratorItem.nonRolesetFrame else l_Stylizer_3.collaboratorItem.rolesetFrame;
    local v65 = (not l_IsRolesetCollaborator_0 and v63) and -40 or 0;
    local v66 = if not l_Icon_0 then l_Stylizer_3.collaboratorItem.collaboratorName.withoutIcon.xOffset else l_Stylizer_3.collaboratorItem.collaboratorName.withIcon.xOffset;
    local v67 = l_LayoutOrderIterator_0.new();
    local v68 = nil;
    local v69 = nil;
    if not l_COLLAB2850_FixMcTooltips_0 then
        v68 = v57 or not v62;
        v69 = if not v57 then l_Localization_2:getText("PermissionDescriptions", "FriendToEdit") else l_Localization_2:getText("PermissionDescriptions", "CannotViewGroupRoles");
    end;
    return v2.createElement("Frame", {
        Size = UDim2.new(0, v64.width, 0, v64.height),
        LayoutOrder = l_LayoutOrder_0,
        BackgroundTransparency = 1,
        Position = v64.position,
        AnchorPoint = v64.anchorPoint,
        BorderSizePixel = 0
    }, {
        IconContainer = l_Icon_0 and v2.createElement("Frame", {
            LayoutOrder = v67:getNextOrder(),
            Size = UDim2.new(0, l_Stylizer_3.collaboratorItem.iconContainerSize, 0, l_Stylizer_3.collaboratorItem.iconContainerSize),
            Position = UDim2.new(0, 0, 0.5, 0),
            AnchorPoint = Vector2.new(0, 0.5),
            BackgroundTransparency = 1
        }, {
            Icon = l_Icon_0
        }),
        CollaboratorName = v2.createElement("TextLabel", v3.Dictionary.join(l_Stylizer_3.fontStyle.Normal, {
            LayoutOrder = v67:getNextOrder(),
            Size = if not l_Icon_0 then l_Stylizer_3.collaboratorItem.collaboratorName.withoutIcon.size else l_Stylizer_3.collaboratorItem.collaboratorName.withIcon.size,
            AnchorPoint = Vector2.new(0, 0.5),
            Position = UDim2.new(0, v66, 0.5, 0),
            BackgroundTransparency = 1,
            Text = l_Name_0,
            TextXAlignment = Enum.TextXAlignment.Left
        })),
        OwnerLabel = if not if not l_COLLAB2850_FixMcTooltips_0 then not l_Removable_0 and not l_IsRolesetCollaborator_0 else v59 then nil else v2.createElement("TextLabel", v3.Dictionary.join(l_Stylizer_3.fontStyle.Normal, {
            LayoutOrder = v67:getNextOrder(),
            Size = if not l_Icon_0 then l_Stylizer_3.collaboratorItem.ownerLabel.withoutIconSize else l_Stylizer_3.collaboratorItem.ownerLabel.withIconSize,
            Position = l_Stylizer_3.collaboratorItem.ownerLabel.position,
            AnchorPoint = Vector2.new(1, 0.5),
            BackgroundTransparency = 1,
            Text = l_Localization_2:getText("CollaboratorTypes", "Owner"),
            TextXAlignment = Enum.TextXAlignment.Right
        })),
        PermissionEditor = if not if not l_COLLAB2850_FixMcTooltips_0 then l_Removable_0 or l_IsRolesetCollaborator_0 else not v59 then nil else v2.createElement("Frame", {
            LayoutOrder = v67:getNextOrder(),
            BackgroundTransparency = 1,
            Size = UDim2.new(0, l_Stylizer_3.selectInput.width, 0, l_Stylizer_3.collaboratorItem.permissionEditor.heightOffset),
            Position = UDim2.new(1, v65, 0.5, l_Stylizer_3.collaboratorItem.permissionEditor.yOffset),
            AnchorPoint = Vector2.new(1, 0.5)
        }, {
            LoadingIndicator = l_Loading_0 and v2.createElement(l_LoadingIndicator_0, {
                Size = UDim2.fromScale(1, 1)
            }),
            PermissionsDropdown = not l_Loading_0 and v2.createElement(l_SelectInput_0, {
                Enabled = if not l_COLLAB2850_FixMcTooltips_0 then not v57 and v62 else v62,
                Items = l_AvailablePermissions_1,
                OnItemActivated = v45.onItemActivated,
                OnRenderItem = v45.onRenderItem,
                PlaceholderText = if not l_COLLAB2850_FixMcTooltips_0 then v57 and "" or v45:getCurrentPermissionLabel() else v45:getCurrentPermissionLabel(),
                Width = l_Stylizer_3.selectInput.width,
                Style = not v62 and "NonEditable" or "Editable"
            }) or nil,
            Tooltip = if not if not l_COLLAB2850_FixMcTooltips_0 then v68 else v58 then nil else v2.createElement(l_Tooltip_0, {
                Text = if not l_COLLAB2850_FixMcTooltips_0 then v69 else v58
            })
        }),
        Delete = v63 and v2.createElement(v19, {
            LayoutOrder = v67:getNextOrder(),
            Enabled = if not l_COLLAB2850_FixMcTooltips_0 then l_Writable_0 and not l_Loading_0 else not l_Loading_0,
            OnClicked = l_OnRemoved_0
        }),
        Separator = not l_HideSeparator_0 and v2.createElement(l_Separator_0, {
            Position = UDim2.new(0.5, 0, 1, 0),
            LayoutOrder = v67:getNextOrder()
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_Stylizer_0,
    Localization = l_Localization_0
})(v26));


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.Cryo);
local v4 = require(l_Parent_0.Packages.Framework);
local l_Stylizer_0 = v4.Style.Stylizer;
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Localization_0 = l_ContextServices_0.Localization;
local v9 = require(l_Parent_0.Src.Util.PermissionsConstants);
local v10 = require(l_Parent_0.Src.Keys.loadingInProgress);
local l_PlayKey_0 = v9.PlayKey;
local l_EditKey_0 = v9.EditKey;
local v13 = require(l_Parent_0.Src.Util.Constants);
local l_COLLABORATORTYPE_USER_0 = v13.COLLABORATORTYPE_USER;
local l_COLLABORATORTYPE_GROUP_0 = v13.COLLABORATORTYPE_GROUP;
local v16 = require(l_Parent_0.Src.Components.Thumbnails.UserHeadshotThumbnail);
local v17 = require(l_Parent_0.Src.Components.Thumbnails.GroupIconThumbnail);
local v18 = require(l_Parent_0.Src.Components.SearchBar);
local v19 = require(l_Parent_0.Src.Util.CreateFitToContent);
local v20 = require(l_Parent_0.Src.Selectors.GetUserCollaborators);
local v21 = require(l_Parent_0.Src.Selectors.GetGroupCollaborators);
local v22 = require(l_Parent_0.Src.Thunks.AddUserCollaborator);
local v23 = require(l_Parent_0.Src.Thunks.AddGroupCollaborator);
local v24 = require(l_Parent_0.Src.Thunks.SearchCollaborators);
local v25 = require(l_Parent_0.Src.Thunks.PermissionsLoader);
local v26 = require(l_Parent_0.Src.Selectors.IsGroupGame);
local v27 = require(l_Parent_0.Src.Selectors.IsGame17Plus);
local v28 = v19("Frame", "UIListLayout", {
    SortOrder = Enum.SortOrder.LayoutOrder,
    Padding = UDim.new(0, 32),
    HorizontalAlignment = Enum.HorizontalAlignment.Center
});
local v29 = v1.PureComponent:extend("CollaboratorSearchWidget");
v29.isLoading = function(v30)
    local l_SearchData_0 = v30.props.SearchData;
    local l_CachedSearchResults_0 = l_SearchData_0.CachedSearchResults;
    local l_SearchText_0 = l_SearchData_0.SearchText;
    local v34 = true;
    if l_SearchData_0.LocalUserGroups ~= v10 then
        v34 = true;
        if l_SearchData_0.LocalUserFriends ~= v10 then
            v34 = true;
            if l_CachedSearchResults_0[l_SearchText_0] ~= v10 then
                v34 = false;
                if l_CachedSearchResults_0[l_SearchText_0] == nil then
                    v34 = l_SearchText_0 ~= "";
                end;
            end;
        end;
    end;
    return v34;
end;
v29.isFriend = function(v35, v36)
    local l_props_0 = v35.props;
    local l_ownerType_0 = l_props_0.ownerType;
    local l_ownerFriends_0 = l_props_0.ownerFriends;
    if l_ownerType_0 == Enum.CreatorType.User then
        for _, v41 in ipairs(l_ownerFriends_0) do
            if v41 == v36 then
                return true;
            end;
        end;
    end;
    return false;
end;
v29.getMatches = function(v42)
    local l_props_1 = v42.props;
    local l_SearchData_1 = l_props_1.SearchData;
    local l_UserCollaborators_0 = l_props_1.UserCollaborators;
    local l_GroupCollaborators_0 = l_props_1.GroupCollaborators;
    local l_CachedSearchResults_1 = l_SearchData_1.CachedSearchResults;
    local l_SearchText_1 = l_SearchData_1.SearchText;
    local v49 = {};
    for _, v51 in ipairs(l_UserCollaborators_0) do
        v49[v51] = true;
    end;
    local function _(v52)
        return v49[v52] ~= nil;
    end;
    local v54 = {};
    for _, v56 in ipairs(l_GroupCollaborators_0) do
        v54[v56] = true;
    end;
    local function _(v57)
        return v54[v57] ~= nil;
    end;
    local v59 = {
        Users = {},
        Groups = {}
    };
    if l_CachedSearchResults_1[l_SearchText_1] and l_CachedSearchResults_1[l_SearchText_1] ~= v10 then
        local v60 = l_CachedSearchResults_1[l_SearchText_1][v9.UserSubjectKey];
        local v61 = l_CachedSearchResults_1[l_SearchText_1][v9.GroupSubjectKey];
        local v62 = {};
        for _, v64 in pairs(v60) do
            if not (v49[v64[v9.SubjectIdKey]] ~= nil) then
                table.insert(v62, v64);
            end;
        end;
        local v65 = {};
        for _, v67 in pairs(v61) do
            if not (v54[v67[v9.GroupIdKey]] ~= nil) then
                table.insert(v65, v67);
            end;
        end;
        v59.Users = v62;
        v59.Groups = v65;
    end;
    return v59;
end;
v29.getResults = function(v68)
    local l_props_2 = v68.props;
    local l_SearchData_2 = l_props_2.SearchData;
    local l_IsGroupGame_0 = l_props_2.IsGroupGame;
    if l_SearchData_2.SearchText == "" then
        return {};
    else
        local v72 = v68:getMatches();
        local v73 = {};
        local l_MaxSearchResultsPerSubjectTypeUsers_0 = v9.MaxSearchResultsPerSubjectTypeUsers;
        local l_MaxSearchResultsPerSubjectTypeGroups_0 = v9.MaxSearchResultsPerSubjectTypeGroups;
        local v76 = v9.MaxSearchResultsPerSubjectTypeUsers - #v72.Users;
        local v77 = v9.MaxSearchResultsPerSubjectTypeGroups - #v72.Groups;
        if v77 > 0 then
            local v78 = false;
            if v77 > 0 then
                v78 = v9.MaxSearchResultsPerSubjectTypeUsers + v77;
            end;
            l_MaxSearchResultsPerSubjectTypeUsers_0 = v78;
        end;
        if v76 > 0 then
            local v79 = false;
            if v76 > 0 then
                v79 = v9.MaxSearchResultsPerSubjectTypeGroups + v76;
            end;
            l_MaxSearchResultsPerSubjectTypeGroups_0 = v79;
        end;
        if #v72.Users > 0 then
            local v80 = {};
            local v81 = {};
            for _, v83 in pairs(v72.Users) do
                if l_MaxSearchResultsPerSubjectTypeUsers_0 >= (#v80 + #v81) + 1 then
                    local v84 = v83[v9.SubjectIdKey];
                    local v85 = {
                        Icon = v1.createElement(v16, {
                            Id = v84,
                            Size = UDim2.new(1, 0, 1, 0)
                        }),
                        Name = v83[v9.SubjectNameKey],
                        Key = {
                            Type = v9.UserSubjectKey,
                            Id = v84,
                            Name = v83[v9.SubjectNameKey],
                            IsEligible = v83[v9.IsEligibleKey],
                            EligibilityText = v83[v9.EligibilityTextKey]
                        }
                    };
                    if not v68:isFriend(v84) then
                        table.insert(v81, v85);
                    else
                        v85.IsFriend = true;
                        table.insert(v80, v85);
                    end;
                else
                    break;
                end;
            end;
            for _, v87 in v81, nil, nil do
                table.insert(v80, v87);
            end;
            v80.LayoutOrder = 0;
            v73[l_COLLABORATORTYPE_USER_0] = v80;
        end;
        if not (not (#v72.Groups > 0) or l_IsGroupGame_0) then
            local v88 = {};
            for _, v90 in pairs(v72.Groups) do
                if l_MaxSearchResultsPerSubjectTypeGroups_0 >= #v88 + 1 then
                    table.insert(v88, {
                        Icon = v1.createElement(v17, {
                            Id = v90[v9.GroupIdKey],
                            Size = UDim2.new(1, 0, 1, 0)
                        }),
                        Name = v90[v9.GroupNameKey],
                        Key = {
                            Type = v9.GroupSubjectKey,
                            Id = v90[v9.GroupIdKey],
                            Name = v90[v9.GroupNameKey],
                            IsEligible = true
                        }
                    });
                else
                    break;
                end;
            end;
            v88.LayoutOrder = 0;
            v73[l_COLLABORATORTYPE_GROUP_0] = v88;
        end;
        return v73;
    end;
end;
v29.render = function(v91)
    local l_props_3 = v91.props;
    local l_LayoutOrder_0 = l_props_3.LayoutOrder;
    local l_Writable_0 = l_props_3.Writable;
    local l_UserCollaborators_1 = l_props_3.UserCollaborators;
    local l_AddUserCollaborator_0 = l_props_3.AddUserCollaborator;
    local l_AddGroupCollaborator_0 = l_props_3.AddGroupCollaborator;
    local l_SearchCollaborators_0 = l_props_3.SearchCollaborators;
    local l_IsGroupGame_1 = l_props_3.IsGroupGame;
    local l_Is17PlusGame_0 = l_props_3.Is17PlusGame;
    local l_Stylizer_1 = l_props_3.Stylizer;
    local l_Localization_1 = l_props_3.Localization;
    local v103 = v91:getResults();
    local v104 = v91:isLoading();
    local v105 = #l_UserCollaborators_1;
    local l_game_FastInt_0 = game:GetFastInt("TeamCreateMaxCollaborators");
    local v107 = l_game_FastInt_0 <= v105;
    return v1.createElement(v28, {
        BackgroundTransparency = 1,
        LayoutOrder = l_LayoutOrder_0
    }, {
        Padding = v1.createElement("UIPadding", {
            PaddingTop = l_Stylizer_1.searchWidget.paddingTop,
            PaddingLeft = l_Stylizer_1.searchWidget.paddingHorizontal,
            PaddingRight = l_Stylizer_1.searchWidget.paddingHorizontal
        }),
        AgeWarningFrame = l_Is17PlusGame_0 and v1.createElement("Frame", {
            BackgroundTransparency = 1,
            LayoutOrder = 1,
            Size = UDim2.new(1, 0, 0, l_Stylizer_1.searchWidget.ageWarning.Height),
            BorderSizePixel = 0
        }, {
            AgeWarning = v1.createElement("TextLabel", v3.Dictionary.join(l_Stylizer_1.searchWidget.ageWarning.fontStyle, {
                Text = if not l_IsGroupGame_1 then l_Localization_1:getText("SearchBar", "AgeWarningUsers") else l_Localization_1:getText("SearchBar", "AgeWarningGroups"),
                TextXAlignment = Enum.TextXAlignment.Left
            }))
        }),
        Searchbar = v1.createElement(v18, {
            LayoutOrder = 2,
            Enabled = l_Writable_0 and not v107,
            HeaderHeight = l_Stylizer_1.searchBar.headerHeight,
            ItemHeight = l_Stylizer_1.searchBar.itemHeight,
            ErrorText = not not v107 and l_Localization_1:getText("SearchBar", "TooManyResultsText", {
                maxNumCollaborators = l_game_FastInt_0
            }) or nil,
            DefaultText = l_Localization_1:getText("SearchBar", not l_IsGroupGame_1 and "AddUsersGroups" or "AddUsers"),
            NoResultsText = l_Localization_1:getText("SearchBar", "NoResultsText"),
            LoadingMore = v104,
            IsGroupGame = l_IsGroupGame_1,
            onSearchRequested = function(v108)
                l_SearchCollaborators_0(v108, true);
            end,
            onTextChanged = function(v109)
                l_SearchCollaborators_0(v109, false);
            end,
            OnItemClicked = function(v110)
                l_props_3.LoadFriends();
                if not (v110.Type == v9.UserSubjectKey) or not v110.IsEligible then
                    if v110.Type == v9.GroupSubjectKey then
                        l_AddGroupCollaborator_0(v110.Id, l_PlayKey_0);
                        return ;
                    else
                        assert(false);
                        return ;
                    end;
                elseif not v91:isFriend(v110.Id) then
                    l_AddUserCollaborator_0(v110.Id, v110.Name, l_PlayKey_0);
                    return ;
                else
                    l_AddUserCollaborator_0(v110.Id, v110.Name, l_EditKey_0);
                    return ;
                end;
            end,
            Results = v103,
            Is17PlusGame = l_Is17PlusGame_0
        })
    });
end;
return (v2.connect(function(v111, _)
    local v113, v114 = v20(v111);
    local v115, v116 = v21(v111);
    return {
        IsGroupGame = v26(v111),
        Is17PlusGame = v27(v111),
        UserCollaborators = v3.Dictionary.join(v113, v114),
        GroupCollaborators = v3.Dictionary.join(v115, v116),
        SearchData = v111.CollaboratorSearch,
        ownerType = v111.GameOwnerMetadata.creatorType,
        ownerFriends = v111.GameOwnerMetadata.creatorFriends
    };
end, function(v117)
    return {
        AddUserCollaborator = function(...)
            v117(v22(...));
        end,
        AddGroupCollaborator = function(...)
            v117(v23(...));
        end,
        SearchCollaborators = function(...)
            v117(v24(...));
        end,
        LoadFriends = function()
            v117(v25:LoadFriends());
        end
    };
end)((l_withContext_0({
    Stylizer = l_Stylizer_0,
    Localization = l_Localization_0,
    Mouse = l_ContextServices_0.Mouse
})(v29))));


local l_COLLAB2850_FixMcTooltips_0 = game:GetFastFlag("COLLAB2850_FixMcTooltips");
local l_Parent_0 = script.Parent.Parent.Parent;
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local l_ContextServices_0 = require(l_Parent_0.Packages.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v6 = require(l_Parent_0.Packages.Framework);
local l_Stylizer_0 = v6.Style.Stylizer;
local v8 = require(l_Parent_0.Src.Util.CreateFitToContent);
local v9 = require(l_Parent_0.Src.Components.UserCollaboratorItem);
local v10 = require(l_Parent_0.Src.Components.GroupCollaboratorItem);
local v11 = require(l_Parent_0.Src.Selectors.GetUserCollaborators);
local v12 = require(l_Parent_0.Src.Selectors.GetGroupCollaborators);
local l_LayoutOrderIterator_0 = v6.Util.LayoutOrderIterator;
local v14 = v8("Frame", "UIListLayout", {
    SortOrder = Enum.SortOrder.LayoutOrder,
    FillDirection = Enum.FillDirection.Vertical,
    Padding = UDim.new(0, 0),
    HorizontalAlignment = Enum.HorizontalAlignment.Center
});
local v15 = v2.PureComponent:extend("CollaboratorsWidget");
local v16 = require(l_Parent_0.Src.Util.PermissionsConstants);
v15.render = function(v17)
    local l_props_0 = v17.props;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_Writable_0 = l_props_0.Writable;
    local l_NewUserCollaborators_0 = l_props_0.NewUserCollaborators;
    local l_CurrentUserCollaborators_0 = l_props_0.CurrentUserCollaborators;
    local l_NewGroupCollaborators_0 = l_props_0.NewGroupCollaborators;
    local l_CurrentGroupCollaborators_0 = l_props_0.CurrentGroupCollaborators;
    local l_OwnerId_0 = l_props_0.OwnerId;
    local l_OwnerType_0 = l_props_0.OwnerType;
    local v27 = if not l_COLLAB2850_FixMcTooltips_0 then nil else l_props_0.IsGroupGame;
    local v28 = {};
    local v29 = if not (l_OwnerType_0 == Enum.CreatorType.User) then v10 else v9;
    local v30 = l_LayoutOrderIterator_0.new();
    table.insert(v28, (v2.createElement(v29, {
        Id = l_OwnerId_0,
        Writable = l_Writable_0,
        LayoutOrder = v30:getNextOrder(),
        HideSeparator = false,
        IsGroupGame = v27
    })));
    for _, v32 in pairs(l_NewUserCollaborators_0) do
        table.insert(v28, (v2.createElement(v9, {
            LayoutOrder = v30:getNextOrder(),
            Writable = l_Writable_0,
            Id = v32,
            HideSeparator = false,
            IsGroupGame = v27
        })));
    end;
    for _, v34 in pairs(l_NewGroupCollaborators_0) do
        table.insert(v28, (v2.createElement(v10, {
            LayoutOrder = v30:getNextOrder(),
            Writable = l_Writable_0,
            Id = v34,
            CurrentPermission = v16.MultipleKey,
            HideSeparator = false,
            IsGroupGame = v27
        })));
    end;
    for _, v36 in pairs(l_CurrentUserCollaborators_0) do
        table.insert(v28, (v2.createElement(v9, {
            LayoutOrder = v30:getNextOrder(),
            Writable = l_Writable_0,
            Id = v36,
            HideSeparator = false,
            IsGroupGame = v27
        })));
    end;
    for _, v38 in pairs(l_CurrentGroupCollaborators_0) do
        table.insert(v28, (v2.createElement(v10, {
            LayoutOrder = v30:getNextOrder(),
            Writable = l_Writable_0,
            Id = v38,
            CurrentPermission = v16.MultipleKey,
            HideSeparator = false,
            IsGroupGame = v27
        })));
    end;
    v28[#v28].props.HideSeparator = true;
    return v2.createElement(v14, {
        LayoutOrder = l_LayoutOrder_0,
        BackgroundTransparency = 1
    }, {
        v28
    });
end;
return (v3.connect(function(v39, _)
    local v41, v42 = v11(v39);
    local v43, v44 = v12(v39);
    return {
        NewUserCollaborators = v41,
        CurrentUserCollaborators = v42,
        NewGroupCollaborators = v43,
        CurrentGroupCollaborators = v44,
        OwnerId = v39.GameOwnerMetadata.creatorId,
        OwnerType = v39.GameOwnerMetadata.creatorType
    };
end)((l_withContext_0({
    Stylizer = l_Stylizer_0,
    Localization = l_ContextServices_0.Localization
})(v15))));


local v0 = game:getFastFlag("COLLAB2699FixSaveChangesLogic");
local l_Parent_0 = script.Parent.Parent.Parent;
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local v4 = require(l_Parent_0.Packages.Framework);
local l_Stylizer_0 = v4.Style.Stylizer;
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Localization_0 = l_ContextServices_0.Localization;
local v9 = require(l_Parent_0.Packages.Cryo);
local l_StyleModifier_0 = v4.Util.StyleModifier;
local v11 = require(l_Parent_0.Src.Components.ButtonBar);
local v12 = require(l_Parent_0.Src.Util.Constants);
local v13 = require(l_Parent_0.Src.Selectors.GetHasCollaborators);
local v14 = if not v0 then nil else require(l_Parent_0.Src.Selectors.GetHasUnsavedChanges);
local v15 = v2.PureComponent:extend("Footer");
v15.render = function(v16)
    local l_props_0 = v16.props;
    local l_Stylizer_1 = l_props_0.Stylizer;
    local l_Localization_1 = l_props_0.Localization;
    local l_IsTeamCreateEnabled_0 = l_props_0.IsTeamCreateEnabled;
    local l_HasUnsavedChanges_0 = l_props_0.HasUnsavedChanges;
    local v22 = l_HasUnsavedChanges_0 or not l_IsTeamCreateEnabled_0 and l_props_0.HasCollaborators;
    local l_OnSavePressed_0 = l_props_0.OnSavePressed;
    local l_OnCancelPressed_0 = l_props_0.OnCancelPressed;
    return v2.createElement("Frame", {
        BackgroundColor3 = l_Stylizer_1.backgroundColor,
        BorderSizePixel = 1,
        Size = UDim2.fromScale(1, 1),
        ZIndex = 2,
        BorderColor3 = l_Stylizer_1.footer.border
    }, {
        Gradient = v2.createElement("ImageLabel", {
            Size = UDim2.new(1, 0, 0, l_Stylizer_1.footer.gradientSize),
            AnchorPoint = Vector2.new(0, 1),
            Image = v12.GRADIENT_IMAGE,
            ImageRectSize = v12.GRADIENT_RECT_SIZE,
            BorderSizePixel = 0,
            BackgroundTransparency = 1,
            ImageColor3 = l_Stylizer_1.footer.gradient,
            ImageTransparency = l_Stylizer_1.footer.gradientTransparency,
            ZIndex = 1
        }),
        ButtonBar = v2.createElement(v11, {
            ZIndex = 2,
            Buttons = {
                {
                    Name = l_Localization_1:getText("Buttons", "Cancel"),
                    OnPressed = function()
                        l_OnCancelPressed_0(l_HasUnsavedChanges_0);
                    end,
                    Style = "Cancel"
                },
                {
                    Name = l_Localization_1:getText("Buttons", "Save"),
                    Default = true,
                    OnPressed = function()
                        if v22 then
                            l_OnSavePressed_0();
                        end;
                    end,
                    Style = not v22 and "Passive" or "Active",
                    StyleModifier = if v22 then nil else l_StyleModifier_0.Disabled
                }
            },
            HorizontalAlignment = Enum.HorizontalAlignment.Right
        })
    });
end;
return (v3.connect(function(v25, _)
    local _ = nil;
    return {
        HasUnsavedChanges = if not v0 then if v25.Permissions.NewPermissions then not v9.isEmpty(v25.Permissions.NewPermissions) else false else v14(v25),
        HasCollaborators = v13(v25)
    };
end, function(_)
end)((l_withContext_0({
    Stylizer = l_Stylizer_0,
    Localization = l_Localization_0
})(v15))));