local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.Framework);
local v3 = require(l_Parent_0.Src.Components.TextOffset);
local v4 = require(l_Parent_0.Src.Util.Constants);
local v5 = require(l_Parent_0.Src.Util.Orientation);
local l_ContextServices_0 = v2.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_UI_0 = v2.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_TextLabel_0 = l_UI_0.TextLabel;
local v13 = v1.PureComponent:extend("TextEditor");
local v14 = v5.Left.rawValue();
local v15 = v5.Right.rawValue();
local v16 = v5.Top.rawValue();
local v17 = v5.Bottom.rawValue();
v13.createOffset = function(v18, v19)
    local l_props_0 = v18.props;
    local l_Localization_1 = l_props_0.Localization;
    local v22 = nil;
    local v23 = nil;
    if v19 == v14 then
        v22 = l_Localization_1:getText("TextEditor", "Left");
        v23 = 1;
    elseif v19 == v15 then
        v22 = l_Localization_1:getText("TextEditor", "Right");
        v23 = 2;
    elseif v19 == v16 then
        v22 = l_Localization_1:getText("TextEditor", "Top");
        v23 = 3;
    elseif v19 == v17 then
        v22 = l_Localization_1:getText("TextEditor", "Bottom");
        v23 = 4;
    end;
    return v1.createElement(v3, {
        orientation = v19,
        labelText = v22,
        sliceRect = l_props_0.sliceRect,
        setSliceRect = l_props_0.setSliceRect,
        pixelDimensions = l_props_0.pixelDimensions,
        layoutOrder = v23
    });
end;
v13.render = function(v24)
    local l_props_1 = v24.props;
    local l_Stylizer_0 = l_props_1.Stylizer;
    local l_Localization_2 = l_props_1.Localization;
    local l_size_0 = l_props_1.size;
    local v29 = l_Localization_2:getText("ImageEditor", "ImageSize");
    local l_pixelDimensions_0 = l_props_1.pixelDimensions;
    return v1.createElement(l_Pane_0, {
        Position = l_props_1.position,
        Size = l_size_0,
        Layout = Enum.FillDirection.Vertical,
        VerticalAlignment = Enum.VerticalAlignment.Bottom,
        HorizontalAlignment = Enum.HorizontalAlignment.Center,
        Spacing = l_Stylizer_0.OffsetItemSpacing,
        LayoutOrder = l_props_1.layoutOrder
    }, {
        OffsetLabel = v1.createElement(l_TextLabel_0, {
            AnchorPoint = Vector2.new(0.5, 0),
            Position = UDim2.fromScale(0.5, 0),
            Size = UDim2.new(1, 0, 0, v4.TEXTSIZE),
            Text = l_Localization_2:getText("TextEditor", "Offsets"),
            TextSize = v4.TEXTSIZE,
            TextXAlignment = Enum.TextXAlignment.Center
        }),
        LeftInput = v24:createOffset(v14),
        RightInput = v24:createOffset(v15),
        TopInput = v24:createOffset(v16),
        BottomInput = v24:createOffset(v17),
        PixelDimensionsText = v1.createElement(l_TextLabel_0, {
            Size = UDim2.new(1, 0, 0, l_Stylizer_0.PixelDimensionsHeightPx),
            Text = if not l_pixelDimensions_0 then l_Localization_2:getText("ImageEditor", "ImageSizeError") else v29 .. (":\n%d x %d px"):format(l_pixelDimensions_0.X, l_pixelDimensions_0.Y),
            TextSize = v4.TEXTSIZE,
            TextXAlignment = Enum.TextXAlignment.Center,
            TextYAlignment = Enum.TextYAlignment.Bottom,
            TextWrapped = true,
            LayoutOrder = 5
        })
    });
end;
return (l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_ContextServices_0.Stylizer
})(v13));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.Framework);
local v3 = require(l_Parent_0.Src.Util.Constants);
local v4 = require(l_Parent_0.Src.Util.Orientation);
local l_ContextServices_0 = v2.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_UI_0 = v2.UI;
local l_DEPRECATED_TextInput_0 = l_UI_0.DEPRECATED_TextInput;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_Pane_0 = l_UI_0.Pane;
local v13 = v1.PureComponent:extend("TextOffset");
local v14 = v4.Left.rawValue();
local v15 = v4.Right.rawValue();
local v16 = v4.Top.rawValue();
local v17 = v4.Bottom.rawValue();
local function v20(v18, v19)
    return {
        v18[v4.Left.rawValue()],
        v19.X - v18[v4.Right.rawValue()],
        v18[v4.Top.rawValue()],
        v19.Y - v18[v4.Bottom.rawValue()]
    };
end;
v13.init = function(v21, _)
    v21.onLeftFocusLost = function(_, v24)
        local l_sliceRect_0 = v21.props.sliceRect;
        local l_setSliceRect_0 = v21.props.setSliceRect;
        local v27 = v20(l_sliceRect_0, v21.props.pixelDimensions)[v14];
        local v28 = tonumber(v24.Text);
        if not v28 then
            v24.Text = ("%d"):format(v27);
            return ;
        else
            local v29 = math.round((math.clamp(v28, 0, l_sliceRect_0[v15])));
            l_setSliceRect_0({
                v29,
                l_sliceRect_0[v15],
                l_sliceRect_0[v16],
                l_sliceRect_0[v17]
            }, true);
            v24.Text = ("%d"):format(v29);
            return ;
        end;
    end;
    v21.onRightFocusLost = function(_, v31)
        local l_sliceRect_1 = v21.props.sliceRect;
        local l_setSliceRect_1 = v21.props.setSliceRect;
        local l_pixelDimensions_0 = v21.props.pixelDimensions;
        local v35 = v20(l_sliceRect_1, l_pixelDimensions_0)[v15];
        local v36 = tonumber(v31.Text);
        if not v36 then
            v31.Text = ("%d"):format(v35);
            return ;
        else
            local v37 = math.round((math.clamp(v36, 0, l_pixelDimensions_0.X - l_sliceRect_1[v14])));
            l_setSliceRect_1({
                l_sliceRect_1[v14],
                l_pixelDimensions_0.X - v37,
                l_sliceRect_1[v16],
                l_sliceRect_1[v17]
            }, true);
            v31.Text = ("%d"):format(v37);
            return ;
        end;
    end;
    v21.onTopFocusLost = function(_, v39)
        local l_sliceRect_2 = v21.props.sliceRect;
        local l_setSliceRect_2 = v21.props.setSliceRect;
        local v42 = v20(l_sliceRect_2, v21.props.pixelDimensions)[v16];
        local v43 = tonumber(v39.Text);
        if not v43 then
            v39.Text = ("%d"):format(v42);
            return ;
        else
            local v44 = math.round((math.clamp(v43, 0, l_sliceRect_2[v17])));
            l_setSliceRect_2({
                l_sliceRect_2[v14],
                l_sliceRect_2[v15],
                v44,
                l_sliceRect_2[v17]
            }, true);
            v39.Text = ("%d"):format(v44);
            return ;
        end;
    end;
    v21.onBottomFocusLost = function(_, v46)
        local l_sliceRect_3 = v21.props.sliceRect;
        local l_setSliceRect_3 = v21.props.setSliceRect;
        local l_pixelDimensions_1 = v21.props.pixelDimensions;
        local v50 = v20(l_sliceRect_3, l_pixelDimensions_1)[v17];
        local v51 = tonumber(v46.Text);
        if not v51 then
            v46.Text = ("%d"):format(v50);
            return ;
        else
            local v52 = math.round((math.clamp(v51, 0, l_pixelDimensions_1.Y - l_sliceRect_3[v16])));
            l_setSliceRect_3({
                l_sliceRect_3[v14],
                l_sliceRect_3[v15],
                l_sliceRect_3[v16],
                l_pixelDimensions_1.Y - v52
            }, true);
            v46.Text = ("%d"):format(v52);
            return ;
        end;
    end;
end;
v13.render = function(v53)
    local l_props_0 = v53.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_pixelDimensions_2 = l_props_0.pixelDimensions;
    local l_sliceRect_4 = l_props_0.sliceRect;
    local l_orientation_0 = l_props_0.orientation;
    local l_TextOffsetItem_0 = l_Stylizer_0.TextOffsetItem;
    local v60 = nil;
    local v61 = v20(l_sliceRect_4, l_pixelDimensions_2)[l_orientation_0];
    if l_orientation_0 == v14 then
        v60 = v53.onLeftFocusLost;
    elseif l_orientation_0 == v15 then
        v60 = v53.onRightFocusLost;
    elseif l_orientation_0 == v16 then
        v60 = v53.onTopFocusLost;
    elseif l_orientation_0 == v17 then
        v60 = v53.onBottomFocusLost;
    end;
    return v1.createElement(l_Pane_0, {
        Size = l_TextOffsetItem_0.PaneSize,
        LayoutOrder = l_props_0.layoutOrder or 0
    }, {
        Label = v1.createElement(l_TextLabel_0, {
            Position = UDim2.fromOffset(0, 0),
            Size = UDim2.new(0, l_TextOffsetItem_0.LabelXWidth, 1, 0),
            Text = l_props_0.labelText or "",
            TextSize = v3.TEXTSIZE,
            TextXAlignment = Enum.TextXAlignment.Right,
            TextYAlignment = Enum.TextYAlignment.Center
        }),
        TextInput = v1.createElement(l_DEPRECATED_TextInput_0, {
            Enabled = true,
            Size = l_TextOffsetItem_0.TextBoxSize,
            Position = UDim2.fromOffset(l_TextOffsetItem_0.LabelXWidth + l_TextOffsetItem_0.LabelTextBoxSpacing, 0),
            Style = l_TextOffsetItem_0.Style,
            Text = ("%d"):format(v61),
            TextXAlignment = Enum.TextXAlignment.Left,
            OnFocusLost = v60
        })
    });
end;
return (l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_ContextServices_0.Stylizer
})(v13));


local l_StudioFixPluginWidgetLocalizedIds_0 = game:GetFastFlag("StudioFixPluginWidgetLocalizedIds");
local l_Parent_0 = script.Parent.Parent;
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.Cryo);
local v4 = require(l_Parent_0.Packages.Framework);
local v5 = require(l_Parent_0.Src.Util.Constants);
local _ = require(l_Parent_0.Src.Types);
local l_ContextServices_0 = v4.ContextServices;
local l_Plugin_0 = l_ContextServices_0.Plugin;
local l_Mouse_0 = l_ContextServices_0.Mouse;
local v10 = require(l_Parent_0.Src.Resources.MakeTheme);
local l_SourceStrings_0 = l_Parent_0.Src.Resources.Localization.SourceStrings;
local l_LocalizedStrings_0 = l_Parent_0.Src.Resources.Localization.LocalizedStrings;
local v13 = require(l_Parent_0.Src.Components.SliceEditorMain);
local v14 = require(l_Parent_0.Src.Components.InstanceUnderEditManager);
local v15 = require(l_Parent_0.Src.Resources.AnalyticsHandlers);
local l_UI_0 = v4.UI;
local l_9SliceEditorAllowUnloadedImages_0 = game:GetFastFlag("9SliceEditorAllowUnloadedImages");
local l_DockWidget_0 = l_UI_0.DockWidget;
local v19 = v2.PureComponent:extend("MainPlugin");
v19.init = function(v20, _)
    v20.localization = l_ContextServices_0.Localization.new({
        stringResourceTable = l_SourceStrings_0,
        translationResourceTable = l_LocalizedStrings_0,
        pluginName = "9SliceEditor"
    });
    v20.analytics = nil;
    v20.analytics = l_ContextServices_0.Analytics.new(v15);
    v20.state = {
        enabled = false,
        pixelDimensions = Vector2.new(0, 0),
        sliceRect = {
            0,
            0,
            0,
            0
        },
        revertSliceRect = {
            0,
            0,
            0,
            0
        },
        imageRectSize = Vector2.new(),
        imageRectOffset = Vector2.new(),
        imageColor3 = Color3.new(),
        selectedInstance = nil,
        title = v20.localization:getText("Plugin", "Name"),
        loading = false
    };
    v20.timeOpened = nil;
    v20.reportOpen = function()
        v20.timeOpened = tick();
        v20.analytics:report("sliceEditorOpened");
    end;
    v20.reportClose = function()
        if v20.timeOpened then
            v20.analytics:report("sliceEditorOpenTime", tick() - v20.timeOpened);
        end;
    end;
    v20.onClose = function()
        if v20.state.enabled then
            v20.reportClose();
        end;
        v20:setState({
            enabled = false
        });
    end;
    v20.onInstanceUnderEditChanged = function(v22, v23)
        if not v20.state.enabled then
            v20.reportOpen();
        end;
        if v22 then
            v20.analytics:report("sliceEditorImageLoadedIntoEditor");
        end;
        v20:setState((v3.Dictionary.join({
            enabled = true,
            selectedInstance = v22 or v2.None
        }, v23)));
    end;
    v20.onSliceRectChanged = function(v24)
        v20:setState({
            sliceRect = v24
        });
    end;
    v20.onLoadingChanged = function(v25)
        v20:setState({
            loading = v25
        });
    end;
    v20.onInstancePropertyChanged = function(v26, v27)
        if v26 == "ImageRectOffset" then
            v20:setState({
                imageRectOffset = v27
            });
            return ;
        elseif v26 == "ImageRectSize" then
            v20:setState({
                imageRectSize = v27
            });
            return ;
        elseif v26 == "ImageColor3" then
            v20:setState({
                imageColor3 = v27
            });
            return ;
        else
            if v26 == "ResampleMode" then
                v20:setState({
                    resampleMode = v27
                });
            end;
            return ;
        end;
    end;
    if l_9SliceEditorAllowUnloadedImages_0 then
        v20.loadingImageRef = v2.createRef();
    end;
    v20.onRequestToLoadImage = function(v28)
        v20:setState({
            contentIdToLoad = v28
        });
    end;
