local l_VRService_0 = game:GetService("VRService");
local l_Players_0 = game:GetService("Players");
local l_RunService_0 = game:GetService("RunService");
local l_RobloxReplicatedStorage_0 = game:GetService("RobloxReplicatedStorage");
local l_RobloxGui_0 = game:GetService("CoreGui"):WaitForChild("RobloxGui");
local l_RbxAnalyticsService_0 = game:GetService("RbxAnalyticsService");
local v6 = require(l_RobloxGui_0.Modules.Common.ConnectionUtil);
local v7 = require(l_RobloxGui_0.Modules.Common.AvatarUtil);
local v8 = game:DefineFastFlag("DebugImmersionModeNonVR", false);
local v9 = game:DefineFastFlag("UpdateAvatarGestures", false);
local v10 = game:DefineFastFlag("AvatarGesturesTelemetry", false);
local v11 = game:DefineFastInt("VRAvatarGesturesAnalyticsThrottleHundrethsPercent", 0);
local v12 = nil;
local l_status_0, l_result_0 = pcall(function()
    return UserSettings():IsUserFeatureEnabled("UserFixVRAvatarGesturesSeats");
end);
v12 = l_status_0 and l_result_0;
l_status_0 = {};
l_status_0.__index = l_status_0;
l_status_0.new = function()
    local v15 = setmetatable({}, l_status_0);
    v15.partCFrameMap = {};
    v15.connections = v6.new();
    v15.analyticsSendEnabled = true;
    v15.connections:connect("AvatarGestures", l_VRService_0:GetPropertyChangedSignal("AvatarGestures"), function()
        v15:onAvatarGesturesChanged();
    end);
    if l_VRService_0.AvatarGestures then
        v15:onAvatarGesturesChanged();
    end;
    return v15;
end;
l_status_0.onCharacterChanged = function(v16, v17)
    local l_Humanoid_0 = v17:FindFirstChild("Humanoid");
    if l_Humanoid_0 then
        local v19 = nil;
        v19 = if not v9 then {
            "VRIKLeftHand",
            "VRIKRightHand",
            "VRIKHead"
        } else {
            "TrackedIKLeftHand",
            "TrackedIKRightHand",
            "TrackedIKHead"
        };
        for _, v21 in pairs(v19) do
            local l_l_Humanoid_0_FirstChild_0 = l_Humanoid_0:FindFirstChild(v21);
            if l_l_Humanoid_0_FirstChild_0 then
                l_l_Humanoid_0_FirstChild_0.SmoothTime = 0;
            end;
        end;
        if v12 then
            local l_CurrentCamera_0 = workspace.CurrentCamera;
            if l_CurrentCamera_0 then
                local function v28(v24)
                    local v25 = l_CurrentCamera_0.CameraSubject and l_CurrentCamera_0.CameraSubject:IsA("VehicleSeat");
                    local v26 = (l_CurrentCamera_0.CFrame.Position - l_CurrentCamera_0.Focus.Position).Magnitude <= 5;
                    local l_TrackedIKHead_0 = l_Humanoid_0:FindFirstChild("TrackedIKHead");
                    if l_TrackedIKHead_0 then
                        if (not v24 or v25) or not v26 then
                            l_TrackedIKHead_0.Type = Enum.IKControlType.Rotation;
                        else
                            l_TrackedIKHead_0.Type = Enum.IKControlType.Transform;
                            return ;
                        end;
                    end;
                end;
                v28(l_Humanoid_0.Sit);
                v16.connections:connect("Seated", l_Humanoid_0.Seated, function(v29)
                    v28(v29);
                    if v29 and (l_CurrentCamera_0.CFrame.Position - l_CurrentCamera_0.Focus.Position).Magnitude <= 5 then
                        l_VRService_0:RecenterUserHeadCFrame();
                    end;
                end);
            else
                return ;
            end;
        end;
        return ;
    else
        return ;
    end;
end;
l_status_0.onAvatarGesturesChanged = function(v30)
    if not l_VRService_0.AvatarGestures then
        if not (not v9 or not l_VRService_0.VREnabled and not v8) then
            local l_AvatarGesturesVRPlayer_0 = l_RobloxReplicatedStorage_0:FindFirstChild("AvatarGesturesVRPlayer");
            if l_AvatarGesturesVRPlayer_0 then
                l_AvatarGesturesVRPlayer_0:FireServer(false);
            end;
        end;
        v30.connections:disconnectAll();
        v30.connections:connect("AvatarGestures", l_VRService_0:GetPropertyChangedSignal("AvatarGestures"), function()
            v30:onAvatarGesturesChanged();
        end);
    else
        if not v9 then
            v30:connectInputCFrames();
        end;
        if not (not l_VRService_0.VREnabled and not v8) then
            if v9 then
                local v32 = l_RobloxReplicatedStorage_0:WaitForChild("AvatarGesturesVRPlayer", 5);
                if v32 then
                    v32:FireServer(true);
                    v30:connectInputCFrames();
                else
                    warn("VRService.AvatarGestures failed to connect to server");
                    return ;
                end;
            end;
            if v30.avatarUtil then
                if not (not l_Players_0.LocalPlayer or not l_Players_0.LocalPlayer.Character) then
                    v30:onCharacterChanged(l_Players_0.LocalPlayer.Character);
                end;
            else
                v30.avatarUtil = v7.new();
                v30.avatarUtil:connectLocalCharacterChanges(function(v33)
                    v30:onCharacterChanged(v33);
                end);
            end;
            if not (not v10 or not v30.analyticsSendEnabled) then
                v30.analyticsSendEnabled = nil;
                l_RbxAnalyticsService_0:ReportInfluxSeries("VRAvatarGestures", {
                    placeId = game.PlaceId,
                    calledFrom = "ClientJoined"
                }, v11);
                return ;
            end;
        end;
    end;
end;
l_status_0.updateCFrames = function(_, v35, v36)
    local l_LocalPlayer_0 = l_Players_0.LocalPlayer;
    if l_Players_0.LocalPlayer then
        local l_Character_0 = l_LocalPlayer_0.Character;
        if l_LocalPlayer_0.Character then
            local l_l_Character_0_FirstChild_0 = l_Character_0:FindFirstChild(v35);
            if l_l_Character_0_FirstChild_0 then
                local l_CurrentCamera_1 = workspace.CurrentCamera;
                if l_CurrentCamera_1 then
                    if l_l_Character_0_FirstChild_0:FindFirstChild(v35 .. "Attachment") then
                        local l_l_l_Character_0_FirstChild_0_FirstChild_0 = l_l_Character_0_FirstChild_0:FindFirstChild(v35 .. "AlignPosition");
                        if l_l_l_Character_0_FirstChild_0_FirstChild_0 then
                            local l_l_l_Character_0_FirstChild_0_FirstChild_1 = l_l_Character_0_FirstChild_0:FindFirstChild(v35 .. "AlignOrientation");
                            if l_l_l_Character_0_FirstChild_0_FirstChild_1 then
                                if not l_VRService_0.VREnabled then
                                    local l_HumanoidRootPart_0 = l_Character_0:FindFirstChild("HumanoidRootPart");
                                    local v44 = nil;
                                    local _ = false;
                                    v44 = if not if not v9 then v35 ~= "VRGesturesHead" else v35 ~= "TrackedHead" then l_HumanoidRootPart_0.CFrame * v36 else ((l_HumanoidRootPart_0.CFrame * v36) * CFrame.Angles(0, 0, (math.rad(time() * 30)))) * CFrame.new(1, 0, -0.5);
                                    if l_HumanoidRootPart_0 then
                                        l_l_l_Character_0_FirstChild_0_FirstChild_0.Position = v44.Position;
                                        l_l_l_Character_0_FirstChild_0_FirstChild_1.CFrame = v44;
                                    end;
                                else
                                    v36 = v36.Rotation + v36.Position * l_CurrentCamera_1.HeadScale;
                                    local v46 = l_CurrentCamera_1.CFrame * v36;
                                    local l_Head_0 = l_Character_0:FindFirstChild("Head");
                                    if not ((l_CurrentCamera_1.CFrame.Position - l_CurrentCamera_1.Focus.Position).Magnitude > 5) or not l_Head_0 then
                                        l_l_l_Character_0_FirstChild_0_FirstChild_0.Position = v46.Position;
                                        local _ = false;
                                        if not if not v9 then v35 ~= "VRGesturesHead" else v35 ~= "TrackedHead" then
                                            l_l_l_Character_0_FirstChild_0_FirstChild_1.CFrame = v46;
                                        else
                                            l_l_l_Character_0_FirstChild_0_FirstChild_1.CFrame = v46 * CFrame.Angles(1.5707963267948966, 0, 0);
                                        end;
                                    else
                                        local l_l_VRService_0_UserCFrame_0 = l_VRService_0:GetUserCFrame(Enum.UserCFrame.Head);
                                        local v50 = (l_CurrentCamera_1.CFrame * (l_l_VRService_0_UserCFrame_0.Rotation + l_l_VRService_0_UserCFrame_0.Position * l_CurrentCamera_1.HeadScale)) * CFrame.new(0, 0, 0.5);
                                        local _ = false;
                                        if not if not v9 then v35 ~= "VRGesturesHead" else v35 ~= "TrackedHead" then
                                            local l_CFrame_0 = l_Character_0.PrimaryPart.CFrame;
                                            l_l_l_Character_0_FirstChild_0_FirstChild_0.Position = (l_CFrame_0 * CFrame.new(0, l_CFrame_0.Position.Y * 0.25, -l_CFrame_0.Position.Y * 0.125)).Position;
                                            l_l_l_Character_0_FirstChild_0_FirstChild_1.CFrame = l_CFrame_0 * v36;
                                        else
                                            local v53 = l_Head_0.CFrame:ToWorldSpace(v50:ToObjectSpace(v46));
                                            l_l_l_Character_0_FirstChild_0_FirstChild_0.Position = v53.Position;
                                            l_l_l_Character_0_FirstChild_0_FirstChild_1.CFrame = v53 * CFrame.Angles(1.5707963267948966, 0, 0);
                                        end;
                                    end;
                                end;
                                l_l_Character_0_FirstChild_0.CFrame = CFrame.new(l_l_l_Character_0_FirstChild_0_FirstChild_0.Position) * l_l_l_Character_0_FirstChild_0_FirstChild_1.CFrame.Rotation;
                                return ;
                            else
                                return ;
                            end;
                        else
                            return ;
                        end;
                    else
                        return ;
                    end;
                else
                    return ;
                end;
            else
                return ;
            end;
        else
            return ;
        end;
    else
        return ;
    end;
end;
l_status_0.steppedCframes = function(v54)
    for v55, v56 in pairs(v54.partCFrameMap) do
        v54:updateCFrames(v55, v56);
    end;
end;
l_status_0.connectInputCFrames = function(v57)
    if not v9 then
        if not l_VRService_0.VREnabled then
            if v8 then
                v57.connections:connect("NonVRSimulateInput", l_RunService_0.RenderStepped, function(_)
                    v57.partCFrameMap.VRGesturesLeftHand = CFrame.new(-0.5, 0, -0.5);
                    v57.partCFrameMap.VRGesturesRightHand = CFrame.new(0.5, 0, -0.5);
                    v57.partCFrameMap.VRGesturesHead = CFrame.new(0, 1, 0);
                end);
            end;
        else
            v57.connections:connect("UserCFrameChanged", l_VRService_0.UserCFrameChanged, function(v59, v60)
                if v59 == Enum.UserCFrame.LeftHand then
                    v57.partCFrameMap.VRGesturesLeftHand = v60;
                    return ;
                elseif v59 == Enum.UserCFrame.RightHand then
                    v57.partCFrameMap.VRGesturesRightHand = v60;
                    return ;
                else
                    if v59 == Enum.UserCFrame.Head then
                        v57.partCFrameMap.VRGesturesHead = v60;
                    end;
                    return ;
                end;
            end);
        end;
    elseif not l_VRService_0.VREnabled then
        if v8 then
            v57.connections:connect("NonVRSimulateInput", l_RunService_0.RenderStepped, function(_)
                v57.partCFrameMap.TrackedLeftHand = CFrame.new(-0.5, 0, -0.5);
                v57.partCFrameMap.TrackedRightHand = CFrame.new(0.5, 0, -0.5);
                v57.partCFrameMap.TrackedHead = CFrame.new(0, 1, 0);
            end);
        end;
    else
        v57.connections:connect("UserCFrameChanged", l_VRService_0.UserCFrameChanged, function(v62, v63)
            if v62 == Enum.UserCFrame.LeftHand then
                v57.partCFrameMap.TrackedLeftHand = v63;
                return ;
            elseif v62 == Enum.UserCFrame.RightHand then
                v57.partCFrameMap.TrackedRightHand = v63;
                return ;
            else
                if v62 == Enum.UserCFrame.Head then
                    v57.partCFrameMap.TrackedHead = v63;
                end;
                return ;
            end;
        end);
    end;
    if not (not l_VRService_0.VREnabled and not v8) then
        v57.connections:connect("RenderStepped", l_RunService_0.RenderStepped, function(_)
            v57:steppedCframes();
        end);
    end;
