<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FRiniX%2Fsometest</id>
	<title>Module:Sandbox/RiniX/sometest - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FRiniX%2Fsometest"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/RiniX/sometest&amp;action=history"/>
	<updated>2026-04-21T13:24:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Sandbox/RiniX/sometest&amp;diff=146125&amp;oldid=prev</id>
		<title>imported&gt;Legoktm: Replace Module:No globals with require( &quot;strict&quot; )</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/RiniX/sometest&amp;diff=146125&amp;oldid=prev"/>
		<updated>2022-10-23T21:14:39Z</updated>

		<summary type="html">&lt;p&gt;Replace &lt;a href=&quot;/research/Module:No_globals&quot; title=&quot;Module:No globals&quot;&gt;Module:No globals&lt;/a&gt; with require( &amp;quot;strict&amp;quot; )&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module implements {{Series overview}}.&lt;br /&gt;
&lt;br /&gt;
require(&amp;#039;strict&amp;#039;)&lt;br /&gt;
local yesno = require(&amp;#039;Module:Yesno&amp;#039;)&lt;br /&gt;
local HTMLcolor = mw.loadData( &amp;#039;Module:Color contrast/colors&amp;#039; )&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- SeriesOverview class&lt;br /&gt;
-- The main class.&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local SeriesOverview = {}&lt;br /&gt;
&lt;br /&gt;
function SeriesOverview.cellspan(SeasonEntries, SeasonEntries_ordered, key, cell, multipart, setspan)&lt;br /&gt;
	if setspan ~= nil then return setspan end&lt;br /&gt;
	&lt;br /&gt;
	local spanlength = 1&lt;br /&gt;
	&lt;br /&gt;
	local firstEntry = SeasonEntries[SeasonEntries_ordered[cell]]&lt;br /&gt;
	if key == &amp;#039;network&amp;#039; and firstEntry.networkA and not firstEntry.networkB then spanlength = 2 end&lt;br /&gt;
	&lt;br /&gt;
	for i = cell+1, #SeasonEntries_ordered do&lt;br /&gt;
		local entry = SeasonEntries[SeasonEntries_ordered[i]]&lt;br /&gt;
		-- Split season, then regular season&lt;br /&gt;
		if entry[&amp;#039;začátekA&amp;#039;] then&lt;br /&gt;
			if not entry[key..&amp;#039;A&amp;#039;] then spanlength = spanlength + 1&lt;br /&gt;
			else break end&lt;br /&gt;
			if not entry[key..&amp;#039;B&amp;#039;] then spanlength = spanlength + 1&lt;br /&gt;
			else break end&lt;br /&gt;
		else&lt;br /&gt;
			if not entry[key] and (key == &amp;#039;network&amp;#039; or ((string.sub(key,0,7) == &amp;#039;postaux&amp;#039; or string.sub(key,0,3) == &amp;#039;aux&amp;#039;) and (not entry.special or entry[&amp;#039;díly&amp;#039;])) or (string.sub(key,0,4) == &amp;#039;info&amp;#039;) and multipart) then&lt;br /&gt;
				spanlength = spanlength + 1&lt;br /&gt;
			else break end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return spanlength&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Sorting function&lt;br /&gt;
function SeriesOverview.series_sort(op1, op2)&lt;br /&gt;
	local n1,s1 = string.match(op1,&amp;quot;(%d+)(%a*)&amp;quot;)&lt;br /&gt;
	local n2,s2 = string.match(op2,&amp;quot;(%d+)(%a*)&amp;quot;)&lt;br /&gt;
	local n1N,n2N = tonumber(n1),tonumber(n2)&lt;br /&gt;
&lt;br /&gt;
	if n1N == n2N then&lt;br /&gt;
		return s1 &amp;lt; s2&lt;br /&gt;
	else&lt;br /&gt;
		return n1N &amp;lt; n2N&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Function to add either text or {{N/a}} to cell&lt;br /&gt;
function SeriesOverview.season_cell(text, frame)&lt;br /&gt;
	local cell&lt;br /&gt;
	&lt;br /&gt;
	if string.find(text or &amp;#039;&amp;#039;, &amp;#039;table-na&amp;#039;, 0, true) ~= nil then&lt;br /&gt;
		local findpipe = string.find(text, &amp;#039; | &amp;#039;, 0, true)&lt;br /&gt;
		if findpipe ~= nil then&lt;br /&gt;
			cell = SeriesOverview.series_attributes( frame:expandTemplate{title=&amp;#039;N/A&amp;#039;,args={string.sub(text,findpipe+3)}} )&lt;br /&gt;
		else&lt;br /&gt;
			cell = SeriesOverview.series_attributes( frame:expandTemplate{title=&amp;#039;N/A&amp;#039;} )&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		cell = mw.html.create(&amp;#039;td&amp;#039;):wikitext(text)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return cell&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Allow usages of {{N/A}} cells&lt;br /&gt;
function SeriesOverview.series_attributes(infoParam)&lt;br /&gt;
	local entries = {}&lt;br /&gt;
	local infoCell = mw.html.create(&amp;#039;td&amp;#039;)&lt;br /&gt;
	local attrMatch = &amp;#039;([%a-]*)=&amp;quot;([^&amp;quot;]*)&amp;quot;&amp;#039;&lt;br /&gt;
	&lt;br /&gt;
	while true do&lt;br /&gt;
		local a,b = string.match(infoParam,attrMatch)&lt;br /&gt;
		if a == nil or b == nil then break end&lt;br /&gt;
		infoCell:attr(a,b)&lt;br /&gt;
		infoParam = string.gsub(infoParam,attrMatch,&amp;#039;&amp;#039;,1)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	infoParam = string.gsub(infoParam,&amp;#039;%s*|%s*&amp;#039;,&amp;#039;&amp;#039;,1)&lt;br /&gt;
	infoCell:wikitext(infoParam)&lt;br /&gt;
	&lt;br /&gt;
	return infoCell&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function SeriesOverview.new(frame, args)&lt;br /&gt;
	args = args or {}&lt;br /&gt;
	&lt;br /&gt;
	local initialArticle = args[&amp;#039;1&amp;#039;] or &amp;#039;&amp;#039;&lt;br /&gt;
	local categories = &amp;#039;&amp;#039;&lt;br /&gt;
	local title = mw.title.getCurrentTitle()&lt;br /&gt;
	local allReleased = yesno(args[&amp;#039;vydání všeho&amp;#039;] or args.allreleased)&lt;br /&gt;
&lt;br /&gt;
	-- Create series overview table&lt;br /&gt;
	local root = mw.html.create((args.multiseries or not args.series) and &amp;#039;table&amp;#039; or &amp;#039;&amp;#039;)&lt;br /&gt;
	local cellPadding = &amp;#039;0 8px&amp;#039;&lt;br /&gt;
	local basePadding = &amp;#039;0.2em 0.4em&amp;#039;&lt;br /&gt;
&lt;br /&gt;
	root&lt;br /&gt;
		:addClass(&amp;#039;wikitable&amp;#039;)&lt;br /&gt;
		:addClass(&amp;#039;plainrowheaders&amp;#039;)&lt;br /&gt;
		:css(&amp;#039;text-align&amp;#039;, &amp;#039;center&amp;#039;)&lt;br /&gt;
	&lt;br /&gt;
	-- Sortable&lt;br /&gt;
	if args.sortable then&lt;br /&gt;
		root:addClass(&amp;#039;sortable&amp;#039;);&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Width&lt;br /&gt;
	if args.width then&lt;br /&gt;
		root:css(&amp;#039;width&amp;#039;, args.width)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Caption&lt;br /&gt;
	if args.caption then&lt;br /&gt;
		root:tag(&amp;#039;caption&amp;#039;):wikitext(frame:expandTemplate{title=&amp;#039;Screen reader-only&amp;#039;,args={args.caption}})&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Extract seasons info and place into a 3D array&lt;br /&gt;
	local SeasonEntries = {}&lt;br /&gt;
	for k,v in pairs(args) do&lt;br /&gt;
		local str, num, str2 = string.match(k, &amp;#039;([^%d]*)(%d*)(%a*)&amp;#039;)&lt;br /&gt;
		if tonumber(k) ~= 1 and num ~= &amp;#039;&amp;#039; then &lt;br /&gt;
			-- Special&lt;br /&gt;
			local special = false&lt;br /&gt;
			if string.sub(str2,1,1) == &amp;#039;S&amp;#039; then&lt;br /&gt;
				special = true&lt;br /&gt;
				num = num .. str2&lt;br /&gt;
				str2 = &amp;#039;&amp;#039;&lt;br /&gt;
			end&lt;br /&gt;
			-- Add to entries, create if necessary&lt;br /&gt;
			if not SeasonEntries[num] then&lt;br /&gt;
				SeasonEntries[num] = {}&lt;br /&gt;
			end&lt;br /&gt;
			SeasonEntries[num][str .. str2] = v&lt;br /&gt;
			if special then&lt;br /&gt;
				SeasonEntries[num][&amp;#039;special&amp;#039;] = &amp;#039;y&amp;#039;&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Order table by season number&lt;br /&gt;
	local SeasonEntries_ordered = {}&lt;br /&gt;
	for k in pairs(SeasonEntries) do&lt;br /&gt;
		table.insert(SeasonEntries_ordered, k)&lt;br /&gt;
	end&lt;br /&gt;
	table.sort(SeasonEntries_ordered,SeriesOverview.series_sort)&lt;br /&gt;
	&lt;br /&gt;
	local firstRow = args.multiseries and {} or SeasonEntries[SeasonEntries_ordered[1]]&lt;br /&gt;
	&lt;br /&gt;
	-- Colspan calculation for information cells (0 = no info set)&lt;br /&gt;
	local numAuxCells = 0&lt;br /&gt;
	local numInfoCells = 0&lt;br /&gt;
	for i = string.byte(&amp;#039;A&amp;#039;), string.byte(&amp;#039;Z&amp;#039;) do&lt;br /&gt;
		local param = &amp;#039;info&amp;#039; .. string.char(i)&lt;br /&gt;
		if args[param] then numInfoCells = numInfoCells + 1 end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Use of colors and network&lt;br /&gt;
	local noColors = true&lt;br /&gt;
	local setNetwork = false&lt;br /&gt;
	if (args.multiseries and args.network) then setNetwork = true end&lt;br /&gt;
	for i = 1, #SeasonEntries_ordered do&lt;br /&gt;
		local season, entry = SeasonEntries_ordered[i], SeasonEntries[SeasonEntries_ordered[i]]&lt;br /&gt;
		for j0 = string.byte(&amp;#039;A&amp;#039;)-1, string.byte(&amp;#039;Z&amp;#039;) do&lt;br /&gt;
			local j = string.char(j0)&lt;br /&gt;
			if j0 == string.byte(&amp;#039;A&amp;#039;)-1 then j = &amp;#039;&amp;#039; end&lt;br /&gt;
			if entry[&amp;#039;řada&amp;#039; .. j] then noColors = false end&lt;br /&gt;
			if entry[&amp;#039;network&amp;#039; .. j] then setNetwork = true end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Top info cell&lt;br /&gt;
	-- @ = string.char(64), A = string.char(65)&lt;br /&gt;
	local topInfoCell = numInfoCells &amp;gt; 0 and string.char(numInfoCells + (string.byte(&amp;#039;A&amp;#039;) - 1)) or &amp;#039;@&amp;#039;&lt;br /&gt;
	&lt;br /&gt;
	-- Networks are included if the very first entry sets the first network&lt;br /&gt;
	local networkTransclude = args.network_transclude&lt;br /&gt;
	if (networkTransclude == &amp;#039;onlyinclude&amp;#039; and title.fullText == initialArticle) or (networkTransclude == &amp;#039;noinclude&amp;#039; and title.fullText ~= initialArticle) then&lt;br /&gt;
		setNetwork = false&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Headers&lt;br /&gt;
	do&lt;br /&gt;
		if args.multiseries or not args.series then&lt;br /&gt;
			local headerRow = root:tag(&amp;#039;tr&amp;#039;)&lt;br /&gt;
			headerRow&lt;br /&gt;
				:css(&amp;#039;text-align&amp;#039;, &amp;#039;center&amp;#039;)&lt;br /&gt;
			&lt;br /&gt;
			local releasedBlurb = args[&amp;#039;vydání&amp;#039;] and &amp;#039;vydáno&amp;#039; or &amp;#039;vysíláno&amp;#039;&lt;br /&gt;
			&lt;br /&gt;
			-- Base series/season content on the format of the first date; Series = D M Y, Season = M D, Y&lt;br /&gt;
			local matchDMY = false&lt;br /&gt;
			local thisStart = firstRow.start or firstRow.startA&lt;br /&gt;
			if thisStart then&lt;br /&gt;
				if string.match(thisStart:gsub(&amp;quot;&amp;amp;nbsp;&amp;quot;,&amp;quot; &amp;quot;), &amp;#039;(%d+)%s(%a+)%s(%d+)&amp;#039;) then&lt;br /&gt;
					matchDMY = true&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			&lt;br /&gt;
			-- Multiple series header&lt;br /&gt;
			if args.multiseries then&lt;br /&gt;
				headerRow:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
					:attr(&amp;#039;scope&amp;#039;, &amp;#039;col&amp;#039;)&lt;br /&gt;
					:css(&amp;#039;padding&amp;#039;, cellPadding)&lt;br /&gt;
					:attr(&amp;#039;rowspan&amp;#039;, allReleased and 1 or 2)&lt;br /&gt;
					:wikitext(&amp;#039;Series&amp;#039;)&lt;br /&gt;
			end&lt;br /&gt;
			&lt;br /&gt;
			-- Season header&lt;br /&gt;
			headerRow:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
				:attr(&amp;#039;scope&amp;#039;, &amp;#039;col&amp;#039;)&lt;br /&gt;
				:attr(&amp;#039;rowspan&amp;#039;, allReleased and 1 or 2)&lt;br /&gt;
				:attr(&amp;#039;colspan&amp;#039;, ((args.multiseries and args.no_colors) or (not args.multiseries and noColors)) and 1 or 2)&lt;br /&gt;
				:css(&amp;#039;min-width&amp;#039;, &amp;#039;50px&amp;#039;)&lt;br /&gt;
				:css(&amp;#039;padding&amp;#039;, cellPadding)&lt;br /&gt;
				:wikitext(args.seriesT or args.seasonT or (matchDMY and &amp;#039;Seriál&amp;#039;) or &amp;#039;Řada&amp;#039;)&lt;br /&gt;
			&lt;br /&gt;
			for _a = 1, 3 do&lt;br /&gt;
				if _a == 1 or _a == 3 then&lt;br /&gt;
					-- Aux headers&lt;br /&gt;
					local auxtype = (_a == 3 and &amp;#039;post&amp;#039; or &amp;#039;&amp;#039;) .. &amp;#039;aux&amp;#039;&lt;br /&gt;
					for i = string.byte(&amp;#039;A&amp;#039;), string.byte(&amp;#039;Z&amp;#039;) do&lt;br /&gt;
						local param = auxtype .. string.char(i)&lt;br /&gt;
						if args[param] then&lt;br /&gt;
							numAuxCells = numAuxCells + 1&lt;br /&gt;
							headerRow:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
								:attr(&amp;#039;scope&amp;#039;, &amp;#039;col&amp;#039;)&lt;br /&gt;
								:css(&amp;#039;padding&amp;#039;, cellPadding)&lt;br /&gt;
								:attr(&amp;#039;rowspan&amp;#039;, allReleased and 1 or 2)&lt;br /&gt;
								:wikitext(args[param])&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
				&lt;br /&gt;
				if _a == 2 then&lt;br /&gt;
					-- Episodes header&lt;br /&gt;
					headerRow:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
						:attr(&amp;#039;scope&amp;#039;, &amp;#039;col&amp;#039;)&lt;br /&gt;
						:attr(&amp;#039;rowspan&amp;#039;, allReleased and 1 or 2)&lt;br /&gt;
						:attr(&amp;#039;colspan&amp;#039;, 2)&lt;br /&gt;
						:css(&amp;#039;padding&amp;#039;, cellPadding)&lt;br /&gt;
						:wikitext(&amp;#039;Díly&amp;#039;)&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
&lt;br /&gt;
			-- Originally aired header&lt;br /&gt;
			local OriginallyColspan = (not allReleased and setNetwork) and 3 or 2&lt;br /&gt;
			local countryBlurb = &amp;#039;&amp;#039;&lt;br /&gt;
			if args[&amp;#039;země&amp;#039;] or args.country then&lt;br /&gt;
				countryBlurb = &amp;#039; &amp;#039; .. args[&amp;#039;země&amp;#039;] or args.country .. &amp;#039;&amp;#039;&lt;br /&gt;
			end&lt;br /&gt;
			headerRow:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
				:attr(&amp;#039;scope&amp;#039;, &amp;#039;col&amp;#039;)&lt;br /&gt;
				:attr(&amp;#039;colspan&amp;#039;, OriginallyColspan)&lt;br /&gt;
				:wikitext(&amp;#039;Původně &amp;#039; .. releasedBlurb .. countryBlurb)&lt;br /&gt;
			&lt;br /&gt;
			-- Network subheader for released series&lt;br /&gt;
			if setNetwork and allReleased then&lt;br /&gt;
				headerRow:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
					:attr(&amp;#039;scope&amp;#039;, &amp;#039;col&amp;#039;)&lt;br /&gt;
					:attr(&amp;#039;rowspan&amp;#039;, allReleased and 1 or 2)&lt;br /&gt;
					:css(&amp;#039;padding&amp;#039;, cellPadding)&lt;br /&gt;
					:wikitext(&amp;#039;Network&amp;#039;)&lt;br /&gt;
			end&lt;br /&gt;
			&lt;br /&gt;
			-- Information headers&lt;br /&gt;
			if topInfoCell ~= &amp;#039;@&amp;#039; then&lt;br /&gt;
				for i = string.byte(&amp;#039;A&amp;#039;), string.byte(topInfoCell) do&lt;br /&gt;
					local param = &amp;#039;info&amp;#039; .. string.char(i)&lt;br /&gt;
					local infoTransclude = args[param .. &amp;#039;_transclude&amp;#039;]&lt;br /&gt;
					if (infoTransclude == &amp;#039;onlyinclude&amp;#039; and title.fullText == initialArticle) or (infoTransclude == &amp;#039;noinclude&amp;#039; and title.fullText ~= initialArticle) then else&lt;br /&gt;
						headerRow:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
							:attr(&amp;#039;scope&amp;#039;, &amp;#039;col&amp;#039;)&lt;br /&gt;
							:attr(&amp;#039;rowspan&amp;#039;, allReleased and 1 or 2)&lt;br /&gt;
							:css(&amp;#039;padding&amp;#039;, cellPadding)&lt;br /&gt;
							:wikitext(args[param])&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			&lt;br /&gt;
			-- Subheader row&lt;br /&gt;
			local subheaderRow = mw.html.create(&amp;#039;tr&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
			if not allReleased then&lt;br /&gt;
				-- First aired subheader&lt;br /&gt;
				subheaderRow:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
					:attr(&amp;#039;scope&amp;#039;, &amp;#039;col&amp;#039;)&lt;br /&gt;
					:wikitext(&amp;#039;První díl&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
				-- Last aired subheader&lt;br /&gt;
				subheaderRow:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
					:attr(&amp;#039;scope&amp;#039;, &amp;#039;col&amp;#039;)&lt;br /&gt;
					:wikitext(&amp;#039;Poslední díl&amp;#039;)&lt;br /&gt;
				&lt;br /&gt;
				-- Network subheader for aired series&lt;br /&gt;
				if setNetwork then&lt;br /&gt;
					subheaderRow:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
						:attr(&amp;#039;scope&amp;#039;, &amp;#039;col&amp;#039;)&lt;br /&gt;
						:css(&amp;#039;padding&amp;#039;, cellPadding)&lt;br /&gt;
						:wikitext(&amp;#039;Network&amp;#039;)&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		&lt;br /&gt;
			-- Check for scenarios with an empty subheaderRow&lt;br /&gt;
			if not allReleased or numInfoCells &amp;gt; 0 then&lt;br /&gt;
				root:node(subheaderRow)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Season rows&lt;br /&gt;
	do&lt;br /&gt;
		if args.multiseries then&lt;br /&gt;
			-- Multi series individual entries&lt;br /&gt;
			if args.multiseries ~= &amp;quot;y&amp;quot; then&lt;br /&gt;
				root:node(args.multiseries)&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			-- One row entries, only categorized in the mainspace&lt;br /&gt;
			if title.namespace == 0 and #SeasonEntries == 1 then&lt;br /&gt;
				categories = categories .. &amp;#039;[[Category:Articles using Template:Series overview with only one row]]&amp;#039;&lt;br /&gt;
			end&lt;br /&gt;
		&lt;br /&gt;
			-- Determine number of rows in the whole overview&lt;br /&gt;
			local SeasonEntriesRows = 0&lt;br /&gt;
			for X = 1, #SeasonEntries_ordered do&lt;br /&gt;
				local season, entry = SeasonEntries_ordered[X], SeasonEntries[SeasonEntries_ordered[X]]&lt;br /&gt;
				local splits = 0&lt;br /&gt;
				for i = string.byte(&amp;#039;A&amp;#039;), string.byte(&amp;#039;Z&amp;#039;) do&lt;br /&gt;
					local param = &amp;#039;začátek&amp;#039; .. string.char(i)&lt;br /&gt;
					if entry[param] then splits = splits + 1 end&lt;br /&gt;
				end&lt;br /&gt;
				if splits == 0 then splits = 1 end&lt;br /&gt;
				SeasonEntriesRows = SeasonEntriesRows + splits&lt;br /&gt;
			end&lt;br /&gt;
			&lt;br /&gt;
			for X = 1, #SeasonEntries_ordered do&lt;br /&gt;
				local season, entry = SeasonEntries_ordered[X], SeasonEntries[SeasonEntries_ordered[X]]&lt;br /&gt;
				&lt;br /&gt;
				-- Determine number of splits in a season&lt;br /&gt;
				local splits = 0&lt;br /&gt;
				for i = string.byte(&amp;#039;A&amp;#039;), string.byte(&amp;#039;Z&amp;#039;) do&lt;br /&gt;
					local param = &amp;#039;začátek&amp;#039; .. string.char(i)&lt;br /&gt;
					if entry[param] then splits = splits + 1 end&lt;br /&gt;
				end&lt;br /&gt;
				local splitSeason = (splits &amp;gt; 1)&lt;br /&gt;
				&lt;br /&gt;
				-- Season rows for each season&lt;br /&gt;
				for k0 = string.byte(&amp;#039;A&amp;#039;)-1, string.byte(&amp;#039;Z&amp;#039;) do&lt;br /&gt;
					local k = string.char(k0)&lt;br /&gt;
					if k0 == string.byte(&amp;#039;A&amp;#039;)-1 then k = &amp;#039;&amp;#039; end&lt;br /&gt;
					&lt;br /&gt;
					-- New season row&lt;br /&gt;
					-- local seasonRow = (entry[&amp;#039;color&amp;#039; .. k] or entry[&amp;#039;episodes&amp;#039; .. k] or entry[&amp;#039;start&amp;#039; .. k] or entry[&amp;#039;end&amp;#039; .. k]) and root:tag(&amp;#039;tr&amp;#039;) or mw.html.create(&amp;#039;tr&amp;#039;)&lt;br /&gt;
					local seasonRow = entry[&amp;#039;začátek&amp;#039; .. k] and root:tag(&amp;#039;tr&amp;#039;) or mw.html.create(&amp;#039;tr&amp;#039;)&lt;br /&gt;
					&lt;br /&gt;
					-- Part header&lt;br /&gt;
					if entry.part then&lt;br /&gt;
						seasonRow:node(entry.part)&lt;br /&gt;
					end&lt;br /&gt;
					&lt;br /&gt;
					local borderBottom = &amp;#039;2px solid #8D939A&amp;#039;&lt;br /&gt;
					&lt;br /&gt;
					-- Series name for group overviews&lt;br /&gt;
					if X == 1 and (k == &amp;#039;&amp;#039; or k == &amp;#039;A&amp;#039;) and args.series then&lt;br /&gt;
						seasonRow:tag(&amp;#039;th&amp;#039;)&lt;br /&gt;
							:attr(&amp;#039;scope&amp;#039;, &amp;#039;row&amp;#039;)&lt;br /&gt;
							:attr(&amp;#039;rowspan&amp;#039;, SeasonEntriesRows)&lt;br /&gt;
							:wikitext(args.series)&lt;br /&gt;
							:css(&amp;#039;border-bottom&amp;#039;, borderBottom)&lt;br /&gt;
					end&lt;br /&gt;
					if X == #SeasonEntries_ordered and args.series then&lt;br /&gt;
						seasonRow:css(&amp;#039;border-bottom&amp;#039;, borderBottom)&lt;br /&gt;
					end&lt;br /&gt;
					&lt;br /&gt;
					-- Colored cell&lt;br /&gt;
					if not noColors then&lt;br /&gt;
						if entry[&amp;#039;řada&amp;#039; .. k] ~= nil and HTMLcolor[entry[&amp;#039;řada&amp;#039; .. k]] == nil then &lt;br /&gt;
							entry[&amp;#039;řada&amp;#039; .. k] = &amp;#039;#&amp;#039;..(mw.ustring.match(entry[&amp;#039;řada&amp;#039; .. k], &amp;#039;^[%s#]*([a-fA-F0-9]*)[%s]*$&amp;#039;) or &amp;#039;&amp;#039;)&lt;br /&gt;
						end&lt;br /&gt;
						if splitSeason and entry[&amp;#039;řada&amp;#039;] then&lt;br /&gt;
							if k == &amp;#039;A&amp;#039; then&lt;br /&gt;
								seasonRow:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
									:attr(&amp;#039;rowspan&amp;#039;, entry[&amp;#039;řada&amp;#039;] and splits or 1)&lt;br /&gt;
									:css(&amp;#039;background&amp;#039;, entry[&amp;#039;řada&amp;#039;])&lt;br /&gt;
									:css(&amp;#039;width&amp;#039;,&amp;#039;10px&amp;#039;)&lt;br /&gt;
							end&lt;br /&gt;
						else&lt;br /&gt;
							seasonRow:tag(&amp;#039;td&amp;#039;)&lt;br /&gt;
								:css(&amp;#039;background&amp;#039;,entry[&amp;#039;řada&amp;#039; .. k])&lt;br /&gt;
								:css(&amp;#039;width&amp;#039;,&amp;#039;10px&amp;#039;)&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
					&lt;br /&gt;
					-- Season number link, included only in the first row&lt;br /&gt;
					if k == &amp;#039;&amp;#039; or k == &amp;#039;A&amp;#039; then&lt;br /&gt;
						seasonRow:tag(args.series and &amp;#039;td&amp;#039; or &amp;#039;th&amp;#039;)&lt;br /&gt;
							:attr(&amp;#039;scope&amp;#039;, &amp;#039;row&amp;#039;)&lt;br /&gt;
							:attr(&amp;#039;rowspan&amp;#039;, splitSeason and splits or nil)&lt;br /&gt;
							:attr(&amp;#039;colspan&amp;#039;, entry.special and not entry[&amp;#039;díly&amp;#039;] and 3+numAuxCells or 1)&lt;br /&gt;
							:css(&amp;#039;text-align&amp;#039;, &amp;#039;center&amp;#039;)&lt;br /&gt;
							:wikitext((entry.link and &amp;#039;[[&amp;#039; .. entry.link .. &amp;#039;|&amp;#039; .. (entry.linkT or season) .. &amp;#039;]]&amp;#039; or (entry.linkT or season)) .. (entry.linkR or &amp;#039;&amp;#039;))&lt;br /&gt;
					end&lt;br /&gt;
					&lt;br /&gt;
					for _a = 1, 3 do&lt;br /&gt;
						if _a == 1 or _a == 3 then&lt;br /&gt;
							-- Aux headers&lt;br /&gt;
							local auxtype = (_a == 3 and &amp;#039;post&amp;#039; or &amp;#039;&amp;#039;) .. &amp;#039;aux&amp;#039;&lt;br /&gt;
							-- Aux cells&lt;br /&gt;
							for i = string.byte(&amp;#039;A&amp;#039;), string.byte(&amp;#039;Z&amp;#039;) do&lt;br /&gt;
								local param = auxtype .. string.char(i)&lt;br /&gt;
								if entry[param .. k] then&lt;br /&gt;
									local thisCell = SeriesOverview.season_cell(entry[param .. k], frame)&lt;br /&gt;
										:attr(&amp;#039;scope&amp;#039;, &amp;#039;col&amp;#039;)&lt;br /&gt;
										:attr(&amp;#039;rowspan&amp;#039;, SeriesOverview.cellspan(SeasonEntries, SeasonEntries_ordered, param, X, (args.series and true or false), entry[param .. k .. &amp;#039;span&amp;#039;] or nil))&lt;br /&gt;
										:css(&amp;#039;padding&amp;#039;, cellPadding)&lt;br /&gt;
									seasonRow:node(thisCell)&lt;br /&gt;
								end&lt;br /&gt;
							end&lt;br /&gt;
						end&lt;br /&gt;
						&lt;br /&gt;
						if _a == 2 then&lt;br /&gt;
							-- Episodes counts&lt;br /&gt;
							if ((splitSeason and k == &amp;#039;A&amp;#039; and entry[&amp;#039;díly&amp;#039;] ~= &amp;#039;hide&amp;#039;) or not splitSeason) then&lt;br /&gt;
								if entry[&amp;#039;díly&amp;#039;] then&lt;br /&gt;
									local thisCell = SeriesOverview.season_cell(entry[&amp;#039;díly&amp;#039;], frame)&lt;br /&gt;
										:attr(&amp;#039;colspan&amp;#039;, splitSeason and 1 or 2)&lt;br /&gt;
										:attr(&amp;#039;rowspan&amp;#039;, splitSeason and splits or nil)&lt;br /&gt;
									seasonRow:node(thisCell)&lt;br /&gt;
								elseif not entry.special then&lt;br /&gt;
									local infoCell = SeriesOverview.series_attributes( frame:expandTemplate{title=&amp;#039;N/A&amp;#039;,args={&amp;#039;TBA&amp;#039;}} )&lt;br /&gt;
									infoCell&lt;br /&gt;
										:attr(&amp;#039;colspan&amp;#039;, splitSeason and 1 or 2)&lt;br /&gt;
										:attr(&amp;#039;rowspan&amp;#039;, splitSeason and splits or nil)&lt;br /&gt;
									seasonRow:node(infoCell)&lt;br /&gt;
								end&lt;br /&gt;
							end&lt;br /&gt;
							if splitSeason then&lt;br /&gt;
								if entry[&amp;#039;díly&amp;#039; .. k] then&lt;br /&gt;
									local thisCell = SeriesOverview.season_cell(entry[&amp;#039;díly&amp;#039; .. k], frame)&lt;br /&gt;
										:attr(&amp;#039;colspan&amp;#039;, (entry[&amp;#039;díly&amp;#039;] ~= &amp;#039;hide&amp;#039;) and 1 or 2)&lt;br /&gt;
									seasonRow:node(thisCell)&lt;br /&gt;
								else&lt;br /&gt;
									local infoCell = SeriesOverview.series_attributes( frame:expandTemplate{title=&amp;#039;N/A&amp;#039;,args={&amp;#039;TBA&amp;#039;}} )&lt;br /&gt;
										:attr(&amp;#039;colspan&amp;#039;, (entry[&amp;#039;díly&amp;#039;] ~= &amp;#039;hide&amp;#039;) and 1 or 2)&lt;br /&gt;
									seasonRow:node(infoCell)&lt;br /&gt;
								end&lt;br /&gt;
							end&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
				&lt;br /&gt;
					-- Start date&lt;br /&gt;
					if entry[&amp;#039;začátek&amp;#039; .. k] then&lt;br /&gt;
						local thisCell = SeriesOverview.season_cell(entry[&amp;#039;začátek&amp;#039; .. k], frame)&lt;br /&gt;
							:attr(&amp;#039;colspan&amp;#039;,((not entry.special and entry[&amp;#039;konec&amp;#039; .. k] == &amp;#039;začátek&amp;#039;) or (entry.special and not entry[&amp;#039;konec&amp;#039; .. k]) or allReleased) and 2 or 1)&lt;br /&gt;
							:css(&amp;#039;padding&amp;#039;,basePadding)&lt;br /&gt;
						seasonRow:node(thisCell)&lt;br /&gt;
					else&lt;br /&gt;
						local infoCell = SeriesOverview.series_attributes( frame:expandTemplate{title=&amp;#039;N/A&amp;#039;,args={&amp;#039;TBA&amp;#039;}} )&lt;br /&gt;
						infoCell:css(&amp;#039;padding&amp;#039;,basePadding)&lt;br /&gt;
						seasonRow:node(infoCell)&lt;br /&gt;
					end&lt;br /&gt;
					&lt;br /&gt;
					-- End date&lt;br /&gt;
					if not allReleased and entry[&amp;#039;konec&amp;#039; .. k] ~= &amp;#039;začátek&amp;#039; and ((entry.special and entry[&amp;#039;konec&amp;#039; .. k]) or not entry.special) then&lt;br /&gt;
						if entry[&amp;#039;konec&amp;#039; .. k] then&lt;br /&gt;
							local thisCell = SeriesOverview.season_cell(entry[&amp;#039;konec&amp;#039; .. k], frame)&lt;br /&gt;
								:css(&amp;#039;padding&amp;#039;,cellPadding)&lt;br /&gt;
							seasonRow:node(thisCell)&lt;br /&gt;
						else&lt;br /&gt;
							local infoCell = SeriesOverview.series_attributes( frame:expandTemplate{title=&amp;#039;N/A&amp;#039;,args={&amp;#039;TBA&amp;#039;}} )&lt;br /&gt;
							infoCell:css(&amp;#039;padding&amp;#039;,cellPadding)&lt;br /&gt;
							seasonRow:node(infoCell)&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
					&lt;br /&gt;
					-- Network&lt;br /&gt;
					if entry[&amp;#039;network&amp;#039; .. k] and setNetwork then&lt;br /&gt;
						local thisCell = SeriesOverview.season_cell(entry[&amp;#039;network&amp;#039; .. k], frame)&lt;br /&gt;
							:attr(&amp;#039;rowspan&amp;#039;, SeriesOverview.cellspan(SeasonEntries, SeasonEntries_ordered, &amp;#039;network&amp;#039;, X, (args.series and true or false), entry[&amp;#039;network&amp;#039; .. k .. &amp;#039;span&amp;#039;] or nil))&lt;br /&gt;
						seasonRow:node(thisCell)&lt;br /&gt;
					end&lt;br /&gt;
					&lt;br /&gt;
					-- Information&lt;br /&gt;
					for i = string.byte(&amp;#039;A&amp;#039;), string.byte(topInfoCell) do&lt;br /&gt;
						local param0 = &amp;#039;info&amp;#039; .. string.char(i)&lt;br /&gt;
						local param = &amp;#039;info&amp;#039; .. string.char(i) .. k&lt;br /&gt;
						&lt;br /&gt;
						local infoTransclude = args[param .. &amp;#039;_transclude&amp;#039;]&lt;br /&gt;
						if (infoTransclude == &amp;#039;onlyinclude&amp;#039; and title.fullText == initialArticle) or (infoTransclude == &amp;#039;noinclude&amp;#039; and title.fullText ~= initialArticle) then else&lt;br /&gt;
							local infoParam = entry[param]&lt;br /&gt;
							&lt;br /&gt;
							if infoParam and splitSeason and k == &amp;#039;&amp;#039; and not entry[param .. &amp;#039;A&amp;#039;] then&lt;br /&gt;
								entry[param .. &amp;#039;A&amp;#039;] = entry[param]&lt;br /&gt;
								entry[param .. &amp;#039;spanning&amp;#039;] = &amp;#039;y&amp;#039;&lt;br /&gt;
							end&lt;br /&gt;
							&lt;br /&gt;
							local rowspan = (entry[param0 .. &amp;#039;spanning&amp;#039;] and splits) or&lt;br /&gt;
											(args.series and SeriesOverview.cellspan(SeasonEntries, SeasonEntries_ordered, param0, X, (args.series and true or false), entry[param0 .. &amp;#039;span&amp;#039;] or nil))&lt;br /&gt;
											or nil&lt;br /&gt;
							&lt;br /&gt;
							if k == &amp;#039;A&amp;#039; or (k ~= &amp;#039;A&amp;#039; and not entry[param0 .. &amp;#039;spanning&amp;#039;]) then&lt;br /&gt;
								-- Cells with {{N/A|...}} already expanded&lt;br /&gt;
								if infoParam then&lt;br /&gt;
									if string.sub(infoParam,1,5) == &amp;#039;style&amp;#039; then&lt;br /&gt;
										local infoCell = SeriesOverview.series_attributes(infoParam)&lt;br /&gt;
										infoCell:attr(&amp;#039;rowspan&amp;#039;, rowspan)&lt;br /&gt;
										seasonRow:node(infoCell)&lt;br /&gt;
									else&lt;br /&gt;
										-- Unstyled content info cell&lt;br /&gt;
										local thisCell = SeriesOverview.season_cell(infoParam, frame)&lt;br /&gt;
											:attr(&amp;#039;rowspan&amp;#039;, rowspan)&lt;br /&gt;
										seasonRow:node(thisCell)&lt;br /&gt;
									end&lt;br /&gt;
								else&lt;br /&gt;
									if not args.series then&lt;br /&gt;
										local infoCell = SeriesOverview.series_attributes( frame:expandTemplate{title=&amp;#039;N/A&amp;#039;,args={&amp;#039;TBA&amp;#039;}} )&lt;br /&gt;
										infoCell:attr(&amp;#039;rowspan&amp;#039;, rowspan)&lt;br /&gt;
										seasonRow:node(infoCell)&lt;br /&gt;
									end&lt;br /&gt;
								end&lt;br /&gt;
							elseif not entry[param0 .. &amp;#039;spanning&amp;#039;] then&lt;br /&gt;
								if not args.series then&lt;br /&gt;
									local infoCell = SeriesOverview.series_attributes( frame:expandTemplate{title=&amp;#039;N/A&amp;#039;,args={&amp;#039;TBA&amp;#039;}} )&lt;br /&gt;
									infoCell:attr(&amp;#039;rowspan&amp;#039;, rowspan)&lt;br /&gt;
									seasonRow:node(infoCell)&lt;br /&gt;
								end&lt;br /&gt;
							end&lt;br /&gt;
						end&lt;br /&gt;
					end&lt;br /&gt;
				&lt;br /&gt;
				end -- End k0 string.byte&lt;br /&gt;
			end -- End &amp;#039;for&amp;#039; SeasonEntries_ordered&lt;br /&gt;
		end -- End &amp;#039;if&amp;#039; multiseries&lt;br /&gt;
	end -- End &amp;#039;do&amp;#039; season rows&lt;br /&gt;
&lt;br /&gt;
	return (args.dontclose and mw.ustring.gsub(tostring(root), &amp;quot;&amp;lt;/table&amp;gt;&amp;quot;, &amp;quot;&amp;quot;) or tostring(root)) .. categories&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
-- Exports&lt;br /&gt;
--------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = require(&amp;#039;Module:Arguments&amp;#039;).getArgs(frame, {&lt;br /&gt;
		wrappers = &amp;#039;User:RiniX/sandbox2&amp;#039;&lt;br /&gt;
	})&lt;br /&gt;
	return SeriesOverview.new(frame, args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Legoktm</name></author>
	</entry>
</feed>