-- Decompiled with the Synapse X Luau decompiler.

client = nil;
service = nil;
return function(p1)
	local v1 = p1.Table or p1.Tab;
	local l__Update__2 = p1.Update;
	local l__AutoUpdate__3 = p1.AutoUpdate;
	local l__LoadTime__4 = p1.LoadTime;
	local l__gIndex__5 = p1.gIndex;
	local l__gTable__6 = p1.gTable;
	local l__Dots__7 = p1.Dots;
	local l__Sanitize__8 = p1.Sanitize;
	local l__Stacking__1 = p1.Stacking;
	local u2 = nil;
	local u3 = nil;
	local function u4(p2)
		local v9 = {};
		for v10, v11 in next, p2 do
			if type(v11) == "table" then
				v9[v10] = {
					Text = v11.Text, 
					Desc = v11.Desc, 
					Time = v11.Time, 
					Filter = v11.Filter, 
					Duplicates = v11.Duplicates
				};
			elseif type(v11) == "string" then
				v9[v10] = {
					Text = v11, 
					Desc = v11
				};
			end;
		end;
		if l__Stacking__1 then
			v9 = {};
			local v12 = nil;
			for v13, v14 in next, v9 do
				v14.Text = service.Trim(v14.Text);
				v14.Desc = service.Trim(v14.Desc);
				if not v12 then
					v12 = v14;
					table.insert(v9, v14);
				elseif v12.Text == v14.Text and v12.Desc == v14.Desc then
					v12.Duplicates = v12.Duplicates and v12.Duplicates + 1 or 2;
				else
					v12 = v14;
					table.insert(v9, v14);
				end;
			end;
		end;
		local l__next__15 = next;
		local v16 = nil;
		while true do
			local v17, v18 = l__next__15(v9, v16);
			if not v17 then
				break;
			end;
			v18.Text = p1.Sanitize and service.SanitizeString(v18.Text) or v18.Text;
			if v18.Duplicates then
				v18.Text = "(x" .. v18.Duplicates .. ") " .. v18.Text;
			end;
			if v18.Time then
				v18.Text = "[" .. v18.Time .. "] " .. v18.Text;
			end;		
		end;
		return v9;
	end;
	local function u5(p3, p4)
		local v19 = {};
		p4 = p4:lower();
		for v20, v21 in next, p3 do
			if p4 == "" or type(v21) == "string" and not (not v21:lower():find(p4)) or type(v21) == "table" and (not (not v21.Text) and not (not v21.Text:lower():find(p4)) or v21.Filter and v21.Filter:lower():find(p4)) then
				table.insert(v19, v21);
			end;
		end;
		return v19;
	end;
	local function v22(p5)
		if u2.Text ~= "Search" and u2.Text ~= "" then
			u3:GenerateList(u4(u5(p5, u2.Text)));
			return;
		end;
		u2.Text = "Search";
		u3:GenerateList(u4(p5));
	end;
	local v23 = {
		Name = "List", 
		Title = p1.Title, 
		Size = p1.Size or { 225, 200 }, 
		MinSize = { 150, 100 }
	};
	local v24 = l__Update__2;
	if v24 then
		local u6 = v1;
		local l__UpdateArgs__7 = p1.UpdateArgs;
		local l__UpdateArg__8 = p1.UpdateArg;
		v24 = function()
			u6 = client.Remote.Get("UpdateList", l__Update__2, unpack(l__UpdateArgs__7 or { l__UpdateArg__8 }));
			if u6 then
				v22(u6);
			end;
		end;
	end;
	v23.OnRefresh = v24;
	local v25 = client.UI.Make("Window", v23);
	u3 = v25:Add("ScrollingFrame", {
		List = {}, 
		ScrollBarThickness = 2, 
		BackgroundTransparency = 1, 
		Position = UDim2.new(0, 5, 0, 30), 
		Size = UDim2.new(1, -10, 1, -30)
	});
	u2 = v25:Add("TextBox", {
		Size = UDim2.new(1, -10, 0, 20), 
		Position = UDim2.new(0, 5, 0, 5), 
		BackgroundTransparency = 0.5, 
		BorderSizePixel = 0, 
		TextColor3 = Color3.new(1, 1, 1), 
		Text = "Search", 
		PlaceholderText = "Search", 
		TextStrokeTransparency = 0.8
	});
	u2.FocusLost:connect(function(p6)
		v22(v1);
	end);
	v25:Ready();
	v22(v1);
	if l__Update__2 and l__AutoUpdate__3 then
		while v25.gTable.Active and wait(l__AutoUpdate__3) do
			v25:Refresh();		
		end;
	end;
end;