end;
return l_status_0.new();


local l_RobloxGui_0 = game:GetService("CoreGui"):WaitForChild("RobloxGui");
local l_VRService_0 = game:GetService("VRService");
local l_UserGameSettings_0 = UserSettings():GetService("UserGameSettings");
local l_Players_0 = game:GetService("Players");
local v4 = require(l_RobloxGui_0.Modules.Common.AvatarUtil);
local v5 = {};
v5.__index = v5;
v5.new = function()
    local v6 = setmetatable({}, v5);
    v6.avatarUtil = v4.new();
    l_VRService_0:GetPropertyChangedSignal("AutomaticScaling"):Connect(function()
        v6:onScalingChanged();
    end);
    l_UserGameSettings_0:GetPropertyChangedSignal("PlayerHeight"):Connect(function()
        v6:onPlayerHeightChanged();
    end);
    l_VRService_0.UserCFrameChanged:Connect(function(v7, _)
        if v7 == Enum.UserCFrame.Floor then
            v6:onPlayerHeightChanged();
        end;
    end);
    v6:onScalingChanged();
    return v6;
end;
v5.setHeadScale = function(v9, v10)
    if l_VRService_0.AutomaticScaling ~= Enum.VRScaling.World then
        return ;
    else
        local l_v9_SubjectHeight_0 = v9:GetSubjectHeight(v10);
        if not l_v9_SubjectHeight_0 or l_v9_SubjectHeight_0 <= 0 then
            return ;
        else
            local v12 = -l_VRService_0:GetUserCFrame(Enum.UserCFrame.Floor).Position.Y;
            local v13 = nil;
            v13 = if v12 < 0.8 * l_UserGameSettings_0.PlayerHeight then l_v9_SubjectHeight_0 / l_UserGameSettings_0.PlayerHeight else l_v9_SubjectHeight_0 / v12;
            local l_CurrentCamera_0 = workspace.CurrentCamera;
            if l_CurrentCamera_0 then
                l_CurrentCamera_0.HeadScale = v13;
                return ;
            else
                return ;
            end;
        end;
    end;
end;
v5.GetSubjectHeight = function(_, v16)
    local l_Humanoid_0 = v16:FindFirstChild("Humanoid");
    if l_Humanoid_0 and l_Humanoid_0:GetState() == Enum.HumanoidStateType.Dead then
        return ;
    else
        local v18 = not not l_Humanoid_0 and l_Humanoid_0.RootPart or v16:FindFirstChild("HumanoidRootPart");
        if not v18 or not l_Humanoid_0 then
            return nil;
        else
            local l_HipHeight_0 = l_Humanoid_0.HipHeight;
            if l_Humanoid_0.RigType == Enum.HumanoidRigType.R6 then
                l_HipHeight_0 = 2;
            end;
            if not l_Humanoid_0.AutomaticScalingEnabled then
                return ((v18.Size.Y / 2 + l_HipHeight_0) + 2) + l_Humanoid_0.CameraOffset.Y;
            else
                return ((v18.Size.Y / 2 + l_HipHeight_0) + (v18.Size.Y / 2 + 0.5)) + l_Humanoid_0.CameraOffset.Y;
            end;
        end;
    end;
end;
v5.onPlayerHeightChanged = function(v20)
    if not (not l_Players_0.LocalPlayer or not l_Players_0.LocalPlayer.Character) then
        v20:setHeadScale(l_Players_0.LocalPlayer.Character);
    end;
end;
v5.onScalingChanged = function(v21)
    if l_VRService_0.AutomaticScaling == Enum.VRScaling.World then
        if not v21.characterChangedConnection then
            v21.characterChangedConnection = v21.avatarUtil:connectLocalCharacterChanges(function(v22)
                v21:setHeadScale(v22);
            end);
            return ;
        end;
    elseif v21.characterChangedConnection then
        v21.characterChangedConnection:Disconnect();
        v21.characterChangedConnection = nil;
    end;
end;
return v5.new();


local v0 = require(game:GetService("CorePackages").InGameMenuDependencies);
local l_t_0 = v0.t;
local l_Roact_0 = v0.Roact;
local l_UIBlox_0 = v0.UIBlox;
local l_Cryo_0 = v0.Cryo;
local l_withSelectionCursorProvider_0 = l_UIBlox_0.App.SelectionImage.withSelectionCursorProvider;
local l_CursorKind_0 = l_UIBlox_0.App.SelectionImage.CursorKind;
local l_ImageSetButton_0 = l_UIBlox_0.Core.ImageSet.ImageSetButton;
local _ = game:GetService("StarterGui");
local _ = game:GetService("CoreGui"):WaitForChild("RobloxGui");
local _ = game:GetService("StarterPlayer");
local _ = l_t_0.strictInterface({
    AnchorPoint = l_t_0.optional(l_t_0.Vector2),
    Position = l_t_0.optional(l_t_0.UDim2),
    layoutOrder = l_t_0.optional(l_t_0.integer),
    onActivated = l_t_0.callback,
    onSelectionGained = l_t_0.optional(l_t_0.callback),
    onSelectionLost = l_t_0.optional(l_t_0.callback),
    forwardRef = l_t_0.optional(l_t_0.table)
});
local function v14(v12, v13)
    return l_Roact_0.createElement(l_ImageSetButton_0, {
        Visible = true,
        AnchorPoint = v12.AnchorPoint,
        BackgroundTransparency = 1,
        Image = "rbxasset://textures/ui/MenuBar/divider.png",
        Position = UDim2.new(0, 1, 0, 1),
        Size = UDim2.new(0, 28, 0, 36),
        LayoutOrder = v12.layoutOrder,
        SelectionImageObject = v13(l_CursorKind_0.RoundedRect),
        [l_Roact_0.Event.Activated] = function()
        end,
        [l_Roact_0.Event.SelectionGained] = v12.onSelectionGained,
        [l_Roact_0.Event.SelectionLost] = v12.onSelectionLost,
        [l_Roact_0.Ref] = v12.forwardRef
    });
end;
local function v17(v15)
    return l_withSelectionCursorProvider_0(function(v16)
        return v14(v15, v16);
    end);
end;
return l_Roact_0.forwardRef(function(v18, v19)
    return l_Roact_0.createElement(v17, l_Cryo_0.Dictionary.join(v18, {
        forwardRef = v19
    }));
end);


local l_CorePackages_0 = game:GetService("CorePackages");
local l_HttpService_0 = game:GetService("HttpService");
local l_RunService_0 = game:GetService("RunService");
local l_RobloxGui_0 = game:GetService("CoreGui"):WaitForChild("RobloxGui");
local v4 = require(l_CorePackages_0.Packages.Roact);
local v5 = require(l_CorePackages_0.Packages.React);
local v6 = require(l_RobloxGui_0.Modules.VoiceChat.Hooks.useVoiceState);
local v7 = require(l_RobloxGui_0.Modules.InGameChat.BubbleChat.Constants);
local l_default_0 = require(l_RobloxGui_0.Modules.VoiceChat.VoiceChatServiceManager).default;
if require(l_RobloxGui_0.Modules.Flags.GetFFlagRemoveInGameChatBubbleChatReferences)() then
    v7 = require(l_RobloxGui_0.Modules.VoiceChat.Constants);
end;
local v9 = UDim2.fromOffset(36, 36);
local function _(v10)
    return v5.useMemo(function()
        return v4.joinBindings(v10);
    end, {});
end;
local function _(v12)
    return function(v13)
        local v14 = v13[1];
        local v15 = v13[2];
        if not (v14 ~= v7.VOICE_STATE.MUTED) or v14 == v7.VOICE_STATE.LOCAL_MUTED then
            return l_default_0:GetIcon("Muted", v12);
        elseif v14 == v7.VOICE_STATE.CONNECTING then
            return l_default_0:GetIcon("Connecting", v12);
        elseif v14 == v7.VOICE_STATE.INACTIVE then
            return l_default_0:GetIcon("Unmuted0", v12);
        elseif v14 == v7.VOICE_STATE.TALKING then
            return l_default_0:GetIcon("Unmuted" .. tostring(20 * math.floor(0.5 + 5 * v15)), v12);
        else
            return l_default_0:GetIcon("Error", v12);
        end;
    end;
end;
local function v17()
    return l_HttpService_0:GenerateGUID();
end;
return function(v18)
    local v19 = v6(v18.userId, v18.disable or false);
    local v20, v21 = v5.useBinding(0);
    local v22, v23 = v5.useBinding(v19);
    local v24 = {
        v22,
        v20
    };
    local l_v24_0 = v24 --[[ copy: 7 -> 9 ]];
    local v26 = v5.useMemo(function()
        return v4.joinBindings(l_v24_0);
    end, {});
    v24 = v5.useRef(v17()).current or "";
    v23(v19);
    local v27 = v19 == v7.VOICE_STATE.TALKING;
    v5.useEffect(function()
        if v27 then
            l_RunService_0:BindToRenderStep(v24, 1, function()
                v21(math.random());
            end);
        end;
        return function()
            if v27 then
                l_RunService_0:UnbindFromRenderStep(v24);
            end;
        end;
    end, {
        v27
    });
    return v4.createElement("ImageLabel", {
        BackgroundTransparency = v18.BackgroundTransparency or 1,
        Image = v5.useMemo(function()
            local l_v26_0 = v26;
            local l_iconStyle_0 = v18.iconStyle;
            return l_v26_0:map(function(v30)
                local v31 = v30[1];
                local v32 = v30[2];
                if not (v31 ~= v7.VOICE_STATE.MUTED) or v31 == v7.VOICE_STATE.LOCAL_MUTED then
                    return l_default_0:GetIcon("Muted", l_iconStyle_0);
                elseif v31 == v7.VOICE_STATE.CONNECTING then
                    return l_default_0:GetIcon("Connecting", l_iconStyle_0);
                elseif v31 == v7.VOICE_STATE.INACTIVE then
                    return l_default_0:GetIcon("Unmuted0", l_iconStyle_0);
                elseif v31 == v7.VOICE_STATE.TALKING then
                    return l_default_0:GetIcon("Unmuted" .. tostring(20 * math.floor(0.5 + 5 * v32)), l_iconStyle_0);
                else
                    return l_default_0:GetIcon("Error", l_iconStyle_0);
                end;
            end);
        end, {
            v18.iconStyle
        }),
        ImageColor3 = v18.ImageColor3,
        ImageTransparency = v18.ImageTransparency,
        Position = v18.Position,
        Size = v18.Size or v9,
        [v4.Children] = v18[v4.Children]
    });
end;


local l_VRService_0 = game:GetService("VRService");
local l_Players_0 = game:GetService("Players");
local l_UserInputService_0 = game:GetService("UserInputService");
local l_CoreGui_0 = game:GetService("CoreGui");
local _ = game:GetService("CorePackages");
local l_RobloxGui_0 = l_CoreGui_0.RobloxGui;
local v6 = require(l_RobloxGui_0.Modules.VR.Controllers.ViveController);
local v7 = require(l_RobloxGui_0.Modules.VR.Controllers.TouchController);
local v8 = require(l_RobloxGui_0.Modules.VR.Controllers.RiftController);
local v9 = require(l_RobloxGui_0.Modules.VR.Controllers.IndexController);
local v10 = require(l_RobloxGui_0.Modules.VR.VRUtil);
local l_LocalPlayer_0 = l_Players_0.LocalPlayer;
while not l_LocalPlayer_0 do
    l_Players_0.Changed:wait();
    l_LocalPlayer_0 = l_Players_0.LocalPlayer;
end;
local v12 = {};
v12.__index = v12;
v12.new = function(v13)
    local v14 = setmetatable({}, v12);
    v14.userCFrame = v13;
    v14.enabled = false;
    v14.currentModel = nil;
    v14.currentVRDeviceName = l_VRService_0.VRDeviceName;
    v14.modelIsInWorkspace = false;
    v14.onVRDeviceChangedConn = nil;
    v14.onCurrentCameraChangedConn = nil;
    v14.onUserCFrameEnabledChangedConn = nil;
    v14.onInputBeganConn = nil;
    v14.onInputChangedConn = nil;
    v14.onInputEndedConn = nil;
    v14.controllerModel = nil;
    return v14;
end;
v12.createControllerModel = function(v15)
    local v16 = v10.getCurrentControllerType();
    if v16 == "Vive" then
        v15.controllerModel = v6.new(v15.userCFrame);
        return ;
    elseif v16 == "Rift" then
        v15.controllerModel = v8.new(v15.userCFrame);
        return ;
    elseif v16 == "Index" then
        v15.controllerModel = v9.new(v15.userCFrame);
        return ;
    elseif v16 == "Touch" then
        v15.controllerModel = v7.new(v15.userCFrame);
        return ;
    else
        v15.controllerModel = v8.new(v15.userCFrame);
        return ;
    end;
end;
v12.setCurrentModel = function(v17)
    if v17.currentModel then
        v17:setModelInWorkspace(false);
    end;
    if not v17.controllerModel then
        v17:createControllerModel();
    end;
    v17.currentModel = v17.controllerModel;
    if v17.enabled then
        v17:setModelInWorkspace(l_VRService_0:GetUserCFrameEnabled(v17.userCFrame));
    end;
