local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local l_Actions_0 = l_script_FirstAncestor_0.Src.Actions;
local v2 = require(l_Actions_0.SetFrameBuffer);
local v3 = require(l_Actions_0.SetSendPayloadAnalytics);
local l_Util_0 = l_script_FirstAncestor_0.Src.Util;
local _ = require(l_Util_0.CircularBuffer);
local v6 = require(l_Util_0.traverse);
local _ = require(l_script_FirstAncestor_0.Src.Types);
return function(v8, v9)
    return function(v10)
        local v11 = v10:getState();
        if v11.Status.HistoryOffset ~= nil then
            return ;
        else
            local l_SendPayloadAnalytics_0 = v11.Status.SendPayloadAnalytics;
            local v13 = {};
            local v14 = 0;
            local v15 = {};
            if v8 then
                v6(v8, function(v16, v17)
                    if v16.children then
                        for _, v19 in v16.children, nil, nil do
                            v19.weight = (v19.weight or 1) * (v16.weight or 1);
                        end;
                    end;
                    if v16.id then
                        v13[v16.id] = v16;
                    end;
                    if l_SendPayloadAnalytics_0 then
                        v14 = math.max(v17, v14);
                        if v16.className then
                            local v20 = v15[v16.className] or {
                                count = 0,
                                children = 0
                            };
                            v20.count = v20.count + 1;
                            v20.children = v20.children + (not v16.children and 0 or #v16.children);
                            v15[v16.className] = v20;
                        end;
                    end;
                end);
                local v21 = v10:getState().DebugData.FrameBuffer:clone();
                v21:push({
                    payload = v8,
                    layerMap = v13,
                    timestamp = v8.timestamp
                });
                if l_SendPayloadAnalytics_0 then
                    local v22 = {};
                    for v23, v24 in v15, nil, nil do
                        v24.name = v23;
                        table.insert(v22, v24);
                    end;
                    v9:report("onCompositorConnected", v14, v22);
                    v10:dispatch(v3(false));
                end;
                v10:dispatch(v2(v21));
            end;
            return ;
        end;
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local v1 = require(l_script_FirstAncestor_0.Packages.Dash);
local _ = v1.forEach;
local _ = v1.join;
local _ = v1.joinDeep;
local _ = v1.keys;
local _ = v1.None;
local v7 = require(l_script_FirstAncestor_0.Src.Actions.SetFrameBuffer);
local l_Util_0 = l_script_FirstAncestor_0.Src.Util;
local v9 = require(l_Util_0.CircularBuffer);
local v10 = require(l_Util_0.Constants);
return function(v11)
    return function(v12)
        local l_FrameBuffer_0 = v12:getState().DebugData.FrameBuffer;
        local v14 = v11 * v10.FRAMERATE;
        local v15 = nil;
        if not l_FrameBuffer_0 then
            v15 = v9.new(v14);
        elseif l_FrameBuffer_0:getSize() == v14 then
            return ;
        else
            v15 = l_FrameBuffer_0:resize(v14);
        end;
        v12:dispatch(v7(v15));
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local v1 = require(l_script_FirstAncestor_0.Packages.Dash);
local _ = v1.forEach;
local l_join_0 = v1.join;
local l_joinDeep_0 = v1.joinDeep;
local _ = v1.keys;
local l_None_0 = v1.None;
local v7 = require(l_script_FirstAncestor_0.Src.Actions.SetOverrides);
return function(v8, v9, v10)
    return function(v11)
        local l_DebugData_0 = v11:getState().DebugData;
        local v13 = l_DebugData_0.FrameBuffer and l_DebugData_0.FrameBuffer[1];
        local v14 = v13 and v13.layerMap[v8];
        local l_Overrides_0 = l_DebugData_0.Overrides;
        local v16 = v9[1];
        if v10 == nil then
            l_Overrides_0 = l_join_0(l_Overrides_0, {
                [v8] = l_join_0(l_Overrides_0[v8], {
                    [v16] = l_None_0
                })
            });
            if not next(l_Overrides_0[v8]) then
                l_Overrides_0[v8] = nil;
            end;
        else
            l_Overrides_0 = l_join_0(l_Overrides_0, {});
            l_Overrides_0[v8] = l_Overrides_0[v8] or {};
            if not (l_Overrides_0[v8][v16] or not v14) and type(v14.props[v16]) == "table" then
                l_Overrides_0[v8][v16] = l_joinDeep_0({}, v14.props[v16]);
            end;
            local v17 = l_Overrides_0[v8];
            for v18, v19 in v9, nil, nil do
                if v18 < #v9 then
                    if not v17[v19] then
                        v17[v19] = {};
                    end;
                    v17 = v17[v19];
                end;
            end;
            v17[v9[#v9]] = v10;
        end;
        v11:dispatch(v7(l_Overrides_0));
        local l_PropertyOverrideEvent_0 = v11:getState().Status.PropertyOverrideEvent;
        if l_PropertyOverrideEvent_0 then
            l_PropertyOverrideEvent_0:fire(l_Overrides_0);
        end;
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local _ = require(l_script_FirstAncestor_0.Packages.Framework).Dash.copy;
local v2 = require(l_script_FirstAncestor_0.Src.Actions.SetHistoryOffset);
local l_Reducers_0 = l_script_FirstAncestor_0.Src.Reducers;
local _ = require(l_Reducers_0.DebugData);
local _ = require(l_Reducers_0.Status);
local _ = require(l_script_FirstAncestor_0.Src.Types);
return function(v7)
    return function(v8)
        local v9 = v8:getState();
        local l_DebugData_0 = v9.DebugData;
        local l_Status_0 = v9.Status;
        local l_FrameBuffer_0 = l_DebugData_0.FrameBuffer;
        local l_DebugPoseEvent_0 = l_Status_0.DebugPoseEvent;
        local l_SelectedLayer_0 = l_Status_0.SelectedLayer;
        local v15 = l_FrameBuffer_0 and l_FrameBuffer_0.last;
        if not v7 or not v15 then
            if l_DebugPoseEvent_0 then
                l_DebugPoseEvent_0:Fire(nil, nil);
            end;
            v8:dispatch(v2(nil));
            return ;
        else
            if v7 ~= 0 then
                local v16 = v15.timestamp + v7;
                for v17 = 2, l_FrameBuffer_0:getSize() do
                    if l_FrameBuffer_0[v17] then
                        if v15.timestamp >= v16 then
                            v15 = l_FrameBuffer_0[v17];
                        else
                            break;
                        end;
                    end;
                end;
            end;
            local v18 = if not l_SelectedLayer_0 then v15.payload else v15.layerMap[l_SelectedLayer_0];
            local v19 = v18 and v18.animationPose;
            local l_hrpCFrame_0 = v15.payload.hrpCFrame;
            if l_DebugPoseEvent_0 then
                l_DebugPoseEvent_0:Fire(v19, l_hrpCFrame_0);
            end;
            v8:dispatch(v2(v7));
            return ;
        end;
    end;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local l_copy_0 = require(l_script_FirstAncestor_0.Packages.Framework).Dash.copy;
local v2 = require(l_script_FirstAncestor_0.Src.Actions.SetAdornments);
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v4 = {
    {
        color = Color3.new(0, 0, 1),
        count = 0
    },
    {
        color = Color3.new(0, 1, 0),
        count = 0
    },
    {
        color = Color3.new(0, 1, 1),
        count = 0
    },
    {
        color = Color3.new(1, 0, 0),
        count = 0
    },
    {
        color = Color3.new(1, 0, 1),
        count = 0
    },
    {
        color = Color3.new(1, 1, 0),
        count = 0
    },
    {
        color = Color3.new(0.5, 0.5, 0.5),
        count = 0
    },
    {
        color = Color3.new(0, 0, 0.5),
        count = 0
    },
    {
        color = Color3.new(0, 0.5, 0),
        count = 0
    },
    {
        color = Color3.new(0, 0.5, 0.5),
        count = 0
    },
    {
        color = Color3.new(0.5, 0, 0),
        count = 0
    },
    {
        color = Color3.new(0.5, 0, 0.5),
        count = 0
    },
    {
        color = Color3.new(0.5, 0.5, 0),
        count = 0
    }
};
local function v10()
    local v5 = nil;
    local v6 = nil;
    for v7, v8 in v4, nil, nil do
        if not (v5 ~= nil) or v8.count < v5 then
            v5 = v8.count;
            v6 = v7;
        end;
    end;
    local v9 = v4[v6];
    v9.count = v9.count + 1;
    return v4[v6];
end;
local function _(v11)
    v11.count = v11.count - 1;
end;
return function(v13)
    return function(v14)
        local v15 = l_copy_0(v14:getState().Status.Adornments);
        if v15[v13] and v15[v13].enabled then
            local l_colorEntry_0 = v15[v13].colorEntry;
            l_colorEntry_0.count = l_colorEntry_0.count - 1;
            v15[v13].enabled = false;
        else
            local v17 = v10();
            v15[v13] = {
                enabled = true,
                color = v17.color,
                colorEntry = v17
            };
        end;
        v14:dispatch(v2(v15));
        local l_LayerAdornmentEvent_0 = v14:getState().Status.LayerAdornmentEvent;
        if l_LayerAdornmentEvent_0 then
            l_LayerAdornmentEvent_0:fire(v15);
        end;
    end;
end;


local v0 = require(script:FindFirstAncestor("CompositorDebugger").Src.Util.Constants);
return {
    LAYER_TABS = {
        [v0.LAYER_TABS.LayerData] = 0,
        [v0.LAYER_TABS.Visualization] = 1,
        [v0.LAYER_TABS.History] = 2,
        [v0.LAYER_TABS.RawData] = 3
    },
    TAB_SWITCH_REASONS = {
        Manual = 0,
        HistoryIcon = 1,
        NoData = 2
    }
};


local _ = script:FindFirstAncestor("CompositorDebugger");
local v1 = {};
v1.new = function(v2)
    assert(v2 > 0, "Invalid buffer size, should be > 0");
    return (setmetatable({
        __buffer = {},
        __size = v2,
        __writeIndex = 1,
        __firstIndex = nil
    }, v1));
end;
v1.clone = function(v3)
    local v4 = v1.new(v3.__size);
    for v5, v6 in v3.__buffer, nil, nil do
        v4.__buffer[v5] = v6;
    end;
    v4.__writeIndex = v3.__writeIndex;
    v4.__firstIndex = v3.__firstIndex;
    return v4;
end;
v1.getSize = function(v7)
    return v7.__size;
end;
v1.push = function(v8, v9)
    if v8.__firstIndex then
        if v8.__firstIndex == v8.__writeIndex then
            v8.__firstIndex = v8.__firstIndex % v8.__size + 1;
        end;
    else
        v8.__firstIndex = v8.__writeIndex;
    end;
    v8.__buffer[v8.__writeIndex] = v9;
    v8.__writeIndex = v8.__writeIndex % v8.__size + 1;
end;
v1.__index = function(v10, v11)
    local v12 = getmetatable(v10)[v11];
    if v12 ~= nil then
        return v12;
    elseif v11 == "last" then
        return v10[1];
    elseif v11 == "first" then
        return v10.__buffer[v10.__firstIndex or 1];
    elseif type(v11) == "number" then
        local v13 = v10.__writeIndex - v11;
        if v13 < 1 then
            v13 = v13 + v10.__size;
        end;
        return v10.__buffer[v13];
    else
        return nil;
    end;
end;
v1.resize = function(v14, v15)
    local v16 = v1.new(v15);
    local v17 = math.max(v14.__size, v15);
    if v14.__firstIndex ~= nil then
        local l___firstIndex_0 = v14.__firstIndex;
        for _ = 1, v17 do
            v16:push(v14.__buffer[l___firstIndex_0]);
            l___firstIndex_0 = l___firstIndex_0 % v14.__size + 1;
            if not (l___firstIndex_0 ~= v14.__writeIndex) then
                break;
            end;
        end;
    end;
    return v16;
end;
v1.dump = function(v20, v21)
    local v22 = "Buffer:\n";
    for v23 = 1, v20.__size do
        v22 = v22 .. string.format("[%d]: %s\n", v23, (tostring(v20.__buffer[v23])));
    end;
    (v21 or print)(v22 .. string.format("WriteIndex: %d\n", v20.__writeIndex) .. string.format("FirstIndex: %d\n", v20.__firstIndex or -1));
end;
return v1;


return {
    EVENTS = {
        DebugData = "DebugData",
        PropertyOverrides = "PropertyOverrides",
        LayerAdornments = "LayerAdornments",
        DebugPose = "DebugPose"
    },
    FOLDERS = {
        CompositorDebugger = "__RobloxCompositorDebugger",
        Server = "Server",
        Client = "Client",
        AdornmentHandles = "AdornmentHandles"
    },
    LAYER_TABS = {
        LayerData = "LayerData",
        Visualization = "Visualization",
        History = "History",
        RawData = "RawData"
    },
    LAYERVIEW_ACTIONS = {
        Clear = "Clear",
        History = "History",
        NoOp = "NoOp"
    },
    SETTINGS = {
        LayerFilters = "CD_LayerFilters",
        ActiveLayersFilter = "CD_ActiveLayersFilter",
        FrameBufferDuration = "CD_FrameBufferDuration"
    },
    DEFAULT_TIMECONTROLS_INTERVAL = 10,
    FRAMERATE = 60,
    TIMECONTROLS_INVERVALS = {
        [10] = {
            Minor = 1,
            Major = 5
        },
        [30] = {
            Minor = 1,
            Medium = 5,
            Major = 10
        },
        [60] = {
            Minor = 5,
            Major = 10
        }
    }
};


local function v0(v1, v2)
    if v1 then
        assert(v1);
        if typeof(v1) ~= "Instance" then
            return "<Not an instance>\n";
        else
            local v3 = string.format("%s [%s]\n", v1.Name, v1.ClassName);
            local v4 = string.rep("..", v2);
            for _, v6 in pairs(v1:GetChildren()) do
                v3 = v3 .. v4 .. ".." .. v0(v6, v2 + 1);
            end;
            return v3;
        end;
    else
        return "<nil>";
    end;
end;
return function(v7, v8)
    local v9 = v0(v7, 0);
    if not v8 then
        print(v9);
        return ;
    else
        v8(v9);
        return ;
    end;
end;


local _ = require(script:FindFirstAncestor("CompositorDebugger").Src.Types);
local function v1(v2, v3)
    if v2 == nil then
        return "<nil>";
    else
        v3 = v3 or 0;
        assert(v2);
        assert(v3);
        local v4 = string.rep("  ", v3);
        local v5 = "{\n";
        local v6 = {};
        for v7, _ in v2, nil, nil do
            table.insert(v6, v7);
        end;
        table.sort(v6, function(v9, v10)
            if type(v9) == "number" and type(v10) == "number" then
                return v9 < v10;
            else
                return tostring(v9) < tostring(v10);
            end;
        end);
        for _, v12 in ipairs(v6) do
            local v13 = v2[v12];
            v5 = v5 .. v4 .. "  " .. if type(v12) ~= "number" and type(v12) ~= "string" then "`" .. tostring(v12) .. "`" else tostring(v12) .. ": ";
            if type(v13) == "table" then
                v5 = v5 .. v1(v13, v3 + 1);
            elseif type(v13) == "string" then
                v5 = v5 .. "\"" .. v13 .. "\"\n";
            else
                v5 = v5 .. tostring(v13) .. "\n";
            end;
        end;
        return v5 .. v4 .. "}\n";
    end;
end;
return function(v14, v15)
    local v16 = v1(v14, 0);
    if not v15 then
        print(v16);
        return ;
    else
        v15(v16);
        return ;
    end;
end;


local _ = require(script:FindFirstAncestor("CompositorDebugger").Src.Types);
local v1 = 0;
local v2;
do
    local l_v1_0 = v1;
    v2 = function()
        l_v1_0 = l_v1_0 + 1;
        return "ID" .. tostring(l_v1_0);
    end;
end;
v1 = {
    id = "{F9335871-7386-4AFA-B6B3-CF1A4FDB2BFE}",
    name = "Mock Compositor 1",
    children = {
        {
            children = {
                {
                    children = {
                        {
                            children = {},
                            className = "RestPose",
                            name = "Debug B",
                            id = "{20BFB42C-2D06-4E75-868D-0DA9AF1CBEB4}",
                            linkData = {
                                position = 1
                            },
                            props = {},
                            weight = 0.5,
                            watches = {
                                foo = "FOO",
                                bar = "BAR"
                            }
                        },
                        {
                            children = {},
                            className = "ClipLayer",
                            name = "Debug C",
                            id = "{E577542C-2F20-4F2E-836B-0E5BC148CBE6}",
                            linkData = {
                                position = 3
                            },
                            props = {
                                animationId = "rbxassetid://10921541949",
                                isLooping = true,
                                speed = 1
                            },
                            state = {
                                timePositionNormalized = 0,
                                length = 5
                            },
                            weight = 0.3
                        },
                        {
                            children = {},
                            className = "ClipLayer",
                            name = "Debug D",
                            id = "{2321A81C-9EB4-4017-A496-87F0570B99F9}",
                            linkData = {
                                position = 5
                            },
                            props = {
                                animationId = "rbxassetid://10899968825",
                                isLooping = true,
                                speed = 1
                            },
                            state = {
                                timePositionNormalized = 0.5,
                                length = 4
                            },
                            watches = {
                                ["function"] = function()
                                end,
                                table = {}
                            }
                        }
                    },
                    className = "Blend1D",
                    name = "Debug A",
                    id = "{275F34E0-57F4-4354-BC5A-38518EF2EB37}",
                    props = {
                        targetPosition = 2,
                        speed = 1
                    },
                    weight = 1
                },
                {
                    children = {
                        {
                            children = {},
                            className = "RestPose",
                            name = "Debug G",
                            id = "{FB02B42C-2D06-4E75-868D-0DA9AF1C4BEB}",
                            linkData = {
                                position = Vector2.new(0, 0)
                            },
                            props = {},
                            weight = 0.5,
                            watches = {
                                foo = "FOO",
                                bar = "BAR"
                            }
                        },
                        {
                            children = {},
                            className = "ClipLayer",
                            name = "Debug H",
                            id = "{775E542C-2F20-4F2E-836B-0E5BC1486EBC}",
                            linkData = {
                                position = Vector2.new(0, 2)
                            },
                            props = {
                                animationId = "rbxassetid://10921541949",
                                isLooping = true,
                                speed = 1
                            },
                            state = {
                                timePositionNormalized = 0,
                                length = 5
                            },
                            weight = 0.3
                        },
                        {
                            children = {},
                            className = "ClipLayer",
                            name = "Debug I",
                            id = "{1231A81C-9EB4-4017-A496-87F0570B9F65}",
                            linkData = {
                                position = Vector2.new(1, 1)
                            },
                            props = {
                                animationId = "rbxassetid://10899968825",
                                isLooping = true,
                                speed = 1
                            },
                            state = {
                                timePositionNormalized = 0.5,
                                length = 4
                            },
                            watches = {
                                ["function"] = function()
                                end,
                                table = {}
                            }
                        }
                    },
                    className = "Blend2D",
                    name = "Debug F",
                    id = "{F57234E0-57F4-4354-BC5A-38518EF273BE}",
                    props = {
                        targetPosition = Vector2.new(0.5, 0.5),
                        speed = 1
                    },
                    weight = 1
                },
                {
                    children = {},
                    className = "ClipLayer",
                    name = "Debug E",
                    id = "{B1A616DC-DBA5-4E75-ACFC-D073FBBF921F}",
                    props = {
                        animationId = "rbxassetid://10921258489",
                        isLooping = true,
                        speed = 1
                    },
                    weight = 0
                }
            },
            className = "SelectLayer",
            id = "{6F4A739B-8775-4B8E-9A89-1DBD43E9A4EF}",
            props = {
                fadeInTimeSeconds = 0.2,
                fadeOutTimeSeconds = 0.2,
                selection = "Idle"
            }
        }
    }
};
return {
    mockPayload1 = v1,
    mockPayload2 = {
        id = "{CF1A4FDB-7386-4AFA-B6B3-2BFEF9335871}",
        name = "Mock Compositor 2",
        children = {
            {
                children = {
                    {
                        children = {},
                        className = "ClipLayer",
                        id = "{4017A81C-9EB4-4017-A496-87F0570B99F9}",
                        name = "My Layer",
                        props = {
                            animationId = "rbxassetid://10899968825",
                            isLooping = true,
                            speed = 1
                        },
                        state = {
                            length = 4,
                            timePositionNormalized = 0.5
                        },
                        data = {
                            ["function"] = function()
                            end,
                            table = {}
                        }
                    }
                },
                className = "ClipLayer",
                name = "Debug F",
                id = "{43E9A4EF-8775-4B8E-9A89-1DBD6F4A739B}",
                props = {
                    animationId = "rbxassetid://10921258489",
                    isLooping = true,
                    speed = 1
                }
            }
        }
    },
    sortByIndex = {
        id = v2(),
        name = "Sort by Index",
        children = {
            {
                id = v2(),
                name = "Third",
                index = 3,
                className = "ClipLayer",
                children = {}
            },
            {
                id = v2(),
                name = "First",
                index = 1,
                className = "ClipLayer",
                children = {}
            },
            {
                id = v2(),
                name = "Second",
                index = 2,
                className = "ClipLayer",
                children = {}
            }
        }
    },
    sortByName = {
        id = v2(),
        name = "Sort by Name",
        children = {
            {
                id = v2(),
                name = "[C] Third",
                className = "ClipLayer",
                children = {}
            },
            {
                id = v2(),
                name = "[B] Second",
                className = "ClipLayer",
                children = {}
            },
            {
                id = v2(),
                name = "[A] First",
                className = "ClipLayer",
                children = {}
            }
        }
    },
    sortByClassName = {
        id = v2(),
        name = "Sort by Classname",
        children = {
            {
                id = v2(),
                className = "SequenceLayer",
                children = {}
            },
            {
                id = v2(),
                className = "Blend1D",
                children = {}
            },
            {
                id = v2(),
                className = "ClipLayer",
                children = {}
            }
        }
    },
    sortById = {
        id = v2(),
        name = "Sort by Id",
        children = {
            {
                id = v2(),
                className = "ClipLayer",
                children = {}
            },
            {
                id = v2(),
                className = "ClipLayer",
                children = {}
            },
            {
                id = v2(),
                className = "ClipLayer",
                children = {}
            }
        }
    },
    clipLayerView = {
        ExpandedSections = {
            LayerDetails = true,
            Properties = true,
            State = false,
            Watches = true
        },
        LayerData = v1.children[1].children[1].children[3]
    },
    blend1DLayerView = {
        ExpandedSections = {
            LayerDetails = true,
            Properties = true
        },
        LayerData = v1.children[1].children[1]
    },
    blend1DLayerViewWrongType = {
        ExpandedSections = {
            LayerDetails = true,
            Properties = true
        },
        LayerData = {
            children = {
                {
                    linkData = {
                        position = Vector2.new(1, 1)
                    }
                },
                {
                    linkData = {
                        position = Vector3.new(3, 0, 0)
                    }
                },
                {
                    linkData = {
                        position = {
                            X = 5
                        }
                    }
                },
                {
                    linkData = {
                        position = "FOO"
                    }
                }
            },
            className = "Blend1D",
            name = "WrongTargets",
            id = "{275F34E0-57F4-4534-A5CB-38518EF2EB37}",
            props = {
                targetPosition = 2,
                speed = 1
            },
            weight = 1
        }
    },
    blend2DLayerViewWrongType = {
        ExpandedSections = {
            LayerDetails = true,
            Properties = true
        },
        LayerData = {
            children = {
                {
                    linkData = {
                        position = 1
                    }
                },
                {
                    linkData = {
                        position = Vector3.new(3, 2, 0)
                    }
                },
                {
                    linkData = {
                        position = {
                            X = 5,
                            Y = 1
                        }
                    }
                },
                {
                    linkData = {
                        position = "FOO"
                    }
                }
            },
            className = "Blend2D",
            name = "WrongTargets",
            id = "{275F34E0-57F4-4534-A5CB-38518EF2EB37}",
            props = {
                targetPosition = Vector2.new(0.5, 0.5),
                speed = 1
            },
            weight = 1
        }
    },
    blend2DLayerView = {
        ExpandedSections = {
            LayerDetails = true,
            Properties = true
        },
        LayerData = v1.children[1].children[2]
    },
    state = {
        timePositionNormalized = 0.5,
        length = 4
    }
};


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local v1 = require(l_script_FirstAncestor_0.Packages.ReactRoblox);
local v2 = require(l_script_FirstAncestor_0.Packages.Dev.Rhodium);
local l_Util_0 = l_script_FirstAncestor_0.Src.Util;
local v4 = require(l_Util_0.CircularBuffer);
local v5 = require(l_Util_0.Constants);
local v6 = require(l_Util_0.debugFlags);
local v7 = {};
v7.findDeepInstance = function(v8, v9)
    if not (not v8 or not v9) and #v9 > 0 then
        local v10 = table.remove(v9, 1);
        if not v10 then
            return nil;
        else
            local l_v8_FirstChild_0 = v8:FindFirstChild(v10);
            if not l_v8_FirstChild_0 then
                return nil;
            else
                return (v7.findDeepInstance(l_v8_FirstChild_0, v9));
            end;
        end;
    else
        return v8;
    end;
end;
v7.getLayerView = function(v12)
    return v7.findDeepInstance(v12, {
        "MainSplitPane",
        "Contents",
        "Pane 2",
        "Child",
        "LayerData"
    });
end;
v7.getLayerTree = function(v13)
    return v7.findDeepInstance(v13, {
        "MainSplitPane",
        "Contents",
        "Pane 1",
        "Child"
    });
end;
v7.getLayerViewItem = function(v14, v15)
    if v6.ShowLayerID then
        v15 = v15 + 1;
    end;
    return (v7.findDeepInstance(v14, {
        "Contents",
        "List",
        "Child",
        (tostring(v15))
    }));
end;
v7.getLayerViewLabel = function(v16, v17)
    return (v7.findDeepInstance(v7.getLayerViewItem(v16, v17), {
        "1",
        "Left",
        "Text"
    }));
end;
v7.getLayerViewValue = function(v18, v19)
    return (v7.findDeepInstance(v7.getLayerViewItem(v18, v19), {
        "2",
        "Left",
        "Text"
    }));
end;
v7.getLayerViewTextBox = function(v20, v21)
    return (v7.findDeepInstance(v7.getLayerViewItem(v20, v21), {
        "2",
        "Left",
        "Text",
        "PropertyCell",
        "Content",
        "TextInput",
        "Contents",
        "TextBox"
    }));
end;
v7.getLayerViewCheckBox = function(v22, v23)
    return (v7.findDeepInstance(v7.getLayerViewItem(v22, v23), {
        "2",
        "Left",
        "Text",
        "Content",
        "Contents",
        "TextButton"
    }));
end;
v7.getLayerViewDeleteButton = function(v24, v25)
    return (v7.findDeepInstance(v7.getLayerViewItem(v24, v25), {
        "2",
        "Right",
        v5.LAYERVIEW_ACTIONS.Clear
    }));
end;
v7.getLayerViewHistoryButton = function(v26, v27)
    return (v7.findDeepInstance(v7.getLayerViewItem(v26, v27), {
        "2",
        "Right",
        v5.LAYERVIEW_ACTIONS.History
    }));
end;
v7.getLayerTreeItem = function(v28, v29)
    return (v7.findDeepInstance(v28, {
        "List",
        (tostring(v29))
    }));
end;
v7.getLayerPanelTab = function(v30, v31)
    return v7.findDeepInstance(v30, {
        "Tabs",
        (tostring(v31))
    });
end;
local function v40(v32, v33, v34, v35, v36)
    local v37 = v4.new(60);
    for v38 = 1, v35 do
        local v39 = {
            layerMap = {
                [v32] = {
                    [v33] = {
                        number = math.random(),
                        vector2 = Vector2.new(math.random(), math.random()),
                        vector3 = Vector3.new(math.random(), math.random(), math.random())
                    }
                }
            },
            timestamp = (v38 - 1) * 0.1
        };
        if v39.layerMap[v32][v33][v34] == nil then
            if v36 == "number" then
                v39.layerMap[v32][v33][v34] = math.random();
            elseif v36 == "Vector2" then
                v39.layerMap[v32][v33][v34] = Vector2.new(math.random(), math.random());
            elseif v36 == "Vector3" then
                v39.layerMap[v32][v33][v34] = Vector3.new(math.random(), math.random(), math.random());
            end;
        end;
        v37:push(v39);
    end;
    return v37;
end;
v7.makeHistoryGraphProperties = function(v41, v42, v43, v44, v45)
    return {
        FrameBuffer = v40(v41, v42, v43, v44, v45),
        HistoryField = {
            id = v41,
            section = v42,
            field = v43
        }
    };
end;
v7.clickComponent = function(v46, v47)
    local v48 = v2.Element.new(v46):getCenter();
    v1.act(function()
        v2.VirtualInput.Mouse.multiClick(v48, v47 or 1);
        v2.VirtualInput.waitForInputEventsProcessed();
    end);
end;
v7.clearText = function(v49)
    local v50 = v2.Element.new(v49);
    v1.act(function()
        v50:click(2);
        v50:sendKey(Enum.KeyCode.Delete);
        task.wait(0.1);
    end);
end;
v7.sendText = function(v51, v52)
    local v53 = v2.Element.new(v51);
    v1.act(function()
        v53:sendText(v52);
        task.wait(0.1);
        v53:sendKey(Enum.KeyCode.Return);
        task.wait(0.1);
    end);
end;
v7.dragComponent = function(v54, v55)
    local v56 = v2.Element.new(v54):getCenter();
    v1.act(function()
        v2.VirtualInput.Mouse.mouseLeftDown(v56);
        v2.VirtualInput.Mouse.mouseDrag(v56, v56 + v55, 5);
        v2.VirtualInput.Mouse.mouseLeftUp(v56);
    end);
end;
v7.getLayerViewCell = function(v57, v58, v59)
    local v60 = v7.findDeepInstance(v7.getLayerViewItem(v57, v58), {
        tostring(v59),
        "Left",
        "Text"
    });
    if not v60 then
        return nil;
    else
        return v60.Text;
    end;
end;
v7.checkLayerViewItemLabels = function(v61, v62, v63, v64)
    local v65 = v7.getLayerViewLabel(v61, v62);
    assert(v65);
    if v65.Text ~= v63 then
        return false;
    else
        local v66 = v7.getLayerViewValue(v61, v62);
        if not v64 then
            return v66 == nil;
        else
            assert(v66);
            return v66.Text == v64;
        end;
    end;
end;
v7.getBlendDots = function(v67)
    local v68 = v7.findDeepInstance(v67, {
        "Content",
        "1"
    });
    if v68 then
        local v69 = {};
        for _, v71 in v68:GetChildren() do
            if v71:IsA("ImageButton") then
                v69[v71.Name] = v71;
            end;
        end;
        return v69;
    else
        return {};
    end;
end;
v7.repeatFlakyTest = function(v72, v73, v74)
    local v75 = v74 or 3;
    for v76 = 1, v75 - 1 do
        if not pcall(v72) then
            print(string.format("WARN: Flaky test [%d/%d]", v76, v75));
            if v73 then
                v73();
            end;
        else
            return ;
        end;
    end;
    v72();
end;
return v7;


local _ = game:GetService("Workspace");
local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local v2 = require(l_script_FirstAncestor_0.Packages.React);
local v3 = require(l_script_FirstAncestor_0.Packages.ReactRoblox);
local v4 = require(l_script_FirstAncestor_0.Packages.Rodux);
local v5 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_VirtualInput_0 = require(l_script_FirstAncestor_0.Packages.Dev.Rhodium).VirtualInput;
local _ = require(l_script_FirstAncestor_0.Src.Components.MainComponent);
local v8 = require(l_script_FirstAncestor_0.Src.Reducers.MainReducer);
local _ = require(l_script_FirstAncestor_0.Src.Types);
local v10 = require(l_script_FirstAncestor_0.Src.Util.mockContext);
local l_join_0 = v5.Dash.join;
local v12 = {};
local function _(v13, v14, v15)
    return v10({
        Component = v2.createElement(v13, v14)
    }, v15);
end;
local function _()
    local v17 = nil;
    pcall(function()
        local l_ViewSelectorScreenGui_0 = game:GetService("CoreGui").ViewSelectorScreenGui;
        if l_ViewSelectorScreenGui_0 then
            local l_Enabled_0 = l_ViewSelectorScreenGui_0.Enabled;
            local v20 = false;
            v17 = l_Enabled_0;
            l_ViewSelectorScreenGui_0.Enabled = v20;
        end;
    end);
    return v17;
end;
local function _(v22)
    if v22 == nil then
        return ;
    else
        pcall(function()
            game:GetService("CoreGui").ViewSelectorScreenGui.Enabled = v22;
        end);
        return ;
    end;
end;
local v24 = {};
v24.__index = v24;
local function v28()
    for _, v26 in game.CoreGui:GetChildren() do
        if v26:IsA("ScreenGui") and v26.Name == "CompositorDebuggerMock" then
            v26.Parent = nil;
            v26:Destroy();
        end;
    end;
    local l_ScreenGui_0 = Instance.new("ScreenGui");
    l_ScreenGui_0.Name = "CompositorDebuggerMock";
    l_ScreenGui_0.Parent = game.CoreGui;
    return l_ScreenGui_0;
end;
v24.new = function(v29, v30)
    local v31 = v28();
    local v32 = v4.Store.new(v8, nil, {
        v4.thunkMiddleware
    }, nil);
    local v33 = v3.createRoot(v31);
    local v34 = v10({
        Component = v2.createElement(v29, v30)
    }, v32);
    local l_Component_0 = v31:FindFirstChild("Component");
    l_VirtualInput_0.setCurrentWindow(v31);
    local v36 = {
        componentType = v29,
        properties = v30,
        container = v31,
        component = l_Component_0,
        root = v33,
        element = v34,
        store = v32
    };
    setmetatable(v36, v24);
    return v36;
end;
v24.render = function(v37)
    v3.act(function()
        v37.root:render(v37.element);
    end);
    v37.component = v37.container:FindFirstChild("Component");
end;
v24.update = function(v38, v39)
    v38.element = v10({
        Component = v2.createElement(v38.componentType, (l_join_0(v38.properties or {}, v39)))
    }, v38.store);
    v38:render();
end;
v24.unmount = function(v40)
    v3.act(function()
        v40.root:unmount();
    end);
    v40.container.Parent = nil;
    v40.container:Destroy();
end;
local function _(v41, v42, v43)
    return function()
        local v44 = nil;
        local v45;
        do
            local l_v44_0 = v44;
            pcall(function()
                local l_ViewSelectorScreenGui_1 = game:GetService("CoreGui").ViewSelectorScreenGui;
                if l_ViewSelectorScreenGui_1 then
                    local l_Enabled_1 = l_ViewSelectorScreenGui_1.Enabled;
                    local v49 = false;
                    l_v44_0 = l_Enabled_1;
                    l_ViewSelectorScreenGui_1.Enabled = v49;
                end;
            end);
            v45 = l_v44_0;
        end;
        v44 = v24.new(v41, v42);
        v44:render();
        v43(v44.component, v44);
        v44:unmount();
        if v45 == nil then
            return ;
        else
            pcall(function()
                game:GetService("CoreGui").ViewSelectorScreenGui.Enabled = v45;
            end);
            return ;
        end;
    end;
end;
v12.factory = function(v51, v52)
    return function(v53)
        local l_v51_0 = v51;
        local l_v52_0 = v52;
        return function()
            local v56 = nil;
            local v57;
            do
                local l_v56_0 = v56;
                pcall(function()
                    local l_ViewSelectorScreenGui_2 = game:GetService("CoreGui").ViewSelectorScreenGui;
                    if l_ViewSelectorScreenGui_2 then
                        local l_Enabled_2 = l_ViewSelectorScreenGui_2.Enabled;
                        local v61 = false;
                        l_v56_0 = l_Enabled_2;
                        l_ViewSelectorScreenGui_2.Enabled = v61;
                    end;
                end);
                v57 = l_v56_0;
            end;
            v56 = v24.new(l_v51_0, l_v52_0);
            v56:render();
            v53(v56.component, v56);
            v56:unmount();
            if v57 == nil then
                return ;
            else
                pcall(function()
                    game:GetService("CoreGui").ViewSelectorScreenGui.Enabled = v57;
                end);
                return ;
            end;
        end;
    end, function(v62)
        return function(v63)
            local l_v51_1 = v51;
            local v65 = l_join_0(v52, v62 or {});
            return function()
                local v66 = nil;
                local v67;
                do
                    local l_v66_0 = v66;
                    pcall(function()
                        local l_ViewSelectorScreenGui_3 = game:GetService("CoreGui").ViewSelectorScreenGui;
                        if l_ViewSelectorScreenGui_3 then
                            local l_Enabled_3 = l_ViewSelectorScreenGui_3.Enabled;
                            local v71 = false;
                            l_v66_0 = l_Enabled_3;
                            l_ViewSelectorScreenGui_3.Enabled = v71;
                        end;
                    end);
                    v67 = l_v66_0;
                end;
                v66 = v24.new(l_v51_1, v65);
                v66:render();
                v63(v66.component, v66);
                v66:unmount();
                if v67 == nil then
                    return ;
                else
                    pcall(function()
                        game:GetService("CoreGui").ViewSelectorScreenGui.Enabled = v67;
                    end);
                    return ;
                end;
            end;
        end;
    end;
end;
return v12;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local v1 = require(l_script_FirstAncestor_0.Packages.TestLoader);
local _ = require(l_script_FirstAncestor_0.Src.Types);
return (v1.getDebugFlags("CompositorDebugger"));


return function(v0, v1, v2)
    local v3 = math.pow(10, (math.floor((math.log10(v0)))));
    local v4 = (v0 / v3) / v1;
    local v5 = v2[1];
    for _, v7 in v2, nil, nil do
        if v4 < v7 then
            v5 = v7;
            break;
        end;
    end;
    return v5 * v3;
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local _ = require(l_script_FirstAncestor_0.Packages.TestLoader);
local _ = require(l_script_FirstAncestor_0.Src.Types);
return function(v3)
    return (((v3.name or v3.linkData and v3.linkData.key) or v3.index and string.format("[%d]", v3.index)) or v3.className and string.format("[%s]", v3.className)) or "?";
end;


local l_script_FirstAncestor_0 = script:FindFirstAncestor("CompositorDebugger");
local v1 = require(l_script_FirstAncestor_0.Packages.Rodux);
local v2 = require(l_script_FirstAncestor_0.Packages.Framework);
local l_TestHelpers_0 = v2.TestHelpers;
local l_ContextServices_0 = v2.ContextServices;
local v5 = require(l_script_FirstAncestor_0.Src.Reducers.MainReducer);
local v6 = require(l_script_FirstAncestor_0.Src.Resources.MakeTheme);
local function v8(v7)
    return {
        l_ContextServices_0.Analytics.mock(),
        l_ContextServices_0.Localization.mock(),
        l_ContextServices_0.Store.new(v7 or v1.Store.new(v5, nil, {
            v1.thunkMiddleware
        }, nil)),
        v6(true)
    };
end;
return function(v9, v10)
    assert(type(v9) == "table", "Expected story to be a table");
    return l_TestHelpers_0.provideMockContext(v8(v10), v9);
end;


local _ = script:FindFirstAncestor("CompositorDebugger");
local function v1(v2, v3, v4, v5)
    v3(v2, v5);
    local v6 = if not v4 then v2.children else v4(v2) or {};
    for _, v8 in pairs(v6) do
        v1(v8, v3, v4, v5 + 1);
    end;
end;
return function(v9, v10, v11)
    return v1(v9, v10, v11, 1);
end;


require(script.Parent.defineLuaFlags);
if plugin then
    local l_Parent_0 = script.Parent.Parent;
    local v1 = require(l_Parent_0.Packages.TestLoader);
    v1.launch("CompositorGraphEditor", l_Parent_0.Src);
    if not v1.isCli() then
        if game:GetFastFlag("EnableCompositorGraphEditor") then
            local v2 = require(l_Parent_0.Packages.React);
            local v3 = require(l_Parent_0.Packages.ReactRoblox);
            local v4 = require(l_Parent_0.Src.MainPlugin);
            local v5 = nil;
            local function v7()
                plugin.Name = l_Parent_0.Name;
                local v6 = v2.createElement(v4, {
                    Plugin = plugin
                });
                v5 = v3.createRoot(Instance.new("Frame"));
                v5:render(v6);
            end;
            plugin.Unloading:Connect(function()
                if v5 then
                    v5:render(nil);
                    v5 = nil;
                end;
            end);
            v7();
            return ;
        else
            return ;
        end;
    else
        return ;
    end;
else
    return ;
end;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.React);
local v2 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v2.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Stylizer_0 = v2.Style.Stylizer;
local l_UI_0 = v2.UI;
local l_Pane_0 = l_UI_0.Pane;
local l_TextLabel_0 = l_UI_0.TextLabel;
local v11 = v1.PureComponent:extend("ExampleComponent");
v11.render = function(v12)
    return v1.createElement(l_Pane_0, {
        Style = "Box",
        Padding = 10
    }, {
        Text = v1.createElement(l_TextLabel_0, {
            AutomaticSize = Enum.AutomaticSize.XY,
            Style = "Title",
            Text = v12.props.Localization:getText("Plugin", "Text")
        })
    });
end;
return (l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v11));


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.React);
local v2 = require(l_Parent_0.Packages.RoactRodux);
local v3 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Analytics_0 = l_ContextServices_0.Analytics;
local l_Localization_0 = l_ContextServices_0.Localization;
local l_Stylizer_0 = v3.Style.Stylizer;
local l_Pane_0 = v3.UI.Pane;
local v10 = require(l_Parent_0.Src.Actions.ExampleAction);
local _ = require(l_Parent_0.Src.Reducers.ExampleReducer);
local v12 = v1.PureComponent:extend("ExampleRoactRoduxComponent");
v12.render = function(_)
    return v1.createElement(l_Pane_0);
