local W=workspace.CurrentCamera local q=avatarEditorGui.Main local s=q.Catalog local h=q.Viewer local x=avatarEditorGui.DetailsOverlay local K=avatarEditorGui.Toggle local X=h.Done local R=h.View local p=s.Header local e=p.CategoryTabs local v=p.SubCategoryTabs local i=p.Search local j=s.Container local C=j.ScrollingFrame local Y=C.UIGridLayout local g=j.ScaleFrame local d=g.UIGridLayout local y=i.TextBox local T=i.Clear local H=PurchasePrompt.new(x)local D=Maid.new()local k=Maid.new()local N={}local b={}local c=Instance.new("\078\117\109\098\101\114\086\097\108\117\101")c.Value=CAMERA_OFFSET local Q=TableUtil.Filter(e:GetChildren(),function(W)return W:IsA("\071\117\105\066\117\116\116\111\110")end)local G=TableUtil.Filter(v:GetChildren(),function(W)return W:IsA("\071\117\105\079\098\106\101\099\116")end)local V=Tween:Create(s,tweenInfo,{Position=UDim2.new(0,0,0,0)})local u=Tween:Create(s,tweenInfo,{Position=UDim2.new(-0.6,0,0,0)})local o=Tween:Create(h,tweenInfo,{Position=UDim2.new(1,0,0,0)})local P=Tween:Create(h,tweenInfo,{Position=UDim2.new(1.4,0,0,0)})local M=Tween:Create(h,tweenInfo,{Position=UDim2.new(1.4,-36,0,0)})local l=Tween:Create(c,tweenInfo,{Value=CAMERA_OFFSET})local B=Tween:Create(c,tweenInfo,{Value=.5})local z="\065\099\099\101\115\115\111\114\105\101\115"local Z="\072\097\105\114"local J=false local t=false
--local cameraModule = playerModule:GetCameras()

local camera = workspace.CurrentCamera

local avatarEditorFrame = avatarEditorGui.Main
local catalogFrame = avatarEditorFrame.Catalog
local viewerFrame = avatarEditorFrame.Viewer

local detailsOverlay = avatarEditorGui.DetailsOverlay
local toggleButton = avatarEditorGui.Toggle

local doneButton = viewerFrame.Done
local viewButton = viewerFrame.View

local headerFrame = catalogFrame.Header
local categoryTabsFrame = headerFrame.CategoryTabs
local subCategoryTabsFrame = headerFrame.SubCategoryTabs
local searchFrame = headerFrame.Search

local containerFrame = catalogFrame.Container
local scrollingFrame = containerFrame.ScrollingFrame
local scrollingFrameUIGridLayout = scrollingFrame.UIGridLayout

local scaleFrame = containerFrame.ScaleFrame
local scaleFrameUIGridLayout = scaleFrame.UIGridLayout

local searchTextBox = searchFrame.TextBox
local clearSearchButton = searchFrame.Clear

local purchasePrompt = PurchasePrompt.new(detailsOverlay)

local activeButtons = Maid.new()
local activeConnections = Maid.new()
local activeCategoryButtons = {}
local activeSubCategoryButtons = {}

local numberValue = Instance.new("NumberValue")
numberValue.Value = CAMERA_OFFSET

local categoryButtons = TableUtil.Filter(categoryTabsFrame:GetChildren(), function(item)
	return item:IsA("GuiButton")
end)
local subCategoryFrames = TableUtil.Filter(subCategoryTabsFrame:GetChildren(), function(item)
	return item:IsA("GuiObject")
end)

local catalogFrameOpenTween = Tween:Create(catalogFrame, tweenInfo, { Position = UDim2.new(0, 0, 0, 0) })
local catalogFrameCloseTween = Tween:Create(catalogFrame, tweenInfo, { Position = UDim2.new(-0.6, 0, 0, 0) })
local viewerFrameOpenTween = Tween:Create(viewerFrame, tweenInfo, { Position = UDim2.new(1, 0, 0, 0) })
local viewerFrameCloseTween = Tween:Create(viewerFrame, tweenInfo, { Position = UDim2.new(1.4, 0, 0, 0) })
local viewFramePartialOpenTween = Tween:Create(viewerFrame, tweenInfo, { Position = UDim2.new(1.4, -36, 0, 0) })
local fullViewCloseTween = Tween:Create(numberValue, tweenInfo, { Value = CAMERA_OFFSET })
local fullViewOpenTween = Tween:Create(numberValue, tweenInfo, { Value = 0.5 })

local currentCategory = "Accessories"
local currentSubCategory = "Hair"

local isOpen = false
local fullView = false
