local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Stories.ToolboxStoryWrapper);
local v3 = require(l_Parent_0.Core.Components.Categorization.ExpandableTeaser);
local v4 = require(l_Parent_0.Core.Components.Categorization.SearchList);
local function v6(v5)
    return v1.createElement(v2, v5);
end;
local function v7()
    return {
        v1.createElement("Frame", {
            BackgroundColor3 = Color3.new(1, 0, 0),
            Size = UDim2.new(1, 0, 0, 100)
        })
    };
end;
local function v8()
    return {
        SearchList = v1.createElement(v4, {
            AutomaticSize = Enum.AutomaticSize.Y,
            Items = {
                "charmander",
                "bulbasaur",
                "squirtle",
                "cyndaquil",
                "totodile",
                "chikorita",
                "torchic",
                "mudkip",
                "treecko",
                "chimchar",
                "piplup",
                "turtwig",
                "tepig",
                "oshawott",
                "snivy"
            },
            ItemMinWidth = 28
        })
    };
end;
local function v10(v9)
    print("isExpanded: ", v9);
end;
return {
    summary = "An expandable teaser.",
    stories = {
        {
            name = "Expandable",
            story = function()
                return v1.createElement(v6, {}, {
                    v1.createElement("Frame", {
                        AutomaticSize = Enum.AutomaticSize.Y,
                        BackgroundTransparency = 1,
                        Size = UDim2.new(1, 0, 0, 0)
                    }, {
                        ExpandableTeaser = v1.createElement(v3, {
                            OnExpandChanged = v10,
                            Title = "Expandable",
                            TeaserSize = Vector2.new(0, 10)
                        }, (v7()))
                    })
                });
            end
        },
        {
            name = "Search Pills",
            story = function()
                return v1.createElement(v6, {}, {
                    v1.createElement("Frame", {
                        AutomaticSize = Enum.AutomaticSize.Y,
                        BackgroundTransparency = 1,
                        Size = UDim2.new(1, 0, 0, 0)
                    }, {
                        ExpandableTeaser = v1.createElement(v3, {
                            OnExpandChanged = v10,
                            Title = "Top Searches",
                            TeaserSize = Vector2.new(0, 28)
                        }, (v8()))
                    })
                });
            end
        }
    }
};


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Core.Components.Font.FontTile);
local v2 = require(l_Parent_0.TestUtils.MockItems);
local v3 = require(l_Parent_0.Packages.Roact);
local v4 = require(l_Parent_0.Stories.ToolboxStoryWrapper);
local v5 = v2.getSimpleAsset(11322590111, "Roboto");
return {
    name = "FontTile",
    summary = "A FontTile component used in the grid view",
    story = function()
        return v3.createElement(v4, {}, {
            Frame = v3.createElement("Frame", {
                AutomaticSize = Enum.AutomaticSize.Y,
                BackgroundColor3 = Color3.new(255, 255, 255),
                Size = UDim2.new(1, 0, 0, 0)
            }, {
                List = v3.createElement(v1, {
                    AssetInfo = v5
                }),
                Padding = v3.createElement("UIPadding", {
                    PaddingTop = UDim.new(0, 10),
                    PaddingBottom = UDim.new(0, 10),
                    PaddingLeft = UDim.new(0, 10),
                    PaddingRight = UDim.new(0, 10)
                })
            })
        });
    end
};


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Stories.ToolboxStoryWrapper);
local v3 = require(l_Parent_0.Core.Components.Categorization.HorizontalList);
return {
    name = "HorizontalList",
    summary = "A generic horizontal list that sizes itself to the size of its content",
    story = function()
        return v1.createElement(v2, {}, {
            Frame = v1.createElement("Frame", {
                BackgroundTransparency = 1,
                Size = UDim2.new(0, 600, 0, 60)
            }, {
                List = v1.createElement(v3, {
                    DefaultHeight = 50,
                    Data = {
                        "This",
                        "is",
                        "a",
                        "test"
                    },
                    OnRenderItem = function(v4, v5)
                        return v1.createElement("TextLabel", {
                            Size = UDim2.new(0, 50, 0, 50),
                            Text = v5,
                            LayoutOrder = v4
                        });
                    end
                })
            })
        });
    end
};


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Core.Components.Home.NavigationContainer);
local v3 = require(l_Parent_0.Stories.ToolboxStoryWrapper);
return {
    name = "NavigationContainer",
    summary = "A container that hosts all of the navigation routes.",
    story = function()
        return v1.createElement(v3, {}, {
            Container = v1.createElement(v2)
        });
    end
};


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Stories.ToolboxStoryWrapper);
local v3 = require(l_Parent_0.Core.Components.Categorization.SearchPill);
local function v5(v4)
    return v1.createElement(v2, v4);
end;
return {
    summary = "A generic search pill.",
    stories = {
        {
            name = "Clickable",
            story = function()
                return v1.createElement(v5, {}, {
                    SearchPill = v1.createElement(v3, {
                        AutomaticSize = Enum.AutomaticSize.XY,
                        Text = "Clickable",
                        OnClick = function()
                            print("Clicked");
                        end
                    })
                });
            end
        },
        {
            name = "Constant Size",
            story = function()
                return v1.createElement(v5, {}, {
                    SearchPill = v1.createElement(v3, {
                        Text = "Size 100x50",
                        Size = UDim2.new(0, 100, 0, 50)
                    })
                });
            end
        }
    }
};


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Stories.ToolboxStoryWrapper);
local v3 = require(l_Parent_0.Core.Components.Categorization.SectionHeader);
return {
    name = "SectionHeader",
    summary = "A header shown at the top of a swimlane.",
    story = function()
        return v1.createElement(v2, {}, {
            EmptyFrame = v1.createElement("Frame", {
                BackgroundTransparency = 1,
                Size = UDim2.new(0, 400, 0, 100)
            }, {
                SectionHeader = v1.createElement(v3, {
                    OnClickSeeAll = function()
                        print("'See All' button pressed");
                    end,
                    Position = UDim2.new(0, 0, 0, 0),
                    Title = "This is a test"
                })
            })
        });
    end
};


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Stories.ToolboxStoryWrapper);
local v3 = require(l_Parent_0.Core.Components.Categorization.SubcategoriesView);
local function v5(v4)
    return v1.createElement(v2, v4);
end;
return {
    summary = "A grid of Subcategory IconTiles with flexible widths.",
    stories = {
        {
            name = "SubcategoriesView",
            summary = "Example with 5 subcategories.",
            story = function()
                return v1.createElement(v5, {}, {
                    IconTile = v1.createElement(v3, {
                        Size = UDim2.new(1, 0, 0, 200),
                        SubcategoryDict = {
                            {
                                displayName = "Category",
                                children = {},
                                childCount = 0,
                                index = 1,
                                name = "1",
                                path = {},
                                thumbnail = {
                                    assetId = 5657301130,
                                    backgroundColor = "#32a852"
                                }
                            },
                            {
                                displayName = "Vehicle",
                                children = {},
                                childCount = 0,
                                index = 2,
                                name = "2",
                                path = {},
                                thumbnail = {
                                    assetId = 5657301130,
                                    backgroundColor = "#32a852"
                                }
                            },
                            {
                                displayName = "3rd",
                                children = {},
                                childCount = 0,
                                index = 3,
                                name = "3",
                                path = {},
                                thumbnail = {
                                    assetId = 5657301130,
                                    backgroundColor = "#32a852"
                                }
                            },
                            {
                                displayName = "4",
                                children = {},
                                childCount = 0,
                                index = 3,
                                name = "4",
                                path = {},
                                thumbnail = {
                                    assetId = 5657301130,
                                    backgroundColor = "#32a852"
                                }
                            },
                            {
                                displayName = "5",
                                children = {},
                                childCount = 0,
                                name = "5",
                                index = 3,
                                path = {},
                                thumbnail = {
                                    assetId = 5657301130,
                                    backgroundColor = "#32a852"
                                }
                            }
                        }
                    })
                });
            end
        }
    }
};


local l_Parent_0 = script.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Core.Components.Categorization.Swimlane);
local v3 = require(l_Parent_0.Stories.ToolboxStoryWrapper);
local v4 = require(l_Parent_0.Core.Components.Categorization.IconTile);
local function _(v5)
    return function()
        return v1.createElement(v3, {}, {
            Example = v1.createElement(v2, v5)
        });
    end;
end;
local function v9(v7, v8)
    return {
        BackgroundColor = Color3.fromRGB(math.random(255), math.random(255), math.random(255)),
        Image = "rbxassetid://6002241241",
        Key = v7,
        Title = v8
    };
end;
local v10 = {
    summary = "A section with a title, horizontal list, and optional 'see all' button"
};
local v11 = {};
local v12 = {
    name = "Simple example",
    summary = "a general example with data"
};
local v15 = {
    Data = {
        "This",
        "is",
        "a",
        "test"
    },
    Total = 123,
    Title = "Just a bunch of Frames",
    OnClickSeeAll = function()
        print("See All");
    end,
    OnRenderItem = function(v13, v14)
        return v1.createElement("TextLabel", {
            LayoutOrder = v13,
            Size = UDim2.new(0, 100, 0, 100),
            Text = v14
        });
    end
};
v12.story = function()
    return v1.createElement(v3, {}, {
        Example = v1.createElement(v2, v15)
    });
end;
local v16 = {
    name = "Icon Tiles",
    summary = "Tiles that represent products to buy"
};
local v20 = {
    Data = {
        v9("1", "Blonde Hair"),
        v9("2", "Cool Blonde Hair"),
        v9("3", "Original Blonde"),
        v9("4", "Blonde"),
        v9("5", "Blondie"),
        v9("6", "Bulond"),
        v9("7", "Blund"),
        v9("8", "Real Blonde"),
        v9("9", "Blond"),
        (v9("10", "Blonde"))
    },
    Title = "Check Out This Hair",
    Total = 12341115,
    OnClickSeeAll = function()
        print("See All");
    end,
    OnRenderItem = function(v17, v18)
        return v1.createElement(v4, {
            LayoutOrder = v17,
            BackgroundColor = v18.BackgroundColor,
            Image = v18.Image,
            Key = v18.Key,
            Title = v18.Title,
            Size = UDim2.new(0, 90, 0, 105),
            OnClick = function(v19)
                print(v17, v19);
            end
        });
    end
};
v16.story = function()
    return v1.createElement(v3, {}, {
        Example = v1.createElement(v2, v20)
    });
end;
setlist { ['R008[1 to 2]'] = 'R009 to R010' };
v10.stories = v11;
return v10;


local l_Parent_0 = script.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
return {
    name = "Toolbox",
    mapStory = require(l_Packages_0.Framework).UI.Stories.getStoryMiddleware(),
    storyRoots = {
        l_Parent_0.Stories,
        l_Parent_0.Core.Components
    },
    roact = require(l_Packages_0.Roact)
};


local l_Parent_0 = script.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.Rodux);
local v4 = require(l_Packages_0.Framework);
local l_Networking_0 = v4.Http.Networking;
local l_ContextServices_0 = v4.ContextServices;
local l_ThemeSwitcher_0 = v4.Style.ThemeSwitcher;
local l_Signal_0 = v4.Util.Signal;
local v9 = require(l_Parent_0.Core.Util.Settings);
local v10 = require(l_Parent_0.Core.Util.ToolboxTheme);
local v11 = require(l_Parent_0.Core.Reducers.ToolboxReducer);
local v12 = require(l_Parent_0.Core.Networking.NetworkInterfaceMock);
local v13 = require(l_Parent_0.Core.Util.Analytics.AssetAnalyticsContextItem);
local v14 = require(l_Parent_0.Core.Util.Analytics.AssetAnalytics);
local v15 = require(l_Parent_0.Core.Components.ExternalServicesWrapper);
local v16 = require(l_Parent_0.Core.ContextServices.Settings);
local v17 = require(l_Parent_0.Core.Util.makeTheme);
local v18 = require(l_Parent_0.Core.Themes.getAssetConfigTheme);
local v19 = require(l_Parent_0.TestUtils.CoreTestUtils);
return function(v20)
    local v21 = v20.store or v3.Store.new(v11, nil, (v19.createThunkMiddleware()));
    if v20.storeSetup then
        v20.storeSetup(v21);
    end;
    local v22 = v20.pluginGui or nil;
    local v23 = v20.settings or v9.new(plugin);
    return v2.createElement(v15, {
        store = v21,
        plugin = plugin,
        pluginGui = v22,
        settings = v23,
        theme = v20.legacyTheme or v10.createDummyThemeManager(),
        networkInterface = v20.networkInterface or v12.new()
    }, {
        l_ContextServices_0.provide({
            l_ContextServices_0.Store.new(v21),
            v16.new(v23),
            l_ContextServices_0.API.new({
                networking = l_Networking_0.mock()
            }),
            v13.new(v20.assetAnalytics or v14.mock()),
            v17(v18(), l_ThemeSwitcher_0),
            (l_ContextServices_0.Localization.new({
                stringResourceTable = l_Parent_0.LocalizationSource.SourceStrings,
                translationResourceTable = l_Parent_0.LocalizationSource.LocalizedStrings,
                pluginName = "Toolbox",
                libraries = {
                    [v4.Resources.LOCALIZATION_PROJECT_NAME] = {
                        stringResourceTable = v4.Resources.SourceStrings,
                        translationResourceTable = v4.Resources.LocalizedStrings
                    }
                },
                overrideGetLocale = function()
                    return "en-us";
                end,
                overrideLocaleId = "en-us",
                overrideLocaleChangedSignal = l_Signal_0.new()
            }))
        }, v20[v2.Children])
    });