end;
return v2.connect(function(v14, _)
    return {
        DefaultStateObject = v14.DefaultStateObject
    };
end, function(v16)
    return {
        dispatchExampleAction = function(v17)
            v16(v10(v17));
        end
    };
end)((l_withContext_0({
    Analytics = l_Analytics_0,
    Localization = l_Localization_0,
    Stylizer = l_Stylizer_0
})(v12)));


local l_StudioFixPluginWidgetLocalizedIds_0 = game:GetFastFlag("StudioFixPluginWidgetLocalizedIds");
local l_Parent_0 = script.Parent.Parent;
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.Framework);
local l_UI_0 = v5.UI;
local l_DockWidget_0 = l_UI_0.DockWidget;
local l_PluginButton_0 = l_UI_0.PluginButton;
local l_PluginToolbar_0 = l_UI_0.PluginToolbar;
local l_ContextServices_0 = v5.ContextServices;
local l_Plugin_0 = l_ContextServices_0.Plugin;
local l_Mouse_0 = l_ContextServices_0.Mouse;
local l_Store_0 = l_ContextServices_0.Store;
local v14 = require(l_Parent_0.Src.Reducers.MainReducer);
local v15 = 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_Components_0 = l_Parent_0.Src.Components;
local v19 = require(l_Components_0.ExampleComponent);
local v20 = require(l_Components_0.ExampleRoactRoduxComponent);
local v21 = v2.PureComponent:extend("MainPlugin");
v21.init = function(v22, _)
    v22:setState({
        enabled = false
    });
    v22.toggleEnabled = function()
        v22:setState(function(v24)
            return {
                enabled = not v24.enabled
            };
        end);
    end;
    v22.onClose = function()
        v22:setState({
            enabled = false
        });
    end;
    v22.onRestore = function(v25)
        v22:setState({
            enabled = v25
        });
    end;
    v22.onWidgetEnabledChanged = function(v26)
        v22:setState({
            enabled = v26.Enabled
        });
    end;
    v22.store = v4.Store.new(v14, nil, {
        v4.thunkMiddleware
    }, nil);
    v22.localization = l_ContextServices_0.Localization.new({
        stringResourceTable = l_SourceStrings_0,
        translationResourceTable = l_LocalizedStrings_0,
        pluginName = "CompositorGraphEditor"
    });
    v22.analytics = l_ContextServices_0.Analytics.new(function()
        return {};
    end, {});
