local l_Parent_0 = script.Parent.Parent.Parent;
local l_StudioAssetManagerAddRecentlyImportedView_0 = game:GetFastFlag("StudioAssetManagerAddRecentlyImportedView");
local l_EnableAssetManagerGlobalSearchBar_0 = game:GetFastFlag("EnableAssetManagerGlobalSearchBar");
local l_EnableAssetManagerSortButton_0 = game:GetFastFlag("EnableAssetManagerSortButton");
local v4 = require(l_Parent_0.Packages.Roact);
local v5 = require(l_Parent_0.Packages.RoactRodux);
local v6 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v6.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_UI_0 = v6.UI;
local l_Button_0 = l_UI_0.Button;
local l_DropdownMenu_0 = l_UI_0.DropdownMenu;
local l_HoverArea_0 = l_UI_0.HoverArea;
local l_LinkText_0 = l_UI_0.LinkText;
local l_Pane_0 = l_UI_0.Pane;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_Tooltip_0 = l_UI_0.Tooltip;
local l_SearchBar_0 = l_UI_0.SearchBar;
local l_Util_0 = v6.Util;
local l_LayoutOrderIterator_0 = l_Util_0.LayoutOrderIterator;
local l_StyleModifier_0 = l_Util_0.StyleModifier;
local l_GetTextSize_0 = l_Util_0.GetTextSize;
local v22 = require(l_Parent_0.Src.Actions.SetRecentViewToggled);
local v23 = require(l_Parent_0.Src.Actions.SetSearchTerm);
local v24 = require(l_Parent_0.Src.Actions.SetToPreviousScreen);
local v25 = require(l_Parent_0.Src.Actions.SetToNextScreen);
local v26 = require(l_Parent_0.Src.Actions.SetView);
local v27 = require(l_Parent_0.Src.Thunks.LaunchBulkImport);
local v28 = require(l_Parent_0.Src.Util.Screens);
local v29 = require(l_Parent_0.Src.Util.View);
local l_BulkImportService_0 = game:GetService("BulkImportService");
local l_enableBadgesCallout_0 = require(l_Parent_0.Src.Util.AssetManagerUtilities).enableBadgesCallout;
local v32 = not not l_enableBadgesCallout_0() and require(script.Parent.TeachingCallout) or nil;
local v33 = v4.PureComponent:extend("TopBar");
v33.init = function(v34)
    v34.state = {
        showSortDropdown = false
    };
    v34.OnTreeViewButtonActivated = function()
        v34.props.OnOverlayActivated();
    end;
    v34.OnSearchRequested = function(v35)
        local l_props_0 = v34.props;
        l_props_0.Analytics:report("search");
        l_props_0.dispatchSetSearchTerm(v35);
    end;
    v34.OnSelectSortItem = function(_, _)
        v34:setState({
            showSortDropdown = false
        });
    end;
    v34.OnOpenSortDropdown = function()
        v34:setState({
            showSortDropdown = true
        });
    end;
    v34.OnCloseSortDropdown = function()
        v34:setState({
            showSortDropdown = false
        });
    end;
end;
v33.render = function(v39)
    local l_props_1 = v39.props;
    local l_Analytics_0 = l_props_1.Analytics;
    local l_Stylizer_0 = l_props_1.Stylizer;
    local l_TopBar_0 = l_Stylizer_0.TopBar;
    local l_Localization_0 = l_props_1.Localization;
    local l_Size_0 = l_props_1.Size;
    local l_LayoutOrder_0 = l_props_1.LayoutOrder;
    local l_Enabled_0 = l_props_1.Enabled;
    local l_RecentViewToggled_0 = l_props_1.RecentViewToggled;
    local l_dispatchSetRecentViewToggled_0 = l_props_1.dispatchSetRecentViewToggled;
    local l_CurrentScreen_0 = l_props_1.CurrentScreen;
    local l_PreviousScreens_0 = l_props_1.PreviousScreens;
    local l_NextScreens_0 = l_props_1.NextScreens;
    local l_dispatchSetToPreviousScreen_0 = l_props_1.dispatchSetToPreviousScreen;
    local l_dispatchSetToNextScreen_0 = l_props_1.dispatchSetToNextScreen;
    local v55 = #l_PreviousScreens_0 > 0;
    local v56 = #l_NextScreens_0 > 0;
    local l_BulkImporterRunning_0 = l_props_1.BulkImporterRunning;
    local l_dispatchLaunchBulkImporter_0 = l_props_1.dispatchLaunchBulkImporter;
    local v59 = l_Localization_0:getText("BulkImport", "BulkImportRunning");
    local v60 = l_Localization_0:getText("BulkImport", "BulkImportShowLink");
    local v61 = (l_GetTextSize_0(v59, l_TopBar_0.Tooltip.TextSize, l_Stylizer_0.Font, Vector2.new(l_TopBar_0.Tooltip.Width, math.huge)).Y + l_TopBar_0.Tooltip.Padding) + l_GetTextSize_0(v60, l_TopBar_0.Tooltip.TextSize, l_Stylizer_0.Font, Vector2.new(l_TopBar_0.Tooltip.Width, math.huge)).Y;
    local l_View_0 = l_props_1.View;
    local l_dispatchSetView_0 = l_props_1.dispatchSetView;
    local v64 = nil;
    if l_View_0.Key == v29.GRID.Key then
        v64 = "ListViewButton";
    elseif l_View_0.Key == v29.LIST.Key then
        v64 = "GridViewButton";
    end;
    local v65 = nil;
    v65 = if not l_EnableAssetManagerSortButton_0 then l_TopBar_0.Button.Size * 5 + l_TopBar_0.Padding * 4 else l_TopBar_0.Button.Size * 6 + l_TopBar_0.Padding * 2;
    local v66 = nil;
    local v67 = nil;
    if not l_EnableAssetManagerGlobalSearchBar_0 then
        v66 = l_CurrentScreen_0.Path ~= v28.MAIN.Path;
        v67 = l_Localization_0:getText("SearchBar", "PlaceholderText") .. " " .. l_Localization_0:getText("Folders", l_CurrentScreen_0.Path);
    else
        v66 = true;
        v67 = if l_CurrentScreen_0.Path ~= v28.MAIN.Path then l_Localization_0:getText("SearchBar", "PlaceholderText") .. " " .. l_Localization_0:getText("Folders", l_CurrentScreen_0.Path) else l_Localization_0:getText("SearchBar", "GlobalPlaceholderText");
    end;
    local v68 = l_LayoutOrderIterator_0.new();
    local v69 = l_Localization_0:getText("TopBar", "ExplorerOverlayButton");
    local v70 = l_Localization_0:getText("TopBar", "BackButton");
    local v71 = l_Localization_0:getText("TopBar", "ForwardButton");
    local v72 = l_Localization_0:getText("TopBar", "BulkImportButton");
    local v73 = nil;
    if l_View_0.Key == v29.GRID.Key then
        v73 = l_Localization_0:getText("TopBar", "ListViewButton");
    elseif l_View_0.Key == v29.LIST.Key then
        v73 = l_Localization_0:getText("TopBar", "GridViewButton");
    end;
    local v74 = nil;
    local v75 = nil;
    local v76 = nil;
    local v77 = nil;
    local v78 = nil;
    if l_EnableAssetManagerSortButton_0 then
        v74 = l_Localization_0:getText("TopBar", "SortButton");
        v75 = l_Localization_0:getText("SortOption", "RecentlyAdded");
        v76 = l_Localization_0:getText("SortOption", "RecentlyUsed");
        v77 = l_Localization_0:getText("SortOption", "AscendingName");
        v78 = l_Localization_0:getText("SortOption", "DescendingName");
    end;
    return v4.createElement("Frame", {
        Size = l_Size_0,
        LayoutOrder = l_LayoutOrder_0,
        BackgroundColor3 = l_Stylizer_0.BackgroundColor,
        BorderColor3 = l_Stylizer_0.BorderColor,
        BorderSizePixel = 1
    }, {
        TopBarLayout = v4.createElement("UIListLayout", {
            Padding = UDim.new(0, l_TopBar_0.Padding),
            FillDirection = Enum.FillDirection.Horizontal,
            VerticalAlignment = Enum.VerticalAlignment.Center,
            SortOrder = Enum.SortOrder.LayoutOrder
        }),
        Padding = v4.createElement("UIPadding", {
            PaddingLeft = UDim.new(0, l_TopBar_0.Padding),
            PaddingRight = UDim.new(0, l_TopBar_0.Padding)
        }),
        ExplorerOverlayButton = v4.createElement(l_Button_0, {
            Size = UDim2.new(0, l_TopBar_0.Button.Size, 0, l_TopBar_0.Button.Size),
            AnchorPoint = Vector2.new(0.5, 0.5),
            LayoutOrder = v68:getNextOrder(),
            Style = "OverlayButton",
            OnClick = function()
                if l_Enabled_0 then
                    v39.OnTreeViewButtonActivated();
                end;
            end
        }, {
            HoverArea = l_Enabled_0 and v4.createElement(l_HoverArea_0, {
                Cursor = "PointingHand",
                MouseEnter = v39.mouseEnter,
                MouseLeave = v39.mouseLeave
            }),
            Tooltip = l_Enabled_0 and v4.createElement(l_Tooltip_0, {
                Text = v69,
                Enabled = true
            })
        }),
        NavigationButtonsFrame = v4.createElement("Frame", {
            Size = UDim2.new(0, 2 * l_TopBar_0.Button.Size, 0, l_TopBar_0.Button.Size),
            BackgroundTransparency = 1,
            LayoutOrder = v68:getNextOrder()
        }, {
            ButtonLayout = v4.createElement("UIListLayout", {
                Padding = UDim.new(0, 0),
                FillDirection = Enum.FillDirection.Horizontal,
                SortOrder = Enum.SortOrder.LayoutOrder
            }),
            PreviousButton = v4.createElement(l_Button_0, {
                Size = UDim2.new(0, l_TopBar_0.Button.Size, 0, l_TopBar_0.Button.Size),
                AnchorPoint = Vector2.new(0.5, 0.5),
                LayoutOrder = 1,
                Style = "PreviousButton",
                StyleModifier = not v55 and l_StyleModifier_0.Disabled,
                OnClick = function()
                    if not (not v55 or not l_Enabled_0) then
                        l_dispatchSetToPreviousScreen_0(v55);
                        if not (not l_StudioAssetManagerAddRecentlyImportedView_0 or not l_RecentViewToggled_0) then
                            l_dispatchSetRecentViewToggled_0(false);
                        end;
                    end;
                end
            }, {
                HoverArea = (v55 and l_Enabled_0) and v4.createElement(l_HoverArea_0, {
                    Cursor = "PointingHand",
                    MouseEnter = v39.mouseEnter,
                    MouseLeave = v39.mouseLeave
                }),
                Tooltip = (v55 and l_Enabled_0) and v4.createElement(l_Tooltip_0, {
                    Text = v70,
                    Enabled = true
                })
            }),
            NextButton = v4.createElement(l_Button_0, {
                Size = UDim2.new(0, l_TopBar_0.Button.Size, 0, l_TopBar_0.Button.Size),
                AnchorPoint = Vector2.new(0.5, 0.5),
                LayoutOrder = 2,
                Style = "NextButton",
                StyleModifier = not v56 and l_StyleModifier_0.Disabled,
                OnClick = function()
                    if not (not v56 or not l_Enabled_0) then
                        l_dispatchSetToNextScreen_0(v56);
                        if not (not l_StudioAssetManagerAddRecentlyImportedView_0 or not l_RecentViewToggled_0) then
                            l_dispatchSetRecentViewToggled_0(false);
                        end;
                    end;
                end
            }, {
                HoverArea = (v56 and l_Enabled_0) and v4.createElement(l_HoverArea_0, {
                    Cursor = "PointingHand",
                    MouseEnter = v39.mouseEnter,
                    MouseLeave = v39.mouseLeave
                }),
                Tooltip = (v56 and l_Enabled_0) and v4.createElement(l_Tooltip_0, {
                    Text = v71,
                    Enabled = true
                })
            })
        }),
        BulkImporterButton = v4.createElement(l_Button_0, {
            Size = UDim2.new(0, l_TopBar_0.Button.Size, 0, l_TopBar_0.Button.Size),
            AnchorPoint = Vector2.new(0.5, 0.5),
            LayoutOrder = v68:getNextOrder(),
            Style = "BulkImporterButton",
            StyleModifier = l_BulkImporterRunning_0 and l_StyleModifier_0.Disabled,
            OnClick = function()
                if not (l_BulkImporterRunning_0 or not l_Enabled_0) then
                    l_Analytics_0:report("clickBulkImportButton");
                    l_dispatchLaunchBulkImporter_0(0);
                end;
            end
        }, {
            OpenBulkImporterTooltip = v4.createElement(l_Tooltip_0, {
                Content = v4.createElement(l_Pane_0, {
                    Layout = Enum.FillDirection.Vertical,
                    Spacing = l_TopBar_0.Tooltip.Padding,
                    Style = "Box"
                }, {
                    TextLabel = v4.createElement(l_TextLabel_0, {
                        AutomaticSize = Enum.AutomaticSize.Y,
                        Font = l_Stylizer_0.Font,
                        LayoutOrder = 1,
                        Size = UDim2.fromScale(1, 0),
                        Text = v59,
                        TextSize = l_TopBar_0.Tooltip.TextSize,
                        TextWrapped = true,
                        TextXAlignment = Enum.TextXAlignment.Left
                    }),
                    LinkText = v4.createElement(l_LinkText_0, {
                        LayoutOrder = 2,
                        Style = "BulkImporterTooltip",
                        Text = v60,
                        OnClick = function()
                            l_BulkImportService_0:ShowBulkImportView();
                        end
                    })
                }),
                ContentExtents = Vector2.new(l_TopBar_0.Tooltip.Width, v61),
                Enabled = l_BulkImporterRunning_0
            }),
            HoverArea = (not l_BulkImporterRunning_0 and l_Enabled_0) and v4.createElement(l_HoverArea_0, {
                Cursor = "PointingHand",
                MouseEnter = v39.mouseEnter,
                MouseLeave = v39.mouseLeave
            }),
            BulkImportButtonTooltip = (not l_BulkImporterRunning_0 and l_Enabled_0) and v4.createElement(l_Tooltip_0, {
                Text = v72,
                Enabled = true
            })
        }),
        GridListToggleButton = v4.createElement(l_Button_0, {
            Size = UDim2.new(0, l_TopBar_0.Button.Size, 0, l_TopBar_0.Button.Size),
            AnchorPoint = Vector2.new(0.5, 0.5),
            LayoutOrder = v68:getNextOrder(),
            Style = v64,
            StyleModifier = l_BulkImporterRunning_0 and l_StyleModifier_0.Disabled,
            OnClick = function()
                if l_View_0.Key == v29.GRID.Key then
                    l_dispatchSetView_0(v29.LIST);
                    return ;
                else
                    if l_View_0.Key == v29.LIST.Key then
                        l_dispatchSetView_0(v29.GRID);
                    end;
                    return ;
                end;
            end
        }, {
            HoverArea = (not l_BulkImporterRunning_0 and l_Enabled_0) and v4.createElement(l_HoverArea_0, {
                Cursor = "PointingHand",
                MouseEnter = v39.mouseEnter,
                MouseLeave = v39.mouseLeave
            }),
            Tooltip = l_Enabled_0 and v4.createElement(l_Tooltip_0, {
                Text = v73,
                Enabled = true
            }),
            TeachingCallout = l_enableBadgesCallout_0() and v4.createElement(v32, {
                DefinitionId = "AssetManagerBadgesDevProductCallout",
                LocationId = "GridListToggleButton"
            })
        }),
        SearchBar = if not l_EnableAssetManagerSortButton_0 and v66 then v4.createElement(l_SearchBar_0, {
            Size = UDim2.new(1, -v65, 1, -2),
            LayoutOrder = v68:getNextOrder(),
            Disabled = not l_Enabled_0,
            Style = "Compact",
            ShowSearchIcon = true,
            ShowSearchButton = false,
            PlaceholderText = v67,
            IncrementalTextSearch = true,
            IncrementalTextSearchDelay = 0,
            OnSearchRequested = v39.OnSearchRequested
        }) else nil,
        SearchSortFrame = if not l_EnableAssetManagerSortButton_0 then nil else v4.createElement(l_Pane_0, {
            Size = UDim2.new(1, -v65, 0, l_TopBar_0.Button.Size),
            BackgroundTransparency = 1,
            Layout = Enum.FillDirection.Horizontal,
            LayoutOrder = v68:getNextOrder()
        }, {
            SearchBar = v66 and v4.createElement(l_SearchBar_0, {
                Size = UDim2.new(1, -l_TopBar_0.Button.Size, 1, -2),
                LayoutOrder = 1,
                Disabled = not l_Enabled_0,
                Style = "Compact",
                ShowSearchIcon = true,
                ShowSearchButton = false,
                PlaceholderText = v67,
                IncrementalTextSearch = true,
                IncrementalTextSearchDelay = 0,
                OnSearchRequested = v39.OnSearchRequested
            }),
            SortButton = v4.createElement(l_Button_0, {
                Size = UDim2.new(0, l_TopBar_0.Button.Size, 0, l_TopBar_0.Button.Size),
                AnchorPoint = Vector2.new(0.5, 0.5),
                LayoutOrder = 2,
                Style = "SortButton",
                StyleModifier = v39.state.showSortDropdown and l_StyleModifier_0.Selected,
                OnClick = function()
                    if l_Enabled_0 then
                        v39.OnOpenSortDropdown();
                    end;
                end
            }, {
                Menu = v4.createElement(l_DropdownMenu_0, {
                    Hide = not v39.state.showSortDropdown,
                    Items = {
                        v75,
                        v76,
                        v77,
                        v78
                    },
                    OnItemActivated = v39.OnSelectSortItem,
                    OnFocusLost = v39.OnCloseSortDropdown
                }),
                HoverArea = l_Enabled_0 and v4.createElement(l_HoverArea_0, {
                    Cursor = "PointingHand",
                    MouseEnter = v39.mouseEnter,
                    MouseLeave = v39.mouseLeave
                }),
                Tooltip = l_Enabled_0 and v4.createElement(l_Tooltip_0, {
                    Text = v74,
                    Enabled = true
                })
            })
        })
    });
