local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local l_TextService_0 = game:GetService("TextService");
local v3 = require(l_CorePackages_0.Roact);
local v4 = require(l_CorePackages_0.RoactRodux);
local v5 = require(l_CorePackages_0.Packages.t);
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v7 = require(l_Modules_0.LuaApp.Components.TopBar.TopBar);
local v8 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Components.PeekabooWidget);
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local l_getSafeAreaSize_0 = require(l_CorePackages_0.Workspace.Packages.InputUi).getSafeAreaSize;
local v11 = require(l_CorePackages_0.Packages.RoactGamepad);
local l_Focusable_0 = v11.Focusable;
local v13 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.withMappedNavigationParams);
local v14 = require(l_Modules_0.AvatarExperience.Common.Components.GamepadFocusHandlerForPage);
local _ = require(l_Modules_0.AvatarExperience.Common.AvatarExperienceState);
local v16 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.withStackVisibilityWrapper);
local v17 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local v18 = require(l_Modules_0.AvatarExperience.Common.Components.SliderWithLabelAndIcons);
local v19 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Components.ProfilePictureEditorBottomBar);
local v20 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Actions.SetCameraSliderZoom);
local v21 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Actions.SetCameraSliderRotate);
local v22 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Actions.SetFinalPageViewMode);
local v23 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Constants);
local v24 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.PPEThumbnailType);
local l_DeviceOrientationMode_0 = require(l_CorePackages_0.Workspace.Packages.RobloxAppEnums).DeviceOrientationMode;
local v26 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Services.Analytics);
local v27 = require(l_Modules_0.AvatarExperience.Common.Components.BottomInsetBackground);
local v28 = require(l_Modules_0.AvatarExperience.Flags.FFlagAXF10ftFixPeekabooWidget);
local v29 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagAXEnableRevertPpeCustomizationFlow);
local v30 = require(l_CorePackages_0.UIBlox);
local l_withStyle_0 = v30.Style.withStyle;
local l_ButtonStack_0 = v30.App.Button.ButtonStack;
local l_ButtonType_0 = v30.App.Button.Enum.ButtonType;
local l_Images_0 = v30.App.ImageSet.Images;
local l_ImageSetLabel_0 = v30.Core.ImageSet.ImageSetLabel;
local v36 = v3.PureComponent:extend("ProfilePictureEditorCameraPage");
local v37 = l_Images_0["icons/actions/zoomIn"];
local v38 = l_Images_0["icons/actions/zoomOut"];
local v39 = l_Images_0["icons/actions/cycleLeft"];
local v40 = l_Images_0["icons/actions/cycleRight"];
v36.validateProps = v5.strictInterface({
    focusController = v5.optional(v5.table),
    avatarRoute = v5.table,
    navigation = v5.table,
    profilePictureEditorAnalytics = v5.table,
    zoomSliderValue = v5.number,
    rotateSliderValue = v5.number,
    globalGuiInset = v5.strictInterface({
        left = v5.integer,
        top = v5.integer,
        right = v5.integer,
        bottom = v5.integer
    }),
    screenSize = if not v28 then v5.Vector2 else nil,
    isPortrait = v5.boolean,
    setCameraSliderZoom = v5.callback,
    setCameraSliderRotate = v5.callback,
    setFinalPageViewMode = v5.callback
});
v36.init = function(v41)
    v41.focusController = v41.props.focusController or v11.createFocusController();
    v41.topBarRef = v3.createRef();
    v41.bottomBarRef = v3.createRef();
    v41.defaultPositionRef = v3.createRef();
    v41.zoomSliderRef = v3.createRef();
    v41.rotateSliderRef = v3.createRef();
    v41.goBack = function()
        v41.props.navigation.goBack();
    end;
    v41.onNext = function()
        v41.props.profilePictureEditorAnalytics.clickNextFromCameraPage(v41.props.zoomSliderValue ~= 0, v41.props.rotateSliderValue ~= 0);
        v41.props.setFinalPageViewMode();
        v41.props.navigation.navigate(v17.ProfilePictureEditorFinal, {});
    end;
    v41.onDefaultPosition = function()
        v41.props.profilePictureEditorAnalytics.clickDefaultPositionsFromCameraPage();
        v41.props.setCameraSliderZoom(0);
        v41.props.setCameraSliderRotate(0);
    end;
    v41.onZoomChanged = function(v42)
        v41.props.setCameraSliderZoom(v42);
    end;
    v41.onRotateChanged = function(v43)
        v41.props.setCameraSliderRotate(v43);
    end;
    v41.zoomToPoint = function(v44, _)
        v41.props.setCameraSliderZoom((math.clamp(v41.props.zoomSliderValue + v44 * 2, -v23.SliderMax, v23.SliderMax)));
    end;
    v41.rotateByPixels = function(v46)
        v41.props.setCameraSliderRotate((math.clamp(v41.props.rotateSliderValue + v46 * 1, -v23.SliderMax, v23.SliderMax)));
    end;
end;
v36.renderMiddleContents = function(_, v48)
    return v3.createElement(l_ImageSetLabel_0, {
        Size = UDim2.fromScale(1, 1),
        Position = UDim2.fromOffset(0, 0),
        Image = v23.CircleCutoutAsset,
        ImageColor3 = v48.Theme.BackgroundDefault.Color,
        BackgroundTransparency = 1,
        ZIndex = 4
    });
end;
v36.renderBottomContents = function(v49, v50, v51)
    local l_Font_0 = v51.Font;
    local v53 = l_Font_0.Header2.RelativeSize * l_Font_0.BaseSize;
    local l_Font_1 = l_Font_0.Header2.Font;
    local l_zoomSliderValue_0 = v49.props.zoomSliderValue;
    local l_rotateSliderValue_0 = v49.props.rotateSliderValue;
    local v57 = false;
    if l_zoomSliderValue_0 == 0 then
        v57 = l_rotateSliderValue_0 == 0;
    end;
    return v3.createElement(l_Focusable_0.Frame, {
        BackgroundTransparency = 1,
        Size = UDim2.new(1, 0, 1, 0),
        NextSelectionUp = v49.topBarRef,
        NextSelectionDown = v49.bottomBarRef
    }, {
        ListLayout = v3.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Vertical,
            SortOrder = Enum.SortOrder.LayoutOrder,
            HorizontalAlignment = Enum.HorizontalAlignment.Center
        }),
        ButtonTopPadding = v3.createElement("Frame", {
            Size = UDim2.fromScale(1, 0.05),
            BorderSizePixel = 0,
            BackgroundTransparency = 1,
            LayoutOrder = 1
        }, {
            uiSizeConstraint = v3.createElement("UISizeConstraint", {
                MaxSize = Vector2.new(math.huge, 50)
            })
        }),
        ButtonFrame = v3.createElement(l_Focusable_0.Frame, {
            Size = UDim2.new(0, l_TextService_0:GetTextSize(v50.defaultPosition, v53, l_Font_1, Vector2.new(10000, 10000)).X + 20, 0, 36),
            BorderSizePixel = 0,
            BackgroundTransparency = 1,
            LayoutOrder = 2,
            [v3.Ref] = v49.defaultPositionRef,
            NextSelectionUp = v49.topBarRef,
            NextSelectionDown = v49.zoomSliderRef
        }, {
            ButtonStack = v3.createElement(l_ButtonStack_0, {
                buttons = {
                    {
                        buttonType = l_ButtonType_0.PrimarySystem,
                        props = {
                            onActivated = v49.onDefaultPosition,
                            text = v50.defaultPosition,
                            isDisabled = v57
                        }
                    }
                }
            })
        }),
        AboveSliderPadding = v3.createElement("Frame", {
            Size = UDim2.new(1, 0, 0, 10),
            BorderSizePixel = 0,
            BackgroundTransparency = 1,
            LayoutOrder = 3
        }),
        ZoomSlider = v3.createElement(v18, {
            text = v50.zoom,
            onSliderChanged = v49.onZoomChanged,
            layoutOrder = 4,
            value = l_zoomSliderValue_0,
            leftIcon = v38,
            rightIcon = v37,
            min = -v23.SliderMax,
            max = v23.SliderMax,
            baseRef = v49.zoomSliderRef,
            NextSelectionUp = v49.defaultPositionRef,
            NextSelectionDown = v49.rotateSliderRef
        }),
        BetweenSliderPadding = v3.createElement("Frame", {
            Size = UDim2.new(1, 0, 0, 10),
            BorderSizePixel = 0,
            BackgroundTransparency = 1,
            LayoutOrder = 5
        }),
        RotateSlider = v3.createElement(v18, {
            text = v50.rotate,
            onSliderChanged = v49.onRotateChanged,
            layoutOrder = 6,
            value = l_rotateSliderValue_0,
            leftIcon = v39,
            rightIcon = v40,
            min = -v23.SliderMax,
            max = v23.SliderMax,
            baseRef = v49.rotateSliderRef,
            NextSelectionUp = v49.zoomSliderRef,
            NextSelectionDown = v49.bottomBarRef
        })
    });
end;
v36.renderWithProviders = function(v58, v59, v60)
    local l_screenSize_0 = v58.props.screenSize;
    local l_globalGuiInset_0 = v58.props.globalGuiInset;
    return v3.createElement(l_Focusable_0.Frame, {
        BackgroundTransparency = 1,
        BorderSizePixel = 0,
        Size = if not v28 then l_getSafeAreaSize_0(l_screenSize_0, l_globalGuiInset_0) else UDim2.fromScale(1, 1),
        Position = UDim2.new(0, 0, 0, 0),
        Active = true,
        focusController = v58.focusController,
        defaultChild = v58.zoomSliderRef,
        [v3.Ref] = v58.props[v3.Ref],
        inputBindings = {
            NavUp = v11.Input.onBegin(Enum.KeyCode.ButtonB, function()
                v58.focusController.moveFocusTo(v58.topBarRef);
            end)
        }
    }, {
        GamepadFocusHandlerForPage = v3.createElement(v14, {
            focusController = v58.focusController,
            captureFocusOnMount = true
        }),
        SimpleTopBar = v3.createElement(v7.Container, {
            titleText = v59.title,
            [v3.Ref] = v58.topBarRef,
            NextSelectionDown = v58.defaultPositionRef,
            transparentBackground = true,
            hideSiteMessageBanner = v58.props.isPortrait,
            leftItem = v7.BackButton
        }),
        PeekabooWidget = v3.createElement(v8, {
            viewportYScale = 0.375,
            viewportXScale = 0.6666666666666666,
            topMarginYScale = 0.125,
            renderBottomContents = function()
                return v58:renderBottomContents(v59, v60);
            end,
            renderMiddleContents = function()
                return v58:renderMiddleContents(v60);
            end,
            zoomToPoint = v58.zoomToPoint,
            rotateByPixels = v58.rotateByPixels
        }),
        BottomBar = v3.createElement(v19, {
            baseRef = v58.bottomBarRef,
            NextSelectionUp = v58.rotateSliderRef,
            button1 = {
                textKey = "Authentication.CrossDevice.Action.GoBack",
                onActivated = v58.goBack
            },
            button2 = {
                textKey = "Authentication.CrossDevice.Action.Next",
                onActivated = v58.onNext
            }
        }),
        BottomInsetBackground = if not (l_globalGuiInset_0.bottom > 0) then nil else v3.createElement(v27, {
            globalGuiInset = l_globalGuiInset_0
        })
    });