end;
v19.willUnmount = function(v29)
    if v29.state.enabled then
        v29.reportClose();
    end;
end;
v19.render = function(v30)
    local l_props_0 = v30.props;
    local l_state_0 = v30.state;
    local l_Plugin_1 = l_props_0.Plugin;
    local l_enabled_0 = l_state_0.enabled;
    return l_ContextServices_0.provide({
        l_Plugin_0.new(l_Plugin_1),
        l_Mouse_0.new(l_Plugin_1:getMouse()),
        v10(),
        v30.localization,
        v30.analytics
    }, {
        InstanceUnderEditManager = v2.createElement(v14, {
            WidgetEnabled = l_enabled_0,
            InstanceUnderEditChanged = v30.onInstanceUnderEditChanged,
            InstancePropertyChanged = v30.onInstancePropertyChanged,
            SliceRectChanged = v30.onSliceRectChanged,
            LoadingChanged = v30.onLoadingChanged,
            InitialEditorInstanceRequest = l_props_0.InitialEditorInstanceRequest,
            RequestToLoadImage = v30.onRequestToLoadImage,
            LoadingImageRef = v30.loadingImageRef
        }),
        MainWidget = v2.createElement(l_DockWidget_0, {
            Id = if not l_StudioFixPluginWidgetLocalizedIds_0 then nil else "SliceEditor",
            Enabled = l_enabled_0,
            Title = l_state_0.title,
            InitialDockState = Enum.InitialDockState.Float,
            ZIndexBehavior = Enum.ZIndexBehavior.Global,
            Size = v5.WIDGET_SIZE,
            MinSize = v5.WIDGET_SIZE,
            OnClose = v30.onClose,
            ShouldRestore = false
        }, {
            SliceEditor = l_enabled_0 and v2.createElement(v13, {
                onClose = v30.onClose,
                pixelDimensions = l_state_0.pixelDimensions,
                selectedObject = l_state_0.selectedInstance,
                sliceRect = l_state_0.sliceRect,
                revertSliceRect = l_state_0.revertSliceRect,
                loading = l_state_0.loading,
                imageRectSize = l_state_0.imageRectSize,
                imageRectOffset = l_state_0.imageRectOffset,
                imageColor3 = l_state_0.imageColor3,
                resampleMode = l_state_0.resampleMode,
                contentIdToLoad = l_state_0.contentIdToLoad,
                loadingImageRef = v30.loadingImageRef
            })
        })
    });
end;
return v19;


local l_game_FastInt_0 = game:GetFastInt("9SliceEditorAnalyticsReportingHundrethsPercent");
return function(v1)
    local v2 = Random.new();
    local function _()
        return v2:NextNumber() < l_game_FastInt_0 / 10000;
    end;
    local function _(v4)
        if v2:NextNumber() < l_game_FastInt_0 / 10000 then
            v1:ReportCounter(v4, 1);
        end;
    end;
    local function _(v6, v7)
        if v2:NextNumber() < l_game_FastInt_0 / 10000 then
            v1:ReportStats(v6, v7);
        end;
    end;
    return {
        sliceEditorOpened = function()
            if v2:NextNumber() < l_game_FastInt_0 / 10000 then
                v1:ReportCounter("Studio9SliceEditorOpened", 1);
            end;
        end,
        sliceEditorImageLoadedIntoEditor = function()
            if v2:NextNumber() < l_game_FastInt_0 / 10000 then
                v1:ReportCounter("Studio9SliceEditorImageLoadedIntoEditor", 1);
            end;
        end,
        sliceEditorOpenTime = function(_, v10)
            if v2:NextNumber() < l_game_FastInt_0 / 10000 then
                v1:ReportStats("Studio9SliceEditorOpenTime", v10);
            end;
        end
    };
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Style_0 = require(l_Parent_0.Packages.Framework).Style;
local l_StudioTheme_0 = l_Style_0.Themes.StudioTheme;
local l_ComponentSymbols_0 = l_Style_0.ComponentSymbols;
local l_StyleKey_0 = l_Style_0.StyleKey;
local v5 = require(l_Parent_0.Src.Util.Constants);
l_ComponentSymbols_0:add("AlertDialog");
l_ComponentSymbols_0:add("ImageDragger");
l_ComponentSymbols_0:add("SliceEditor");
l_ComponentSymbols_0:add("TextEditor");
l_ComponentSymbols_0:add("ImageEditor");
local v6 = {
    [l_StyleKey_0.SubtleBackgroundColor] = Color3.fromRGB(40, 40, 40)
};
local v7 = {
    [l_StyleKey_0.SubtleBackgroundColor] = Color3.fromRGB(249, 249, 249)
};
local v8 = {
    Button = {
        Size = UDim2.fromOffset(75, 28),
        Style = "Round"
    },
    [l_ComponentSymbols_0.TextEditor] = {
        OffsetItemSpacing = UDim.new(0, 7),
        PixelDimensionsHeightPx = 40
    },
    TextOffsetItem = {
        PaneSize = UDim2.fromOffset(110, 20),
        LabelXWidth = 50,
        TextBoxSize = UDim2.fromOffset(50, 20),
        LabelTextBoxSpacing = 10,
        Style = "RoundedBorder"
    },
    [l_ComponentSymbols_0.AlertDialog] = {
        PopupMessageSize = Vector2.new(400, 60),
        TextSize = 18
    },
    [l_ComponentSymbols_0.ImageDragger] = {
        EdgeHandleSize = UDim2.fromOffset(30, 28),
        EdgeHandleInsetPx = 2
    },
    [l_ComponentSymbols_0.ImageEditor] = {
        PaneBackgroundColor = l_StyleKey_0.SubtleBackgroundColor,
        PaneBorderColor = l_StyleKey_0.Border
    },
    [l_ComponentSymbols_0.SliceEditor] = {
        TextAreaSize = UDim2.fromOffset(v5.TEXTEDITOR_XSIZE, v5.TEXTEDITOR_YSIZE + 60),
        ImageAreaSize = UDim2.fromOffset((v5.BACKGROUND_SIZE + 10) + v5.TEXTEDITOR_XSIZE, (v5.BACKGROUND_SIZE + v5.TEXTSIZE) + 10),
        ButtonsAreaSize = UDim2.fromOffset(((v5.BACKGROUND_SIZE + 10) + v5.TEXTEDITOR_XSIZE) + 10, 42),
        ButtonsSpacing = UDim.new(0, 10),
        VerticalSpacing = UDim.new(0, 5),
        HorizontalSpacing = UDim.new(0, 5),
        InfoBoxSize = UDim2.fromOffset(300, 200),
        PaddingPx = 2,
        TextAreaXWindowScaleFactor = 0.05
    }
};
return function(v9)
    local _ = nil;
    return (if not v9 then l_StudioTheme_0.new(v6, v7) else l_StudioTheme_0.mock(v6, v7)):extend(v8);
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local l_ContextServices_0 = require(l_Parent_0.Packages.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local v6 = require(l_Parent_0.Src.Util.SliceRectUtil);
local v7 = require(l_Parent_0.Src.Components.SliceEditorMain);
local v8 = v1.PureComponent:extend("SliceEditorTestWrapper");
v8.init = function(v9, v10)
    v9.state = {
        sliceRect = v10.sliceRect
    };
end;
v8.didMount = function(v11)
    local l_selectedObject_0 = v11.props.selectedObject;
    v11.sliceCenterChangedSignal = l_selectedObject_0:GetPropertyChangedSignal("SliceCenter"):Connect(function()
        v11:setState({
            sliceRect = v6.getSliceRectFromSliceCenter(l_selectedObject_0.SliceCenter)
        });
    end);
end;
v8.willUnmount = function(v13)
    if v13.sliceCenterChangedSignal then
        v13.sliceCenterChangedSignal:Disconnect();
        v13.sliceCenterChangedSignal = nil;
    end;
end;
v8.render = function(v14)
    local l_props_0 = v14.props;
    return v1.createElement(v7, {
        selectedObject = l_props_0.selectedObject,
        pixelDimensions = l_props_0.pixelDimensions,
        onClose = function()
        end,
        sliceRect = v14.state.sliceRect,
        revertSliceRect = l_props_0.sliceRect
    });
end;
return (l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_ContextServices_0.Stylizer,
    Mouse = l_ContextServices_0.Mouse
})(v8));


local v0 = {
    WIDGET_SIZE = Vector2.new(330, 255),
    BUTTON_FROMEDGE_PADDING = 20,
    BUTTON_FROMCENTER_PADDING = 5,
    BACKGROUND_SIZE = 180,
    IMAGE_SIZE = 150,
    BACKGROUND_FROMEDGE_PADDING = 40,
    BACKGROUND_TILE_SIZE = 20,
    PIXEL_TOP_PADDING = 5
};
v0.PIXEL_YPOSITION = v0.BACKGROUND_SIZE + v0.PIXEL_TOP_PADDING;
v0.IMAGE_PREVIEW_WINDOW_PADDING = 18;
v0.DRAGGER_WIDTH = 9;
v0.DRAGGER_HEIGHT = 180;
v0.DRAGGER_WIDTH_V2 = 8;
v0.DRAGGER_CLICK_WINDOW_WIDTH = 16;
v0.DRAGGER_CENTER_INSETPX = 1;
v0.DRAGGER_HANDLE_SIZE = 16;
v0.IMAGES = {
    BACKGROUND_GRID = "rbxasset://textures/9SliceEditor/" .. "GridPattern.png",
    HORIZONTAL_DRAGGER = "rbxasset://textures/9SliceEditor/" .. "HorizontalDragger.png",
    VERTICAL_DRAGGER = "rbxasset://textures/9SliceEditor/" .. "VerticalDragger.png",
    DRAGGER_V2 = {
        LEFT = {
            NORMAL = "rbxasset://textures/9SliceEditor/" .. "Dragger2Left.png",
            OUTLINED = "rbxasset://textures/9SliceEditor/" .. "Dragger2OutlinedLeft.png"
        },
        RIGHT = {
            NORMAL = "rbxasset://textures/9SliceEditor/" .. "Dragger2Right.png",
            OUTLINED = "rbxasset://textures/9SliceEditor/" .. "Dragger2OutlinedRight.png"
        },
        TOP = {
            NORMAL = "rbxasset://textures/9SliceEditor/" .. "Dragger2Top.png",
            OUTLINED = "rbxasset://textures/9SliceEditor/" .. "Dragger2OutlinedTop.png"
        },
        BOTTOM = {
            NORMAL = "rbxasset://textures/9SliceEditor/" .. "Dragger2Bottom.png",
            OUTLINED = "rbxasset://textures/9SliceEditor/" .. "Dragger2OutlinedBottom.png"
        }
    }
};
v0.MOUSE_CURSORS = {
    EW = "rbxasset://SystemCursors/SizeEW",
    NS = "rbxasset://SystemCursors/SizeNS",
    NONE = ""
};
v0.TEXTIMAGE_PADDING = 70;
v0.TEXTEDITOR_YOFFSET = 116;
v0.TEXTEDITOR_XOFFSET = (v0.BACKGROUND_SIZE + v0.BACKGROUND_FROMEDGE_PADDING) + v0.TEXTIMAGE_PADDING;
v0.TEXTEDITOR_XSIZE = 110;
v0.TEXTEDITOR_YSIZE = 140;
v0.TEXTSIZE = 18;
v0.TEXTINPUT_PADDING = 8;
v0.LEFTINPUT_YPOSITION = 24;
v0.RIGHTINPUT_YPOSITION = (v0.LEFTINPUT_YPOSITION + 20) + v0.TEXTINPUT_PADDING;
v0.TOPINPUT_YPOSITION = (v0.RIGHTINPUT_YPOSITION + 20) + v0.TEXTINPUT_PADDING;
v0.BOTTOMINPUT_YPOSITION = (v0.TOPINPUT_YPOSITION + 20) + v0.TEXTINPUT_PADDING;
v0.TEXTLABEL_PADDING = 2;
v0.LEFTLABEL_YPOSITION = v0.LEFTINPUT_YPOSITION + v0.TEXTLABEL_PADDING;
v0.RIGHTLABEL_YPOSITION = v0.RIGHTINPUT_YPOSITION + v0.TEXTLABEL_PADDING;
v0.TOPLABEL_YPOSITION = v0.TOPINPUT_YPOSITION + v0.TEXTLABEL_PADDING;
v0.BOTTOMLABEL_YPOSITION = v0.BOTTOMINPUT_YPOSITION + v0.TEXTLABEL_PADDING;
return v0;