end;
return v5.connect(function(v79, _)
    return {
        BulkImporterRunning = v79.AssetManagerReducer.bulkImporterRunning,
        CurrentScreen = v79.Screen.currentScreen,
        PreviousScreens = v79.Screen.previousScreens,
        NextScreens = v79.Screen.nextScreens,
        RecentViewToggled = v79.AssetManagerReducer.recentViewToggled,
        View = v79.AssetManagerReducer.view
    };
end, function(v81)
    return {
        dispatchLaunchBulkImporter = function(v82)
            v81(v27(v82));
        end,
        dispatchSetRecentViewToggled = function(v83)
            v81(v22(v83));
        end,
        dispatchSetSearchTerm = function(v84)
            v81(v23(v84));
        end,
        dispatchSetToPreviousScreen = function(v85)
            if v85 then
                v81(v24());
            end;
        end,
        dispatchSetToNextScreen = function(v86)
            if v86 then
                v81(v25());
            end;
        end,
        dispatchSetView = function(v87)
            v81(v26(v87));
        end
    };
end)((l_withContext_0({
    Analytics = l_ContextServices_0.Analytics,
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer
})(v33)));


return {
    require(script.Parent.Parent.Parent.Packages.Rodux).thunkMiddleware
};


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Cryo);
local v2 = require(l_Parent_0.Packages.Rodux);
local v3 = require(l_Parent_0.Src.Util.View);
local l_deepJoin_0 = require(l_Parent_0.Packages.Framework).Util.deepJoin;
return v2.createReducer({
    assetsTable = {
        assets = {},
        assetPreviewData = {},
        assetsModerationData = {},
        index = 0
    },
    bulkImporterRunning = false,
    editingAssets = {},
    isFetchingAssets = false,
    recentAssets = {},
    recentViewToggled = false,
    searchTerm = "",
    selectedAssets = {},
    selectionIndex = 0,
    universeName = "",
    view = v3.LIST
}, {
    SetAssets = function(v5, v6)
        return v1.Dictionary.join(v5, {
            assetsTable = v1.Dictionary.join(v5.assetsTable, v6.assetsTable)
        });
    end,
    SetBulkImporterRunning = function(v7, v8)
        return v1.Dictionary.join(v7, {
            bulkImporterRunning = v8.bulkImporterRunning
        });
    end,
    SetEditingAssets = function(v9, v10)
        return v1.Dictionary.join(v9, {
            editingAssets = v10.editingAssets
        });
    end,
    SetIsFetchingAssets = function(v11, v12)
        return v1.Dictionary.join(v11, {
            isFetchingAssets = v12.isFetchingAssets
        });
    end,
    SetRecentAssets = function(v13, v14)
        return v1.Dictionary.join(v13, {
            recentAssets = v14.recentAssets
        });
    end,
    SetRecentViewToggled = function(v15, v16)
        return v1.Dictionary.join(v15, {
            recentViewToggled = v16.recentViewToggled
        });
    end,
    SetSearchTerm = function(v17, v18)
        return v1.Dictionary.join(v17, {
            searchTerm = v18.searchTerm
        });
    end,
    SetSelectedAssets = function(v19, v20)
        return v1.Dictionary.join(v19, {
            selectedAssets = v20.selectedAssets
        });
    end,
    SetSelectionIndex = function(v21, v22)
        return v1.Dictionary.join(v21, {
            selectionIndex = v22.selectionIndex
        });
    end,
    SetUniverseName = function(v23, v24)
        return v1.Dictionary.join(v23, {
            universeName = v24.universeName
        });
    end,
    SetView = function(v25, v26)
        return v1.Dictionary.join(v25, {
            view = v26.view
        });
    end,
    SetAssetPreviewData = function(v27, v28)
        return v1.Dictionary.join(v27, {
            assetsTable = v1.Dictionary.join(v27.assetsTable, {
                assetPreviewData = v1.Dictionary.join(v27.assetsTable.assetPreviewData, v28.assetPreviewData)
            })
        });
    end,
    SetAssetOwnerName = function(v29, v30)
        return (l_deepJoin_0(v29, {
            assetsTable = {
                assetPreviewData = {
                    [v30.assetId] = {
                        Creator = {
                            Name = v30.username
                        }
                    }
                }
            }
        }));
    end,
    SetRootTreeViewInstance = function(v31, v32)
        return (l_deepJoin_0(v31, {
            assetsTable = {
                assetPreviewData = {
                    [v32.assetId] = {
                        rootTreeViewInstance = v32.rootTreeViewInstance
                    }
                }
            }
        }));
    end,
    SetAssetFavorited = function(v33, v34)
        return (l_deepJoin_0(v33, {
            assetsTable = {
                assetPreviewData = {
                    [v34.assetId] = {
                        favorited = v34.isAssetFavorited
                    }
                }
            }
        }));
    end,
    SetAssetFavoriteCount = function(v35, v36)
        return (l_deepJoin_0(v35, {
            assetsTable = {
                assetPreviewData = {
                    [v36.assetId] = {
                        favoriteCount = v36.favoriteCount
                    }
                }
            }
        }));
    end,
    IncrementAssetFavoriteCount = function(v37, v38)
        local v39 = v37.assetsTable.assetPreviewData[v38.assetId];
        local _ = nil;
        return (l_deepJoin_0(v37, {
            assetsTable = {
                assetPreviewData = if not v39 then {
                    [v38.assetId] = {
                        favoriteCount = v38.incrementCount
                    }
                } else {
                    [v38.assetId] = v1.Dictionary.join(v37.assetsTable.assetPreviewData[v38.assetId], {
                        favoriteCount = v39.favoriteCount + v38.incrementCount
                    })
                }
            }
        }));
    end,
    SetAssetsModerationData = function(v41, v42)
        return v1.Dictionary.join(v41, {
            assetsTable = v1.Dictionary.join(v41.assetsTable, {
                assetsModerationData = v1.Dictionary.join(v41.assetsTable.assetsModerationData, v42.assetsModerationData)
            })
        });
    end,
    ChangeAssetAlias = function(v43, v44)
        local v45 = {
            assetsTable = {
                assets = {
                    [v44.assetId] = {
                        name = v44.newAlias
                    }
                }
            }
        };
        if v43.recentAssets[v44.assetId] then
            v45.recentAssets = {
                [v44.assetId] = {
                    name = v44.newAlias
                }
            };
        end;
        return l_deepJoin_0(v43, v45);
    end
});