end;
v36.render = function(v63)
    return l_withLocalization_0({
        title = "Feature.Avatar.Label.PPEPositionCameraHeader",
        defaultPosition = not v29() and "Feature.Avatar.Action.Default" or "Feature.Avatar.Action.Reset",
        zoom = "Feature.Avatar.Action.Zoom",
        rotate = "Feature.Avatar.Action.Rotate"
    })(function(v64)
        return l_withStyle_0(function(v65)
            return v63:renderWithProviders(v64, v65);
        end);
    end);
end;
return (l_RoactServices_0.connect({
    profilePictureEditorAnalytics = v26
})((v13((v16((v4.connect(function(v66, _)
    return {
        isPortrait = v66.DeviceOrientation == l_DeviceOrientationMode_0.Portrait,
        globalGuiInset = v66.GlobalGuiInset,
        screenSize = if not v28 then v66.ScreenSize else nil,
        zoomSliderValue = v66.AvatarExperience.ProfilePictureEditor.CameraSliders.zoomSliderValue,
        rotateSliderValue = v66.AvatarExperience.ProfilePictureEditor.CameraSliders.rotateSliderValue
    };
end, function(v68)
    return {
        setCameraSliderZoom = function(v69)
            return v68(v20(v69));
        end,
        setCameraSliderRotate = function(v70)
            return v68(v21(v70));
        end,
        setFinalPageViewMode = function()
            return v68(v22(v24.Closeup));
        end
    };
end)(v36))))))));


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local l_TextService_0 = game:GetService("TextService");
local v3 = require(l_CorePackages_0.Roact);
local v4 = require(l_CorePackages_0.RoactRodux);
local v5 = require(l_CorePackages_0.Packages.t);
local v6 = require(l_CorePackages_0.Otter);
local l_CameraUtility_0 = require(l_CorePackages_0.Thumbnailing).CameraUtility;
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v9 = require(l_Modules_0.LuaApp.Services.RoactNetworking);
local l_RoactAppPolicy_0 = require(l_CorePackages_0.Workspace.Packages.UniversalAppPolicy).RoactAppPolicy;
local v11 = require(l_Modules_0.LuaApp.Components.TopBar.TopBar);
local l_withLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).withLocalization;
local l_getSafeAreaSize_0 = require(l_CorePackages_0.Workspace.Packages.InputUi).getSafeAreaSize;
local v14 = require(l_CorePackages_0.Packages.RoactGamepad);
local l_Focusable_0 = v14.Focusable;
local v16 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.withMappedNavigationParams);
local v17 = require(l_Modules_0.AvatarExperience.Common.Components.GamepadFocusHandlerForPage);
local v18 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Components.PeekabooWidget);
local v19 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.withStackVisibilityWrapper);
local v20 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local v21 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Components.ProfilePictureEditorBottomBar);
local v22 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Constants);
local v23 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.PPEThumbnailType);
local v24 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Utils);
local v25 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Thunks.WritePPEConfig);
local v26 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Actions.SetFinalPageViewMode);
local v27 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Services.Analytics);
local l_DeviceOrientationMode_0 = require(l_CorePackages_0.Workspace.Packages.RobloxAppEnums).DeviceOrientationMode;
local v29 = require(l_Modules_0.AvatarExperience.Common.Components.BottomInsetBackground);
local v30 = require(l_Modules_0.AvatarExperience.Common.Util.IXPUtils);
local v31 = require(l_Modules_0.AvatarExperience.Flags.AXAlternateLandingPageIXP);
local v32 = require(l_Modules_0.AvatarExperience.Flags.FFlagAXF10ftFixPeekabooWidget);
local v33 = require(l_CorePackages_0.UIBlox);
local l_ImageSetLabel_0 = v33.Core.ImageSet.ImageSetLabel;
local l_ButtonStack_0 = v33.App.Button.ButtonStack;
local l_ButtonType_0 = v33.App.Button.Enum.ButtonType;
local l_withStyle_0 = v33.Style.withStyle;
local v38 = {
    frequency = 1 / v22.FullscreenTweenTimeSeconds,
    dampingRatio = 1
};
local v39 = v3.PureComponent:extend("ProfilePictureEditorFinalPage");
v39.validateProps = v5.strictInterface({
    focusController = v5.optional(v5.table),
    avatarRoute = v5.table,
    globalGuiInset = v5.strictInterface({
        left = v5.integer,
        top = v5.integer,
        right = v5.integer,
        bottom = v5.integer
    }),
    screenSize = v5.Vector2,
    fieldOfViewDeg = v5.optional(v5.number),
    zoomSliderValue = v5.number,
    rotateSliderValue = v5.number,
    emoteAssetId = v5.optional(v5.string),
    finalPageViewMode = v5.userdata,
    currentCharacter = v5.optional(v5.instanceIsA("Model", nil)),
    equippedAssets = v5.optional(v5.table),
    isPortrait = v5.boolean,
    writePPEConfig = v5.callback,
    setFinalPageViewMode = v5.callback,
    navigation = v5.table,
    networking = v5.callback,
    profilePictureEditorAnalytics = v5.table,
    alternateAvatarLandingScreenEnabled = v5.optional(v5.boolean),
    shouldSkipLandingPage = v5.boolean
});
v39.init = function(v40)
    v40.focusController = v40.props.focusController or v14.createFocusController();
    v40.topBarRef = v3.createRef();
    v40.bottomBarRef = v3.createRef();
    v40.toggleFullViewButtonRef = v3.createRef();
    v40.goBack = function()
        v40.props.navigation.goBack();
    end;
    v40.onSave = function()
        v40:writePPEConfig();
        local _ = nil;
        v40.props.navigation.navigate(if not v40.props.shouldSkipLandingPage then if v40.props.alternateAvatarLandingScreenEnabled then v20.Catalog else v20.AvatarExperienceLandingPage else v20.Catalog);
    end;
    v40.toggleFinalPageViewMode = function()
        v40.props.setFinalPageViewMode(if v40.props.finalPageViewMode == v23.Closeup then v23.FullBody else v23.Closeup);
    end;
    v40:setState({
        isAnimating = false
    });
    local v42, v43 = v3.createBinding(0);
    v40.animationBinding = v42;
    v40.animationBindingUpdate = v43;
    v40.sizeBinding = v40.animationBinding:map(function(v44)
        return UDim2.fromScale(1 + v44, 1 + v44);
    end);
    v40.motor = v6.createSingleMotor(0);
    v40.motor:onStep(v40.animationBindingUpdate);
    v40.motor:onComplete(function()
        v40:setState({
            isAnimating = false
        });
    end);
end;
v39.writePPEConfig = function(v45)
    v45.props.writePPEConfig(v45.props.networking, v45.props.profilePictureEditorAnalytics, v45.props.emoteAssetId, v24.getCameraDistanceScaleFromSliderValue(v45.props.zoomSliderValue), v24.getYRotDegFromSliderValue(v45.props.rotateSliderValue), v45.props.fieldOfViewDeg);
end;
v39.renderBottomContents = function(v46, v47, v48)
    local l_Theme_0 = v48.Theme;
    local l_Font_0 = v48.Font;
    local l_BaseSize_0 = l_Font_0.BaseSize;
    local v52 = l_Font_0.Header1.RelativeSize * l_BaseSize_0;
    local l_Font_1 = l_Font_0.Header1.Font;
    local v54 = l_getSafeAreaSize_0(v46.props.screenSize, v46.props.globalGuiInset);
    local v55 = l_Font_0.Header2.RelativeSize * l_BaseSize_0;
    local l_Font_2 = l_Font_0.Header2.Font;
    local l_l_TextService_0_TextSize_0 = l_TextService_0:GetTextSize(v47.finalContent, v55, l_Font_2, Vector2.new(v54.X.Offset * 0.9, 10000));
    local v58 = nil;
    v58 = if v46.props.finalPageViewMode == v23.Closeup then v47.switchToFullBody else v47.switchToCloseup;
    local l_l_TextService_0_TextSize_1 = l_TextService_0:GetTextSize(v58, v55, l_Font_2, Vector2.new((v54.X.Offset - 20) - 20, 10000));
    return v3.createFragment({
        ListLayout = v3.createElement("UIListLayout", {
            FillDirection = Enum.FillDirection.Vertical,
            SortOrder = Enum.SortOrder.LayoutOrder,
            HorizontalAlignment = Enum.HorizontalAlignment.Center,
            Padding = UDim.new(0.0625, 0)
        }),
        ContentTopPadding = v3.createElement("UIPadding", {
            PaddingTop = UDim.new(0.0625, 0)
        }),
        ButtonFrame = v3.createElement(l_Focusable_0.Frame, {
            Size = UDim2.new(0, l_l_TextService_0_TextSize_1.X + 20, 0, l_l_TextService_0_TextSize_1.Y + 17),
            BorderSizePixel = 0,
            BackgroundTransparency = 1,
            LayoutOrder = 1,
            [v3.Ref] = v46.toggleFullViewButtonRef,
            NextSelectionUp = v46.topBarRef,
            NextSelectionDown = v46.bottomBarRef
        }, {
            ButtonStack = v3.createElement(l_ButtonStack_0, {
                buttonHeight = l_l_TextService_0_TextSize_1.Y + 17,
                buttons = {
                    {
                        buttonType = l_ButtonType_0.Secondary,
                        props = {
                            onActivated = v46.toggleFinalPageViewMode,
                            text = v58
                        }
                    }
                }
            })
        }),
        Header1TextLabel = v3.createElement("TextLabel", {
            Size = UDim2.new(1, 0, 0, v52),
            BackgroundTransparency = 1,
            Font = l_Font_1,
            TextColor3 = l_Theme_0.TextEmphasis.Color,
            Text = v47.finalHeader,
            TextSize = v52,
            TextXAlignment = Enum.TextXAlignment.Center,
            TextYAlignment = Enum.TextYAlignment.Center,
            LayoutOrder = 2
        }),
        Header2TextLabel = v3.createElement("TextLabel", {
            Size = UDim2.new(0.9, 0, 0, l_l_TextService_0_TextSize_0.Y),
            BackgroundTransparency = 1,
            Font = l_Font_2,
            TextColor3 = l_Theme_0.TextEmphasis.Color,
            Text = v47.finalContent,
            TextSize = v55,
            TextXAlignment = Enum.TextXAlignment.Center,
            TextYAlignment = Enum.TextYAlignment.Center,
            RichText = true,
            TextWrapped = true,
            LayoutOrder = 3
        })
    });