local l_Workspace_0 = game:GetService("Workspace");
local l_9SliceEditorShorterLoadTime_0 = game:GetFastFlag("9SliceEditorShorterLoadTime");
local l_status_0, l_result_0 = pcall(function()
    return game:GetService("StudioService"):HasInternalPermission();
end);
local function _(v4, v5)
    v5 = v5 or false;
    return function()
        local l_9SliceEditorFlags_0 = l_Workspace_0:FindFirstChild("9SliceEditorFlags");
        if l_9SliceEditorFlags_0 and l_9SliceEditorFlags_0:FindFirstChild(v4) then
            return l_9SliceEditorFlags_0[v4].Value;
        else
            return v5;
        end;
    end;
end;
local v8 = {};
local v9 = nil or false;
local v10 = "RunningUnderCLI";
local l_v10_0 = v10 --[[ copy: 8 -> 9 ]];
local v12;
do
    local l_v9_0 = v9;
    v12 = function()
        local l_9SliceEditorFlags_1 = l_Workspace_0:FindFirstChild("9SliceEditorFlags");
        if l_9SliceEditorFlags_1 and l_9SliceEditorFlags_1:FindFirstChild(l_v10_0) then
            return l_9SliceEditorFlags_1[l_v10_0].Value;
        else
            return l_v9_0;
        end;
    end;
end;
v8.RunningUnderCLI = v12;
v9 = false or false;
v10 = "RunTests";
local l_v10_1 = v10 --[[ copy: 8 -> 10 ]];
do
    local l_v9_1 = v9;
    v12 = function()
        local l_9SliceEditorFlags_2 = l_Workspace_0:FindFirstChild("9SliceEditorFlags");
        if l_9SliceEditorFlags_2 and l_9SliceEditorFlags_2:FindFirstChild(l_v10_1) then
            return l_9SliceEditorFlags_2[l_v10_1].Value;
        else
            return l_v9_1;
        end;
    end;
end;
v8.RunTests = v12;
v9 = nil or false;
v10 = "LogTestsQuiet";
local l_v10_2 = v10 --[[ copy: 8 -> 11 ]];
do
    local l_v9_2 = v9;
    v12 = function()
        local l_9SliceEditorFlags_3 = l_Workspace_0:FindFirstChild("9SliceEditorFlags");
        if l_9SliceEditorFlags_3 and l_9SliceEditorFlags_3:FindFirstChild(l_v10_2) then
            return l_9SliceEditorFlags_3[l_v10_2].Value;
        else
            return l_v9_2;
        end;
    end;
end;
v8.LogTestsQuiet = v12;
v9 = nil or false;
v10 = "LogAnalytics";
local l_v10_3 = v10 --[[ copy: 8 -> 12 ]];
do
    local l_v9_3 = v9;
    v12 = function()
        local l_9SliceEditorFlags_4 = l_Workspace_0:FindFirstChild("9SliceEditorFlags");
        if l_9SliceEditorFlags_4 and l_9SliceEditorFlags_4:FindFirstChild(l_v10_3) then
            return l_9SliceEditorFlags_4[l_v10_3].Value;
        else
            return l_v9_3;
        end;
    end;
end;
v8.LogAnalytics = v12;
v9 = nil or false;
v10 = "RunDeveloperFrameworkTests";
local l_v10_4 = v10 --[[ copy: 8 -> 13 ]];
do
    local l_v9_4 = v9;
    v12 = function()
        local l_9SliceEditorFlags_5 = l_Workspace_0:FindFirstChild("9SliceEditorFlags");
        if l_9SliceEditorFlags_5 and l_9SliceEditorFlags_5:FindFirstChild(l_v10_4) then
            return l_9SliceEditorFlags_5[l_v10_4].Value;
        else
            return l_v9_4;
        end;
    end;
end;
v8.RunDeveloperFrameworkTests = v12;
v9 = if not l_9SliceEditorShorterLoadTime_0 then l_status_0 and l_result_0 else nil or false;
v10 = "EnableRoactConfigs";
local l_v10_5 = v10 --[[ copy: 8 -> 14 ]];
do
    local l_v9_5 = v9;
    v12 = function()
        local l_9SliceEditorFlags_6 = l_Workspace_0:FindFirstChild("9SliceEditorFlags");
        if l_9SliceEditorFlags_6 and l_9SliceEditorFlags_6:FindFirstChild(l_v10_5) then
            return l_9SliceEditorFlags_6[l_v10_5].Value;
        else
            return l_v9_5;
        end;
    end;
end;
v8.EnableRoactConfigs = v12;
if l_9SliceEditorShorterLoadTime_0 then
    v9 = nil or false;
    v10 = "EnableDeveloperTools";
    do
        local l_v9_6 = v9;
        v12 = function()
            local l_9SliceEditorFlags_7 = l_Workspace_0:FindFirstChild("9SliceEditorFlags");
            if l_9SliceEditorFlags_7 and l_9SliceEditorFlags_7:FindFirstChild(v10) then
                return l_9SliceEditorFlags_7[v10].Value;
            else
                return l_v9_6;
            end;
        end;
    end;
    v8.EnableDeveloperTools = v12;
end;
return v8;


local v0 = {};
local v1 = nil;
local v2 = false;
v0.updateMouse = function(v3)
    local v4 = v1 or "rbxasset://SystemCursors/Arrow";
    assert(v3);
    local v5 = v3:get();
    if v5 then
        v5.Icon = v4;
    end;
end;
v0.setCursor = function(v6, v7)
    v1 = v7;
    if not v2 then
        v0.updateMouse(v6);
    end;
end;
v0.resetCursor = function(v8)
    v0.setCursor(v8, nil);
end;
v0.setLocked = function(v9, v10)
    v2 = v10;
    if not v10 then
        v0.updateMouse(v9);
    end;
end;
return v0;


return (require(script.Parent.Parent.Parent.Packages.Framework).Util.enumerate("Orientation", {
    Undefined = 0,
    Left = 1,
    Right = 2,
    Top = 3,
    Bottom = 4
}));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Src.Util.Orientation);
local _ = require(l_Parent_0.Src.Types);
local v3 = require(l_Parent_0.Packages.Cryo);
local v4 = {};
local v5 = v1.Left.rawValue();
local v6 = v1.Right.rawValue();
local v7 = v1.Top.rawValue();
local v8 = v1.Bottom.rawValue();
v4.getSliceRectFromSliceCenter = function(v9)
    return {
        v9.Min.X,
        v9.Max.X,
        v9.Min.Y,
        v9.Max.Y
    };
end;
v4.getSliceCenterFromSliceRect = function(v10)
    return Rect.new(v10[v5], v10[v7], v10[v6], v10[v8]);
end;
v4.copySliceRect = function(v11)
    return v3.Dictionary.join(v11);
end;
v4.getOffsetsFromSliceRect = function(v12, v13)
    return {
        v12[v5],
        v13.X - v12[v6],
        v12[v7],
        v13.Y - v12[v8]
    };
end;
v4.getSliceRectFromOffsets = function(v14, v15)
    return {
        v14[v5],
        v15.X - v14[v6],
        v14[v7],
        v15.Y - v14[v8]
    };
end;
return v4;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Src.Util.Orientation);
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Src.Util.mockContext);
local v4 = require(l_Parent_0.Packages.Cryo);
local l_RunService_0 = game:GetService("RunService");
local v25 = {
    withTestComponent = function(v6, v7, v8)
        local l_9SliceEditorMockGui_0 = game.CoreGui:FindFirstChild("9SliceEditorMockGui");
        if l_9SliceEditorMockGui_0 then
            l_9SliceEditorMockGui_0:Destroy();
        end;
        local l_ScreenGui_0 = Instance.new("ScreenGui");
        l_ScreenGui_0.Name = "9SliceEditorMockGui";
        l_ScreenGui_0.Parent = game.CoreGui;
        local v11 = v2.mount(v3(v2.createElement(v6, v7)), l_ScreenGui_0);
        v8(l_ScreenGui_0, function(v12)
            v2.update(v11, v3(v2.createElement(v6, v4.Dictionary.join(v7, v12))));
        end);
        v2.unmount(v11);
        l_ScreenGui_0.Parent = nil;
        l_ScreenGui_0:Destroy();
    end,
    numericalArrayFuzzyEquality = function(v13, v14, v15)
        if #v13 ~= #v14 then
            return false;
        else
            v15 = v15 or 1.0E-4;
            for v16 = 1, #v13 do
                if not (type(v13[v16]) == "number") or type(v14[v16]) ~= "number" then
                    return false;
                elseif v15 < math.abs(v13[v16] - v14[v16]) then
                    return false;
                end;
            end;
            return true;
        end;
    end,
    waitForHeartbeat = function(v17)
        v17 = v17 or 10;
        local v18 = 0;
        local v19 = l_RunService_0.Heartbeat:Connect(function()
            v18 = v18 + 1;
        end);
        local v20 = tick();
        while tick() < v20 + v17 and v18 < 10 do
            wait();
        end;
        v19:Disconnect();
    end,
    findFirstDescendantWhichIsA = function(v21, v22)
        for _, v24 in ipairs((v21:GetDescendants())) do
            if v24.ClassName == v22 then
                return v24;
            end;
        end;
        return nil;
    end
};
local v26 = v1.Left.rawValue();
local v27 = v1.Right.rawValue();
local v28 = v1.Top.rawValue();
local v29 = v1.Bottom.rawValue();
v25.getOffsetsFromSliceRect = function(v30, v31)
    return {
        v30[v26],
        v31.x - v30[v27],
        v30[v28],
        v31.y - v30[v29]
    };
end;
v25.getSliceRectFromOffsets = function(v32, v33)
    return {
        v32[v26],
        v33.x - v32[v27],
        v32[v28],
        v33.y - v32[v29]
    };
end;
v25.getSliceRectFromSliceCenterRect = function(v34)
    return {
        v34.Min.X,
        v34.Max.X,
        v34.Min.Y,
        v34.Max.Y
    };
end;
v25.getSliceCenterRectFromSliceRect = function(v35)
    return Rect.new(v35[v26], v35[v28], v35[v27], v35[v29]);
end;
return v25;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local l_TestHelpers_0 = v1.TestHelpers;
local l_ContextServices_0 = v1.ContextServices;
local v4 = {
    l_ContextServices_0.Analytics.mock(),
    l_ContextServices_0.Localization.mock(),
    require(l_Parent_0.Src.Resources.MakeTheme)(true)
};
return function(v5)
    assert(type(v5) == "table", "Expected story to be a table");
    return l_TestHelpers_0.provideMockContext(v4, v5);
end;


return function(v0, v1)
    local l_Parent_0 = script.Parent.Parent;
    local v3 = require(l_Parent_0.Src.Flags.getFFlagAlignToolRoactInspector);
    local v4 = require(l_Parent_0.Packages.Roact);
    local v5 = require(l_Parent_0.Packages.Rodux);
    local v6 = require(l_Parent_0.Packages.Framework);
    local l_ContextServices_0 = v6.ContextServices;
    local l_Analytics_0 = l_ContextServices_0.Analytics;
    local l_Localization_0 = l_ContextServices_0.Localization;
    local l_Mouse_0 = l_ContextServices_0.Mouse;
    local l_Store_0 = l_ContextServices_0.Store;
    local v12 = require(l_Parent_0.Src.Components.AlignmentToolPlugin);
    local v13 = require(l_Parent_0.Src.Reducers.MainReducer);
    local v14 = require(l_Parent_0.Src.Resources.MakeTheme);
    local v15 = require(l_Parent_0.Src.Resources.AnalyticsHandlers);
    local v16 = l_Localization_0.new({
        pluginName = "AlignmentTool",
        stringResourceTable = l_Parent_0.Src.Resources.Localization.SourceStrings,
        translationResourceTable = l_Parent_0.Src.Resources.Localization.LocalizedStrings
    });
    local v17 = v5.Store.new(v13, nil, {
        v5.thunkMiddleware
    });
    local v18 = require(l_Parent_0.Src.Utility.CalloutController).new();
    v18:defineCallout("AlignToolCallout", v16:getText("Callout", "Title"), v16:getText("Callout", "Description"), "https://developer.roblox.com/en-us/resources/studio/Align-Tool");
    local v19 = nil;
    if not (not v3() or not game:GetService("StudioService"):HasInternalPermission()) then
        v19 = v6.DeveloperTools.forPlugin(l_Parent_0.Name, v0);
        v4.setGlobalConfig({
            elementTracing = true
        });
    end;
    (function()
        local v20 = nil;
        local function v21()
            if v19 then
                v19:destroy();
                v19 = nil;
            end;
            if v20 then
                v4.unmount(v20);
                v20 = nil;
            end;
        end;
        v20 = v4.mount((l_ContextServices_0.provide({
            l_ContextServices_0.Plugin.new(v0),
            v16,
            v14(),
            l_Mouse_0.new(v0:GetMouse()),
            l_Store_0.new(v17),
            l_Analytics_0.new(v15),
            v18
        }, {
            AlignTool = v4.createElement(v12, {
                pluginLoaderContext = v1
            })
        })));
        if v19 then
            v19:addRoactTree("Roact tree", v20);
        end;
        v0.Unloading:Connect(v21);
    end)();
end;