end;
v12.setModelInWorkspace = function(v18, v19)
    if v18.currentModel then
        if v19 ~= v18.modelIsInWorkspace then
            v18.modelIsInWorkspace = v19;
            if not v18.currentModel.model then
                v18.currentModel:setInWorkspace(v19);
            elseif not v18.modelIsInWorkspace then
                v18.currentModel.model.Parent = nil;
                return ;
            else
                v18.currentModel.model.Parent = workspace;
                return ;
            end;
        end;
        return ;
    else
        return ;
    end;
end;
v12.setEnabled = function(v20, v21)
    if v21 ~= v20.enabled then
        v20.enabled = v21;
        if not v20.enabled then
            if v20.onVRDeviceChangedConn then
                v20.onVRDeviceChangedConn:disconnect();
                v20.onVRDeviceChangedConn = nil;
            end;
            if v20.onCurrentCameraChangedConn then
                v20.onCurrentCameraChangedConn:disconnect();
                v20.onCurrentCameraChangedConn = nil;
            end;
            if v20.onUserCFrameEnabledChangedConn then
                v20.onUserCFrameEnabledChangedConn:disconnect();
                v20.onUserCFrameEnabledChangedConn = nil;
            end;
            if v20.onInputBeganConn then
                v20.onInputBeganConn:disconnect();
                v20.onInputBeganConn = nil;
            end;
            if v20.onInputChangedConn then
                v20.onInputChangedConn:disconnect();
                v20.onInputChangedConn = nil;
            end;
            if v20.onInputEndedConn then
                v20.onInputEndedConn:disconnect();
                v20.onInputEndedConn = nil;
            end;
            if v20.currentModel then
                v20:setModelInWorkspace(false);
            end;
        else
            v20:setCurrentModel();
            v20.onCurrentCameraChangedConn = workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function()
                v20:setModelInWorkspace(l_VRService_0:GetUserCFrameEnabled(v20.userCFrame));
            end);
            v20.onUserCFrameEnabledChangedConn = l_VRService_0.UserCFrameEnabled:connect(function(v22, v23)
                if v22 == v20.userCFrame then
                    v20:setModelInWorkspace(v23);
                end;
            end);
            v20.onInputBeganConn = l_UserInputService_0.InputBegan:connect(function(...)
                v20:onInputBegan(...);
            end);
            v20.onInputChangedConn = l_UserInputService_0.InputChanged:connect(function(...)
                v20:onInputChanged(...);
            end);
            v20.onInputEndedConn = l_UserInputService_0.InputEnded:connect(function(...)
                v20:onInputEnded(...);
            end);
            v20:setModelInWorkspace(l_VRService_0:GetUserCFrameEnabled(v20.userCFrame));
            return ;
        end;
    end;
end;
v12.update = function(v24, _)
    if v24.enabled then
        if v24.currentModel then
            v24.currentModel:setCFrameAndScale(v10.GetUserCFrameWorldSpace(v24.userCFrame), workspace.CurrentCamera.HeadScale);
        end;
        return ;
    else
        return ;
    end;
end;
v12.onInputBegan = function(v26, v27, _)
    if v26.enabled and v26.modelIsInWorkspace then
        if v26.currentModel then
            v26.currentModel:onInputBegan(v27);
        end;
        return ;
    else
        return ;
    end;
end;
v12.onInputChanged = function(v29, v30, _)
    if v29.enabled and v29.modelIsInWorkspace then
        if v29.currentModel then
            v29.currentModel:onInputChanged(v30);
        end;
        return ;
    else
        return ;
    end;
end;
v12.onInputEnded = function(v32, v33, _)
    if v32.currentModel then
        v32.currentModel:onInputEnded(v33);
    end;
end;
v12.getButtonPosition = function(v35, v36)
    if not (not v35.currentModel or not v35.currentModel.getButtonPart) then
        local v37 = v35.currentModel:getButtonPart(v36);
        if v37 then
            return v37.Position;
        end;
    end;
end;
return v12;


local _ = game:GetService("StarterGui");
local l_VRService_0 = game:GetService("VRService");
local l_RunService_0 = game:GetService("RunService");
local l_HttpService_0 = game:GetService("HttpService");
local l_CoreGui_0 = game:GetService("CoreGui");
local l_StarterGui_1 = game:GetService("StarterGui");
local l_UserInputService_0 = game:GetService("UserInputService");
local l_ContextActionService_0 = game:GetService("ContextActionService");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_RobloxGui_0 = l_CoreGui_0.RobloxGui;
local v10 = require(l_RobloxGui_0.Modules.Settings.Utility);
local v11 = require(l_RobloxGui_0.Modules.VR.LaserPointer);
local v12 = require(l_RobloxGui_0.Modules.VR.VRControllerModel);
local l_SplashScreenManager_0 = require(l_CorePackages_0.Workspace.Packages.SplashScreenManager).SplashScreenManager;
local v14 = require(script.Parent.SafetyBubble);
local v15 = {};
local v16 = {};
local v17 = {};
local v18 = l_HttpService_0:GenerateGUID(true);
v15.LaserPointer = nil;
v15.ControllerModelsEnabled = false;
v15.LeftControllerModel = nil;
v15.RightControllerModel = nil;
v15.ControllerModelsEnabledSetByDeveloper = true;
v15.isFPSAtTarget = l_SplashScreenManager_0.isFPSAtTarget();
v15.SafetyBubble = nil;
v15.IsFirstPerson = false;
l_StarterGui_1:RegisterSetCore("VRLaserPointerMode", function(v19)
    if v15.LaserPointer then
        if v19 and tostring(v19) then
            v15.LaserPointer:setMode(v11.Mode[tostring(v19)] or v11.Mode.Disabled);
            return ;
        else
            return ;
        end;
    else
        return ;
    end;
end);
local function v21(v20)
    if v20 ~= v15.ControllerModelsEnabled then
        v15.ControllerModelsEnabled = v20;
        if not v20 then
            if v15.LeftControllerModel then
                v15.LeftControllerModel:setEnabled(false);
            end;
            if v15.RightControllerModel then
                v15.RightControllerModel:setEnabled(false);
            end;
        else
            if not v15.LeftControllerModel then
                v15.LeftControllerModel = v12.new(Enum.UserCFrame.LeftHand);
            end;
            v15.LeftControllerModel:setEnabled(true);
            if not v15.RightControllerModel then
                v15.RightControllerModel = v12.new(Enum.UserCFrame.RightHand);
            end;
            v15.RightControllerModel:setEnabled(true);
            return ;
        end;
    end;
end;
l_StarterGui_1:RegisterSetCore("VREnableControllerModels", function(v22)
    v22 = not not v22 or false;
    v15.ControllerModelsEnabledSetByDeveloper = v22;
    v21(v22);
end);
local v23 = tick();
local function v26()
    local v24 = tick();
    local v25 = v24 - v23;
    v23 = v24;
    if v15.LaserPointer then
        v15.LaserPointer:update(v25);
    end;
    if v15.LeftControllerModel then
        v15.LeftControllerModel:update(v25);
    end;
    if v15.RightControllerModel then
        v15.RightControllerModel:update(v25);
    end;
    if v15.SafetyBubble then
        v15.SafetyBubble:update(v25);
    end;
end;
local function v27()
    if v15.LaserPointer then
        v15.LaserPointer:update(0);
    end;
    if v15.LeftControllerModel then
        v15.LeftControllerModel:update(0);
    end;
    if v15.RightControllerModel then
        v15.RightControllerModel:update(0);
    end;
end;
local v28 = nil;
workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function()
    if v28 then
        v28:disconnect();
    end;
    if workspace.CurrentCamera then
        v28 = workspace.CurrentCamera:GetPropertyChangedSignal("CFrame"):Connect(v27);
    end;
end);
if v28 then
    v28:disconnect();
end;
if workspace.CurrentCamera then
    v28 = workspace.CurrentCamera:GetPropertyChangedSignal("CFrame"):Connect(v27);
end;
local function v29()
    if not l_VRService_0.VREnabled then
        if v15.LaserPointer then
            v15.LaserPointer:setMode(v11.Mode.Disabled);
        end;
        l_RunService_0:UnbindFromRenderStep(v18);
        return ;
    else
        l_UserInputService_0.MouseBehavior = Enum.MouseBehavior.LockCenter;
        l_UserInputService_0.OverrideMouseIconBehavior = Enum.OverrideMouseIconBehavior.ForceHide;
        if not v15.LaserPointer then
            v15.LaserPointer = v11.new();
        end;
        if v15.LaserPointer then
            if not v15.isFPSAtTarget then
                v15.LaserPointer:setMode(v11.Mode.Disabled);
            else
                v15.LaserPointer:setMode(v11.Mode.Navigation);
            end;
        end;
        v21(v15.ControllerModelsEnabledSetByDeveloper);
        l_RunService_0:BindToRenderStep(v18, Enum.RenderPriority.Last.Value, v26);
        if v15.LaserPointer then
            v15.LaserPointer:setForcePointer(true);
        end;
        l_UserInputService_0.OverrideMouseIconBehavior = Enum.OverrideMouseIconBehavior.ForceHide;
        v15.SafetyBubble = v14.new();
        l_ContextActionService_0:BindCoreActivate(Enum.UserInputType.Gamepad1, Enum.KeyCode.ButtonR2);
        return ;
    end;
end;
local function _(v30)
    if v30 ~= "VREnabled" then
        return ;
    else
        v29();
        return ;
    end;
end;
local function v32()
    if l_VRService_0.VRSessionState == Enum.VRSessionState.Focused then
        if not (not v15.LaserPointer or not v15.LaserPointer.Mode.Disabled) then
            v15.LaserPointer:setMode(v11.Mode.Navigation);
            v21(v15.ControllerModelsEnabledSetByDeveloper);
        end;
        if not v15.ControllerModelsEnabled then
            v21(v15.ControllerModelsEnabledSetByDeveloper);
            return ;
        end;
    else
        if not (not v15.LaserPointer or not v15.LaserPointer.Mode.Navigation) then
            v15.LaserPointer:setMode(v11.Mode.Disabled);
        end;
        if v15.ControllerModelsEnabled then
            v21(false);
        end;
    end;
end;
local function v34(v33)
    if v33 == "VREnabled" then
        v29();
        return ;
    else
        if v33 == "VRSessionState" then
            v32();
        end;
        return ;
    end;
end;
v29();
l_VRService_0.Changed:connect(v34);
v15.RegisterModule = function(_, v36)
    v16[v36.ModuleName] = v36;
end;
v15.GetModule = function(_, v38)
    return v16[v38];
end;
v15.IsModuleOpened = function(_, v40)
    return v17[v40] ~= nil;
end;
v15.GetOpenedModules = function(_)
    local v42 = {};
    for _, v44 in pairs(v17) do
        table.insert(v42, v44);
    end;
    return v42;
end;
v15.ModuleOpened = v10:Create("BindableEvent")({
    Name = "VRModuleOpened"
});
v15.FireModuleOpened = function(_, v46)
    if not v16[v46] then
        error("Tried to open module that is not registered: " .. v46);
    end;
    if v17[v46] ~= v16[v46] then
        v17[v46] = v16[v46];
        v15.ModuleOpened:Fire(v46);
    end;
end;
v15.ModuleClosed = v10:Create("BindableEvent")({
    Name = "VRModuleClosed"
});
v15.FireModuleClosed = function(_, v48)
    if not v16[v48] then
        error("Tried to close module that is not registered: " .. v48);
    end;
    if v17[v48] ~= nil then
        v17[v48] = nil;
        v15.ModuleClosed:Fire(v48);
    end;
end;
v15.KeepVRTopbarOpen = function(_)
    for _, v51 in pairs(v17) do
        if v51.KeepVRTopbarOpen then
            return true;
        end;
    end;
    return false;
end;
v15.ShowHighlightedLeaveGameIcon = false;
v15.ShowHighlightedLeaveGameIconToggled = v10:Create("BindableEvent")({
    Name = "ShowHighlightedLeaveGameIconToggled"
});
v15.SetShowHighlightedLeaveGameIconToggled = function(_, v53)
    if v15.ShowHighlightedLeaveGameIcon ~= v53 then
        v15.ShowHighlightedLeaveGameIcon = v53;
        v15.ShowHighlightedLeaveGameIconToggled:Fire();
    end;
end;
v15.ShowTopBar = true;
v15.ShowMoreMenu = false;
v15.ShowTopBarChanged = v10:Create("BindableEvent")({
    Name = "ShowTopBarChanged"
});
v15.ShowMoreMenuChanged = v10:Create("BindableEvent")({
    Name = "ShowMoreMenuChanged"
});
v15.SetShowTopBar = function(_, v55)
    if v15.ShowTopBar ~= v55 then
        v15.ShowTopBar = v55;
        v15.ShowTopBarChanged:Fire();
    end;