end;
v21.renderButtons = function(v27, v28)
    return {
        Toggle = v2.createElement(l_PluginButton_0, {
            Toolbar = v28,
            Active = v27.state.enabled,
            Id = "template_button",
            Title = v27.localization:getText("Plugin", "Button"),
            Tooltip = v27.localization:getText("Plugin", "Description"),
            Icon = "rbxasset://textures/GameSettings/ToolbarIcon.png",
            OnClick = v27.toggleEnabled,
            ClickableWhenViewportHidden = true
        })
    };
end;
v21.render = function(v29)
    local l_props_0 = v29.props;
    local l_state_0 = v29.state;
    local l_Plugin_1 = l_props_0.Plugin;
    return l_ContextServices_0.provide({
        l_Plugin_0.new(l_Plugin_1),
        l_Store_0.new(v29.store),
        l_Mouse_0.new(l_Plugin_1:getMouse()),
        v15(),
        v29.localization,
        v29.analytics
    }, {
        Toolbar = v2.createElement(l_PluginToolbar_0, {
            Title = v29.localization:getText("Plugin", "Toolbar"),
            RenderButtons = function(v33)
                return v29:renderButtons(v33);
            end
        }),
        MainWidget = v2.createElement(l_DockWidget_0, {
            Id = if not l_StudioFixPluginWidgetLocalizedIds_0 then nil else "CompositorGraphEditor",
            Enabled = l_state_0.enabled,
            Title = v29.localization:getText("Plugin", "Name"),
            ZIndexBehavior = Enum.ZIndexBehavior.Sibling,
            InitialDockState = Enum.InitialDockState.Bottom,
            Size = Vector2.new(640, 480),
            MinSize = Vector2.new(250, 200),
            OnClose = v29.onClose,
            ShouldRestore = true,
            OnWidgetRestored = v29.onRestore,
            [v3.Change.Enabled] = v29.onWidgetEnabledChanged
        }, {
            ExampleComponent = v2.createElement(v19),
            ExampleRoactRoduxComponent = v2.createElement(v20)
        })
    });