end;
v39.renderMiddleContents = function(v60, v61)
    local l_Theme_1 = v61.Theme;
    if v60.props.finalPageViewMode ~= v23.Closeup and not v60.state.isAnimating then
        return nil;
    else
        return v3.createElement(l_ImageSetLabel_0, {
            Size = v60.sizeBinding,
            AnchorPoint = Vector2.new(0.5, 0.5),
            Position = UDim2.fromScale(0.5, 0.5),
            Image = v22.CircleCutoutAsset,
            ImageColor3 = l_Theme_1.BackgroundDefault.Color,
            BackgroundTransparency = 1,
            ZIndex = 4
        });
    end;
end;
v39.renderWithProviders = function(v63, v64, v65)
    local l_screenSize_0 = v63.props.screenSize;
    local l_globalGuiInset_0 = v63.props.globalGuiInset;
    return v3.createElement(l_Focusable_0.Frame, {
        BackgroundTransparency = 1,
        BorderSizePixel = 0,
        Size = if not v32 then l_getSafeAreaSize_0(l_screenSize_0, l_globalGuiInset_0) else UDim2.fromScale(1, 1),
        Position = UDim2.new(0, 0, 0, 0),
        Active = true,
        focusController = v63.focusController,
        defaultChild = v63.bottomBarRef,
        [v3.Ref] = v63.props[v3.Ref],
        inputBindings = {
            NavUp = v14.Input.onBegin(Enum.KeyCode.ButtonB, function()
                v63.focusController.moveFocusTo(v63.topBarRef);
            end)
        }
    }, {
        GamepadFocusHandlerForPage = v3.createElement(v17, {
            focusController = v63.focusController,
            captureFocusOnMount = true
        }),
        SimpleTopBar = v3.createElement(v11.Container, {
            titleText = v64.title,
            [v3.Ref] = v63.topBarRef,
            NextSelectionDown = v63.toggleFullViewButtonRef,
            transparentBackground = true,
            hideSiteMessageBanner = v63.props.isPortrait,
            leftItem = v11.BackButton
        }),
        PeekabooWidget = v3.createElement(v18, {
            viewportYScale = 0.375,
            viewportXScale = 0.8,
            topMarginYScale = 0.2,
            renderBottomContents = function()
                return v63:renderBottomContents(v64, v65);
            end,
            renderMiddleContents = function()
                return v63:renderMiddleContents(v65);
            end
        }),
        BottomBar = v3.createElement(v21, {
            baseRef = v63.bottomBarRef,
            NextSelectionUp = v63.toggleFullViewButtonRef,
            button1 = {
                textKey = "Authentication.CrossDevice.Action.GoBack",
                onActivated = v63.goBack
            },
            button2 = {
                textKey = "Feature.Avatar.Action.Save",
                isDisabled = v63.props.fieldOfViewDeg == nil,
                onActivated = v63.onSave
            }
        }),
        BottomInsetBackground = if not (l_globalGuiInset_0.bottom > 0) then nil else v3.createElement(v29, {
            globalGuiInset = l_globalGuiInset_0
        })
    });
end;
v39.render = function(v68)
    return l_withLocalization_0({
        title = "Feature.Avatar.Label.PPEFinalHeader",
        finalHeader = "Feature.Avatar.Label.PPEFinalSubheader",
        finalContent = "Feature.Avatar.Label.PPEFinalBody",
        switchToFullBody = "Feature.Avatar.Label.PPEViewFullButton",
        switchToCloseup = "Feature.Avatar.Label.PPEViewCloseupButton"
    })(function(v69)
        return l_withStyle_0(function(v70)
            return v68:renderWithProviders(v69, v70);
        end);
    end);
end;
v39.didUpdate = function(v71, v72, _)
    local v74 = nil;
    if v72.finalPageViewMode == v23.Closeup and v71.props.finalPageViewMode == v23.FullBody then
        v74 = 1;
    elseif v72.finalPageViewMode == v23.FullBody and v71.props.finalPageViewMode == v23.Closeup then
        v74 = 0;
    end;
    if v74 then
        v71.motor:stop();
        v71.motor:setGoal(v6.spring(v74, v38));
        v71.motor:start();
        v71:setState({
            isAnimating = true
        });
    end;
end;
v39.willUnmount = function(v75)
    if v75.motor then
        v75.motor:destroy();
        v75.motor = nil;
    end;
end;
return (v30.connectTestVariables({
    alternateAvatarLandingScreenEnabled = v31.EnabledForUser
})((v16((v19((l_RoactAppPolicy_0.connect(function(v76)
    return {
        shouldSkipLandingPage = v76.getShouldSkipAvatarLandingPage()
    };
end)((l_RoactServices_0.connect({
    profilePictureEditorAnalytics = v27,
    networking = v9
})((v4.connect(function(v77, _)
    return {
        isPortrait = v77.DeviceOrientation == l_DeviceOrientationMode_0.Portrait,
        globalGuiInset = v77.GlobalGuiInset,
        screenSize = v77.ScreenSize,
        fieldOfViewDeg = v77.AvatarExperience.ProfilePictureEditor.ProfilePictureParams.fieldOfViewDeg,
        zoomSliderValue = v77.AvatarExperience.ProfilePictureEditor.CameraSliders.zoomSliderValue,
        rotateSliderValue = v77.AvatarExperience.ProfilePictureEditor.CameraSliders.rotateSliderValue,
        emoteAssetId = v77.AvatarExperience.ProfilePictureEditor.ProfilePictureParams.emoteAssetId,
        finalPageViewMode = v77.AvatarExperience.ProfilePictureEditor.FinalPageViewMode.finalPageViewMode,
        currentCharacter = v77.AvatarExperience.AvatarScene.Character.CurrentCharacter,
        equippedAssets = v77.AvatarExperience.AvatarEditor.Character.EquippedAssets
    };
end, function(v79)
    return {
        writePPEConfig = function(_, v81, v82, v83, v84, v85)
            v79(v25(v81, v23.Closeup, v82, v83, v84, v85));
            v79(v25(v81, v23.FullBody, v82, l_CameraUtility_0.DistanceScaleForFullBody, v84, v85));
        end,
        setFinalPageViewMode = function(v86)
            return v79(v26(v86));
        end
    };
end)(v39))))))))))));


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Packages.React);
local l_useSelector_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.RoactRodux.useSelector;
local l_useLocalization_0 = require(l_CorePackages_0.Workspace.Packages.Localization).Hooks.useLocalization;
local l_useDispatch_0 = require(l_CorePackages_0.Workspace.Packages.RoactUtils).Hooks.RoactRodux.useDispatch;
local v6 = require(l_Modules_0.LuaApp.Hooks.useRoactService);
local v7 = require(l_CorePackages_0.UIBlox);
local l_InteractiveAlert_0 = v7.App.Dialog.Alert.InteractiveAlert;
local l_ButtonType_0 = v7.App.Button.Enum.ButtonType;
local v10 = require(l_Modules_0.AvatarExperience.Common.Components.withOverlayFocusHandling);
local v11 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.withMappedNavigationParams);
local v12 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.NavigationUtils);
local v13 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local v14 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.PPEThumbnailType);
local v15 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Utils);
local v16 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Thunks.WritePPEConfig);
local v17 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Services.Analytics);
local function v19(v18)
    return v18.ScreenSize;
end;
local function v21(v20)
    return v20.AvatarExperience.ProfilePictureEditor;
end;
return (v11((v10(function(v22)
    local v23 = l_useDispatch_0();
    local v24 = v6(v17);
    local v25 = l_useSelector_0(v19);
    local v26 = l_useSelector_0(v21);
    local function v27()
        v12.closeOverlay(v22.navigation);
    end;
    local function v31()
        local l_lastSuccessfulPoseEmoteAssetId_0 = v26.ProfilePictureParams.lastSuccessfulPoseEmoteAssetId;
        local v29 = v15.getYRotDegFromSliderValue(v26.CameraSliders.rotateSliderValue);
        local v30 = v26.ProfilePictureParams.fieldOfViewDeg or 30;
        v23(v16(v24, v14.Closeup, l_lastSuccessfulPoseEmoteAssetId_0, -1, v29, v30));
        v23(v16(v24, v14.FullBody, l_lastSuccessfulPoseEmoteAssetId_0, -1, v29, v30));
    end;
    local function v32()
        v31();
        if not v22.onBack then
            v22.navigation.navigate(v13.Catalog);
            return ;
        else
            v22.onBack();
            return ;
        end;
    end;
    local v33 = l_useLocalization_0({
        titleText = "Feature.Avatar.Title.RevertToDefault",
        bodyText = "Feature.Avatar.Message.RevertToDefault",
        revertButtonText = "Feature.Avatar.Action.Revert",
        cancelButtonText = "Feature.Avatar.Action.Cancel"
    });
    return v2.createElement(l_InteractiveAlert_0, {
        title = v33.titleText,
        bodyText = v33.bodyText,
        buttonStackInfo = {
            buttons = {
                {
                    props = {
                        onActivated = v27,
                        text = v33.cancelButtonText
                    },
                    isDefaultChild = true
                },
                {
                    buttonType = l_ButtonType_0.PrimarySystem,
                    props = {
                        onActivated = v32,
                        text = v33.revertButtonText
                    },
                    isDefaultChild = false
                }
            }
        },
        screenSize = v25
    });
end))));


local v0 = require(game:GetService("CoreGui").RobloxGui.Modules.AvatarExperience.ProfilePictureEditor.PPEThumbnailType);
return {
    CameraFieldOfViewDeg = 70,
    ViewportHalfWidthUnits = 1.25,
    PeekabooBorderWidthPix = 6,
    AnalyticsTag = "LuaProfilePictureEditor",
    SliderMax = 20,
    YRotMaxDeg = 60,
    ZoomMinScale = 0.5,
    PPEConfigFetchStatusKey = "avatar.ppe.fetchStatus",
    PPEConfigWriteStatusKeys = {
        [v0.Closeup] = "avatar.ppe.closeup.writeStatus",
        [v0.FullBody] = "avatar.ppe.fullBody.writeStatus"
    },
    FullscreenTweenTimeSeconds = 0.25,
    CircleCutoutAsset = "rbxasset://textures/ui/AvatarExperience/CircleCutoutLargeNoBorder.png"
};


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_HttpService_0 = game:GetService("HttpService");
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v4 = require(l_CorePackages_0.Workspace.Packages.ArgCheck);
local v5 = require(l_Modules_0.LuaApp.Http.Url);
local v6 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Utils);
return {
    FetchPPEConfig = function(v7)
        return v7(string.format("%s/v1/avatar/thumbnail-customizations", v5.AVATAR_URL), "GET");
    end,
    WritePPEConfig = function(v8, v9, v10, v11, v12, v13)
        v4.isType(v9, "userdata", "WebApi.WritePPEConfig expects thumbnailType to be a userdata");
        v4.isTypeOrNil(v10, "string", "WebApi.WritePPEConfig expects emoteAssetId to be a string or nil");
        v4.isType(v11, "number", "WebApi.WritePPEConfig expects cameraDistanceScale to be a number");
        v4.isType(v12, "number", "WebApi.WritePPEConfig expects cameraYRotDeg to be a number");
        v4.isType(v13, "number", "WebApi.WritePPEConfig expects fieldOfViewDeg to be a number");
        return v8(string.format("%s/v1/avatar/thumbnail-customization", v5.AVATAR_URL), "POST", {
            postBody = l_HttpService_0:JSONEncode({
                thumbnailType = v6.ConvertThumbnailTypeToInt(v9),
                emoteAssetId = not v10 and 0 or tonumber(v10),
                camera = {
                    fieldOfViewDeg = v13,
                    yRotDeg = v12,
                    distanceScale = v11
                }
            })
        });
    end
};