end;
v15.SetShowMoreMenu = function(_, v57)
    if v15.ShowMoreMenu ~= v57 then
        v15.ShowMoreMenu = v57;
        v15.ShowMoreMenuChanged:Fire();
    end;
end;
v15.ToggleSafetyBubble = function(_)
    if v15.SafetyBubble then
        v15.SafetyBubble:ToggleEnabled();
    end;
end;
v15.GetControllerModel = function(_, v60)
    if v60 == Enum.UserCFrame.LeftHand then
        return v15.LeftControllerModel;
    elseif v60 == Enum.UserCFrame.RightHand then
        return v15.RightControllerModel;
    else
        return nil;
    end;
end;
v15.GetControllerButtonPosition = function(_, v62)
    return v15.LeftControllerModel and v15.LeftControllerModel:getButtonPosition(v62), v15.RightControllerModel and v15.RightControllerModel:getButtonPosition(v62);
end;
l_SplashScreenManager_0.addStatusChangeListener(function(v63)
    v15.isFPSAtTarget = v63;
    v29();
end);
return v15;


local _ = game:GetService("CorePackages");
local l_game_EngineFeature_0 = game:GetEngineFeature("EnableVRUpdate3");
local v2 = require(script.Parent.VRServiceWrapper);
return {
    GetUserCFrameWorldSpace = function(v3)
        local l_v2_UserCFrame_0 = v2:GetUserCFrame(v3);
        if not workspace.CurrentCamera.HeadLocked then
            l_v2_UserCFrame_0 = v2:GetUserCFrame(Enum.UserCFrame.Head):Inverse() * l_v2_UserCFrame_0;
        end;
        return workspace.CurrentCamera.CFrame * (CFrame.new(l_v2_UserCFrame_0.p * workspace.CurrentCamera.HeadScale) * (l_v2_UserCFrame_0 - l_v2_UserCFrame_0.p));
    end,
    getCurrentControllerType = function()
        local v5 = not not l_game_EngineFeature_0 and v2.VRDeviceName or nil;
        local v6 = ((v5:match("Oculus") or v5:match("Meta")) or v5:match("OpenXr")) or v5:match("OpenXR");
        if not v5:match("Vive") then
            if not v5:match("Rift") then
                if not v5:match("Index") then
                    if not v6 then
                        return "Rift";
                    else
                        return "Touch";
                    end;
                else
                    return "Index";
                end;
            else
                return "Rift";
            end;
        else
            return "Vive";
        end;
    end
};


local l_Parent_0 = script.Parent;
local l_ContextActionService_0 = game:GetService("ContextActionService");
local l_GuiService_0 = game:GetService("GuiService");
local l_UserInputService_0 = game:GetService("UserInputService");
local l_GamepadService_0 = game:GetService("GamepadService");
local _ = game:GetService("CoreGui"):WaitForChild("RobloxGui");
local v6 = require(l_Parent_0.Properties);
local v7 = require(l_Parent_0.Interface);
local v8 = {};
local v9 = Vector2.new();
local v10 = Vector2.new();
local v11 = false;
local v12 = nil;
local function v19(v13)
    local v14 = 0;
    local v15 = 0;
    if v6.ThumbstickDeadzone <= v13.Magnitude then
        local v16 = math.atan2(v13.y, v13.x);
        local v17 = math.abs(math.cos(v16) * v6.ThumbstickDeadzone);
        local v18 = math.abs(math.sin(v16) * v6.ThumbstickDeadzone);
        v14 = (math.max(math.abs(v13.x) - v17, 0) / (1 - v17)) * math.sign(v13.x);
        v15 = (math.max(math.abs(v13.y) - v18, 0) / (1 - v18)) * math.sign(v13.y);
    end;
    return Vector2.new(v14, -v15);
end;
local function v23(_, v21, v22)
    if v21 == Enum.UserInputState.Change then
        v10 = Vector2.new(v22.Position.x, v22.Position.y * -1);
        return Enum.ContextActionResult.Sink;
    else
        v10 = Vector2.new();
        return Enum.ContextActionResult.Pass;
    end;
end;
l_UserInputService_0.InputBegan:Connect(function(v24)
    if v11 then
        if not (not (v24.UserInputType == Enum.UserInputType.Gamepad1 and v24.KeyCode == Enum.KeyCode.ButtonA) or not l_GuiService_0.SelectedObject and not l_GuiService_0.SelectedCoreObject) then
            v7:PlayCursorTweenActivate();
        end;
        return ;
    else
        return ;
    end;
end);
l_UserInputService_0.InputEnded:Connect(function(v25)
    if v11 then
        if v25.UserInputType == Enum.UserInputType.Gamepad1 and v25.KeyCode == Enum.KeyCode.ButtonA then
            v7:PlayCursorTweenDefault();
        end;
        return ;
    else
        return ;
    end;
end);
v8.GetThumbstickVector = function(_)
    return v9;
end;
v8.GetThumbstick2Vector = function(_)
    return v10;
end;
v8.EnableInput = function(_)
    v12 = l_GamepadService_0.GamepadThumbstick1Changed:Connect(function(v29)
        v9 = v19(v29);
    end);
    l_ContextActionService_0:BindCoreActionAtPriority("VirtualCursorThumbstick2Movement", v23, false, Enum.ContextActionPriority.High.Value, Enum.KeyCode.Thumbstick2);
    v11 = true;
end;
v8.DisableInput = function(_)
    v12:Disconnect();
    v12 = nil;
    l_ContextActionService_0:UnbindCoreAction("VirtualCursorThumbstick2Movement");
    if Enum.UserInputState.Cancel == Enum.UserInputState.Change then
        v10 = Vector2.new((nil).Position.x, (nil).Position.y * -1);
        local _ = Enum.ContextActionResult.Sink;
    else
        v10 = Vector2.new();
        local _ = Enum.ContextActionResult.Pass;
    end;
    v11 = false;
end;
return v8;


local l_Parent_0 = script.Parent;
local _ = game:GetService("CoreGui");
local l_TweenService_0 = game:GetService("TweenService");
local l_VRService_0 = game:GetService("VRService");
local l_CoreGui_1 = game:GetService("CoreGui");
local _ = l_CoreGui_1.RobloxGui;
local v6 = require(l_Parent_0.Properties);
local v7 = {};
local v8 = {
    Default = "rbxasset://textures/ui/VirtualCursor/cursorDefault.png",
    Hover = "rbxasset://textures/ui/VirtualCursor/cursorHover.png",
    Pressed = "rbxasset://textures/ui/VirtualCursor/cursorPressed.png",
    Arrow = "rbxasset://textures/ui/VirtualCursor/cursorArrow.png"
};
local v9 = nil;
local v10 = nil;
local v11 = nil;
local v12 = nil;
local v13 = {
    Default = 2,
    Activated = 1.7
};
local function v16(v14)
    local v15 = v13[v14] * v6.CursorRadius;
    return UDim2.fromOffset(v15, v15);
end;
local function _(v17)
    if not v17 then
        v10.Image = v8.Default;
        return ;
    else
        v10.Image = v8.Hover;
        return ;
    end;
end;
local function _(v19)
    v10.Position = UDim2.fromOffset(v19.x, v19.y);
end;
local function v28()
    if v9 == nil then
        v9 = Instance.new("ScreenGui");
        v9.Enabled = false;
        v9.IgnoreGuiInset = true;
        v9.DisplayOrder = 100;
        v9.Name = "VirtualCursorGui";
        v10 = Instance.new("ImageLabel");
        v10.Active = false;
        v10.AnchorPoint = Vector2.new(0.5, 0.5);
        local l_v10_0 = v10;
        local v22 = v13.Default * v6.CursorRadius;
        l_v10_0.Size = UDim2.fromOffset(v22, v22);
        v10.Image = v8.Default;
        v10.Visible = false;
        v10.BackgroundTransparency = 1;
        v10.Parent = v9;
        v9.Parent = l_CoreGui_1;
        l_v10_0 = TweenInfo.new(0.15, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0);
        local l_l_TweenService_0_0 = l_TweenService_0;
        local l_v10_1 = v10;
        local l_l_v10_0_0 = l_v10_0;
        local v26 = {};
        local v27 = v13.Activated * v6.CursorRadius;
        v26.Size = UDim2.fromOffset(v27, v27);
        v11 = l_l_TweenService_0_0:Create(l_v10_1, l_l_v10_0_0, v26);
        l_l_TweenService_0_0 = l_TweenService_0;
        l_v10_1 = v10;
        l_l_v10_0_0 = l_v10_0;
        v26 = {};
        v27 = v13.Default * v6.CursorRadius;
        v26.Size = UDim2.fromOffset(v27, v27);
        v12 = l_l_TweenService_0_0:Create(l_v10_1, l_l_v10_0_0, v26);
    end;
    return v9;
end;
v7.GetCursorSize = function(_, v30)
    return v16(v30);
end;
v7.PlayCursorTweenActivate = function(_)
    v11:Play();
end;
v7.PlayCursorTweenDefault = function(_)
    v12:Play();
end;
v7.SetCursorHighlight = function(_, v34)
    if not v34 then
        v10.Image = v8.Default;
        return ;
    else
        v10.Image = v8.Hover;
        return ;
    end;
end;
v7.SetCursorPosition = function(_, v36)
    v10.Position = UDim2.fromOffset(v36.x, v36.y);
end;
v7.SetArrow = function(_, v38, v39)
    if v38 == -1 and v39 == 0 then
        v10.Rotation = 90;
    elseif v39 == 0 then
        v10.Rotation = 270;
    end;
    if v38 == 0 and v39 == 1 then
        v10.Rotation = 0;
    elseif v38 == 0 then
        v10.Rotation = 180;
    end;
    v10.Image = v8.Arrow;
end;
v7.EnableUI = function(_, v41)
    local v42 = not l_VRService_0.VREnabled;
    v28().Enabled = v42;
    local l_v10_2 = v10;
    local v44 = v13.Default * v6.CursorRadius;
    l_v10_2.Size = UDim2.fromOffset(v44, v44);
    v10.Position = UDim2.fromOffset(v41.x, v41.y);
    v10.Visible = v42;
end;
v7.DisableUI = function(_)
    v10.Image = v8.Default;
    v28().Enabled = false;
    v10.Visible = false;
end;
return v7;


local l_Parent_0 = script.Parent;
local l_GuiService_0 = game:GetService("GuiService");
local l_Players_0 = game:GetService("Players");
local l_GamepadService_0 = game:GetService("GamepadService");
local l_CoreGui_0 = game:GetService("CoreGui");
local v5 = require(l_CoreGui_0:WaitForChild("RobloxGui").Modules.Flags.GetFFlagFixMissingPlayerGuiCrash);
local v6 = nil;
local v7 = require(l_Parent_0.Input);
local v8 = require(l_Parent_0.Interface);
local v9 = require(l_Parent_0.Properties);
local v10 = 1;
local v11 = false;
local l_sin_0 = math.sin;
local l_cos_0 = math.cos;
local _ = math.abs;
local l_max_0 = math.max;
local l_min_0 = math.min;
local l_sign_0 = math.sign;
local l_abs_1 = math.abs;
local function _(v19)
    if v19:IsA("GuiButton") or v19:IsA("TextBox") then
        if v19.Active and v19.Selectable then
            if v19.AbsoluteSize.Magnitude == 0 then
                return false;
            else
                return true;
            end;
        else
            return false;
        end;
    else
        return false;
    end;
end;
local function _(v21, v22, v23)
    local v24 = false;
    if v22.x <= v21.x then
        v24 = false;
        if v22.y <= v21.y then
            v24 = false;
            if v21.x <= v23.x then
                v24 = v21.y <= v23.y;
            end;
        end;
    end;
    return v24;