end;
return v21;


local l_Parent_0 = script.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Rodux);
local l_join_0 = require(l_Parent_0.Packages.Dash).join;
return (v1.createReducer({
    DefaultStateObject = ""
}, {
    [require(l_Parent_0.Src.Actions.ExampleAction).name] = function(v3, v4)
        return l_join_0(v3, {
            DefaultStateObject = v4.something
        });
    end
}));


return function(v0, v1)
    if v0 then
        local l_DebugBuiltInPluginModalsNotBlocking_0 = game:GetFastFlag("DebugBuiltInPluginModalsNotBlocking");
        local l_Parent_0 = script.Parent.Parent;
        local v4 = require(l_Parent_0.Packages.Roact);
        local v5 = require(l_Parent_0.Packages.Rodux);
        local l_ContextServices_0 = require(l_Parent_0.Packages.Framework).ContextServices;
        local l_Util_0 = l_Parent_0.Src.Util;
        local v8 = require(l_Parent_0.Src.Resources.MakeTheme);
        local v9 = require(l_Util_0.Constants);
        local v10 = require(l_Parent_0.Src.Reducers.MainReducer);
        local v11 = require(l_Parent_0.Src.Networking.NetworkInterface);
        local l_SourceStrings_0 = l_Parent_0.Src.Resources.SourceStrings;
        local l_LocalizedStrings_0 = l_Parent_0.Src.Resources.LocalizedStrings;
        local l_Localization_0 = l_ContextServices_0.Localization;
        local v15 = require(l_Parent_0.Src.Components.ServiceWrapper);
        local v16 = require(l_Parent_0.Src.Components.ConvertToPackageWindow.ScreenSelect);
        local v17 = l_Localization_0.new({
            stringResourceTable = l_SourceStrings_0,
            translationResourceTable = l_LocalizedStrings_0,
            pluginName = l_Parent_0.Name
        });
        local v18 = nil;
        local v19 = nil;
        local function v20()
            v19 = v0:CreateQWidgetPluginGui(l_Parent_0.Name, {
                Size = Vector2.new(960, 600),
                MinSize = Vector2.new(960, 600),
                Resizable = true,
                Modal = not l_DebugBuiltInPluginModalsNotBlocking_0,
                InitialEnabled = false
            });
            v19.Name = v17:getText("Meta", "PluginName");
            v19.Title = v17:getText("Meta", "PluginName");
            v19.ZIndexBehavior = Enum.ZIndexBehavior.Sibling;
            v19:GetPropertyChangedSignal("Enabled"):connect(function()
                if not (v19.Enabled or not v18) then
                    v4.unmount(v18);
                    v18 = nil;
                end;
            end);
        end;
        local function v21()
            if v18 then
                v4.unmount(v18);
                v18 = nil;
            end;
            v19.Enabled = false;
        end;
        local function v25(v22, v23, v24)
            if not v18 then
                v18 = v4.mount(v4.createElement(v15, {
                    plugin = v0,
                    store = v5.Store.new(v10, {
                        AssetConfigReducer = {
                            instances = v22,
                            clonedInstances = v24
                        }
                    }, {
                        v5.thunkMiddleware
                    }),
                    theme = v8(),
                    mouse = v0:GetMouse(),
                    focusGui = v19,
                    networkInterface = v11.new(),
                    localization = v17
                }, {
                    v4.createElement(v16, {
                        onClose = v21,
                        assetName = v23,
                        pluginGui = v19,
                        currentScreen = v9.SCREENS.CONFIGURE_ASSET,
                        instances = v22
                    })
                }), v19);
                v19.Enabled = true;
                return v18;
            else
                return ;
            end;
        end;
        local function _()
            v0.Name = l_Parent_0.Name;
            v20();
            v1.signals["PackageUIService.OnOpenConvertToPackagePlugin"]:Connect(function(v26, v27, v28)
                v25(v26, v27, v28);
            end);
        end;
        v0.Name = l_Parent_0.Name;
        v20();
        v1.signals["PackageUIService.OnOpenConvertToPackagePlugin"]:Connect(function(v30, v31, v32)
            v25(v30, v31, v32);
        end);
        return ;
    else
        return ;
    end;