return {
    PluginLoader = require(script.PluginLoader),
    PluginLoaderBuilder = require(script.PluginLoaderBuilder)
};


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0, v1)
    assert(type(v0) == "boolean", "Expected enabled to be a boolean");
    local v2 = true;
    if type(v1) ~= "table" then
        v2 = v1 == nil;
    end;
    assert(v2, "Expected reason to be a table or nil");
    return {
        alignEnabled = v0,
        disabledReason = v1 or {}
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    assert(type(v0) == "table", "Expected objects to be a table");
    return {
        alignableObjects = v0 or {}
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    assert(type(v0) == "string", "Expected alignmentMode to be a string");
    return {
        alignmentMode = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    assert(type(v0) == "string", "Expected alignmentSpace to be a string");
    return {
        alignmentSpace = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    assert(type(v0) == "table", "Expected axes to be a table");
    assert(type(v0.X) == "boolean", "Expected X to be a boolean");
    assert(type(v0.Y) == "boolean", "Expected Y to be a boolean");
    assert(type(v0.Z) == "boolean", "Expected Z to be a boolean");
    return {
        enabledAxes = {
            X = v0.X,
            Y = v0.Y,
            Z = v0.Z
        }
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    assert(type(v0) == "boolean", "Expected visible to be a boolean");
    return {
        visible = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    assert(type(v0) == "string", "Expected relativeTo to be a string");
    return {
        relativeTo = v0
    };
end);


return require(script.Parent.Parent.Parent.Packages.Framework).Util.Action(script.Name, function(v0)
    assert(type(v0) == "boolean", "Expected enabled to be a boolean");
    return {
        toolEnabled = v0
    };
end);


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Selection_0 = game:GetService("Selection");
local l_CoreGui_0 = game:GetService("CoreGui");
local v3 = require(l_Parent_0.Packages.Roact);
local v4 = require(l_Parent_0.Packages.RoactRodux);
local v5 = require(l_Parent_0.Src.Utility.renderAlignObjectsPreview);
local v6 = require(l_Parent_0.Src.Utility.RelativeTo);
local v7 = v3.PureComponent:extend("AlignObjectsPreview");
v7.render = function(v8)
    local l_props_0 = v8.props;
    local v10 = nil;
    if l_props_0.relativeTo == v6.Active then
        v10 = l_Selection_0.ActiveInstance;
    end;
    return v3.createElement(v3.Portal, {
        target = l_CoreGui_0
    }, {
        AlignToolPreviewUI = v3.createElement("Folder", {}, {
            Elements = v5(l_props_0.objects, l_props_0.space, l_props_0.axes, l_props_0.mode, v10)
        })
    });
end;
return v4.connect(function(v11, _)
    return {
        objects = v11.alignableObjects,
        mode = v11.alignmentMode,
        space = v11.alignmentSpace,
        axes = v11.enabledAxes,
        relativeTo = v11.relativeTo,
        alignEnabled = v11.alignEnabled
    };
end, nil)(v7);


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.RoactRodux);
local l_ContextServices_0 = require(l_Parent_0.Packages.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v5 = require(l_Parent_0.Src.Actions.SetAlignmentMode);
local v6 = require(l_Parent_0.Src.Actions.SetAlignmentSpace);
local v7 = require(l_Parent_0.Src.Actions.SetEnabledAxes);
local v8 = require(l_Parent_0.Src.Actions.SetRelativeTo);
local v9 = require(l_Parent_0.Src.Components.AxesSettingsFragment);
local v10 = require(l_Parent_0.Src.Components.ModeSetting);
local v11 = require(l_Parent_0.Src.Components.LabeledElementList);
local v12 = require(l_Parent_0.Src.Components.RelativeToSetting);
local v13 = require(l_Parent_0.Src.Thunks.UpdateActiveInstanceHighlight);
local v14 = require(l_Parent_0.Src.Thunks.UpdateAlignEnabled);
local v15 = v1.PureComponent:extend("AlignmentSettings");
v15.render = function(v16)
    local l_props_0 = v16.props;
    local l_Localization_0 = l_props_0.Localization;
    return v1.createElement(v11, {
        Collapsible = true,
        Items = {
            {
                Text = l_Localization_0:getText("ModeSection", "Title"),
                TextYAlignment = Enum.TextYAlignment.Center,
                Content = v1.createElement(v10, {
                    Value = l_props_0.alignmentMode,
                    OnValueChanged = l_props_0.setAlignmentMode
                })
            },
            {
                Text = l_Localization_0:getText("AxesSection", "Title"),
                Content = v1.createElement(v9, {
                    AlignmentSpace = l_props_0.alignmentSpace,
                    EnabledAxes = l_props_0.enabledAxes,
                    OnAlignmentSpaceChanged = l_props_0.setAlignmentSpace,
                    OnEnabledAxesChanged = l_props_0.setEnabledAxes
                })
            },
            {
                Text = l_Localization_0:getText("RelativeToSection", "Title"),
                Content = v1.createElement(v12, {
                    Value = l_props_0.relativeTo,
                    OnValueChanged = l_props_0.setRelativeTo
                })
            }
        },
        LayoutOrder = l_props_0.LayoutOrder,
        MaximumLabelWidth = l_props_0.Stylizer.MaximumLabelWidth
    });
end;
return v2.connect(function(v19, _)
    return {
        alignmentMode = v19.alignmentMode,
        alignmentSpace = v19.alignmentSpace,
        enabledAxes = v19.enabledAxes,
        relativeTo = v19.relativeTo
    };
end, function(v21)
    return {
        setAlignmentMode = function(v22)
            v21(v5(v22));
            v21(v14());
        end,
        setAlignmentSpace = function(v23)
            v21(v6(v23));
            v21(v14());
        end,
        setEnabledAxes = function(v24)
            v21(v7(v24));
            v21(v14());
        end,
        setRelativeTo = function(v25)
            v21(v8(v25));
            v21(v14());
            v21(v13());
        end
    };
end)((l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer
})(v15)));


local l_StudioFixPluginWidgetLocalizedIds_0 = game:GetFastFlag("StudioFixPluginWidgetLocalizedIds");
local l_Parent_0 = script.Parent.Parent.Parent;
local v2 = require(l_Parent_0.Packages.Framework);
local v3 = require(l_Parent_0.Packages.Roact);
local v4 = require(l_Parent_0.Packages.RoactRodux);
local l_ContextServices_0 = v2.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_DockWidget_0 = v2.UI.DockWidget;
local v8 = require(l_Parent_0.Src.Actions.SetToolEnabled);
local v9 = require(l_Parent_0.Src.Thunks.UpdateActiveInstanceHighlight);
local v10 = require(l_Parent_0.Src.Components.MainView);
local v11 = require(l_Parent_0.Src.Components.HoverPreviewEnabler);
local v12 = Vector2.new(300, 250);
local v13 = Vector2.new(175, 250);
local v14 = v3.PureComponent:extend("AlignmentToolPlugin");
v14.init = function(v15)
    v15._hasOpenedThisSession = false;
    v15.toggleState = function()
        v15.setToolEnabled(not v15.props.toolEnabled, true);
    end;
    v15.onClose = function()
        v15.setToolEnabled(false, true);
    end;
    v15.onRestore = function(v16)
        v15.setToolEnabled(v16, false);
    end;
    v15.onDockWidgetCreated = function()
        v15.props.pluginLoaderContext.mainButtonClickedSignal:Connect(v15.toggleState);
    end;
    v15.onDockWidgetEnabledChanged = function(v17)
        v15.setToolEnabled(v17.Enabled, true);
    end;
    v15.setToolEnabled = function(v18, v19)
        local l_props_0 = v15.props;
        l_props_0.setToolEnabled(v18);
        if not v18 then
            if v19 then
                l_props_0.Analytics:report("alignToolClose");
            end;
        else
            if v19 then
                l_props_0.Analytics:report("alignToolOpen");
            end;
            if not v15._hasOpenedThisSession then
                l_props_0.Analytics:report("alignToolImpression");
                v15._hasOpenedThisSession = true;
                return ;
            end;
        end;
    end;
end;
v14._renderDockWidgetContents = function(_, v22)
    if not v22 then
        return nil;
    else
        return v3.createElement(v11, {}, {
            MainView = v3.createElement(v10)
        });
    end;
end;
v14.didUpdate = function(v23)
    v23.props.pluginLoaderContext.mainButton:SetActive(v23.props.toolEnabled);
end;
v14.render = function(v24)
    local l_props_1 = v24.props;
    local l_Localization_0 = l_props_1.Localization;
    local l_toolEnabled_0 = l_props_1.toolEnabled;
    return v3.createFragment({
        MainWidget = v3.createElement(l_DockWidget_0, {
            Id = if not l_StudioFixPluginWidgetLocalizedIds_0 then nil else "AlignmentTool",
            Enabled = l_toolEnabled_0,
            Widget = l_props_1.pluginLoaderContext.mainDockWidget,
            Title = l_Localization_0:getText("Plugin", "WindowTitle"),
            ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
            InitialDockState = Enum.InitialDockState.Left,
            Size = v12,
            MinSize = v13,
            OnClose = v24.onClose,
            ShouldRestore = true,
            OnWidgetRestored = v24.onRestore,
            OnWidgetCreated = v24.onDockWidgetCreated,
            [v3.Change.Enabled] = v24.onDockWidgetEnabledChanged
        }, {
            DockWidgetContent = v24:_renderDockWidgetContents(l_toolEnabled_0)
        })
    });
end;
return v4.connect(function(v28, _)
    return {
        toolEnabled = v28.toolEnabled
    };
end, function(v30)
    return {
        setToolEnabled = function(v31)
            v30(v8(v31));
            v30(v9());
        end
    };
end)((l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Analytics = l_ContextServices_0.Analytics
})(v14)));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Dash);
local l_FitFrameOnAxis_0 = require(l_Parent_0.Packages.FitFrame).FitFrameOnAxis;
local v3 = require(l_Parent_0.Packages.Roact);
local v4 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_UI_0 = v4.UI;
local l_Checkbox_0 = l_UI_0.Checkbox;
local l_RadioButton_0 = l_UI_0.RadioButton;
local l_LayoutOrderIterator_0 = v4.Util.LayoutOrderIterator;
local v11 = require(l_Parent_0.Src.Utility.AlignmentSpace);
local l_join_0 = v1.join;
local v13 = v3.PureComponent:extend("AxesSettingsFragment");
v13.init = function(v14, v15)
    assert(type(v15.AlignmentSpace) == "string", "Missing required property AlignmentSpace.");
    assert(type(v15.EnabledAxes) == "table", "Missing required property EnabledAxes.");
    assert(type(v15.OnAlignmentSpaceChanged) == "function", "Missing required property OnAlignmentSpaceChanged.");
    assert(type(v15.OnEnabledAxesChanged) == "function", "Missing required property OnEnabledAxesChanged.");
    v14.setAlignmentSpace = function(v16)
        local l_props_0 = v14.props;
        if l_props_0.OnAlignmentSpaceChanged then
            l_props_0.OnAlignmentSpaceChanged(v16);
        end;
    end;
    v14.toggleAxis = function(v18)
        local l_props_1 = v14.props;
        if l_props_1.OnEnabledAxesChanged then
            l_props_1.OnEnabledAxesChanged((l_join_0(l_props_1.EnabledAxes, {
                [v18] = not l_props_1.EnabledAxes[v18]
            })));
        end;
    end;
end;
v13.render = function(v20)
    local l_props_2 = v20.props;
    local l_EnabledAxes_0 = l_props_2.EnabledAxes;
    local l_Localization_0 = l_props_2.Localization;
    local l_Stylizer_0 = l_props_2.Stylizer;
    local v25 = l_LayoutOrderIterator_0.new();
    local v26 = {};
    for _, v28 in ipairs({
        "X",
        "Y",
        "Z"
    }) do
        v26[v28] = v3.createElement(l_Checkbox_0, {
            Key = v28,
            Checked = not not l_EnabledAxes_0 and (l_EnabledAxes_0[v28] or false),
            Disabled = false,
            LayoutOrder = v25:getNextOrder(),
            Text = l_Localization_0:getText("AxesSettingsFragment", v28),
            OnClick = v20.toggleAxis
        });
    end;
    local function v31(v29, v30)
        return v3.createElement(l_RadioButton_0, {
            Disabled = false,
            Key = v29,
            LayoutOrder = v30,
            Selected = l_props_2.AlignmentSpace == v29,
            Text = l_Localization_0:getText("AxesSettingsFragment", v29),
            OnClick = v20.setAlignmentSpace
        });
    end;
    return v3.createFragment({
        AlignmentSpaceButtons = v3.createElement(l_FitFrameOnAxis_0, {
            axis = l_FitFrameOnAxis_0.Axis.Both,
            contentPadding = l_Stylizer_0.SectionContentPadding,
            BackgroundTransparency = 1,
            FillDirection = Enum.FillDirection.Horizontal,
            LayoutOrder = 1
        }, {
            WorldSpaceButton = v31(v11.World, 1),
            LocalSpaceButton = v31(v11.Local, 2)
        }),
        AxisCheckboxes = v3.createElement(l_FitFrameOnAxis_0, {
            axis = l_FitFrameOnAxis_0.Axis.Both,
            contentPadding = l_Stylizer_0.SectionContentPadding,
            BackgroundTransparency = 1,
            FillDirection = Enum.FillDirection.Horizontal,
            LayoutOrder = 1
        }, v26)
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer
})(v13));


