local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.React);
local v3 = require(l_Parent_0.Packages.Framework);
local l_withContext_0 = v3.ContextServices.withContext;
local l_Stylizer_0 = v3.Style.Stylizer;
local v6 = v2.Component:extend("Line");
v6.defaultProps = {
    Position = UDim2.new(),
    Transparency = 0
};
v6.init = function(v7)
    v7.pathRefs = {};
    for v8 = 1, 5 do
        v7.pathRefs[v8] = v2.createRef();
    end;
    v7.setControlPoints = function()
        for v9 = 1, 5 do
            local v10 = v7.pathRefs[v9]:getValue();
            if v10 then
                v10:SetControlPoints(v7.props.ControlPoints);
            end;
        end;
    end;
end;
v6.render = function(v11)
    local l_props_0 = v11.props;
    local l_Stylizer_1 = v11.props.Stylizer;
    local v14 = not l_props_0.ZIndex and 1 or l_props_0.ZIndex;
    return v2.createElement("Frame", {
        BackgroundTransparency = 1,
        ZIndex = l_props_0.ZIndex,
        Position = l_props_0.Position
    }, {
        Foreground = v2.createElement("Frame", {
            BackgroundTransparency = 1,
            Size = UDim2.fromScale(1, 1),
            ZIndex = v14
        }, {
            ForegroundLine = v2.createElement("Path2D", {
                Color3 = l_props_0.Color or l_Stylizer_1.Color,
                Thickness = l_props_0.Thickness or l_Stylizer_1.Thickness,
                ref = v11.pathRefs[1],
                Transparency = l_Stylizer_1.Transparency or l_props_0.Transparency
            })
        }),
        Background = v2.createElement("Frame", {
            BackgroundTransparency = 1,
            Size = UDim2.fromScale(1, 1),
            ZIndex = v14 - 1
        }, {
            ContrastPath = l_Stylizer_1.ContrastColor and v2.createElement("Path2D", {
                Color3 = l_Stylizer_1.ContrastColor,
                Thickness = (l_props_0.Thickness or l_Stylizer_1.Thickness) + 1,
                ref = v11.pathRefs[2],
                Transparency = l_Stylizer_1.Transparency or l_props_0.Transparency
            })
        })
    });
end;
v6.didMount = function(v15)
    v15.setControlPoints();
end;
v6.didUpdate = function(v16)
    v16.setControlPoints();
end;
return (l_withContext_0({
    Stylizer = l_Stylizer_0
})(v6));


local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.React);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local l_withContext_0 = require(l_Parent_0.Packages.Framework).ContextServices.withContext;
local l_Actions_0 = l_Parent_0.Src.Actions;
local v6 = require(l_Actions_0.PathChanged);
local v7 = require(l_Actions_0.ToggleMoveTool);
local v8 = require(l_Parent_0.Src.Thunks.SetPathPosition);
local l_Util_0 = l_Parent_0.Src.Util;
local v10 = require(l_Util_0.getAbsolutePosition);
local v11 = require(l_Util_0.rotatePoint);
local v12 = require(l_Parent_0.Src.Util.getUDim2ScaleFromOffset);
local l_Components_0 = l_Parent_0.Src.Components;
local v14 = require(l_Components_0.DraggablePoint);
local v15 = require(l_Components_0.GuiShim);
local l_PathEditorRotation_0 = game:GetFastFlag("PathEditorRotation");
local v17 = v2.PureComponent:extend("MoveBaseGui");
v17.render = function(v18)
    local l_props_0 = v18.props;
    if not l_props_0.SelectedObject or l_props_0.Path2DToolMode ~= "DoneEditing" then
        return nil;
    else
        local v20 = v10(l_props_0.SelectedObject.Parent);
        local v21 = if not l_PathEditorRotation_0 then v10(l_props_0.SelectedObject) else nil;
        local l_BoundingRect_0 = l_props_0.SelectedObject:GetBoundingRect();
        local l_Min_0 = l_BoundingRect_0.Min;
        local v24 = Vector2.new(l_BoundingRect_0.Width, l_BoundingRect_0.Height);
        local v25 = if not l_PathEditorRotation_0 then v21 else nil;
        return v2.createElement(not game:GetFastFlag("PathEditorSurfaceGui") and "ScreenGui" or v15, {
            DisplayOrder = 2
        }, {
            RubberbandPane = v2.createElement(v14, {
                AbsoluteSize = v24,
                AbsolutePosition = l_Min_0,
                Style = "RubberBand",
                FollowCursorOnDrag = if not l_PathEditorRotation_0 then nil else false,
                OnSelected = function()
                end,
                OnHover = function()
                end,
                OnDeselected = function()
                end,
                OnDragStart = function(_)
                    if not l_PathEditorRotation_0 then
                        v18:setState({
                            extentsOffset = v25
                        });
                        return ;
                    else
                        v18:setState({
                            startingParentPos = v11(v20, v20 + 0.5 * l_props_0.ParentAbsSize, 1 * l_props_0.ParentAbsRotation)
                        });
                        return ;
                    end;
                end,
                OnDragMoved = function(_, v28)
                    if not l_PathEditorRotation_0 then
                        if v18.state.extentsOffset ~= nil then
                            v28 = (v28 - v20) + v18.state.extentsOffset;
                            l_props_0.dispatchSetPathPosition((v12(UDim2.fromOffset(v28.X, v28.Y), l_props_0.SelectedObject.Parent)));
                        end;
                    elseif v18.state.startingParentPos ~= nil then
                        l_props_0.dispatchSetPathPosition(v28, v18.state.startingParentPos);
                        return ;
                    end;
                end,
                OnDragEnd = function(_, v30)
                    if not l_PathEditorRotation_0 then
                        if v18.state.extentsOffset ~= nil then
                            v30 = (v30 - v20) + v18.state.extentsOffset;
                            l_props_0.dispatchSetPathPosition(v12(UDim2.fromOffset(v30.X, v30.Y), l_props_0.SelectedObject.Parent), true);
                        end;
                    elseif v18.state.startingParentPos ~= nil then
                        l_props_0.dispatchSetPathPosition(v30, v18.state.startingParentPos, true);
                        return ;
                    end;
                end,
                OnDoubleClicked = function()
                    l_props_0.dispatchToggleMoveTool();
                end
            })
        });
    end;
end;
return v3.connect(function(v31, _)
    return {
        Refreshed = v31.PathReducer.Refreshed,
        SelectedObject = v31.PathReducer.SelectedObject,
        Path2DToolMode = v31.PathReducer.Path2DToolMode,
        ParentAbsRotation = v31.PathReducer.ParentAbsRotation,
        ParentAbsSize = v31.PathReducer.ParentAbsSize
    };
end, function(v33)
    return {
        dispatchPathChanged = function(v34)
            v33(v6(v34));
        end,
        dispatchToggleMoveTool = function()
            v33(v7());
        end,
        dispatchSetPathPosition = not l_PathEditorRotation_0 and function(v35, v36)
            v33(v8(v35, v36));
        end or function(v37, v38, v39)
            v33(v8(v37, v38, v39));
        end
    };
end)((l_withContext_0({})(v17)));


local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.React);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local v4 = require(l_Parent_0.Packages.Framework);
local v5 = require(l_Parent_0.Packages.ViewportToolingFramework);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Mouse_0 = l_ContextServices_0.Mouse;
local l_Plugin_0 = l_ContextServices_0.Plugin;
local l_Stylizer_0 = l_ContextServices_0.Stylizer;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Toolbar_0 = v5.Toolbar;
local l_Actions_0 = l_Parent_0.Src.Actions;
local v14 = require(l_Actions_0.ToggleAddPointTool);
local v15 = require(l_Actions_0.ToggleAddTangentTool);
local v16 = require(l_Actions_0.ToggleDone);
local v17 = require(l_Actions_0.ToggleMirrored);
local v18 = require(l_Actions_0.ToggleMoveTool);
local v19 = require(l_Actions_0.ToolbarHovered);
local l_Thunks_0 = l_Parent_0.Src.Thunks;
local v21 = require(l_Thunks_0.AddControlPointTangent);
local v22 = require(l_Thunks_0.ClearControlPointTangent);
local v23 = require(l_Thunks_0.RemoveControlPoint);
local v24 = require(l_Parent_0.Src.Util.getShortcuts)();
local v25 = require(l_Parent_0.Src.Util.TelemetryGlobals);
local v26 = require(l_Parent_0.Src.Resources.Constants);
local l_PathEditorMaxControlPointDisableAdd_0 = game:GetFastFlag("PathEditorMaxControlPointDisableAdd");
local v28 = game:DefineFastFlag("PathEditorSelectToolRename", false);
local v29 = v2.PureComponent:extend("PathToolbar");
v29.render = function(v30)
    local l_props_0 = v30.props;
    local l_PathToolbar_0 = l_props_0.Stylizer.PathToolbar;
    local l_Localization_1 = l_props_0.Localization;
    local _ = nil;
    if l_props_0.SelectedObject then
        local v36 = {
            {
                Type = "Radio",
                Value = l_props_0.Path2DToolMode,
                OnChange = function(v35)
                    if v35 == "Move" then
                        l_props_0.dispatchToggleMoveTool();
                        return ;
                    elseif v35 == "AddPoint" then
                        l_props_0.dispatchToggleAddPointTool();
                        return ;
                    else
                        if v35 == "AddTangent" then
                            l_props_0.dispatchToggleAddTangentTool();
                        end;
                        return ;
                    end;
                end,
                Items = {
                    {
                        Id = "Move",
                        Tooltip = ("%* (%*)"):format(l_Localization_1:getText("Info", not v28 and "SelectTool" or "Select"), v24.Move),
                        Icon = l_PathToolbar_0.MoveImage
                    },
                    if not l_PathEditorMaxControlPointDisableAdd_0 or if not l_PathEditorMaxControlPointDisableAdd_0 then nil else #l_props_0.SelectedObject:GetControlPoints() < v26.MaxControlPoints then {
                        Id = "AddPoint",
                        Tooltip = ("%* (%*)"):format(l_Localization_1:getText("Info", "AddPointTool"), v24.AddPoint),
                        Icon = l_PathToolbar_0.AddPointImage
                    } else nil,
                    {
                        Id = "AddTangent",
                        Tooltip = ("%* (%*)"):format(l_Localization_1:getText("Info", "AddTangentTool"), v24.AddTangent),
                        Icon = l_PathToolbar_0.AddTangentImage
                    }
                }
            }
        };
        if l_props_0.Path2DToolMode ~= "DoneEditing" then
            table.insert(v36, {
                Type = "TextButton",
                Text = l_Localization_1:getText("Info", "Done"),
                OnClick = l_props_0.dispatchToggleDone
            });
        end;
        return v2.createElement(l_Toolbar_0, {
            DisplayOrder = 4,
            HorizontalItems = v36
        });
    else
        return nil;
    end;
end;
return v3.connect(function(v37, _)
    return {
        ControlPointStates = v37.PathReducer.ControlPointStates,
        SelectedObject = v37.PathReducer.SelectedObject,
        Path2DToolMode = v37.PathReducer.Path2DToolMode,
        SelectedControlPointIndex = v37.PathReducer.SelectedControlPointIndex,
        SelectedTangentSide = v37.PathReducer.SelectedTangentSide
    };
end, function(v39)
    return {
        dispatchToggleAddPointTool = function()
            local l_v25_0 = v25;
            l_v25_0.addPointModeCount = l_v25_0.addPointModeCount + 1;
            v39(v14());
        end,
        dispatchToggleAddTangentTool = function()
            local l_v25_1 = v25;
            l_v25_1.addTangentModeCount = l_v25_1.addTangentModeCount + 1;
            v39(v15());
        end,
        dispatchToggleDone = function()
            v39(v16());
        end,
        dispatchToggleMoveTool = function()
            local l_v25_2 = v25;
            l_v25_2.selectModeCount = l_v25_2.selectModeCount + 1;
            v39(v18());
        end,
        dispatchRemoveControlPoint = function()
            v39(v23());
        end,
        dispatchClearControlPointTangent = function(v43, v44)
            v39(v22(v43, v44));
        end,
        dispatchClearControlPointTangents = function(v45)
            v39(v22(v45, "Left"));
            v39(v22(v45, "Right"));
        end,
        dispatchToolbarHovered = function(v46)
            v39(v19(v46));
        end,
        dispatchAddControlPointTangent = function(v47)
            v39(v21(v47));
        end,
        dispatchToggleMirrored = function(v48)
            v39(v17(v48));
        end
    };
end)((l_withContext_0({
    Mouse = l_Mouse_0,
    Plugin = l_Plugin_0,
    Stylizer = l_Stylizer_0,
    Localization = l_Localization_0
})(v29)));