end;


local v0 = nil;
v0 = pcall;
local function _(v1, v2, v3)
    return function(...)
        local v4 = {
            v0(v1, ...)
        };
        if not table.remove(v4, 1) then
            v3(unpack(v4));
            return ;
        else
            v2(unpack(v4));
            return ;
        end;
    end;
end;
local function _(v6)
    return next(v6) == nil;
end;
local v8 = {};
v8.__index = v8;
v8.Status = {
    Started = "Started",
    Resolved = "Resolved",
    Rejected = "Rejected"
};
v8.new = function(v9)
    local v10 = {
        _source = debug.traceback(),
        _type = "Promise",
        _status = v8.Status.Started,
        _value = nil,
        _queuedResolve = {},
        _queuedReject = {}
    };
    setmetatable(v10, v8);
    local function v11(...)
        v10:_resolve(...);
    end;
    local function v12(...)
        v10:_reject(...);
    end;
    local v13, v14 = v0(v9, v11, v12);
    if not v13 and v10._status == v8.Status.Started then
        v12(v14);
    end;
    return v10;
end;
v8.resolve = function(v15)
    return v8.new(function(v16)
        v16(v15);
    end);
end;
v8.reject = function(v17)
    return v8.new(function(_, v19)
        v19(v17);
    end);
end;
v8.all = function(...)
    local v20 = {
        ...
    };
    if type(v20[1]) == "table" and v20[1]._type ~= "Promise" then
        v20 = v20[1];
    end;
    return v8.new(function(v21, v22)
        local v23 = false;
        local v24 = {};
        local v25 = 0;
        local function _(v26, v27)
            if not v23 then
                table.insert(v24, v26, v27);
                v25 = v25 + 1;
                if v25 == #v20 then
                    v21(v24);
                    v23 = true;
                end;
                return ;
            else
                return ;
            end;
        end;
        for v29, v30 in ipairs(v20) do
            if v30._status == v8.Status.Started then
                v30:andThen(function(v31)
                    local l_v29_0 = v29;
                    if not v23 then
                        table.insert(v24, l_v29_0, v31);
                        v25 = v25 + 1;
                        if v25 == #v20 then
                            v21(v24);
                            v23 = true;
                        end;
                        return ;
                    else
                        return ;
                    end;
                end):catch(function(v33)
                    v23 = true;
                    v22(v33);
                end);
            elseif v30._status == v8.Status.Resolved then
                local l__value_0 = v30._value;
                if not v23 then
                    table.insert(v24, v29, l__value_0);
                    v25 = v25 + 1;
                    if v25 == #v20 then
                        v21(v24);
                        v23 = true;
                    end;
                end;
            else
                v23 = true;
                v22(v30._value);
            end;
        end;
    end);
end;
v8.is = function(v35)
    if type(v35) ~= "table" then
        return false;
    else
        return v35._type == "Promise";
    end;
end;
v8.andThen = function(v36, v37, v38)
    return v8.new(function(v39, v40)
        local l_v39_0 = v39;
        if v37 then
            local l_v37_0 = v37;
            local l_l_v37_0_0 = l_v37_0 --[[ copy: 3 -> 5 ]];
            l_v39_0 = function(...)
                local v44 = {
                    v0(l_l_v37_0_0, ...)
                };
                if not table.remove(v44, 1) then
                    v40(unpack(v44));
                    return ;
                else
                    v39(unpack(v44));
                    return ;
                end;
            end;
        end;
        local l_v40_0 = v40;
        if v38 then
            local l_v38_0 = v38;
            l_v40_0 = function(...)
                local v47 = {
                    v0(l_v38_0, ...)
                };
                if not table.remove(v47, 1) then
                    v40(unpack(v47));
                    return ;
                else
                    v39(unpack(v47));
                    return ;
                end;
            end;
        end;
        if v36._status == v8.Status.Started then
            table.insert(v36._queuedResolve, l_v39_0);
            table.insert(v36._queuedReject, l_v40_0);
            return ;
        elseif v36._status == v8.Status.Resolved then
            l_v39_0(unpack(v36._value));
            return ;
        else
            if v36._status == v8.Status.Rejected then
                l_v40_0(unpack(v36._value));
            end;
            return ;
        end;
    end);
end;
v8.catch = function(v48, v49)
    return v48:andThen(nil, v49);
end;
v8.await = function(v50)
    if v50._status == v8.Status.Started then
        local v51 = nil;
        local l_BindableEvent_0 = Instance.new("BindableEvent");
        v50:andThen(function(...)
            v51 = {
                ...
            };
            l_BindableEvent_0:Fire(true);
        end, function(...)
            v51 = {
                ...
            };
            l_BindableEvent_0:Fire(false);
        end);
        local v53 = l_BindableEvent_0.Event:Wait();
        l_BindableEvent_0:Destroy();
        if not v53 then
            error(tostring(v51[1]), 2);
        end;
        return unpack(v51);
    elseif v50._status == v8.Status.Resolved then
        return unpack(v50._value);
    else
        if v50._status == v8.Status.Rejected then
            error(tostring(v50._value[1]), 2);
        end;
        return ;
    end;
end;
v8._resolve = function(v54, ...)
    if v54._status ~= v8.Status.Started then
        return ;
    elseif not v8.is((...)) then
        v54._status = v8.Status.Resolved;
        v54._value = {
            ...
        };
        for _, v56 in ipairs(v54._queuedResolve) do
            v56(...);
        end;
        return ;
    else
        if select("#", ...) > 1 then
        end;
        (...):andThen(function(...)
            v54:_resolve(...);
        end, function(...)
            v54:_reject(...);
        end);
        return ;
    end;
end;
v8._reject = function(v57, ...)
    if v57._status ~= v8.Status.Started then
        return ;
    else
        v57._status = v8.Status.Rejected;
        v57._value = {
            ...
        };
        if not (next(v57._queuedReject) == nil) then
            for _, v59 in ipairs(v57._queuedReject) do
                v59(...);
            end;
        end;
        return ;
    end;
end;
return v8;


return {
    PENDING = 0,
    UNKNOWN_ERROR = -1,
    NO_CONNECTIVITY = -2,
    INVALID_JSON = -3,
    BAD_TLS = -4,
    MODERATED = -5,
    OK = 200,
    BAD_REQUEST = 400,
    UNAUTHORIZED = 401,
    FORBIDDEN = 403,
    NOT_FOUND = 404,
    REQUEST_TIMEOUT = 408,
    INTERNAL_SERVER_ERROR = 500,
    NOT_IMPLEMENTED = 501,
    BAD_GATEWAY = 502,
    SERVICE_UNAVAILABLE = 503,
    GATEWAY_TIMEOUT = 504
};


local v0 = {};
local v1 = {};
v0.ShallowEqual = function(v2, v3, v4)
    if v2 and v3 then
        if v2 == v3 then
            return true;
        else
            if not v4 then
                v4 = v1;
            end;
            for v5, v6 in pairs(v2) do
                if not (not (v3[v5] ~= v6) or v4[v5]) then
                    return false;
                end;
            end;
            for v7, v8 in pairs(v3) do
                if not (not (v2[v7] ~= v8) or v4[v7]) then
                    return false;
                end;
            end;
            return true;
        end;
    else
        return false;
    end;