local l_CoreGui_0 = game:GetService("CoreGui");
local l_CorePackages_0 = game:GetService("CorePackages");
local l_RunService_0 = game:GetService("RunService");
local v3 = require(l_CorePackages_0.Otter);
local l_Modules_0 = l_CoreGui_0.RobloxGui.Modules;
local v5 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Constants);
local v6 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.PPEThumbnailType);
local v7 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Utils);
local l_getSafeAreaSize_0 = require(l_CorePackages_0.Workspace.Packages.InputUi).getSafeAreaSize;
local l_CFrameUtility_0 = require(l_CorePackages_0.Thumbnailing).CFrameUtility;
local l_CameraUtility_0 = require(l_CorePackages_0.Thumbnailing).CameraUtility;
local l_CharacterUtility_0 = require(l_CorePackages_0.Thumbnailing).CharacterUtility;
local v12 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Actions.SetFieldOfViewDeg);
local v13 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local _ = require(l_Modules_0.AvatarExperience.Common.Types);
local v15 = {
    frequency = 1 / v5.FullscreenTweenTimeSeconds,
    dampingRatio = 1
};
local v16 = {};
v16.__index = v16;
v16.new = function(v17, v18)
    local v19 = {};
    setmetatable(v19, v16);
    v19.started = false;
    v19.store = v17;
    v19.avatarRoute = v18;
    v19.updateConnection = nil;
    v19.camera = game.Workspace.CurrentCamera;
    v19.toFullscreenFraction = 0;
    v19.prevShowFullBodyPicture = v19:_showFullBodyPicture();
    v19.prevPage = v19.avatarRoute.opaque.name;
    return v19;
end;
v16._calculateCameraDetails = function(v20, _)
    local v22 = (v20.screenHeightPix / 2) / math.tan(math.rad(v5.CameraFieldOfViewDeg) / 2);
    v20.pixToCamera = v22;
    v20.focusAngleAboveCenterRad = math.atan2(v20.screenHeightPix / 2 - (v20.topYPix + v20.viewportSizePix / 2), v22);
    local v23 = v20.screenHeightPix / 2 - v20.topYPix;
    v20.fieldOfViewForDistanceScale = math.deg(math.atan2(v23, v22) - math.atan2(v23 - v20.viewportSizePix, v22));
    v20.store:dispatch(v12(v20.fieldOfViewForDistanceScale));
end;
v16._handleCameraChange = function(v24)
    v24.showFullBodyPicture = v24:_showFullBodyPicture();
    if v24.prevShowFullBodyPicture ~= v24.showFullBodyPicture then
        v24.prevFieldOfViewForDistanceScale = v24.fieldOfViewForDistanceScale;
        v24.prevXRotDeg = v24.xRotDeg;
        v24.prevYRotDeg = v24.yRotDeg;
        v24.prevCameraDistanceScale = v24.cameraDistanceScale;
        v24.prevTargetCFrame = v24.targetCFrame;
        v24.prevMinExtent = v24.minExtent;
        v24.prevMaxExtent = v24.maxExtent;
        v24.prevExtentScale = v24.extentScale;
        v24.prevCameraCFrame = v24.camera.CFrame;
    end;
    local v25 = v24.store:getState();
    v24.finalPageViewMode = v25.AvatarExperience.ProfilePictureEditor.FinalPageViewMode.finalPageViewMode;
    v24.characterModelVersion = v25.AvatarExperience.AvatarScene.Character.CharacterModelVersion;
    v24.lastSuccessfulPoseEmoteAssetId = v25.AvatarExperience.ProfilePictureEditor.ProfilePictureParams.lastSuccessfulPoseEmoteAssetId;
    local l_CurrentCharacter_0 = v25.AvatarExperience.AvatarScene.Character.CurrentCharacter;
    if l_CurrentCharacter_0 then
        local l_Head_0 = l_CurrentCharacter_0:FindFirstChild("Head");
        if l_Head_0 then
            local v28 = v25.AvatarExperience.ProfilePictureEditor.PeekabooLayoutDetails[v24.avatarRoute.opaque.name];
            if v28 then
                v24.screenHeightPix = v28.screenHeightPix;
                v24.topYPix = v28.topYPix;
                v24.viewportSizePix = v28.viewportSizePix;
                v24:_calculateCameraDetails(l_CurrentCharacter_0);
                if v24.focusAngleAboveCenterRad then
                    if not v24.showFullBodyPicture then
                        v24.targetCFrame = l_CFrameUtility_0.CalculateTargetCFrame(l_Head_0.CFrame);
                        local v29, v30 = l_CharacterUtility_0.CalculateHeadExtents(l_CurrentCharacter_0, v24.targetCFrame);
                        v24.minExtent = v29;
                        v24.maxExtent = v30;
                    else
                        local v31 = l_CFrameUtility_0.CalculateTargetCFrame(l_Head_0.CFrame);
                        v24.targetCFrame = (v31 - v31.Position) + l_CurrentCharacter_0:GetPrimaryPartCFrame().Position;
                        local v32, v33 = l_CharacterUtility_0.CalculateModelExtents(l_CurrentCharacter_0, v24.targetCFrame);
                        v24.minExtent = v32;
                        v24.maxExtent = v33;
                    end;
                    local l_CameraSliders_0 = v25.AvatarExperience.ProfilePictureEditor.CameraSliders;
                    v24.yRotDeg = 0;
                    v24.xRotDeg = 0;
                    v24.cameraDistanceScale = 1;
                    if l_CameraSliders_0 then
                        v24.zoomSliderValue = l_CameraSliders_0.zoomSliderValue;
                        v24.rotateSliderValue = l_CameraSliders_0.rotateSliderValue;
                        v24.yRotDeg = v7.getYRotDegFromSliderValue(v24.rotateSliderValue);
                        if not v24.showFullBodyPicture then
                            v24.cameraDistanceScale = v7.getCameraDistanceScaleFromSliderValue(v24.zoomSliderValue);
                        else
                            v24.xRotDeg = l_CameraUtility_0.XRotForFullBody;
                            v24.cameraDistanceScale = l_CameraUtility_0.DistanceScaleForFullBody;
                        end;
                    end;
                    v24.extentScale = not not v24.showFullBodyPicture and l_CameraUtility_0.DefaultBodyMarginScale or l_CameraUtility_0.DefaultHeadMarginScale;
                    if v24.prevPage ~= v24.avatarRoute.opaque.name then
                        v24.prevShowFullBodyPicture = false;
                        v24.prevPage = v24.avatarRoute.opaque.name;
                        v24.fullscreenTweenMotor:stop();
                        v24.toFullscreenFraction = 0;
                    elseif v24.prevShowFullBodyPicture ~= v24.showFullBodyPicture then
                        local v35 = not v24.showFullBodyPicture and 0 or 1;
                        v24.prevShowFullBodyPicture = v24.showFullBodyPicture;
                        v24.fullscreenTweenMotor:stop();
                        v24.fullscreenTweenMotor:setGoal(v3.spring(v35, v15));
                        v24.fullscreenTweenMotor:start();
                    end;
                    v24:onUpdateFullscreenFraction();
                    return ;
                else
                    return ;
                end;
            else
                return ;
            end;
        else
            return ;
        end;
    else
        return ;
    end;
end;
local function _(v36, v37, v38)
    if v38 then
        return v37 * (1 - v36) + v38 * v36;
    else
        return v37;
    end;
end;
local function _(v40, v41, v42)
    if v42 then
        return v41:Lerp(v42, v40);
    else
        return v41;
    end;