local l_Parent_0 = script.Parent.Parent.Parent;
return (require(l_Parent_0.Packages.Rodux).combineReducers({
    AssetManagerReducer = require(l_Parent_0.Src.Reducers.AssetManagerReducer),
    Screen = require(l_Parent_0.Src.Reducers.Screen)
}));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Rodux);
local v2 = require(l_Parent_0.Packages.Cryo);
return v1.createReducer({
    screensTable = {},
    currentScreen = require(l_Parent_0.Src.Util.Screens).MAIN,
    previousScreens = {},
    nextScreens = {}
}, {
    SetScreen = function(v3, v4)
        return v2.Dictionary.join(v3, {
            currentScreen = v4.screen,
            previousScreens = v2.Dictionary.join(v3.previousScreens, {
                [#v3.previousScreens + 1] = v3.currentScreen
            }),
            nextScreens = {}
        });
    end,
    SetToPreviousScreen = function(v5, _)
        assert(#v5.previousScreens > 0, "previousScreens should not be empty");
        return v2.Dictionary.join(v5, {
            currentScreen = v5.previousScreens[#v5.previousScreens],
            previousScreens = {
                unpack(v5.previousScreens, 1, #v5.previousScreens - 1)
            },
            nextScreens = v2.Dictionary.join(v5.nextScreens, {
                [#v5.nextScreens + 1] = v5.currentScreen
            })
        });
    end,
    SetToNextScreen = function(v7, _)
        assert(#v7.nextScreens > 0, "nextScreens should not be empty");
        return v2.Dictionary.join(v7, {
            currentScreen = v7.nextScreens[#v7.nextScreens],
            previousScreens = v2.Dictionary.join(v7.previousScreens, {
                [#v7.previousScreens + 1] = v7.currentScreen
            }),
            nextScreens = {
                unpack(v7.nextScreens, 1, #v7.nextScreens - 1)
            }
        });
    end
});


local l_HttpService_0 = game:GetService("HttpService");
local l_Parent_0 = script.Parent.Parent.Parent;
local v2 = require(l_Parent_0.Packages.Dash);
local v3 = require(l_Parent_0.Src.Util.DebugFlags);
local l_join_0 = v2.join;
local l_AssetManagerUseEventIngest_0 = game:GetFastFlag("AssetManagerUseEventIngest");
local v6 = not l_AssetManagerUseEventIngest_0 and "Asset Manager" or "Asset Manager";
return function(v7)
    local function v11(v8, v9)
        local v10 = l_join_0({
            studioSid = v7:GetSessionId(),
            clientId = v7:GetClientId(),
            placeId = game.PlaceId
        }, v9 or {});
        if v3.LogAnalytics() then
            print(("%s SendEvent eventName=%s args=%s"):format(v6, tostring(v8), l_HttpService_0:JSONEncode(v10)));
        end;
        v7:SendEventDeferred("studio", v6, v8, v10);
    end;
    local function _(v12, v13)
        v13 = v13 or 1;
        if v3.LogAnalytics() then
            print(("%s ReportCounter counterName=%s count=%s"):format(v6, tostring(v12), (tostring(v13))));
        end;
        v7:ReportCounter(v12, v13);
    end;
    return {
        openFolder = function(v15)
            if not l_AssetManagerUseEventIngest_0 then
                v7:TrackEvent("Action", "Asset Manager", v15);
                v7:ReportCounter("AssetManagerFolderOpen", 1);
                return ;
            else
                v11(v15);
                local v16 = nil or 1;
                if v3.LogAnalytics() then
                    print(("%s ReportCounter counterName=%s count=%s"):format(v6, tostring("AssetManagerFolderOpen"), (tostring(v16))));
                end;
                v7:ReportCounter("AssetManagerFolderOpen", v16);
                return ;
            end;
        end,
        clickContextMenuItem = function()
            if not l_AssetManagerUseEventIngest_0 then
                v7:TrackEvent("Action", "Asset Manager", "Context Menu Item Click");
                v7:ReportCounter("AssetManagerContextMenuItemClick", 1);
                return ;
            else
                v11("Context Menu Item Click");
                local v17 = nil or 1;
                if v3.LogAnalytics() then
                    print(("%s ReportCounter counterName=%s count=%s"):format(v6, tostring("AssetManagerContextMenuItemClick"), (tostring(v17))));
                end;
                v7:ReportCounter("AssetManagerContextMenuItemClick", v17);
                return ;
            end;
        end,
        massUpdateFromAssetManager = function()
            if not l_AssetManagerUseEventIngest_0 then
                v7:ReportCounter("MassUpdateFromAssetManager", 1);
                return ;
            else
                local v18 = nil or 1;
                if v3.LogAnalytics() then
                    print(("%s ReportCounter counterName=%s count=%s"):format(v6, tostring("MassUpdateFromAssetManager"), (tostring(v18))));
                end;
                v7:ReportCounter("MassUpdateFromAssetManager", v18);
                return ;
            end;
        end,
        clickBulkImportButton = function()
            if not l_AssetManagerUseEventIngest_0 then
                v7:TrackEvent("Action", "Asset Manager", "Bulk Import Button Click");
                v7:ReportCounter("AssetManagerBulkImportButtonClick", 1);
                return ;
            else
                v11("Bulk Import Button Click");
                local v19 = nil or 1;
                if v3.LogAnalytics() then
                    print(("%s ReportCounter counterName=%s count=%s"):format(v6, tostring("AssetManagerBulkImportButtonClick"), (tostring(v19))));
                end;
                v7:ReportCounter("AssetManagerBulkImportButtonClick", v19);
                return ;
            end;
        end,
        search = function()
            if not l_AssetManagerUseEventIngest_0 then
                v7:TrackEvent("Action", "Asset Manager", "Search");
                v7:ReportCounter("AssetManagerSearch", 1);
                return ;
            else
                v11("Search");
                local v20 = nil or 1;
                if v3.LogAnalytics() then
                    print(("%s ReportCounter counterName=%s count=%s"):format(v6, tostring("AssetManagerSearch"), (tostring(v20))));
                end;
                v7:ReportCounter("AssetManagerSearch", v20);
                return ;
            end;
        end,
        insertAfterSearch = function()
            if not l_AssetManagerUseEventIngest_0 then
                v7:TrackEvent("Action", "Asset Manager", "Insert After Search");
                v7:ReportCounter("AssetManagerInsertAfterSearch", 1);
                return ;
            else
                v11("Insert After Search");
                local v21 = nil or 1;
                if v3.LogAnalytics() then
                    print(("%s ReportCounter counterName=%s count=%s"):format(v6, tostring("AssetManagerInsertAfterSearch"), (tostring(v21))));
                end;
                v7:ReportCounter("AssetManagerInsertAfterSearch", v21);
                return ;
            end;
        end,
        doubleClickInsert = function()
            if not l_AssetManagerUseEventIngest_0 then
                v7:TrackEvent("Action", "Asset Manager", "Double Click Insert");
                v7:ReportCounter("AssetManagerDoubleClickInsert", 1);
                return ;
            else
                v11("Double Click Insert");
                local v22 = nil or 1;
                if v3.LogAnalytics() then
                    print(("%s ReportCounter counterName=%s count=%s"):format(v6, tostring("AssetManagerDoubleClickInsert"), (tostring(v22))));
                end;
                v7:ReportCounter("AssetManagerDoubleClickInsert", v22);
                return ;
            end;
        end,
        dragInsert = function()
            if not l_AssetManagerUseEventIngest_0 then
                v7:TrackEvent("Action", "Asset Manager", "Drag Insert");
                v7:ReportCounter("AssetManagerDragInsert", 1);
                return ;
            else
                v11("Drag Insert");
                local v23 = nil or 1;
                if v3.LogAnalytics() then
                    print(("%s ReportCounter counterName=%s count=%s"):format(v6, tostring("AssetManagerDragInsert"), (tostring(v23))));
                end;
                v7:ReportCounter("AssetManagerDragInsert", v23);
                return ;
            end;
        end,
        cancelDragInsert = function()
            v11("CancelDragInsert");
            local v24 = nil or 1;
            if v3.LogAnalytics() then
                print(("%s ReportCounter counterName=%s count=%s"):format(v6, tostring("AssetManagerCancelDragInsert"), (tostring(v24))));
            end;
            v7:ReportCounter("AssetManagerCancelDragInsert", v24);
        end,
        AssetPreviewPlaySound = function()
            if not l_AssetManagerUseEventIngest_0 then
                v7:TrackEvent("Action", "Asset Manager", "Asset Preview Play Sound");
                v7:ReportCounter("AssetManagerAssetPreviewPlaySound", 1);
                return ;
            else
                v11("Asset Preview Play Sound");
                local v25 = nil or 1;
                if v3.LogAnalytics() then
                    print(("%s ReportCounter counterName=%s count=%s"):format(v6, tostring("AssetManagerAssetPreviewPlaySound"), (tostring(v25))));
                end;
                v7:ReportCounter("AssetManagerAssetPreviewPlaySound", v25);
                return ;
            end;
        end,
        AssetPreviewPauseSound = function()
            if not l_AssetManagerUseEventIngest_0 then
                v7:TrackEvent("Action", "Asset Manager", "Asset Preview Pause Sound");
                v7:ReportCounter("AssetManagerAssetPreviewPauseSound", 1);
                return ;
            else
                v11("Asset Preview Pause Sound");
                local v26 = nil or 1;
                if v3.LogAnalytics() then
                    print(("%s ReportCounter counterName=%s count=%s"):format(v6, tostring("AssetManagerAssetPreviewPauseSound"), (tostring(v26))));
                end;
                v7:ReportCounter("AssetManagerAssetPreviewPauseSound", v26);
                return ;
            end;
        end,
        AssetPreviewPlayVideo = function()
            if not l_AssetManagerUseEventIngest_0 then
                v7:TrackEvent("Action", "Asset Manager", "Asset Preview Play Video");
                v7:ReportCounter("AssetManagerAssetPreviewPlayVideo", 1);
                return ;
            else
                v11("Asset Preview Play Video");
                local v27 = nil or 1;
                if v3.LogAnalytics() then
                    print(("%s ReportCounter counterName=%s count=%s"):format(v6, tostring("AssetManagerAssetPreviewPlayVideo"), (tostring(v27))));
                end;
                v7:ReportCounter("AssetManagerAssetPreviewPlayVideo", v27);
                return ;
            end;
        end,
        AssetPreviewPauseVideo = function()
            if not l_AssetManagerUseEventIngest_0 then
                v7:TrackEvent("Action", "Asset Manager", "Asset Preview Pause Video");
                v7:ReportCounter("AssetManagerAssetPreviewPauseVideo", 1);
                return ;
            else
                v11("Asset Preview Pause Video");
                local v28 = nil or 1;
                if v3.LogAnalytics() then
                    print(("%s ReportCounter counterName=%s count=%s"):format(v6, tostring("AssetManagerAssetPreviewPauseVideo"), (tostring(v28))));
                end;
                v7:ReportCounter("AssetManagerAssetPreviewPauseVideo", v28);
                return ;
            end;
        end
    };
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_join_0 = require(l_Parent_0.Packages.Cryo).Dictionary.join;
local v2 = require(l_Parent_0.Packages.Framework);
local l_Util_0 = v2.Util;
local l_StyleModifier_0 = l_Util_0.StyleModifier;
local l_StyleKey_0 = v2.Style.StyleKey;
local l_StudioTheme_0 = v2.Style.Themes.StudioTheme;
local l_getRawComponentStyle_0 = v2.Style.getRawComponentStyle;
local l_ComponentSymbols_0 = v2.Style.ComponentSymbols;
local l_UI_0 = v2.UI;
local l_Box_0 = l_UI_0.Box;
local l_Image_0 = l_UI_0.Image;
local l_Colors_0 = v2.Style.Colors;
local l_Spritesheet_0 = l_Util_0.Spritesheet;
local l_EnableAssetManagerSortButton_0 = game:GetFastFlag("EnableAssetManagerSortButton");
local v15 = l_Spritesheet_0("rbxasset://textures/StudioSharedUI/arrowSpritesheet.png", {
    SpriteSize = 12,
    NumSprites = 4
});
local v16 = v15[2];
local v17 = v15[4];
local v18 = v15[1];
local v19 = v15[3];
l_ComponentSymbols_0:add("ListItem");
l_ComponentSymbols_0:add("Tile");
local v20 = {
    Background = l_Box_0,
    BackgroundStyle = {
        Color = l_StyleKey_0.MainBackground,
        BorderColor = l_StyleKey_0.Border,
        BorderSize = 1
    },
    Foreground = l_Image_0,
    ForegroundStyle = {
        Color = l_StyleKey_0.MainText
    },
    [l_StyleModifier_0.Hover] = {
        BackgroundStyle = {
            Color = l_StyleKey_0.ButtonHover,
            BorderColor = l_StyleKey_0.Border,
            BorderSize = 1
        }
    }
};
local v21 = {
    Color = l_StyleKey_0.MainTextDisabled
};
local v22 = l_join_0(v20.ForegroundStyle, v17, {
    Size = UDim2.new(0, 10, 0, 10),
    AnchorPoint = Vector2.new(0.5, 0.5),
    Position = UDim2.new(0.5, 0, 0.5, 0)
});
local v23 = l_join_0(v20.ForegroundStyle, v16, {
    Size = UDim2.new(0, 10, 0, 10),
    AnchorPoint = Vector2.new(0.5, 0.5),
    Position = UDim2.new(0.5, 0, 0.5, 0)
});
local v24 = {
    ["&AssetManagerButton"] = v20,
    ["&OverlayButton"] = l_join_0(v20, {
        ForegroundStyle = l_join_0(v20.ForegroundStyle, {
            Image = "rbxasset://textures/StudioSharedUI/menu.png"
        })
    }),
    ["&PreviousButton"] = l_join_0(v20, {
        ForegroundStyle = v22,
        [l_StyleModifier_0.Disabled] = {
            ForegroundStyle = l_join_0(v22, v21)
        }
    }),
    ["&NextButton"] = l_join_0(v20, {
        ForegroundStyle = v23,
        [l_StyleModifier_0.Disabled] = {
            ForegroundStyle = l_join_0(v23, v21)
        }
    }),
    ["&BulkImporterButton"] = l_join_0(v20, {
        ForegroundStyle = l_join_0(v20.ForegroundStyle, {
            Image = "rbxasset://textures/StudioSharedUI/import.png"
        })
    }),
    ["&TreeItemButton"] = l_join_0(v20, {
        TextSize = 16,
        TextColor = l_StyleKey_0.MainText,
        Font = Enum.Font.SourceSans,
        TextTruncate = Enum.TextTruncate.AtEnd,
        TextXAlignment = Enum.TextXAlignment.Left,
        TextYAlignment = Enum.TextYAlignment.Bottom,
        BackgroundStyle = l_join_0(v20.BackgroundStyle, {
            BorderSize = 0
        })
    }),
    ["&GridViewButton"] = l_join_0(v20, {
        ForegroundStyle = l_join_0(v20.ForegroundStyle, {
            Image = "rbxasset://textures/StudioSharedUI/grid.png"
        })
    }),
    ["&ListViewButton"] = l_join_0(v20, {
        ForegroundStyle = l_join_0(v20.ForegroundStyle, {
            Image = "rbxasset://textures/StudioSharedUI/list.png"
        })
    }),
    ["&SortButton"] = if not l_EnableAssetManagerSortButton_0 then nil else l_join_0(v20, {
        BackgroundStyle = l_join_0(v20.BackgroundStyle, {
            BorderSize = 0
        }),
        ForegroundStyle = l_join_0(v20.ForegroundStyle, {
            Image = "rbxasset://textures/StudioSharedUI/sort.png",
            Size = UDim2.new(0, 16, 0, 16),
            AnchorPoint = Vector2.new(0.5, 0.5),
            Position = UDim2.new(0.5, 0, 0.5, 0)
        }),
        [l_StyleModifier_0.Selected] = {
            BackgroundStyle = {
                Color = l_StyleKey_0.ButtonSelected
            }
        }
    })
};
local v25 = {
    Font = Enum.Font.SourceSans,
    TextSize = 16,
    EnableHover = true
};
local v26 = {
    BackgroundColor = l_StyleKey_0.MainBackground,
    ButtonColor = l_StyleKey_0.Button,
    ProgressBarColor = l_StyleKey_0.DialogMainButtonSelected,
    HoverColor = l_StyleKey_0.ButtonHover,
    BorderColor = l_StyleKey_0.Border,
    SubTextColor = l_StyleKey_0.SubText,
    InfoTextColor = l_StyleKey_0.DimmedText,
    TextColor = l_StyleKey_0.MainText,
    ErrorColor = l_StyleKey_0.ErrorText,
    LinkColor = l_StyleKey_0.LinkText,
    Green = Color3.fromRGB(64, 166, 81),
    White = Color3.fromRGB(255, 255, 255),
    DisabledColor = l_StyleKey_0.MainTextDisabled,
    ScrollbarTransparency = 0.7,
    ScrollbarSize = 8,
    Font = Enum.Font.SourceSans,
    FontBold = Enum.Font.SourceSansSemibold,
    FontSizeSmall = 14,
    FontSizeMedium = 16,
    FontSizeLarge = 18,
    AssetGridContainer = {
        CellPadding = UDim2.new(0, 4, 0, 6),
        LoadButton = {
            Offset = 125,
            PaddingX = 75,
            PaddingY = 15
        }
    },
    MainView = {
        ConfirmRemovePlaceDialogSize = Vector2.new(400, 50),
        PublishText = {
            Offset = 70,
            Width = 250
        },
        PublishButton = {
            Offset = 125,
            PaddingX = 75,
            PaddingY = 15
        }
    },
    NavBar = {
        BackgroundColor = l_StyleKey_0.Titlebar,
        ImageSize = 24,
        Padding = 12,
        Height = 38,
        TruncatedTextScale = 0.4
    },
    Overlay = {
        Background = {
            WidthScale = -0.25,
            Transparency = 0.75
        },
        Foreground = {
            WidthScale = 0.75
        },
        CloseButton = {
            Size = 16,
            Images = {
                Close = "rbxasset://textures/StudioSharedUI/close.png"
            }
        },
        Padding = {
            Right = 11
        }
    },
    TopBar = {
        Height = 24,
        Button = {
            Size = 24
        },
        Padding = 15,
        Tooltip = {
            TextSize = 14,
            Width = 210,
            Padding = 5
        }
    },
    RecentView = {
        ItemPadding = UDim.new(0, 6),
        Bar = {
            BackgroundColor = l_StyleKey_0.Titlebar,
            Height = 24,
            Padding = 10,
            Arrow = {
                Expanded = v19,
                Collapsed = v18,
                Color = l_StyleKey_0.MainText,
                Size = 9
            },
            Button = {
                Size = 24
            }
        }
    },
    TreeViewItem = {
        Height = 16,
        Indent = 20,
        Offset = 3,
        Padding = 5,
        ColorIcon = l_Colors_0.White,
        Arrow = {
            Expanded = v19,
            Collapsed = v16,
            Color = l_StyleKey_0.MainText,
            Size = 9
        }
    },
    [l_ComponentSymbols_0.Tile] = {
        Size = UDim2.new(0, 85, 0, 121),
        BackgroundTransparency = 1,
        AssetPreview = {
            Button = {
                Offset = 14
            },
            Image = "rbxasset://textures/StudioToolbox/AssetPreview/MAGNIFIER_PH.png"
        },
        Image = {
            FrameSize = UDim2.new(0, 69, 0, 69),
            ImageSize = UDim2.new(0, 32, 0, 32),
            Position = UDim2.new(0, 8, 0, 8),
            FolderPosition = UDim2.new(0.5, 0, 0.5, 0),
            FolderAnchorPosition = Vector2.new(0.5, 0.5),
            BackgroundColor = l_StyleKey_0.ScrollBarBackground,
            RBXThumbSize = 150,
            PlaceHolder = "rbxasset://textures/StudioSharedUI/TransparentWhiteImagePlaceholder.png",
            Folder = "rbxasset://textures/StudioSharedUI/folder.png",
            StartingPlace = {
                Size = 24,
                Icon = "rbxasset://textures/StudioSharedUI/spawn_withbg_24.png",
                XOffset = 8,
                YOffset = 37
            },
            ModerationStatus = {
                Size = 24,
                XOffset = 4,
                YOffset = 4,
                Rejected = "rbxasset://textures/StudioSharedUI/alert_error_withbg.png",
                Pending = l_StyleKey_0.TilePendingImage
            }
        },
        Text = {
            Color = l_StyleKey_0.MainText,
            Size = 16,
            TextTruncate = Enum.TextTruncate.AtEnd,
            XAlignment = Enum.TextXAlignment.Left,
            YAlignment = Enum.TextYAlignment.Top,
            BackgroundTransparency = 1,
            Frame = {
                Size = UDim2.new(0, 69, 0, 32),
                Position = UDim2.new(0, 8, 0, 81)
            }
        },
        EditText = {
            TextPadding = 10,
            TextWrapped = true,
            ClearTextOnFocus = false,
            XAlignment = Enum.TextXAlignment.Center,
            Frame = {
                BackgroundColor = l_StyleKey_0.InputFieldBackground,
                BorderColor = l_StyleKey_0.ButtonSelected
            }
        },
        [l_StyleModifier_0.Hover] = {
            BackgroundTransparency = 0,
            BackgroundColor = l_StyleKey_0.ButtonHover,
            AssetPreview = {
                Button = {
                    Offset = 14
                },
                Image = "rbxasset://textures/StudioToolbox/AssetPreview/MAGNIFIER_PH.png"
            }
        },
        [l_StyleModifier_0.Selected] = {
            BackgroundTransparency = 0,
            BackgroundColor = l_StyleKey_0.ItemSelected
        }
    },
    [l_ComponentSymbols_0.ListItem] = {
        Font = Enum.Font.SourceSans,
        Size = UDim2.new(1, 0, 0, 24),
        BackgroundTransparency = 1,
        Spacing = UDim.new(0, 4),
        Image = {
            FrameSize = UDim2.new(0, 24, 0, 24),
            ImageSize = UDim2.new(0, 20, 0, 20),
            ImagePosition = UDim2.new(0.5, 0, 0.5, 0),
            ImageAnchorPosition = Vector2.new(0.5, 0.5),
            BackgroundColor = l_StyleKey_0.MainBackground,
            RBXThumbSize = 150,
            Folder = "rbxasset://textures/StudioSharedUI/folder.png",
            ModerationStatus = {
                Rejected = "rbxasset://textures/StudioSharedUI/alert_error.png",
                Pending = l_StyleKey_0.ListItemPendingImage
            }
        },
        Text = {
            Color = l_StyleKey_0.MainText,
            Size = 16,
            TextTruncate = Enum.TextTruncate.AtEnd,
            XAlignment = Enum.TextXAlignment.Left,
            YAlignment = Enum.TextYAlignment.Center,
            BackgroundTransparency = 1,
            Frame = {
                Size = UDim2.new(1, -24, 0, 24),
                XOffset = -24,
                YOffset = 24,
                Padding = 10
            }
        },
        EditText = {
            TextPadding = 10,
            ClearTextOnFocus = false,
            XAlignment = Enum.TextXAlignment.Center,
            Frame = {
                BackgroundColor = l_StyleKey_0.InputFieldBackground,
                BorderColor = l_StyleKey_0.ButtonSelected
            }
        },
        [l_StyleModifier_0.Hover] = {
            BackgroundTransparency = 0,
            BackgroundColor = l_StyleKey_0.ButtonHover,
            Image = {
                BackgroundColor = l_StyleKey_0.ButtonHover
            }
        },
        [l_StyleModifier_0.Selected] = {
            BackgroundTransparency = 0,
            BackgroundColor = l_StyleKey_0.ItemSelected,
            Image = {
                BackgroundColor = l_StyleKey_0.ItemSelected
            }
        }
    },
    [l_ComponentSymbols_0.Button] = l_join_0(l_getRawComponentStyle_0("Button"), v24),
    [l_ComponentSymbols_0.DropdownMenu] = if not l_EnableAssetManagerSortButton_0 then nil else l_join_0(l_getRawComponentStyle_0("DropdownMenu"), {
        Width = 150,
        MaxHeight = 100,
        ItemHeight = 25,
        Text = {
            TextSize = 14
        }
    }),
    [l_ComponentSymbols_0.Image] = {
        ["&NavBarPathSeparator"] = l_join_0(v16, {
            Size = UDim2.new(0, 10, 0, 10),
            AnchorPoint = Vector2.new(0.5, 0.5),
            Position = UDim2.new(0.5, 0, 0.5, 0)
        })
    },
    [l_ComponentSymbols_0.LinkText] = l_join_0(l_getRawComponentStyle_0("LinkText"), {
        ["&AssetManagerDefault"] = v25,
        ["&BulkImporterTooltip"] = l_join_0(v25, {
            TextColor = l_StyleKey_0.LinkText
        }),
        ["&MainViewTooltip"] = l_join_0(v25, {
            TextColor = l_StyleKey_0.LinkText,
            ShowUnderline = false
        }),
        ["&NavBar"] = l_join_0(v25, {
            TextColor = l_StyleKey_0.DialogButtonText,
            ShowUnderline = false,
            [l_StyleModifier_0.Disabled] = {
                EnableHover = false
            }
        })
    })
};
local v27 = {
    [l_StyleKey_0.TilePendingImage] = "rbxasset://textures/StudioSharedUI/pending_withbg.png",
    [l_StyleKey_0.ListItemPendingImage] = "rbxasset://textures/StudioSharedUI/pending-dark.png"
};
local v28 = {
    [l_StyleKey_0.TilePendingImage] = "rbxasset://textures/StudioSharedUI/pending_withbg.png",
    [l_StyleKey_0.ListItemPendingImage] = "rbxasset://textures/StudioSharedUI/pending-light.png"
};
return function(v29)
    return ((if not v29 then l_StudioTheme_0.new(v27, v28) else l_StudioTheme_0.mock(v27, v28)):extend(v26));
end;


local v0 = {};
v0.__index = v0;
v0.new = function()
    local v1 = {};
    setmetatable(v1, v0);
    v1.eventCount = 0;
    v1.lastEvent = nil;
    v1.SendEventDeferred = function(v2, v3, v4, v5, v6)
        local v7 = {
            target = v3,
            ctx = v4,
            evt = v5
        };
        assert(type(v6) == "table", "expected table, argsTable was " .. type(v6));
        for v8, v9 in pairs(v6) do
            if v7[v8] ~= nil then
                warn("overriding base keyword " .. v8 .. "in via argsTable in SendEventDeferred().");
            end;
            v7[v8] = v9;
        end;
        v2.lastEvent = v7;
        v2.eventCount = v2.eventCount + 1;
    end;
    return v1;
end;
return v0;


local l_Signal_0 = require(script.Parent.Parent.Parent.Packages.Framework).Util.Signal;
local v1 = {};
v1.__index = v1;
v1.new = function()
    return (setmetatable({
        Origin = CFrame.new(),
        UnitRay = Ray.new(Vector3.new(), (Vector3.new())),
        Target = nil,
        WheelForward = l_Signal_0.new(),
        WheelBackward = l_Signal_0.new()
    }, v1));
end;
return v1;


local l_Signal_0 = require(script.Parent.Parent.Parent.Packages.Framework).Util.Signal;
local v1 = require(script.Parent.MockMouse);
local v2 = {};
v2.__index = v2;
v2.new = function()
    local v3 = {
        Name = "",
        Tooltip = "",
        Icon = "",
        Enabled = false,
        Click = l_Signal_0.new()
    };
    setmetatable(v3, v2);
    return v3;
end;
v2.SetActive = function(v4, v5)
    v4.Enabled = v5;
end;
local v6 = {};
v6.__index = v6;
v6.new = function(v7)
    local v8 = {
        Title = v7,
        Buttons = {}
    };
    setmetatable(v8, v6);
    return v8;
end;
v6.CreateButton = function(_, _, _, _)
    return v2.new();
end;
local v13 = {};
v13.__index = v13;
v13.__newindex = function(v14, v15, v16)
    if v15 == "_signals" then
        return ;
    else
        v14[v15] = v16;
        v14._signals[v15]:fire(v16);
        return ;
    end;
end;
v13.new = function(v17, v18)
    assert(type(v17) == "string", "DockWidgetPluginGui's title must be a string");
    assert(type(v18) == "table", "DockWidgetPluginGui's widgetInfo must be an array");
    assert(#v18 == 7, "Unexpected table provided for widgetInfo, expected an array");
    local v19 = {
        Name = "",
        Title = v17,
        ZIndexBehavior = Enum.ZIndexBehavior.Global,
        Enabled = true
    };
    local v20 = {};
    for v21, _ in pairs(v19) do
        v20[v21] = l_Signal_0.new();
    end;
    v19._signals = v20;
    setmetatable(v19, v13);
    return v19;
end;
v13.GetPropertyChangedSignal = function(v23, v24)
    assert(v24 ~= nil, "Need a property to observe changes");
    assert(v23[v24] ~= nil, "Could not find the key," .. tostring(v24) .. " please add it to the constructor");
    return v23._signals[v24];
end;
local v25 = {};
local v26 = {};
v26.__index = v26;
v26.new = function()
    local v27 = setmetatable({
        Name = "",
        Deactivation = l_Signal_0.new(),
        Unloading = l_Signal_0.new(),
        _activated = false,
        _activatedWithExclusiveMouse = false,
        _mouse = v1.new()
    }, v26);
    v25[v27] = true;
    return v27;
end;
v26.Destroy = function(v28)
    v25[v28] = nil;
end;
v26.CreateToolbar = function(_, v30)
    return v6.new(v30);
end;
v26.CreateDockWidgetPluginGui = function(_, v32, v33)
    return v13.new(v32, v33);
end;
v26.GetMouse = function(v34)
    return v34._mouse;
end;
v26.IsActivated = function(v35)
    return v35._activated;
end;
v26.IsActivatedWithExclusiveMouse = function(v36)
    return v36._activatedWithExclusiveMouse;
end;
v26.Activate = function(v37, v38)
    if not v37._activated then
        for v39, _ in pairs(v25) do
            if v39._activated then
                v39:Deactivate();
            end;
        end;
        v37._activated = true;
        v37._activatedWithExclusiveMouse = v38;
        return ;
    else
        return ;
    end;
end;
v26.Deactivate = function(v41)
    if v41._activated then
        v41._activated = false;
        v41._activatedWithExclusiveMouse = false;
        v41.Deactivation:fire();
        return ;
    else
        return ;
    end;
end;
return v26;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.Rodux);
local l_ContextServices_0 = require(l_Parent_0.Packages.Framework).ContextServices;
local v4 = require(l_Parent_0.Src.TestHelpers.MockPlugin);
local v5 = require(l_Parent_0.Src.Components.ServiceWrapper);
local v6 = require(l_Parent_0.Src.Reducers.MainReducer);
local l_Localization_0 = l_ContextServices_0.Localization;
local v8 = v1.Component:extend("MockServiceWrapper");
v8.getMockGlobals = function(v9)
    if not v9 then
        v9 = {};
    end;
    local v10 = v9.localization or l_Localization_0.mock();
    local v11 = v9.focusGui or Instance.new("ScreenGui");
    local v12 = v9.plugin or v4.new();
    return {
        focusGui = v11,
        plugin = v12,
        localization = v10,
        theme = v9.theme or require(l_Parent_0.Src.Resources.Theme)(true),
        mouse = v9.mouse or v12:GetMouse(),
        store = v2.Store.new(v6, v9.storeState, {
            v2.thunkMiddleware
        })
    };
end;
v8.render = function(v13)
    return v1.createElement(v5, v8.getMockGlobals(v13.props), v13.props[v1.Children]);
end;
return v8;


local v0 = {};
v0.__index = v0;
v0.new = function()
    return (setmetatable({
        _localUserId = 0
    }, v0));
end;
v0.GetUserId = function(v1)
    return v1._localUserId;
end;
return v0;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Src.Util.PreviewModelGetter);
local v2 = require(l_Parent_0.Src.Actions.SetRootTreeViewInstance);
return function(v3, v4)
    return function(v5)
        return v1(v3, v4):andThen(function(v6)
            if type(v6) == "string" then
                v5:dispatch(v2(v3, nil));
                return ;
            else
                v5:dispatch(v2(v3, v6));
                return ;
            end;
        end);
    end;
end;


local l_BulkImportService_0 = game:GetService("BulkImportService");
return function(v1)
    return function(_)
        local l_status_0, l_result_0 = pcall(function()
            l_BulkImportService_0:LaunchBulkImport(v1);
        end);
        if not l_status_0 then
            warn(l_result_0);
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Src.Actions.SetScreen);
local l_enableAudioImport_0 = require(l_Parent_0.Src.Util.AssetManagerUtilities).enableAudioImport;
local l_enableVideoImport_0 = require(l_Parent_0.Src.Util.AssetManagerUtilities).enableVideoImport;
local l_AssetManagerService_0 = game:GetService("AssetManagerService");
local l_SourceAssetIdInModelChildren_0 = game:GetFastFlag("SourceAssetIdInModelChildren");
return function(v6, v7, _)
    return function(v9)
        if not (v7.ClassName == "Folder") then
            local l_assetType_0 = v7.assetType;
            if l_assetType_0 == Enum.AssetType.Place then
                l_AssetManagerService_0:OpenPlace(v7.id);
            elseif l_assetType_0 == Enum.AssetType.Package then
                l_AssetManagerService_0:InsertPackage(v7.id);
            elseif l_assetType_0 == Enum.AssetType.Image then
                l_AssetManagerService_0:InsertImage(v7.id);
            elseif l_assetType_0 == Enum.AssetType.MeshPart then
                l_AssetManagerService_0:InsertMesh("Meshes/" .. v7.name, false, not l_SourceAssetIdInModelChildren_0 and -1 or v7.id);
            elseif l_enableAudioImport_0() and l_assetType_0 == Enum.AssetType.Audio then
                l_AssetManagerService_0:InsertAudio(v7.id, v7.name);
            elseif l_enableVideoImport_0() and l_assetType_0 == Enum.AssetType.Video then
                l_AssetManagerService_0:InsertVideo(v7.id, v7.name);
            elseif l_assetType_0 == Enum.AssetType.Model then
                l_AssetManagerService_0:InsertModel(v7.id);
            end;
            v6:report("doubleClickInsert");
            if utf8.len(v9:getState().AssetManagerReducer.searchTerm) ~= 0 then
                v6:report("insertAfterSearch");
            end;
            return ;
        else
            v6:report("openFolder", v7.Screen.Path);
            v9:dispatch(v1(v7.Screen));
            return ;
        end;
    end;
end;


local v0 = require(script.Parent.Parent.Parent.Packages.Promise);
return function(v1, v2, v3)
    return function(v4)
        if not (v2.ClassName == "Folder") then
            local l_id_0 = v2.id;
            local l_name_0 = v2.name;
            local l_assetType_0 = v2.assetType;
            local v8 = l_assetType_0 == Enum.AssetType.Package;
            if v8 then
                l_assetType_0 = Enum.AssetType.Model;
            end;
            v1:beginDragInsert(l_id_0, l_name_0, l_assetType_0, v8):andThen(function(_, _)
                v3:report("dragInsert");
                if utf8.len(v4:getState().AssetManagerReducer.searchTerm) ~= 0 then
                    v3:report("insertAfterSearch");
                end;
            end):catch(function(v11)
                warn(v11);
            end):finally(function(v12)
                if v12 == v0.Status.Cancelled then
                    v3:report("cancelDragInsert");
                end;
            end);
            return ;
        else
            warn("Cannot drag a folder");
            return ;
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Src.Actions.SetAssets);
local v2 = require(l_Parent_0.Src.Actions.SetEditingAssets);
local v3 = require(l_Parent_0.Src.Actions.SetScreen);
local v4 = require(l_Parent_0.Src.Actions.SetSelectedAssets);
local v5 = require(l_Parent_0.Src.Thunks.GetAssets);
local v6 = require(l_Parent_0.Src.Thunks.LaunchBulkImport);
local l_enableAudioImport_0 = require(l_Parent_0.Src.Util.AssetManagerUtilities).enableAudioImport;
local l_enableVideoImport_0 = require(l_Parent_0.Src.Util.AssetManagerUtilities).enableVideoImport;
local v9 = require(l_Parent_0.Src.Util.Screens);
local v10 = require(l_Parent_0.Src.Util.View);
local l_AssetManagerService_0 = game:GetService("AssetManagerService");
local l_HttpService_0 = game:GetService("HttpService");
local l_MemStorageService_0 = game:GetService("MemStorageService");
local l_RunService_0 = game:GetService("RunService");
local l_StudioService_0 = game:GetService("StudioService");
local l_NewPackageAnalyticsWithRefactor2_0 = game:GetFastFlag("NewPackageAnalyticsWithRefactor2");
local l_AssetManagerInsertMultipleImages_0 = game:GetFastFlag("AssetManagerInsertMultipleImages");
local l_SourceAssetIdInModelChildren_0 = game:GetFastFlag("SourceAssetIdInModelChildren");
local v19 = game:DefineFastFlag("AssetManagerInsertMeshCorrectly", false);
local function v27(v20, v21, v22, v23, v24)
    for _, v26 in pairs(v22) do
        if v23[v26.key] then
            if v26.assetType == Enum.AssetType.Place then
                l_AssetManagerService_0:RemovePlace(v26.id);
            elseif v26.assetType == Enum.AssetType.Image then
                l_AssetManagerService_0:DeleteAlias("Images/" .. v26.name);
            elseif v26.assetType == Enum.AssetType.MeshPart then
                l_AssetManagerService_0:DeleteAlias("Meshes/" .. v26.name);
            elseif l_enableAudioImport_0() and v26.assetType == Enum.AssetType.Audio then
                l_AssetManagerService_0:DeleteAlias("Audio/" .. v26.name);
            elseif l_enableVideoImport_0() and v26.assetType == Enum.AssetType.Video then
                l_AssetManagerService_0:DeleteAlias("Video/" .. v26.name);
            end;
        end;
    end;
    v24:dispatch(v4({}));
    v24:dispatch(v1({
        assets = {}
    }));
    v24:dispatch(v5(v20, v21.assetType));
end;
local function _(v28, v29, v30, v31, v32, v33)
    v28:AddNewAction("RenameAlias", v31:getText("ContextMenu", "RenameAlias")).Triggered:connect(function()
        v32();
        v33:dispatch(v2({
            [v30.id] = true
        }));
        v29:report("clickContextMenuItem");
    end);
end;
local function v40(v35, v36, v37, v38, v39)
    if l_RunService_0:IsEdit() then
        v35:AddNewAction("EditAsset", v38:getText("ContextMenu", "EditAsset")).Triggered:connect(function()
            l_MemStorageService_0:Fire("OpenAssetConfiguration", l_HttpService_0:JSONEncode({
                id = v37.id,
                assetType = v39
            }));
            v36:report("clickContextMenuItem");
        end);
    end;
end;
local function v51(v41, v42, v43, v44, v45, v46, v47, v48)
    local l_assets_0 = v48.AssetManagerReducer.assetsTable.assets;
    local l_selectedAssets_0 = v48.AssetManagerReducer.selectedAssets;
    v41:AddNewAction("RemoveFromGame", v45:getText("ContextMenu", "RemoveFromGame")).Triggered:connect(function()
        v27(v42, v44, l_assets_0, l_selectedAssets_0, v47);
        v46();
        v43:report("clickContextMenuItem");
    end);
end;
local function v60(v52, v53, v54, v55, v56, v57)
    v55:AddNewAction("OpenFolder", v56:getText("ContextMenu", "OpenFolder")).Triggered:connect(function()
        v57:dispatch(v3(v54.Screen));
        v52:report("clickContextMenuItem");
    end);
    if v54.Screen.Path == v9.IMAGES.Path then
        v55:AddNewAction("AddImages", v56:getText("ContextMenu", "AddImages")).Triggered:connect(function()
            v57:dispatch(v6(Enum.AssetType.Image.Value));
            v52:report("clickContextMenuItem");
        end);
    elseif l_enableAudioImport_0() and v54.Screen.Path == v9.AUDIO.Path then
        v55:AddNewAction("AddAudio", v56:getText("ContextMenu", "AddAudio")).Triggered:connect(function()
            v57:dispatch(v6(Enum.AssetType.Audio.Value));
            v52:report("clickContextMenuItem");
        end);
    elseif l_enableVideoImport_0() and v54.Screen.Path == v9.VIDEO.Path then
        v55:AddNewAction("AddVideo", v56:getText("ContextMenu", "AddVideo")).Triggered:connect(function()
            v57:dispatch(v6(Enum.AssetType.Video.Value));
            v52:report("clickContextMenuItem");
        end);
    elseif v54.Screen.Path == v9.MESHES.Path then
        v55:AddNewAction("AddMeshes", v56:getText("ContextMenu", "AddMeshes")).Triggered:connect(function()
            v57:dispatch(v6(Enum.AssetType.MeshPart.Value));
            v52:report("clickContextMenuItem");
        end);
    elseif v54.Screen.Path == v9.PLACES.Path then
        v55:AddNewAction("AddPlace", v56:getText("ContextMenu", "AddNewPlace")).Triggered:connect(function()
            local _, v59 = l_AssetManagerService_0:AddNewPlace();
            if not v59 then
                v57:dispatch(v1({
                    assets = {}
                }));
                if v57:getState().Screen.currentScreen.Path == v9.PLACES.Path then
                    v57:dispatch(v5(v53, v9.PLACES.AssetType));
                else
                    v57:dispatch(v3(v9.PLACES));
                end;
                v52:report("clickContextMenuItem");
                return ;
            else
                error(v59);
                return ;
            end;
        end);
    end;
    v55:ShowAsync();
    v55:Destroy();
end;
local function _(v61, v62, v63, v64, v65, v66, v67)
    local v68 = v67:getState();
    local l_assets_1 = v68.AssetManagerReducer.assetsTable.assets;
    local l_selectedAssets_1 = v68.AssetManagerReducer.selectedAssets;
    v64:AddNewAction("Rename", v65:getText("ContextMenu", "Rename")).Triggered:connect(function()
        v66();
        v67:dispatch(v2({
            [v63.id] = true
        }));
        v61:report("clickContextMenuItem");
    end);
    v64:AddNewAction("CopyIdToClipboard", v65:getText("ContextMenu", "CopyIdToClipboard")).Triggered:connect(function()
        l_StudioService_0:CopyToClipboard(v63.id);
        v61:report("clickContextMenuItem");
    end);
    v64:AddNewAction("ViewPlaceHistory", v65:getText("ContextMenu", "ViewPlaceHistory")).Triggered:connect(function()
        l_StudioService_0:ShowPlaceVersionHistoryDialog(v63.id);
        v61:report("clickContextMenuItem");
    end);
    if not v63.isRootPlace then
        v64:AddNewAction("RemoveFromGame", v65:getText("ContextMenu", "RemoveFromGame")).Triggered:connect(function()
            v27(v62, v63, l_assets_1, l_selectedAssets_1, v67);
            v61:report("clickContextMenuItem");
        end);
    end;
    v64:ShowAsync();
    v64:Destroy();
end;
local function v83(v72, v73, v74, v75, v76, v77, v78, v79)
    local v80 = v79:getState();
    local l_assets_2 = v80.AssetManagerReducer.assetsTable.assets;
    local l_selectedAssets_2 = v80.AssetManagerReducer.selectedAssets;
    v75:AddNewAction("Rename", v76:getText("ContextMenu", "Rename")).Triggered:connect(function()
        v77();
        v79:dispatch(v2({
            [v74.id] = true
        }));
        v72:report("clickContextMenuItem");
    end);
    v75:AddNewAction("CopyIdToClipboard", v76:getText("ContextMenu", "CopyIdToClipboard")).Triggered:connect(function()
        l_StudioService_0:CopyToClipboard(v74.id);
        v72:report("clickContextMenuItem");
    end);
    v75:AddNewAction("ViewPlaceHistory", v76:getText("ContextMenu", "ViewPlaceHistory")).Triggered:connect(function()
        l_StudioService_0:ShowPlaceVersionHistoryDialog(v74.id);
        v72:report("clickContextMenuItem");
    end);
    if not v74.isRootPlace then
        v75:AddNewAction("RemoveFromGame", v76:getText("ContextMenu", "RemoveFromGame")).Triggered:connect(function()
            v78();
            l_MemStorageService_0:Bind("RemovePlaceConfirmed", function()
                v27(v73, v74, l_assets_2, l_selectedAssets_2, v79);
            end);
            v72:report("clickContextMenuItem");
        end);
    end;
    v75:ShowAsync();
    v75:Destroy();
end;
local function v93(v84, v85, v86, v87, v88, v89, v90)
    local l_view_0 = v90:getState().AssetManagerReducer.view;
    local v92 = true;
    if v85.action ~= "Edit" then
        v92 = v85.action == "Own";
    end;
    if not (not (l_view_0.Key == v10.LIST.Key) or v87) then
        v86:AddNewAction("AssetPreview", v88:getText("ContextMenu", "AssetPreview")).Triggered:connect(function()
            v90:dispatch(v4({
                [v85.key] = true
            }));
            v89(v85);
        end);
    end;
    if l_RunService_0:IsEdit() then
        v86:AddNewAction("Insert", v88:getText("ContextMenu", "Insert")).Triggered:connect(function()
            l_AssetManagerService_0:InsertPackage(v85.id);
            v84:report("clickContextMenuItem");
            if utf8.len(v90:getState().AssetManagerReducer.searchTerm) ~= 0 then
                v84:report("insertAfterSearch");
            end;
        end);
    end;
    if l_RunService_0:IsEdit() then
        v86:AddNewAction("UpdateAll", v88:getText("ContextMenu", "UpdateAll")).Triggered:connect(function()
            l_AssetManagerService_0:UpdateAllPackages(v85.id);
            v84:report("clickContextMenuItem");
            if l_NewPackageAnalyticsWithRefactor2_0 then
                v84:report("massUpdateFromAssetManager");
            end;
        end);
    end;
    v86:AddNewAction("ViewOnWebsite", v88:getText("ContextMenu", "ViewOnWebsite")).Triggered:connect(function()
        l_AssetManagerService_0:ViewPackageOnWebsite(v85.id);
        v84:report("clickContextMenuItem");
    end);
    v86:AddNewAction("CopyIdToClipboard", v88:getText("ContextMenu", "CopyIdToClipboard")).Triggered:connect(function()
        l_StudioService_0:CopyToClipboard(v85.id);
        v84:report("clickContextMenuItem");
    end);
    if not (not l_RunService_0:IsEdit() or not v92) then
        v86:AddNewAction("PackageDetails", v88:getText("ContextMenu", "PackageDetails")).Triggered:connect(function()
            l_AssetManagerService_0:ShowPackageDetails(v85.id);
            v84:report("clickContextMenuItem");
        end);
    end;
    v86:ShowAsync();
    v86:Destroy();
end;
local function v109(v94, v95, v96, v97, v98, v99, v100, v101, v102)
    local v103 = v102:getState();
    if not (not (v103.AssetManagerReducer.view.Key == v10.LIST.Key) or v98) then
        v97:AddNewAction("AssetPreview", v99:getText("ContextMenu", "AssetPreview")).Triggered:connect(function()
            v102:dispatch(v4({
                [v96.key] = true
            }));
            v100(v96);
        end);
    end;
    v40(v97, v94, v96, v99, Enum.AssetType.Image.Value);
    v97:AddNewAction("RenameAlias", v99:getText("ContextMenu", "RenameAlias")).Triggered:connect(function()
        v101();
        v102:dispatch(v2({
            [v96.id] = true
        }));
        v94:report("clickContextMenuItem");
    end);
    v97:AddNewAction("Insert", v99:getText("ContextMenu", "Insert")).Triggered:connect(function()
        if not l_AssetManagerInsertMultipleImages_0 then
            l_AssetManagerService_0:InsertImage(v96.id);
        else
            local l_assets_3 = v103.AssetManagerReducer.assetsTable.assets;
            local l_selectedAssets_3 = v103.AssetManagerReducer.selectedAssets;
            if #l_selectedAssets_3 == 1 then
                l_AssetManagerService_0:InsertImage(v96.id);
            else
                local v106 = {};
                for _, v108 in pairs(l_assets_3) do
                    if l_selectedAssets_3[v108.layoutOrder] then
                        table.insert(v106, v108.id);
                    end;
                end;
                l_AssetManagerService_0:InsertImages(v106);
            end;
        end;
        v94:report("clickContextMenuItem");
        if utf8.len(v103.AssetManagerReducer.searchTerm) ~= 0 then
            v94:report("insertAfterSearch");
        end;
    end);
    v97:AddNewAction("CopyIdToClipboard", v99:getText("ContextMenu", "CopyIdToClipboard")).Triggered:connect(function()
        l_StudioService_0:CopyToClipboard("rbxassetid://" .. v96.id);
        v94:report("clickContextMenuItem");
    end);
    v51(v97, v95, v94, v96, v99, v101, v102, v103);
    v97:ShowAsync();
    v97:Destroy();
end;
local function v120(v110, v111, v112, v113, v114, v115, v116, v117, v118)
    local v119 = v118:getState();
    if not (not (v119.AssetManagerReducer.view.Key == v10.LIST.Key) or v114) then
        v113:AddNewAction("AssetPreview", v115:getText("ContextMenu", "AssetPreview")).Triggered:connect(function()
            v116(v112);
        end);
    end;
    v40(v113, v110, v112, v115, Enum.AssetType.Audio.Value);
    v113:AddNewAction("RenameAlias", v115:getText("ContextMenu", "RenameAlias")).Triggered:connect(function()
        v117();
        v118:dispatch(v2({
            [v112.id] = true
        }));
        v110:report("clickContextMenuItem");
    end);
    v113:AddNewAction("Insert", v115:getText("ContextMenu", "Insert")).Triggered:connect(function()
        l_AssetManagerService_0:InsertAudio(v112.id, v112.name);
        v110:report("clickContextMenuItem");
        if utf8.len(v119.AssetManagerReducer.searchTerm) ~= 0 then
            v110:report("insertAfterSearch");
        end;
    end);
    v113:AddNewAction("CopyIdToClipboard", v115:getText("ContextMenu", "CopyIdToClipboard")).Triggered:connect(function()
        l_StudioService_0:CopyToClipboard("rbxassetid://" .. v112.id);
        v110:report("clickContextMenuItem");
    end);
    v51(v113, v111, v110, v112, v115, v117, v118, v119);
    v113:ShowAsync();
    v113:Destroy();
end;
local function v131(v121, v122, v123, v124, v125, v126, v127, v128, v129)
    local v130 = v129:getState();
    if not (not (v130.AssetManagerReducer.view.Key == v10.LIST.Key) or v125) then
        v124:AddNewAction("AssetPreview", v126:getText("ContextMenu", "AssetPreview")).Triggered:connect(function()
            v127(v123);
        end);
    end;
    v40(v124, v121, v123, v126, Enum.AssetType.Video.Value);
    v124:AddNewAction("RenameAlias", v126:getText("ContextMenu", "RenameAlias")).Triggered:connect(function()
        v128();
        v129:dispatch(v2({
            [v123.id] = true
        }));
        v121:report("clickContextMenuItem");
    end);
    v124:AddNewAction("Insert", v126:getText("ContextMenu", "Insert")).Triggered:connect(function()
        l_AssetManagerService_0:InsertVideo(v123.id, v123.name);
        v121:report("clickContextMenuItem");
        if utf8.len(v130.AssetManagerReducer.searchTerm) ~= 0 then
            v121:report("insertAfterSearch");
        end;
    end);
    v124:AddNewAction("CopyIdToClipboard", v126:getText("ContextMenu", "CopyIdToClipboard")).Triggered:connect(function()
        l_StudioService_0:CopyToClipboard("rbxassetid://" .. v123.id);
        v121:report("clickContextMenuItem");
    end);
    v51(v124, v122, v121, v123, v126, v128, v129, v130);
    v124:ShowAsync();
    v124:Destroy();
end;
local function v155(v132, v133, v134, v135, v136, v137, v138, v139, v140)
    local v141 = v140:getState();
    local l_assets_4 = v141.AssetManagerReducer.assetsTable.assets;
    local l_selectedAssets_4 = v141.AssetManagerReducer.selectedAssets;
    local v144 = 0;
    for _, _ in pairs(l_selectedAssets_4) do
        v144 = v144 + 1;
    end;
    if not (not (v141.AssetManagerReducer.view.Key == v10.LIST.Key) or v136) then
        v135:AddNewAction("AssetPreview", v137:getText("ContextMenu", "AssetPreview")).Triggered:connect(function()
            v140:dispatch(v4({
                [v134.key] = true
            }));
            v138(v134);
        end);
    end;
    v40(v135, v132, v134, v137, Enum.AssetType.MeshPart.Value);
    v135:AddNewAction("RenameAlias", v137:getText("ContextMenu", "RenameAlias")).Triggered:connect(function()
        v139();
        v140:dispatch(v2({
            [v134.id] = true
        }));
        v132:report("clickContextMenuItem");
    end);
    if v144 == 1 then
        v135:AddNewAction("Insert", v137:getText("ContextMenu", "Insert")).Triggered:connect(function()
            l_AssetManagerService_0:InsertMesh("Meshes/" .. v134.name, false, not l_SourceAssetIdInModelChildren_0 and -1 or v134.id);
            v132:report("clickContextMenuItem");
            if utf8.len(v141.AssetManagerReducer.searchTerm) ~= 0 then
                v132:report("insertAfterSearch");
            end;
        end);
    end;
    v135:AddNewAction("InsertWithLocation", v137:getText("ContextMenu", "InsertWithLocation")).Triggered:connect(function()
        if v144 == 1 then
            if not v19 then
                l_AssetManagerService_0:InsertMesh("Meshes/" .. v134.name, false, not l_SourceAssetIdInModelChildren_0 and -1 or v134.id);
            else
                l_AssetManagerService_0:InsertMesh("Meshes/" .. v134.name, true, not l_SourceAssetIdInModelChildren_0 and -1 or v134.id);
            end;
        else
            local v147 = {};
            local v148 = {};
            for _, v150 in pairs(l_assets_4) do
                if l_selectedAssets_4[v150.layoutOrder] then
                    table.insert(v147, "Meshes/" .. v150.name);
                    if l_SourceAssetIdInModelChildren_0 then
                        table.insert(v148, v150.id);
                    end;
                end;
            end;
            l_AssetManagerService_0:InsertMeshesWithLocation(v147, if not l_SourceAssetIdInModelChildren_0 then {} else v148);
        end;
        v132:report("clickContextMenuItem");
        if utf8.len(v141.AssetManagerReducer.searchTerm) ~= 0 then
            v132:report("insertAfterSearch");
        end;
    end);
    local l_status_0, l_result_0 = pcall(l_AssetManagerService_0.GetMeshIdFromAliasName, l_AssetManagerService_0, "Meshes/" .. v134.name);
    local l_status_1, l_result_1 = pcall(l_AssetManagerService_0.GetTextureIdFromAliasName, l_AssetManagerService_0, "Meshes/" .. v134.name);
    if not l_status_0 then
        warn("Failed to get mesh id for asset id " .. v134.id);
    else
        v135:AddNewAction("CopyMeshIdToClipboard", v137:getText("ContextMenu", "CopyMeshIdToClipboard")).Triggered:connect(function()
            l_StudioService_0:CopyToClipboard(l_result_0);
            v132:report("clickContextMenuItem");
        end);
    end;
    if l_status_1 then
        v135:AddNewAction("CopyTextureIdToClipboard", v137:getText("ContextMenu", "CopyTextureIdToClipboard")).Triggered:connect(function()
            l_StudioService_0:CopyToClipboard(l_result_1);
            v132:report("clickContextMenuItem");
        end);
    end;
    v51(v135, v133, v132, v134, v137, v139, v140, v141);
    v135:ShowAsync();
    v135:Destroy();
end;
local function v166(v156, v157, v158, v159, v160, v161, v162, v163, v164)
    local v165 = v164:getState();
    if not (not (v165.AssetManagerReducer.view.Key == v10.LIST.Key) or v160) then
        v159:AddNewAction("AssetPreview", v161:getText("ContextMenu", "AssetPreview")).Triggered:connect(function()
            v164:dispatch(v4({
                [v158.key] = true
            }));
            v162(v158);
        end);
    end;
    v40(v159, v156, v158, v161, Enum.AssetType.Model.Value);
    v159:AddNewAction("RenameAlias", v161:getText("ContextMenu", "RenameAlias")).Triggered:connect(function()
        v163();
        v164:dispatch(v2({
            [v158.id] = true
        }));
        v156:report("clickContextMenuItem");
    end);
    v159:AddNewAction("Insert", v161:getText("ContextMenu", "Insert")).Triggered:connect(function()
        v156:report("clickContextMenuItem");
        l_AssetManagerService_0:InsertModel(v158.id);
        if utf8.len(v165.AssetManagerReducer.searchTerm) ~= 0 then
            v156:report("insertAfterSearch");
        end;
    end);
    v159:AddNewAction("CopyIdToClipboard", v161:getText("ContextMenu", "CopyIdToClipboard")).Triggered:connect(function()
        l_StudioService_0:CopyToClipboard("rbxassetid://" .. v158.id);
        v156:report("clickContextMenuItem");
    end);
    v51(v159, v157, v156, v158, v161, v163, v164, v165);
    v159:ShowAsync();
    v159:Destroy();
end;
local function v178(v167, v168, v169, v170, v171, v172, v173, v174, v175, v176)
    local l_assetType_0 = v169.assetType;
    if l_assetType_0 == Enum.AssetType.Place then
        v83(v167, v168, v169, v170, v172, v174, v175, v176);
        return ;
    elseif l_assetType_0 == Enum.AssetType.Package then
        v93(v167, v169, v170, v171, v172, v173, v176);
        return ;
    elseif l_assetType_0 == Enum.AssetType.Image then
        v109(v167, v168, v169, v170, v171, v172, v173, v174, v176);
        return ;
    elseif l_assetType_0 == Enum.AssetType.MeshPart then
        v155(v167, v168, v169, v170, v171, v172, v173, v174, v176);
        return ;
    elseif l_enableAudioImport_0() and l_assetType_0 == Enum.AssetType.Audio then
        v120(v167, v168, v169, v170, v171, v172, v173, v174, v176);
        return ;
    elseif l_enableVideoImport_0() and l_assetType_0 == Enum.AssetType.Video then
        v131(v167, v168, v169, v170, v171, v172, v173, v174, v176);
        return ;
    else
        if l_assetType_0 == Enum.AssetType.Model then
            v166(v167, v168, v169, v170, v171, v172, v173, v174, v176);
        end;
        return ;
    end;
end;
return function(v179)
    return function(v180)
        local l_Analytics_0 = v179.Analytics;
        local v182 = v179.API:get();
        local l_AssetData_0 = v179.AssetData;
        local l_IsAssetPreviewMenu_0 = v179.IsAssetPreviewMenu;
        local l_Localization_0 = v179.Localization;
        local v186 = v179.Plugin:get();
        local l_OnOpenAssetPreview_0 = v179.OnOpenAssetPreview;
        local l_OnAssetPreviewClose_0 = v179.OnAssetPreviewClose;
        local l_OnOpenConfirmRemovePlaceDialog_0 = v179.OnOpenConfirmRemovePlaceDialog;
        local l_v186_PluginMenu_0 = v186:CreatePluginMenu("AssetManagerContextMenu");
        if not (l_AssetData_0.ClassName == "Folder") then
            v178(l_Analytics_0, v182, l_AssetData_0, l_v186_PluginMenu_0, l_IsAssetPreviewMenu_0, l_Localization_0, l_OnOpenAssetPreview_0, l_OnAssetPreviewClose_0, l_OnOpenConfirmRemovePlaceDialog_0, v180);
            return ;
        else
            v60(l_Analytics_0, v182, l_AssetData_0, l_v186_PluginMenu_0, l_Localization_0, v180);
            return ;
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Cryo);
local v2 = require(l_Parent_0.Src.Actions.SetSelectionIndex);
local v3 = require(l_Parent_0.Src.Thunks.UpdateSelectedAssets);
return function(v4, v5)
    return function(v6)
        local v7 = nil;
        local v8 = nil;
        local v9 = false;
        local v10 = false;
        if v4 then
            v9 = v4:IsModifierKeyDown(Enum.ModifierKey.Ctrl);
            v10 = v4:IsModifierKeyDown(Enum.ModifierKey.Shift);
        end;
        local v11 = v6:getState();
        v7 = if v9 or v10 then v11.AssetManagerReducer.selectedAssets else {};
        if v10 then
            v8 = v11.AssetManagerReducer.selectionIndex;
        end;
        if not (v5.ClassName == "Folder") then
            local v12 = nil;
            v12 = not v7[v5.key] and true or (not v9 or false);
            if not v10 then
                v7 = v1.Dictionary.join(v7, {
                    [v5.key] = v12
                });
                v6:dispatch(v2(v5.key));
            elseif v5.key <= v8 then
                for v13 = v5.key, v8 do
                    v7 = v1.Dictionary.join(v7, {
                        [v13] = v12
                    });
                end;
            else
                for v14 = v8, v5.key do
                    v7 = v1.Dictionary.join(v7, {
                        [v14] = v12
                    });
                end;
            end;
        else
            local v15 = nil;
            v15 = not v7[v5.Screen.LayoutOrder] and true or (not v9 or false);
            if not v10 then
                v7 = v1.Dictionary.join(v7, {
                    [v5.Screen.LayoutOrder] = v15
                });
                v6:dispatch(v2(v5.Screen.LayoutOrder));
            elseif v5.Screen.LayoutOrder <= v8 then
                for v16 = v5.Screen.LayoutOrder, v8 do
                    v7 = v1.Dictionary.join(v7, {
                        [v16] = v15
                    });
                end;
            else
                for v17 = v8, v5.Screen.LayoutOrder do
                    v7 = v1.Dictionary.join(v7, {
                        [v17] = v15
                    });
                end;
            end;
        end;
        v6:dispatch(v3(v7));
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_enableAudioImport_0 = require(l_Parent_0.Src.Util.AssetManagerUtilities).enableAudioImport;
local l_enableVideoImport_0 = require(l_Parent_0.Src.Util.AssetManagerUtilities).enableVideoImport;
local l_AssetManagerService_0 = game:GetService("AssetManagerService");
local l_StudioService_0 = game:GetService("StudioService");
local l_AssetManagerInsertMultipleImages_0 = game:GetFastFlag("AssetManagerInsertMultipleImages");
local l_SourceAssetIdInModelChildren_0 = game:GetFastFlag("SourceAssetIdInModelChildren");
local function v15(v7)
    local v8 = v7:getState();
    local l_recentAssets_0 = v8.AssetManagerReducer.recentAssets;
    local l_selectedAssets_0 = v8.AssetManagerReducer.selectedAssets;
    local v11 = {};
    local v12 = {};
    for _, v14 in pairs(l_recentAssets_0) do
        if l_selectedAssets_0[v14.key] and v14.assetType == Enum.AssetType.MeshPart then
            table.insert(v11, "Meshes/" .. v14.name);
            table.insert(v12, v14.id);
        end;
    end;
    return v11, v12;
end;
local function v34(v16, _, v18, v19, v20, v21)
    v19:AddNewAction("Insert", v20:getText("ContextMenu", "Insert")).Triggered:connect(function()
        local v22 = v21:getState();
        local l_recentAssets_1 = v22.AssetManagerReducer.recentAssets;
        local l_selectedAssets_1 = v22.AssetManagerReducer.selectedAssets;
        local v25 = {};
        local v26 = {};
        if not l_SourceAssetIdInModelChildren_0 then
            for _, v28 in pairs(l_recentAssets_1) do
                if l_selectedAssets_1[v28.key] and v28.assetType == Enum.AssetType.MeshPart then
                    table.insert(v25, "Meshes/" .. v28.name);
                end;
            end;
        else
            local v29, v30 = v15(v21);
            v25 = v29;
            v26 = v30;
        end;
        if next(v25) ~= nil then
            l_AssetManagerService_0:InsertMeshesWithLocation(v25, if not l_SourceAssetIdInModelChildren_0 then {} else v26);
        end;
        if not l_AssetManagerInsertMultipleImages_0 then
            l_AssetManagerService_0:InsertImage(v18.id);
        else
            local v31 = {};
            for _, v33 in pairs(l_recentAssets_1) do
                if l_selectedAssets_1[v33.key] and v33.assetType == Enum.AssetType.Image then
                    table.insert(v31, v33.id);
                end;
            end;
            l_AssetManagerService_0:InsertImages(v31);
        end;
        v16:report("clickContextMenuItem");
    end);
    v19:AddNewAction("CopyIdToClipboard", v20:getText("ContextMenu", "CopyIdToClipboard")).Triggered:connect(function()
        l_StudioService_0:CopyToClipboard("rbxassetid://" .. v18.id);
        v16:report("clickContextMenuItem");
    end);
    v19:ShowAsync();
    v19:Destroy();
end;
local function v49(v35, v36, v37, v38, v39)
    v37:AddNewAction("Insert", v38:getText("ContextMenu", "Insert")).Triggered:connect(function()
        local v40 = v39:getState();
        local l_recentAssets_2 = v40.AssetManagerReducer.recentAssets;
        local l_selectedAssets_2 = v40.AssetManagerReducer.selectedAssets;
        local v43 = {};
        local v44 = {};
        if not l_SourceAssetIdInModelChildren_0 then
            for _, v46 in pairs(l_recentAssets_2) do
                if l_selectedAssets_2[v46.key] and v46.assetType == Enum.AssetType.MeshPart then
                    table.insert(v43, "Meshes/" .. v46.name);
                end;
            end;
        else
            local v47, v48 = v15(v39);
            v43 = v47;
            v44 = v48;
        end;
        if next(v43) ~= nil then
            l_AssetManagerService_0:InsertMeshesWithLocation(v43, if not l_SourceAssetIdInModelChildren_0 then {} else v44);
        end;
        l_AssetManagerService_0:InsertAudio(v36.id, v36.name);
        v35:report("clickContextMenuItem");
    end);
    v37:AddNewAction("CopyIdToClipboard", v38:getText("ContextMenu", "CopyIdToClipboard")).Triggered:connect(function()
        l_StudioService_0:CopyToClipboard("rbxassetid://" .. v36.id);
        v35:report("clickContextMenuItem");
    end);
    v37:ShowAsync();
    v37:Destroy();
end;
local function v64(v50, v51, v52, v53, v54)
    v52:AddNewAction("Insert", v53:getText("ContextMenu", "Insert")).Triggered:connect(function()
        local v55 = v54:getState();
        local l_recentAssets_3 = v55.AssetManagerReducer.recentAssets;
        local l_selectedAssets_3 = v55.AssetManagerReducer.selectedAssets;
        local v58 = {};
        local v59 = {};
        if not l_SourceAssetIdInModelChildren_0 then
            for _, v61 in pairs(l_recentAssets_3) do
                if l_selectedAssets_3[v61.key] and v61.assetType == Enum.AssetType.MeshPart then
                    table.insert(v58, "Meshes/" .. v61.name);
                end;
            end;
        else
            local v62, v63 = v15(v54);
            v58 = v62;
            v59 = v63;
        end;
        if next(v58) ~= nil then
            l_AssetManagerService_0:InsertMeshesWithLocation(v58, if not l_SourceAssetIdInModelChildren_0 then {} else v59);
        end;
        l_AssetManagerService_0:InsertVideo(v51.id, v51.name);
        v50:report("clickContextMenuItem");
    end);
    v52:AddNewAction("CopyIdToClipboard", v53:getText("ContextMenu", "CopyIdToClipboard")).Triggered:connect(function()
        l_StudioService_0:CopyToClipboard("rbxassetid://" .. v51.id);
        v50:report("clickContextMenuItem");
    end);
    v52:ShowAsync();
    v52:Destroy();
end;
local function v90(v65, _, v67, v68, v69, v70)
    local v71 = v70:getState();
    local l_recentAssets_4 = v71.AssetManagerReducer.recentAssets;
    local l_selectedAssets_4 = v71.AssetManagerReducer.selectedAssets;
    v68:AddNewAction("Insert", v69:getText("ContextMenu", "Insert")).Triggered:connect(function()
        local v74 = {};
        local v75 = {};
        if not l_SourceAssetIdInModelChildren_0 then
            for _, v77 in pairs(l_recentAssets_4) do
                if l_selectedAssets_4[v77.key] and v77.assetType == Enum.AssetType.MeshPart then
                    table.insert(v74, "Meshes/" .. v77.name);
                end;
            end;
        else
            local v78, v79 = v15(v70);
            v74 = v78;
            v75 = v79;
        end;
        if next(v74) ~= nil then
            l_AssetManagerService_0:InsertMeshesWithLocation(v74, if not l_SourceAssetIdInModelChildren_0 then {} else v75);
        end;
        v65:report("clickContextMenuItem");
    end);
    v68:AddNewAction("InsertWithLocation", v69:getText("ContextMenu", "InsertWithLocation")).Triggered:connect(function()
        local v80 = {};
        local v81 = {};
        if not l_SourceAssetIdInModelChildren_0 then
            for _, v83 in pairs(l_recentAssets_4) do
                if l_selectedAssets_4[v83.key] and v83.assetType == Enum.AssetType.MeshPart then
                    table.insert(v80, "Meshes/" .. v83.name);
                end;
            end;
        else
            local v84, v85 = v15(v70);
            v80 = v84;
            v81 = v85;
        end;
        if next(v80) ~= nil then
            l_AssetManagerService_0:InsertMeshesWithLocation(v80, if not l_SourceAssetIdInModelChildren_0 then {} else v81);
        end;
        v65:report("clickContextMenuItem");
        if utf8.len(v71.AssetManagerReducer.searchTerm) ~= 0 then
            v65:report("insertAfterSearch");
        end;
    end);
    local l_status_0, l_result_0 = pcall(l_AssetManagerService_0.GetMeshIdFromAliasName, l_AssetManagerService_0, "Meshes/" .. v67.name);
    local l_status_1, l_result_1 = pcall(l_AssetManagerService_0.GetTextureIdFromAliasName, l_AssetManagerService_0, "Meshes/" .. v67.name);
    if not l_status_0 then
        warn("Failed to get mesh id for asset id " .. v67.id);
    else
        v68:AddNewAction("CopyMeshIdToClipboard", v69:getText("ContextMenu", "CopyMeshIdToClipboard")).Triggered:connect(function()
            l_StudioService_0:CopyToClipboard(l_result_0);
            v65:report("clickContextMenuItem");
        end);
    end;
    if l_status_1 then
        v68:AddNewAction("CopyTextureIdToClipboard", v69:getText("ContextMenu", "CopyTextureIdToClipboard")).Triggered:connect(function()
            l_StudioService_0:CopyToClipboard(l_result_1);
            v65:report("clickContextMenuItem");
        end);
    end;
    v68:ShowAsync();
    v68:Destroy();
end;
local function v107(v91, _, v93, v94, v95, v96)
    local _ = v96:getState();
    v94:AddNewAction("Insert", v95:getText("ContextMenu", "Insert")).Triggered:connect(function()
        local v98 = v96:getState();
        local l_recentAssets_5 = v98.AssetManagerReducer.recentAssets;
        local l_selectedAssets_5 = v98.AssetManagerReducer.selectedAssets;
        local v101 = {};
        local v102 = {};
        if not l_SourceAssetIdInModelChildren_0 then
            for _, v104 in pairs(l_recentAssets_5) do
                if l_selectedAssets_5[v104.key] and v104.assetType == Enum.AssetType.MeshPart then
                    table.insert(v101, "Meshes/" .. v104.name);
                end;
            end;
        else
            local v105, v106 = v15(v96);
            v101 = v105;
            v102 = v106;
        end;
        if next(v101) ~= nil then
            l_AssetManagerService_0:InsertMeshesWithLocation(v101, if not l_SourceAssetIdInModelChildren_0 then {} else v102);
        end;
        l_AssetManagerService_0:InsertModel(v93.id);
        v91:report("clickContextMenuItem");
    end);
    v94:AddNewAction("CopyIdToClipboard", v95:getText("ContextMenu", "CopyIdToClipboard")).Triggered:connect(function()
        l_StudioService_0:CopyToClipboard("rbxassetid://" .. v93.id);
        v91:report("clickContextMenuItem");
    end);
    v94:ShowAsync();
    v94:Destroy();
end;
local function v115(v108, v109, v110, v111, v112, v113)
    local l_assetType_0 = v110.assetType;
    if l_assetType_0 == Enum.AssetType.Image then
        v34(v108, v109, v110, v111, v112, v113);
        return ;
    elseif l_assetType_0 == Enum.AssetType.MeshPart then
        v90(v108, v109, v110, v111, v112, v113);
        return ;
    elseif l_enableAudioImport_0() and l_assetType_0 == Enum.AssetType.Audio then
        v49(v108, v110, v111, v112, v113);
        return ;
    elseif l_enableVideoImport_0() and l_assetType_0 == Enum.AssetType.Video then
        v64(v108, v110, v111, v112, v113);
        return ;
    else
        if l_assetType_0 == Enum.AssetType.Model then
            v107(v108, v109, v110, v111, v112, v113);
        end;
        return ;
    end;
end;
return function(v116)
    return function(v117)
        v115(v116.Analytics, v116.API:get(), v116.AssetData, v116.Plugin:get():CreatePluginMenu("AssetManagerContextMenu"), v116.Localization, v117);
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Src.Actions.SetAssets);
local v2 = require(l_Parent_0.Src.Actions.SetAssetsModerationData);
local v3 = require(l_Parent_0.Src.Actions.SetIsFetchingAssets);
local v4 = require(l_Parent_0.Src.Actions.SetEditingAssets);
local v5 = require(l_Parent_0.Src.Actions.SetSelectedAssets);
local v6 = require(l_Parent_0.Src.Actions.SetSearchTerm);
local v7 = require(l_Parent_0.Src.Thunks.GetAssets);
local v8 = require(l_Parent_0.Src.Util.Screens);
return function(v9, v10)
    return function(v11)
        v11:dispatch(v1({
            assets = {}
        }));
        v11:dispatch(v2({}));
        v11:dispatch(v3(false));
        v11:dispatch(v4({}));
        v11:dispatch(v5({}));
        v11:dispatch(v6(""));
        if v10.Path ~= v8.MAIN.Path then
            v11:dispatch(v7(v9, v10.AssetType));
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_shallowEqual_0 = require(l_Parent_0.Packages.Framework).Dash.shallowEqual;
local v2 = require(l_Parent_0.Src.Actions.SetSelectedAssets);
return function(v3)
    return function(v4)
        if not l_shallowEqual_0(v3, v4:getState().AssetManagerReducer.selectedAssets) then
            v4:dispatch(v2(v3));
        end;
    end;
end;


local v0 = game:GetService("PluginPolicyService"):getPluginPolicy("AssetManager");
local v1 = require(script.Parent.hasInternalPermission);
local l_game_EngineFeature_0 = game:GetEngineFeature("EnableCustomVideoUploadLua");
local v3 = {
    shouldEnableAudioImport = function()
        return v0.EnableAudioImport;
    end
};
v3.enableAudioImport = function()
    return v3.shouldEnableAudioImport();
end;
v3.shouldEnableVideoImport = function()
    return l_game_EngineFeature_0 or v1();
end;
v3.enableVideoImport = function()
    return v3.shouldEnableVideoImport();
end;
v3.enableBadgesCallout = function()
    return v0.ShowBadges;
end;
return v3;


local l_Workspace_0 = game:GetService("Workspace");
local v1 = require(script.Parent.hasInternalPermission)();
local v2 = pcall(function()
    return game:GetService("ProcessService");
end);
local function _(v3, v4)
    v4 = v4 or false;
    return function()
        local l_AssetManagerFlags_0 = l_Workspace_0:FindFirstChild("AssetManagerFlags");
        if l_AssetManagerFlags_0 and l_AssetManagerFlags_0:FindFirstChild(v3) then
            return l_AssetManagerFlags_0[v3].Value;
        else
            return v4;
        end;
    end;
end;
local v7 = {};
local v8 = v2 or false;
local v9 = "RunningUnderCLI";
local l_v9_0 = v9 --[[ copy: 7 -> 8 ]];
local v11;
do
    local l_v8_0 = v8;
    v11 = function()
        local l_AssetManagerFlags_1 = l_Workspace_0:FindFirstChild("AssetManagerFlags");
        if l_AssetManagerFlags_1 and l_AssetManagerFlags_1:FindFirstChild(l_v9_0) then
            return l_AssetManagerFlags_1[l_v9_0].Value;
        else
            return l_v8_0;
        end;
    end;
end;
v7.RunningUnderCLI = v11;
v8 = false or false;
v9 = "RunTests";
local l_v9_1 = v9 --[[ copy: 7 -> 9 ]];
do
    local l_v8_1 = v8;
    v11 = function()
        local l_AssetManagerFlags_2 = l_Workspace_0:FindFirstChild("AssetManagerFlags");
        if l_AssetManagerFlags_2 and l_AssetManagerFlags_2:FindFirstChild(l_v9_1) then
            return l_AssetManagerFlags_2[l_v9_1].Value;
        else
            return l_v8_1;
        end;
    end;
end;
v7.RunTests = v11;
v8 = nil or false;
v9 = "LogTestsQuiet";
local l_v9_2 = v9 --[[ copy: 7 -> 10 ]];
do
    local l_v8_2 = v8;
    v11 = function()
        local l_AssetManagerFlags_3 = l_Workspace_0:FindFirstChild("AssetManagerFlags");
        if l_AssetManagerFlags_3 and l_AssetManagerFlags_3:FindFirstChild(l_v9_2) then
            return l_AssetManagerFlags_3[l_v9_2].Value;
        else
            return l_v8_2;
        end;
    end;
end;
v7.LogTestsQuiet = v11;
v8 = nil or false;
v9 = "LogAnalytics";
local l_v9_3 = v9 --[[ copy: 7 -> 11 ]];
do
    local l_v8_3 = v8;
    v11 = function()
        local l_AssetManagerFlags_4 = l_Workspace_0:FindFirstChild("AssetManagerFlags");
        if l_AssetManagerFlags_4 and l_AssetManagerFlags_4:FindFirstChild(l_v9_3) then
            return l_AssetManagerFlags_4[l_v9_3].Value;
        else
            return l_v8_3;
        end;
    end;
end;
v7.LogAnalytics = v11;
v8 = nil or false;
v9 = "RunDeveloperFrameworkTests";
local l_v9_4 = v9 --[[ copy: 7 -> 12 ]];
do
    local l_v8_4 = v8;
    v11 = function()
        local l_AssetManagerFlags_5 = l_Workspace_0:FindFirstChild("AssetManagerFlags");
        if l_AssetManagerFlags_5 and l_AssetManagerFlags_5:FindFirstChild(l_v9_4) then
            return l_AssetManagerFlags_5[l_v9_4].Value;
        else
            return l_v8_4;
        end;
    end;
end;
v7.RunDeveloperFrameworkTests = v11;
v8 = (v2 or v1) or false;
v9 = "EnableRoactConfigs";
do
    local l_v8_5 = v8;
    v11 = function()
        local l_AssetManagerFlags_6 = l_Workspace_0:FindFirstChild("AssetManagerFlags");
        if l_AssetManagerFlags_6 and l_AssetManagerFlags_6:FindFirstChild(v9) then
            return l_AssetManagerFlags_6[v9].Value;
        else
            return l_v8_5;
        end;
    end;
end;
v7.EnableRoactConfigs = v11;
return v7;