end;
v0.EqualKey = function(v9, v10, v11)
    if not ((not (not ((not v9 or not v10) or not v11) and v11 ~= "") or not v9[v11]) or not v10[v11]) and v9[v11] == v10[v11] then
        return true;
    else
        return false;
    end;
end;
v0.TableDifference = function(v12, v13)
    local v14 = {};
    for v15, v16 in pairs(v12) do
        if v13[v15] ~= v12[v15] then
            v14[v15] = v16;
        end;
    end;
    return v14;
end;
local function _(v17)
    local v18 = {};
    for v19 = 1, #v17 do
        v18[v17[v19]] = true;
    end;
    return v18;
end;
local _ = function(v21)
    local v22 = {};
    for v23, _ in pairs(v21) do
        table.insert(v22, v23);
    end;
    return v22;
end;
v0.ListDifference = function(v26, v27)
    local l_TableDifference_0 = v0.TableDifference;
    local v29 = {};
    for v30 = 1, #v26 do
        v29[v26[v30]] = true;
    end;
    local l_v29_0 = v29;
    local v32 = {};
    for v33 = 1, #v27 do
        v32[v27[v33]] = true;
    end;
    l_TableDifference_0 = l_TableDifference_0(l_v29_0, v32);
    l_v29_0 = {};
    for v34, _ in pairs(l_TableDifference_0) do
        table.insert(l_v29_0, v34);
    end;
    return l_v29_0;
end;
v0.CheckListConsistency = function(v36)
    local v37 = false;
    local v38 = false;
    local v39 = true;
    local v40 = 1;
    for v41, _ in pairs(v36) do
        if type(v41) == "string" then
            v38 = true;
        elseif type(v41) == "number" then
            if v40 ~= v41 then
                v39 = false;
            end;
            v37 = true;
        else
            return false;
        end;
        if not v38 or not v37 then
            v40 = v40 + 1;
        else
            return false;
        end;
    end;
    if not v37 then
        return true;
    else
        return v39;
    end;
end;
v0.RecursiveToString = function(v43, v44)
    v44 = v44 or "";
    if type(v43) == "table" then
        local v45 = "";
        if not v0.CheckListConsistency(v43) then
            v45 = v45 .. "-- WARNING: this table fails the list consistency test\n";
        end;
        v45 = v45 .. "{\n";
        for v46, v47 in pairs(v43) do
            if type(v46) == "string" then
                v45 = v45 .. "  " .. v44 .. tostring(v46) .. " = " .. v0.RecursiveToString(v47, "  " .. v44) .. ";\n";
            end;
            if type(v46) == "number" then
                v45 = v45 .. "  " .. v44 .. v0.RecursiveToString(v47, "  " .. v44) .. ",\n";
            end;
        end;
        return v45 .. v44 .. "}";
    else
        return (tostring(v43));
    end;
end;
return v0;


local l_ContentProvider_0 = game:GetService("ContentProvider");
local v6, v7, v8 = (function()
    local l_BaseUrl_0 = l_ContentProvider_0.BaseUrl;
    if l_BaseUrl_0:sub(#l_BaseUrl_0) ~= "/" then
        l_BaseUrl_0 = l_BaseUrl_0 .. "/";
    end;
    local _, v3 = l_BaseUrl_0:find("://");
    local v4, v5 = l_BaseUrl_0:find("%.", v3 + 1);
    return l_BaseUrl_0, l_BaseUrl_0:sub(v3 + 1, v4 - 1), (l_BaseUrl_0:sub(v5 + 1));
end)();
return {
    DOMAIN = v8,
    PREFIX = v7,
    BASE_URL = v6,
    API_URL = string.format("https://api.%s", v8),
    AUTH_URL = string.format("https://auth.%s", v8),
    GAME_URL = string.format("https://games.%s", v8),
    GAME_ASSET_URL = string.format("https://assetgame.%s", v8),
    CHAT_URL = string.format("https://chat.%sv2", v8),
    NOTIFICATION_URL = string.format("https://notifications.%s", v8),
    REALTIME_URL = string.format("https://realtime.%s", v8),
    WEB_URL = string.format("https://web.%s", v8),
    CATALOG_URL = string.format("https://catalog.%s", v8),
    DEVELOP_URL = string.format("https://develop.%s", v8),
    ITEM_CONFIGURATION_URL = string.format("https://itemconfiguration.%s", v8),
    PUBLISH_URL = string.format("https://publish.%s", v8),
    DATA_URL = string.format("https://data.%s", v8),
    GROUP_URL = string.format("https://groups.%s", v8),
    isVanitySite = function(v9)
        return v9.PREFIX ~= "www";
    end,
    makeQueryString = function(v10)
        local v11 = {};
        for v12, v13 in pairs(v10) do
            if v13 ~= nil then
                if type(v13) == "table" then
                    for v14 = 1, #v13 do
                        table.insert(v11, v12 .. "=" .. v13[v14]);
                    end;
                else
                    table.insert(v11, v12 .. "=" .. tostring(v13));
                end;
            end;
        end;
        return table.concat(v11, "&");
    end
};


return require(script.Parent.Parent.Parent.Src.Actions.Action)(script.Name, function(v0, v1)
    assert(v0 ~= nil, "AddChange setting key cannot be nil");
    assert(v1 ~= nil, "AddChange value cannot be nil. You probably meant Cryo.None");
    return {
        setting = v0,
        value = v1
    };
end);


return require(script.Parent.Parent.Parent.Src.Actions.Action)(script.Name, function(v0)
    assert(v0 ~= nil, "ClearChange setting key cannot be nil");
    return {
        setting = v0
    };
end);


return require(script.Parent.Parent.Parent.Src.Actions.Action)(script.Name, function(v0)
    assert(type(v0) == "table", string.format("assetData must be a table, received %s", (type(v0))));
    return {
        assetConfigData = v0
    };
end);


return require(script.Parent.Parent.Parent.Src.Actions.Action)(script.Name, function(v0)
    assert(type(v0) == "table", string.format("assetData arg must be a table, received %s", (tostring(v0))));
    return {
        assetGroupData = v0
    };
end);


return require(script.Parent.Parent.Parent.Src.Actions.Action)(script.Name, function(v0)
    assert(type(v0) == "string", string.format("assetName arg must be a string, received %s", (tostring(v0))));
    return {
        assetName = v0
    };
end);


return require(script.Parent.Parent.Parent.Src.Actions.Action)(script.Name, function(v0)
    assert(type(v0) == "string", string.format("screen arg must be a string, received %s", (tostring(v0))));
    return {
        currentScreen = v0
    };
end);


return require(script.Parent.Parent.Parent.Src.Actions.Action)(script.Name, function(v0)
    assert(type(v0) == "table", string.format("groupsArray arg must be a table, received %s", (tostring(v0))));
    return {
        groupsArray = v0
    };
end);


return require(script.Parent.Parent.Parent.Src.Actions.Action)(script.Name, function(v0)
    assert(type(v0) == "boolean", string.format("uploadSucceeded arg must be a boolean, received %s", (tostring(v0))));
    return {
        uploadSucceeded = v0
    };
end);


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.RoactRodux);
local l_ContextServices_0 = require(l_Parent_0.Packages.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_Components_0 = l_Parent_0.Src.Components;
local l_ConvertToPackageWindow_0 = l_Components_0.ConvertToPackageWindow;
local v8 = require(l_ConvertToPackageWindow_0.PreviewArea);
local v9 = require(l_ConvertToPackageWindow_0.PublishAsset);
local v10 = require(l_ConvertToPackageWindow_0.AssetConfigFooter);
local v11 = require(l_Components_0.MessageBox.MessageBox);
local v12 = require(l_Parent_0.Src.Actions.SetAssetName);
local v13 = require(l_Parent_0.Src.Util.Constants);
local v14 = require(l_Parent_0.Src.Util.getUserId);
local v15 = require(l_Parent_0.Src.Thunks.MakeChangeRequest);
local v16 = require(l_Parent_0.Src.Thunks.UploadConvertToPackageRequest);
local v17 = v2.PureComponent:extend("AssetConfig");
v17.init = function(v18, _)
    local _ = nil;
    v18.state = {
        assetId = nil,
        name = nil,
        description = nil,
        owner = if game.CreatorId == 0 then {
            creatorId = v14()
        } else {
            creatorId = game.CreatorId
        },
        genres = {
            "All"
        },
        allowCopy = false,
        copyOn = false,
        allowComment = true,
        commentOn = nil,
        status = nil,
        isShowChangeDiscardMessageBox = false,
        groupId = game.CreatorType == Enum.CreatorType.Group and game.CreatorId or nil
    };
    v18.tryPublish = function()
        local l_props_0 = v18.props;
        local l_state_0 = v18.state;
        l_props_0.sendConvertToPackageItem(0, l_state_0.name or l_props_0.assetName, l_state_0.description, Enum.Genre[(l_state_0.genres or {})[1]].Value + 1, l_state_0.copyOn, l_state_0.commentOn, l_state_0.groupId, l_props_0.instances, l_props_0.clonedInstances);
    end;
    v18.tryCancel = function(v23)
        if not (next(v18.props.changeTable or {}) ~= nil) then
            v18.props.onClose();
            return ;
        else
            local function v24()
                v18:setState({
                    isShowChangeDiscardMessageBox = true
                });
            end;
            if not v23 then
                spawn(v24);
                return ;
            else
                v18:setState({
                    isShowChangeDiscardMessageBox = true
                });
                return ;
            end;
        end;
    end;
    v18.tryCancelNoYield = function()
        v18.tryCancel(false);
    end;
    v18.tryCancelWithYield = function()
        v18.tryCancel(true);
    end;
    v18.onMessageBoxClosed = function()
        v18:setState({
            isShowChangeDiscardMessageBox = false
        });
    end;
    v18.closeAssetConfig = function()
        v18.props.pluginGui.Enabled = false;
    end;
    local function _(v25, v26)
        return not not v18.props.assetConfigData and v18.props.assetConfigData[v25] or v26;
    end;
    v18.onNameChange = function(v28)
        v18.props.makeChangeRequest("AssetConfigName", not not v18.props.assetConfigData and v18.props.assetConfigData.Name or "", v28);
        v18:setState({
            name = v28
        });
    end;
    v18.onDescChange = function(v29)
        v18.props.makeChangeRequest("AssetConfigDesc", not not v18.props.assetConfigData and v18.props.assetConfigData.Description or "", v29);
        v18:setState({
            description = v29
        });
    end;
    v18.onAccessChange = function(v30)
        local v31 = nil;
        if v30.creatorType == "Group" then
            v31 = v30.creatorId;
        end;
        v18:setState({
            owner = {
                creatorId = v30.creatorId
            },
            groupId = v31 or ""
        });
    end;
    v18.toggleComment = function(v32)
        v18:setState({
            commentOn = v32
        });
        v18.props.makeChangeRequest("AssetConfigComment", v18.props.assetConfigData.EnableComments or false, v32);
    end;
end;
v17.attachXButtonCallback = function(v33)
    if v33.props.pluginGui then
        v33.props.pluginGui:BindToClose(v33.tryCancelNoYield);
    end;
end;
v17.detachXButtonCallback = function(v34)
    if v34.props.pluginGui then
        v34.props.pluginGui:BindToClose(nil);
    end;
end;
v17.didUpdate = function(v35, _, _)
    v35:attachXButtonCallback();
end;
v17.didMount = function(v38)
    v38:attachXButtonCallback();
end;
v17.willUnmount = function(v39)
    v39:detachXButtonCallback();
end;
local function _(v40, v41)
    local v42 = false;
    if #v40 <= v13.NAME_CHARACTER_LIMIT then
        v42 = tostring(v40) ~= "";
    end;
    return v42 and #v41 <= v13.DESCRIPTION_CHARACTER_LIMIT;
end;
local function v47(v44, v45, v46)
    return {
        Name = "AssetConfigMessageBox",
        TextSize = v13.FONT_SIZE_MEDIUM,
        Font = v13.FONT,
        onClose = v45,
        Title = v44:getText("Action", "Discard"),
        Text = v44:getText("General", "DiscardMessage"),
        buttons = {
            {
                Text = v44:getText("Action", "Cancel"),
                Font = v13.FONT,
                TextSize = v13.FONT_SIZE_MEDIUM,
                action = "no",
                OnClick = v45
            },
            {
                Text = v44:getText("Action", "Discard"),
                Font = v13.FONT,
                TextSize = v13.FONT_SIZE_MEDIUM,
                OnClick = v46
            }
        }
    };
end;
v17.render = function(v48)
    local l_props_1 = v48.props;
    local l_Localization_0 = l_props_1.Localization;
    local l_Stylizer_0 = l_props_1.Stylizer;
    local l_state_1 = v48.state;
    local l_Size_0 = l_props_1.Size;
    local l_assetId_0 = l_props_1.assetId;
    local v55 = (l_state_1.name or l_props_1.assetName) or "";
    local v56 = l_state_1.description or "";
    local l_owner_0 = l_state_1.owner;
    local l_allowComment_0 = l_state_1.allowComment;
    local l_commentOn_0 = l_state_1.commentOn;
    local l_isShowChangeDiscardMessageBox_0 = l_state_1.isShowChangeDiscardMessageBox;
    local l_createElement_0 = v2.createElement;
    local v62 = "Frame";
    local v63 = {
        Size = l_Size_0,
        BackgroundTransparency = 0,
        BackgroundColor3 = l_Stylizer_0.assetConfig.backgroundColor,
        BorderSizePixel = 0
    };
    local v64 = {
        UIListLayout = v2.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Vertical,
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            VerticalAlignment = Enum.VerticalAlignment.Bottom,
            SortOrder = Enum.SortOrder.LayoutOrder,
            Padding = UDim.new(0, 0)
        }),
        AssetConfigMessageBox = l_isShowChangeDiscardMessageBox_0 and v2.createElement(v11, (v47(l_Localization_0, v48.onMessageBoxClosed, v48.closeAssetConfig))),
        MainPage = v2.createElement("Frame", {
            Size = UDim2.new(1, 0, 1, -65),
            BackgroundTransparency = 1,
            LayoutOrder = 1
        }, {
            UIListLayout = v2.createElement("UIListLayout", {
                FillDirection = Enum.FillDirection.Horizontal,
                HorizontalAlignment = Enum.HorizontalAlignment.Left,
                VerticalAlignment = Enum.VerticalAlignment.Top,
                SortOrder = Enum.SortOrder.LayoutOrder,
                Padding = UDim.new(0, 0)
            }),
            Preview = v2.createElement(v8, {
                TotalWidth = 240,
                LayoutOrder = 1
            }),
            VerticalLine = v2.createElement("Frame", {
                Size = UDim2.new(0, 2, 1, 0),
                BackgroundTransparency = 0,
                BackgroundColor3 = l_Stylizer_0.divider.verticalLineColor,
                BorderSizePixel = 0,
                LayoutOrder = 2
            }),
            PublishAsset = v2.createElement(v9, {
                Size = UDim2.new(1, -240, 1, 0),
                assetId = l_assetId_0,
                name = v55,
                description = v56,
                owner = l_owner_0,
                allowComment = l_allowComment_0,
                commentOn = l_commentOn_0,
                onNameChange = v48.onNameChange,
                onDescChange = v48.onDescChange,
                onOwnerSelected = v48.onAccessChange,
                toggleComment = v48.toggleComment,
                LayoutOrder = 3
            })
        })
    };
    local l_createElement_1 = v2.createElement;
    local l_v10_0 = v10;
    local v67 = {
        Size = UDim2.new(1, 0, 0, 65)
    };
    local v68 = false;
    if #v55 <= v13.NAME_CHARACTER_LIMIT then
        v68 = tostring(v55) ~= "";
    end;
    v67.CanSave = v68 and #v56 <= v13.DESCRIPTION_CHARACTER_LIMIT;
    v67.tryCancel = v48.tryCancelWithYield;
    v67.tryPublish = v48.tryPublish;
    v67.LayoutOrder = 2;
    v64.Footer = l_createElement_1(l_v10_0, v67);
    return l_createElement_0(v62, v63, v64);