end;
v16.onUpdateFullscreenFraction = function(v44)
    local v45 = math.abs((not v44.showFullBodyPicture and 0 or 1) - v44.toFullscreenFraction);
    local v46 = {};
    local l_fieldOfViewForDistanceScale_0 = v44.fieldOfViewForDistanceScale;
    local l_prevFieldOfViewForDistanceScale_0 = v44.prevFieldOfViewForDistanceScale;
    v46.optFieldOfViewForDistanceScale = if l_prevFieldOfViewForDistanceScale_0 then l_fieldOfViewForDistanceScale_0 * (1 - v45) + l_prevFieldOfViewForDistanceScale_0 * v45 else l_fieldOfViewForDistanceScale_0;
    l_fieldOfViewForDistanceScale_0 = v44.xRotDeg;
    l_prevFieldOfViewForDistanceScale_0 = v44.prevXRotDeg;
    v46.optCameraXRot = if l_prevFieldOfViewForDistanceScale_0 then l_fieldOfViewForDistanceScale_0 * (1 - v45) + l_prevFieldOfViewForDistanceScale_0 * v45 else l_fieldOfViewForDistanceScale_0;
    l_fieldOfViewForDistanceScale_0 = v44.yRotDeg;
    l_prevFieldOfViewForDistanceScale_0 = v44.prevYRotDeg;
    v46.optCameraYRot = if l_prevFieldOfViewForDistanceScale_0 then l_fieldOfViewForDistanceScale_0 * (1 - v45) + l_prevFieldOfViewForDistanceScale_0 * v45 else l_fieldOfViewForDistanceScale_0;
    l_fieldOfViewForDistanceScale_0 = v44.cameraDistanceScale;
    l_prevFieldOfViewForDistanceScale_0 = v44.prevCameraDistanceScale;
    v46.optCameraDistanceScale = if l_prevFieldOfViewForDistanceScale_0 then l_fieldOfViewForDistanceScale_0 * (1 - v45) + l_prevFieldOfViewForDistanceScale_0 * v45 else l_fieldOfViewForDistanceScale_0;
    l_fieldOfViewForDistanceScale_0 = v44.targetCFrame;
    l_prevFieldOfViewForDistanceScale_0 = v44.prevTargetCFrame;
    v46.targetCFrame = if l_prevFieldOfViewForDistanceScale_0 then l_fieldOfViewForDistanceScale_0:Lerp(l_prevFieldOfViewForDistanceScale_0, v45) else l_fieldOfViewForDistanceScale_0;
    l_fieldOfViewForDistanceScale_0 = v44.minExtent;
    l_prevFieldOfViewForDistanceScale_0 = v44.prevMinExtent;
    v46.minExtent = if l_prevFieldOfViewForDistanceScale_0 then l_fieldOfViewForDistanceScale_0 * (1 - v45) + l_prevFieldOfViewForDistanceScale_0 * v45 else l_fieldOfViewForDistanceScale_0;
    l_fieldOfViewForDistanceScale_0 = v44.maxExtent;
    l_prevFieldOfViewForDistanceScale_0 = v44.prevMaxExtent;
    v46.maxExtent = if l_prevFieldOfViewForDistanceScale_0 then l_fieldOfViewForDistanceScale_0 * (1 - v45) + l_prevFieldOfViewForDistanceScale_0 * v45 else l_fieldOfViewForDistanceScale_0;
    l_fieldOfViewForDistanceScale_0 = v44.extentScale;
    l_prevFieldOfViewForDistanceScale_0 = v44.prevExtentScale;
    v46.extentScale = if l_prevFieldOfViewForDistanceScale_0 then l_fieldOfViewForDistanceScale_0 * (1 - v45) + l_prevFieldOfViewForDistanceScale_0 * v45 else l_fieldOfViewForDistanceScale_0;
    l_CameraUtility_0.SetupCamera(v44.camera, v46);
    l_fieldOfViewForDistanceScale_0 = v44.camera.CFrame * CFrame.fromEulerAnglesXYZ(-v44.focusAngleAboveCenterRad, 0, 0);
    l_prevFieldOfViewForDistanceScale_0 = v44.store:getState().GlobalGuiInset;
    local l_ScreenSize_0 = v44.store:getState().ScreenSize;
    local v50 = l_ScreenSize_0.X - l_getSafeAreaSize_0(l_ScreenSize_0, l_prevFieldOfViewForDistanceScale_0).X.Offset;
    if v50 > 0 then
        local v51 = -l_fieldOfViewForDistanceScale_0.RightVector * (((l_fieldOfViewForDistanceScale_0.Position - v46.targetCFrame.Position).Magnitude * v50) / (2 * v44.pixToCamera));
        l_fieldOfViewForDistanceScale_0 = CFrame.new(v51.X, v51.Y, v51.Z) * l_fieldOfViewForDistanceScale_0;
    end;
    local l_camera_0 = v44.camera;
    local l_l_fieldOfViewForDistanceScale_0_0 = l_fieldOfViewForDistanceScale_0;
    local l_prevCameraCFrame_0 = v44.prevCameraCFrame;
    l_camera_0.CFrame = if l_prevCameraCFrame_0 then l_l_fieldOfViewForDistanceScale_0_0:Lerp(l_prevCameraCFrame_0, v45) else l_l_fieldOfViewForDistanceScale_0_0;
end;
v16._peekabooLayoutDetailsChanged = function(v55, v56)
    local v57 = v56.AvatarExperience.ProfilePictureEditor.PeekabooLayoutDetails[v55.avatarRoute.opaque.name];
    if v57 then
        local v58 = true;
        if v55.screenHeightPix == v57.screenHeightPix then
            v58 = true;
            if v55.topYPix == v57.topYPix then
                v58 = v55.viewportSizePix ~= v57.viewportSizePix;
            end;
        end;
        return v58;
    else
        return false;
    end;
end;
v16._cameraSliderDetailsChanged = function(v59, v60)
    local l_CameraSliders_1 = v60.AvatarExperience.ProfilePictureEditor.CameraSliders;
    local v62 = true;
    if v59.zoomSliderValue == l_CameraSliders_1.zoomSliderValue then
        v62 = v59.rotateSliderValue ~= l_CameraSliders_1.rotateSliderValue;
    end;
    return v62;
end;
v16._finalPageViewModeChanged = function(v63, v64)
    return v63.finalPageViewMode ~= v64.AvatarExperience.ProfilePictureEditor.FinalPageViewMode.finalPageViewMode;
end;
v16._lastSuccessfulPoseEmoteAssetIdChanged = function(v65, v66)
    return v65.lastSuccessfulPoseEmoteAssetId ~= v66.AvatarExperience.ProfilePictureEditor.ProfilePictureParams.lastSuccessfulPoseEmoteAssetId;
end;
v16._characterModelVersionChanged = function(v67, v68)
    return v67.characterModelVersion ~= v68.AvatarExperience.AvatarScene.Character.CharacterModelVersion;
end;
v16._update = function(v69, v70)
    if not (not (((v69:_peekabooLayoutDetailsChanged(v70) or v69:_cameraSliderDetailsChanged(v70)) or v69:_characterModelVersionChanged(v70)) or v69:_finalPageViewModeChanged(v70)) and not v69:_lastSuccessfulPoseEmoteAssetIdChanged(v70)) then
        v69:_handleCameraChange();
    end;
end;
v16._updateState = function(v71, v72, _)
    v71:_update(v72);
end;
v16._showFullBodyPicture = function(v74)
    if v74.store:getState().AvatarExperience.ProfilePictureEditor.FinalPageViewMode.finalPageViewMode == v6.FullBody and v74.avatarRoute.opaque.name == v13.ProfilePictureEditorFinal then
        return true;
    else
        return false;
    end;
end;
v16.updateAvatarRoute = function(v75, v76, _)
    v75.avatarRoute = v76;
    if v75.started then
        v75:_update((v75.store:getState()));
    end;
end;
v16.watchCharacterToAdjustCamera = function(v78, v79)
    if v79 then
        v78.watchCharacterToolConnection = v79.DescendantAdded:Connect(function(v80)
            if v80:IsA("Tool") then
                l_RunService_0.Heartbeat:Wait();
                v78:_handleCameraChange();
            end;
        end);
    end;
end;
v16.onPPEPoseChanged = function(v81)
    l_RunService_0.Heartbeat:Wait();
    v81:_handleCameraChange();
end;
v16.stopWatchingCharacter = function(v82)
    if v82.watchCharacterToolConnection then
        v82.watchCharacterToolConnection:Disconnect();
        v82.watchCharacterToolConnection = nil;
    end;
end;
v16.start = function(v83)
    if not v83.started then
        v83.started = true;
        local v84 = v83.store:getState();
        v83.fullscreenTweenMotor = v3.createSingleMotor(0);
        v83.fullscreenTweenMotor:onStep(function(v85)
            v83.toFullscreenFraction = v85;
            v83:onUpdateFullscreenFraction();
        end);
        v83.updateConnection = v83.store.changed:connect(function(...)
            v83:_updateState(...);
        end);
        v83.camera.CameraType = Enum.CameraType.Scriptable;
        v83.camera.FieldOfView = v5.CameraFieldOfViewDeg;
        local l_CurrentCharacter_1 = v84.AvatarExperience.AvatarScene.Character.CurrentCharacter;
        if l_CurrentCharacter_1 then
            v83:_handleCameraChange();
            v83:watchCharacterToAdjustCamera(l_CurrentCharacter_1);
        end;
        return ;
    else
        return ;
    end;
end;
v16.stop = function(v87)
    if v87.started then
        v87.started = false;
        v87:stopWatchingCharacter();
        if v87.fullscreenTweenMotor then
            v87.fullscreenTweenMotor:destroy();
            v87.fullscreenTweenMotor = nil;
        end;
        if v87.updateConnection then
            v87.updateConnection:disconnect();
            v87.updateConnection = nil;
        end;
        return ;
    else
        return ;
    end;
end;
v16.onDestroy = function(_)
end;
return v16;


return require(game:GetService("CorePackages").enumerate)("PPEThumbnailType", {
    "Closeup",
    "FullBody"
});


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_CorePackages_0.Rodux);
local v3 = require(l_CorePackages_0.Cryo);
return v2.createReducer({
    zoomSliderValue = 0,
    rotateSliderValue = 0
}, {
    [require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Actions.SetCameraSliderZoom).name] = function(v4, v5)
        return v3.Dictionary.join(v4, {
            zoomSliderValue = v5.zoomSliderValue
        });
    end,
    [require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Actions.SetCameraSliderRotate).name] = function(v6, v7)
        return v3.Dictionary.join(v6, {
            rotateSliderValue = v7.rotateSliderValue
        });
    end
});


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_CorePackages_0.Rodux);
local v3 = require(l_CorePackages_0.Cryo);
return v2.createReducer({
    finalPageViewMode = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.PPEThumbnailType).Closeup
}, {
    [require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Actions.SetFinalPageViewMode).name] = function(v4, v5)
        return v3.Dictionary.join(v4, {
            finalPageViewMode = v5.finalPageViewMode
        });
    end
});


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_CorePackages_0.Rodux);
local v3 = require(l_CorePackages_0.Cryo);
return v2.createReducer({}, {
    [require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Actions.SetPeekabooLayoutDetails).name] = function(v4, v5)
        return v3.Dictionary.join(v4, {
            [v5.screenName] = v3.Dictionary.join(v4[v5.screenName] or {}, {
                screenHeightPix = v5.screenHeightPix,
                topYPix = v5.topYPix,
                viewportSizePix = v5.viewportSizePix
            })
        });
    end
});