local l_UserInputService_0 = game:GetService("UserInputService");
local l_RunService_0 = game:GetService("RunService");
local l_Parent_0 = script.Parent.Parent.Parent;
local v3 = require(l_Parent_0.Packages.Roact);
local v4 = require(l_Parent_0.Packages.RoactRodux);
local v5 = require(l_Parent_0.Src.Actions.SetPreviewVisible);
local v6 = v3.PureComponent:extend("HoverPreviewEnabler");
v6.init = function(v7)
    v7.mouseMoved = function()
        if not v7.props.previewVisible then
            v7.props.setPreviewVisible(true);
        end;
    end;
    v7.mouseLeave = function()
        v7.props.setPreviewVisible(false);
    end;
end;
v6.didMount = function(v8)
    local l_l_UserInputService_0_MouseLocation_0 = l_UserInputService_0:GetMouseLocation();
    l_RunService_0:BindToRenderStep("getMouseLocation", 1, function()
        local l_l_UserInputService_0_MouseLocation_1 = l_UserInputService_0:GetMouseLocation();
        if not (not (l_l_UserInputService_0_MouseLocation_0 ~= l_l_UserInputService_0_MouseLocation_1) or not v8.props.previewVisible) then
            v8.props.setPreviewVisible(false);
        end;
        l_l_UserInputService_0_MouseLocation_0 = l_l_UserInputService_0_MouseLocation_1;
    end);
end;
v6.willUnmount = function(v11)
    v11.mouseLeave();
    l_RunService_0:UnbindFromRenderStep("getMouseLocation");
end;
v6.render = function(v12)
    return v3.createElement("Frame", {
        BackgroundTransparency = 1,
        Size = UDim2.new(1, 0, 1, 0),
        [v3.Event.MouseMoved] = v12.mouseMoved,
        [v3.Event.MouseLeave] = v12.mouseLeave
    }, v12.props[v3.Children]);
end;
return v4.connect(function(v13, _)
    return {
        previewVisible = v13.previewVisible
    };
end, function(v15)
    return {
        setPreviewVisible = function(v16)
            v15(v5(v16));
        end
    };
end)(v6);


local l_TextService_0 = game:GetService("TextService");
local l_Parent_0 = script.Parent.Parent.Parent;
local v2 = require(l_Parent_0.Packages.FitFrame);
local l_FitFrameOnAxis_0 = v2.FitFrameOnAxis;
local l_FitFrameVertical_0 = v2.FitFrameVertical;
local v5 = require(l_Parent_0.Packages.Roact);
local v6 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v6.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_TextLabel_0 = v6.UI.TextLabel;
local v10 = v5.PureComponent:extend("LabeledElementListItem");
v10.defaultProps = {
    ContentFillDirection = Enum.FillDirection.Vertical,
    ContentPadding = UDim.new(0, 0),
    LabelColumnWidth = UDim.new(0, 100),
    LayoutOrder = 1,
    Padding = UDim.new(0, 0),
    Text = "Label",
    TextXAlignment = Enum.TextXAlignment.Left,
    TextYAlignment = Enum.TextYAlignment.Top,
    OnSizeChanged = function()
    end
};
v10.init = function(v11)
    v11.contentFrameRef = v5.createRef();
    v11.onContentSizeChanged = function()
        local l_props_0 = v11.props;
        if not (l_props_0.IsCollapsed or not l_props_0.OnSizeChanged) then
            l_props_0.OnSizeChanged((l_props_0.Id or l_props_0.Text) or "", v11.contentFrameRef.current.Size);
        end;
    end;
end;
v10.render = function(v13)
    local l_props_1 = v13.props;
    local v15 = nil;
    local v16 = nil;
    if not l_props_1.IsCollapsed then
        v15 = Enum.FillDirection.Horizontal;
        v16 = l_props_1.LabelColumnWidth;
    else
        v15 = Enum.FillDirection.Vertical;
        v16 = UDim.new(1, 0);
    end;
    return v5.createElement(l_FitFrameOnAxis_0, {
        axis = l_FitFrameOnAxis_0.Axis.Vertical,
        contentPadding = l_props_1.Padding,
        minimumSize = UDim2.new(1, 0, 0, 0),
        BackgroundTransparency = 1,
        FillDirection = v15,
        LayoutOrder = l_props_1.LayoutOrder
    }, {
        Label = v5.createElement(l_TextLabel_0, {
            LayoutOrder = 1,
            Size = UDim2.new(v16, UDim.new(0, 22)),
            Text = l_props_1.Text,
            TextXAlignment = l_props_1.TextXAlignment,
            TextYAlignment = l_props_1.TextYAlignment
        }),
        Content = v5.createElement(l_FitFrameOnAxis_0, {
            axis = l_FitFrameOnAxis_0.Axis.Both,
            contentPadding = l_props_1.ContentPadding,
            BackgroundTransparency = 1,
            FillDirection = l_props_1.ContentFillDirection,
            LayoutOrder = 2,
            [v5.Change.Size] = v13.onContentSizeChanged,
            [v5.Ref] = v13.contentFrameRef
        }, v13.props[v5.Children])
    });
end;
local v17 = v5.PureComponent:extend("LabeledElementList");
v17.defaultProps = {
    Collapsible = false,
    Items = {},
    MaximumLabelWidth = math.huge,
    LayoutOrder = 1
};
v17.init = function(v18)
    v18._frameRef = v5.createRef();
    v18._contentSizeMap = {};
    v18._contentColumnWidth = 0;
    v18._maximumContentWidth = 0;
    v18._labelColumnWidth = 0;
    local function _()
        local v19 = v18._contentColumnWidth < v18._maximumContentWidth;
        v18:setState(function()
            if v19 ~= v18.state.isCollapsed then
                return {
                    isCollapsed = v19
                };
            else
                return nil;
            end;
        end);
    end;
    v18.onSizeChanged = function()
        v18._contentColumnWidth = (v18._frameRef.current.AbsoluteSize.X - v18._labelColumnWidth) - v18.props.Stylizer.LabeledElementList.ItemPaddingHorizontal.Offset;
        local v21 = v18._contentColumnWidth < v18._maximumContentWidth;
        v18:setState(function()
            if v21 ~= v18.state.isCollapsed then
                return {
                    isCollapsed = v21
                };
            else
                return nil;
            end;
        end);
    end;
    v18.onSectionSizeChanged = function(v22, v23)
        v18._contentSizeMap[v22] = v23;
        v18._maximumContentWidth = 0;
        for _, v25 in pairs(v18._contentSizeMap) do
            v18._maximumContentWidth = math.max(v18._maximumContentWidth, v25.X.Offset);
        end;
        local v26 = v18._contentColumnWidth < v18._maximumContentWidth;
        v18:setState(function()
            if v26 ~= v18.state.isCollapsed then
                return {
                    isCollapsed = v26
                };
            else
                return nil;
            end;
        end);
    end;
    v18:setState({
        isCollapsed = false
    });
end;
v17.render = function(v27)
    local l_props_2 = v27.props;
    local l_state_0 = v27.state;
    local l_Items_0 = l_props_2.Items;
    local l_LabeledElementList_0 = l_props_2.Stylizer.LabeledElementList;
    v27._labelColumnWidth = 0;
    for _, v33 in ipairs(l_Items_0) do
        v27._labelColumnWidth = math.max(l_TextService_0:GetTextSize(v33.Text, l_LabeledElementList_0.TextSize, l_LabeledElementList_0.Font, Vector2.new(l_props_2.MaximumLabelWidth, 10000)).X, v27._labelColumnWidth);
    end;
    local v34 = not not l_state_0.isCollapsed and l_LabeledElementList_0.ItemPaddingVertical or l_LabeledElementList_0.ItemPaddingHorizontal;
    local v35 = {};
    for v36, v37 in ipairs(l_Items_0) do
        v35["Item" .. tostring(v36)] = v5.createElement(v10, {
            IsCollapsed = l_state_0.isCollapsed,
            ContentFillDirection = v37.ContentFillDirection,
            ContentPadding = l_LabeledElementList_0.ItemContentPadding,
            LabelColumnWidth = UDim.new(0, v27._labelColumnWidth),
            LayoutOrder = v36,
            Padding = v34,
            Text = v37.Text,
            TextXAlignment = v37.TextXAlignment,
            TextYAlignment = v37.TextYAlignment,
            OnSizeChanged = v27.onSectionSizeChanged
        }, {
            Content = v37.Content
        });
    end;
    return v5.createElement(l_FitFrameVertical_0, {
        contentPadding = l_LabeledElementList_0.SectionPadding,
        width = UDim.new(1, 0),
        BackgroundTransparency = 1,
        LayoutOrder = l_props_2.LayoutOrder,
        [v5.Change.AbsoluteSize] = v27.onSizeChanged,
        [v5.Ref] = v27._frameRef
    }, v35);
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v17));


local l_Parent_0 = script.Parent.Parent.Parent;
local l_DraggerSchemaCore_0 = l_Parent_0.Packages.DraggerSchemaCore;
local v2 = require(l_DraggerSchemaCore_0.BoundsChangedTracker);
local v3 = require(l_DraggerSchemaCore_0.Selection);
local l_FitFrameVertical_0 = require(l_Parent_0.Packages.FitFrame).FitFrameVertical;
local v5 = require(l_Parent_0.Packages.Roact);
local v6 = require(l_Parent_0.Packages.RoactRodux);
local v7 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v7.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_UI_0 = v7.UI;
local l_Button_0 = l_UI_0.Button;
local l_Container_0 = l_UI_0.Container;
local l_ScrollingFrame_0 = l_UI_0.ScrollingFrame;
local l_Box_0 = l_UI_0.Box;
local l_TextLabel_0 = l_UI_0.TextLabel;
local l_Util_0 = v7.Util;
local l_LayoutOrderIterator_0 = l_Util_0.LayoutOrderIterator;
local l_StyleModifier_0 = l_Util_0.StyleModifier;
local v19 = require(l_Parent_0.Src.Actions.SetAlignableObjects);
local v20 = require(l_Parent_0.Src.Components.AlignmentSettings);
local v21 = require(l_Parent_0.Src.Components.AlignObjectsPreview);
local v22 = require(l_Parent_0.Src.Thunks.UpdateAlignEnabled);
local v23 = require(l_Parent_0.Src.Thunks.UpdateAlignment);
local v24 = require(script.Parent.TeachingCallout);
local v25 = require(l_Parent_0.Src.Utility.AlignToolError);
local v26 = require(l_Parent_0.Src.Utility.getAlignableObjects);
local v27 = v3.new();
local v28 = v5.PureComponent:extend("MainView");
v28.init = function(v29)
    v29._boundsChangedTracker = v2.new(nil, function()
        v29.props.updateAlignEnabled();
    end);
    v29:_updateSelectionInfo();
end;
v28.render = function(v30)
    local l_props_0 = v30.props;
    local l_alignEnabled_0 = l_props_0.alignEnabled;
    local l_updateAlignment_0 = l_props_0.updateAlignment;
    local l_Analytics_0 = l_props_0.Analytics;
    local l_Localization_0 = l_props_0.Localization;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local v37 = l_LayoutOrderIterator_0.new();
    local v38 = nil;
    if not l_props_0.alignEnabled and l_props_0.disabledReason ~= nil then
        local l_errorCode_0 = l_props_0.disabledReason.errorCode;
        if l_errorCode_0 then
            v38 = v25.getErrorText(l_Localization_0, l_errorCode_0, l_props_0.disabledReason.formatParameters);
        end;
    end;
    local v40 = l_props_0.previewVisible and l_props_0.alignEnabled;
    local v41 = UDim.new(0, l_Stylizer_0.MainView.Padding);
    return v5.createElement(l_Container_0, {
        Background = l_Box_0
    }, {
        Scroller = v5.createElement(l_ScrollingFrame_0, {
            AutoSizeCanvas = true,
            AutoSizeLayoutOptions = {
                Padding = l_Stylizer_0.MainView.ListItemPadding
            }
        }, {
            Padding = v5.createElement("UIPadding", {
                PaddingLeft = v41,
                PaddingTop = v41,
                PaddingBottom = v41
            }),
            AlignmentSettings = v5.createElement(v20, {
                LayoutOrder = v37:getNextOrder()
            }),
            InfoLabel = v5.createElement(l_TextLabel_0, {
                AutomaticSize = Enum.AutomaticSize.Y,
                LayoutOrder = v37:getNextOrder(),
                Text = v38 or "",
                Size = UDim2.fromScale(1, 0),
                Style = "Error"
            }),
            ButtonContainer = v5.createElement(l_FitFrameVertical_0, {
                margin = {
                    left = 0,
                    top = l_Stylizer_0.MainView.Padding,
                    right = 0,
                    bottom = 0
                },
                width = UDim.new(1, 0),
                BackgroundTransparency = 1,
                HorizontalAlignment = Enum.HorizontalAlignment.Center,
                LayoutOrder = v37:getNextOrder()
            }, {
                Button = v5.createElement(l_Button_0, {
                    Size = l_Stylizer_0.MainView.PrimaryButtonSize,
                    Style = "RoundPrimary",
                    StyleModifier = not l_alignEnabled_0 and l_StyleModifier_0.Disabled,
                    Text = l_Localization_0:getText("MainView", "AlignButton"),
                    OnClick = function()
                        if l_alignEnabled_0 then
                            l_updateAlignment_0(l_Analytics_0);
                        end;
                    end
                }, {
                    TeachingCallout = v5.createElement(v24, {
                        Offset = Vector2.new(0, 6),
                        DefinitionId = "AlignToolCallout",
                        LocationId = "AlignButton"
                    })
                })
            })
        }),
        AlignObjectsPreview = not not v40 and v5.createElement(v21) or nil
    });