end;
return v3.connect(function(v69, _)
    v69 = v69 or {};
    return {
        assetConfigData = v69.AssetConfigReducer.assetConfigData or {},
        currentScreen = v69.AssetConfigReducer.currentScreen,
        changeTable = v69.AssetConfigReducer.changed,
        networkError = v69.NetworkReducer.networkError,
        networkErrorAction = v69.NetworkReducer.networkErrorAction,
        instances = v69.AssetConfigReducer.instances,
        clonedInstances = v69.AssetConfigReducer.clonedInstances
    };
end, function(v71)
    return {
        makeChangeRequest = function(v72, v73, v74)
            v71(v15(v72, v73, v74));
        end,
        sendConvertToPackageItem = function(v75, v76, v77, v78, v79, v80, v81, v82, v83)
            v71(v12(v76));
            v71(v16(v75, v76, v77, v78, v79, v80, v81, v82, v83));
        end
    };
end)((l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer
})(v17)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local v1 = require(l_Parent_0.Packages.Roact);
local v2 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v2.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_StyleModifier_0 = v2.Util.StyleModifier;
local l_Button_0 = v2.UI.Button;
local v7 = v1.PureComponent:extend("AssetConfigFooter");
v7.render = function(v8)
    local l_props_0 = v8.props;
    local l_Localization_0 = l_props_0.Localization;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_Size_0 = l_props_0.Size;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_tryPublish_0 = l_props_0.tryPublish;
    local l_tryCancel_0 = l_props_0.tryCancel;
    local l_footer_0 = l_Stylizer_0.footer;
    return v1.createElement("Frame", {
        Size = l_Size_0,
        BackgroundTransparency = 0,
        BackgroundColor3 = l_footer_0.backgroundColor,
        BorderSizePixel = 1,
        BorderColor3 = l_footer_0.borderColor,
        LayoutOrder = l_LayoutOrder_0
    }, {
        UIPadding = v1.createElement("UIPadding", {
            PaddingBottom = UDim.new(0, 0),
            PaddingLeft = UDim.new(0, 35),
            PaddingRight = UDim.new(0, 35),
            PaddingTop = UDim.new(0, 0)
        }),
        UIListLayout = v1.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Horizontal,
            HorizontalAlignment = Enum.HorizontalAlignment.Right,
            VerticalAlignment = Enum.VerticalAlignment.Center,
            SortOrder = Enum.SortOrder.LayoutOrder,
            Padding = UDim.new(0, 24)
        }),
        CancelButton = v1.createElement(l_Button_0, {
            LayoutOrder = 2,
            OnClick = l_tryCancel_0,
            Size = UDim2.new(0, 120, 0, 35),
            Style = "Round",
            Text = l_Localization_0:getText("Action", "Cancel")
        }),
        PublishButton = v1.createElement(l_Button_0, {
            LayoutOrder = 3,
            OnClick = l_tryPublish_0,
            Size = UDim2.new(0, 120, 0, 35),
            Style = "RoundPrimary",
            StyleModifier = if l_props_0.CanSave then nil else l_StyleModifier_0.Disabled,
            Text = l_Localization_0:getText("Action", "Submit")
        })
    });
end;
return (l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer
})(v7));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local l_Util_0 = l_Parent_0.Src.Util;
require(l_Parent_0.Bin.defineLuaFlags);
local v3 = require(l_Packages_0.Framework);
local v4 = require(l_Packages_0.Roact);
local v5 = require(l_Packages_0.RoactRodux);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v8 = require(l_Util_0.Constants);
local l_Pane_0 = v3.UI.Pane;
local function v13(v10)
    for _, v12 in pairs(v10:GetDescendants()) do
        if v12:IsA("LuaSourceContainer") then
            v12:Destroy();
        end;
    end;
end;
local function v17(v14)
    for _, v16 in pairs(v14:GetDescendants()) do
        if v16:IsA("Sound") then
            v16.Playing = false;
        end;
    end;
end;
local function v21(v18)
    if not v18:IsA("PVInstance") then
        for _, v20 in pairs(v18:GetDescendants()) do
            if not (not v20:IsA("PVInstance") or v20:FindFirstAncestorWhichIsA("LuaSourceContainer")) then
                return true;
            end;
        end;
        return false;
    else
        return true;
    end;
end;
local v22 = v4.PureComponent:extend("AssetThumbnailPreview");
v22.init = function(v23, _)
    v23.viewportRef = v4.createRef();
end;
v22.didMount = function(v25)
    if not (not v25.props.instances or not v21(v25.props.instances[1])) then
        local l_current_0 = v25.viewportRef.current;
        l_current_0:ClearAllChildren();
        local l_Camera_0 = Instance.new("Camera");
        l_Camera_0.Name = "Camera";
        l_Camera_0.Parent = l_current_0;
        l_current_0.CurrentCamera = l_Camera_0;
        local l_Model_0 = Instance.new("Model");
        l_Model_0.Parent = l_current_0;
        for _, v30 in pairs(v25.props.instances) do
            if not v30:IsA("LuaSourceContainer") then
                pcall(function()
                    local v31 = v30:Clone();
                    v13(v31);
                    if game:GetFastFlag("ConvertToPackageMuteSounds") then
                        v17(v31);
                    end;
                    v31.Parent = l_Model_0;
                end);
            end;
        end;
        local l_l_Model_0_ModelCFrame_0 = l_Model_0:GetModelCFrame();
        l_Camera_0:SetImageServerView(l_l_Model_0_ModelCFrame_0);
        l_Camera_0.CFrame = ((l_Camera_0.CFrame - l_Camera_0.CFrame.p) + l_l_Model_0_ModelCFrame_0.p) + (l_Camera_0.CFrame.p - l_l_Model_0_ModelCFrame_0.p).unit * ((l_Model_0:GetExtentsSize().magnitude / 2) / math.tan(math.rad(l_Camera_0.FieldOfView) / 2));
    end;
end;
v22.getName = function(v33)
    if v33.props.instances and #v33.props.instances > 0 then
        return v33.props.instances[1].Name;
    else
        return "";
    end;
end;
v22.render = function(v34)
    local l_props_0 = v34.props;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local v37 = l_props_0.title or v34:getName();
    local v38 = true;
    if l_props_0.ShowTitle ~= nil then
        v38 = l_props_0.showTitle;
    end;
    local v39 = l_props_0.Position or UDim2.new(1, 0, 1, 0);
    local v40 = l_props_0.titleHeight or 24;
    local v41 = l_props_0.titlePadding or 12;
    local v42 = l_props_0.LayoutOrder or 1;
    local v43 = v34.props.instances and not v21(v34.props.instances[1]);
    return v4.createElement("Frame", {
        Name = "AssetThumbnailPreview",
        BackgroundTransparency = 1,
        Size = l_props_0.Size,
        Position = v39,
        LayoutOrder = v42
    }, {
        PreviewFrame = v4.createElement(l_Pane_0, {
            Style = "BorderBox",
            Size = if not v38 then nil else UDim2.new(1, 0, 1, -(v40 + v41))
        }, {
            Viewport = not v43 and v4.createElement("ViewportFrame", {
                [v4.Ref] = v34.viewportRef,
                Size = UDim2.new(1, 0, 1, 0),
                BackgroundColor3 = l_Stylizer_0.thumbnailPreview.background,
                BackgroundTransparency = 1
            }),
            PreviewPlaceholder = v43 and v4.createElement("ImageLabel", {
                Size = UDim2.new(1, 0, 1, 0),
                BackgroundTransparency = 0,
                Image = v8.Images.IMAGE_PLACEHOLDER,
                BackgroundColor3 = l_Stylizer_0.thumbnailPreview.background,
                ImageColor3 = l_Stylizer_0.thumbnailPreview.placeholderColor
            })
        }),
        Title = v38 and v4.createElement("TextLabel", {
            Text = v37,
            Font = v8.FONT,
            TextSize = v8.FONT_SIZE_MEDIUM,
            TextColor3 = l_Stylizer_0.thumbnailPreview.text,
            Position = UDim2.new(0, 0, 1, -v40),
            Size = UDim2.new(1, 0, 0, v40),
            BackgroundTransparency = 1
        })
    });