local v0 = require(game:GetService("CorePackages").Rodux);
local l_Parent_0 = script.Parent;
return v0.combineReducers({
    ProfilePictureParams = require(l_Parent_0.ProfilePictureParams),
    PeekabooLayoutDetails = require(l_Parent_0.PeekabooLayoutDetails),
    CameraSliders = require(l_Parent_0.CameraSliders),
    FinalPageViewMode = require(l_Parent_0.FinalPageViewMode)
});


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_CorePackages_0.Rodux);
local v3 = require(l_CorePackages_0.Cryo);
local v4 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Actions.SetEmoteAssetId);
local v5 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Actions.SetFieldOfViewDeg);
local v6 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Actions.SetLastSuccessfulPoseEmoteAssetId);
local v7 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Actions.CompletePPEEmoteLoading);
local v8 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Actions.StartPPEEmoteLoading);
local _ = require(l_Modules_0.AvatarExperience.Common.Types);
local v10 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Actions.IncrementPPEVersion);
local v11 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.PPEThumbnailType);
local v12 = require(l_Modules_0.LuaApp.mutedError);
return v2.createReducer({
    lastSuccessfulPoseEmoteAssetId = nil,
    emoteAssetId = nil,
    fieldOfViewDeg = nil,
    ppeVersion = {
        [v11.Closeup] = 0,
        [v11.FullBody] = 0
    },
    ppeEmoteLoadingCount = 0
}, {
    [v8.name] = function(v13, _)
        return v3.Dictionary.join(v13, {
            ppeEmoteLoadingCount = v13.ppeEmoteLoadingCount + 1
        });
    end,
    [v7.name] = function(v15, _)
        local v17 = v15.ppeEmoteLoadingCount - 1;
        if v17 < 0 then
            v12("newPPEEmoteLoadingCount is less than 0");
        end;
        return v3.Dictionary.join(v15, {
            ppeEmoteLoadingCount = v17
        });
    end,
    [v6.name] = function(v18, v19)
        return v3.Dictionary.join(v18, {
            lastSuccessfulPoseEmoteAssetId = v19.lastSuccessfulPoseEmoteAssetId or v3.None
        });
    end,
    [v4.name] = function(v20, v21)
        return v3.Dictionary.join(v20, {
            emoteAssetId = v21.emoteAssetId or v3.None
        });
    end,
    [v5.name] = function(v22, v23)
        return v3.Dictionary.join(v22, {
            fieldOfViewDeg = v23.fieldOfViewDeg or v3.None
        });
    end,
    [v10.name] = function(v24, v25)
        return v3.Dictionary.join(v24, {
            ppeVersion = v3.Dictionary.join(v24.ppeVersion, {
                [v25.thumbnailType] = v24.ppeVersion[v25.thumbnailType] + 1
            })
        });
    end
});


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local l_CorePackages_0 = game:GetService("CorePackages");
local v2 = require(l_CorePackages_0.Cryo);
local v3 = require(l_Modules_0.AvatarExperience.Common.Actions.ClearTryOns);
local v4 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Actions.SetEmoteAssetId);
local v5 = require(l_CorePackages_0.Workspace.Packages.ArgCheck);
local v6 = require(l_Modules_0.AvatarExperience.Common.Thunks.CloseAllItemDetails);
return function(v7, v8)
    v5.isTypeOrNil(v7, "string", "SetEmoteAssetId thunk expects emoteAssetId to be a string or nil");
    return function(v9)
        if not v2.isEmpty(v9:getState().AvatarExperience.AvatarScene.OutfitTryOn.TryOnItems) then
            v9:dispatch(v3());
            v9:dispatch(v6(v8));
        end;
        v9:dispatch(v4(v7));
    end;
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_CorePackages_0.Promise);
local v3 = require(l_CorePackages_0.Workspace.Packages.ArgCheck);
local l_PerformFetch_0 = require(l_CorePackages_0.Workspace.Packages.Http).PerformFetch;
local v5 = require(l_CorePackages_0.Logging);
local v6 = require(l_Modules_0.LuaApp.Actions.SetCurrentToastMessage);
local v7 = require(l_Modules_0.LuaApp.Enum.ToastType);
local v8 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Constants);
local v9 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.PPEThumbnailType);
local v10 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Actions.IncrementPPEVersion);
local v11 = require(l_Modules_0.AvatarExperience.Common.RoduxUtils);
local v12 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Utils);
local v13 = require(l_Modules_0.LuaApp.mutedError);
local v14 = require(l_Modules_0.AvatarExperience.Common.Analytics.reportAvatarEventCounterNoAnalyticsArgument);
local v15 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v16 = require(l_Modules_0.AvatarExperience.Flags.GetFFlagEnableAvatarEditorServiceAPIErrorLogging);
local v17 = {
    toastMessage = "Feature.Avatar.Message.FailedWritePPE",
    isLocalized = false,
    toastType = v7.InformationMessage
};
local v18 = {
    toastMessage = "Feature.Avatar.Label.PPEFinishedToast",
    isLocalized = false,
    toastType = v7.InformationMessage
};
return function(v19, v20, v21, v22, v23, v24)
    v3.isType(v20, "userdata", "WritePPEConfig thunk expects thumbnailType to be a userdata");
    v3.isTypeOrNil(v21, "string", "WritePPEConfig thunk expects emoteAssetId to be a string or nil");
    v3.isType(v22, "number", "WritePPEConfig thunk expects cameraDistanceScale to be a number");
    v3.isType(v23, "number", "WritePPEConfig thunk expects cameraYRotDeg to be a number");
    v3.isType(v24, "number", "WritePPEConfig thunk expects fieldOfViewDeg to be a number");
    local v25 = v8.PPEConfigWriteStatusKeys[v20];
    return v11.convertAvatarEditorServiceThunk("WritePPEConfig", function(v26, v27)
        return l_PerformFetch_0.Single(v25, function(v28)
            if v20 == v9.Closeup then
                local l_clickFinalSave_0 = v19.clickFinalSave;
                local l_v20_0 = v20;
                local v31 = false;
                if v22 == 1 then
                    v31 = v23 == 0;
                end;
                l_clickFinalSave_0(l_v20_0, v31, v21);
            end;
            return v2.new(function(v32, _)
                local v34 = not not v21 and tonumber(v21) or 0;
                local v35 = v12.ConvertThumbnailTypeToEnum(v20);
                local v36 = v27:NoPromptSaveAvatarThumbnailCustomization(v35, v34, v22, v23, v24);
                while not v36 do
                    v27.PromptSaveAvatarThumbnailCustomizationCompleted:Wait();
                    v36 = v27:NoPromptSaveAvatarThumbnailCustomization(v35, v34, v22, v23, v24);
                end;
                local v37, v38 = v27.PromptSaveAvatarThumbnailCustomizationCompleted:Wait();
                if v37 == Enum.AvatarPromptResult.Success then
                    if v20 == v9.Closeup then
                        v28:dispatch(v6(v18));
                    end;
                    v28:dispatch(v10(v20));
                    v32();
                    return ;
                else
                    v13(string.format("Call to AvatarEditorService:NoPromptSaveAvatarThumbnailCustomization failed with error code \"%s\"", (tostring(v38))));
                    if v16() then
                        v14(v15.Counter.AvatarEditorServiceErrors.NoPromptSaveAvatarThumbnailCustomization);
                    end;
                    v28:dispatch(v6(v17));
                    v5.warn("WebApi failure in WritePPEConfig");
                    return ;
                end;
            end);
        end)(v26);
    end);
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v1 = require(l_Modules_0.AvatarExperience.AvatarEditor.GetAvatarEditorStructure);
local v2 = require(l_Modules_0.AvatarExperience.Common.Utils);
local v3 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v4 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local v5 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.Constants);
local v6 = require(l_Modules_0.AvatarExperience.ProfilePictureEditor.PPEThumbnailType);
local v7 = {};
local v8 = {
    v6.Closeup,
    v6.FullBody
};
v7.ConvertThumbnailTypeToInt = function(v9)
    return table.find(v8, v9);
end;
v7.ConvertThumbnailTypeToEnum = function(v10)
    if v10 == v6.Closeup then
        return Enum.AvatarThumbnailCustomizationType.Closeup;
    else
        return Enum.AvatarThumbnailCustomizationType.FullBody;
    end;
end;
v7.isPPEScreenUsingPeekabooWidget = function(v11)
    local v12 = true;
    if v11 ~= v4.ProfilePictureEditorCamera then
        v12 = v11 == v4.ProfilePictureEditorFinal;
    end;
    return v12;
end;
v7.getEmotesCategorySubcategoryAndInfo = function()
    local v13 = v1().AssetTypeToCategorySubcategory[v3.AssetTypeIdStrings.EmoteAnimation];
    local l_category_0 = v13.category;
    local l_subcategory_0 = v13.subcategory;
    return l_category_0, l_subcategory_0, (v2.getAvatarEditorCategoryInfo(l_category_0, l_subcategory_0));
end;
v7.getSliderValueFromYRotDeg = function(v16)
    return (math.clamp((v16 * v5.SliderMax) / v5.YRotMaxDeg, -v5.SliderMax, v5.SliderMax));
end;
v7.getYRotDegFromSliderValue = function(v17)
    return (math.clamp((v17 * v5.YRotMaxDeg) / v5.SliderMax, -v5.YRotMaxDeg, v5.YRotMaxDeg));
end;
v7.getCameraDistanceScaleFromSliderValue = function(v18)
    local v19 = -v18 / v5.SliderMax + 1;
    return ((1 - v5.ZoomMinScale) * v19) * v19 + v5.ZoomMinScale;
end;
v7.getSliderValueFromCameraDistanceScale = function(v20)
    return (math.clamp((math.sqrt((v20 - v5.ZoomMinScale) / (1 - v5.ZoomMinScale)) - 1) * -v5.SliderMax, -v5.SliderMax, v5.SliderMax));
end;
return v7;


local l_CorePackages_0 = game:GetService("CorePackages");
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v2 = require(l_CorePackages_0.Roact);
local v3 = require(l_CorePackages_0.RoactRodux);
local v4 = require(l_CorePackages_0.UIBlox);
local v5 = require(l_CorePackages_0.Packages.t);
local l_Images_0 = v4.App.ImageSet.Images;
local l_ImageSetButton_0 = v4.Core.ImageSet.ImageSetButton;
local l_withStyle_0 = v4.Style.withStyle;
local l_IconSize_0 = v4.App.Constant.IconSize;
local v10 = require(l_Modules_0.AvatarExperience.Common.Constants);
local v11 = require(l_Modules_0.AvatarExperience.Common.Utils);
local v12 = require(l_Modules_0.LuaApp.Enum.ToastType);
local v13 = require(l_Modules_0.AvatarExperience.Common.Managers.AnimationUtils);
local v14 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.AvatarScreen);
local v15 = require(l_Modules_0.LuaApp.Actions.SetCurrentToastMessage);
local v16 = require(l_Modules_0.AvatarExperience.Common.Actions.SetCameraButtonStatus);
local v17 = require(l_Modules_0.AvatarExperience.Common.Components.RoactNavigation.withAppRoute);
local l_withSelectionCursorProvider_0 = v4.App.SelectionImage.withSelectionCursorProvider;
local v19 = require(l_Modules_0.LuaApp.mutedError);
local v20 = require(l_Modules_0.AvatarExperience.Common.Selectors.SelectOutfitTryOnEmoteAnimationAssetId);
local l_DeviceOrientationMode_0 = require(l_CorePackages_0.Workspace.Packages.RobloxAppEnums).DeviceOrientationMode;
local l_RoactServices_0 = require(l_CorePackages_0.Workspace.Packages.RoactServices).RoactServices;
local v23 = require(l_Modules_0.AvatarExperience.Common.Services.Analytics);
local l_withNavigationFocus_0 = require(l_CorePackages_0.RoactNavigation).withNavigationFocus;
local v25 = require(l_Modules_0.LuaApp.Services.RoactNetworking);
local l_getCameraOptIn_0 = require(l_CorePackages_0.Workspace.Packages.CameraOptIn).getCameraOptIn;
local l_getCameraDevicePermission_0 = require(l_CorePackages_0.Workspace.Packages.CameraOptIn).getCameraDevicePermission;
local v28 = game:DefineFastFlag("UpdateR6CameraWarning", false);
local v29 = require(l_Modules_0.AvatarExperience.Flags.FFlagUniversalAppCameraWindowsPermsFix);
local v30 = l_Images_0["icons/controls/videoOff"];
local v31 = l_Images_0["icons/controls/video"];
local v32 = Vector2.new(1, 0);
local v33 = UDim2.new(1, -4, 0, 3);
local v34 = UDim2.fromOffset(5, 5);
local v35 = Color3.new(0, 1, 0);
local v36 = v2.PureComponent:extend("UniversalAppCameraToggle");
local v37 = {
    toastMessage = not v28 and "Feature.Avatar.Message.TryOnCameraHeadWarning" or "Feature.Avatar.Message.ClassicHeadAndR6CameraWarning",
    isLocalized = false,
    toastType = v12.InformationMessage
};
local v38 = {
    toastMessage = "Feature.Avatar.Message.CameraFacialAnimationPaused",
    isLocalized = false,
    toastType = v12.InformationMessage
};
local v39 = {
    toastMessage = "Feature.FaceChat.Subtitle.UnableToAccessCamera",
    isLocalized = false,
    toastType = v12.InformationMessage
};
local v40 = {
    toastMessage = "Feature.FaceChat.Subtitle.FeatureDisabled",
    isLocalized = false,
    toastType = v12.InformationMessage
};
v36.validateProps = v5.strictInterface({
    isUIFullView = v5.optional(v5.boolean),
    isSceneFullView = v5.optional(v5.boolean),
    layoutOrder = v5.optional(v5.number),
    isDebug = v5.optional(v5.boolean),
    hasEmoteTryOn = v5.boolean,
    ableToAnimateHead = v5.boolean,
    receivedOutfitInfo = v5.boolean,
    canPlayAnimation = v5.boolean,
    pageCanAnimateCameraBasedMood = v5.boolean,
    isPortrait = v5.boolean,
    topBarHeight = v5.number,
    buttonEnabled = v5.boolean,
    errorOccurred = if not v29 then nil else v5.boolean,
    analytics = v5.table,
    networking = v5.callback,
    avatarRoute = v5.table,
    navigation = v5.table,
    isFocused = v5.boolean,
    setCurrentToastMessage = v5.callback,
    setCameraButtonStatus = v5.callback
});
v36.setCameraButtonStatusWithAnalytics = function(v41, v42)
    v41.props.setCameraButtonStatus(v42);
    v41.props.analytics.toggleCameraInEditorAndShop(v42, v41.props.avatarRoute.opaque.name);