end;


local v0 = require(script:FindFirstAncestor("Toolbox").Packages.Roact);
local v1 = v0.PureComponent:extend("ClickToShowInteractiveStoryWrapper");
v1.init = function(v2)
    v2.state = {
        isShowing = not not v2.props.IsShownByDefault and v2.props.IsShownByDefault
    };
    v2.toggleIsShowing = function()
        v2:setState(function(v3)
            return {
                isShowing = not v3.isShowing
            };
        end);
    end;
end;
v1.render = function(v4)
    local l_props_0 = v4.props;
    local l_state_0 = v4.state;
    return v0.createElement("Frame", {
        AutomaticSize = Enum.AutomaticSize.Y,
        BackgroundTransparency = 1,
        Size = UDim2.new(1, 0, 0, 0)
    }, {
        Button = v0.createElement("TextButton", {
            Size = UDim2.fromOffset(200, 50),
            Text = "Click to View Component",
            [v0.Event.Activated] = v4.toggleIsShowing
        }),
        SearchOption = if not l_state_0.isShowing then nil else l_props_0.OnRender(l_state_0.isShowing, v4.toggleIsShowing)
    });
end;
return v1;


local l_Packages_0 = script.Parent.Parent.Packages;
local v1 = require(l_Packages_0.Roact);
local l_ThunkWithArgsMiddleware_0 = require(l_Packages_0.Framework).Util.ThunkWithArgsMiddleware;
return {
    createThunkMiddleware = function()
        return {
            l_ThunkWithArgsMiddleware_0({
                StudioAssetService = {
                    DEPRECATED_SerializeInstances = function(_, v4)
                        assert(typeof(v4) == "table", "Instances must be a table");
                        for _, v6 in ipairs(v4) do
                            assert(v6:IsA("Instance"));
                        end;
                        return "TEST";
                    end
                }
            })
        };
    end,
    mustSetFlag = function(v7, v8)
        return v1.createElement("TextLabel", {
            Text = string.format("You must set %s to %s to view this story", v7, (tostring(v8))),
            Size = UDim2.new(1, 0, 0, 100),
            TextSize = 18,
            TextWrapped = true,
            BackgroundTransparency = 1
        });
    end
};


local v2 = {
    getSimpleAsset = function(v0, v1)
        return {
            Asset = {
                Id = v0,
                Name = v1 or "Observation Tower",
                Description = "asset description",
                TypeId = 10,
                IsEndorsed = true
            },
            Creator = {
                Id = v0,
                Name = "Roblox",
                Type = 1
            },
            Thumbnail = {
                Final = true,
                Url = "rbxasset://textures/StudioToolbox/Animation.png",
                RetryUrl = nil,
                UserId = 0,
                EndpointType = "Avatar"
            },
            Voting = {
                ShowVotes = true,
                UpVotes = 4506,
                DownVotes = 581,
                CanVote = true,
                UserVote = true,
                HasVoted = true,
                ReasonForNotVoteable = ""
            }
        };
    end
};
v2.getSimpleAudioAsset = function(v3, v4)
    local v5 = v2.getSimpleAsset(v3, v4);
    v5.AudioDetails = {
        Artist = "Artist",
        MusicAlbum = "Album",
        MusicGenre = "atmosphere",
        SoundEffectCategory = "Instrument",
        SoundEffectSubcategory = "Drums"
    };
    return v5;
end;
v2.getPreviewAsset = function(v6, v7)
    v7 = v7 or "Observation Tower";
    return {
        Asset = {
            Id = v6,
            Name = "Observation Tower",
            TypeId = 10,
            IsEndorsed = true,
            AssetGenres = "",
            Description = "mocked asset item",
            Created = "2019-05-01T00:37:18.59Z",
            Updated = "2021-05-06T19:56:54.437Z"
        },
        Creator = {
            Id = v6,
            Name = "Roblox",
            Type = 1
        },
        Thumbnail = {
            Final = true,
            Url = "rbxasset://textures/StudioToolbox/Animation.png",
            RetryUrl = nil,
            UserId = 0,
            EndpointType = "Avatar"
        },
        Voting = {
            ShowVotes = true,
            UpVotes = 4506,
            DownVotes = 581,
            CanVote = true,
            UserVote = true,
            HasVoted = true,
            ReasonForNotVoteable = ""
        }
    };
end;
v2.getFontFamilyAsset = function(v8, v9)
    v9 = v9 or "Comic Sans";
    return {
        Asset = {
            AssetGenres = "",
            Created = "2019-05-01T00:37:18.59Z",
            Description = "mocked FontFamily Asset",
            Id = v8,
            IsEndorsed = true,
            Name = "Comic Sans",
            TypeId = 73,
            Updated = "2021-05-06T19:56:54.437Z"
        },
        Creator = {
            Id = v8,
            Name = "Roblox",
            Type = 1
        },
        Thumbnail = {
            EndpointType = "Avatar",
            Final = true,
            RetryUrl = nil,
            Url = "rbxasset://textures/StudioToolbox/Animation.png",
            UserId = 0
        },
        Voting = {}
    };
end;
return v2;


if plugin then
    local l_Parent_0 = script.Parent.Parent;
    local v1 = require(l_Parent_0.Packages.TestLoader);
    v1.launch("TutorialLinks", l_Parent_0.Src);
    if not v1.isCli() then
        local l_StarterGui_0 = game:GetService("StarterGui");
        local v3 = require(l_Parent_0.Src.Links);
        pcall(function()
            v3.addLinks(l_StarterGui_0);
        end);
        plugin.Unloading:Connect(function()
            v3.removeLinks();
        end);
        return ;
    else
        return ;
    end;
else
    return ;
end;


local l_GuiService_0 = game:GetService("GuiService");
local _ = game:GetService("HttpRbxApiService");
local l_insert_0 = table.insert;
local v3 = {
    connections = {}
};
v3.addLinks = function(v4)
    for _, v6 in ipairs((v4:GetChildren())) do
        if not (not v6:IsA("BillboardGui") and not v6:IsA("SurfaceGui")) then
            v3.addGui(v6);
        end;
    end;
end;
v3.removeLinks = function()
    for _, v8 in ipairs(v3.connections) do
        v8:Disconnect();
    end;
    v3.connections = {};
end;
v3.addGui = function(v9)
    for _, v11 in ipairs((v9:GetChildren())) do
        if v11:IsA("TextButton") then
            v3.addLink(v11);
        end;
    end;
end;
v3.addLink = function(v12)
    if v12:GetAttribute("TutorialLink") then
        l_insert_0(v3.connections, (v12.Activated:Connect(function()
            l_GuiService_0:OpenBrowserWindow("https://create.roblox.com/" .. v12:GetAttribute("TutorialLink"));
        end)));
    end;
end;
return v3;


local v0 = {};
local _ = require(script.Parent.FFlag);
local v2 = nil;
local v3 = nil;
local v4 = nil;
local v5 = nil;
local v6 = nil;
local v7 = nil;
local v8 = nil;
local v9 = nil;
local v10 = nil;
v0.onMoveBegan = function(_, _)
    v3:hide();
    v9:setVisible(false);
end;
v0.onMoveChanged = function(_, _)
    v7:update();
    v7:setVisible(true);
end;
v0.onMoveEnded = function(_, _)
    v3:updatePosition();
    v3:show();
    v9:updatePosition();
    v9:setVisible(true);
end;
v0.onResizeBegan = function(_, _)
end;
v0.onResizeChanged = function(_, _)
    v7:update();
    v9:update();
end;
v0.onResizeEnded = function(_, _)
end;
v0.onRotateBegan = function(_, _)
    v7:setVisible(false);
    v3:hide();
    v9:setVisible(false);
end;
v0.onRotateChanged = function(_, v26)
    v8:update(v26, v4:getRotation());
end;
v0.onRotateEnded = function(_, _)
    v3:updatePosition();
    v3:show();
    v9:setVisible(true);
    v7:update();
    v7:setVisible(true);
end;
v0.onRubberbandBegan = function(_, _)
    v3:hide();
    v9:setVisible(false);
    v7:setVisible(false);
    v10:setSuppressFilteredSelectionChanged(true);
end;
v0.onRubberbandEnded = function(_)
    v10:setSuppressFilteredSelectionChanged(false);
end;
v0.onTextEditorBegan = function(_)
    v7:setVisible(false);
    v3:hide();
    v9:setVisible(false);
end;
v0.onTextEditorEnded = function(_)
    v7:setVisible(true);
    v3:show();
    v9:setVisible(true);
end;
v0.setMove = function(_, v35)
    v2 = v35;
end;
v0.setRotate = function(_, v37)
    v4 = v37;
end;
v0.setResize = function(_, v39)
    v3 = v39;
end;
v0.setRubberband = function(_, v41)
    v5 = v41;
end;
v0.setTextEditor = function(_, v43)
    v6 = v43;
end;
v0.setDistanceLinesManager = function(_, v45)
    v7 = v45;
end;
v0.setRotationBox = function(_, v47)
    v8 = v47;
end;
v0.setSizeBox = function(_, v49)
    v9 = v49;
end;
v0.setSelectionManager = function(_, v51)
    v10 = v51;
end;
return v0;


local v0 = require(script.Parent.CoreGuiManager);
local v1 = require(script.Parent.Enum.Direction);
local v2 = require(script.Parent.Extents2D);
local _ = require(script.Parent.FFlag);
local v4 = require(script.Parent.SelectionManager);
local v5 = require(script.Parent.Utility);
local v6 = nil;
local v7 = nil;
local v8 = nil;
local v9 = nil;
local v10 = nil;
local v11 = nil;
local v12 = {};
local v13 = {};
local v14 = Color3.fromRGB(255, 255, 255);
local v15 = Color3.fromRGB(136, 136, 136);
local v16 = Color3.fromRGB(222, 222, 222);
local l_game_FastFlag_0 = game:GetFastFlag("StudioUIEditorDontClipOutsideSafeArea", false);
local v18 = {
    [v1.E] = Vector2.new(0, 0.5),
    [v1.SE] = Vector2.new(0, 0),
    [v1.S] = Vector2.new(0.5, 0),
    [v1.SW] = Vector2.new(1, 0),
    [v1.W] = Vector2.new(1, 0.5),
    [v1.NW] = Vector2.new(1, 1),
    [v1.N] = Vector2.new(0.5, 1),
    [v1.NE] = Vector2.new(0, 1)
};
local v19 = {
    [v1.E] = UDim2.new(1, -2, 0.5, 0),
    [v1.SE] = UDim2.new(1, -2, 1, -2),
    [v1.S] = UDim2.new(0.5, 0, 1, -2),
    [v1.SW] = UDim2.new(0, 2, 1, -2),
    [v1.W] = UDim2.new(0, 2, 0.5, 0),
    [v1.NW] = UDim2.new(0, 2, 0, 2),
    [v1.N] = UDim2.new(0.5, 0, 0, 2),
    [v1.NE] = UDim2.new(1, -2, 0, 2)
};
local v20 = {
    Vector2.new(0, 0.5),
    Vector2.new(0.5, 0),
    Vector2.new(1, 0.5),
    Vector2.new(0.5, 1)
};
local v21 = {
    UDim2.new(1, 0, 0.5, 0),
    UDim2.new(0.5, 0, 1, 0),
    UDim2.new(0, 0, 0.5, 0),
    UDim2.new(0.5, 0, 0, 0)
};
local v22 = {
    UDim2.new(0, 1, 1, 2),
    UDim2.new(1, 2, 0, 1),
    UDim2.new(0, 1, 1, 2),
    UDim2.new(1, 2, 0, 1)
};
local function v24()
    local l_ImageLabel_0 = Instance.new("ImageLabel");
    l_ImageLabel_0.BorderSizePixel = 0;
    l_ImageLabel_0.BackgroundTransparency = 1;
    l_ImageLabel_0.Image = "rbxasset://textures/blockUpperLeft.png";
    l_ImageLabel_0.ScaleType = Enum.ScaleType.Tile;
    l_ImageLabel_0.TileSize = UDim2.new(0, 16, 0, 16);
    l_ImageLabel_0.AnchorPoint = Vector2.new(0.5, 0.5);
    l_ImageLabel_0.ImageColor3 = Color3.new(0.8, 0.8, 0.8);
    l_ImageLabel_0.Parent = v0:findOrCreateScreenGui("Adornments");
    return l_ImageLabel_0;