end;
local function v46(v26, v27, v28)
    if v26:IsA("ScrollingFrame") then
        if v26.ScrollingEnabled then
            local l_v7_Thumbstick2Vector_0 = v7:GetThumbstick2Vector();
            local v30 = v9.ScrollingSpeed * v28;
            local l_ScrollingRadius_0 = v9.ScrollingRadius;
            local l_AbsoluteCanvasSize_0 = v26.AbsoluteCanvasSize;
            local l_AbsoluteSize_0 = v26.AbsoluteSize;
            local l_ScrollingDirection_0 = v26.ScrollingDirection;
            local v35 = false;
            if l_AbsoluteSize_0.X < l_AbsoluteCanvasSize_0.X then
                v35 = true;
                if l_ScrollingDirection_0 ~= Enum.ScrollingDirection.XY then
                    v35 = l_ScrollingDirection_0 == Enum.ScrollingDirection.X;
                end;
            end;
            local v36 = false;
            if l_AbsoluteSize_0.Y < l_AbsoluteCanvasSize_0.Y then
                v36 = true;
                if l_ScrollingDirection_0 ~= Enum.ScrollingDirection.XY then
                    v36 = l_ScrollingDirection_0 == Enum.ScrollingDirection.Y;
                end;
            end;
            local l_AbsoluteSize_1 = v26.AbsoluteSize;
            local l_AbsolutePosition_0 = v26.AbsolutePosition;
            local v39 = (v26.Rotation / 180) * 3.141592653589793;
            if v9.ThumbstickDeadzone < l_abs_1(l_v7_Thumbstick2Vector_0.x) then
                v26.CanvasPosition = v26.CanvasPosition + Vector2.new(l_v7_Thumbstick2Vector_0.x * v30, 0);
            end;
            if v9.ThumbstickDeadzone < l_abs_1(l_v7_Thumbstick2Vector_0.y) then
                v26.CanvasPosition = v26.CanvasPosition + Vector2.new(0, l_v7_Thumbstick2Vector_0.y * v30);
            end;
            local v40 = Vector2.new(l_cos_0(v39), (l_sin_0(v39)));
            local v41 = Vector2.new(-l_sin_0(v39), (l_cos_0(v39)));
            local v42 = Vector2.new(v27.X, v27.Y) - l_AbsolutePosition_0;
            local v43 = v42:Dot(v40) - l_AbsoluteSize_1.X / 2;
            local v44 = v42:Dot(v41) - l_AbsoluteSize_1.Y / 2;
            local v45 = Vector2.new(l_abs_1(v43), (l_abs_1(v44))) - l_AbsoluteSize_1 / 2;
            if l_abs_1(l_min_0(l_max_0(v45.x, v45.y), 0) + Vector2.new(l_max_0(v45.x, 0), (l_max_0(v45.y, 0))).Magnitude) < l_ScrollingRadius_0 then
                if not (l_abs_1(v45.x) < l_abs_1(v45.y)) or not v35 then
                    if not (not (l_abs_1(v45.y) <= l_abs_1(v45.x)) or not v36) then
                        v26.CanvasPosition = v26.CanvasPosition + Vector2.new(0, l_sign_0(v44) * v30);
                        v8:SetArrow(0, (l_sign_0(v44)));
                        return true;
                    end;
                else
                    v26.CanvasPosition = v26.CanvasPosition + Vector2.new(l_sign_0(v43) * v30, 0);
                    v8:SetArrow(l_sign_0(v43), 0);
                    return true;
                end;
            end;
            return false;
        else
            return false;
        end;
    else
        return false;
    end;
end;
local function v62(v47, v48, v49)
    local v50 = nil;
    local l_huge_0 = math.huge;
    local v52 = -math.huge;
    v11 = false;
    v47 = v47 - l_GuiService_0:GetGuiInset();
    if not v5() then
        if v6 == nil then
            v6 = l_Players_0.LocalPlayer:WaitForChild("PlayerGui");
        end;
    elseif v6 == nil then
        v6 = l_Players_0.LocalPlayer:FindFirstChildOfClass("PlayerGui");
    end;
    local v53 = if not v6 then {} else v6:GetGuiObjectsInCircle(v47, v48);
    local l_l_CoreGui_0_GuiObjectsInCircle_0 = l_CoreGui_0:GetGuiObjectsInCircle(v47, v48);
    for _, v56 in ipairs(v53) do
        if not v46(v56, v47, v49) then
            if not (not if v56:IsA("GuiButton") or v56:IsA("TextBox") then if v56.Active and v56.Selectable then v56.AbsoluteSize.Magnitude ~= 0 else false else false or v50) then
                v50 = v56;
            end;
            if if v56:IsA("GuiButton") or v56:IsA("TextBox") then if v56.Active and v56.Selectable then v56.AbsoluteSize.Magnitude ~= 0 else false else false and v56.Parent == v50.Parent then
                local l_Magnitude_0 = ((v56.AbsolutePosition + v56.AbsoluteSize / 2) - v47).Magnitude;
                if l_Magnitude_0 < l_huge_0 and v52 <= v56.ZIndex then
                    v50 = v56;
                    l_huge_0 = l_Magnitude_0;
                    v52 = v50.ZIndex;
                end;
            end;
        else
            v11 = true;
            return nil;
        end;
    end;
    local v58 = false;
    for _, v60 in ipairs(l_l_CoreGui_0_GuiObjectsInCircle_0) do
        if not v46(v60, v47, v49) then
            if if v60:IsA("GuiButton") or v60:IsA("TextBox") then if v60.Active and v60.Selectable then v60.AbsoluteSize.Magnitude ~= 0 else false else false then
                local l_Magnitude_1 = ((v60.AbsolutePosition + v60.AbsoluteSize / 2) - v47).Magnitude;
                if not (not (v58 and l_Magnitude_1 < l_huge_0) or v52 > v60.ZIndex) or not v58 and l_Magnitude_1 < l_huge_0 then
                    v50 = v60;
                    l_huge_0 = l_Magnitude_1;
                    v52 = v50.ZIndex;
                    v58 = true;
                end;
            end;
        else
            v11 = true;
            return nil;
        end;
    end;
    return v50;
end;
local function _()
    return l_GuiService_0:GetScreenResolution().Magnitude * v9.MaxSpeedRelative;
end;
return function(v64, v65)
    local v66 = l_GuiService_0:GetScreenResolution() + l_GuiService_0:GetGuiInset();
    local l_v7_ThumbstickVector_0 = v7:GetThumbstickVector();
    local l_l_GamepadService_0_GamepadCursorPosition_0 = l_GamepadService_0:GetGamepadCursorPosition();
    local v69 = nil;
    local _ = Vector2.new();
    if v64.SelectedObject == nil then
        v10 = 1;
        v8:SetCursorHighlight(false);
    end;
    if v11 then
        v10 = v9.ScrollingSlowDown;
    end;
    v69 = (l_v7_ThumbstickVector_0 * (l_GuiService_0:GetScreenResolution().Magnitude * v9.MaxSpeedRelative)) * v10;
    if v69.Magnitude > 0 then
        local v71 = l_l_GamepadService_0_GamepadCursorPosition_0 + v69 * v65;
        l_l_GamepadService_0_GamepadCursorPosition_0 = Vector2.new(math.clamp(v71.x, 0, v66.x), (math.clamp(v71.y, 0, v66.y)));
    end;
    v8:SetCursorPosition(l_l_GamepadService_0_GamepadCursorPosition_0);
    l_GamepadService_0:SetGamepadCursorPosition(l_l_GamepadService_0_GamepadCursorPosition_0);
    v64.CursorPosition = l_l_GamepadService_0_GamepadCursorPosition_0;
    local v72 = v62(l_l_GamepadService_0_GamepadCursorPosition_0, v9.SelectionRadius, v65);
    if v72 ~= v64.PreviouslySelectedObject then
        v64.PreviouslySelectedObject = v72;
        v8:SetCursorHighlight(v72 ~= nil);
        if not v72 then
            v64.SelectedObject = nil;
            v10 = 1;
        elseif v72 ~= v64.SelectedObject then
            v64.SelectedObject = v72;
            v10 = v9.SpeedAdjustmentTarget;
        end;
        if v64.SelectedObject == nil then
            l_GuiService_0.SelectedObject = nil;
            l_GuiService_0.SelectedCoreObject = nil;
            return ;
        elseif not v64.SelectedObject:IsDescendantOf(l_CoreGui_0) then
            l_GuiService_0.SelectedObject = v64.SelectedObject;
            l_GuiService_0.SelectedCoreObject = nil;
        else
            l_GuiService_0.SelectedCoreObject = v64.SelectedObject;
            l_GuiService_0.SelectedObject = nil;
            return ;
        end;
    end;
end;


local v0 = {
    SpeedAdjustmentTarget = 0.5,
    CursorRadius = 40,
    SelectionRadius = 40,
    MaxSpeedRelative = 0.7,
    ThumbstickDeadzone = 0.2,
    ScrollingRadius = 15,
    ScrollingSlowDown = 0.25,
    ScrollingSpeed = 1000
};
setmetatable(v0, {
    __index = function(_, v2)
        error(string.format("%q is not a valid member of properties", (tostring(v2))), 2);
    end
});
return v0;


local l_Parent_0 = script.Parent;
local l_GuiService_0 = game:GetService("GuiService");
local l_RunService_0 = game:GetService("RunService");
local l_UserInputService_0 = game:GetService("UserInputService");
local l_GamepadService_0 = game:GetService("GamepadService");
local _ = game:GetService("CoreGui"):WaitForChild("RobloxGui");
local l_Input_0 = require(l_Parent_0:WaitForChild("Input"));
local l_Interface_0 = require(l_Parent_0:WaitForChild("Interface"));
local l_OnRenderStep_0 = require(l_Parent_0:WaitForChild("OnRenderStep"));
local v9 = nil;
local v10 = nil;
local v11 = nil;
local v12 = false;
local function v14(v13)
    if v9 then
        v13 = v13 or v9.CursorPosition;
        v9.Enabled = true;
        v9.CursorPosition = v13;
        l_Interface_0:EnableUI(v13);
        l_GamepadService_0:SetGamepadCursorPosition(v13);
        l_Input_0:EnableInput();
        l_RunService_0:BindToRenderStep("VirtualCursorStepped", Enum.RenderPriority.Input.Value + 1, v9.OnRenderStep);
        v11 = l_GuiService_0.MenuOpened:Connect(function()
            l_GamepadService_0.GamepadCursorEnabled = false;
        end);
        return ;
    else
        return ;
    end;
end;
local function v15()
    if v9.Enabled then
        v11:Disconnect();
        v11 = nil;
        v9.PreviouslySelectedObject = nil;
        l_Interface_0:DisableUI();
        l_Input_0:DisableInput();
        l_RunService_0:UnbindFromRenderStep("VirtualCursorStepped");
        if v9.SelectedObject then
            l_GuiService_0.SelectedObject = nil;
            l_GuiService_0.SelectedCoreObject = nil;
            v9.SelectedObject = nil;
        end;
        v9.Enabled = false;
        return ;
    else
        return ;
    end;
end;
local v16 = {};
v16.__index = v16;
v16.GetEnabled = function(v17)
    return v17.Enabled;
end;
v16.new = function()
    local v18 = {
        Enabled = false,
        CursorPosition = Vector2.new(),
        SelectedObject = nil,
        PreviouslySelectedObject = nil
    };
    v18.OnRenderStep = function(v19)
        l_OnRenderStep_0(v18, v19);
    end;
    v10 = l_UserInputService_0.LastInputTypeChanged:Connect(function(v20)
        if not (v20 ~= Enum.UserInputType.Gamepad1 and v20 ~= Enum.UserInputType.Focus) or not l_GamepadService_0.GamepadCursorEnabled then
            if not (not (v20 == Enum.UserInputType.Gamepad1) or not v12) then
                l_GamepadService_0.GamepadCursorEnabled = true;
                v12 = false;
            end;
            return ;
        else
            l_GamepadService_0.GamepadCursorEnabled = false;
            v12 = true;
            return ;
        end;
    end);
    setmetatable(v18, v16);
    v9 = v18;
    return v18;
end;
l_GamepadService_0:GetPropertyChangedSignal("GamepadCursorEnabled"):Connect(function()
    local l_GamepadCursorEnabled_0 = l_GamepadService_0.GamepadCursorEnabled;
    if v9 then
        if not l_GamepadCursorEnabled_0 then
            v15();
        else
            v14((l_UserInputService_0:GetMouseLocation()));
            return ;
        end;
    end;
end);
return v16.new();


local l_CorePackages_0 = game:GetService("CorePackages");
local l_RobloxGui_0 = game:GetService("CoreGui"):WaitForChild("RobloxGui");
local l_makeActionCreator_0 = require(l_CorePackages_0.Rodux).makeActionCreator;
local _ = require(l_CorePackages_0.Packages.t);
local v4 = require(l_RobloxGui_0.Modules.InGameChat.BubbleChat.Helpers.maybeAssert);
if require(l_RobloxGui_0.Modules.Flags.GetFFlagRemoveInGameChatBubbleChatReferences)() then
    v4 = require(l_RobloxGui_0.Modules.VoiceChat.Helpers.maybeAssert);
end;
return l_makeActionCreator_0(script.Name, function(v5)
    v4(tonumber(v5) ~= nil);
    return {
        userId = tostring(v5)
    };
end);


return require(game:GetService("CorePackages").Rodux).makeActionCreator(script.Name, function(v0)
    return {
        newParticipants = v0
    };
end);


local l_CorePackages_0 = game:GetService("CorePackages");
local l_RobloxGui_0 = game:GetService("CoreGui"):WaitForChild("RobloxGui");
local l_makeActionCreator_0 = require(l_CorePackages_0.Rodux).makeActionCreator;
local v3 = require(l_CorePackages_0.Packages.t);
local v4 = require(l_RobloxGui_0.Modules.InGameChat.BubbleChat.Helpers.maybeAssert);
if require(l_RobloxGui_0.Modules.Flags.GetFFlagRemoveInGameChatBubbleChatReferences)() then
    v4 = require(l_RobloxGui_0.Modules.VoiceChat.Helpers.maybeAssert);
end;
return l_makeActionCreator_0(script.Name, function(v5)
    v4(v3.boolean(v5));
    return {
        enabled = v5
    };
end);