end;
return v5.connect(function(v44, _)
    return {
        instances = (v44 or {}).AssetConfigReducer.instances
    };
end)((l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v22)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.RoactRodux);
local l_ContextServices_0 = require(l_Parent_0.Packages.Framework).ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v6 = require(l_Parent_0.Src.Util.Constants);
local v7 = require(l_Parent_0.Src.Actions.SetCurrentScreen);
local l_Components_0 = l_Parent_0.Src.Components;
local v9 = require(l_Components_0.ConvertToPackageWindow.LoadingBar);
local v10 = require(l_Components_0.ConvertToPackageWindow.AssetThumbnailPreview);
local v11 = v2.PureComponent:extend("AssetUpload");
v11.init = function(v12, _)
    v12.state = {
        isLoading = true
    };
end;
v11.render = function(v14)
    local l_props_0 = v14.props;
    return v2.createElement("Frame", {
        BackgroundColor3 = l_props_0.Stylizer.typeValidation.background,
        BackgroundTransparency = 0,
        BorderSizePixel = 0,
        Size = l_props_0.Size
    }, {
        ModelPreview = v2.createElement(v10, {
            titleHeight = 24,
            titlePadding = 12,
            title = l_props_0.assetName,
            Position = UDim2.new(0.5, -75, 0, 48),
            Size = UDim2.new(0, 150, 0, 186)
        }),
        LoadingBar = v2.createElement(v9, {
            loadingText = l_props_0.Localization:getText("Action", "Converting"),
            loadingTime = 0.5,
            holdPercent = 0.92,
            Size = UDim2.new(0, 400, 0, 6),
            Position = UDim2.new(0.5, -200, 0, 314),
            onFinish = l_props_0.uploadSucceeded ~= nil and l_props_0.onNext or nil
        })
    });
end;
return v3.connect(function(v16, _)
    v16 = v16 or {};
    return {
        uploadSucceeded = v16.AssetConfigReducer.uploadSucceeded,
        assetId = v16.AssetConfigReducer.assetId,
        assetName = v16.AssetConfigReducer.assetName
    };
end, function(v18)
    return {
        onNext = function()
            v18(v7(v6.SCREENS.UPLOAD_ASSET_RESULT));
        end
    };
end)((l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Stylizer = l_ContextServices_0.Stylizer
})(v11)));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.RoactRodux);
local v4 = require(l_Parent_0.Packages.Framework);
local l_ContextServices_0 = v4.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v7 = require(l_Parent_0.Src.Util.Constants);
local l_SelectInput_0 = v4.UI.SelectInput;
local l_map_0 = v4.Dash.map;
local v10 = require(l_Parent_0.Src.Thunks.GetMyGroupsRequest);
local v11 = require(l_Parent_0.Src.ContextServices.NetworkContext);
local v12 = v2.PureComponent:extend("ConfigAccess");
local v13 = game:DefineFastFlag("FixConvertToPackageAssert", false);
v12.didMount = function(v14)
    v14.props.getMyGroups(v14.props.Network:get());
end;
v12.init = function(v15)
    v15.createContentForSelectInput = function(v16)
        return {
            creatorId = v16.creatorId,
            creatorType = v16.creatorType,
            Id = v16.name,
            item = v16,
            Key = v16.Key,
            Label = v16.name,
            name = v16.name,
            Text = v16.Text
        };
    end;
end;
v12.render = function(v17)
    local l_props_0 = v17.props;
    local l_Localization_0 = l_props_0.Localization;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_Title_0 = l_props_0.Title;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_TotalHeight_0 = l_props_0.TotalHeight;
    local v24 = l_props_0.owner or {};
    local l_onDropDownSelect_0 = l_props_0.onDropDownSelect;
    v17.dropdownContent = v7.getOwnerDropDownContent(l_props_0.groupsArray, l_Localization_0);
    local v26 = nil;
    for v27, v28 in pairs(v17.dropdownContent) do
        if v28.creatorId == v24.creatorId then
            v26 = v27;
        end;
    end;
    if not (not v13 or v26) then
        v26 = 1;
    end;
    assert(v26);
    local l_publishAsset_0 = l_Stylizer_0.publishAsset;
    local _ = nil;
    return v2.createElement("Frame", {
        Size = UDim2.new(1, 0, 0, l_TotalHeight_0),
        BackgroundTransparency = 1,
        BackgroundColor3 = Color3.fromRGB(227, 227, 227),
        BorderSizePixel = 0,
        LayoutOrder = l_LayoutOrder_0
    }, {
        UIListLayout = v2.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Horizontal,
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            VerticalAlignment = Enum.VerticalAlignment.Top,
            SortOrder = Enum.SortOrder.LayoutOrder,
            Padding = UDim.new(0, 0)
        }),
        Title = v2.createElement("TextLabel", {
            Size = UDim2.new(0, v7.TITLE_GUTTER_WIDTH, 1, 0),
            BackgroundTransparency = 1,
            BorderSizePixel = 0,
            Text = l_Title_0,
            TextXAlignment = Enum.TextXAlignment.Left,
            TextYAlignment = Enum.TextYAlignment.Top,
            TextSize = v7.FONT_SIZE_TITLE,
            TextColor3 = l_publishAsset_0.titleTextColor,
            Font = v7.FONT,
            LayoutOrder = 1
        }),
        DropdownMenu = v2.createElement(l_SelectInput_0, {
            Items = l_map_0(v17.dropdownContent, v17.createContentForSelectInput),
            LayoutOrder = 2,
            OnItemActivated = l_onDropDownSelect_0,
            PlaceholderText = (not (#v17.dropdownContent >= v26) or game.CreatorType == Enum.CreatorType.Group and #v17.dropdownContent == 1) and "" or v17.dropdownContent[v26].Text,
            SelectedIndex = v17.dropdownContent[v26].Key,
            Size = UDim2.new(0, 220, 0, 38),
            Width = 220
        })
    });
end;
return v3.connect(function(v31, _)
    return {
        groupsArray = (v31 or {}).GroupReducer.groupsArray or {}
    };
end, function(v33)
    return {
        getMyGroups = function(v34)
            v33(v10(v34));
        end
    };
end)((l_withContext_0({
    Localization = l_ContextServices_0.Localization,
    Network = v11,
    Stylizer = l_ContextServices_0.Stylizer
})(v12)));


local _ = script.Parent.Parent.Parent.Parent;
local l_Parent_1 = script.Parent.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_1.Packages;
local v3 = require(l_Packages_0.Framework);
local v4 = require(l_Packages_0.Roact);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local v7 = require(l_Parent_1.Src.Util.Constants);
local l_ToggleButton_0 = v3.UI.ToggleButton;
local v9 = v4.PureComponent:extend("ConfigComment");
v9.render = function(v10)
    local l_props_0 = v10.props;
    return v4.createElement("Frame", {
        Size = UDim2.new(1, 0, 0, l_props_0.TotalHeight),
        BackgroundTransparency = 1,
        BorderSizePixel = 0,
        LayoutOrder = l_props_0.LayoutOrder
    }, {
        UIListLayout = v4.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Horizontal,
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            VerticalAlignment = Enum.VerticalAlignment.Top,
            SortOrder = Enum.SortOrder.LayoutOrder,
            Padding = UDim.new(0, 0)
        }),
        Title = v4.createElement("TextLabel", {
            Size = UDim2.new(0, v7.TITLE_GUTTER_WIDTH, 1, 0),
            BackgroundTransparency = 1,
            BorderSizePixel = 0,
            Text = l_props_0.Title,
            TextXAlignment = Enum.TextXAlignment.Left,
            TextYAlignment = Enum.TextYAlignment.Top,
            TextSize = v7.FONT_SIZE_TITLE,
            TextColor3 = l_props_0.Stylizer.publishAsset.titleTextColor,
            Font = v7.FONT,
            LayoutOrder = 1
        }),
        ToggleButton = v4.createElement(l_ToggleButton_0, {
            Disabled = not l_props_0.CommentEnabled,
            LayoutOrder = 2,
            OnClick = l_props_0.ToggleCallback,
            Selected = l_props_0.CommentOn
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v9));


local l_Parent_0 = script.Parent.Parent.Parent.Parent;
local l_Packages_0 = l_Parent_0.Packages;
local v2 = require(l_Packages_0.Roact);
local v3 = require(l_Packages_0.Framework);
local l_ContextServices_0 = v3.ContextServices;
local l_withContext_0 = l_ContextServices_0.withContext;
local l_TextInput_0 = v3.UI.TextInput;
local v7 = require(l_Parent_0.Src.Util.Constants);
local v8 = v2.PureComponent:extend("ConfigTextField");
v8.init = function(v9, _)
    v9.state = {};
    v9.onTextChanged = function(v11)
        v9:setState({
            currentContent = v11
        });
        v9.props.TextChangeCallBack(v11);
    end;
end;
v8.render = function(v12)
    local l_props_0 = v12.props;
    local l_state_0 = v12.state;
    local l_Stylizer_0 = l_props_0.Stylizer;
    local l_Title_0 = l_props_0.Title;
    local l_TotalHeight_0 = l_props_0.TotalHeight;
    local l_LayoutOrder_0 = l_props_0.LayoutOrder;
    local l_MaxCount_0 = l_props_0.MaxCount;
    return v2.createElement("Frame", {
        Size = UDim2.new(1, 0, 0, l_TotalHeight_0),
        BackgroundTransparency = 1,
        BorderSizePixel = 0,
        LayoutOrder = l_LayoutOrder_0
    }, {
        UIListLayout = v2.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Horizontal,
            HorizontalAlignment = Enum.HorizontalAlignment.Left,
            VerticalAlignment = Enum.VerticalAlignment.Top,
            SortOrder = Enum.SortOrder.LayoutOrder,
            Padding = UDim.new(0, 0)
        }),
        Title = v2.createElement("TextLabel", {
            Size = UDim2.new(0, v7.TITLE_GUTTER_WIDTH, 1, 0),
            BackgroundTransparency = 1,
            BorderSizePixel = 0,
            Text = l_Title_0,
            TextXAlignment = Enum.TextXAlignment.Left,
            TextYAlignment = Enum.TextYAlignment.Top,
            TextSize = v7.FONT_SIZE_TITLE,
            TextColor3 = l_Stylizer_0.publishAsset.titleTextColor,
            Font = v7.FONT,
            LayoutOrder = 1
        }),
        TextField = v2.createElement(l_TextInput_0, {
            LayoutOrder = 2,
            MaxLength = l_MaxCount_0,
            MultiLine = l_MaxCount_0 > 50,
            OnTextChanged = v12.onTextChanged,
            Text = l_state_0.currentContent or (l_props_0.TextContent or ""),
            Size = UDim2.new(1, -v7.TITLE_GUTTER_WIDTH, 0, (l_TotalHeight_0 - 40) - 20)
        })
    });
end;
return (l_withContext_0({
    Stylizer = l_ContextServices_0.Stylizer
})(v8));