end;
local function v26()
    local l_Frame_0 = Instance.new("Frame");
    l_Frame_0.BorderSizePixel = 0;
    l_Frame_0.BackgroundColor3 = Color3.new(0, 0, 0);
    l_Frame_0.AnchorPoint = Vector2.new(0.5, 0.5);
    l_Frame_0.Parent = v0:findOrCreateScreenGui("Adornments");
    return l_Frame_0;
end;
local function _()
    return #v12 > 0;
end;
local function v29(v28)
    v11 = Instance.new("Frame");
    v11.Name = v28;
    v11.AnchorPoint = Vector2.new(0, 0);
    v11.BackgroundTransparency = 1;
    v11.BackgroundColor3 = Color3.new(0, 0, 255);
    v11.BorderSizePixel = 0;
end;
local function v34(v30)
    for v31 = v1.FIRST, v1.LAST do
        local l_Frame_1 = Instance.new("Frame");
        l_Frame_1.Name = v30 .. "Handle_" .. v1:toShortName(v31);
        l_Frame_1.AnchorPoint = v18[v31];
        l_Frame_1.Size = UDim2.new(0, 8, 0, 8);
        l_Frame_1.Position = v19[v31];
        l_Frame_1.BackgroundColor3 = v14;
        l_Frame_1.BorderColor3 = v15;
        l_Frame_1.ZIndex = 3;
        local l_ImageLabel_1 = Instance.new("ImageLabel");
        l_ImageLabel_1.Image = "rbxasset://textures/StudioUIEditor/resizeHandleDropShadow.png";
        l_ImageLabel_1.Name = "ResizeHandleDropShadow_" .. v1:toShortName(v31);
        l_ImageLabel_1.Size = UDim2.new(0, 16, 0, 16);
        l_ImageLabel_1.Position = UDim2.new(0, -4, 0, -3);
        l_ImageLabel_1.BackgroundTransparency = 1;
        l_ImageLabel_1.BorderSizePixel = 0;
        l_ImageLabel_1.ImageColor3 = Color3.fromRGB(0, 0, 0);
        l_ImageLabel_1.ImageTransparency = 0.6;
        l_ImageLabel_1.ScaleType = Enum.ScaleType.Slice;
        l_ImageLabel_1.SliceCenter = Rect.new(4, 4, 12, 12);
        l_ImageLabel_1.ZIndex = 2;
        l_ImageLabel_1.Parent = l_Frame_1;
        l_Frame_1.Parent = v11;
        v12[v31] = l_Frame_1;
    end;
end;
local function v37()
    for v35 = 1, 4 do
        local l_Frame_2 = Instance.new("Frame");
        l_Frame_2.AnchorPoint = v20[v35];
        l_Frame_2.BackgroundColor3 = v16;
        l_Frame_2.BorderSizePixel = 0;
        l_Frame_2.Position = v21[v35];
        l_Frame_2.Size = v22[v35];
        v13[v35] = l_Frame_2;
        v13[v35].Parent = v11;
    end;
end;
local v38 = {};
local v39 = {};
v38.showSnappingLine = function(_, v41)
    local v42 = v24();
    v42.AnchorPoint = Vector2.new(0, 0);
    v42.Position = UDim2.new(0, v41[1].X, 0, v41[1].Y);
    v42.Size = UDim2.new(0, math.max(1, v5:distance(v41[1].X, v41[2].X)), 0, (math.max(1, v5:distance(v41[1].Y, v41[2].Y))));
    v42.ImageColor3 = v41[3];
    table.insert(v39, v42);
end;
v38.hideSnappingLines = function(_)
    for v44 = 1, #v39 do
        v39[v44]:Destroy();
    end;
    v39 = {};
end;
v38.showXSnappingLine = function(_, v46, v47)
    if not v8 then
        v8 = v26();
    end;
    v8.Visible = true;
    v8.Size = UDim2.new(0, 1, 0, v47);
    v8.Position = UDim2.new(0, v46.X, 0, v46.Y);
end;
v38.showYSnappingLine = function(_, v49, v50)
    if not v9 then
        v9 = v26();
    end;
    v9.Visible = true;
    v9.Size = UDim2.new(0, v50, 0, 1);
    v9.Position = UDim2.new(0, v49.X, 0, v49.Y);
end;
v38.hideXSnappingLine = function(_)
    if v8 then
        v8.Visible = false;
    end;
end;
v38.hideYSnappingLine = function(_)
    if v9 then
        v9.Visible = false;
    end;
end;
v38.showOfferReparentAdornments = function(_, v54, v55)
    if not v6 then
        v6 = v54:Clone();
        v6.AnchorPoint = Vector2.new(0, 0);
        v6.ZIndex = 3;
        v7 = v26();
        v7.BackgroundColor3 = Color3.new(0, 0, 0);
        v7.BackgroundTransparency = 0.8;
        v7.AnchorPoint = Vector2.new(0, 0);
        v7.ZIndex = 2;
    end;
    v6.Parent = v0:findOrCreateScreenGui("Adornments");
    v6.Position = UDim2.new(0, v54.AbsolutePosition.X, 0, v54.AbsolutePosition.Y);
    v6.Size = UDim2.new(0, v54.AbsoluteSize.X, 0, v54.AbsoluteSize.Y);
    v7.Position = UDim2.new(0, v55.AbsolutePosition.X, 0, v55.AbsolutePosition.Y);
    v7.Size = UDim2.new(0, v55.AbsoluteSize.X, 0, v55.AbsoluteSize.Y);
end;
v38.hideOfferReparent = function(_)
    if v6 then
        v6:Destroy();
        v7:Destroy();
        v6 = nil;
        v7 = nil;
    end;
end;
v38.showSelection = function(_)
    if not ((not v10 or not v4:hasFilteredSelection()) or v10.Enabled) then
        v10.Enabled = true;
    end;
end;
v38.hideSelection = function(_)
    if not (not v10 or not v10.Enabled) then
        v10.Enabled = false;
    end;
end;
v38.updateSelectionPosition = function(_)
    local v60 = v4:getFilteredSelection();
    if not (v10 ~= nil) or #v60 == 0 then
        return ;
    else
        v38:updateSelectionAdorns(v2:getExtentsFromGuis(v60));
        return ;
    end;