local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.React);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local v4 = require(l_Parent_0.Packages.Framework);
local l_Selection_0 = game:GetService("Selection");
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Actions_0 = l_Parent_0.Src.Actions;
local v9 = require(l_Actions_0.SelectPath);
local v10 = require(l_Actions_0.ClearPathSelection);
local v11 = require(l_Actions_0.PathChanged);
local v12 = require(l_Actions_0.ToggleAddPointTool);
local v13 = require(l_Actions_0.ToggleMoveTool);
local v14 = require(l_Actions_0.ToggleAddTangentTool);
local v15 = require(l_Actions_0.ToggleDone);
local v16 = require(l_Parent_0.Src.Thunks.RemoveControlPoint);
local l_Util_0 = l_Parent_0.Src.Util;
local v18 = require(l_Util_0.TelemetryGlobals);
local v19 = require(l_Util_0.isHierarchyValidForPath2D);
local v20 = game:defineFastFlag("PathEditorFixActionBindings", false);
local l_PathEditorHierarchyValidCheckFixes_0 = game:GetFastFlag("PathEditorHierarchyValidCheckFixes");
local v22 = v2.PureComponent:extend("SelectionListener");
v22.addAction = function(v23, v24, v25)
    if not v24 then
        return nil;
    else
        v24.Enabled = false;
        table.insert(v23.Actions, v24);
        table.insert(v23.Connections, v24.Triggered:Connect(v25));
        return v24;
    end;
end;
v22.enableActions = function(_, v27)
    if v27 then
        for _, v29 in ipairs(v27) do
            v29.Enabled = true;
        end;
    end;
end;
v22.disableActions = function(_, v31)
    if v31 then
        for _, v33 in ipairs(v31) do
            v33.Enabled = false;
        end;
    end;
end;
v22.init = function(v34)
    local l_props_0 = v34.props;
    v34.delete = function()
        if v34.props.Path2DToolMode == "AddTangent" then
            if v34.props.SelectedControlPointIndex ~= 0 and v34.props.SelectedTangentSide ~= nil then
                v34.props.dispatchClearControlPointTangent(v34.props.SelectedControlPointIndex, v34.props.SelectedTangentSide);
                return ;
            end;
        else
            v34.props.dispatchRemoveControlPoint();
        end;
    end;
    local function v37(v36)
        if not (v36 ~= "AbsolutePosition") or v36 == "AbsoluteSize" then
            l_props_0.dispatchPathChanged("Position");
        end;
    end;
    local function v38()
        l_props_0.dispatchSelectPathCleared();
        if not v20 then
            v34:disableActions();
        else
            v34:disableActions(v34.Actions);
        end;
        if v34.state.selectedObjectChangedConn ~= nil then
            v34.state.selectedObjectChangedConn:Disconnect();
        end;
        if v34.state.selectedObjectParentChangedConn ~= nil then
            v34.state.selectedObjectParentChangedConn:Disconnect();
        end;
        v34.selectedObject = nil;
    end;
    local function v41(v39)
        if v34.selectedObject == nil then
            return ;
        elseif v39 ~= "Parent" then
            l_props_0.dispatchPathChanged(v39);
            return ;
        else
            if v34.state.selectedObjectParentChangedConn ~= nil then
                v34.state.selectedObjectParentChangedConn:Disconnect();
            end;
            v34:setState({
                selectedObjectParentChangedConn = v34.selectedObject.Parent.Changed:Connect(v37)
            });
            local v40 = if not game:GetFastFlag("PathEditorSurfaceGui") then v34.selectedObject.Parent:IsA("GuiBase2d") else v19(v34.selectedObject);
            if not (v34.props.SelectedObject ~= nil) or v40 then
                if not (v34.props.SelectedObject == nil) or not v40 then
                    l_props_0.dispatchPathChanged(v39);
                    return ;
                else
                    l_props_0.dispatchSelectPath(v34.selectedObject);
                    v34:enableActions(v34.UniversalActions);
                    return ;
                end;
            else
                l_props_0.dispatchSelectPathCleared();
                v34:disableActions();
                return ;
            end;
        end;
    end;
    v34:setState({
        selectionChangedConn = l_Selection_0.SelectionChanged:Connect(function()
            local v42 = l_Selection_0:Get();
            if #v42 == 1 then
                for _, v44 in pairs(v42) do
                    if v44:IsA("Path2D") and v44.Parent ~= nil then
                        if if not l_PathEditorHierarchyValidCheckFixes_0 then v44.Parent:IsA("GuiBase2d") else v19(v44) then
                            l_props_0.dispatchSelectPath(v44);
                            v34:enableActions(v34.UniversalActions);
                        end;
                        v34.selectedObject = v44;
                        v34:setState({
                            selectedObjectChangedConn = v44.Changed:Connect(v41),
                            selectedObjectParentChangedConn = v44.Parent.Changed:Connect(v37)
                        });
                    else
                        v38();
                    end;
                end;
                return ;
            else
                v38();
                return ;
            end;
        end)
    });
end;
v22.didMount = function(v45)
    local l_PluginActions_0 = v45.props.PluginActions;
    v45.Connections = {};
    v45.Actions = {};
    v45.EditingActions = {};
    v45.UniversalActions = {};
    table.insert(v45.EditingActions, v45:addAction(l_PluginActions_0:get("DoneEditing"), v45.props.dispatchToggleDone));
    table.insert(v45.UniversalActions, v45:addAction(l_PluginActions_0:get("MoveTool"), v45.props.dispatchToggleMoveTool));
    table.insert(v45.UniversalActions, v45:addAction(l_PluginActions_0:get("AddPointMode"), v45.props.dispatchToggleAddPointTool));
    table.insert(v45.UniversalActions, v45:addAction(l_PluginActions_0:get("AddTangentMode"), v45.props.dispatchToggleAddTangentTool));
end;
v22.willUnmount = function(v47)
    if v47.state.selectionChangedConn ~= nil then
        v47.state.selectionChangedConn:Disconnect();
    end;
    if v47.state.selectedObjectChangedConn ~= nil then
        v47.state.selectedObjectChangedConn:Disconnect();
    end;
    if v47.state.selectedObjectParentChangedConn ~= nil then
        v47.state.selectedObjectParentChangedConn:Disconnect();
    end;
    if v47.Connections then
        for _, v49 in ipairs(v47.Connections) do
            v49:Disconnect();
        end;
        v47.Connections = {};
    end;
    if v47.Actions then
        for _, v51 in ipairs(v47.Actions) do
            v51.Enabled = false;
        end;
    end;
end;
v22.render = function(v52)
    local l_props_1 = v52.props;
    if v52.lastToolingMode ~= l_props_1.Path2DToolMode then
        v52.lastToolingMode = l_props_1.Path2DToolMode;
        if v52.lastToolingMode == "DoneEditing" then
            v52:disableActions(v52.EditingActions);
        else
            v52:enableActions(v52.EditingActions);
        end;
    end;
    return nil;
end;
return v3.connect(function(v54, _)
    return {
        SelectedObject = v54.PathReducer.SelectedObject,
        SelectedControlPointIndex = v54.PathReducer.SelectedControlPointIndex,
        SelectedTangentSide = v54.PathReducer.SelectedTangentSide,
        Path2DToolMode = v54.PathReducer.Path2DToolMode
    };
end, function(v56)
    return {
        dispatchToggleDone = function()
            v56(v15());
        end,
        dispatchToggleAddPointTool = function()
            local l_v18_0 = v18;
            l_v18_0.addPointModeCount = l_v18_0.addPointModeCount + 1;
            v56(v12());
        end,
        dispatchToggleAddTangentTool = function()
            local l_v18_1 = v18;
            l_v18_1.addTangentModeCount = l_v18_1.addTangentModeCount + 1;
            v56(v14());
        end,
        dispatchToggleMoveTool = function()
            local l_v18_2 = v18;
            l_v18_2.selectModeCount = l_v18_2.selectModeCount + 1;
            v56(v13());
        end,
        dispatchPathChanged = function(v60)
            v56(v11(v60));
        end,
        dispatchSelectPath = function(v61)
            v56(v9(v61));
        end,
        dispatchSelectPathCleared = function()
            v56(v10());
        end,
        dispatchRemoveControlPoint = function()
            v56(v16());
        end
    };
end)((l_withContext_0({
    PluginActions = l_ContextServices_0.PluginActions,
    Mouse = l_ContextServices_0.Mouse
})(v22)));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.React);
local l_withContext_0 = require(l_Parent_0.Packages.Framework).ContextServices.withContext;
local v3 = v1.PureComponent:extend("SignalListener");
v3.init = function(v4)
    local l_props_0 = v4.props;
    v4.state = {
        connection = l_props_0.signal:Connect(l_props_0.callback)
    };
end;
v3.willUnmount = function(v6)
    if v6.state.connection ~= nil then
        v6.state.connection:Disconnect();
    end;
end;
v3.render = function(_)
    return nil;
end;
return (l_withContext_0({})(v3));


local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.React);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local v4 = require(l_Parent_0.Packages.Framework);
local l_UserInputService_0 = game:GetService("UserInputService");
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Plugin_0 = l_ContextServices_0.Plugin;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Actions_0 = l_Parent_0.Src.Actions;
local v11 = require(l_Actions_0.LockSelectedControlPoint);
local v12 = require(l_Actions_0.SelectTangentSide);
local l_Thunks_0 = l_Parent_0.Src.Thunks;
local v14 = require(l_Thunks_0.RecordChangeHistory);
local v15 = require(l_Thunks_0.SelectControlPoint);
local v16 = require(l_Thunks_0.ClearControlPointTangent);
local v17 = require(l_Thunks_0.SetControlPointTangent);
local v18 = require(l_Thunks_0.OpenContextMenu);
local _ = require(l_Parent_0.Src.Resources.Constants);
local v20 = require(l_Parent_0.Src.Components.DraggablePoint);
local l_LeftShift_0 = Enum.KeyCode.LeftShift;
local _ = Enum.KeyCode.LeftControl;
local v23 = v2.Component:extend("TangentPoint");
v23.render = function(v24)
    local l_props_0 = v24.props;
    local v26 = "Tangent";
    if l_props_0.isPhantom then
        v26 = "PhantomTangent";
    end;
    return v2.createElement(v20, {
        ZIndex = 1,
        AbsolutePosition = l_props_0.absolutePosition,
        FollowCursorOnDrag = false,
        Style = v26,
        IsSelected = l_props_0.SelectedTangentSide == l_props_0.side,
        OnSelected = function()
            l_props_0.dispatchSelectControlPoint(l_props_0.index);
            l_props_0.dispatchSelectTangentSide(l_props_0.side);
        end,
        OnDoubleClicked = function()
            l_props_0.dispatchClearControlPointTangent(l_props_0.index, l_props_0.side);
        end,
        OnDragStart = function()
            l_props_0.dispatchRecordChangeHistory("Move Tangent");
            l_props_0.dispatchSelectControlPoint(l_props_0.index);
            l_props_0.dispatchLockSelectedControlPoint(true);
        end,
        OnDragMoved = function(v27, v28)
            l_props_0.dispatchSetControlPointTangent(l_props_0.index, l_props_0.side, l_props_0.position + (v28 - v27), false, (l_UserInputService_0:IsKeyDown(l_LeftShift_0)));
        end,
        OnDragEnd = function(_, _)
            l_props_0.dispatchLockSelectedControlPoint(false);
            l_props_0.dispatchRecordChangeHistory();
        end,
        OnRightClicked = function()
            l_props_0.dispatchSelectControlPoint(l_props_0.index);
            l_props_0.dispatchSelectTangentSide(l_props_0.side);
            l_props_0.dispatchOpenContextMenu(l_props_0.PluginContext, l_props_0.Localization);
        end
    });
end;
return v3.connect(function(v31, _)
    return {
        LockSelectedControlPoint = v31.PathReducer.LockSelectedControlPoint,
        SelectedTangentSide = v31.PathReducer.SelectedTangentSide
    };
end, function(v33)
    return {
        dispatchRecordChangeHistory = function(v34)
            v33(v14(v34));
        end,
        dispatchClearControlPointTangent = function(v35, v36)
            v33(v16(v35, v36));
        end,
        dispatchSelectControlPoint = function(v37)
            v33(v15(v37));
        end,
        dispatchSelectTangentSide = function(v38)
            v33(v12(v38));
        end,
        dispatchSetControlPointTangent = function(v39, v40, v41, v42, v43)
            v33(v17(v39, v40, v41, v42, v43));
        end,
        dispatchLockSelectedControlPoint = function(v44)
            v33(v11(v44));
        end,
        dispatchOpenContextMenu = function(v45, v46)
            v33(v18(v45, v46));
        end
    };
end)((l_withContext_0({
    PluginContext = l_Plugin_0,
    Localization = l_Localization_0
})(v23)));