end;
v36.init = function(v43)
    v43.isMounted = false;
    v43:setState({
        isCameraOptIn = false,
        hasDeviceCameraPermissions = false
    });
    v43.toggleCamera = function()
        if v43.props.ableToAnimateHead or not v43.props.receivedOutfitInfo then
            local l_buttonEnabled_0 = v43.props.buttonEnabled;
            if not v29 or not v43.props.errorOccurred then
                if not v43.state.hasDeviceCameraPermissions then
                    l_getCameraDevicePermission_0():andThen(function(v45)
                        if not v45 then
                            v43.props.setCurrentToastMessage(v39);
                            return ;
                        else
                            if v43.isMounted then
                                v43:setState({
                                    hasDeviceCameraPermissions = true
                                });
                            end;
                            v43:setCameraButtonStatusWithAnalytics(true);
                            return ;
                        end;
                    end):catch(function(v46)
                        v19(string.format("Universal App Camera Hardware Check error: %s", (tostring(v46))));
                        v43.props.setCameraButtonStatus(false);
                    end);
                    return ;
                else
                    if not (l_buttonEnabled_0 or v43.props.pageCanAnimateCameraBasedMood) then
                        v43.props.setCurrentToastMessage(v38);
                    end;
                    v43:setCameraButtonStatusWithAnalytics(not l_buttonEnabled_0);
                    return ;
                end;
            else
                v43.props.setCameraButtonStatus(false);
                v43.props.setCurrentToastMessage(v40);
                return ;
            end;
        else
            v43.props.setCurrentToastMessage(v37);
            return ;
        end;
    end;
end;
v36.render = function(v47)
    return l_withStyle_0(function(v48)
        return l_withSelectionCursorProvider_0(function(v49)
            return v47:renderWithProviders(v48, v49);
        end);
    end);
end;
v36.isVisible = function(v50)
    if not v50.props.isDebug then
        return (v11.isUserCameraEligible() and v50.state.isCameraOptIn) and v11.isAvatarSceneButtonsVisible(v50.props.avatarRoute, v50.props.isFocused, v50.props.isUIFullView, v50.props.isSceneFullView, v50.props.navigation);
    else
        return true;
    end;
end;
v36.getIcon = function(v51)
    if not v51.props.buttonEnabled then
        return v30;
    else
        return v31;
    end;
end;
v36.setCameraOptIn = function(v52)
    l_getCameraOptIn_0(v52.props.networking, false):andThen(function(v53)
        if v52.isMounted then
            if v53 ~= v52.state.isCameraOptIn then
                v52:setState({
                    isCameraOptIn = v53
                });
            end;
            return ;
        else
            return ;
        end;
    end);
end;
v36.didMount = function(v54)
    v54.isMounted = true;
    v54:setCameraOptIn();
end;
v36.willUnmount = function(v55)
    v55.isMounted = false;
end;
v36.didUpdate = function(v56, v57)
    local l_name_0 = v56.props.avatarRoute.opaque.name;
    v56:setCameraOptIn();
    if ((v56.props.buttonEnabled and l_name_0 ~= v14.CatalogSearch) and l_name_0 ~= v14.Catalog) and l_name_0 ~= v14.AvatarEditor then
        v56.props.setCameraButtonStatus(false);
        return ;
    elseif v56:isVisible() then
        if not ((not v56.props.buttonEnabled or v56.props.ableToAnimateHead) or not v56.props.receivedOutfitInfo) then
            v56.props.setCameraButtonStatus(false);
        end;
        local v59 = v57.pageCanAnimateCameraBasedMood and not v56.props.pageCanAnimateCameraBasedMood;
        local v60 = not v57.hasEmoteTryOn and v56.props.hasEmoteTryOn;
        if not (not v56.props.buttonEnabled or not v59 and not v60) then
            v56.props.setCurrentToastMessage(v38);
        end;
        return ;
    else
        return ;
    end;
end;
v36.renderWithProviders = function(v61, v62)
    local l_Theme_0 = v62.Theme;
    local l_SceneButtonSize_0 = v10.SceneButtonSize;
    local v65 = not v61.props.canPlayAnimation;
    return v2.createElement("Frame", {
        Size = UDim2.fromOffset(l_SceneButtonSize_0, l_SceneButtonSize_0),
        Visible = v61:isVisible(),
        BackgroundColor3 = l_Theme_0.BackgroundMuted.Color,
        BackgroundTransparency = l_Theme_0.BackgroundMuted.Transparency,
        LayoutOrder = v61.props.layoutOrder
    }, {
        Corner = v2.createElement("UICorner", {
            CornerRadius = v10.SceneButtonCornerRadius
        });
        v2.createElement(l_ImageSetButton_0, {
            Position = UDim2.fromScale(0.5, 0.5),
            AnchorPoint = Vector2.new(0.5, 0.5),
            Size = UDim2.fromOffset(l_IconSize_0.Regular, l_IconSize_0.Regular),
            BackgroundTransparency = 1,
            Image = v61:getIcon(),
            ImageColor3 = l_Theme_0.IconEmphasis.Color,
            ImageTransparency = (not v65 or v61.props.buttonEnabled) and 0 or 0.5,
            ZIndex = 2,
            [v2.Event.Activated] = v61.toggleCamera
        }, {
            Dot = v2.createElement("Frame", {
                AnchorPoint = v32,
                Position = v33,
                BackgroundColor3 = v35,
                Size = v34,
                BorderSizePixel = 0,
                ZIndex = 2,
                Visible = not v65 and v61.props.buttonEnabled,
                LayoutOrder = 2
            }, {
                Corner = v2.createElement("UICorner", {
                    CornerRadius = UDim.new(1, 0)
                })
            })
        })
    });
end;
return (l_RoactServices_0.connect({
    analytics = v23,
    networking = v25
})((l_withNavigationFocus_0((v17((v3.connect(function(v66, v67)
    local l_topBarHeight_0 = v66.TopBar.topBarHeight;
    local v69 = v11.getCategoryInfoFromState(v66, v67.avatarRoute).CanAnimateCameraBasedMood == true;
    local v70, _ = v13.getAllowsTryingEmotesOrAnimations(v66, v67.avatarRoute);
    local v72 = v13.canPlayCameraBasedMoodAnimation(v66, v69, v70);
    local v73 = v20(v66) ~= nil;
    local v74, v75 = v13.ableToAnimateHead(v66);
    return {
        hasEmoteTryOn = v73,
        pageCanAnimateCameraBasedMood = v69,
        ableToAnimateHead = v74,
        receivedOutfitInfo = v75,
        canPlayAnimation = v72,
        isPortrait = v66.DeviceOrientation == l_DeviceOrientationMode_0.Portrait,
        topBarHeight = l_topBarHeight_0,
        buttonEnabled = v66.AvatarExperience.CameraButton.enabled,
        errorOccurred = if not v29 then nil else v66.AvatarExperience.CameraButton.errorOccurred
    };
end, function(v76)
    return {
        setCurrentToastMessage = function(v77)
            v76(v15(v77));
        end,
        setCameraButtonStatus = function(v78)
            v76(v16(v78));
        end
    };
end)(v36))))))));


local l_script_FirstAncestor_0 = script:FindFirstAncestor("AvatarExperience");
return {
    name = l_script_FirstAncestor_0.Name,
    roact = require(game:GetService("CorePackages").Packages.Roact),
    storyRoots = {
        l_script_FirstAncestor_0
    }
};


local l_CorePackages_0 = game:GetService("CorePackages");
local l_HttpService_0 = game:GetService("HttpService");
local v2 = require(l_CorePackages_0.Cryo);
local v3 = require(l_CorePackages_0.RoactNavigation);
local v4 = {};
v4.__index = v4;
v4.new = function(v5)
    v5 = v5 or {};
    local v6 = v5.params or {};
    local v7 = true;
    if v5.isFocused ~= nil then
        v7 = v5.isFocused;
    end;
    local v8 = v5.routeName or "DummyRoute";
    local v9 = {
        state = {
            routeName = v8,
            key = v5.key or v8,
            params = v6,
            routes = v5.routes
        },
        _isFocused = v7,
        _dispatchListeners = {},
        _eventListeners = {
            [v3.Events.WillFocus] = {},
            [v3.Events.DidFocus] = {},
            [v3.Events.WillBlur] = {},
            [v3.Events.DidBlur] = {}
        }
    };
    setmetatable(v9, v4);
    v9.isFocused = function()
        return v9._isFocused;
    end;
    v9.getParam = function(v10)
        return v9.state.params[v10];
    end;
    v9.navigate = function(v11)
        v9.state.routeName = v11;
        v9:setFocused(false);
    end;
    v9.goBack = function()
        v9:setFocused(false);
    end;
    v9.dispatch = function(v12)
        local l__dispatchListeners_0 = v9._dispatchListeners;
        if l__dispatchListeners_0 then
            for _, v15 in l__dispatchListeners_0, nil, nil do
                v15(v12);
            end;
        end;
    end;
    v9.addDispatchListener = function(v16)
        v9._dispatchListeners = v2.List.join(v9._dispatchListeners, {
            v16
        });
        return {
            remove = function()
                v9._eventListeners = v2.List.removeValue(v9._dispatchListeners, v16);
            end
        };
    end;
    v9.addListener = function(v17, v18)
        local v19 = v9._eventListeners[v17];
        if v19 then
            v9._eventListeners[v17] = v2.List.join(v19, {
                v18
            });
            return {
                remove = function()
                    v9._eventListeners[v17] = v2.List.removeValue(v9._eventListeners[v17], v18);
                end
            };
        else
            return {
                remove = function()
                end
            };
        end;
    end;
    return v9;