local l_CorePackages_0 = game:GetService("CorePackages");
local l_RobloxGui_0 = game:GetService("CoreGui"):WaitForChild("RobloxGui");
local l_makeActionCreator_0 = require(l_CorePackages_0.Rodux).makeActionCreator;
local v3 = require(l_CorePackages_0.Packages.t);
local v4 = require(l_RobloxGui_0.Modules.InGameChat.BubbleChat.Helpers.maybeAssert);
if require(l_RobloxGui_0.Modules.Flags.GetFFlagRemoveInGameChatBubbleChatReferences)() then
    v4 = require(l_RobloxGui_0.Modules.VoiceChat.Helpers.maybeAssert);
end;
return l_makeActionCreator_0(script.Name, function(v5, v6)
    v4(tonumber(v5) ~= nil);
    v4(v3.string(v6));
    return {
        userId = tostring(v5),
        newState = v6
    };
end);


local l_RbxAnalyticsService_0 = game:GetService("RbxAnalyticsService");
game:DefineFastInt("LuaVoiceChatAnalyticsPointsThrottle", 0);
game:DefineFastFlag("LuaVoiceChatAnalyticsUsePointsV2", false);
game:DefineFastFlag("LuaVoiceChatAnalyticsUseCounterV2", false);
game:DefineFastFlag("LuaVoiceChatAnalyticsUseEventsV2", false);
game:DefineFastFlag("LuaVoiceChatAnalyticsBanMessage", true);
game:DefineFastFlag("LuaVoiceChatReconnectMissedSequence", false);
local v1 = {};
v1.__index = v1;
v1.INFO = "info";
v1.WARNING = "warning";
v1.ERROR = "error";
v1.new = function(v2)
    if not v2 then
        v2 = l_RbxAnalyticsService_0;
    end;
    assert(v2, "Analytics impl must not be nil.");
    return (setmetatable({
        _impl = v2
    }, v1));
end;
local function v3()
end;
v1.stubService = function()
    return {
        SetRBXEvent = v3,
        SetRBXEventStream = v3,
        SendEventDeferred = v3,
        ReportCounter = v3,
        ReportStats = v3,
        ReportInfluxSeries = v3
    };
end;
v1.setImpl = function(v4, v5)
    v4._impl = v5;
end;
v1._report = function(v6, v7, v8, v9, v10)
    local v11 = v7 .. "-" .. v8;
    if game:GetFastFlag("LuaVoiceChatAnalyticsUsePointsV2") then
        v6._impl:ReportInfluxSeries(v11, v10, game:GetFastInt("LuaVoiceChatAnalyticsPointsThrottle"));
    end;
    if game:GetFastFlag("LuaVoiceChatAnalyticsUseCounterV2") then
        local l_v11_0 = v11;
        if v9 then
            l_v11_0 = l_v11_0 .. "-" .. v9;
        end;
        local l_l_v11_0_0 = l_v11_0;
        if not (not v10 or not v10.result) then
            l_l_v11_0_0 = l_l_v11_0_0 .. "-" .. v10.result;
        end;
        v6._impl:ReportCounter(l_l_v11_0_0, 1);
    end;
    if game:GetFastFlag("LuaVoiceChatAnalyticsUseEventsV2") then
        v6._impl:SendEventDeferred("client", v7, v8, v10);
    end;
end;
v1.reportVoiceChatJoinResult = function(v14, v15, v16, v17)
    v14:_report("voiceChat", "defaultChannelJoinResults", v16, {
        success = v15,
        result = v16,
        logLevel = v17 or v1.INFO
    });
end;
v1.reportBanMessageEvent = function(v18, v19)
    if game:GetFastFlag("LuaVoiceChatAnalyticsBanMessage") then
        v18._impl:ReportCounter("voiceChat-reportBanMessage" .. v19, 1);
    end;
end;
v1.reportBanMessageEventV2 = function(v20, v21, v22, v23, v24)
    v20:_report("voiceChat", "reportBanEvent", nil, {
        eventType = v21,
        banReason = v22,
        userId = v23,
        voiceSessionId = v24
    });
end;
v1.reportReconnectDueToMissedSequence = function(v25)
    if game:GetFastFlag("LuaVoiceChatReconnectMissedSequence") then
        v25._impl:ReportCounter("voiceChat-reconnectMissedSequence", 1);
    end;
end;
v1.reportOutOfOrderSequence = function(v26)
    v26._impl:ReportCounter("voiceChat-outOfOrderSequence", 1);
end;
v1.reportReceivedNudge = function(v27, v28, v29, v30)
    local v31 = DateTime.now().UnixTimestampMillis - DateTime.fromIsoDate(v28.deliveryTime).UnixTimestampMillis;
    v27._impl:ReportCounter("voicechat-receivednudge", 1);
    v27._impl:ReportCounter("voicechat-receivednudgeduration", v31);
    v27._impl:SendEventDeferred("client", "voiceChat", "receivedNudge", {
        type = v28.type,
        durationInMs = v31,
        userId = v29,
        voiceSessionId = v30
    });
end;
v1.reportClosedNudge = function(v32, v33, v34)
    v32._impl:ReportCounter("voicechat-closednudge", 1);
    v32._impl:SendEventDeferred("client", "voiceChat", "closedNudge", {
        userId = v33,
        voiceSessionId = v34,
        closeType = "CLOSED"
    });
end;
v1.reportAcknowledgedNudge = function(v35, v36, v37)
    v35._impl:ReportCounter("voicechat-acknowledgednudge", 1);
    v35._impl:SendEventDeferred("client", "voiceChat", "closedNudge", {
        userId = v36,
        voiceSessionId = v37,
        closeType = "ACKNOWLEDGED"
    });
end;
v1.reportDeniedNudge = function(v38, v39, v40)
    v38._impl:ReportCounter("voicechat-deniednudge", 1);
    v38._impl:SendEventDeferred("client", "voiceChat", "closedNudge", {
        userId = v39,
        voiceSessionId = v40,
        closeType = "DENIED"
    });
end;
v1.reportVoiceMuteIndividual = function(v41, v42)
    v41._impl:SendEventDeferred("client", "voice", "voiceUIMuteUnmuteIndividual", {
        user_id = v42.userId,
        client_session_id = v42.clientSessionId,
        target_user_id = v42.targetUserId,
        channel_id = v42.channelId,
        context = v42.context,
        muted = v42.muted
    });
end;
v1.reportVoiceMuteGroup = function(v43, v44)
    v43._impl:SendEventDeferred("client", "voice", "voiceUIMuteUnmuteGroup", {
        user_id = v44.userId,
        client_session_id = v44.clientSessionId,
        channel_id = v44.channelId,
        context = v44.context,
        group_type = v44.groupType,
        muted = v44.muted
    });
end;
v1.reportVoiceMuteSelf = function(v45, v46)
    v45._impl:SendEventDeferred("client", "voice", "voiceUIMuteUnmuteSelf", {
        user_id = v46.userId,
        client_session_id = v46.clientSessionId,
        channel_id = v46.channelId,
        context = v46.context,
        muted = v46.muted
    });
end;
return v1;


local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(l_CorePackages_0.Cryo);
local v2 = require(l_CorePackages_0.Packages.Roact);
return function(v3)
    local l_instances_0 = v3.instances;
    local l_mutedPlayers_0 = v3.mutedPlayers;
    return v2.createElement("ScreenGui", {
        AutoLocalize = false,
        DisplayOrder = 100,
        IgnoreGuiInset = true,
        OnTopOfCoreBlur = true,
        ZIndexBehavior = Enum.ZIndexBehavior.Sibling
    }, v2.createFragment(v1.List.map(v1.Dictionary.keys(l_instances_0), function(v6, v7)
        local l_Player_0 = v6.Player;
        return v2.createElement("TextLabel", {
            Text = "ADI: " .. (not l_Player_0 and "Unnamed" or l_Player_0.Name) .. " " .. (not v6.Active and "Inactive " or "Active ") .. ((not not l_Player_0 and l_mutedPlayers_0[l_Player_0.UserId]) and "localmuted" or "not-localmuted"),
            Size = UDim2.fromOffset(200, 25),
            AutomaticSize = Enum.AutomaticSize.X,
            Position = UDim2.fromOffset(10, v7 * 28)
        });
    end)));
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local l_HttpService_0 = game:GetService("HttpService");
local l_RunService_0 = game:GetService("RunService");
local l_RobloxGui_0 = game:GetService("CoreGui"):WaitForChild("RobloxGui");
local v4 = require(l_CorePackages_0.UIBlox);
local l_withSelectionCursorProvider_0 = v4.App.SelectionImage.withSelectionCursorProvider;
local l_CursorKind_0 = v4.App.SelectionImage.CursorKind;
local v7 = require(l_RobloxGui_0.Modules.InGameChat.BubbleChat.Logger)(script.Name);
local v8 = require(l_CorePackages_0.Packages.Roact);
local v9 = require(l_CorePackages_0.Packages.ReactIs);
local v10 = require(l_CorePackages_0.Packages.RoactRodux);
local v11 = require(l_CorePackages_0.Packages.t);
local v12 = require(l_RobloxGui_0.Modules.Flags.GetFFlagRemoveInGameChatBubbleChatReferences);
local v13 = require(l_RobloxGui_0.Modules.InGameChat.BubbleChat.Constants);
local l_default_0 = require(l_RobloxGui_0.Modules.VoiceChat.VoiceChatServiceManager).default;
if v12() then
    v7 = require(l_RobloxGui_0.Modules.VoiceChat.Logger)(script.Name);
    v13 = require(l_RobloxGui_0.Modules.VoiceChat.Constants);
end;
local v15 = v8.PureComponent:extend("VoiceIndicator");
v15.validateProps = v11.strictInterface({
    onClicked = v11.optional(v11.callback),
    userId = v11.string,
    hideOnError = v11.optional(v11.boolean),
    size = v11.optional(v11.UDim2),
    iconStyle = v11.optional(v11.union(v11.literal("MicDark"), v11.literal("MicLight"), v11.literal("SpeakerDark"), v11.literal("SpeakerLight"))),
    iconTransparency = v11.optional(v11.union(v11.number, v11.table)),
    voiceState = v11.string
});
v15.defaultProps = {};
v15.getIcon = function(_, v17)
    return "rbxasset://textures/ui/VoiceChat/" .. v17 .. ".png";
end;
v15.init = function(v18)
    local v19, v20 = v8.createBinding(0);
    v18.level = v19;
    v18.updateLevel = v20;
    v19, v20 = v8.createBinding(v18.props.voiceState);
    v18.voiceState = v19;
    v18.updateVoiceState = v20;
    v18.renderStepName = l_HttpService_0:GenerateGUID();
    l_RunService_0:BindToRenderStep(v18.renderStepName, 1, function()
        v18.updateLevel(math.random());
    end);
    v18.levelIcon = v8.joinBindings({
        v18.voiceState,
        v18.level
    }):map(function(v21)
        local v22 = v21[1];
        local v23 = v21[2];
        if not (v22 ~= v13.VOICE_STATE.MUTED) or v22 == v13.VOICE_STATE.LOCAL_MUTED then
            return l_default_0:GetIcon("Muted", v18.props.iconStyle);
        elseif v22 == v13.VOICE_STATE.CONNECTING then
            return l_default_0:GetIcon("Connecting", v18.props.iconStyle);
        elseif v22 == v13.VOICE_STATE.INACTIVE then
            return l_default_0:GetIcon("Unmuted0", v18.props.iconStyle);
        elseif v22 == v13.VOICE_STATE.TALKING then
            return l_default_0:GetIcon("Unmuted" .. tostring(20 * math.floor(0.5 + 5 * v23)), v18.props.iconStyle);
        else
            return l_default_0:GetIcon("Error", v18.props.iconStyle);
        end;
    end);
end;
v15.renderWithSelectionCursor = function(v24, v25)
    local v26 = true;
    if v24.props.voiceState ~= v13.VOICE_STATE.ERROR then
        v26 = v24.props.voiceState == v13.VOICE_STATE.HIDDEN;
    end;
    if not v24.props.hideOnError or v24.props.voiceState and not v26 then
        local v27 = v24.props.voiceState == v13.VOICE_STATE.LOCAL_MUTED and 0.5 or 0;
        if v24.props.iconTransparency then
            local l_v27_0 = v27;
            v27 = if not v9.isBinding(v24.props.iconTransparency) then 1 - (1 - v24.props.iconTransparency) * (1 - l_v27_0) else v24.props.iconTransparency:map(function(v29)
                return 1 - (1 - v29) * (1 - l_v27_0);
            end);
        end;
        return v8.createElement("ImageButton", {
            Size = v24.props.size or UDim2.fromOffset(28, 28),
            BackgroundTransparency = 1,
            BorderSizePixel = 0,
            Image = v24.levelIcon,
            ImageTransparency = v27,
            SelectionImageObject = v25(l_CursorKind_0.RoundedRectNoInset),
            [v8.Event.Activated] = v24.props.onClicked
        });
    else
        return nil;
    end;
end;
v15.render = function(v30)
    return l_withSelectionCursorProvider_0(function(v31)
        return v30:renderWithSelectionCursor(v31);
    end);