local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.React);
local v3 = require(l_Parent_0.Packages.RoactRodux);
local v4 = require(l_Parent_0.Packages.Framework);
local l_Pane_0 = v4.UI.Pane;
local l_withContext_0 = v4.ContextServices.withContext;
local l_Actions_0 = l_Parent_0.Src.Actions;
local v8 = require(l_Actions_0.PathChanged);
local v9 = require(l_Actions_0.ToggleMoveTool);
local v10 = require(l_Parent_0.Src.Util.getAbsolutePosition);
local l_Components_0 = l_Parent_0.Src.Components;
local v12 = require(l_Components_0.ControlPoint);
local v13 = require(l_Components_0.GuiShim);
local v14 = require(l_Components_0.Line);
local v15 = v2.PureComponent:extend("VisualizationGui");
v15.render = function(v16)
    local l_props_0 = v16.props;
    if l_props_0.SelectedObject then
        local v18 = v10(l_props_0.SelectedObject.Parent);
        local v19 = {};
        local l_ControlPoints_0 = l_props_0.ControlPoints;
        if l_props_0.Path2DToolMode == "AddPoint" then
            for v21, v22 in l_ControlPoints_0, nil, nil do
                v19[v21] = v2.createElement(v12, {
                    index = v21,
                    point = v22,
                    showTangentsPhantom = l_props_0.IsDraggingPoint and l_props_0.SelectedControlPointIndex == v21,
                    isSelected = l_props_0.SelectedControlPointIndex == v21,
                    Disabled = true
                });
            end;
        end;
        return v2.createElement(not game:GetFastFlag("PathEditorSurfaceGui") and "ScreenGui" or v13, {
            DisplayOrder = 1
        }, {
            EmptySpaceInputBlocker = l_props_0.Path2DToolMode ~= "DoneEditing" and v2.createElement(l_Pane_0, {
                Size = UDim2.fromScale(1, 1),
                OnClick = function()
                end
            }),
            LineFrame = v2.createElement("Frame", {
                Size = UDim2.fromScale(1, 1),
                BackgroundTransparency = 1,
                Position = UDim2.fromOffset(v18.X, v18.Y)
            }, {
                Line = l_props_0.SelectedObject.Visible == false and v2.createElement(v14, {
                    Style = "Visualization",
                    ControlPoints = l_props_0.ControlPoints
                })
            }),
            PointFrame = v2.createElement("Frame", {
                Size = UDim2.fromScale(1, 1),
                BackgroundTransparency = 1
            }, v19)
        });
    else
        return nil;
    end;
end;
return v3.connect(function(v23, _)
    return {
        Refreshed = v23.PathReducer.Refreshed,
        SelectedObject = v23.PathReducer.SelectedObject,
        Path2DToolMode = v23.PathReducer.Path2DToolMode,
        ControlPoints = v23.PathReducer.ControlPoints,
        SelectedControlPointIndex = v23.PathReducer.SelectedControlPointIndex,
        IsDraggingPoint = v23.PathReducer.IsDraggingPoint
    };
end, function(v25)
    return {
        dispatchPathChanged = function(v26)
            v25(v8(v26));
        end,
        dispatchToggleMoveTool = function()
            v25(v9());
        end
    };
end)((l_withContext_0({})(v15)));


local l_Parent_0 = script.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.React);
local v3 = require(l_Parent_0.Packages.ReactRoblox);
local v4 = require(l_Parent_0.Packages.Rodux);
local v5 = require(l_Parent_0.Packages.Dash);
local l_CoreGui_0 = game:GetService("CoreGui");
local l_RbxAnalyticsService_0 = game:GetService("RbxAnalyticsService");
local l_RunService_0 = game:GetService("RunService");
local l_ContextServices_0 = require(l_Parent_0.Packages.Framework).ContextServices;
local l_Plugin_0 = l_ContextServices_0.Plugin;
local l_Mouse_0 = l_ContextServices_0.Mouse;
local l_Store_0 = l_ContextServices_0.Store;
local v13 = require(l_Parent_0.Src.Reducers.MainReducer);
local v14 = require(l_Parent_0.Src.Resources.MakeTheme);
local l_SourceStrings_0 = l_Parent_0.Src.Resources.Localization.SourceStrings;
local l_LocalizedStrings_0 = l_Parent_0.Src.Resources.Localization.LocalizedStrings;
local l_Util_0 = l_Parent_0.Src.Util;
local v18 = require(l_Util_0.MakePluginActions);
local v19 = require(l_Util_0.TelemetryGlobals);
local v20 = require(l_Util_0.Telemetry.Path2dToolUsage);
local v21 = require(l_Util_0.Telemetry.TelemetryProtocol);
local _ = require(l_Util_0.Telemetry.TelemetryProtocolTypes);
local l_Components_0 = l_Parent_0.Src.Components;
local v24 = require(l_Components_0.ControlPointEditGui);
local v25 = require(l_Components_0.SelectionListener);
local v26 = require(l_Components_0.PathToolbar);
local v27 = require(l_Components_0.MoveBaseGui);
local v28 = require(l_Components_0.VisualizationGui);
local v29 = require(l_Components_0.AddPointComponent);
local v30 = v2.PureComponent:extend("MainPlugin");
v30.init = function(v31, v32)
    v31.state = {};
    v31.store = v4.Store.new(v13, nil, {
        v4.thunkMiddleware
    }, nil);
    v31.localization = l_ContextServices_0.Localization.new({
        stringResourceTable = l_SourceStrings_0,
        translationResourceTable = l_LocalizedStrings_0,
        pluginName = "PathEditor"
    });
    v31.log = function(v33, v34)
        v31.telemetry:logRobloxTelemetryEvent(v33, nil, v5.join({
            placeId = game.PlaceId,
            studioSid = l_RbxAnalyticsService_0:GetSessionId()
        }, v34));
    end;
    v31.logUsageReport = function()
        if v19:totalCount() > 0 then
            v31.log(v20, {
                selectModeCount = v19.selectModeCount,
                addPointModeCount = v19.addPointModeCount,
                addTangentModeCount = v19.addTangentModeCount
            });
            v19:reset();
        end;
    end;
    v31.telemetry = v21.new();
    v31.analytics = l_ContextServices_0.Analytics.new(function()
        return {};
    end, {});
    if not (not game:GetFastFlag("PathEditorRBXTelemetry") or l_RunService_0:IsClient()) then
        game:BindToClose(function()
            v31.logUsageReport();
        end);
    end;
    v31.actions = l_ContextServices_0.PluginActions.new(v32.Plugin, v18(v32.plugin, v31.localization));
end;
v30.render = function(v35)
    local l_Plugin_1 = v35.props.Plugin;
    return l_ContextServices_0.provide({
        l_Plugin_0.new(l_Plugin_1),
        l_Store_0.new(v35.store),
        l_Mouse_0.new(l_Plugin_1:getMouse()),
        v14(),
        v35.localization,
        v35.analytics,
        v35.actions
    }, {
        Portal = v3.createPortal({
            PathEditFolder = v2.createElement("Folder", {
                Name = "PathEditFolder"
            }, {
                ControlPointEditGui = v2.createElement(v24),
                PathToolbar = v2.createElement(v26),
                MoveBaseGui = v2.createElement(v27),
                VisualizationGui = v2.createElement(v28),
                AddPointComponent = v2.createElement(v29)
            })
        }, l_CoreGui_0),
        SelectionListener = v2.createElement(v25)
    });
end;
return v30;


return (require(script.Parent.Parent.Parent.Packages.Rodux).combineReducers({
    ChangeHistoryServiceRecording = nil,
    PathReducer = require(script.Parent.PathReducer)
}));