end;
v28._updateSelectionInfo = function(v42)
    local v43, v44 = v26((v27:Get()));
    v42.props.setAlignableObjects(v43);
    v42._boundsChangedTracker:setParts(v44);
end;
v28.didMount = function(v45)
    v45._boundsChangedTracker:install();
    v45._selectionChangedConnection = v27.SelectionChanged:Connect(function()
        v45:_updateSelectionInfo();
    end);
end;
v28.willUnmount = function(v46)
    v46._selectionChangedConnection:Disconnect();
    v46._selectionChangedConnection = nil;
    v46._boundsChangedTracker:uninstall();
end;
return v6.connect(function(v47, _)
    return {
        previewVisible = v47.previewVisible,
        alignEnabled = v47.alignEnabled,
        disabledReason = v47.disabledReason,
        alignableObjects = v47.alignableObjects,
        alignmentMode = v47.alignmentMode,
        alignmentSpace = v47.alignmentSpace,
        enabledAxes = v47.enabledAxes
    };
end, function(v49)
    return {
        updateAlignEnabled = function()
            v49(v22());
        end,
        updateAlignment = function(v50)
            v49(v23(v50));
        end,
        setAlignableObjects = function(v51)
            v49(v19(v51));
            v49(v22());
        end
    };
end)((l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Plugin = l_ContextServices_0.Plugin,
    Stylizer = l_ContextServices_0.Stylizer,
    Analytics = l_ContextServices_0.Analytics
})(v28)));


local l_Parent_0 = script.Parent.Parent.Parent;
local l_FitFrameOnAxis_0 = require(l_Parent_0.Packages.FitFrame).FitFrameOnAxis;
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_UI_0 = v3.UI;
local l_Button_0 = l_UI_0.Button;
local l_Image_0 = l_UI_0.Image;
local l_Tooltip_0 = l_UI_0.Tooltip;
local l_Util_0 = v3.Util;
local l_StyleModifier_0 = l_Util_0.StyleModifier;
local l_LayoutOrderIterator_0 = l_Util_0.LayoutOrderIterator;
local v13 = require(l_Parent_0.Src.Utility.AlignmentMode);
local v14 = v2.PureComponent:extend("ModeSetting");
v14.defaultProps = {
    LayoutOrder = 1,
    Value = v13.Center,
    OnValueChanged = function()
    end
};
v14.init = function(_, v16)
    assert(type(v16.Value) == "string", "Missing required property Value.");
    assert(type(v16.OnValueChanged) == "function", "Missing required property OnValueChanged.");
end;
v14.render = function(v17)
    local l_props_0 = v17.props;
    local l_Localization_0 = l_props_0.Localization;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local v21 = l_LayoutOrderIterator_0.new();
    local function v24(v22, v23)
        return v2.createElement(l_Button_0, {
            LayoutOrder = v21:getNextOrder(),
            Size = UDim2.fromOffset(32, 32),
            StyleModifier = not not (v22 == l_props_0.Value) and l_StyleModifier_0.Selected or nil,
            Style = "Selectable",
            OnClick = function()
                l_props_0.OnValueChanged(v22);
            end
        }, {
            Image = v2.createElement(l_Image_0, {
                Style = {
                    AnchorPoint = Vector2.new(0.5, 0.5),
                    Image = v23,
                    Position = UDim2.new(0.5, 0, 0.5, 0),
                    Size = UDim2.fromOffset(24, 24)
                }
            }),
            Tooltip = v2.createElement(l_Tooltip_0, {
                Text = l_Localization_0:getText("ModeSection", v22)
            })
        });
    end;
    local v25 = {};
    for _, v27 in ipairs(l_Stylizer_0.ModeButtons) do
        local l_Mode_0 = v27.Mode;
        v25[tostring(l_Mode_0)] = v24(l_Mode_0, v27.Image);
    end;
    return v2.createElement(l_FitFrameOnAxis_0, {
        axis = l_FitFrameOnAxis_0.Axis.Both,
        contentPadding = UDim.new(0, 2),
        BackgroundTransparency = 1,
        FillDirection = Enum.FillDirection.Horizontal,
        LayoutOrder = l_props_0.LayoutOrder
    }, v25);
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer
})(v14));


local l_Parent_0 = script.Parent.Parent.Parent;
local l_FitFrameOnAxis_0 = require(l_Parent_0.Packages.FitFrame).FitFrameOnAxis;
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_UI_0 = v3.UI;
local l_Container_0 = l_UI_0.Container;
local l_Image_0 = l_UI_0.Image;
local l_RadioButton_0 = l_UI_0.RadioButton;
local l_Tooltip_0 = l_UI_0.Tooltip;
local v11 = require(l_Parent_0.Src.Utility.RelativeTo);
local v12 = v2.PureComponent:extend("RelativeToSetting");
v12.defaultProps = {
    Value = v11.Selection,
    OnValueChanged = function()
    end
};
v12.init = function(_, v14)
    assert(type(v14.Value) == "string", "Missing required property Value.");
    assert(type(v14.OnValueChanged) == "function", "Missing required property OnValueChanged.");
end;
v12.render = function(v15)
    local l_props_0 = v15.props;
    local l_Localization_0 = l_props_0.Localization;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local function v21(v19, v20)
        return v2.createElement(l_RadioButton_0, {
            Disabled = false,
            Key = v19,
            LayoutOrder = v20,
            Selected = v19 == l_props_0.Value,
            Text = l_Localization_0:getText("RelativeToSection", v19),
            OnClick = l_props_0.OnValueChanged
        });
    end;
    return v2.createElement(l_FitFrameOnAxis_0, {
        axis = l_FitFrameOnAxis_0.Axis.Both,
        contentPadding = l_Stylizer_0.SectionContentPaddingCompact,
        BackgroundTransparency = 1,
        FillDirection = Enum.FillDirection.Vertical
    }, {
        SelectionRadioButton = v21(v11.Selection, 1),
        ActiveRadioButton = v2.createElement(l_FitFrameOnAxis_0, {
            axis = l_FitFrameOnAxis_0.Axis.Both,
            contentPadding = l_Stylizer_0.RelativeToSetting.HelpIconPadding,
            BackgroundTransparency = 1,
            FillDirection = Enum.FillDirection.Horizontal,
            LayoutOrder = 2
        }, {
            RadioButton = v21(v11.Active, 1),
            HelpIcon = v2.createElement(l_Container_0, {
                LayoutOrder = 2,
                Size = UDim2.new(0, 22, 1, 0)
            }, {
                Icon = v2.createElement(l_Image_0, {
                    Style = "HelpIcon"
                }),
                Tooltip = v2.createElement(l_Tooltip_0, {
                    Text = l_Localization_0:getText("RelativeToSection", "ActiveObjectTooltip")
                })
            })
        })
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer
})(v12));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local l_withContext_0 = require(l_Parent_0.Packages.Framework).ContextServices.withContext;
local v3 = require(l_Parent_0.Src.Utility.CalloutController);
local v4 = v1.PureComponent:extend("TeachingCallout");
v4.init = function(v5)
    v5.targetRef = v1.createRef();
end;
v4.didMount = function(v6)
    v6._isMounted = true;
    spawn(function()
        if not (not v6._isMounted or not v6.targetRef) and v6.targetRef.current then
            v6._attachedDefinitionId = v6.props.DefinitionId;
            v6.props.CalloutController:attachCallout(v6._attachedDefinitionId, v6.props.LocationId, v6.targetRef.current);
            return ;
        else
            return ;
        end;
    end);
end;
v4.willUnmount = function(v7)
    v7._isMounted = false;
    if v7._attachedDefinitionId then
        v7.props.CalloutController:detachCalloutsByDefinitionId(v7._attachedDefinitionId);
    end;
end;
v4.render = function(v8)
    local v9 = v8.props.Offset or Vector2.new(0, 0);
    return v1.createElement("Frame", {
        BackgroundTransparency = 1,
        Position = UDim2.new(0, v9.X, 0, v9.Y),
        Size = UDim2.new(1, 0, 1, 0),
        [v1.Ref] = v8.targetRef
    });
end;
return (l_withContext_0({
    CalloutController = v3
})(v4));


game:DefineFastFlag("AlignToolRoactInspector", false);
return function()
    return game:GetFastFlag("AlignToolRoactInspector");
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Dash);
local v2 = require(l_Parent_0.Packages.Rodux);
local v3 = require(l_Parent_0.Src.Utility.AlignmentMode);
local v4 = require(l_Parent_0.Src.Utility.AlignmentSpace);
local v5 = require(l_Parent_0.Src.Utility.RelativeTo);
local l_join_0 = v1.join;
return (v2.createReducer({
    toolEnabled = false,
    alignEnabled = false,
    disabledReason = {},
    alignableObjects = {},
    alignmentMode = v3.Center,
    alignmentSpace = v4.World,
    enabledAxes = {
        X = false,
        Y = false,
        Z = false
    },
    relativeTo = v5.Selection,
    previewVisible = false
}, {
    SetToolEnabled = function(v7, v8)
        return l_join_0(v7, {
            toolEnabled = v8.toolEnabled
        });
    end,
    SetAlignEnabled = function(v9, v10)
        return l_join_0(v9, {
            alignEnabled = v10.alignEnabled,
            disabledReason = v10.disabledReason
        });
    end,
    SetAlignableObjects = function(v11, v12)
        return l_join_0(v11, {
            alignableObjects = v12.alignableObjects
        });
    end,
    SetAlignmentMode = function(v13, v14)
        return l_join_0(v13, {
            alignmentMode = v14.alignmentMode
        });
    end,
    SetAlignmentSpace = function(v15, v16)
        return l_join_0(v15, {
            alignmentSpace = v16.alignmentSpace
        });
    end,
    SetEnabledAxes = function(v17, v18)
        return l_join_0(v17, {
            enabledAxes = v18.enabledAxes
        });
    end,
    SetRelativeTo = function(v19, v20)
        return l_join_0(v19, {
            relativeTo = v20.relativeTo
        });
    end,
    SetPreviewVisible = function(v21, v22)
        return l_join_0(v21, {
            previewVisible = v22.visible
        });
    end
}));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Dash);
local v2 = require(l_Parent_0.Packages.Framework);
local l_Style_0 = v2.Style;
local l_Colors_0 = l_Style_0.Colors;
local l_StudioTheme_0 = l_Style_0.Themes.StudioTheme;
local l_StyleKey_0 = l_Style_0.StyleKey;
local l_ComponentSymbols_0 = l_Style_0.ComponentSymbols;
local l_getRawComponentStyle_0 = l_Style_0.getRawComponentStyle;
local l_StyleModifier_0 = v2.Util.StyleModifier;
local v10 = require(l_Parent_0.Src.Utility.AlignmentMode);
local l_join_0 = v1.join;
local v12 = string.format("rbxasset://studio_svg_textures/Lua/AlignTool/%s/Large/", "Light");
local v13 = string.format("rbxasset://studio_svg_textures/Lua/AlignTool/%s/Large/", "Dark");
local v14 = string.format("rbxasset://studio_svg_textures/Shared/Navigation/%s/Standard/", "Light");
local v15 = {
    [l_StyleKey_0.HelpIconColor] = l_Colors_0.Gray_Light,
    [l_StyleKey_0.SelectableButtonBorderColor] = l_Colors_0.Gray,
    [l_StyleKey_0.SelectableButtonSelectedColor] = l_Colors_0.Gray_Mid,
    [l_StyleKey_0.ModeButtonMin] = v13 .. "AlignMin.png",
    [l_StyleKey_0.ModeButtonCenter] = v13 .. "AlignCenter.png",
    [l_StyleKey_0.ModeButtonMax] = v13 .. "AlignMax.png",
    [l_StyleKey_0.Help] = string.format("rbxasset://studio_svg_textures/Shared/Navigation/%s/Standard/", "Dark") .. "Help.png"
};
local v16 = {
    [l_StyleKey_0.HelpIconColor] = Color3.fromRGB(184, 184, 184),
    [l_StyleKey_0.SelectableButtonBorderColor] = l_Colors_0.Gray_Light,
    [l_StyleKey_0.SelectableButtonSelectedColor] = l_Colors_0.Gray_Lighter,
    [l_StyleKey_0.ModeButtonMin] = v12 .. "AlignMin.png",
    [l_StyleKey_0.ModeButtonCenter] = v12 .. "AlignCenter.png",
    [l_StyleKey_0.ModeButtonMax] = v12 .. "AlignMax.png",
    [l_StyleKey_0.Help] = v14 .. "Help.png"
};
local v17 = {
    SectionPadding = UDim.new(0, 15),
    SectionContentPadding = UDim.new(0, 10),
    SectionContentPaddingCompact = UDim.new(0, 6),
    ModeButtons = {
        [1] = {
            Image = l_StyleKey_0.ModeButtonMin,
            Mode = v10.Min
        },
        [2] = {
            Image = l_StyleKey_0.ModeButtonCenter,
            Mode = v10.Center
        },
        [3] = {
            Image = l_StyleKey_0.ModeButtonMax,
            Mode = v10.Max
        }
    },
    InfoLabel = {
        ErrorTextColor = l_StyleKey_0.ErrorText,
        WarningTextColor = l_StyleKey_0.WarningText,
        InfoTextColor = l_StyleKey_0.MainText
    },
    MainView = {
        ListItemPadding = UDim.new(0, 10),
        Padding = 10,
        PrimaryButtonSize = UDim2.new(0, 160, 0, 32)
    },
    RelativeToSetting = {
        HelpIconPadding = UDim.new(0, 2)
    },
    LabeledElementList = {
        ItemContentPadding = UDim.new(0, 10),
        ItemPaddingHorizontal = UDim.new(0, 15),
        ItemPaddingVertical = UDim.new(0, 8),
        MaximumLabelWidth = 100,
        SectionPadding = UDim.new(0, 15)
    },
    [l_ComponentSymbols_0.Button] = l_join_0(l_getRawComponentStyle_0("Button"), {
        ["&Selectable"] = {
            BackgroundStyle = {
                BorderSize = 1,
                Transparency = 1
            },
            [l_StyleModifier_0.Hover] = {
                BackgroundStyle = {
                    BorderColor = l_StyleKey_0.SelectableButtonBorderColor,
                    BorderSize = 1,
                    Color = l_StyleKey_0.ButtonHover,
                    Transparency = 0
                }
            },
            [l_StyleModifier_0.Selected] = {
                BackgroundStyle = {
                    BorderColor = l_StyleKey_0.SelectableButtonBorderColor,
                    BorderSize = 1,
                    Color = l_StyleKey_0.SelectableButtonSelectedColor,
                    Transparency = 0
                }
            }
        }
    }),
    [l_ComponentSymbols_0.Image] = l_join_0(l_getRawComponentStyle_0("Image"), {
        ["&HelpIcon"] = {
            AnchorPoint = Vector2.new(0.5, 0.5),
            Color = l_StyleKey_0.HelpIconColor,
            Image = l_StyleKey_0.Help,
            Position = UDim2.new(0.5, 0, 0.5, 0),
            Size = UDim2.fromOffset(14, 14),
            [l_StyleModifier_0.Disabled] = {
                Transparency = 0.5
            }
        }
    })
};
return function(v18)
    local _ = nil;
    return (if not v18 then l_StudioTheme_0.new(v15, v16) else l_StudioTheme_0.mock()):extend(v17);