end;
v4.__tostring = function(v20)
    return string.format("FakeNavigation{routeName=%s, isFocused=%s, params=%s}", v20.state.routeName, not v20._isFocused and "false" or "true", l_HttpService_0:JSONEncode(v20.state.params));
end;
v4._fireEvent = function(v21, v22)
    local v23 = v21._eventListeners[v22];
    if v23 then
        for _, v25 in v23, nil, nil do
            v25();
        end;
    end;
end;
v4.setFocused = function(v26, v27)
    if v27 ~= v26._isFocused then
        v26:_fireEvent(not not v27 and v3.Events.WillFocus or v3.Events.WillBlur);
        v26._isFocused = v27;
        v26:_fireEvent(not not v27 and v3.Events.DidFocus or v3.Events.DidBlur);
    end;
end;
v4.setParams = function(v28, v29)
    v28.state.params = v29;
end;
return v4;


return function(_, v1, v2)
    local l_v1_0 = v1;
    local v4 = false;
    while l_v1_0 ~= nil do
        if l_v1_0 == v2 then
            v4 = true;
            break;
        else
            l_v1_0 = l_v1_0.Parent;
        end;
    end;
    return {
        pass = v4,
        message = function()
            return string.format("Expected `%s` %sto be a descendant of `%s`", v1:GetFullName(), not v4 and "" or "not ", v2:GetFullName());
        end
    };
end;


local l_GuiService_0 = game:GetService("GuiService");
local function _(v1)
    if not v1 then
        return "nil";
    else
        return (v1:GetFullName());
    end;
end;
return function(_, v4)
    if typeof(v4) == "table" then
        v4 = v4:getRbxInstance();
    end;
    local l_SelectedCoreObject_0 = l_GuiService_0.SelectedCoreObject;
    local v6 = false;
    while l_SelectedCoreObject_0 ~= nil do
        if l_SelectedCoreObject_0 == v4 then
            v6 = true;
            break;
        else
            l_SelectedCoreObject_0 = l_SelectedCoreObject_0.Parent;
        end;
    end;
    local l_v4_0 = v4;
    local v8 = not l_v4_0 and "nil" or l_v4_0:GetFullName();
    local l_SelectedCoreObject_1 = l_GuiService_0.SelectedCoreObject;
    l_v4_0 = not l_SelectedCoreObject_1 and "nil" or l_SelectedCoreObject_1:GetFullName();
    return {
        pass = v6,
        message = function()
            if not v6 then
                return string.format("Expected `%s` to be selected but actual selection was `%s`", v8, l_v4_0);
            else
                return string.format("Expected `%s` not to be selected but its descendant `%s` was", v8, l_v4_0);
            end;
        end
    };
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local l_RunService_0 = game:GetService("RunService");
local v2 = require(l_CorePackages_0.Roact);
local v3 = require(l_CorePackages_0.RoactNavigation);
local v4 = {};
v4.__index = v4;
v4.new = function()
    local v5 = {
        routeToNavProp = {}
    };
    setmetatable(v5, v4);
    return v5;
end;
v4.reset = function(v6)
    v6.routeToNavProp = {};
end;
v4.onRender = function(v7, v8)
    local l_navigation_0 = v8.navigation;
    v7.routeToNavProp[l_navigation_0.state.routeName] = l_navigation_0;
end;
v4.makeComponent = function(v10)
    return v3.withNavigation(function(v11)
        v10:onRender(v11);
        return nil;
    end);
end;
v4.waitForRoute = function(v12, v13)
    for _ = 1, 10 do
        local v15 = v12.routeToNavProp[v13];
        if not (not (not v15 or not v15.state) and v15.state.routeName == v13) or not v15.isFocused() then
            l_RunService_0.Stepped:Wait();
        else
            return v15;
        end;
    end;
    return nil;
end;
v4.dump = function(v16)
    print("NavigationLookup encountered routes:");
    for v17, _ in v16.routeToNavProp, nil, nil do
        print("    " .. tostring(v17));
    end;
    print();
end;
v4.createAppContainerWrapper = function(v19, v20)
    local v21 = ("NavLookup(%s)"):format((tostring(v19)));
    local v22 = {
        navigation = nil,
        component = nil
    };
    local v23 = v2.Component:extend(v21);
    v23.render = function(v24)
        v22.navigation = v24.props.navigation;
        return v2.createElement(v19, {
            navigation = v24.props.navigation
        });
    end;
    v23.router = v20 or v19.router;
    v22.component = function()
        return v2.createElement("Frame", {
            Size = UDim2.fromScale(1, 1),
            BackgroundTransparency = 1,
            BorderSizePixel = 0
        }, {
            AppContainer = v2.createElement(v3.createAppContainer(v23))
        });
    end;
    return v22;
end;
return v4;


local l_XPath_0 = require(game:GetService("CorePackages").Rhodium).XPath;
return function(v1)
    return v1:cat(l_XPath_0.new("*"));
end;


local l_CorePackages_0 = game:GetService("CorePackages");
local v1 = require(l_CorePackages_0.Cryo);
local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v3 = require(l_Modules_0.LuaApp.TestHelpers.MockRequest);
local v4 = require(l_Modules_0.LuaApp.Models.ExperienceGuidelinesApi.AgeRecommendationDetails);
local v5 = require(l_Modules_0.LuaApp.Models.GamesApi.Game);
local l_GameDetailModel_0 = require(l_CorePackages_0.Workspace.Packages.GameDetailRodux).GameDetails.GameDetailModel;
local v7 = {
    dummyUniverseId = "0",
    dummyGameName = "test"
};
local v8 = v4.mock();
local v9 = v5.mock();
return function(v10)
    local v11 = v1.Dictionary.join(v7, v10 or {});
    return {
        {
            url = string.format("v1/games?universeIds=%s", v11.dummyUniverseId),
            request = v3.simpleSuccessRequest({
                data = {
                    l_GameDetailModel_0.mock(v11.dummyUniverseId, v11.dummyGameName)
                }
            })
        },
        {
            url = string.format("v1/games/multiget-playability-status?universeIds=%s", v11.dummyUniverseId),
            request = v3.simpleSuccessRequest({
                {
                    playabilityStatus = "Playable",
                    isPlayable = true,
                    universeId = v11.dummyUniverseId
                }
            })
        },
        {
            url = "v1/settings/user-opt-in",
            request = v3.simpleSuccessRequest({
                isUserOptIn = true
            })
        },
        {
            url = string.format("v2/games/%s/media", v11.dummyUniverseId),
            request = v3.simpleSuccessRequest({
                data = {}
            })
        },
        {
            url = string.format("v1/games/%s/votes/user", v11.dummyUniverseId),
            request = v3.simpleSuccessRequest({
                canVote = false,
                userVote = nil,
                reasonForNotVoteable = "PlayGame"
            })
        },
        {
            url = string.format("v1/games/%s/votes", v11.dummyUniverseId),
            request = v3.simpleSuccessRequest({
                upVotes = 0,
                downVotes = 0
            })
        },
        {
            url = string.format("v1/games/%s/favorites", v11.dummyUniverseId),
            request = v3.simpleSuccessRequest({
                isFavorited = true
            })
        },
        {
            url = string.format("v1/users//universes/%s/status", v11.dummyUniverseId),
            request = v3.simpleSuccessRequest({
                UniverseId = v11.dummyUniverseId,
                UserId = 0,
                CanFollow = true,
                IsFollowing = true,
                FollowingCountByType = 0,
                FollowingLimitByType = 0
            })
        },
        {
            url = string.format("v1/games/%s/social-links/list", v11.dummyUniverseId),
            request = v3.simpleSuccessRequest({
                data = {}
            })
        },
        {
            url = string.format("v1/games/recommendations/game/%s?maxRows=6", v11.dummyUniverseId),
            request = v3.simpleSuccessRequest({
                games = {
                    v9
                }
            })
        },
        {
            url = "experience-guidelines-api/experience-guidelines/get-age-recommendation",
            request = v3.simpleSuccessRequest({
                ageRecommendationDetails = v8
            })
        },
        {
            url = string.format("v1/games/icons?universeIds=%s&format=png&size=150x150", v9.universeId),
            request = v3.simpleSuccessRequest({
                data = {
                    targetId = v9.universeId,
                    state = "Completed",
                    imageUrl = "https://t1.rbxcdn.com/a4bf94a31c04809ac4e8b8bd6aec01a1"
                }
            })
        },
        {
            url = string.format("v1/games/%s/game-passes", v11.dummyUniverseId),
            request = v3.simpleSuccessRequest({
                data = {
                    {
                        id = 1234567,
                        name = "test",
                        productId = 12345678,
                        price = 123
                    }
                }
            })
        },
        {
            url = "v1/game-passes?isCircular=true&format=png",
            request = v3.simpleSuccessRequest({
                data = {
                    targetId = v9.universeId,
                    state = "Completed",
                    imageUrl = "https://t1.rbxcdn.com/a4bf94a31c04809ac4e8b8bd6aec01a1"
                }
            })
        },
        {
            url = string.format("v1/universes/%s/badges", v11.dummyUniverseId),
            request = v3.simpleSuccessRequest({
                data = {
                    {
                        id = 123456
                    }
                }
            })
        }
    };
end;


local l_Modules_0 = game:GetService("CoreGui").RobloxGui.Modules;
local v1 = require(game:GetService("CorePackages").Cryo);
local v2 = require(l_Modules_0.LuaApp.TestHelpers.MockRequest);
local v3 = require(l_Modules_0.AvatarExperienceRhodiumTest.Helpers.getMockedEndpointsData);
local v4 = require(l_Modules_0.AvatarExperienceRhodiumTest.Helpers.getMockedAttributionEndpointsData);
return function(v5)
    return (v2.mockEndpoints(v1.List.join(v3(v5), v4(v5))));
end;