local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Packages.Rodux);
local v3 = require(l_Parent_0.Packages.Dash);
local v4 = require(l_Parent_0.Src.Resources.Constants);
local l_Actions_0 = l_Parent_0.Src.Actions;
local v6 = require(l_Actions_0.ChangeControlPointState);
local v7 = require(l_Actions_0.ClearPathSelection);
local v8 = require(l_Actions_0.DeselectControlPoint);
local v9 = require(l_Actions_0.LockSelectedControlPoint);
local v10 = require(l_Actions_0.PathChanged);
local v11 = require(l_Actions_0.SelectControlPoint);
local v12 = require(l_Actions_0.SelectPath);
local v13 = require(l_Actions_0.SelectTangentSide);
local v14 = require(l_Actions_0.SetAddPointSubMode);
local v15 = require(l_Actions_0.SetIsDraggingPoint);
local v16 = require(l_Actions_0.SetRecording);
local v17 = require(l_Actions_0.ToggleAddPointTool);
local v18 = require(l_Actions_0.ToggleAddTangentTool);
local v19 = require(l_Actions_0.ToggleDone);
local v20 = require(l_Actions_0.ToggleMirrored);
local v21 = require(l_Actions_0.ToggleMoveTool);
local v22 = require(l_Actions_0.ToggleSharp);
local v23 = require(l_Actions_0.ToolbarHovered);
local l_Util_0 = l_Parent_0.Src.Util;
local v25 = require(l_Util_0.findTopLevelGui);
local v26 = require(l_Util_0.getControlPointStates);
local v27 = require(l_Util_0.getAbsolutePosition);
local v28 = require(l_Util_0.isHierarchyValidForPath2D);
local v29 = require(l_Util_0.hasProperty);
local l_PathEditorRotation_0 = game:GetFastFlag("PathEditorRotation");
local l_PathEditorMaxControlPointDisableAdd_0 = game:GetFastFlag("PathEditorMaxControlPointDisableAdd");
return (v2.createReducer({
    AddPointSubMode = "Unselected",
    ChangeHistoryServiceRecording = nil,
    ControlPoints = {},
    ControlPointStates = {},
    DeselectedControlPointIndex = 0,
    IsDraggingPoint = false,
    LockedPoint = nil,
    LockSelectedControlPoint = false,
    ParentAbsPos = Vector2.zero,
    ParentAbsSize = Vector2.zero,
    ParentAbsRotation = 0,
    Path2DToolMode = "DoneEditing",
    Refreshed = 0,
    ScalePositionMode = true,
    SelectedControlPointIndex = 0,
    SelectedObject = nil,
    SelectedObjectGui = nil,
    SelectedTangentSide = nil,
    ToolbarHovered = false
}, {
    [v16.name] = function(v32, v33)
        return v3.join(v32, {
            ChangeHistoryServiceRecording = if not v33.Recording then v3.None else v33.Recording
        });
    end,
    [v14.name] = function(v34, v35)
        return v3.join(v34, {
            AddPointSubMode = v35.SubMode
        });
    end,
    [v15.name] = function(v36, v37)
        return v3.join(v36, {
            IsDraggingPoint = v37.Dragging
        });
    end,
    [v23.name] = function(v38, v39)
        return v3.join(v38, {
            IsDraggingPoint = if not v39.Hovered then nil else false,
            ToolbarHovered = v39.Hovered
        });
    end,
    [v19.name] = function(v40)
        return v3.join(v40, {
            Path2DToolMode = v40.Path2DToolMode == "DoneEditing" and "Move" or "DoneEditing"
        });
    end,
    [v21.name] = function(v41)
        return v3.join(v41, {
            SelectedTangentSide = nil,
            Path2DToolMode = "Move"
        });
    end,
    [v17.name] = function(v42)
        return v3.join(v42, {
            Path2DToolMode = "AddPoint",
            AddPointSubMode = #v42.ControlPoints < 2 and "Append" or "Unselected",
            SelectedControlPointIndex = 0,
            SelectedTangentSide = nil
        });
    end,
    [v18.name] = function(v43)
        return v3.join(v43, {
            Path2DToolMode = "AddTangent",
            SelectedTangentSide = nil
        });
    end,
    [v10.name] = function(v44, v45)
        local _ = v45.PropChanged;
        local l_SelectedObject_0 = v44.SelectedObject;
        if l_SelectedObject_0 == nil then
            return v44;
        else
            if not game:GetFastFlag("PathEditorSurfaceGui") then
                if not (not (v45.PropChanged == "Parent") or l_SelectedObject_0.Parent:IsA("GuiBase2d")) then
                    return v44;
                end;
            elseif not (not (v45.PropChanged == "Parent") or v28(l_SelectedObject_0)) then
                return v44;
            end;
            local l_l_SelectedObject_0_ControlPoints_0 = l_SelectedObject_0:GetControlPoints();
            local v49 = nil;
            if #l_SelectedObject_0:GetControlPoints() ~= #v44.ControlPointStates then
                v49 = v26(l_l_SelectedObject_0_ControlPoints_0);
            end;
            return v3.join(v44, {
                Refreshed = tick(),
                ControlPoints = l_l_SelectedObject_0_ControlPoints_0,
                ControlPointStates = v49,
                ParentAbsPos = v27(l_SelectedObject_0.Parent),
                ParentAbsSize = l_SelectedObject_0.Parent.AbsoluteSize,
                Path2DToolMode = (not not l_PathEditorMaxControlPointDisableAdd_0 and v4.MaxControlPoints <= #l_l_SelectedObject_0_ControlPoints_0) and "Move" or nil,
                ParentAbsRotation = if not l_PathEditorRotation_0 then nil else if not not l_PathEditorRotation_0 and v29(l_SelectedObject_0.Parent, "AbsoluteRotation") then l_SelectedObject_0.Parent.AbsoluteRotation else 0,
                SelectedObjectGui = if not game:GetFastFlag("PathEditorSurfaceGui") then nil else v25(l_SelectedObject_0)
            });
        end;
    end,
    [v12.name] = function(v50, v51)
        if v51.object == v50.SelectedObject then
            return v50;
        else
            local l_object_0 = v51.object;
            if l_object_0 == nil then
                return v50;
            else
                local l_l_object_0_ControlPoints_0 = l_object_0:GetControlPoints();
                return v3.join(v50, {
                    SelectedObject = l_object_0,
                    SelectedObjectGui = if not game:GetFastFlag("PathEditorSurfaceGui") then nil else v25(l_object_0),
                    ControlPoints = l_l_object_0_ControlPoints_0,
                    ControlPointStates = v26(l_l_object_0_ControlPoints_0),
                    SelectedControlPointIndex = 0,
                    SelectedTangentSide = nil,
                    ParentAbsPos = v27(l_object_0.Parent),
                    ParentAbsSize = l_object_0.Parent.AbsoluteSize,
                    ParentAbsRotation = if not l_PathEditorRotation_0 then nil else if not not l_PathEditorRotation_0 and v29(l_object_0.Parent, "AbsoluteRotation") then l_object_0.Parent.AbsoluteRotation else 0,
                    Path2DToolMode = #l_l_object_0_ControlPoints_0 > 1 and "DoneEditing" or "AddPoint",
                    AddPointSubMode = #l_l_object_0_ControlPoints_0 > 1 and "Unselected" or "Append"
                });
            end;
        end;
    end,
    [v7.name] = function(v54, _)
        return v3.join(v54, {
            SelectedObject = v3.None,
            SelectedObjectGui = nil,
            ControlPoints = {},
            ControlPointStates = {},
            SelectedControlPointIndex = 0,
            SelectedTangentSide = nil,
            LockSelectedControlPoint = false,
            Path2DToolMode = "DoneEditing"
        });
    end,
    [v11.name] = function(v56, v57)
        local l_DeselectedControlPointIndex_0 = v56.DeselectedControlPointIndex;
        if l_DeselectedControlPointIndex_0 == v57.Index then
            l_DeselectedControlPointIndex_0 = 0;
        end;
        return v3.join(v56, {
            SelectedTangentSide = nil,
            SelectedControlPointIndex = v57.Index,
            DeselectedControlPointIndex = l_DeselectedControlPointIndex_0
        });
    end,
    [v13.name] = function(v59, v60)
        return v3.join(v59, {
            SelectedTangentSide = if not v60.Side then v3.None else v60.Side
        });
    end,
    [v8.name] = function(v61, _)
        return v3.join(v61, {
            SelectedControlPointIndex = 0,
            DeselectedControlPointIndex = v61.SelectedControlPointIndex
        });
    end,
    [v9.name] = function(v63, v64)
        local l_SelectedControlPointIndex_0 = v63.SelectedControlPointIndex;
        local l_ControlPoints_0 = v63.ControlPoints;
        if not (v63.SelectedControlPointIndex > 0) or #v63.ControlPoints < v63.SelectedControlPointIndex then
            v64.Locked = false;
        end;
        return v3.join(v63, {
            LockSelectedControlPoint = v64.Locked,
            LockedPoint = if not v64.Locked then nil else l_ControlPoints_0[l_SelectedControlPointIndex_0]
        });
    end,
    [v20.name] = function(v67, v68)
        local l_Index_0 = v68.Index;
        local v70 = table.clone(v67.ControlPointStates);
        v70[l_Index_0] = table.clone(v70[l_Index_0]);
        v70[l_Index_0].Mirrored = not v70[l_Index_0].Mirrored;
        return v3.join(v67, {
            ControlPointStates = v70
        });
    end,
    [v22.name] = function(v71, v72)
        local l_Index_1 = v72.Index;
        local v74 = table.clone(v71.ControlPointStates);
        v74[l_Index_1] = table.clone(v74[l_Index_1]);
        v74[l_Index_1].Sharp = not v74[l_Index_1].Sharp;
        return v3.join(v71, {
            ControlPointStates = v74
        });
    end,
    [v6.name] = function(v75, v76)
        local l_Index_2 = v76.Index;
        local v78 = table.clone(v75.ControlPointStates);
        v78[l_Index_2] = v76.State;
        return v3.join(v75, {
            ControlPointStates = v78
        });
    end
}));


return {
    PointSize = Vector2.new(16, 16),
    PointHalfSize = Vector2.new(8, 8),
    SnapToPointEpsilon = 6,
    SnapToSegmentEpsilon = 4,
    DragEpsilon = 3,
    DragTangentToCenterToDeleteZoneSizePixels = 7,
    ChangeHistoryServiceActionName = "PathEditorAction",
    DefaultTangentLength = 50,
    MaxControlPoints = 50,
    SurfaceGuiDragRaycastDepth = 5000
};


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Framework);
local v2 = require(l_Parent_0.Packages.Dash);
local _ = v2.join;
local l_Style_0 = v1.Style;
local l_StudioTheme_0 = l_Style_0.Themes.StudioTheme;
local l_DarkTheme_0 = l_Style_0.Themes.DarkTheme;
local l_LightTheme_0 = l_Style_0.Themes.LightTheme;
local l_StyleKey_0 = l_Style_0.StyleKey;
local l_StyleModifier_0 = v1.Util.StyleModifier;
local l_BaseTheme_0 = l_Style_0.Themes.BaseTheme;
local v11 = require(l_Parent_0.Src.Resources.Constants);
local l_ComponentSymbols_0 = l_Style_0.ComponentSymbols;
l_ComponentSymbols_0:add("DraggablePoint");
l_ComponentSymbols_0:add("Line");
l_ComponentSymbols_0:add("ControlPointVisual");
local v13 = string.format("rbxasset://studio_svg_textures/Lua/PathEditor/%s/Large/", "Light");
local v14 = string.format("rbxasset://studio_svg_textures/Lua/PathEditor/%s/Large/", "Dark");
local v15 = {
    [l_ComponentSymbols_0.Image] = v2.join(l_BaseTheme_0[l_ComponentSymbols_0.Image], {
        ["&ControlPoint"] = {
            Image = "rbxasset://textures/PathEditor/Control_Point_Selected.png",
            Size = UDim2.fromOffset(12, 12),
            AnchorPoint = Vector2.new(0.5, 0.5)
        },
        ["&PhantomTangent"] = {
            Image = "rbxasset://textures/PathEditor/Tangent_Handle.png",
            Size = UDim2.fromOffset(12, 12),
            AnchorPoint = Vector2.new(0.5, 0.5),
            ImageTransparency = 0.5
        }
    }),
    [l_ComponentSymbols_0.Button] = v2.join(l_BaseTheme_0[l_ComponentSymbols_0.Button], {
        ["&ModeButton"] = v2.join(l_BaseTheme_0[l_ComponentSymbols_0.Button]["&RoundSubtle"], {
            [l_StyleModifier_0.Disabled] = {
                BackgroundStyle = v2.join(l_BaseTheme_0[l_ComponentSymbols_0.RoundBox], {
                    Color = l_StyleKey_0.ActionActivated
                }),
                TextColor = l_StyleKey_0.ActionFocusBorder
            }
        })
    }),
    [l_ComponentSymbols_0.Line] = {
        Thickness = 1,
        Color = Color3.new(0, 0, 0),
        ["&Tangent"] = {
            Color = Color3.new(250, 250, 250),
            ContrastColor = l_StyleKey_0.ActionFocusBorder
        },
        ["&PhantomTangent"] = {
            Color = Color3.new(250, 250, 250),
            ContrastColor = l_StyleKey_0.ActionFocusBorder
        },
        ["&Visualization"] = {
            Color = Color3.new(250, 250, 250),
            ContrastColor = l_StyleKey_0.ActionFocusBorder
        }
    },
    [l_ComponentSymbols_0.DraggablePoint] = {
        PointSize = v11.PointSize,
        BackgroundTransparency = 1,
        HasControlPointVisual = false,
        ["&AddPoint"] = {
            AnchorPoint = Vector2.new(0, 0)
        },
        ["&RubberBand"] = {
            StrokeWidth = 1,
            StrokeColor = Color3.new(250, 250, 250)
        },
        ["&ControlPoint"] = {
            HasControlPointVisual = true,
            Padding = 6,
            AnchorPoint = Vector2.new(0.5, 0.5),
            BackgroundImage = "rbxasset://textures/PathEditor/Control_Point.png",
            [l_StyleModifier_0.Hover] = {
                BackgroundImage = "rbxasset://textures/PathEditor/Control_Point_Hover.png"
            },
            [l_StyleModifier_0.Selected] = {
                BackgroundImage = "rbxasset://textures/PathEditor/Control_Point_Selected.png",
                Padding = 4
            }
        },
        ["&PhantomControlPoint"] = {
            HasControlPointVisual = true,
            AnchorPoint = Vector2.new(0.5, 0.5),
            BackgroundImage = "rbxasset://textures/PathEditor/Control_Point.png",
            PointSize = Vector2.new(6, 6)
        },
        ["&Tangent"] = {
            HasControlPointVisual = true,
            Padding = 4,
            AnchorPoint = Vector2.new(0.5, 0.5),
            BackgroundTransparency = 1,
            BackgroundImage = "rbxasset://textures/PathEditor/Tangent_Handle.png",
            [l_StyleModifier_0.Hover] = {
                BackgroundImage = "rbxasset://textures/PathEditor/Tangent_Handle_Hover.png"
            },
            [l_StyleModifier_0.Selected] = {
                Padding = 2,
                BackgroundImage = "rbxasset://textures/PathEditor/Tangent_Handle_Selected.png"
            }
        },
        ["&PhantomTangent"] = {
            HasControlPointVisual = true,
            Padding = 4,
            AnchorPoint = Vector2.new(0.5, 0.5),
            BackgroundImage = "rbxasset://textures/PathEditor/Tangent_Handle.png"
        },
        ["&HiddenTangent"] = {
            HasControlPointVisual = true,
            BackgroundImage = "rbxasset://textures/PathEditor/Tangent_Handle.png",
            AnchorPoint = Vector2.new(0.5, 0.5),
            BackgroundTransparency = 1
        },
        ["&ScaleHandle"] = {
            HasControlPointVisual = true,
            AnchorPoint = Vector2.new(0.5, 0.5),
            PointSize = Vector2.new(5, 5),
            BackgroundImage = "rbxasset://textures/PathEditor/Tangent_Handle.png",
            [l_StyleModifier_0.Selected] = {
                StrokeWidth = 1,
                StrokeColor = l_StyleKey_0.ActionFocusBorder
            }
        }
    },
    [l_ComponentSymbols_0.ControlPointVisual] = {
        PointSize = UDim2.fromOffset(5, 5),
        BackgroundColor3 = Color3.fromRGB(250, 250, 250),
        StrokeColor = l_StyleKey_0.ActionFocusBorder,
        StrokeWidth = 1.5,
        LineJoinMode = Enum.LineJoinMode.Round,
        AddPoint = {
            CornerRadius = UDim.new(1, 0)
        },
        ControlPoint = {
            CornerRadius = UDim.new(1, 0),
            [l_StyleModifier_0.Hover] = {
                PointSize = UDim2.fromOffset(7, 7)
            },
            [l_StyleModifier_0.Selected] = {
                PointSize = UDim2.fromOffset(7, 7),
                BackgroundColor3 = l_StyleKey_0.ActionFocusBorder,
                StrokeColor = Color3.fromRGB(250, 250, 250)
            }
        },
        PhantomControlPoint = {
            CornerRadius = UDim.new(1, 0),
            PointSize = UDim2.fromOffset(2, 2),
            StrokeWidth = 1
        },
        Tangent = {
            LineJoinMode = Enum.LineJoinMode.Miter,
            CornerRadius = UDim.new(0, 0),
            Rotation = 45,
            [l_StyleModifier_0.Hover] = {
                PointSize = UDim2.fromOffset(7, 7)
            },
            [l_StyleModifier_0.Selected] = {
                PointSize = UDim2.fromOffset(7, 7),
                BackgroundColor3 = l_StyleKey_0.ActionFocusBorder,
                StrokeColor = Color3.fromRGB(250, 250, 250)
            }
        },
        PhantomTangent = {
            LineJoinMode = Enum.LineJoinMode.Miter,
            CornerRadius = UDim.new(0, 0),
            Rotation = 45
        }
    },
    MouseIcons = {
        AddPointCursor = l_StyleKey_0.AddPointCursor,
        AddTangentCursor = l_StyleKey_0.AddTangentCursor,
        MoveCursor = l_StyleKey_0.MoveCursor
    },
    PathToolbar = {
        DeleteButtonSize = UDim2.fromOffset(100, 30),
        ModeButtonSize = UDim2.fromOffset(30, 30),
        DoneButtonSize = UDim2.fromOffset(100, 30),
        SeparatorSize = UDim2.fromOffset(2, 30),
        SeparatorPadding = 4,
        AddPointImage = l_StyleKey_0.AddPoint,
        AddTangentImage = l_StyleKey_0.AddTangent,
        MoveImage = l_StyleKey_0.Move
    }
};
local v16 = v2.join(l_DarkTheme_0, {
    [l_StyleKey_0.AddPointCursor] = v14 .. "Path2DAddPoint.png",
    [l_StyleKey_0.AddTangentCursor] = v14 .. "Path2DAddPoint.png",
    [l_StyleKey_0.MoveCursor] = v14 .. "Path2DCursor.png",
    [l_StyleKey_0.AddPoint] = v14 .. "Path2DAddPoint.png",
    [l_StyleKey_0.AddTangent] = v14 .. "Path2DAddTangent.png",
    [l_StyleKey_0.Move] = v14 .. "Path2DMove.png"
});
local v17 = v2.join(l_LightTheme_0, {
    [l_StyleKey_0.AddPointCursor] = v13 .. "Path2DAddPoint.png",
    [l_StyleKey_0.AddTangentCursor] = v13 .. "Path2DAddPoint.png",
    [l_StyleKey_0.MoveCursor] = v13 .. "Path2DCursor.png",
    [l_StyleKey_0.AddPoint] = v13 .. "Path2DAddPoint.png",
    [l_StyleKey_0.AddTangent] = v13 .. "Path2DAddTangent.png",
    [l_StyleKey_0.Move] = v13 .. "Path2DMove.png"
});
return function(v18)
    local _ = nil;
    return (if not v18 then l_StudioTheme_0.new(v16, v17) else l_StudioTheme_0.mock(v16, v17)):extend(v15);
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Src.Actions.SelectControlPoint);
local v2 = require(l_Parent_0.Src.Thunks.RecordChangeHistory);
local v3 = require(l_Parent_0.Src.Resources.Constants);
local l_Util_0 = l_Parent_0.Src.Util;
local v5 = require(l_Util_0.makeNewPath2DControlPoint);
local v6 = require(l_Util_0.getUDim2ScaleFromOffset);
local l_PathEditorRotation_0 = game:GetFastFlag("PathEditorRotation");
return function(v8, v9)
    return function(v10)
        local l_PathReducer_0 = v10:getState().PathReducer;
        if l_PathReducer_0.SelectedObject == nil then
            return ;
        else
            v10:dispatch(v2("Add Control Point"));
            local l_ControlPoints_0 = l_PathReducer_0.SelectedObject:GetControlPoints();
            if l_PathEditorRotation_0 and #l_ControlPoints_0 == v3.MaxControlPoints then
                warn("Path2D: Cannot set more than ", v3.MaxControlPoints, "control points");
                return ;
            else
                local v13 = if (not not v9 and v9 <= #l_ControlPoints_0 + 1) and v9 > 0 then v9 else #l_ControlPoints_0 + 1;
                local v14 = v5();
                v14.Position = v6(v8, l_PathReducer_0.SelectedObject.Parent);
                if not game:getFastFlag("PathEditorUsePerformantAPICalls") then
                    table.insert(l_ControlPoints_0, v13, v14);
                    l_PathReducer_0.SelectedObject:SetControlPoints(l_ControlPoints_0);
                else
                    l_PathReducer_0.SelectedObject:InsertControlPoint(v13, v14);
                end;
                l_PathReducer_0.SelectedObject.SelectedControlPoint = v13;
                if l_PathEditorRotation_0 then
                    v10:dispatch(v1(v13));
                end;
                v10:dispatch(v2());
                return ;
            end;
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Src.Thunks.RecordChangeHistory);
local v2 = require(l_Parent_0.Src.Actions.ToggleSharp);
local v3 = require(l_Parent_0.Src.Resources.Constants);
local v4 = require(l_Parent_0.Src.Util.getAbsPosFromUDim2);
local v5 = require(l_Parent_0.Src.Util.getAbsolutePosition);
local v6 = require(l_Parent_0.Src.Util.getControlPointState);
local v7 = require(l_Parent_0.Src.Util.getUDim2ScaleFromVector2);
local v8 = game:DefineFastFlag("PathEditorAddTangentUndoFix", false);
local l_PathEditorRotation_0 = game:GetFastFlag("PathEditorRotation");
return function(v10)
    return function(v11)
        local l_PathReducer_0 = v11:getState().PathReducer;
        local l_ControlPoints_0 = l_PathReducer_0.SelectedObject:GetControlPoints();
        if not (v10 > 0) or #l_ControlPoints_0 < v10 then
            return ;
        else
            local l_v10_0 = v10;
            local l_ControlPointStates_0 = l_PathReducer_0.ControlPointStates;
            if not v8 then
                if not l_ControlPointStates_0[l_v10_0].Sharp then
                    return ;
                end;
            elseif not v6(l_ControlPoints_0[l_v10_0]).Sharp then
                return ;
            end;
            local v16 = false;
            if #l_PathReducer_0.ControlPoints > 1 then
                if l_v10_0 ~= 1 then
                    v16 = false;
                    if not (l_v10_0 == #l_PathReducer_0.ControlPoints) then
                        goto label0;
                    end;
                end;
                v16 = l_ControlPoints_0[1].Position == l_ControlPoints_0[#l_PathReducer_0.ControlPoints].Position;
            end;
            ::label0::;
            local v17 = if not not v16 and l_v10_0 == 1 then #l_PathReducer_0.ControlPoints else 1;
            if not v8 then
                v1("Add Control Point Tangents");
            else
                v11:dispatch(v1("Add Control Point Tangents"));
            end;
            local v18 = v5(l_PathReducer_0.SelectedObject.Parent);
            local l_AbsoluteSize_0 = l_PathReducer_0.SelectedObject.Parent.AbsoluteSize;
            local v20 = if not l_PathEditorRotation_0 then nil else l_PathReducer_0.ParentAbsRotation;
            if #l_PathReducer_0.ControlPoints == 1 then
                local l_one_0 = Vector2.one;
                l_ControlPoints_0[v10].LeftTangent = v7(l_one_0.Unit * -v3.DefaultTangentLength, l_PathReducer_0.SelectedObject.Parent);
                l_ControlPoints_0[v10].RightTangent = v7(l_one_0.Unit * v3.DefaultTangentLength, l_PathReducer_0.SelectedObject.Parent);
            elseif v10 > 1 and v10 < #l_PathReducer_0.ControlPoints then
                local v22 = v4(l_ControlPoints_0[v10 + 1].Position, v18, l_AbsoluteSize_0, if not l_PathEditorRotation_0 then nil else v20) - v4(l_ControlPoints_0[v10 - 1].Position, v18, l_AbsoluteSize_0, if not l_PathEditorRotation_0 then nil else v20);
                if v22.Y == 0 and v22.X == 0 then
                    v22 = Vector2.one;
                end;
                l_ControlPoints_0[v10].LeftTangent = v7(v22.Unit * -v3.DefaultTangentLength, l_PathReducer_0.SelectedObject.Parent);
                l_ControlPoints_0[v10].RightTangent = v7(v22.Unit * v3.DefaultTangentLength, l_PathReducer_0.SelectedObject.Parent);
            elseif not v16 then
                if v10 == 1 then
                    local v23 = v4(l_ControlPoints_0[v10 + 1].Position, v18, l_AbsoluteSize_0, if not l_PathEditorRotation_0 then nil else v20) - v4(l_ControlPoints_0[v10].Position, v18, l_AbsoluteSize_0, if not l_PathEditorRotation_0 then nil else v20);
                    if v23.Y == 0 and v23.X == 0 then
                        v23 = Vector2.one;
                    end;
                    l_ControlPoints_0[v10].LeftTangent = v7(v23.Unit * -v3.DefaultTangentLength, l_PathReducer_0.SelectedObject.Parent);
                    l_ControlPoints_0[v10].RightTangent = v7(v23.Unit * v3.DefaultTangentLength, l_PathReducer_0.SelectedObject.Parent);
                elseif v10 == #l_PathReducer_0.ControlPoints then
                    local v24 = v4(l_ControlPoints_0[v10].Position, v18, l_AbsoluteSize_0, if not l_PathEditorRotation_0 then nil else v20) - v4(l_ControlPoints_0[v10 - 1].Position, v18, l_AbsoluteSize_0, if not l_PathEditorRotation_0 then nil else v20);
                    if v24.Y == 0 and v24.X == 0 then
                        v24 = Vector2.one;
                    end;
                    l_ControlPoints_0[v10].LeftTangent = v7(v24.Unit * -v3.DefaultTangentLength, l_PathReducer_0.SelectedObject.Parent);
                    l_ControlPoints_0[v10].RightTangent = v7(v24.Unit * v3.DefaultTangentLength, l_PathReducer_0.SelectedObject.Parent);
                end;
            else
                local v25 = v4(l_ControlPoints_0[2].Position, v18, l_AbsoluteSize_0, if not l_PathEditorRotation_0 then nil else v20) - v4(l_ControlPoints_0[#l_PathReducer_0.ControlPoints].Position, v18, l_AbsoluteSize_0, if not l_PathEditorRotation_0 then nil else v20);
                if v25.Y == 0 and v25.X == 0 then
                    v25 = Vector2.one;
                end;
                l_ControlPoints_0[v10].LeftTangent = v7(v25.Unit * -v3.DefaultTangentLength, l_PathReducer_0.SelectedObject.Parent);
                l_ControlPoints_0[v10].RightTangent = v7(v25.Unit * v3.DefaultTangentLength, l_PathReducer_0.SelectedObject.Parent);
                l_ControlPoints_0[v17].LeftTangent = l_ControlPoints_0[v10].LeftTangent;
                l_ControlPoints_0[v17].RightTangent = l_ControlPoints_0[v10].RightTangent;
            end;
            if l_ControlPointStates_0[v10].Sharp then
                v11:dispatch(v2(v10));
            end;
            if not (not v16 or not l_ControlPointStates_0[v17].Sharp) then
                v11:dispatch(v2(v17));
            end;
            if not game:getFastFlag("PathEditorUsePerformantAPICalls") then
                l_PathReducer_0.SelectedObject:SetControlPoints(l_ControlPoints_0);
            else
                l_PathReducer_0.SelectedObject:UpdateControlPoint(v10, l_ControlPoints_0[v10]);
            end;
            v11:dispatch(v1());
            return ;
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Src.Thunks.RecordChangeHistory);
local v3 = require(l_Parent_0.Src.Actions.SelectTangentSide);
local v4 = require(l_Parent_0.Src.Actions.ToggleSharp);
local v5 = require(l_Parent_0.Src.Util.getTangentNameForSide);
return function(v6, v7)
    return function(v8)
        local l_PathReducer_0 = v8:getState().PathReducer;
        if not (v6 > 0) or #l_PathReducer_0.ControlPoints < v6 then
            return l_PathReducer_0;
        else
            local l_v6_0 = v6;
            local l_ControlPoints_0 = l_PathReducer_0.SelectedObject:GetControlPoints();
            local l_ControlPointStates_0 = l_PathReducer_0.ControlPointStates;
            local v13 = v5(v7);
            if l_ControlPoints_0[l_v6_0][v13] == UDim2.new() then
                return l_PathReducer_0;
            else
                v8:dispatch(v2("Removed Tangent"));
                l_ControlPoints_0[l_v6_0][v13] = UDim2.new();
                if not l_ControlPointStates_0[l_v6_0].Sharp then
                    v8:dispatch(v4(l_v6_0));
                end;
                if not game:getFastFlag("PathEditorUsePerformantAPICalls") then
                    l_PathReducer_0.SelectedObject:SetControlPoints(l_ControlPoints_0);
                else
                    l_PathReducer_0.SelectedObject:UpdateControlPoint(l_v6_0, l_ControlPoints_0[l_v6_0]);
                end;
                if v7 == l_PathReducer_0.SelectedTangentSide then
                    v8:dispatch(v3(nil));
                end;
                v8:dispatch(v2());
                return ;
            end;
        end;
    end;
end;


local l_Workspace_0 = game:GetService("Workspace");
local v1 = require(script.Parent.Parent.Parent.Src.Resources.Constants);
local v2 = {
    [Enum.NormalId.Top] = {
        axisX = "Z",
        axisY = "X",
        invertX = true,
        invertY = false
    },
    [Enum.NormalId.Bottom] = {
        axisX = "Z",
        axisY = "X",
        invertX = true,
        invertY = true
    },
    [Enum.NormalId.Left] = {
        axisX = "Z",
        axisY = "Y",
        invertX = false,
        invertY = true
    },
    [Enum.NormalId.Right] = {
        axisX = "Z",
        axisY = "Y",
        invertX = true,
        invertY = true
    },
    [Enum.NormalId.Front] = {
        axisX = "X",
        axisY = "Y",
        invertX = true,
        invertY = true
    },
    [Enum.NormalId.Back] = {
        axisX = "X",
        axisY = "Y",
        invertX = false,
        invertY = true
    }
};
return function(v3)
    return function(v4)
        local l_PathReducer_0 = v4:getState().PathReducer;
        if not (l_PathReducer_0.SelectedObject ~= nil) or l_PathReducer_0.SelectedObjectGui == nil then
            return nil;
        elseif l_PathReducer_0.SelectedObjectGui:isA("SurfaceGui") then
            local v6 = if not l_PathReducer_0.SelectedObjectGui.Adornee then l_PathReducer_0.SelectedObjectGui.Parent else l_PathReducer_0.SelectedObjectGui.Adornee;
            local v7 = l_Workspace_0.CurrentCamera:ScreenPointToRay(v3.X, v3.Y);
            local v8 = RaycastParams.new();
            v8.FilterType = Enum.RaycastFilterType.Whitelist;
            v8:AddToFilter(v6);
            local v9 = l_Workspace_0:Raycast(v7.Origin, v7.Direction * v1.SurfaceGuiDragRaycastDepth, v8);
            if v9 then
                local l_Position_0 = v6.CFrame:ToObjectSpace((CFrame.new(v9.Position))).Position;
                local v11 = v2[l_PathReducer_0.SelectedObjectGui.Face];
                local v12 = l_Position_0[v11.axisX] / v6.Size[v11.axisX] + 0.5;
                local v13 = l_Position_0[v11.axisY] / v6.Size[v11.axisY] + 0.5;
                if v11.invertX then
                    v12 = 1 - v12;
                end;
                if v11.invertY then
                    v13 = 1 - v13;
                end;
                return Vector2.new(v12 * l_PathReducer_0.SelectedObjectGui.AbsoluteSize.X, v13 * l_PathReducer_0.SelectedObjectGui.AbsoluteSize.Y);
            else
                return nil;
            end;
        else
            return v3;
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Src.Util.getUDim2ScaleFromOffset);
local v2 = require(l_Parent_0.Src.Util.getVector2FromUDim2Scale);
local v3 = require(l_Parent_0.Src.Util.getUDim2FromVector2);
local v4 = require(l_Parent_0.Src.Util.rotatePoint);
local l_PathEditorRotation_0 = game:GetFastFlag("PathEditorRotation");
return function(v6, v7)
    return function(v8)
        local l_PathReducer_0 = v8:getState().PathReducer;
        if not (v6 > 0) or #l_PathReducer_0.ControlPoints < v6 then
            return l_PathReducer_0;
        else
            local l_v7_0 = v7;
            if l_PathEditorRotation_0 and l_PathReducer_0.ParentAbsRotation ~= 0 then
                l_v7_0 = v3(v4(v2(l_v7_0, l_PathReducer_0.SelectedObject.Parent), l_PathReducer_0.ParentAbsSize * 0.5, -1 * l_PathReducer_0.ParentAbsRotation));
            end;
            local l_ControlPoints_0 = l_PathReducer_0.ControlPoints;
            if l_PathReducer_0.ScalePositionMode then
                l_v7_0 = v1(l_v7_0, l_PathReducer_0.SelectedObject.Parent);
            end;
            l_ControlPoints_0[v6].Position = l_v7_0;
            if not game:getFastFlag("PathEditorUsePerformantAPICalls") then
                l_PathReducer_0.SelectedObject:SetControlPoints(l_ControlPoints_0);
                return ;
            else
                l_PathReducer_0.SelectedObject:UpdateControlPoint(v6, l_ControlPoints_0[v6]);
                return ;
            end;
        end;
    end;
end;


local l_Thunks_0 = script.Parent.Parent.Parent.Src.Thunks;
local v1 = require(l_Thunks_0.SetControlPointTangent);
local v2 = require(l_Thunks_0.RecordChangeHistory);
return function(v3)
    return function(v4)
        local l_PathReducer_0 = v4:getState().PathReducer;
        if l_PathReducer_0.Path2DToolMode == "Move" then
            return ;
        else
            if l_PathReducer_0.Path2DToolMode == "AddTangent" then
                v4:dispatch(v2("Removed Tangents"));
                v4:dispatch(v1(v3, "Left", Vector2.zero, false, false));
                v4:dispatch(v1(v3, "Right", Vector2.zero, false, false));
                v4:dispatch(v2());
            end;
            return ;
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_Thunks_0 = l_Parent_0.Src.Thunks;
local v2 = require(l_Thunks_0.ModifyControlPoint);
local v3 = require(l_Thunks_0.SetControlPointTangent);
local l_Util_0 = l_Parent_0.Src.Util;
local v5 = require(l_Util_0.getUDim2ScaleFromVector2);
local v6 = require(l_Util_0.getAbsolutePosition);
local v7 = require(l_Util_0.getVector2FromUDim2Scale);
local v8 = require(l_Parent_0.Src.Resources.Constants);
return function(v9, v10, v11)
    return function(v12)
        local l_PathReducer_0 = v12:getState().PathReducer;
        local v14 = v11 - v10;
        if l_PathReducer_0.Path2DToolMode == "Move" then
            local v15 = v11 - v6(l_PathReducer_0.SelectedObject);
            local v16 = v5(v15, l_PathReducer_0.SelectedObject.Parent);
            if not (v9 ~= 1) or v9 == #l_PathReducer_0.ControlPoints then
                local l_Position_0 = l_PathReducer_0.ControlPoints[if v9 == 1 then #l_PathReducer_0.ControlPoints else 1].Position;
                if math.abs((v15 - v7(l_Position_0, l_PathReducer_0.SelectedObject.Parent)).Magnitude) < v8.SnapToPointEpsilon then
                    v16 = l_Position_0;
                end;
            end;
            v12:dispatch(v2(v9, v16));
            return ;
        else
            if l_PathReducer_0.Path2DToolMode == "AddTangent" then
                local _ = l_PathReducer_0.ControlPoints;
                v12:dispatch(v3(v9, if l_PathReducer_0.SelectedTangentSide ~= nil then l_PathReducer_0.SelectedTangentSide else "Left", v14, false, false));
            end;
            return ;
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_ContextServices_0 = require(l_Parent_0.Packages.Framework).ContextServices;
local _ = l_ContextServices_0.Localization;
local _ = l_ContextServices_0.Plugin;
local l_Actions_0 = l_Parent_0.Src.Actions;
local _ = require(l_Actions_0.ToggleAddPointTool);
local _ = require(l_Actions_0.ToggleAddTangentTool);
local _ = require(l_Actions_0.ToggleDone);
local v8 = require(l_Actions_0.ToggleMirrored);
local _ = require(l_Actions_0.ToggleMoveTool);
local _ = require(l_Actions_0.ToolbarHovered);
local l_Thunks_0 = l_Parent_0.Src.Thunks;
local v12 = require(l_Thunks_0.AddControlPointTangent);
local v13 = require(l_Thunks_0.ClearControlPointTangent);
local v14 = require(l_Thunks_0.RemoveControlPoint);
local v15 = require(l_Parent_0.Src.Util.createContextMenu);
local _ = require(l_Parent_0.Src.Util.getShortcuts)();
return function(v17, v18)
    return function(v19)
        local l_PathReducer_0 = v19:getState().PathReducer;
        if l_PathReducer_0.SelectedObject == nil then
            return l_PathReducer_0;
        else
            local l_SelectedControlPointIndex_0 = l_PathReducer_0.SelectedControlPointIndex;
            if l_SelectedControlPointIndex_0 == 0 then
                return l_PathReducer_0;
            else
                local v22 = {};
                local v23 = l_PathReducer_0.ControlPointStates[l_SelectedControlPointIndex_0];
                if l_PathReducer_0.SelectedTangentSide == nil then
                    if not v23.Mirrored then
                        table.insert(v22, {
                            Icon = "",
                            OnClick = function()
                                v19:dispatch(v8(l_SelectedControlPointIndex_0));
                            end,
                            Text = v18:getText("ContextMenu", "MirrorTangents")
                        });
                    else
                        table.insert(v22, {
                            Icon = "",
                            OnClick = function()
                                v19:dispatch(v8(l_SelectedControlPointIndex_0));
                            end,
                            Text = v18:getText("ContextMenu", "BreakTangents")
                        });
                    end;
                    if not v23.Sharp then
                        table.insert(v22, {
                            Icon = "",
                            OnClick = function()
                                v19:dispatch(v13(l_SelectedControlPointIndex_0, "Left"));
                                v19:dispatch(v13(l_SelectedControlPointIndex_0, "Right"));
                            end,
                            Text = v18:getText("ContextMenu", "ClearTangents")
                        });
                    else
                        table.insert(v22, {
                            Icon = "",
                            OnClick = function()
                                v19:dispatch(v12(l_SelectedControlPointIndex_0));
                            end,
                            Text = v18:getText("ContextMenu", "AddTangents")
                        });
                    end;
                    table.insert(v22, {
                        Icon = "",
                        OnClick = function()
                            v19:dispatch(v14(l_SelectedControlPointIndex_0));
                        end,
                        Text = v18:getText("ContextMenu", "DeletePoint")
                    });
                else
                    table.insert(v22, {
                        Icon = "",
                        OnClick = function()
                            if v23.Mirrored then
                                v19:dispatch(v8(l_SelectedControlPointIndex_0));
                            end;
                            v19:dispatch(v13(l_SelectedControlPointIndex_0, l_PathReducer_0.SelectedTangentSide));
                        end,
                        Text = v18:getText("ContextMenu", "DeleteTangent")
                    });
                end;
                v15(v17:get(), v22, "BaseMenu");
                return l_PathReducer_0;
            end;
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local l_ChangeHistoryService_0 = game:GetService("ChangeHistoryService");
local v2 = require(l_Parent_0.Src.Actions.SetRecording);
return function(v3)
    return function(v4)
        local l_ChangeHistoryServiceRecording_0 = v4:getState().PathReducer.ChangeHistoryServiceRecording;
        if v3 == nil then
            if l_ChangeHistoryService_0:IsRecordingInProgress() then
                if l_ChangeHistoryServiceRecording_0 ~= nil then
                    l_ChangeHistoryService_0:FinishRecording(l_ChangeHistoryServiceRecording_0, Enum.FinishRecordingOperation.Commit);
                else
                    l_ChangeHistoryService_0:FinishRecording("", Enum.FinishRecordingOperation.Cancel);
                end;
            end;
            v4:dispatch(v2(nil));
            return ;
        else
            if v3 ~= nil and l_ChangeHistoryServiceRecording_0 == nil then
                l_ChangeHistoryServiceRecording_0 = l_ChangeHistoryService_0:TryBeginRecording(v3);
                if l_ChangeHistoryServiceRecording_0 then
                    v4:dispatch(v2(l_ChangeHistoryServiceRecording_0));
                end;
            end;
            return ;
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Src.Thunks.RecordChangeHistory);
local v2 = require(l_Parent_0.Src.Actions.SelectControlPoint);
local v3 = require(l_Parent_0.Src.Actions.RemoveControlPointState);
return function(v4)
    return function(v5)
        local l_PathReducer_0 = v5:getState().PathReducer;
        if v4 == nil then
            v4 = l_PathReducer_0.SelectedControlPointIndex;
        end;
        local l_ControlPoints_0 = l_PathReducer_0.SelectedObject:GetControlPoints();
        if not (v4 > 0) or #l_ControlPoints_0 < v4 then
            return l_PathReducer_0;
        else
            v5:dispatch(v1("Remove Control Point"));
            local l_v4_0 = v4;
            v5:dispatch(v3(l_v4_0));
            if not game:getFastFlag("PathEditorUsePerformantAPICalls") then
                table.remove(l_ControlPoints_0, l_v4_0);
                l_PathReducer_0.SelectedObject:SetControlPoints(l_ControlPoints_0);
            else
                l_PathReducer_0.SelectedObject:RemoveControlPoint(l_v4_0);
            end;
            v5:dispatch(v2(if #l_PathReducer_0.SelectedObject:GetControlPoints() < l_v4_0 then l_v4_0 - 1 else l_v4_0));
            v5:dispatch(v1());
            return ;
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Src.Thunks.AddControlPointTangent);
local v3 = require(l_Parent_0.Src.Actions.SelectControlPoint);
return function(v4)
    return function(v5)
        local l_PathReducer_0 = v5:getState().PathReducer;
        if l_PathReducer_0.Path2DToolMode == "AddTangent" then
            v5:dispatch(v2(v4));
        end;
        l_PathReducer_0.SelectedObject.SelectedControlPoint = v4;
        v5:dispatch(v3(v4));
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Src.Resources.Constants);
local v2 = require(l_Parent_0.Src.Actions.ChangeControlPointState);
local l_Util_0 = l_Parent_0.Src.Util;
local v4 = require(l_Util_0.constrainToEightDirections);
local v5 = require(l_Util_0.getControlPointState);
local v6 = require(l_Util_0.getTangentNameForSide);
local v7 = require(l_Util_0.getUDim2ScaleFromVector2);
local v8 = require(l_Util_0.getUDim2Inverse);
local v9 = require(l_Util_0.rotatePoint);
local _ = require(l_Parent_0.Src.Types);
local l_PathEditorRotation_0 = game:GetFastFlag("PathEditorRotation");
return function(v12, v13, v14, v15, v16, v17)
    return function(v18)
        local l_PathReducer_0 = v18:getState().PathReducer;
        local v20 = false;
        if v12 > 0 then
            v20 = v12 <= #l_PathReducer_0.ControlPoints;
        end;
        assert(v20, "Cannot set tangent for invalid control point index.");
        local l_v12_0 = v12;
        v20 = l_PathReducer_0.SelectedObject:GetControlPoints();
        local l_ControlPointStates_0 = l_PathReducer_0.ControlPointStates;
        if l_PathEditorRotation_0 then
            v14 = v9(v14, Vector2.new(), -1 * l_PathReducer_0.ParentAbsRotation);
        end;
        if not (l_ControlPointStates_0 ~= nil) or #l_ControlPointStates_0 < l_v12_0 then
            return ;
        else
            local v23 = false;
            if #l_PathReducer_0.ControlPoints > 1 then
                if l_v12_0 ~= 1 then
                    v23 = false;
                    if not (l_v12_0 == #l_PathReducer_0.ControlPoints) then
                        goto label0;
                    end;
                end;
                v23 = v20[1].Position == v20[#l_PathReducer_0.ControlPoints].Position;
            end;
            ::label0::;
            local v24 = if not not v23 and l_v12_0 == 1 then #l_PathReducer_0.ControlPoints else 1;
            if v14.Magnitude < v1.DragTangentToCenterToDeleteZoneSizePixels then
                v14 = Vector2.zero;
            end;
            v16 = not l_ControlPointStates_0[l_v12_0].Mirrored;
            if v17 then
                v16 = false;
            end;
            if v15 then
                v14 = v4(v14);
                v14 = v14;
            end;
            local v25 = v13 == "Left" and "Right" or "Left";
            local v26 = v7(v14, l_PathReducer_0.SelectedObject.Parent);
            v20[l_v12_0][v6(v13)] = v26;
            if not v16 then
                v20[l_v12_0][v6(v25)] = v8(v26);
            end;
            if v23 then
                v20[v24][v6(v13)] = v26;
                if not v16 then
                    v20[v24][v6(v25)] = v8(v26);
                end;
                v18:dispatch(v2(v24, v5(v20[v24])));
            end;
            v18:dispatch(v2(l_v12_0, v5(v20[l_v12_0])));
            if not game:getFastFlag("PathEditorUsePerformantAPICalls") then
                l_PathReducer_0.SelectedObject:SetControlPoints(v20);
                return ;
            else
                l_PathReducer_0.SelectedObject:UpdateControlPoint(l_v12_0, v20[l_v12_0]);
                return ;
            end;
        end;
    end;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Src.Thunks.RecordChangeHistory);
local l_Util_0 = l_Parent_0.Src.Util;
local v3 = require(l_Util_0.getRelativePosFromAbsPos);
local v4 = require(l_Util_0.getUDim2ScaleFromVector2);
if not game:GetFastFlag("PathEditorRotation") then
    return function(v5, v6)
        return function(v7)
            local l_PathReducer_0 = v7:getState().PathReducer;
            if l_PathReducer_0.SelectedObject == nil then
                return ;
            else
                if not v6 then
                    v7:dispatch(v1("Setting Path Position"));
                end;
                local l_ControlPoints_0 = l_PathReducer_0.SelectedObject:GetControlPoints();
                local l_Min_0 = l_PathReducer_0.SelectedObject:GetBoundingRect().Min;
                for _, v12 in l_ControlPoints_0, nil, nil do
                    v12.Position = (v12.Position + v5) - v4(l_Min_0, l_PathReducer_0.SelectedObject.Parent);
                end;
                l_PathReducer_0.SelectedObject:SetControlPoints(l_ControlPoints_0);
                if v6 then
                    v7:dispatch(v1());
                end;
                return ;
            end;
        end;
    end;
else
    return function(v13, v14, v15)
        return function(v16)
            local l_PathReducer_1 = v16:getState().PathReducer;
            if l_PathReducer_1.SelectedObject == nil then
                return ;
            else
                if not v15 then
                    v16:dispatch(v1("Setting Path Position"));
                end;
                local l_ControlPoints_1 = l_PathReducer_1.SelectedObject:GetControlPoints();
                local v19 = v14 - l_PathReducer_1.SelectedObject:GetBoundingRect().Min;
                for _, v21 in l_ControlPoints_1, nil, nil do
                    v21.Position = v21.Position + v3(v13 + v19, l_PathReducer_1.SelectedObject.Parent);
                end;
                l_PathReducer_1.SelectedObject:SetControlPoints(l_ControlPoints_1);
                if v15 then
                    v16:dispatch(v1());
                end;
                return ;
            end;
        end;
    end;
end;


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


local v0 = require(script:FindFirstAncestor("PathEditor").Src.Util.getShortcuts)();
local l_PathEditorCustomBindings_0 = game:GetFastFlag("PathEditorCustomBindings");
local v2 = nil;
v2 = if not l_PathEditorCustomBindings_0 then {
    "DoneEditing",
    "AddPointMode",
    "AddTangentMode",
    "MoveTool",
    "DeletePoint",
    "DeletePoint2"
} else {
    "DoneEditing",
    "AddPointMode",
    "AddTangentMode",
    "MoveTool"
};
local function v6(_, v4, v5)
    if not l_PathEditorCustomBindings_0 then
        return {
            id = v5,
            text = v4:getText("ContextMenu", v5),
            allowBinding = false
        };
    else
        return {
            id = v5,
            text = v4:getText("ShortcutNames", v5),
            statusTip = v4:getText("ShortcutDescriptions", v5),
            allowBinding = true
        };
    end;
end;
return function(v7, v8)
    local v9 = {};
    for _, v11 in ipairs(v2) do
        v9[v11] = v6(v7, v8, v11);
    end;
    v9.MoveTool.defaultShortcut = v0.Move;
    v9.AddPointMode.defaultShortcut = v0.AddPoint;
    v9.AddTangentMode.defaultShortcut = v0.AddTangent;
    v9.DoneEditing.defaultShortcut = v0.Done;
    if not l_PathEditorCustomBindings_0 then
        v9.DeletePoint.defaultShortcut = v0.Delete;
        v9.DeletePoint2.defaultShortcut = v0.Delete2;
    end;
    return v9;
end;


local v0 = require(script.Parent.TelemetryProtocol);
return {
    eventName = "Path2DToolUsage",
    backends = {
        v0.TelemetryBackends.EventIngest
    },
    throttlingPercentage = v0.ONE_HUNDRED_PERCENT,
    lastUpdated = {
        24,
        3,
        15
    },
    description = "Reports aggregate counts of our main interactions with the PathEditor tool",
    links = "https://roblox.atlassian.net/wiki/x/jwG0gw"
};


local l_MessageBusService_0 = game:GetService("MessageBusService");
local _ = require(script.Parent.TelemetryProtocolTypes);
local v2 = {
    TelemetryBackends = {
        UNSPECIFIED = "UNSPECIFIED",
        EventIngest = "EventIngest",
        Points = "Points",
        EphemeralCounter = "EphemeralCounter",
        EphemeralStat = "EphemeralStat"
    },
    StandardizedFields = {
        addPlaceId = "addPlaceId",
        addUniverseId = "addUniverseId",
        addPlaceInstanceId = "addPlaceInstanceId",
        addSessionId = "addSessionId"
    },
    LOG_EVENT_WITH_TIMESTAMP = l_MessageBusService_0:GetMessageId("Logging", "logEventWithTimestamp"),
    GET_TIMESTAMP = l_MessageBusService_0:GetMessageId("Logging", "getTimestamp"),
    LOG_EVENT_FROM_LUA = l_MessageBusService_0:GetMessageId("Logging", "logEventFromLua"),
    ONE_HUNDRED_PERCENT = 10000
};
v2.__index = v2;
v2.new = function(v3)
    local v4 = {
        messageBus = v3 or l_MessageBusService_0
    };
    setmetatable(v4, v2);
    return v4;
end;
v2.logEventWithTimestamp = function(v5, v6, v7, v8)
    v5.messageBus:Call(v5.LOG_EVENT_WITH_TIMESTAMP, {
        eventName = v6,
        timestamp = v7,
        metadata = v8
    });
end;
v2.logEvent = function(v9, v10, v11)
    v9:logEventWithTimestamp(v10, 0, v11);
end;
v2.getTimestamp = function(v12)
    return v12.messageBus:Call(v12.GET_TIMESTAMP, {});
end;
v2.logRobloxTelemetryEvent = function(v13, v14, v15, v16, v17)
    v13.messageBus:Call(v13.LOG_EVENT_FROM_LUA, {
        eventType = "RobloxTelemetry",
        config = v14,
        data = {
            standardizedFields = v15,
            customFields = v16,
            eventContext = v17
        }
    });
end;
v2.logEphemeralCounterEvent = function(v18, v19, v20)
    v18.messageBus:Call(v18.LOG_EVENT_FROM_LUA, {
        eventType = "EphemeralCounter",
        config = v19,
        data = if not v20 then nil else {
            incrementValue = v20
        }
    });
end;
v2.logEphemeralStatEvent = function(v21, v22, v23)
    v21.messageBus:Call(v21.LOG_EVENT_FROM_LUA, {
        eventType = "EphemeralStat",
        config = v22,
        data = {
            statValue = v23
        }
    });
end;
v2.default = v2.new();
return v2;


return {
    selectModeCount = 0,
    addPointModeCount = 0,
    addTangentModeCount = 0,
    totalCount = function(v0)
        return (v0.selectModeCount + v0.addPointModeCount) + v0.addTangentModeCount;
    end,
    reset = function(v1)
        v1.selectModeCount = 0;
        v1.addPointModeCount = 0;
        v1.addTangentModeCount = 0;
    end
};


return function(v0)
    local v1 = {
        Vector2.new(1, 0),
        Vector2.new(-1, 0),
        Vector2.new(0, 1),
        Vector2.new(0, -1),
        Vector2.new(1, 1).Unit,
        Vector2.new(-1, 1).Unit,
        Vector2.new(1, -1).Unit,
        Vector2.new(-1, -1).Unit
    };
    local l_Unit_0 = v0.Unit;
    local v3 = -math.huge;
    local v4 = nil;
    for _, v6 in ipairs(v1) do
        local v7 = v6:Dot(l_Unit_0);
        if v3 < v7 then
            v3 = v7;
            v4 = v6;
        end;
    end;
    return v4 * v0.Magnitude;
end;


return function(v0, v1, v2)
    local l_v0_PluginMenu_0 = v0:CreatePluginMenu(v2);
    for _, v5 in v1, nil, nil do
        l_v0_PluginMenu_0:AddNewAction(v5.Text, v5.Text).Triggered:connect(v5.OnClick);
    end;
    l_v0_PluginMenu_0:ShowAsync();
    l_v0_PluginMenu_0:Destroy();
end;


return function(v0)
    local l_v0_0 = v0;
    while true do
        if l_v0_0 ~= nil then
            if not l_v0_0:IsA("ScreenGui") and not l_v0_0:IsA("SurfaceGui") then
                l_v0_0 = l_v0_0.Parent;
            else
                return l_v0_0;
            end;
        else
            return nil;
        end;
    end;
end;


local v0 = require(script.Parent.getVector2FromUDim2Scale);
local v1 = require(script.Parent.rotatePoint);
getAbsPosFromRelative = function(v2, v3)
    if typeof(v2) == "UDim2" then
        v2 = v0(v2, v3);
    end;
    if v3:IsA("GuiBase2d") then
        return v1(v2, 0.5 * v3.AbsoluteSize, v3.AbsoluteRotation) + v3.AbsolutePosition;
    else
        return v2;
    end;
end;
return getAbsPosFromRelative;


local v0 = require(script.Parent.rotatePoint);
local l_PathEditorRotation_0 = game:GetFastFlag("PathEditorRotation");
getAbsPosFromUDim2 = function(v2, v3, v4, v5)
    if not l_PathEditorRotation_0 then
        return Vector2.new(v2.X.Offset + v2.X.Scale * v4.X, v2.Y.Offset + v2.Y.Scale * v4.Y) + v3;
    else
        return v0(Vector2.new(v2.X.Offset + v2.X.Scale * v4.X, v2.Y.Offset + v2.Y.Scale * v4.Y), v4 * 0.5, v5 or 0) + v3;
    end;
end;
return getAbsPosFromUDim2;


local _ = function(v0, v1)
    local l_status_0, _ = pcall(function()
        local _ = v0[v1];
    end);
    return l_status_0;
end;
local function v6(v7)
    local l_pcall_0 = pcall;
    local v9 = "AbsolutePosition";
    local l_v9_0 = v9 --[[ copy: 4 -> 6 ]];
    local v11;
    l_pcall_0, v11 = l_pcall_0(function()
        local _ = v7[l_v9_0];
    end);
    if not l_pcall_0 then
        l_pcall_0 = pcall;
        v9 = "Position";
        local l_v9_1 = v9 --[[ copy: 4 -> 7 ]];
        l_pcall_0, v11 = l_pcall_0(function()
            local _ = v7[l_v9_1];
        end);
        if l_pcall_0 then
            l_pcall_0 = v7.Parent;
            v11 = pcall;
            local v15 = "AbsoluteSize";
            v11, v9 = v11(function()
                local _ = l_pcall_0[v15];
            end);
            if v11 then
                return Vector2.new(v7.Position.X.Offset + v7.Position.X.Scale * v7.Parent.AbsoluteSize.x, v7.Position.Y.Offset + v7.Position.Y.Scale * v7.Parent.AbsoluteSize.y) + v6(v7.Parent);
            end;
        end;
        return v6(v7.Parent);
    else
        return v7.AbsolutePosition;
    end;
end;
return v6;


local v0 = require(script.Parent.Parent.Parent.Src.Util.getVector2FromUDim2Scale);
local l_PathEditorRotation_0 = game:GetFastFlag("PathEditorRotation");
local function v6(v2, v3)
    v3 = math.clamp(v3, 0, 1);
    local v4 = #v2:GetControlPoints() - 1;
    local v5 = math.clamp(v3 * v4, 0, v4 - 1);
    return {
        v5,
        v3 * v4 - v5
    };
end;
local _ = nil;
if not l_PathEditorRotation_0 then
    return function(v8, v9)
        local v10 = 5000;
        local v11 = 0;
        local v12 = 0;
        for v13 = 0, 500 do
            local l_Magnitude_0 = (v0(v8:getPositionOnCurve(v13 / 500), v8.Parent) - v9).Magnitude;
            if l_Magnitude_0 < v10 then
                v10 = l_Magnitude_0;
                v11 = v6(v8, v13 / 500)[1];
                v12 = v13 / 500;
            end;
        end;
        return {
            v11,
            v10,
            v12
        };
    end;
else
    return function(v15, v16)
        local v17 = 5000;
        local v18 = 0;
        local v19 = 0;
        local v20 = nil;
        v20 = if typeof(v16) == "UDim2" then v0(v16, v15.Parent) else v16;
        for v21 = 0, 500 do
            local l_Magnitude_1 = (v0(v15:getPositionOnCurve(v21 / 500), v15.Parent) - v20).Magnitude;
            if l_Magnitude_1 < v17 then
                v17 = l_Magnitude_1;
                v18 = v6(v15, v21 / 500)[1];
                v19 = v21 / 500;
            end;
        end;
        return {
            v18,
            v17,
            v19
        };
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("PathEditor");
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v2 = require(l_script_FirstAncestor_0.Src.Util.getUDim2Inverse);
return function(v3)
    local v4 = {
        Mirrored = v3.LeftTangent == v2(v3.RightTangent)
    };
    local v5 = true;
    if v3.LeftTangent ~= UDim2.new() then
        v5 = v3.RightTangent == UDim2.new();
    end;
    v4.Sharp = v5;
    return v4;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(l_Parent_0.Src.Types);
local v2 = require(l_Parent_0.Src.Util.getControlPointState);
return function(v3)
    local v4 = {};
    for _, v6 in v3, nil, nil do
        table.insert(v4, v2(v6));
    end;
    return v4;
end;


local _ = function(v0, v1)
    local l_status_0, _ = pcall(function()
        local _ = v0[v1];
    end);
    return l_status_0;
end;
return function(v6, v7)
    local l_v6_PositionOnCurve_0 = v6:GetPositionOnCurve(v7);
    if l_v6_PositionOnCurve_0.X.Scale == 0 and l_v6_PositionOnCurve_0.Y.Scale == 0 then
        return l_v6_PositionOnCurve_0;
    else
        if v6.Parent ~= nil then
            local l_Parent_0 = v6.Parent;
            local l_pcall_0 = pcall;
            local v11 = "AbsoluteSize";
            local v12;
            l_pcall_0, v12 = l_pcall_0(function()
                local _ = l_Parent_0[v11];
            end);
            if l_pcall_0 then
                return UDim2.fromOffset(l_v6_PositionOnCurve_0.X.Scale * v6.Parent.AbsoluteSize.x, l_v6_PositionOnCurve_0.Y.Scale * v6.Parent.AbsoluteSize.y);
            end;
        end;
        return UDim2.new();
    end;
end;


local l_SnapToPointEpsilon_0 = require(script.Parent.Parent.Parent.Src.Resources.Constants).SnapToPointEpsilon;
local v1 = require(script.Parent.getVector2FromUDim2Scale);
local v2 = require(script.Parent.getVector2FromUDim2Offset);
local v3 = require(script.Parent.getAbsPosFromUDim2);
local l_PathEditorRotation_0 = game:GetFastFlag("PathEditorRotation");
local _ = nil;
if not l_PathEditorRotation_0 then
    return function(v6, v7, v8, v9, v10)
        if v7 == nil then
            return false;
        else
            local v11 = v10 or l_SnapToPointEpsilon_0;
            local v12 = math.abs(((v3(v7.Position, v8, v9) - v8) - v2(v6)).Magnitude);
            return v12 < v11, v12;
        end;
    end;
else
    return function(v13, v14, v15, v16)
        if v14 == nil then
            return false;
        else
            local v17 = v16 or l_SnapToPointEpsilon_0;
            local v18 = math.abs(v1(v14.Position - v13, v15).Magnitude);
            return v18 < v17, v18;
        end;
    end;
end;


local v0 = require(script.Parent.getUDim2ScaleFromVector2);
local v1 = require(script.Parent.getVector2FromUDim2Scale);
local v2 = require(script.Parent.rotatePoint);
getRelativePosFromAbsPos = function(v3, v4)
    if v4:IsA("GuiBase2d") then
        if typeof(v3) == "UDim2" then
            v3 = v1(v3, v4);
        end;
        return v0(v2(v3 - v4.AbsolutePosition, 0.5 * v4.AbsoluteSize, -1 * v4.AbsoluteRotation), v4);
    else
        if typeof(v3) == "Vector2" then
            v3 = v0(v3, v4);
        end;
        return v3;
    end;
end;
return getRelativePosFromAbsPos;


local v0 = game:DefineFastFlag("PathEditorSelectModeShortcutChangeToV", false);
return function()
    return {
        Move = not v0 and "s" or "v",
        AddPoint = "p",
        AddTangent = "t",
        Done = "return",
        DeletePoint = "delete",
        DeletePoint2 = "backspace"
    };
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local _ = require(script.Parent.getUDim2FromVector2);
local v2 = require(script.Parent.getPositionMatchesControlPoint);
local _ = require(script.Parent.rotateUDim2Point);
local l_SnapToPointEpsilon_0 = require(l_Parent_0.Src.Resources.Constants).SnapToPointEpsilon;
local l_PathEditorRotation_0 = game:GetFastFlag("PathEditorRotation");
local _ = nil;
if not l_PathEditorRotation_0 then
    return function(v7, v8, v9, v10)
        local l_v7_0 = v7;
        local l_l_SnapToPointEpsilon_0_0 = l_SnapToPointEpsilon_0;
        for _, v14 in v8, nil, nil do
            local v15, v16 = v2(v7, v14, v9, v10, l_l_SnapToPointEpsilon_0_0);
            if v15 then
                l_v7_0 = v14.Position;
                l_l_SnapToPointEpsilon_0_0 = v16;
            end;
        end;
        return l_v7_0;
    end;
else
    return function(v17, v18, v19)
        local l_v17_0 = v17;
        local l_l_SnapToPointEpsilon_0_1 = l_SnapToPointEpsilon_0;
        for _, v23 in v18, nil, nil do
            local v24, v25 = v2(v17, v23, v19, l_l_SnapToPointEpsilon_0_1);
            if v24 then
                l_v17_0 = v23.Position;
                l_l_SnapToPointEpsilon_0_1 = v25;
            end;
        end;
        return l_v17_0;
    end;
end;


local _ = require(script.Parent.Parent.Parent.Src.Types);
return function(v1)
    if v1 == "Left" then
        return "LeftTangent";
    else
        return "RightTangent";
    end;
end;


return function(v0)
    return UDim2.new(v0.X.Scale * -1, v0.X.Offset * -1, v0.Y.Scale * -1, v0.Y.Offset * -1);
end;


return function(v0, v1)
    if not (v1 ~= nil) or not v1:IsA("GuiBase2d") then
        return UDim2.new();
    else
        return UDim2.fromOffset(v0.X.Offset + v0.X.Scale * v1.AbsoluteSize.X, v0.Y.Offset + v0.Y.Scale * v1.AbsoluteSize.Y);
    end;
end;


local _ = script.Parent.Parent.Parent;
return function(v1, v2)
    if not (v2 ~= nil) or not v2:IsA("GuiBase2d") then
        return UDim2.new();
    else
        local l_AbsoluteSize_0 = v2.AbsoluteSize;
        return UDim2.fromScale(if l_AbsoluteSize_0.X ~= 0 then v1.X.Scale + v1.X.Offset / l_AbsoluteSize_0.X else 0, if l_AbsoluteSize_0.Y ~= 0 then v1.Y.Scale + v1.Y.Offset / l_AbsoluteSize_0.Y else 0);
    end;
end;


local _ = script.Parent.Parent.Parent;
return function(v1, v2)
    if not (v2 ~= nil) or not v2:IsA("GuiBase2d") then
        return UDim2.new();
    else
        local l_AbsoluteSize_0 = v2.AbsoluteSize;
        return UDim2.fromScale(if l_AbsoluteSize_0.X ~= 0 then v1.X / l_AbsoluteSize_0.X else 0, if l_AbsoluteSize_0.Y ~= 0 then v1.Y / l_AbsoluteSize_0.Y else 0);
    end;
end;


return function(v0, v1)
    if not (v1 ~= nil) or not v1:IsA("GuiBase2d") then
        return Vector2.zero;
    else
        return Vector2.new(v0.X.Offset + v0.X.Scale * v1.AbsoluteSize.X, v0.Y.Offset + v0.Y.Scale * v1.AbsoluteSize.Y);
    end;
end;


return function(v0, v1)
    local l_status_0, _ = pcall(function()
        local _ = v0[v1];
    end);
    return l_status_0;
end;