end;


local l_Selection_0 = game:GetService("Selection");
local v1 = require(script.Parent.Parent.Parent.Src.Utility.RelativeTo);
return function()
    return function(v2)
        local v3 = v2:getState();
        local _ = nil;
        l_Selection_0.ShowActiveInstanceHighlight = not not v3.toolEnabled and v3.relativeTo == v1.Active;
    end;
end;


local l_Selection_0 = game:GetService("Selection");
local l_Workspace_0 = game:GetService("Workspace");
local l_Parent_0 = script.Parent.Parent.Parent;
local v3 = require(l_Parent_0.Src.Actions.SetAlignEnabled);
local v4 = require(l_Parent_0.Src.Utility.AlignToolError);
local v5 = require(l_Parent_0.Src.Utility.RelativeTo);
local function _(v6)
    return (v6.X or v6.Y) or v6.Z;
end;
return function()
    local l_Terrain_0 = l_Workspace_0.Terrain;
    local function _(v9)
        if v9:IsA("BasePart") and v9 ~= l_Terrain_0 then
            return true;
        elseif not v9:IsA("Model") then
            return false;
        else
            return true;
        end;
    end;
    return function(v11)
        local v12 = v11:getState();
        local l_alignableObjects_0 = v12.alignableObjects;
        local l_enabledAxes_0 = v12.enabledAxes;
        local v15 = false;
        if #l_alignableObjects_0 > 1 then
            v15 = (l_enabledAxes_0.X or l_enabledAxes_0.Y) or l_enabledAxes_0.Z;
        end;
        local v16 = nil;
        if v15 and v12.relativeTo == v5.Active then
            local l_ActiveInstance_0 = l_Selection_0.ActiveInstance;
            if not (not not l_ActiveInstance_0:IsA("BasePart") and l_ActiveInstance_0 ~= l_Terrain_0 or (l_ActiveInstance_0:IsA("Model") and true or false)) then
                v15 = false;
                v16 = {
                    errorCode = v4.InvalidActiveObject,
                    formatParameters = {
                        name = l_ActiveInstance_0.Name
                    }
                };
            end;
        end;
        v11:dispatch(v3(v15, v16));
    end;
end;


return {
    InvalidActiveObject = "InvalidActiveObject",
    getErrorText = function(v0, v1, v2)
        return v0:getText("ErrorMessages", v1, v2);
    end
};


local v0 = require(script.Parent.Parent.Parent.Packages.Framework).ContextServices.ContextItem:extend("CalloutController");
v0.new = function(v1)
    local v2 = {
        _calloutService = v1 or game:GetService("CalloutService")
    };
    assert(v2._calloutService, "CalloutController requires a CalloutService");
    return (setmetatable(v2, v0));
end;
v0.destroy = function(v3)
    v3._calloutService = nil;
end;
v0.defineCallout = function(v4, v5, v6, v7, v8)
    v4._calloutService:DefineCallout(v5, v6, v7, v8);
end;
v0.attachCallout = function(v9, v10, v11, v12)
    v9._calloutService:AttachCallout(v10, v11, v12);
end;
v0.detachCalloutsByDefinitionId = function(v13, v14)
    v13._calloutService:DetachCalloutsByDefinitionId(v14);
end;
return v0;


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_AlignTool_0 = l_Workspace_0:FindFirstChild("AlignTool");
        if l_AlignTool_0 and l_AlignTool_0:FindFirstChild(v3) then
            return l_AlignTool_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_AlignTool_1 = l_Workspace_0:FindFirstChild("AlignTool");
        if l_AlignTool_1 and l_AlignTool_1:FindFirstChild(l_v9_0) then
            return l_AlignTool_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_AlignTool_2 = l_Workspace_0:FindFirstChild("AlignTool");
        if l_AlignTool_2 and l_AlignTool_2:FindFirstChild(l_v9_1) then
            return l_AlignTool_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_AlignTool_3 = l_Workspace_0:FindFirstChild("AlignTool");
        if l_AlignTool_3 and l_AlignTool_3:FindFirstChild(l_v9_2) then
            return l_AlignTool_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_AlignTool_4 = l_Workspace_0:FindFirstChild("AlignTool");
        if l_AlignTool_4 and l_AlignTool_4:FindFirstChild(l_v9_3) then
            return l_AlignTool_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_AlignTool_5 = l_Workspace_0:FindFirstChild("AlignTool");
        if l_AlignTool_5 and l_AlignTool_5:FindFirstChild(l_v9_4) then
            return l_AlignTool_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_AlignTool_6 = l_Workspace_0:FindFirstChild("AlignTool");
        if l_AlignTool_6 and l_AlignTool_6:FindFirstChild(v9) then
            return l_AlignTool_6[v9].Value;
        else
            return l_v8_5;
        end;
    end;
end;
v7.EnableRoactConfigs = v11;
return v7;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Parent_1 = l_Parent_0.Parent;
local l_DraggerFramework_0 = l_Parent_0.Packages.DraggerFramework;
local v3 = require(l_DraggerFramework_0.Utility.BoundingBox);
local v4 = require(l_DraggerFramework_0.Utility.JointMaker);
local v5 = require(l_Parent_0.Src.Utility.AlignmentMode);
local v6 = require(l_Parent_0.Src.Utility.AlignmentSpace);
local v7 = require(l_Parent_0.Src.Utility.getAlignableObjects);
local v8 = require(l_Parent_0.Src.Utility.getDefaultBasisForObjects);
local function _(v9)
    return (Vector3.new(not v9.X and 0 or 1, not v9.Y and 0 or 1, not v9.Z and 0 or 1));
end;
local function _()
    return l_Parent_1:GetJoinMode() ~= Enum.JointCreationMode.None;