end;
v15.didUpdate = function(v32, v33, _)
    v7:trace("Voice state updated to {} for ...{}", v32.props.voiceState, (string.sub(tostring(v32.props.userId), -4)));
    if v33.voiceState ~= v32.props.voiceState then
        v32.updateVoiceState(v32.props.voiceState);
    end;
end;
v15.willUnmount = function(v35)
    pcall(function()
        l_RunService_0:UnbindFromRenderStep(v35.renderStepName);
    end);
end;
return v10.connect(function(v36, v37)
    return {
        voiceState = v36.voiceState[v37.userId]
    };
end)(v15);


local l_CorePackages_0 = game:GetService("CorePackages");
local l_HttpService_0 = game:GetService("HttpService");
local l_RunService_0 = game:GetService("RunService");
local l_CoreGui_0 = game:GetService("CoreGui");
local l_TweenService_0 = game:GetService("TweenService");
local l_RobloxGui_0 = l_CoreGui_0:WaitForChild("RobloxGui");
local v6 = require(l_CorePackages_0.Packages.Roact);
local v7 = require(l_CorePackages_0.Packages.React);
local v8 = require(l_CorePackages_0.Packages.ReactIs);
local v9 = require(l_CorePackages_0.UIBlox);
local l_useSelectionCursor_0 = v9.App.SelectionImage.useSelectionCursor;
local l_CursorKind_0 = v9.App.SelectionImage.CursorKind;
local v12 = require(l_RobloxGui_0.Modules.VoiceChat.Hooks.useVoiceState);
local v13 = require(l_RobloxGui_0.Modules.InGameChat.BubbleChat.Constants);
local l_default_0 = require(l_RobloxGui_0.Modules.VoiceChat.VoiceChatServiceManager).default;
if require(l_RobloxGui_0.Modules.Flags.GetFFlagRemoveInGameChatBubbleChatReferences)() then
    v13 = require(l_RobloxGui_0.Modules.VoiceChat.Constants);
end;
local v15 = UDim2.fromOffset(28, 28);
local function _(v16)
    return v7.useMemo(function()
        return v6.joinBindings(v16);
    end, {});
end;
local function _(v18, v19)
    return function(v20)
        local v21 = v20[1];
        local v22 = v20[2];
        if not (v21 ~= v13.VOICE_STATE.MUTED) or v21 == v13.VOICE_STATE.LOCAL_MUTED then
            return l_default_0:GetIcon("Muted", v18);
        elseif v21 == v13.VOICE_STATE.CONNECTING then
            if v19 and v18 == "MicLight" then
                return l_default_0:GetIcon("Connecting", "MicDark");
            else
                return l_default_0:GetIcon("Connecting", v18);
            end;
        elseif v21 == v13.VOICE_STATE.INACTIVE then
            return l_default_0:GetIcon("Unmuted0", v18);
        elseif v21 == v13.VOICE_STATE.TALKING then
            return l_default_0:GetIcon("Unmuted" .. tostring(20 * math.floor(0.5 + 5 * v22)), v18);
        else
            return l_default_0:GetIcon("Error", v18);
        end;
    end;
end;
local v24 = {
    [v13.VOICE_STATE.ERROR] = true,
    [v13.VOICE_STATE.HIDDEN] = true
};
local function v25()
    return l_HttpService_0:GenerateGUID();
end;
local function v27(v26)
    return (l_TweenService_0:Create(v26:getValue(), TweenInfo.new(1, Enum.EasingStyle.Circular, Enum.EasingDirection.Out, -1), {
        Offset = Vector2.new(1, 0)
    }));
end;
return function(v28)
    local v29 = v12(v28.userId, v28.disable or false);
    local v30, v31 = v7.useBinding(0);
    local v32 = not (v28.selectable ~= nil) or v28.selectable;
    local v33, v34 = v7.useBinding(v29);
    local v35 = {
        v33,
        v30
    };
    local l_v35_0 = v35 --[[ copy: 8 -> 16 ]];
    local v37 = v7.useMemo(function()
        return v6.joinBindings(l_v35_0);
    end, {});
    v35 = v7.useRef(v25()).current or "";
    v34(v29);
    local v38 = v29 == v13.VOICE_STATE.TALKING;
    local v39 = v29 == v13.VOICE_STATE.CONNECTING;
    local v40 = v28.showConnectingShimmer == true;
    local v41 = v7.useRef(nil);
    v7.useEffect(function()
        if (not v40 or not v39) or not v41.current then
            return function()
            end;
        else
            local v42 = v27(v41);
            v42:Play();
            return function()
                v42:Cancel();
            end;
        end;
    end, {
        v39,
        v40
    });
    v7.useEffect(function()
        if v38 then
            l_RunService_0:BindToRenderStep(v35, 1, function()
                v31(math.random());
            end);
        end;
        return function()
            if v38 then
                l_RunService_0:UnbindFromRenderStep(v35);
            end;
        end;
    end, {
        v38
    });
    local v43 = not (v28.hideOnError and (not v29 or v24[v29]));
    local v44 = v29 == v13.VOICE_STATE.LOCAL_MUTED and 0.5 or 0;
    if v28.iconTransparency then
        local l_v44_0 = v44;
        v44 = if not v8.isBinding(v28.iconTransparency) then 1 - (1 - v28.iconTransparency) * (1 - l_v44_0) else v28.iconTransparency:map(function(v46)
            return 1 - (1 - v46) * (1 - l_v44_0);
        end);
    end;
    return v6.createElement("ImageButton", {
        Size = v28.size or v15,
        BackgroundTransparency = 1,
        BorderSizePixel = 0,
        Image = v7.useMemo(function()
            local l_v37_0 = v37;
            local l_iconStyle_0 = v28.iconStyle;
            local l_v40_0 = v40;
            return l_v37_0:map(function(v50)
                local v51 = v50[1];
                local v52 = v50[2];
                if not (v51 ~= v13.VOICE_STATE.MUTED) or v51 == v13.VOICE_STATE.LOCAL_MUTED then
                    return l_default_0:GetIcon("Muted", l_iconStyle_0);
                elseif v51 == v13.VOICE_STATE.CONNECTING then
                    if l_v40_0 and l_iconStyle_0 == "MicLight" then
                        return l_default_0:GetIcon("Connecting", "MicDark");
                    else
                        return l_default_0:GetIcon("Connecting", l_iconStyle_0);
                    end;
                elseif v51 == v13.VOICE_STATE.INACTIVE then
                    return l_default_0:GetIcon("Unmuted0", l_iconStyle_0);
                elseif v51 == v13.VOICE_STATE.TALKING then
                    return l_default_0:GetIcon("Unmuted" .. tostring(20 * math.floor(0.5 + 5 * v52)), l_iconStyle_0);
                else
                    return l_default_0:GetIcon("Error", l_iconStyle_0);
                end;
            end);
        end, {
            v28.iconStyle
        }),
        ImageTransparency = v44,
        Selectable = v32,
        SelectionImageObject = l_useSelectionCursor_0(l_CursorKind_0.RoundedRectNoInset),
        Visible = v43,
        [v6.Event.Activated] = v28.onClicked
    }, {
        ShimmerGradient = if not v40 then nil else v6.createElement("UIGradient", {
            Color = ColorSequence.new({
                ColorSequenceKeypoint.new(0, Color3.new(0.6, 0.6, 0.6)),
                ColorSequenceKeypoint.new(0.5, Color3.new(0.8, 0.8, 0.8)),
                ColorSequenceKeypoint.new(1, Color3.new(0.6, 0.6, 0.6))
            }),
            Enabled = v39,
            Rotation = -45,
            Offset = Vector2.new(-1, 0),
            [v6.Ref] = v41
        })
    });
end;


local l_default_0 = require(game:GetService("CoreGui"):WaitForChild("RobloxGui").Modules.VoiceChat.VoiceChatServiceManager).default;
return function(v1, v2)
    return l_default_0:GetIcon(v1, v2);
end;


local l_CoreGui_0 = game:GetService("CoreGui");
local l_RobloxGui_0 = l_CoreGui_0:WaitForChild("RobloxGui");
local v2 = require(l_CoreGui_0.RobloxGui.Modules.Settings.getCamMicPermissions);
local l_default_0 = require(game:GetService("CorePackages").Workspace.Packages.PermissionsProtocol).PermissionsProtocol.default;
if not require(l_RobloxGui_0.Modules.Flags.getFFlagDoNotPromptCameraPermissionsOnMount)() then
    return function(v4)
        v2(function(v5)
            v4(v5.hasCameraPermissions, v5.hasMicPermissions);
        end);
    end;
else
    return function(v6, v7, v8)
        local v9 = nil;
        if v7 then
            if v7 == "camera" then
                v9 = {
                    l_default_0.Permissions.CAMERA_ACCESS
                };
            elseif v7 == "microphone" then
                v9 = {
                    l_default_0.Permissions.MICROPHONE_ACCESS
                };
            end;
        end;
        v2(function(v10)
            v6(v10.hasCameraPermissions, v10.hasMicPermissions);
        end, v9, v8, "ExperienceChat.getPermissions");
    end;
end;


local l_RobloxGui_0 = game:GetService("CoreGui"):WaitForChild("RobloxGui");
local _ = require(game:GetService("CorePackages").Promise);
local l_default_0 = require(l_RobloxGui_0.Modules.VoiceChat.VoiceChatServiceManager).default;
return function()
    return l_default_0:asyncInit();
end;


local l_FaceAnimatorService_0 = game:GetService("FaceAnimatorService");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_Modules_0.SelfView.Analytics).new();
local v3 = require(l_Modules_0.SelfView.publicApi);
local v4 = require(l_Modules_0.SelfView.toggleSelfViewSignal);
return function()
    if not (not l_FaceAnimatorService_0 or not l_FaceAnimatorService_0:IsStarted()) then
        l_FaceAnimatorService_0.VideoAnimationEnabled = not l_FaceAnimatorService_0.VideoAnimationEnabled;
        v2:setLastCtx("bubbleChatToggle");
        local v5 = v3.getSelfViewIsOpenAndVisible();
        if not (not l_FaceAnimatorService_0.VideoAnimationEnabled or v5) then
            v4:fire();
        end;
    end;
end;


local l_Players_0 = game:GetService("Players");
local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_RobloxGui_0 = l_CoreGui_0:WaitForChild("RobloxGui");
local l_Constants_0 = require(l_CorePackages_0.Workspace.Packages.VoiceChat).Constants;
local l_default_0 = require(l_RobloxGui_0.Modules.VoiceChat.VoiceChatServiceManager).default;
local v6 = require(l_RobloxGui_0.Modules.SelfView.Analytics).new();
return function(v7, v8, v9)
    local l_LocalPlayer_0 = l_Players_0.LocalPlayer;
    if l_LocalPlayer_0 then
        if v7 == tostring(l_LocalPlayer_0.UserId) then
            if v8 == l_Constants_0.VOICE_STATE.ERROR then
                l_default_0:RejoinPreviousChannel();
                return ;
            elseif v8 == l_Constants_0.VOICE_STATE.CONNECTING then
                l_default_0:ShowVoiceChatLoadingMessage();
                return ;
            else
                v6:setLastCtx("bubbleChatToggle");
                l_default_0:ToggleMic(v9);
                return ;
            end;
        else
            l_default_0:ToggleMutePlayer(tonumber(v7), v9);
        end;
    end;
end;


local l_RobloxGui_0 = game:GetService("CoreGui"):WaitForChild("RobloxGui");
return {
    selfViewVisibilityUpdatedSignal = require(l_RobloxGui_0.Modules.SelfView.selfViewVisibilityUpdatedSignal),
    getSelfViewVisibility = require(l_RobloxGui_0.Modules.SelfView.publicApi).getSelfViewIsOpenAndVisible
};


return {
    VOICE_CONTEXT_TYPE = {
        USER_AGENCY = "useragency",
        BUBBLE_CHAT = "bubblechat",
        IN_GAME_MENU = "ingamemenu",
        MUTE_TOGGLES = "mutetoggles",
        REPORT_MENU = "reportmenu",
        EASIER_UNMUTING = "easierunmuting",
        UNKNOWN = "unknown"
    },
    VOICE_JOIN_PROGRESS = {
        Idle = "Idle",
        Joining = "Joining",
        Suspended = "Suspended",
        Joined = "Joined",
        Left = "Left"
    },
    VOICE_GROUP_TYPE = {
        ALL = "all",
        FRIENDS = "friends",
        NONFRIENDS = "nonfriends"
    },
    VOICE_STATE = {
        INACTIVE = "Inactive",
        TALKING = "Talking",
        CONNECTING = "Connecting",
        MUTED = "Muted",
        LOCAL_MUTED = "LOCAL_MUTED",
        ERROR = "Error",
        HIDDEN = "Hidden"
    },
    BAN_REASON = {
        NUDGE_V3 = 7
    }
};


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