end;
v38.createSelectionAdorns = function(_)
    if not (#v12 > 0) then
        local v62 = v0:findOrCreateFolder("m_handles");
        if not v10 then
            v10 = Instance.new("ScreenGui", v62);
            v10.Enabled = false;
            if l_game_FastFlag_0 then
                v10.ClipToDeviceSafeArea = false;
                v10.SafeAreaCompatibility = Enum.SafeAreaCompatibility.None;
            end;
        end;
        v29("UIEditorSelectionHandleParent");
        v11.Parent = v10;
        v34("Selection");
        v37();
        v38:updateSelectionAdorns(v2:getExtentsFromGuis(v4:getFilteredSelection()));
        v10.Enabled = true;
        return ;
    else
        return ;
    end;
end;
v38.updateSelectionAdorns = function(_, v64)
    local l_Size_0 = v64.Size;
    local l_TopLeft_0 = v64.TopLeft;
    v11.Position = UDim2.new(0, l_TopLeft_0.X, 0, l_TopLeft_0.Y);
    v11.Size = UDim2.new(0, l_Size_0.X, 0, l_Size_0.Y);
    local v67 = v4:getFilteredSelection();
    if #v67 == 1 then
        v11.Rotation = v67[1].AbsoluteRotation;
        return ;
    else
        v11.Rotation = 0;
        return ;
    end;
end;
v38.deleteSelectionAdorns = function(_)
    for v69 = 1, #v12 do
        v12[v69]:Destroy();
    end;
    for v70 = 1, #v13 do
        v13[v70]:Destroy();
    end;
    v12 = {};
    v13 = {};
    if v11 then
        v11:Destroy();
        v11 = nil;
    end;
    if v10 then
        v10:Destroy();
        v10 = nil;
    end;
end;
return v38;


local l_status_0, l_result_0 = pcall(function()
    return game:GetService("RbxAnalyticsService");
end);
return {
    reportEvent = function(_, v3)
        if l_status_0 and l_result_0 then
            l_result_0:TrackEvent("Studio", "UIEditorAction", v3);
            return ;
        else
            return ;
        end;
    end
};


local v0 = require(script.Parent.Utility);
return {
    convertAbsoluteSizeToScaleOrOffset = function(_, v2, v3, v4, v5)
        local _ = v4;
        local l_UIPadding_0 = v5:FindFirstChildWhichIsA("UIPadding");
        local l_zero_0 = Vector2.zero;
        local l_zero_1 = Vector2.zero;
        if l_UIPadding_0 then
            l_zero_0 = v0:multUDimWithVector(UDim2.new(l_UIPadding_0.PaddingLeft, l_UIPadding_0.PaddingTop), v5.AbsoluteSize);
            l_zero_1 = v0:multUDimWithVector(UDim2.new(l_UIPadding_0.PaddingRight, l_UIPadding_0.PaddingBottom), v5.AbsoluteSize);
        end;
        local v10 = (v5.AbsoluteSize - l_zero_0) - l_zero_1;
        local v11 = 1;
        local v12 = 1;
        if v10.X ~= 0 then
            v11 = v10.X;
        end;
        if v10.Y ~= 0 then
            v12 = v10.Y;
        end;
        v10 = Vector2.new(v11, v12);
        if not v2 then
            local v13 = v3 - Vector2.new(v4.X.Scale, v4.Y.Scale) * v5.AbsoluteSize;
            return (UDim2.new(v4.X.Scale, v13.X, v4.Y.Scale, v13.Y));
        else
            local v14 = (v3 - Vector2.new(v4.X.Offset, v4.Y.Offset)) / v10;
            return (UDim2.new(v14.X, v4.X.Offset, v14.Y, v4.Y.Offset));
        end;
    end,
    convertAbsolutePositionToScaleOrOffset = function(_, v16, v17, v18, v19, v20, v21)
        local _ = v19;
        local l_UIPadding_1 = v20:FindFirstChildWhichIsA("UIPadding");
        local l_zero_2 = Vector2.zero;
        local l_zero_3 = Vector2.zero;
        if l_UIPadding_1 then
            l_zero_2 = v0:multUDimWithVector(UDim2.new(l_UIPadding_1.PaddingLeft, l_UIPadding_1.PaddingTop), v20.AbsoluteSize);
            l_zero_3 = v0:multUDimWithVector(UDim2.new(l_UIPadding_1.PaddingRight, l_UIPadding_1.PaddingBottom), v20.AbsoluteSize);
        end;
        local v26 = v18 / 2;
        local v27 = (v17 + v26) - v0:rotate(v26, Vector2.zero, v20.AbsoluteRotation);
        local v28 = v20.AbsoluteSize / 2;
        local v29 = v0:rotate((v27 - ((v20.AbsolutePosition + v28) - v0:rotate(v28, Vector2.zero, v20.AbsoluteRotation))) + v0:rotate(v21 * v18, Vector2.zero, v20.AbsoluteRotation), Vector2.zero, -v20.AbsoluteRotation);
        local v30 = (v20.AbsoluteSize - l_zero_2) - l_zero_3;
        local v31 = 1;
        local v32 = 1;
        if v30.X ~= 0 then
            v31 = v30.X;
        end;
        if v30.Y ~= 0 then
            v32 = v30.Y;
        end;
        v30 = Vector2.new(v31, v32);
        if not v16 then
            local v33 = (v29 - l_zero_2) - Vector2.new(v19.X.Scale, v19.Y.Scale) * v20.AbsoluteSize;
            return (UDim2.new(v19.X.Scale, v33.X, v19.Y.Scale, v33.Y));
        else
            local v34 = ((v29 - l_zero_2) - Vector2.new(v19.X.Offset, v19.Y.Offset)) / v30;
            return (UDim2.new(v34.X, v19.X.Offset, v34.Y, v19.Y.Offset));
        end;
    end,
    convertAbsoluteToScaleOrOffset = function(v35, v36, v37, v38, v39, v40, v41, v42, v43)
        return v35:convertAbsolutePositionToScaleOrOffset(v36, v38, v39, v40, v42, v43), (v35:convertAbsoluteSizeToScaleOrOffset(v37, v39, v41, v42));
    end
};


local l_game_FastFlag_0 = game:GetFastFlag("StudioUIEditorDontClipOutsideSafeArea", false);
local v1 = nil;
local l_CoreGui_0 = game:GetService("CoreGui");
local function _(v3, v4)
    local l_Folder_0 = Instance.new("Folder");
    l_Folder_0.Name = v3;
    l_Folder_0.Parent = v4;
    return l_Folder_0;
end;
local function _(v7, v8)
    local l_ScreenGui_0 = Instance.new("ScreenGui");
    l_ScreenGui_0.Name = v7;
    l_ScreenGui_0.Parent = v8;
    if l_game_FastFlag_0 then
        l_ScreenGui_0.ClipToDeviceSafeArea = false;
        l_ScreenGui_0.SafeAreaCompatibility = Enum.SafeAreaCompatibility.None;
    end;
    return l_ScreenGui_0;
end;
local function _()
    if not v1 then
        local l_l_CoreGui_0_0 = l_CoreGui_0;
        local l_Folder_1 = Instance.new("Folder");
        l_Folder_1.Name = "RobloxGUIEditor";
        l_Folder_1.Parent = l_l_CoreGui_0_0;
        v1 = l_Folder_1;
    end;
    return v1;
end;
return {
    findOrCreateFolder = function(_, v15)
        if not v1 then
            local l_l_CoreGui_0_1 = l_CoreGui_0;
            local l_Folder_2 = Instance.new("Folder");
            l_Folder_2.Name = "RobloxGUIEditor";
            l_Folder_2.Parent = l_l_CoreGui_0_1;
            v1 = l_Folder_2;
        end;
        local l_v1_FirstChild_0 = v1:FindFirstChild(v15);
        if not l_v1_FirstChild_0 then
            if not v1 then
                local l_l_CoreGui_0_2 = l_CoreGui_0;
                local l_Folder_3 = Instance.new("Folder");
                l_Folder_3.Name = "RobloxGUIEditor";
                l_Folder_3.Parent = l_l_CoreGui_0_2;
                v1 = l_Folder_3;
            end;
            local l_v1_0 = v1;
            local l_Folder_4 = Instance.new("Folder");
            l_Folder_4.Name = v15;
            l_Folder_4.Parent = l_v1_0;
            l_v1_FirstChild_0 = l_Folder_4;
        end;
        return l_v1_FirstChild_0;
    end,
    findOrCreateScreenGui = function(_, v24)
        if not v1 then
            local l_l_CoreGui_0_3 = l_CoreGui_0;
            local l_Folder_5 = Instance.new("Folder");
            l_Folder_5.Name = "RobloxGUIEditor";
            l_Folder_5.Parent = l_l_CoreGui_0_3;
            v1 = l_Folder_5;
        end;
        local l_v1_FirstChild_1 = v1:FindFirstChild(v24);
        if not l_v1_FirstChild_1 then
            if not v1 then
                local l_l_CoreGui_0_4 = l_CoreGui_0;
                local l_Folder_6 = Instance.new("Folder");
                l_Folder_6.Name = "RobloxGUIEditor";
                l_Folder_6.Parent = l_l_CoreGui_0_4;
                v1 = l_Folder_6;
            end;
            local l_v1_1 = v1;
            local l_ScreenGui_1 = Instance.new("ScreenGui");
            l_ScreenGui_1.Name = v24;
            l_ScreenGui_1.Parent = l_v1_1;
            if l_game_FastFlag_0 then
                l_ScreenGui_1.ClipToDeviceSafeArea = false;
                l_ScreenGui_1.SafeAreaCompatibility = Enum.SafeAreaCompatibility.None;
            end;
            l_v1_FirstChild_1 = l_ScreenGui_1;
        end;
        return l_v1_FirstChild_1;
    end
};


local v0 = {};
local v1 = require(script.Parent.Enum.Axis);
local v2 = require(script.Parent.CoreGuiManager);
local _ = require(script.Parent.Log);
local v4 = require(script.Parent.RectUtility);
local v5 = require(script.Parent.ValueBox);
local v6 = Color3.fromRGB(255, 205, 0);
local function v10(v7)
    local l_Frame_0 = Instance.new("Frame");
    l_Frame_0.Name = "DistanceLine";
    l_Frame_0.BorderSizePixel = 0;
    l_Frame_0.BackgroundColor3 = v6;
    l_Frame_0.Visible = false;
    l_Frame_0.Parent = v2:findOrCreateScreenGui("DistanceLines");
    local l_Frame_1 = Instance.new("Frame");
    l_Frame_1.Name = "DistanceEnd";
    l_Frame_1.BorderSizePixel = 0;
    l_Frame_1.BackgroundColor3 = v6;
    l_Frame_1.Visible = true;
    l_Frame_1.Parent = l_Frame_0;
    l_Frame_1.Size = ({
        UDim2.new(0, 2, 0, 10),
        UDim2.new(0, 10, 0, 2)
    })[v7];
    l_Frame_0:GetPropertyChangedSignal("AnchorPoint"):Connect(function()
        if v7 == v1.X then
            if l_Frame_0.AnchorPoint.X == 0 then
                l_Frame_1.AnchorPoint = Vector2.new(1, 0.5);
                l_Frame_1.Position = UDim2.new(1, 0, 0.5, 0);
                return ;
            else
                l_Frame_1.AnchorPoint = Vector2.new(0, 0.5);
                l_Frame_1.Position = UDim2.new(0, 0, 0.5, 0);
                return ;
            end;
        else
            if v7 == v1.Y then
                if l_Frame_0.AnchorPoint.Y == 0 then
                    l_Frame_1.AnchorPoint = Vector2.new(0.5, 1);
                    l_Frame_1.Position = UDim2.new(0.5, 0, 1, 0);
                    return ;
                else
                    l_Frame_1.AnchorPoint = Vector2.new(0.5, 0);
                    l_Frame_1.Position = UDim2.new(0.5, 0, 0, 0);
                end;
            end;
            return ;
        end;
    end);
    return l_Frame_0;
end;
local function v15(v11, v12)
    local v13 = {
        UDim2.new(0.5, 0, 0, 0),
        UDim2.new(0, 0, 0.5, 0)
    };
    local v14 = v5.new(v12);
    v14.Name = "DistanceBox";
    v14:setAnchorPoint(Vector2.new(0.5, 0.5));
    v14:setPosition(v13[v11]);
    if v12 ~= nil then
        v14.Parent = v12;
    end;
    return v14;
end;
v0.new = function(v16)
    local v17 = {
        m_axis = v16,
        m_distanceFrame = v10(v16)
    };
    v17.m_distanceBox = v15(v16, v17.m_distanceFrame);
    v17.m_canShow = false;
    return (setmetatable(v17, v0));
end;
v0.__index = v0;
v0.destroy = function(v18)
    v18.m_distanceBox:Destroy();
    v18.m_distanceFrame:Destroy();
    v18.m_distanceBox = nil;
    v18.m_distanceFrame = nil;
end;
local function _(v19, v20)
    return v19.AbsolutePosition.X - v20.AbsolutePosition.X;
end;
local function _(v22, v23)
    return (v23.AbsolutePosition.X + v23.AbsoluteSize.X) - (v22.AbsolutePosition.X + v22.AbsoluteSize.X);
end;
local function _(v25, v26)
    return v25.AbsolutePosition.Y - v26.AbsolutePosition.Y;
end;
local function _(v28, v29)
    return (v29.AbsolutePosition.Y + v29.AbsoluteSize.Y) - (v28.AbsolutePosition.Y + v28.AbsoluteSize.Y);
end;
local function _(v31, v32)
    v31.m_distanceBox:setText(("%d"):format(v32));
end;
local function v48(v34, v35, v36)
    local l_m_distanceFrame_0 = v34.m_distanceFrame;
    local v38 = Rect.new(v36.AbsolutePosition, v36.AbsolutePosition + v36.AbsoluteSize);
    local v39 = Vector2.new(v35.AbsolutePosition.X, (math.floor(v35.AbsolutePosition.Y + v35.AbsoluteSize.Y / 2)));
    local v40 = Vector2.new(v35.AbsolutePosition.X + v35.AbsoluteSize.X, (math.floor(v35.AbsolutePosition.Y + v35.AbsoluteSize.Y / 2)));
    local v41 = v4:containsPoint(v38, v39);
    local v42 = v4:containsPoint(v38, v40);
    local v43 = Vector2.new(1, 0.5);
    local v44 = Vector2.new(0, 0.5);
    local v45 = nil;
    if not v41 or not v42 then
        if not v41 then
            if not v42 then
                v34.m_canShow = false;
                return ;
            else
                l_m_distanceFrame_0.AnchorPoint = v44;
                l_m_distanceFrame_0.Position = UDim2.new(0, v40.X, 0, v40.Y);
                v45 = (v36.AbsolutePosition.X + v36.AbsoluteSize.X) - (v35.AbsolutePosition.X + v35.AbsoluteSize.X);
                l_m_distanceFrame_0.Size = UDim2.new(0, v45, 0, 2);
            end;
        else
            l_m_distanceFrame_0.AnchorPoint = v43;
            l_m_distanceFrame_0.Position = UDim2.new(0, v39.X, 0, v39.Y);
            v45 = v35.AbsolutePosition.X - v36.AbsolutePosition.X;
            l_m_distanceFrame_0.Size = UDim2.new(0, v45, 0, 2);
        end;
    else
        local v46 = v35.AbsolutePosition.X - v36.AbsolutePosition.X;
        local v47 = (v36.AbsolutePosition.X + v36.AbsoluteSize.X) - (v35.AbsolutePosition.X + v35.AbsoluteSize.X);
        v45 = math.min(v46, v47);
        l_m_distanceFrame_0.Size = UDim2.new(0, v45, 0, 2);
        if v46 <= v47 then
            l_m_distanceFrame_0.AnchorPoint = v43;
            l_m_distanceFrame_0.Position = UDim2.new(0, v39.X, 0, v39.Y);
        else
            l_m_distanceFrame_0.AnchorPoint = v44;
            l_m_distanceFrame_0.Position = UDim2.new(0, v40.X, 0, v40.Y);
        end;
    end;
    v34.m_canShow = true;
    v34.m_distanceBox:setText(("%d"):format(v45));
end;
local function v63(v49, v50, v51)
    local l_m_distanceFrame_1 = v49.m_distanceFrame;
    local v53 = Rect.new(v51.AbsolutePosition, v51.AbsolutePosition + v51.AbsoluteSize);
    local v54 = Vector2.new(math.floor(v50.AbsolutePosition.X + v50.AbsoluteSize.X / 2), v50.AbsolutePosition.Y);
    local v55 = Vector2.new(math.floor(v50.AbsolutePosition.X + v50.AbsoluteSize.X / 2), v50.AbsolutePosition.Y + v50.AbsoluteSize.Y);
    local v56 = v4:containsPoint(v53, v54);
    local v57 = v4:containsPoint(v53, v55);
    local v58 = Vector2.new(0.5, 1);
    local v59 = Vector2.new(0.5, 0);
    local v60 = nil;
    if not v56 or not v57 then
        if not v56 then
            if not v57 then
                v49.m_canShow = false;
                return ;
            else
                l_m_distanceFrame_1.Visible = true;
                l_m_distanceFrame_1.AnchorPoint = v59;
                l_m_distanceFrame_1.Position = UDim2.new(0, v55.X, 0, v55.Y);
                v60 = (v51.AbsolutePosition.Y + v51.AbsoluteSize.Y) - (v50.AbsolutePosition.Y + v50.AbsoluteSize.Y);
                l_m_distanceFrame_1.Size = UDim2.new(0, 2, 0, v60);
            end;
        else
            l_m_distanceFrame_1.Visible = true;
            l_m_distanceFrame_1.AnchorPoint = v58;
            l_m_distanceFrame_1.Position = UDim2.new(0, v54.X, 0, v54.Y);
            v60 = v50.AbsolutePosition.Y - v51.AbsolutePosition.Y;
            l_m_distanceFrame_1.Size = UDim2.new(0, 2, 0, v60);
        end;
    else
        local v61 = v50.AbsolutePosition.Y - v51.AbsolutePosition.Y;
        local v62 = (v51.AbsolutePosition.Y + v51.AbsoluteSize.Y) - (v50.AbsolutePosition.Y + v50.AbsoluteSize.Y);
        v60 = math.min(v61, v62);
        l_m_distanceFrame_1.Size = UDim2.new(0, 2, 0, v60);
        if v61 <= v62 then
            l_m_distanceFrame_1.AnchorPoint = v58;
            l_m_distanceFrame_1.Position = UDim2.new(0, v54.X, 0, v54.Y);
        else
            l_m_distanceFrame_1.AnchorPoint = v59;
            l_m_distanceFrame_1.Position = UDim2.new(0, v55.X, 0, v55.Y);
        end;
    end;
    v49.m_canShow = true;
    v49.m_distanceBox:setText(("%d"):format(v60));
end;
v0.update = function(v64, v65)
    local l_v65_FirstAncestorWhichIsA_0 = v65:FindFirstAncestorWhichIsA("GuiBase2d");
    if v64.m_axis == v1.X then
        v48(v64, v65, l_v65_FirstAncestorWhichIsA_0);
        return ;
    elseif v64.m_axis == v1.Y then
        v63(v64, v65, l_v65_FirstAncestorWhichIsA_0);
        return ;
    else
        error("Could not update the DistanceLine. The axis must be either X or Y");
        return ;
    end;
end;
v0.setVisible = function(v67, v68)
    if not v68 then
        v67.m_distanceFrame.Visible = false;
        return ;
    else
        v67.m_distanceFrame.Visible = v67.m_canShow;
        return ;
    end;
end;
return v0;


local v0 = {};
local v1 = require(script.Parent.Enum.Axis);
local v2 = require(script.Parent.DistanceLine);
local _ = require(script.Parent.Log);
local v4 = require(script.Parent.SelectionManager);
local v5 = nil;
local v6 = nil;
local v7 = nil;
local v8 = game:DefineFastFlag("UIEditorDistanceLinesDontUpdateForUnparentedObject", false);
local function _()
    v0:setVisible(false);
    v5 = nil;
end;
v0.onSelectionChanged = function(_)
    local v11 = v4:getFilteredSelection();
    if #v11 ~= 1 then
        v0:setVisible(false);
        v5 = nil;
        return ;
    else
        local v12 = v11[1];
        if v12.Parent:IsA("GuiBase2d") then
            v5 = v12;
            v0:update();
            v0:setVisible(true);
            return ;
        else
            v0:setVisible(false);
            v5 = nil;
            return ;
        end;
    end;
end;
v0.On = function(_)
    v6 = v2.new(v1.X);
    v7 = v2.new(v1.Y);
end;
v0.Off = function(_)
    v6:destroy();
    v7:destroy();
    v6 = nil;
    v7 = nil;
end;
v0.update = function(_)
    if v5 == nil then
        return ;
    else
        v6:update(v5);
        v7:update(v5);
        return ;
    end;
end;
v0.setVisible = function(_, v17)
    if v5 then
        if not v8 or v5.Parent then
            local v18 = math.abs(v5.AbsoluteRotation) >= 0.001;
            if not v17 or not v18 then
                v6:setVisible(v17);
                v7:setVisible(v17);
                return ;
            else
                v6:setVisible(false);
                v7:setVisible(false);
                return ;
            end;
        else
            return ;
        end;
    else
        return ;
    end;
end;
return v0;


local v0 = nil;
return {
    isDoubleClick = function(_)
        local v2 = tick();
        if v0 and v2 <= v0 + 0.3 then
            v0 = nil;
            return true;
        else
            v0 = v2;
            return false;
        end;
    end
};


local v0 = {
    NOT_SET = 0,
    E = 1,
    SE = 2,
    S = 3,
    SW = 4,
    W = 5,
    NW = 6,
    N = 7,
    NE = 8
};
v0.FIRST = v0.E;
v0.LAST = v0.NE;
local v1 = {
    [v0.E] = "E",
    [v0.SE] = "SE",
    [v0.S] = "S",
    [v0.SW] = "SW",
    [v0.W] = "W",
    [v0.NW] = "NW",
    [v0.N] = "N",
    [v0.NE] = "NE"
};
v0.isValid = function(_, v3)
    local v4 = false;
    if v0.FIRST <= v3 then
        v4 = v3 <= v0.LAST;
    end;
    return v4;
end;
v0.toShortName = function(_, v6)
    if not v0:isValid(v6) then
        error(("Direction %s is not valid. Cannot convert to short name."):format((tostring(v6))));
    end;
    return v1[v6];
end;
normalizeAngle = function(v7)
    return v7 + math.ceil(-v7 * 0.002777777777777778) * 360;
end;
v0.angleToDirection = function(_, v9)
    return math.floor((normalizeAngle(v9) + 22.5) * 0.022222222222222223) % 8 + 1;
end;
v0.directionToAngle = function(_, v11)
    assert(v0.E == 1, "Direction.E was not the first direction.");
    assert(v0.NE == 8, "Direction.NE was not the last direction.");
    assert(v0:isValid(v11));
    return (v11 - 1) * 45;
end;
return v0;


local v0 = {
    MoveX = 0,
    MoveY = 1,
    MoveXY = 2,
    ResizeXp = 3,
    ResizeXn = 4,
    ResizeYp = 5,
    ResizeYn = 6,
    ResizeXpYp = 7,
    ResizeXnYp = 8,
    ResizeXpYn = 9,
    ResizeXnYn = 10
};
v0.containsType = function(_, v2, v3)
    if v2 == v3 then
        return true;
    elseif v2 == v0.MoveXY then
        local v4 = true;
        if v3 ~= v0.MoveX then
            v4 = v3 == v0.MoveY;
        end;
        return v4;
    elseif v2 == v0.ResizeXpYp then
        local v5 = true;
        if v3 ~= v0.ResizeXp then
            v5 = v3 == v0.ResizeYp;
        end;
        return v5;
    elseif v2 == v0.ResizeXnYp then
        local v6 = true;
        if v3 ~= v0.ResizeXn then
            v6 = v3 == v0.ResizeYp;
        end;
        return v6;
    elseif v2 == v0.ResizeXpYn then
        local v7 = true;
        if v3 ~= v0.ResizeXp then
            v7 = v3 == v0.ResizeYn;
        end;
        return v7;
    elseif v2 == v0.ResizeXnYn then
        local v8 = true;
        if v3 ~= v0.ResizeXn then
            v8 = v3 == v0.ResizeYn;
        end;
        return v8;
    else
        return false;
    end;
end;
return v0;


Error = function(v0)
    print("ERROR:", v0);
    (nil):throw();
end;
return Error;


local _ = require(script.Parent.FFlag);
local v1 = require(script.Parent.InstanceInfo);
local v2 = require(script.Parent.Utility);
local v3 = require(script.Parent.Select);
local function v5(v4)
    v4.Center = (v4.hidden.TopLeft + v4.hidden.BottomRight) * 0.5;
    v4.hidden.Left = v4.hidden.TopLeft.X;
    v4.hidden.Right = v4.hidden.BottomRight.X;
    v4.hidden.Top = v4.hidden.TopLeft.Y;
    v4.hidden.Bottom = v4.hidden.BottomRight.Y;
    v4.hidden.TopRight = Vector2.new(v4.Right, v4.Top);
    v4.hidden.BottomLeft = Vector2.new(v4.Left, v4.Bottom);
    v4.Width = v4.hidden.Right - v4.hidden.Left;
    v4.Height = v4.hidden.Bottom - v4.hidden.Top;
    v4.Size = Vector2.new(v4.Width, v4.Height);
end;
local function v11(v6, v7, v8)
    if v6 then
        local v9 = v3:getGuiObjectsAtPoint(v7);
        for v10 = 1, #v9 do
            if v9[v10] == v6 then
                return true;
            elseif not v8(v9[v10]) then
                return false;
            end;
        end;
        return false;
    else
        return true;
    end;
end;
local function v16(v12, v13)
    if v12 then
        local v14 = v3:getGuiObjectsAtPoint(v13);
        for v15 = 1, #v14 do
            if v14[v15] == v12 then
                return true;
            elseif not v1:canSeeThrough(v14[v15]) then
                return false;
            end;
        end;
        return false;
    else
        return true;
    end;
end;
local function v20(v17, v18, v19)
    v17.hidden.TopLeftVisible = v11(v18, v17.hidden.TopLeft, v19);
    v17.hidden.TopRightVisible = v11(v18, v17.hidden.TopRight, v19);
    v17.hidden.BottomLeftVisible = v11(v18, v17.hidden.BottomLeft, v19);
    v17.hidden.BottomRightVisible = v11(v18, v17.hidden.BottomRight, v19);
    v17.hidden.CenterVisible = v11(v18, v17.Center, v19);
end;
local function _(v21, v22)
    v21.hidden.TopLeftVisible = v16(v22, v21.hidden.TopLeft);
    v21.hidden.TopRightVisible = v16(v22, v21.hidden.TopRight);
    v21.hidden.BottomLeftVisible = v16(v22, v21.hidden.BottomLeft);
    v21.hidden.BottomRightVisible = v16(v22, v21.hidden.BottomRight);
    v21.hidden.CenterVisible = v16(v22, v21.Center);
end;
local function v27(v24, ...)
    local v25 = {
        ...
    };
    for v26 = 1, #v25 do
        v24.hidden.TopLeft = v2:minVector2(v24.hidden.TopLeft, v25[v26]);
        v24.hidden.BottomRight = v2:maxVector2(v24.hidden.BottomRight, v25[v26]);
    end;
    v5(v24);
end;
local function v30(v28, ...)
    local v29 = {
        ...
    };
    if #v29 > 0 then
        v28.hidden.TopLeft = v29[1];
        v28.hidden.BottomRight = v29[1];
        table.remove(v29, 1);
        v27(v28, unpack(v29));
        return ;
    else
        v5(v28);
        return ;
    end;
end;
translate = function(v31, v32)
    v31.hidden.TopLeft = v31.hidden.TopLeft + v32;
    v31.hidden.BottomRight = v31.hidden.BottomRight + v32;
    v5(v31);
end;
resize = function(v33, v34)
    v33.hidden.BottomRight = v33.hidden.TopLeft + v34;
    v5(v33);
end;
expandFromCenter = function(v35, v36)
    local v37 = v36 * 0.5;
    v35.TopLeft = v35.TopLeft - v37;
    v35.BottomRight = v35.BottomRight + v37;
    v5(v35);
end;
local v57 = {
    new = function(...)
        local v38 = {
            map = {},
            mt = {},
            hidden = {}
        };
        v38.hidden.TopLeft = Vector2.new(0, 0);
        v38.hidden.BottomRight = Vector2.new(0, 0);
        v30(v38, ...);
        v20(v38, nil, function(v39)
            return v1:canSeeThrough(v39);
        end);
        v38.mt.__index = function(v40, v41)
            if v41 == "extend" then
                return v27;
            elseif v41 == "set" then
                return v30;
            elseif v41 == "TopLeft" then
                return v40.hidden.TopLeft;
            elseif v41 == "BottomRight" then
                return v40.hidden.BottomRight;
            elseif v41 == "TopRight" then
                return v40.hidden.TopRight;
            elseif v41 == "BottomLeft" then
                return v40.hidden.BottomLeft;
            elseif v41 == "Top" then
                return v40.hidden.Top;
            elseif v41 == "Bottom" then
                return v40.hidden.Bottom;
            elseif v41 == "Left" then
                return v40.hidden.Left;
            elseif v41 == "Right" then
                return v40.hidden.Right;
            elseif v41 == "TopLeftVisible" then
                return v38.hidden.TopLeftVisible;
            elseif v41 == "TopRightVisible" then
                return v38.hidden.TopRightVisible;
            elseif v41 == "BottomLeftVisible" then
                return v38.hidden.BottomLeftVisible;
            elseif v41 == "BottomRightVisible" then
                return v38.hidden.BottomRightVisible;
            elseif v41 == "TopVisible" then
                return v38.hidden.TopLeftVisible or v38.hidden.TopRightVisible;
            elseif v41 == "BottomVisible" then
                return v38.hidden.BottomLeftVisible or v38.hidden.BottomRightVisible;
            elseif v41 == "LeftVisible" then
                return v38.hidden.TopLeftVisible or v38.hidden.BottomLeftVisible;
            elseif v41 == "RightVisible" then
                return v38.hidden.TopRightVisible or v38.hidden.BottomRightVisible;
            elseif v41 == "CenterVisible" then
                return v38.hidden.CenterVisible;
            elseif v41 == "translate" then
                return translate;
            elseif v41 == "resize" then
                return resize;
            elseif v41 == "expandFromCenter" then
                return expandFromCenter;
            elseif v41 == "refreshVisibility" then
                return v20;
            else
                return ;
            end;
        end;
        v38.mt.__newindex = function(v42, v43, v44)
            if v43 == "TopLeft" then
                v42.hidden.TopLeft = v44;
            elseif v43 == "BottomRight" then
                v42.hidden.BottomRight = v44;
            elseif v43 == "TopRight" then
                v42.hidden.TopLeft = Vector2.new(v42.hidden.Left, v44.Y);
                v42.hidden.BottomRight = Vector2.new(v44.X, v42.hidden.Bottom);
            elseif v43 == "BottomLeft" then
                v42.hidden.TopLeft = Vector2.new(v44.X, v42.hidden.Top);
                v42.hidden.BottomRight = Vector2.new(v42.hidden.Right, v44.Y);
            elseif v43 == "Top" then
                v42.hidden.TopLeft = Vector2.new(v42.hidden.Left, v44);
            elseif v43 == "Bottom" then
                v42.hidden.BottomRight = Vector2.new(v42.hidden.Right, v44);
            elseif v43 == "Left" then
                v42.hidden.TopLeft = Vector2.new(v44, v42.hidden.Top);
            elseif v43 == "Right" then
                v42.hidden.BottomRight = Vector2.new(v44, v42.hidden.Bottom);
            end;
            v5(v42);
        end;
        setmetatable(v38, v38.mt);
        return v38;
    end,
    translate = function(_, v46, v47)
        local v48 = v2:cloneTable(v46);
        translate(v48, v47);
        return v48;
    end,
    resize = function(_, v50, v51)
        local v52 = v2:cloneTable(v50);
        resize(v50, v51);
        return v52;
    end,
    expandFromCenter = function(_, v54, v55)
        local v56 = v2:cloneTable(v54);
        expandFromCenter(v54, v55);
        return v56;
    end
};
v57.getExtentsFromGui = function(_, v59)
    local v60 = v57.new(Vector2.new(0, 0));
    v30(v60, v59.AbsolutePosition, v59.AbsolutePosition + v59.AbsoluteSize);
    return v60;
end;
v57.getExtentsFromGuis = function(_, v62)
    if #v62 == 0 then
        return nil;
    else
        local v63 = v57.new(Vector2.new(0, 0));
        v30(v63, v62[1].AbsolutePosition, v62[1].AbsolutePosition + v62[1].AbsoluteSize);
        for v64 = 2, #v62 do
            v27(v63, v62[v64].AbsolutePosition, v62[v64].AbsolutePosition + v62[v64].AbsoluteSize);
        end;
        return v63;
    end;
end;
return v57;


local v0 = {};
local function _(v1)
    local l_status_0, l_result_0 = pcall(function()
        return settings():GetFFlag(v1);
    end);
    v0[v1] = l_status_0 and l_result_0;
end;
return {
    isEnabled = function(_, v6)
        if v0[v6] == nil then
            local l_status_1, l_result_1 = pcall(function()
                return settings():GetFFlag(v6);
            end);
            v0[v6] = l_status_1 and l_result_1;
        end;
        return v0[v6];
    end
};


local v0 = 1;
local v2 = {
    isScale = function(_)
        return v0 == 1;
    end
};
v2.toggleGridType = function(_)
    if not v2:isScale() then
        v0 = 1;
        print("Setting Grid mode: Scale");
        return ;
    else
        v0 = 2;
        print("Setting Grid mode: Offset");
        return ;
    end;
end;
v2.getScreenSize = function(_)
    return game.Workspace.CurrentCamera.ViewportSize;
end;
return v2;


local function v0(v1)
    if v1 and v1.Parent then
        if v1.Parent:IsA("ScreenGui") and v1.Parent.Enabled == true then
            return true;
        elseif v1.Parent:IsA("GuiObject") and v1.Parent.Visible == true then
            return v0(v1.Parent);
        elseif not v1.Parent:IsA("Folder") then
            return false;
        else
            return v0(v1.Parent);
        end;
    else
        return false;
    end;
end;
return {
    isVisible = function(_, v3, _)
        if v3:IsA("GuiObject") then
            if v3.Visible then
                if v0(v3) then
                    if v3.BackgroundTransparency >= 1 then
                        if not v3:IsA("ImageLabel") and not v3:IsA("ImageButton") then
                            if not v3:IsA("TextLabel") and not v3:IsA("TextButton") then
                                return false;
                            else
                                local v5 = false;
                                if v3.Text ~= "" then
                                    v5 = v3.TextTransparency < 1;
                                end;
                                return v5;
                            end;
                        else
                            local v6 = false;
                            if v3.Image ~= "" then
                                v6 = v3.ImageTransparency < 1;
                            end;
                            return v6;
                        end;
                    else
                        return true;
                    end;
                else
                    return false;
                end;
            else
                return false;
            end;
        else
            return false;
        end;
    end,
    canSeeThrough = function(_, v8)
        if ((not v8:IsA("GuiObject") or not v8.Visible) or not v0(v8)) or v8.BackgroundTransparency > 0 then
            return true;
        else
            return false;
        end;
    end
};


local v0 = {};
local v1 = require(script.Parent.Enum.Direction);
local v2 = {
    [v1.E] = "rbxasset://textures/StudioUIEditor/icon_resize2.png",
    [v1.SE] = "rbxasset://textures/StudioUIEditor/icon_resize3.png",
    [v1.S] = "rbxasset://textures/StudioUIEditor/icon_resize4.png",
    [v1.SW] = "rbxasset://textures/StudioUIEditor/icon_resize1.png",
    [v1.W] = "rbxasset://textures/StudioUIEditor/icon_resize2.png",
    [v1.NW] = "rbxasset://textures/StudioUIEditor/icon_resize3.png",
    [v1.N] = "rbxasset://textures/StudioUIEditor/icon_resize4.png",
    [v1.NE] = "rbxasset://textures/StudioUIEditor/icon_resize1.png"
};
local v3 = {
    [v1.E] = "rbxasset://textures/StudioUIEditor/icon_rotate1.png",
    [v1.SE] = "rbxasset://textures/StudioUIEditor/icon_rotate2.png",
    [v1.S] = "rbxasset://textures/StudioUIEditor/icon_rotate3.png",
    [v1.SW] = "rbxasset://textures/StudioUIEditor/icon_rotate4.png",
    [v1.W] = "rbxasset://textures/StudioUIEditor/icon_rotate5.png",
    [v1.NW] = "rbxasset://textures/StudioUIEditor/icon_rotate6.png",
    [v1.N] = "rbxasset://textures/StudioUIEditor/icon_rotate7.png",
    [v1.NE] = "rbxasset://textures/StudioUIEditor/icon_rotate8.png"
};
local v4 = {
    DEFAULT = 0,
    MOVE = 1,
    RESIZE = 2,
    ROTATE = 3
};
local v5 = nil;
local l_DEFAULT_0 = v4.DEFAULT;
local l_NOT_SET_0 = v1.NOT_SET;
local v8 = nil;
v0.calcMouseIconDirection = function(_, v10, v11)
    return v1:angleToDirection(v1:directionToAngle(v10) + v11);
end;
v0.setToDefaultIcon = function(_)
    if l_DEFAULT_0 ~= v4.DEFAULT then
        l_DEFAULT_0 = v4.DEFAULT;
        v8.Icon = v5;
        l_NOT_SET_0 = v1.NOT_SET;
    end;
end;
v0.setToMoveIcon = function(_)
    if l_DEFAULT_0 ~= v4.MOVE then
        l_DEFAULT_0 = v4.MOVE;
        v8.Icon = "rbxasset://textures/advClosed-hand.png";
        l_NOT_SET_0 = v1.NOT_SET;
    end;
end;
v0.setToResizeIcon = function(_, v15)
    assert(v1:isValid(v15), "The handle direction was not valid.");
    if not (not (l_DEFAULT_0 == v4.RESIZE) or l_NOT_SET_0 == v15) or l_DEFAULT_0 ~= v4.RESIZE then
        l_DEFAULT_0 = v4.RESIZE;
        v8.Icon = v2[v15];
        l_NOT_SET_0 = v15;
    end;
end;
v0.setToRotateIcon = function(_, v17)
    assert(v1:isValid(v17), "The handle direction was not valid.");
    if not (not (l_DEFAULT_0 == v4.ROTATE) or l_NOT_SET_0 == v17) or l_DEFAULT_0 ~= v4.ROTATE then
        l_DEFAULT_0 = v4.ROTATE;
        v8.Icon = v3[v17];
        l_NOT_SET_0 = v17;
    end;
end;
v0.Off = function(_, _)
    v0:setToDefaultIcon();
    v8 = nil;
    v5 = nil;
end;
v0.On = function(_, v21)
    assert(v21 ~= nil, "Cannot initialize MouseIconManager. Got a nil mouse.");
    assert(v21.Icon ~= nil, "Cannot initialize MouseIconManager. The mouse icon was nil");
    v8 = v21;
    v5 = v21.Icon;
    l_DEFAULT_0 = v4.DEFAULT;
    l_NOT_SET_0 = v1.NOT_SET;
end;
return v0;


local v0 = require(script.Parent.AdornmentModule);
local v1 = require(script.Parent.Analytics);
local _ = require(script.Parent.Convert);
local v3 = require(script.Parent.Extents2D);
local _ = require(script.Parent.FFlag);
local v5 = require(script.Parent.GlobalValues);
local v6 = require(script.Parent.MouseIconManager);
local _ = require(script.Parent.RotateUtility);
local _ = require(script.Parent.Select);
local v9 = require(script.Parent.SelectionManager);
local v10 = require(script.Parent.SnappingPointManager);
local v11 = require(script.Parent.Utility);
local v12 = require(script.Parent.Convert);
local v13 = require(script.Parent.Enum.SnappingType);
local l_UserInputService_0 = game:GetService("UserInputService");
local l_ChangeHistoryService_0 = game:GetService("ChangeHistoryService");
local v16 = nil;
local v17 = nil;
local v18 = false;
local v19 = false;
local v20 = {};
local v21 = nil;
local function _(v22, v23)
    local l_Parent_0 = v22.Parent;
    while true do
        if not l_Parent_0 then
            return nil;
        elseif not l_Parent_0:IsA(v23) then
            return l_Parent_0;
        else
            l_Parent_0 = l_Parent_0.Parent;
        end;
    end;
end;
local function v31(v26)
    for v27 = 1, #v20 do
        local v28 = v20[v27][1];
        local l_Parent_1 = v28.Parent;
        local v30;
        while true do
            if not l_Parent_1 then
                v30 = nil;
                break;
            elseif not l_Parent_1:IsA("Folder") then
                v30 = l_Parent_1;
                break;
            else
                l_Parent_1 = l_Parent_1.Parent;
            end;
        end;
        if not (not v30 or not v30:IsA("GuiBase2d")) then
            v28.Position = v12:convertAbsolutePositionToScaleOrOffset(v11:isOnlyScaleUDim2(v20[v27][3]) or not v11:isOnlyOffsetUDim2(v20[v27][3]) and v5:isScale(), v20[v27][2] + v26, v28.AbsoluteSize, v28.Position, v30, v28.AnchorPoint);
        end;
    end;
end;
local function _(v32)
    v31(v32 - v17);
end;
local function v35(v34)
    if v34 == 1 then
        return Vector2.new(0, -1);
    elseif v34 == 2 then
        return Vector2.new(0, 1);
    elseif v34 == 3 then
        return Vector2.new(-1, 0);
    elseif v34 == 4 then
        return Vector2.new(1, 0);
    else
        return Vector2.new(0, -1);
    end;
end;
local function v36(v37, v38)
    if v37 and v37.Parent then
        if not v37.Parent:IsA(v38) then
            return v36(v37.Parent, v38);
        else
            return v37.Parent;
        end;
    else
        return nil;
    end;
end;
local function _(v39, v40)
    while true do
        if not v39 or not v39.Parent then
            return false;
        elseif v39.Parent == v40 then
            return true;
        else
            v39 = v39.Parent;
        end;
    end;
end;
getHighestZIndexOfSelfAndDescendants = function(v42, v43)
    if v42 == v43 then
        return 0;
    else
        local v44 = 0;
        if v42:IsA("GuiObject") then
            v44 = v42.ZIndex;
        end;
        local l_v42_Children_0 = v42:GetChildren();
        for v46 = 1, #l_v42_Children_0 do
            v44 = math.max(v44, getHighestZIndexOfSelfAndDescendants(l_v42_Children_0[v46], v43));
        end;
        return v44;
    end;
end;
incrementZIndexOfSelfAndDescendantsBy = function(v47, v48)
    if v47:IsA("GuiObject") then
        v47.ZIndex = v47.zIndex + v48;
    end;
    local l_v47_Children_0 = v47:GetChildren();
    for v50 = 1, #l_v47_Children_0 do
        incrementZIndexOfSelfAndDescendantsBy(l_v47_Children_0[v50], v48);
    end;
end;
local v67 = {
    isDragInProgress = function(_)
        return v18;
    end,
    startDrag = function(_, v53)
        v20 = {};
        local v54 = v9:getFilteredSelectionCommonAncestors();
        for v55 = 1, #v54 do
            table.insert(v20, {
                v54[v55],
                v54[v55].AbsolutePosition,
                v54[v55].Position
            });
        end;
        if #v20 == 0 then
            return ;
        else
            v17 = v53;
            v18 = true;
            v19 = false;
            v21 = v3:getExtentsFromGuis(v54);
            v6:setToMoveIcon();
            v0:createSelectionAdorns();
            v16:onMoveBegan(v53);
            return ;
        end;
    end,
    finishDrag = function(_, v57)
        if v19 then
            v1:reportEvent("Move");
            l_ChangeHistoryService_0:SetWaypoint("Translate Objects (better tt needed)");
        end;
        v18 = false;
        v17 = nil;
        v0:hideSnappingLines();
        v19 = false;
        v6:setToDefaultIcon();
        v0:deleteSelectionAdorns();
        v16:onMoveEnded(v57);
    end,
    updateDrag = function(_, v59)
        if not v19 and v11:manhattanDistance(v59 - v17) <= 3 then
            return ;
        else
            v19 = true;
            v0:hideSnappingLines();
            local _ = v13.MoveXY;
            if not (not l_UserInputService_0:IsKeyDown(Enum.KeyCode.LeftShift) and not l_UserInputService_0:IsKeyDown(Enum.KeyCode.RightShift)) then
                v59 = if math.abs(v59.Y - v17.Y) < math.abs(v59.X - v17.X) then Vector2.new(v59.X, v17.Y) else Vector2.new(v17.X, v59.Y);
            end;
            local v61 = v3:translate(v21, v59 - v17);
            local v62 = nil;
            local v63, v64 = v10:snapExtents(v61, v13.MoveXY);
            v61 = v63;
            v62 = v64;
            for v65 = 1, #v62 do
                v0:showSnappingLine(v62[v65]);
            end;
            v63 = nil;
            v31((v17 + v11:floorVector2(v61.TopLeft - v21.TopLeft)) - v17);
            v0:updateSelectionAdorns(v61);
            v16:onMoveChanged(v59);
            return ;
        end;
    end,
    onSelectionChanged = function(_)
        if v9:hasFilteredSelection() then
            v0:updateSelectionPosition();
            v0:showSelection();
            v6:setToMoveIcon();
            return ;
        else
            v0:hideSelection();
            v6:setToDefaultIcon();
            return ;
        end;
    end
};
v67.bump = function(_, v69)
    v67:startDrag(Vector2.new(0, 0));
    v31(v35(v69));
    v67:finishDrag(v69);
end;
v67.setActionMediator = function(_, v71)
    v16 = v71;
end;
v67.UP = 1;
v67.DOWN = 2;
v67.LEFT = 3;
v67.RIGHT = 4;
return v67;


local v4 = {
    pointOnSideOfLine = function(_, v1, v2, v3)
        return (v3.X - v1.X) * (v2.Y - v1.Y) - (v3.Y - v1.Y) * (v2.X - v1.X);
    end
};
v4.containsPoint = function(_, v6, v7)
    local l_Min_0 = v6.Min;
    local v9 = Vector2.new(l_Min_0.X + v6.Width, l_Min_0.Y);
    local l_Max_0 = v6.Max;
    local v11 = Vector2.new(l_Max_0.X - v6.Width, l_Max_0.Y);
    local v12 = v4:pointOnSideOfLine(l_Min_0, v9, v7);
    local v13 = v4:pointOnSideOfLine(v9, l_Max_0, v7);
    local v14 = v4:pointOnSideOfLine(l_Max_0, v11, v7);
    local v15 = v4:pointOnSideOfLine(v11, l_Min_0, v7);
    local v16 = false;
    if v12 <= 0 then
        v16 = false;
        if v13 <= 0 then
            v16 = false;
            if v14 <= 0 then
                v16 = v15 <= 0;
            end;
        end;
    end;
    return v16;
end;
return v4;


local v0 = require(script.Parent.AdornmentModule);
local v1 = require(script.Parent.Analytics);
local v2 = require(script.Parent.CoreGuiManager);
local v3 = require(script.Parent.Convert);
local v4 = require(script.Parent.Enum.Direction);
local v5 = require(script.Parent.Extents2D);
local _ = require(script.Parent.FFlag);
local v7 = require(script.Parent.GlobalValues);
local v8 = require(script.Parent.MouseIconManager);
local v9 = require(script.Parent.SelectionManager);
local v10 = require(script.Parent.SnappingPointManager);
local v11 = require(script.Parent.Utility);
local v12 = require(script.Parent.Enum.SnappingType);
local l_ChangeHistoryService_0 = game:GetService("ChangeHistoryService");
local l_UserInputService_0 = game:GetService("UserInputService");
local v15 = Color3.fromRGB(255, 255, 255);
local v16 = Color3.fromRGB(255, 255, 255);
local v17 = Color3.fromRGB(136, 136, 136);
local v18 = Color3.fromRGB(222, 222, 222);
local _ = Vector2.new(1, 1);
local l_NOT_SET_0 = v4.NOT_SET;
local l_NW_0 = v4.NW;
local l_N_0 = v4.N;
local l_NE_0 = v4.NE;
local l_W_0 = v4.W;
local l_E_0 = v4.E;
local l_SW_0 = v4.SW;
local l_S_0 = v4.S;
local l_SE_0 = v4.SE;
local v29 = nil;
local v30 = nil;
local v31 = nil;
local v32 = nil;
local v33 = {};
local v34 = {};
local v35 = {};
local v36 = nil;
local v37 = nil;
local v38 = nil;
local v39 = {};
local v40 = false;
local v41 = true;
local l_l_NOT_SET_0_0 = l_NOT_SET_0;
local l_game_FastFlag_0 = game:GetFastFlag("StudioUIEditorDontClipOutsideSafeArea", false);
local function _(v44)
    l_l_NOT_SET_0_0 = v44;
end;
local function _(v46)
    if v46 == l_l_NOT_SET_0_0 then
        l_l_NOT_SET_0_0 = l_NOT_SET_0;
    end;
end;
local function v48()
    v32 = Instance.new("Frame");
    v32.Name = "UIEditorResizeHandleParent";
    v32.AnchorPoint = Vector2.new(0, 0);
    v32.BackgroundTransparency = 1;
    v32.BackgroundColor3 = Color3.new(0, 0, 255);
    v32.BorderSizePixel = 0;
end;
local function _()
    local v49 = 7;
    if v30 then
        v49 = math.clamp(v30.AbsoluteSize.Y * 0.00875, 3, 7);
    end;
    return UDim2.new(0, v49, 0, v49);
end;
local function v54()
    for v51 = 1, #v33 do
        local v52 = v33[v51];
        local v53 = 7;
        if v30 then
            v53 = math.clamp(v30.AbsoluteSize.Y * 0.00875, 3, 7);
        end;
        v52.Size = UDim2.new(0, v53, 0, v53);
        v52:FindFirstChildWhichIsA("ImageLabel").Size = UDim2.new(0, v52.AbsoluteSize.X + 8, 0, v52.AbsoluteSize.Y + 8);
    end;
end;
local function v65()
    local v55 = {
        [v4.E] = Vector2.new(0, 0.5),
        [v4.SE] = Vector2.new(0, 0),
        [v4.S] = Vector2.new(0.5, 0),
        [v4.SW] = Vector2.new(1, 0),
        [v4.W] = Vector2.new(1, 0.5),
        [v4.NW] = Vector2.new(1, 1),
        [v4.N] = Vector2.new(0.5, 1),
        [v4.NE] = Vector2.new(0, 1)
    };
    local v56 = {
        [v4.E] = UDim2.new(1, -2, 0.5, 0),
        [v4.SE] = UDim2.new(1, -2, 1, -2),
        [v4.S] = UDim2.new(0.5, 0, 1, -2),
        [v4.SW] = UDim2.new(0, 2, 1, -2),
        [v4.W] = UDim2.new(0, 2, 0.5, 0),
        [v4.NW] = UDim2.new(0, 2, 0, 2),
        [v4.N] = UDim2.new(0.5, 0, 0, 2),
        [v4.NE] = UDim2.new(1, -2, 0, 2)
    };
    for v57 = v4.FIRST, v4.LAST do
        local l_Frame_0 = Instance.new("Frame");
        l_Frame_0.Name = "ResizeHandle_" .. v4:toShortName(v57);
        l_Frame_0.AnchorPoint = v55[v57];
        local v59 = 7;
        if v30 then
            v59 = math.clamp(v30.AbsoluteSize.Y * 0.00875, 3, 7);
        end;
        l_Frame_0.Size = UDim2.new(0, v59, 0, v59);
        l_Frame_0.Position = v56[v57];
        l_Frame_0.BackgroundColor3 = v16;
        l_Frame_0.BorderColor3 = v17;
        l_Frame_0.ZIndex = 3;
        local l_ImageLabel_0 = Instance.new("ImageLabel");
        l_ImageLabel_0.Image = "rbxasset://textures/StudioUIEditor/resizeHandleDropShadow.png";
        l_ImageLabel_0.Name = "ResizeHandleDropShadow_" .. v4:toShortName(v57);
        l_ImageLabel_0.Size = UDim2.new(0, l_Frame_0.AbsoluteSize.X + 8, 0, l_Frame_0.AbsoluteSize.Y + 8);
        l_ImageLabel_0.Position = UDim2.new(0, -4, 0, -3);
        l_ImageLabel_0.BackgroundTransparency = 1;
        l_ImageLabel_0.BorderSizePixel = 0;
        l_ImageLabel_0.ImageColor3 = Color3.fromRGB(0, 0, 0);
        l_ImageLabel_0.ImageTransparency = 0.6;
        l_ImageLabel_0.ScaleType = Enum.ScaleType.Slice;
        l_ImageLabel_0.SliceCenter = Rect.new(4, 4, 12, 12);
        l_ImageLabel_0.ZIndex = 2;
        l_ImageLabel_0.Parent = l_Frame_0;
        l_Frame_0.MouseEnter:connect(function(_, _)
            l_l_NOT_SET_0_0 = v57;
        end);
        l_Frame_0.MouseLeave:connect(function(_, _)
            if v57 == l_l_NOT_SET_0_0 then
                l_l_NOT_SET_0_0 = l_NOT_SET_0;
            end;
        end);
        l_Frame_0.Parent = v32;
        v33[v57] = l_Frame_0;
    end;
end;
local function v71()
    local v66 = {
        Vector2.new(0, 0.5),
        Vector2.new(0.5, 0),
        Vector2.new(1, 0.5),
        Vector2.new(0.5, 1)
    };
    local v67 = {
        UDim2.new(1, 0, 0.5, 0),
        UDim2.new(0.5, 0, 1, 0),
        UDim2.new(0, 0, 0.5, 0),
        UDim2.new(0.5, 0, 0, 0)
    };
    local v68 = {
        UDim2.new(0, 1, 1, 2),
        UDim2.new(1, 2, 0, 1),
        UDim2.new(0, 1, 1, 2),
        UDim2.new(1, 2, 0, 1)
    };
    for v69 = 1, 4 do
        local l_Frame_1 = Instance.new("Frame");
        l_Frame_1.AnchorPoint = v66[v69];
        l_Frame_1.BackgroundColor3 = v18;
        l_Frame_1.BorderSizePixel = 0;
        l_Frame_1.Position = v67[v69];
        l_Frame_1.Size = v68[v69];
        v34[v69] = l_Frame_1;
        v34[v69].Parent = v32;
    end;
end;
local function _()
    return #v33 > 0;
end;
local function _(v73, v74)
    if v74 == l_NW_0 then
        return v73.TopLeft;
    elseif v74 == l_N_0 then
        return Vector2.new(v73.Center.X, v73.Top);
    elseif v74 == l_NE_0 then
        return v73.TopRight;
    elseif v74 == l_W_0 then
        return Vector2.new(v73.Left, v73.Center.Y);
    elseif v74 == l_E_0 then
        return Vector2.new(v73.Right, v73.Center.Y);
    elseif v74 == l_SW_0 then
        return v73.BottomLeft;
    elseif v74 == l_S_0 then
        return Vector2.new(v73.Center.X, v73.Bottom);
    elseif v74 == l_SE_0 then
        return v73.BottomRight;
    else
        return v73.Center;
    end;
end;
local function _(v76)
    if v76 == l_NW_0 then
        return v12.ResizeXnYn;
    elseif v76 == l_N_0 then
        return v12.ResizeYn;
    elseif v76 == l_NE_0 then
        return v12.ResizeXpYn;
    elseif v76 == l_W_0 then
        return v12.ResizeXn;
    elseif v76 == l_E_0 then
        return v12.ResizeXp;
    elseif v76 == l_SW_0 then
        return v12.ResizeXnYp;
    elseif v76 == l_S_0 then
        return v12.ResizeYp;
    elseif v76 == l_SE_0 then
        return v12.ResizeXpYp;
    else
        return nil;
    end;
end;
local function v81(v78)
    if v78 == nil then
        return ;
    else
        local l_Size_0 = v78.Size;
        local l_TopLeft_0 = v78.TopLeft;
        if v32 == nil then
            return ;
        else
            v32.Position = UDim2.new(0, l_TopLeft_0.X, 0, l_TopLeft_0.Y);
            v32.Size = UDim2.new(0, l_Size_0.X, 0, l_Size_0.Y);
            if #v35 == 1 then
                v32.Rotation = v35[1].AbsoluteRotation;
            else
                v32.Rotation = 0;
            end;
            v54();
            return ;
        end;
    end;
end;
local function v83()
    if not (#v33 > 0) then
        local v82 = v2:findOrCreateFolder("m_handles");
        if not v30 then
            v30 = Instance.new("ScreenGui", v82);
            v30.Enabled = false;
            if l_game_FastFlag_0 then
                v30.ClipToDeviceSafeArea = false;
                v30.SafeAreaCompatibility = Enum.SafeAreaCompatibility.None;
            end;
        end;
        v48();
        v32.Parent = v30;
        v65();
        v71();
        return ;
    else
        return ;
    end;
end;
local function v86()
    for v84 = 1, #v33 do
        v33[v84]:Destroy();
    end;
    for v85 = 1, #v34 do
        v34[v85]:Destroy();
    end;
    v33 = {};
    v34 = {};
    l_l_NOT_SET_0_0 = l_NOT_SET_0;
    if v32 then
        v32:Destroy();
        v32 = nil;
    end;
    if v30 then
        v30:Destroy();
        v30 = nil;
    end;
end;
hasSelection = function()
    return #v35 > 0;
end;
local v87 = {};
v87.onSelectionChanged = function(_)
    v35 = v9:getFilteredSelection();
    if v9:hasFilteredSelection() then
        v87:updatePosition();
        v87:show();
        return ;
    else
        v87:hide();
        return ;
    end;
end;
v87.updatePosition = function(_)
    if #v35 == 0 then
        return ;
    else
        v81(v5:getExtentsFromGuis(v35));
        return ;
    end;
end;
v87.isOverAHandle = function(_)
    if hasSelection() then
        return l_l_NOT_SET_0_0 ~= l_NOT_SET_0;
    else
        return false;
    end;
end;
v87.updateHandleHighlight = function(_, v92)
    if hasSelection() then
        for v93 = v4.FIRST, v4.LAST do
            if not v92 and l_l_NOT_SET_0_0 == v93 then
                v33[v93].BackgroundColor3 = v15;
            else
                v33[v93].BackgroundColor3 = v16;
            end;
        end;
        return ;
    else
        return ;
    end;
end;
v87.isDragInProgress = function(_)
    return v40;
end;
v87.updateMouseIcon = function(_)
    if l_l_NOT_SET_0_0 ~= v4.NOT_SET then
        if #v35 == 1 then
            v8:setToResizeIcon((v8:calcMouseIconDirection(l_l_NOT_SET_0_0, v35[1].AbsoluteRotation)));
            return ;
        else
            v8:setToResizeIcon(l_l_NOT_SET_0_0);
        end;
    end;
end;
onlyShowHandle = function(v96)
    for v97 = 1, #v33 do
        if v97 == v96 then
            v33[v97].Visible = true;
        else
            v33[v97].Visible = false;
        end;
    end;
end;
v87.startDrag = function(_, v99)
    if hasSelection() then
        if not v40 then
            v40 = true;
            v31 = l_l_NOT_SET_0_0;
            onlyShowHandle(v31);
            for v100 = 1, #v35 do
                table.insert(v39, {
                    v35[v100],
                    v35[v100].AbsolutePosition,
                    v35[v100].Position,
                    v35[v100].AbsoluteSize,
                    v35[v100].Size
                });
            end;
            v38 = v5:getExtentsFromGuis(v35);
            v36 = v38.Width / v38.Height;
            v37 = v99;
            v29:onResizeBegan(v99);
            return ;
        else
            return ;
        end;
    else
        return ;
    end;
end;
local function v122(v101, v102, v103, v104)
    local v105 = v103 and not v104;
    local v106 = v104 and not v103;
    if not (v31 ~= l_E_0) or v31 == l_W_0 then
        v101:expandFromCenter(Vector2.new(0, v101.Width / v36 - v101.Height));
        return ;
    elseif not (v31 ~= l_N_0) or v31 == l_S_0 then
        v101:expandFromCenter(Vector2.new(v36 * v101.Height - v101.Width, 0));
        return ;
    elseif v31 == l_SE_0 then
        local v107 = v102 - v38.TopLeft;
        local v108 = v107.X / v107.Y;
        local v109 = true;
        if v107.Y > 0 then
            v109 = v36 < v108;
        end;
        if not v109 and not v105 or v106 then
            v101.BottomRight = v101.TopLeft + Vector2.new(v36 * v101.Height, v101.Height);
            return ;
        else
            v101.BottomRight = v101.TopLeft + Vector2.new(v101.Width, v101.Width / v36);
            return ;
        end;
    elseif v31 == l_NE_0 then
        local v110 = Vector2.new(1, -1);
        local v111 = (v102 - v38.BottomLeft) * v110;
        local v112 = v111.X / v111.Y;
        local v113 = true;
        if v111.y > 0 then
            v113 = v36 < v112;
        end;
        if not v113 then
            v101.TopRight = v101.BottomLeft + Vector2.new(v36 * v101.Height, v101.Height) * v110;
            return ;
        else
            v101.TopRight = v101.BottomLeft + Vector2.new(v101.Width, v101.Width / v36) * v110;
            return ;
        end;
    elseif v31 == l_SW_0 then
        local v114 = Vector2.new(-1, 1);
        local v115 = (v102 - v38.TopRight) * v114;
        local v116 = v115.X / v115.Y;
        local v117 = true;
        if v115.y > 0 then
            v117 = v36 < v116;
        end;
        if not v117 then
            v101.BottomLeft = v101.TopRight + Vector2.new(v36 * v101.Height, v101.Height) * v114;
            return ;
        else
            v101.BottomLeft = v101.TopRight + Vector2.new(v101.Width, v101.Width / v36) * v114;
            return ;
        end;
    else
        if v31 == l_NW_0 then
            local v118 = Vector2.new(-1, -1);
            local v119 = (v102 - v38.BottomRight) * v118;
            local v120 = v119.X / v119.Y;
            local v121 = true;
            if v119.y > 0 then
                v121 = v36 < v120;
            end;
            if not v121 and not v105 or v106 then
                v101.TopLeft = v101.BottomRight + Vector2.new(v36 * v101.Height, v101.Height) * v118;
            else
                v101.TopLeft = v101.BottomRight + Vector2.new(v101.Width, v101.Width / v36) * v118;
                return ;
            end;
        end;
        return ;
    end;
end;
local function v135(v123, v124, v125)
    local v126 = l_UserInputService_0:IsKeyDown(Enum.KeyCode.LeftShift) or l_UserInputService_0:IsKeyDown(Enum.KeyCode.RightShift);
    if v126 then
        v122(v123, v124, false, false);
    end;
    local v127 = nil;
    local v128 = nil;
    local v129 = nil;
    local v130, v131, v132, v133 = v10:snapExtents(v123, if v125 == l_NW_0 then v12.ResizeXnYn else if v125 == l_N_0 then v12.ResizeYn else if v125 == l_NE_0 then v12.ResizeXpYn else if v125 == l_W_0 then v12.ResizeXn else if v125 == l_E_0 then v12.ResizeXp else if v125 == l_SW_0 then v12.ResizeXnYp else if v125 == l_S_0 then v12.ResizeYp else if v125 == l_SE_0 then v12.ResizeXpYp else nil);
    v123 = v130;
    v127 = v131;
    v128 = v132;
    v129 = v133;
    for v134 = 1, #v127 do
        v0:showSnappingLine(v127[v134]);
    end;
    if v126 then
        v122(v123, v124, v128, v129);
    end;
    return v123, (v126 or v128) or v129;
end;
local function v138(v136)
    local _ = nil;
    if not (v136 ~= l_SE_0 and v136 ~= l_E_0) or v136 == l_S_0 then
        return (Vector2.new(-0.5, -0.5));
    elseif not (v136 ~= l_NW_0 and v136 ~= l_N_0) or v136 == l_W_0 then
        return (Vector2.new(0.5, 0.5));
    elseif v136 == l_SW_0 then
        return (Vector2.new(0.5, -0.5));
    else
        return (Vector2.new(-0.5, 0.5));
    end;
end;
local function v141(v139, v140)
    if not (v31 ~= l_NW_0 and v31 ~= l_W_0) or v31 == l_SW_0 then
        v139:translate(Vector2.new(v140.X, 0));
        v139:resize(v139.Size - Vector2.new(v140.X, 0));
    elseif not (v31 ~= l_NE_0 and v31 ~= l_E_0) or v31 == l_SE_0 then
        v139:resize(v139.Size + Vector2.new(v140.X, 0));
    end;
    if not (v31 ~= l_NW_0 and v31 ~= l_N_0) or v31 == l_NE_0 then
        v139:translate(Vector2.new(0, v140.Y));
        v139:resize(v139.Size - Vector2.new(0, v140.Y));
        return ;
    else
        if not (v31 ~= l_SW_0 and v31 ~= l_S_0) or v31 == l_SE_0 then
            v139:resize(v139.Size + Vector2.new(0, v140.Y));
        end;
        return ;
    end;
end;
local function _(v142)
    local l_zero_0 = Vector2.zero;
    if not (v31 ~= l_NW_0 and v31 ~= l_W_0) or v31 == l_SW_0 then
        l_zero_0 = l_zero_0 + Vector2.new(-v142.X, 0);
    elseif not (v31 ~= l_NE_0 and v31 ~= l_E_0) or v31 == l_SE_0 then
        l_zero_0 = l_zero_0 + Vector2.new(v142.X, 0);
    end;
    if not (v31 ~= l_NW_0 and v31 ~= l_N_0) or v31 == l_NE_0 then
        return l_zero_0 + Vector2.new(0, -v142.Y);
    else
        if not (v31 ~= l_SW_0 and v31 ~= l_S_0) or v31 == l_SE_0 then
            l_zero_0 = l_zero_0 + Vector2.new(0, v142.Y);
        end;
        return l_zero_0;
    end;
end;
local function v152(v145, v146, v147)
    local v148 = 1;
    local v149 = 1;
    local v150 = 0;
    local v151 = 0;
    if v38.Size.X ~= 0 then
        v148 = v146.Size.X / v145.Size.X;
    else
        v150 = v147.X;
    end;
    if v38.Size.Y ~= 0 then
        v149 = v146.Size.Y / v145.Size.Y;
    else
        v151 = v147.Y;
    end;
    return UDim2.new(v148, v150, v149, v151);
end;
v87.updateDrag = function(_, v154)
    if v40 then
        local v155 = v9:getFilteredSelection();
        local v156 = v11:cloneTable(v38);
        v0:hideSnappingLines();
        local v157 = 0;
        if #v155 == 1 then
            v157 = v155[1].AbsoluteRotation;
        end;
        local v158 = v11:rotate(v154 - v37, Vector2.zero, -v157);
        v141(v156, v158);
        local v159 = false;
        if v157 == 0 then
            local v160, v161 = v135(v156, v154, v31);
            v156 = v160;
            v159 = v161;
        end;
        local v162 = v152(v38, v156, v158);
        local v163 = v138(v31);
        local v164 = v38.Center + v11:rotate(v163 * v38.Size, Vector2.zero, v157);
        local l_zero_1 = Vector2.zero;
        if not (not (v157 == 0) or not v159) then
            l_zero_1 = (v156.Center + v163 * v156.Size) - (v38.Center + v163 * v38.Size);
        end;
        v156:translate(l_zero_1);
        local v166 = {};
        local v167 = {};
        for v168 = 1, #v39 do
            local v169 = v39[v168];
            local v170 = v169[1];
            local v171 = v11:rotate((v169[2] + v169[4] * 0.5) - v164, Vector2.zero, -v157);
            local v172 = v171 + v11:rotate(v169[4] / 2, Vector2.zero, v170.AbsoluteRotation - v157);
            local v173 = v11:multUDimWithVector(UDim2.new(v162.X.Scale, v162.X.Offset / 2, v162.Y.Scale, v162.Y.Offset / 2), v171);
            local v174 = 2 * v11:rotate(v11:multUDimWithVector(v162, v172) - v173, Vector2.zero, v157 - v170.AbsoluteRotation);
            local v175, v176 = v3:convertAbsoluteToScaleOrOffset(v11:isOnlyScaleUDim2(v169[3]) or not v11:isOnlyOffsetUDim2(v169[3]) and v7:isScale(), v11:isOnlyScaleUDim2(v169[5]) or not v11:isOnlyOffsetUDim2(v169[5]) and v7:isScale(), ((v164 + v11:rotate(v173, Vector2.zero, v157)) - v174 * 0.5) + l_zero_1, v174, v169[3], v169[5], v170:FindFirstAncestorWhichIsA("GuiBase2d"), v170.AnchorPoint);
            v166[v170] = v175;
            v167[v170] = v176;
        end;
        for v177 = 1, #v39 do
            local v178 = v39[v177][1];
            v178.Position = v166[v178];
            v178.Size = v167[v178];
        end;
        v81(v5:getExtentsFromGuis(v155));
        v29:onResizeChanged(v154);
        return ;
    else
        return ;
    end;
end;
v87.finishDrag = function(_, v180)
    if v40 then
        v0:hideSnappingLines();
        if v37 ~= v180 then
            v1:reportEvent("Resize");
            l_ChangeHistoryService_0:SetWaypoint("Resize");
        end;
        v40 = false;
        v0:hideXSnappingLine();
        v0:hideYSnappingLine();
        v39 = {};
        v37 = nil;
        v38 = nil;
        v31 = nil;
        for v181 = 1, #v33 do
            v33[v181].Visible = true;
        end;
        v29:onResizeEnded(v180);
        return ;
    else
        return ;
    end;
end;
v87.hide = function(_)
    if not v41 then
        v41 = true;
        if v30 then
            v30.Enabled = false;
        end;
        return ;
    else
        return ;
    end;
end;
v87.show = function(_)
    if not v41 or #v35 == 0 then
        return ;
    else
        v41 = false;
        if v30 then
            v30.Enabled = true;
        end;
        return ;
    end;
end;
v87.setActionMediator = function(_, v185)
    v29 = v185;
end;
v87.On = function(_)
    v83();
end;
v87.Off = function(_)
    v87:hide();
    v86();
end;
v87.updateSize = function(_)
    v54();
end;
return v87;