end;
return function(v12, v13, v14, v15, v16)
    if #v12 == 0 then
        return ;
    else
        local v17 = nil;
        v17 = if v13 == v6.Local then v8(not not v16 and {
            v16
        } or v12) else CFrame.new();
        local v18, v19, v20 = v3.fromObjectsComputeAll(v12, v17);
        local v21 = nil;
        local v22 = nil;
        if not v16 then
            v21 = v17:VectorToWorldSpace(v18);
            v22 = v19;
        else
            local v23 = v20[v16];
            assert(v23, "Missing bounding box for target");
            v21 = v17:VectorToWorldSpace(v23.offset);
            v22 = v23.size;
        end;
        for _, v25 in ipairs(v12) do
            if v25 ~= v16 then
                local _, v27 = v7({
                    v25
                });
                assert(#v27, "Missing parts for alignable object");
                local v28 = v4.new();
                v28:pickUpParts(v27);
                v28:breakJointsToOutsiders();
                local v29 = v20[v25];
                assert(v29, "Missing bounding box for object");
                local v30 = v17:VectorToObjectSpace(v21 - v17:VectorToWorldSpace(v29.offset));
                if v15 == v5.Min then
                    v30 = v30 - (v22 - v29.size) / 2;
                elseif v15 == v5.Max then
                    v30 = v30 + (v22 - v29.size) / 2;
                end;
                local v31 = v17:VectorToWorldSpace(v30 * Vector3.new(not v14.X and 0 or 1, not v14.Y and 0 or 1, not v14.Z and 0 or 1));
                if v25:IsA("PVInstance") then
                    v25:PivotTo(v25:GetPivot() + v31);
                end;
                if l_Parent_1:GetJoinMode() ~= Enum.JointCreationMode.None then
                    v28:computeJointPairs():createJoints();
                end;
                v28:putDownParts();
            end;
        end;
        return ;
    end;
end;


local l_Workspace_0 = game:GetService("Workspace");
return function(v1)
    local v2 = table.create(64);
    local v3 = {};
    local v4 = table.create(64);
    local v5 = {};
    local l_Terrain_0 = l_Workspace_0.Terrain;
    local function _(v7)
        if not v3[v7] then
            table.insert(v2, v7);
            v3[v7] = true;
        end;
    end;
    local function _(v9)
        if not v5[v9] then
            table.insert(v4, v9);
            v5[v9] = true;
        end;
    end;
    for _, v12 in ipairs(v1) do
        if v12:IsA("BasePart") and v12 ~= l_Terrain_0 then
            if not v3[v12] then
                table.insert(v2, v12);
                v3[v12] = true;
            end;
            if not v5[v12] then
                table.insert(v4, v12);
                v5[v12] = true;
            end;
        elseif v12:IsA("Model") then
            if not v3[v12] then
                table.insert(v2, v12);
                v3[v12] = true;
            end;
            for _, v14 in ipairs(v12:GetDescendants()) do
                if not (not v14:IsA("BasePart") or v5[v14]) then
                    table.insert(v4, v14);
                    v5[v14] = true;
                end;
            end;
        end;
    end;
    return v2, v4;
end;


local l_Workspace_0 = game:GetService("Workspace");
return function(v1)
    local l_Terrain_0 = l_Workspace_0.Terrain;
    for v3 = #v1, 1, -1 do
        local v4 = v1[v3];
        if v4:IsA("BasePart") and v4 ~= l_Terrain_0 then
            return v4.CFrame;
        elseif v4:IsA("Model") then
            local l_v4_BoundingBox_0, _ = v4:GetBoundingBox();
            return l_v4_BoundingBox_0;
        end;
    end;
    return nil;
end;


local l_status_0, l_result_0 = pcall(function()
    return game:GetService("StudioService"):HasInternalPermission();
end);
local v2 = l_status_0 and l_result_0;
return function()
    return v2;
end;


local l_Workspace_0 = game:GetService("Workspace");
local l_Parent_0 = script.Parent.Parent.Parent;
local v2 = require(l_Parent_0.Packages.Roact);
local v3 = require(l_Parent_0.Packages.DraggerFramework.Utility.BoundingBox);
local v4 = require(l_Parent_0.Src.Utility.AlignmentMode);
local v5 = require(l_Parent_0.Src.Utility.AlignmentSpace);
local v6 = require(l_Parent_0.Src.Utility.getDefaultBasisForObjects);
local v7 = Color3.fromRGB(253, 244, 161);
local v8 = Vector3.new(1, 1, 1);
local v9 = Vector3.new(1, 1, 1);
local v10 = Vector3.new();
local v11 = CFrame.fromMatrix(v10, Vector3.new(-1, 0, 0), (Vector3.new(0, 1, 0)));
local v12 = {
    Vector3.new(0.5, 0.5, 0.5),
    Vector3.new(-0.5, 0.5, 0.5),
    Vector3.new(-0.5, -0.5, 0.5),
    Vector3.new(0.5, -0.5, 0.5),
    Vector3.new(0.5, 0.5, -0.5),
    Vector3.new(-0.5, 0.5, -0.5),
    Vector3.new(-0.5, -0.5, -0.5),
    (Vector3.new(0.5, -0.5, -0.5))
};
local v13 = {
    {
        v12[1],
        v12[2]
    },
    {
        v12[2],
        v12[3]
    },
    {
        v12[3],
        v12[4]
    },
    {
        v12[4],
        v12[1]
    },
    {
        v12[5],
        v12[6]
    },
    {
        v12[6],
        v12[7]
    },
    {
        v12[7],
        v12[8]
    },
    {
        v12[8],
        v12[5]
    },
    {
        v12[1],
        v12[5]
    },
    {
        v12[2],
        v12[6]
    },
    {
        v12[3],
        v12[7]
    },
    {
        v12[4],
        v12[8]
    }
};
local function _(v14)
    return ((not v14.X and 0 or 1) + (not v14.Y and 0 or 1)) + (not v14.Z and 0 or 1);
end;
getNormal = function(v16)
    return (Vector3.new(not v16.X and 0 or 1, not v16.Y and 0 or 1, not v16.Z and 0 or 1));
end;
getDirection = function(v17)
    return v9 - getNormal(v17);
end;
rotateVector = function(v18)
    return (Vector3.new(v18.Z, v18.X, v18.Y));
end;
getSmallestObjectSize = function(v19)
    local l_huge_0 = math.huge;
    for _, v22 in pairs(v19) do
        l_huge_0 = math.min(l_huge_0, v22.size.Magnitude);
    end;
    return l_huge_0;
end;
getModifiedSize = function(v23)
    if v23 < 10 then
        return v23;
    elseif v23 < 110 then
        return 10 + ((v23 - 10) / 100) * 12;
    else
        return 22;
    end;
end;
local function v30(v24, _, _, v27, v28)
    local v29 = v28 * 0.05;
    v24.SphereNormal = v2.createElement("SphereHandleAdornment", {
        Adornee = l_Workspace_0.Terrain,
        Radius = v29,
        Color3 = v7,
        CFrame = CFrame.new(v27),
        ZIndex = 0
    });
    v24.SphereOnTop = v2.createElement("SphereHandleAdornment", {
        Adornee = l_Workspace_0.Terrain,
        Radius = v29,
        AlwaysOnTop = true,
        Transparency = 0.3,
        Color3 = v7,
        CFrame = CFrame.new(v27),
        ZIndex = 0
    });
end;
local function v45(v31, v32, v33, v34, v35, v36)
    local v37 = (v33 * v35).Magnitude + 1;
    local v38 = v32:VectorToWorldSpace(v35);
    local v39 = (0.5 * v37) * v38;
    v34 = v34 - v32:PointToObjectSpace(v34):Dot(v35) * v38;
    local v40 = CFrame.lookAt(v34, v34 - v39);
    local v41 = 0.01 * v36;
    v31.MainLineNormal = v2.createElement("CylinderHandleAdornment", {
        Adornee = l_Workspace_0.Terrain,
        Height = v37,
        Radius = v41,
        Color3 = v7,
        CFrame = v40,
        ZIndex = 1
    });
    v31.MainLineOnTop = v2.createElement("CylinderHandleAdornment", {
        Adornee = l_Workspace_0.Terrain,
        Height = v37,
        Radius = v41,
        AlwaysOnTop = true,
        Transparency = 0.3,
        Color3 = v7,
        CFrame = v40,
        ZIndex = 1
    });
    local v42 = 0.03 * v36;
    local v43 = 0.1 * v36;
    local v44 = CFrame.new(0, 0, (v37 * 0.5 + v43) - 0.0325 * v36);
    v31.Cone1 = v2.createElement("ConeHandleAdornment", {
        Adornee = l_Workspace_0.Terrain,
        Height = v43,
        Radius = v42,
        Color3 = v7,
        ZIndex = 1,
        CFrame = v40 * v44
    });
    v31.Cone2 = v2.createElement("ConeHandleAdornment", {
        Adornee = l_Workspace_0.Terrain,
        Height = v43,
        Radius = v42,
        Color3 = v7,
        ZIndex = 1,
        CFrame = (v40 * v11) * v44
    });
end;
local function v58(v46, v47, v48, v49, v50)
    local v51 = v9 - v50;
    local v52 = v47:PointToObjectSpace(v49) * (v50 * Vector3.new(1.001, 1.001, 1.001));
    v48 = (v48 + v8) * v51;
    v47 = v47 * CFrame.new(v52);
    v46.Plane = v2.createElement("BoxHandleAdornment", {
        Adornee = l_Workspace_0.Terrain,
        Size = v48,
        CFrame = v47,
        Transparency = 0.3,
        Color3 = v7,
        ZIndex = 0
    });
    local v53 = rotateVector(v50);
    local v54 = rotateVector(v53);
    for v55 = 1, 4 do
        local l_Magnitude_0 = (v54 * v48).Magnitude;
        v46["Line" .. v55] = v2.createElement("LineHandleAdornment", {
            Adornee = l_Workspace_0.Terrain,
            Length = l_Magnitude_0,
            CFrame = (v47 * CFrame.fromMatrix(v10, v53, v50)) * CFrame.new(0.5 * (v53 * v48).Magnitude, 0, 0.5 * l_Magnitude_0),
            AlwaysOnTop = true,
            Thickness = 3,
            Color3 = v7,
            ZIndex = 0
        });
        local l_v54_0 = v54;
        v54 = -v53;
        v53 = l_v54_0;
    end;
end;
local v59 = {
    "EdgeA",
    "EdgeB",
    "EdgeC",
    "EdgeD",
    "EdgeE",
    "EdgeF",
    "EdgeG",
    "EdgeH",
    "EdgeI",
    "EdgeJ",
    "EdgeK",
    "EdgeL"
};
local function v67(v60, v61, v62)
    for v63, v64 in pairs(v13) do
        local v65 = v61:PointToWorldSpace(v62 * v64[1]);
        local v66 = v61:PointToWorldSpace(v62 * v64[2]);
        v60[v59[v63]] = v2.createElement("LineHandleAdornment", {
            Adornee = l_Workspace_0.Terrain,
            ZIndex = 0,
            Thickness = 1,
            Length = (v66 - v65).Magnitude,
            CFrame = CFrame.lookAt(v65, v66),
            Color3 = v7
        });
    end;
end;
return function(v68, v69, v70, v71, v72)
    if #v68 == 0 then
        return nil;
    else
        local v73 = nil;
        v73 = if v69 == v5.Local then v6(not not v72 and {
            v72
        } or v68) else CFrame.new();
        local v74, v75, v76 = v3.fromObjectsComputeAll(v68, v73);
        local v77 = nil;
        local v78 = nil;
        if not v72 then
            v77 = v73:PointToWorldSpace(v74);
            v78 = v73:VectorToWorldSpace(v75);
        else
            local v79 = v76[v72];
            v77 = v73:PointToWorldSpace(v79.offset);
            v78 = v73:VectorToWorldSpace(v79.size);
        end;
        local v80 = nil;
        v80 = if v71 == v4.Min then v77 - 0.5 * v78 else if v71 == v4.Max then v77 + 0.5 * v78 else v77;
        local v81 = ((not v70.X and 0 or 1) + (not v70.Y and 0 or 1)) + (not v70.Z and 0 or 1);
        local v82 = v73 * CFrame.new(v74);
        local v83 = {};
        if v81 == 3 then
            v30(v83, v82, v75, v80, getModifiedSize(getSmallestObjectSize(v76)));
        elseif v81 == 2 then
            v45(v83, v82, v75, v80, getDirection(v70), getModifiedSize(getSmallestObjectSize(v76)));
        elseif v81 == 1 then
            v58(v83, v82, v75, v80, getNormal(v70));
        end;
        v67(v83, v82, v75);
        return v2.createFragment(v83);
    end;
end;


return function(v0, v1)
    require(script.Parent.defineLuaFlags);
    local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
    local v3 = require(l_script_FirstAncestor_0.Packages.Dev.DeveloperTools);
    local v4 = require(l_script_FirstAncestor_0.Src.Util.DebugFlags);
    local v5 = require(l_script_FirstAncestor_0.Packages.Roact);
    local v6 = require(l_script_FirstAncestor_0.Src.Components.AnimationClipEditorPlugin);
    if not v4.RunTests() and not v4.RunRhodiumTests() then
        local v7 = nil;
        local v8 = nil;
        local function v11()
            v8 = v5.mount((v5.createElement(v6, {
                plugin = v0,
                pluginLoaderContext = v1
            })));
            local l_status_0, l_result_0 = pcall(function()
                return game:GetService("StudioService"):HasInternalPermission();
            end);
            if not (not l_status_0 or not l_result_0) then
                v7 = v3.forPlugin("AnimationClipEditor", v0);
                v7:addRoactTree("Roact tree", v8, v5);
            end;
        end;
        v0.Unloading:Connect(function()
            if v8 then
                v5.unmount(v8);
            end;
            if v7 then
                v7:destroy();
            end;
        end);
        v11();
        return ;
    else
        return ;
    end;
end;


require(script.Parent.defineLuaFlags);
local l_script_FirstAncestor_0 = script:FindFirstAncestor("AnimationClipEditor");
local v1 = require(l_script_FirstAncestor_0.Src.Util.DebugFlags);
local function _()
    local v2 = require(l_script_FirstAncestor_0.Packages.Dev.TestEZ);
    return not not _G.TEAMCITY and v2.Reporters.TeamCityReporter or v2.Reporters.TextReporter;
end;
local function v8()
    local v4 = require(l_script_FirstAncestor_0.Packages.Dev.TestEZ);
    local l_Src_0 = l_script_FirstAncestor_0.Src;
    local l_TestBootstrap_0 = v4.TestBootstrap;
    local v7 = require(l_script_FirstAncestor_0.Packages.Dev.TestEZ);
    l_TestBootstrap_0:run({
        l_Src_0
    }, not not _G.TEAMCITY and v7.Reporters.TeamCityReporter or v7.Reporters.TextReporter);
end;
local function v18()
    local v9 = require(l_script_FirstAncestor_0.Packages.Dev.TestEZ);
    local v10 = require(l_script_FirstAncestor_0.RhodiumTests.TestHelpers);
    local l_RhodiumTests_0 = l_script_FirstAncestor_0.RhodiumTests;
    local l_TestBootstrap_1 = v9.TestBootstrap;
    local v13 = require(l_script_FirstAncestor_0.Src.test.RigCreator);
    local l_Dummy_0 = workspace:FindFirstChild("Dummy");
    while l_Dummy_0 ~= nil do
        l_Dummy_0:Destroy();
        l_Dummy_0 = workspace:FindFirstChild("Dummy");
    end;
    local v15 = v13.BuildAnthroRig("AnthroNormal");
    v15.Name = "Dummy";
    v15.HumanoidRootPart.Anchored = true;
    local v16 = require(l_script_FirstAncestor_0.Packages.Dev.TestEZ);
    local v17 = not not _G.TEAMCITY and v16.Reporters.TeamCityReporter or v16.Reporters.TextReporter;
    v10.init(plugin);
    l_TestBootstrap_1:run({
        l_RhodiumTests_0
    }, v17, false, true);
    v15:Destroy();
end;
local v19 = v1.RunTests();
local v20 = v1.RunRhodiumTests();
if v19 then
    print("----- All " .. script.Parent.Parent.Name .. " Tests ------");
    v8();
    print("----------------------------------");
end;
if v20 then
    print("----- All " .. script.Parent.Parent.Name .. " Rhodium Tests ------");
    v18();
    print("----------------------------------");
    if v1.RunningUnderCLI() then
        game:GetService("ProcessService"):ExitAsync(0);
    end;
end;


game:DefineFastFlag("ACEAnimationConstraints2", false);
return function()
    return game:GetFastFlag("ACEAnimationConstraints2");
end;


game:DefineFastFlag("FacialAnimationRecordingInStudio", false);
return function()
    return game:GetFastFlag("FacialAnimationRecordingInStudio");
end;


game:DefineFastFlag("ACEForceR6HumanoidRootPart", false);
return function()
    return game:GetFastFlag("ACEForceR6HumanoidRootPart");
end;


game:DefineFastFlag("ACEGridSpeed", false);
return function()
    return game:GetFastFlag("ACEGridSpeed");
end;


game:DefineFastFlag("ACEMultiSelectionTransform3", false);
return function()
    return game:GetFastFlag("ACEMultiSelectionTransform3");
end;


game:DefineFastFlag("ACEResetTopTrackIndex", false);
return function()
    return game:GetFastFlag("ACEResetTopTrackIndex");
end;


game:DefineFastFlag("ACERigIK", false);
return function()
    return game:GetFastFlag("ACERigIK");
end;


game:DefineFastFlag("ACESelectFromViewport", false);
return function()
    return game:GetFastFlag("ACESelectFromViewport");
end;


game:DefineFastFlag("ACETimelineUnitSeconds", false);
return function()
    return game:GetFastFlag("ACETimelineUnitSeconds");
end;