local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(l_CorePackages_0.Packages.React);
local l_Players_0 = game:GetService("Players");
local l_RobloxGui_0 = game:GetService("CoreGui"):WaitForChild("RobloxGui");
local l_BlockedStatusChangedEvent_0 = require(l_RobloxGui_0.Modules.BlockingUtility):GetBlockedStatusChangedEvent();
local l_default_0 = require(script.Parent.Parent.VoiceChatServiceManager).default;
local v6 = require(l_RobloxGui_0.Modules.VoiceChat.VoiceStateContext);
local l_VOICE_STATE_0 = require(l_CorePackages_0.Workspace.Packages.VoiceChat).Constants.VOICE_STATE;
local l_LocalPlayer_0 = l_Players_0.LocalPlayer;
while not l_LocalPlayer_0 do
    l_Players_0:GetPropertyChangedSignal("LocalPlayer"):Wait();
    l_LocalPlayer_0 = l_Players_0.LocalPlayer;
end;
local v9 = not not l_LocalPlayer_0 and l_LocalPlayer_0.UserId or 0;
local v10 = nil;
v10 = if not game:GetEngineFeature("VoiceChatSupported") then {
    Idle = 1,
    Joining = 2,
    JoiningRetry = 3,
    Joined = 4,
    Leaving = 5,
    Ended = 6,
    Failed = 7
} else Enum.VoiceChatState;
local v11 = {
    [v10.Idle] = l_VOICE_STATE_0.HIDDEN,
    [v10.Joining] = l_VOICE_STATE_0.CONNECTING,
    [v10.JoiningRetry] = l_VOICE_STATE_0.CONNECTING,
    [v10.Joined] = l_VOICE_STATE_0.MUTED,
    [v10.Leaving] = l_VOICE_STATE_0.MUTED,
    [v10.Ended] = l_VOICE_STATE_0.HIDDEN,
    [v10.Failed] = l_VOICE_STATE_0.ERROR
};
local function _(v12)
    if v11[v12] then
        return v11[v12];
    else
        return l_VOICE_STATE_0.MUTED;
    end;
end;
local function _(v14)
    local l_INACTIVE_0 = l_VOICE_STATE_0.INACTIVE;
    if not v14.subscriptionFailed then
        if v14.subscriptionCompleted then
            if not v14.isMutedLocally then
                if not v14.isMuted then
                    if v14.isSignalActive then
                        l_INACTIVE_0 = l_VOICE_STATE_0.TALKING;
                    end;
                    return l_INACTIVE_0;
                else
                    return l_VOICE_STATE_0.MUTED;
                end;
            else
                return l_VOICE_STATE_0.LOCAL_MUTED;
            end;
        else
            return l_VOICE_STATE_0.CONNECTING;
        end;
    else
        return l_VOICE_STATE_0.ERROR;
    end;
end;
return function(v17, v18, v19)
    local v20 = not not v19 and v19.voiceChatServiceManager or l_default_0;
    local v21 = v1.useContext(v6.Context);
    local v22, v23 = v1.useState(l_VOICE_STATE_0.HIDDEN);
    v1.useEffect(function()
        if not (not v21.voiceEnabled or not v17) and not v18 then
            local v24 = tonumber(v17);
            local v25 = tostring(v17);
            local v26 = v9 == v24;
            local v27 = nil;
            local v28 = {};
            local v29 = false;
            local function _(v30)
                if not v29 then
                    v23(v30);
                end;
            end;
            local function v37(v32)
                local l_v22_0 = v22;
                if not v26 then
                    local v34 = v20.participants[v25];
                    if not (not v34 or v27) then
                        local l_INACTIVE_1 = l_VOICE_STATE_0.INACTIVE;
                        if not v34.subscriptionFailed then
                            if v34.subscriptionCompleted then
                                if not v34.isMutedLocally then
                                    if not v34.isMuted then
                                        if v34.isSignalActive then
                                            l_INACTIVE_1 = l_VOICE_STATE_0.TALKING;
                                        end;
                                    else
                                        l_INACTIVE_1 = l_VOICE_STATE_0.MUTED;
                                    end;
                                else
                                    l_INACTIVE_1 = l_VOICE_STATE_0.LOCAL_MUTED;
                                end;
                            else
                                l_INACTIVE_1 = l_VOICE_STATE_0.CONNECTING;
                            end;
                        else
                            l_INACTIVE_1 = l_VOICE_STATE_0.ERROR;
                        end;
                        l_v22_0 = l_INACTIVE_1;
                    end;
                else
                    l_v22_0 = if v11[v32] then v11[v32] else l_VOICE_STATE_0.MUTED;
                end;
                if v32 == v10.Failed then
                    if not v26 then
                        l_v22_0 = l_VOICE_STATE_0.HIDDEN;
                    end;
                elseif not ((not (v32 == v10.Joined) or v20.localMuted) or not v26) then
                    l_v22_0 = if not v20.isTalking then if v20.localMuted then l_VOICE_STATE_0.MUTED else l_VOICE_STATE_0.INACTIVE else l_VOICE_STATE_0.TALKING;
                end;
                local l_l_v22_0_0 = l_v22_0;
                if not v29 then
                    v23(l_l_v22_0_0);
                end;
            end;
            v37(v21.voiceState);
            delay(0, function()
                if not v29 then
                    v37(v21.voiceState);
                    if not v26 then
                        table.insert(v28, v20.participantsUpdate.Event:Connect(function(v38)
                            local v39 = v38[v25];
                            if not v39 or v27 then
                                local l_HIDDEN_0 = l_VOICE_STATE_0.HIDDEN;
                                if not v29 then
                                    v23(l_HIDDEN_0);
                                end;
                            else
                                local l_INACTIVE_2 = l_VOICE_STATE_0.INACTIVE;
                                if not v39.subscriptionFailed then
                                    if v39.subscriptionCompleted then
                                        if not v39.isMutedLocally then
                                            if not v39.isMuted then
                                                if v39.isSignalActive then
                                                    l_INACTIVE_2 = l_VOICE_STATE_0.TALKING;
                                                end;
                                            else
                                                l_INACTIVE_2 = l_VOICE_STATE_0.MUTED;
                                            end;
                                        else
                                            l_INACTIVE_2 = l_VOICE_STATE_0.LOCAL_MUTED;
                                        end;
                                    else
                                        l_INACTIVE_2 = l_VOICE_STATE_0.CONNECTING;
                                    end;
                                else
                                    l_INACTIVE_2 = l_VOICE_STATE_0.ERROR;
                                end;
                                local l_l_INACTIVE_2_0 = l_INACTIVE_2;
                                if not v29 then
                                    v23(l_l_INACTIVE_2_0);
                                    return ;
                                end;
                            end;
                        end));
                        table.insert(v28, v20.participantLeft.Event:Connect(function(_, v44)
                            if v44 == v24 then
                                local l_HIDDEN_1 = l_VOICE_STATE_0.HIDDEN;
                                if not v29 then
                                    v23(l_HIDDEN_1);
                                end;
                            end;
                        end));
                        table.insert(v28, v20.participantJoined.Event:Connect(function(_, v47)
                            if v47 == v24 then
                                local l_HIDDEN_2 = l_VOICE_STATE_0.HIDDEN;
                                if not v29 then
                                    v23(l_HIDDEN_2);
                                end;
                            end;
                        end));
                        table.insert(v28, l_BlockedStatusChangedEvent_0:Connect(function(v49, v50)
                            if v24 == v49 then
                                if not v50 then
                                    v27 = nil;
                                    local v51 = v20.participants[v25];
                                    if not v51 then
                                        local l_HIDDEN_3 = l_VOICE_STATE_0.HIDDEN;
                                        if not v29 then
                                            v23(l_HIDDEN_3);
                                        end;
                                    else
                                        local l_INACTIVE_3 = l_VOICE_STATE_0.INACTIVE;
                                        if not v51.subscriptionFailed then
                                            if v51.subscriptionCompleted then
                                                if not v51.isMutedLocally then
                                                    if not v51.isMuted then
                                                        if v51.isSignalActive then
                                                            l_INACTIVE_3 = l_VOICE_STATE_0.TALKING;
                                                        end;
                                                    else
                                                        l_INACTIVE_3 = l_VOICE_STATE_0.MUTED;
                                                    end;
                                                else
                                                    l_INACTIVE_3 = l_VOICE_STATE_0.LOCAL_MUTED;
                                                end;
                                            else
                                                l_INACTIVE_3 = l_VOICE_STATE_0.CONNECTING;
                                            end;
                                        else
                                            l_INACTIVE_3 = l_VOICE_STATE_0.ERROR;
                                        end;
                                        local l_l_INACTIVE_3_0 = l_INACTIVE_3;
                                        if not v29 then
                                            v23(l_l_INACTIVE_3_0);
                                            return ;
                                        end;
                                    end;
                                else
                                    v27 = true;
                                    local l_HIDDEN_4 = l_VOICE_STATE_0.HIDDEN;
                                    if not v29 then
                                        v23(l_HIDDEN_4);
                                        return ;
                                    end;
                                end;
                            end;
                        end));
                        return ;
                    else
                        table.insert(v28, v20.talkingChanged.Event:Connect(function(v56)
                            local v57 = if not v56 then l_VOICE_STATE_0.INACTIVE else l_VOICE_STATE_0.TALKING;
                            if not v29 then
                                v23(v57);
                            end;
                        end));
                        table.insert(v28, v20.muteChanged.Event:Connect(function(v58)
                            local v59 = if not v58 then l_VOICE_STATE_0.INACTIVE else l_VOICE_STATE_0.MUTED;
                            if not v29 then
                                v23(v59);
                            end;
                        end));
                        return ;
                    end;
                else
                    return ;
                end;
            end);
            return function()
                v29 = true;
                delay(0, function()
                    for _, v61 in v28, nil, nil do
                        v61:disconnect();
                    end;
                end);
            end;
        else
            v23(l_VOICE_STATE_0.HIDDEN);
            return function()
            end;
        end;
    end, {
        v17,
        v21.voiceState,
        v18 == true
    });
    return v22;
end;


local v0 = require(script.Parent.Parent.Logger):new("VoiceChatLogger");
return function(v1)
    return v0:new(v1);
end;


local v0 = {};
v0.__index = v0;
v0.new = function(v1, v2, v3, v4)
    return (setmetatable({
        IsEnabled = v1,
        EnableVoice = v2,
        GetPropertyChangedSignal = v3,
        GetClientFeaturesAsync = v4
    }, v0));
end;
return v0;


local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(game:GetService("CoreGui"):WaitForChild("RobloxGui").Modules.Flags.FFlagEnableVoiceChatStorybookFix);
local v2 = require(l_CorePackages_0.Packages.Cryo);
local v3 = require(l_CorePackages_0.Packages.Rodux);
local v4 = nil;
v4 = if not v1() then require(script.Parent.Parent.VoiceChatServiceManager).default.VOICE_STATE else require(l_CorePackages_0.Workspace.Packages.VoiceChat).Constants.VOICE_STATE;
return (v3.createReducer({}, {
    [require(script.Parent.Parent.Actions.VoiceEnabledChanged).name] = function(v5, v6)
        return v2.Dictionary.join(v5, {
            voiceEnabled = v6.enabled
        });
    end,
    [require(script.Parent.Parent.Actions.ParticipantAdded).name] = function(v7, v8)
        local l_userId_0 = v8.userId;
        return v2.Dictionary.join(v7, {
            [l_userId_0] = v7[l_userId_0] or v4.HIDDEN
        });
    end,
    [require(script.Parent.Parent.Actions.ParticipantRemoved).name] = function(v10, v11)
        return v2.Dictionary.join(v10, {
            [v11.userId] = v2.None
        });
    end,
    [require(script.Parent.Parent.Actions.ParticipantsChanged).name] = function(v12, v13)
        local l_newParticipants_0 = v13.newParticipants;
        local v15 = table.clone(v12);
        for v16, v17 in l_newParticipants_0, nil, nil do
            local l_INACTIVE_0 = v4.INACTIVE;
            if v17.subscriptionCompleted then
                if not v17.isMutedLocally then
                    if not v17.isMuted then
                        if v17.isSignalActive then
                            l_INACTIVE_0 = v4.TALKING;
                        end;
                    else
                        l_INACTIVE_0 = v4.MUTED;
                    end;
                else
                    l_INACTIVE_0 = v4.LOCAL_MUTED;
                end;
            else
                l_INACTIVE_0 = v4.CONNECTING;
            end;
            v15[tostring(v16)] = l_INACTIVE_0;
        end;
        return v15;
    end,
    [require(script.Parent.Parent.Actions.VoiceStateChanged).name] = function(v19, v20)
        if not v19[v20.userId] then
            return v19;
        else
            return v2.Dictionary.join(v19, {
                [v20.userId] = v20.newState
            });
        end;
    end
}));


local _ = require(script.Parent.VoiceChatServiceManager);
local v1 = {
    voice = "voice",
    text = "text",
    other = "other"
};
GetDefaultMethodOfAbuse = function(v2, v3)
    if not v2 then
        if not v3:GetMutedAnyone() then
            return v1.text;
        else
            return v1.voice;
        end;
    elseif not v3:getRecentUsersInteractionData()[tostring(v2.UserId)] then
        return v1.text;
    else
        return v1.voice;
    end;
end;
return {
    MethodsOfAbuse = v1,
    GetDefaultMethodOfAbuse = GetDefaultMethodOfAbuse
};