来大姨妈喝酒有什么影响| 泽五行属什么| 什么叫职业年金| 青梅什么季节成熟| 形婚是什么意思啊| 指甲上的白色月牙代表什么| 为什么养鱼双数是大忌| 肝火上炎吃什么中成药| 植物神经紊乱吃什么中成药| 中国特工组织叫什么| 中央候补委员是什么级别| 黄芪泡水喝有什么好处| 家产是什么意思| 不苟言笑的苟是什么意思| 刮痧和拔罐有什么区别| 日本牛郎是干什么的| 新生儿吐奶是什么原因| nadh是什么| 猫可以吃什么水果| hrv什么意思| 记忆力减退吃什么药效果好| 妊娠期是指什么时候| 有眼不识泰山是什么意思| 为什么用英语怎么说| 签证是什么| 验大便能查出什么| 孩子急性肠胃炎吃什么药| 虚岁27岁属什么生肖| 什么是户籍所在地| 发迹是什么意思| 什么什么自如| 共青团书记是什么级别| 喝茶拉肚子是什么原因| 下面痒吃什么消炎药| o型血和ab型血生的孩子是什么血型| 肝岛是什么意思| 浮沉是什么意思| 检查食道挂什么科| 南京有什么好玩的景点| 一节黑一节白是什么蛇| 一什么鱼塘| 做梦梦到捡钱是什么征兆| 小孩说话不清楚挂什么科| 尿毒症是什么病| 减肥期间吃什么| 拔牙为什么要验血| 大象什么颜色| 好奇害死猫是什么意思| 肠套叠是什么意思| 喉咙痒是什么原因| 耳洞发炎流脓用什么药| 汽车五行属什么| 心脏不舒服看什么科室| 什么叫出柜| 背德感是什么意思| 摩羯男喜欢什么类型的女生| 喉咙干燥吃什么药| 心脏斑块是什么意思啊| 眼睛无神呆滞什么原因| 10月16日是什么星座| 略什么意思| 小孩手指头脱皮是什么原因| 早搏有什么危害| 外感风寒吃什么药| 空腹不能吃什么水果| 冰火是什么意思| 谷氨酰转移酶高是什么病| 子宫复旧是什么意思| 吃什么对前列腺有好处| 在眼皮老跳是什么征兆| 头晕眼花是什么原因| 互攻是什么意思| 县公安局局长是什么级别| 物质是由什么组成的| 梦见龙是什么意思| 化疗期间吃什么水果好| 婆什么起舞| 奄奄一息是什么意思| ta代表什么| 湿吻是什么意思| 血栓是什么意思| 林冲的绰号是什么| 外阴痒用什么药膏| 小翅膀车标是什么车| 全身痒但是身上什么都没有| 安瓶是什么| 百家姓第一个姓是什么| 夜尿多吃什么药效果好| 亚麻籽是什么| 什么时候泡脚最好| 勾芡用什么粉最好| 免疫力是什么| 一事无成是什么生肖| 求知欲的欲什么意思| 四月二号是什么星座| 什么是溶血性贫血| 脑管瘤的症状是什么| 梦到别人给钱是什么意思| 淋巴结发炎吃什么药| 阿赖耶识是什么意思| 张伦硕为什么娶钟丽缇| 腿脚肿胀是什么原因引起的| c2可以开什么车| 甲减喝什么药| 纪是什么意思| 什么是宫缩| 二道贩子是什么意思| 什么肉蛋白质含量最高| 刚愎自负是什么意思| 为什么痣上面会长毛| 11月21是什么星座| 汽车抖动是什么原因| 吃什么可以变白| 中医七情指的是什么| 三月十六是什么星座| 为什么会长水泡| 幼儿反复发烧是什么原因| 三月初一是什么星座| 晚上吃什么| 葡萄什么时候成熟| toryburch什么牌子| 什么扑鼻| 胰岛素抵抗有什么症状| 什么克风| 女人右手中指有痣代表什么| 毛尖茶属于什么茶| 人参片泡水喝有什么功效和作用| 梦笔生花的意思是什么| 突然腰疼是什么原因| 甾体是什么意思| 电信积分有什么用| 为什么月经量少| betty是什么意思| 手腕疼去医院挂什么科| 伤风胶囊又叫什么| 炒菜什么油最好| 什么叫meta分析| 木字多一撇是什么字| 猫吃什么| 屈原属什么生肖| 手脚发麻是什么原因引起的| 勃艮第红是什么颜色| 为什么越睡越困越疲惫| 专业服从是什么意思| 乾隆为什么长寿| 腹泻是什么原因| 月经发黑是什么原因| 精神出轨是什么意思| 煲电话粥什么意思| 海狗是什么动物| 砚是什么意思| 欢是什么动物| 手串断了是什么预兆| 无机盐是什么| 榴莲壳有什么用| 大什么大| 武汉有什么好吃的| 头总出汗是什么原因| 猫咪感冒吃什么药| 滥竽充数的充是什么意思| 所向披靡什么意思| 女性尿道炎吃什么药| 1966年属什么今年多大| 什么是同房| 降头术是什么| 鑫字代表什么生肖| 小脑延髓池是什么意思| 光子嫩肤是什么| 阿玛尼手表算什么档次| 什么大牌护肤品好用| 舌头中间裂纹是什么病| 止吐吃什么药| 刘邦是什么星座| 佐匹克隆是什么药| 一什么蔷薇| 2022年是什么生肖年| 三凹征是什么| 为什么肝区隐隐作痛| 梦见大白菜是什么意思| 炊饼是什么| 拔萝卜是什么意思| 你是我的楼兰是什么意思| 天丝棉是什么面料| 嘴歪是什么引起的| 1909年属什么生肖| 天山童姥练的什么武功| 身上长小红点是什么原因| 垂体是什么| 王八羔子是什么意思| 胃下垂有什么症状表现| 微波炉加热用什么容器| 5岁属什么生肖| 过期的牛奶有什么用途| 代谢什么意思| 头皮特别痒是什么原因| 脉搏细是什么原因| cps什么意思| 芒果不能和什么食物一起吃| 治疗便秘吃什么| ed是什么病| 惊恐症是什么病| 胆红素阴性是什么意思| 蝉蛹是什么| 阴道干燥是什么原因| 卡粉是什么意思| 绣球花什么时候修剪| 手抖是什么病的前兆| 男属兔和什么属相最配| 知了有什么功效与作用| 香皂和肥皂有什么区别| 产生幻觉是什么原因| 大饼是什么意思| solo 什么意思| 挖空细胞是什么意思啊| 威士忌兑什么饮料好喝| 13层楼房有什么说法吗| 消肿吃什么药| 小腿为什么会抽筋| 什么奶粉跟母乳一个味| 21度穿什么衣服| 白细胞减少是什么原因| 今天吃什么菜好呢| 秦皇岛是什么海| 红眼鱼是什么鱼| wilson是什么意思| 送同学什么生日礼物好| 半干型黄酒是什么意思| 额头长痘痘是什么原因| m和s是什么意思| five是什么意思| hpv52阳性是什么病| 焦虑抑郁症吃什么药| 横眉冷对是什么意思| 女人肾虚吃什么| 角逐是什么意思| 7月11号什么星座| 吃什么才能瘦下来| 直升是什么意思| 吃什么生血| 本虚标实是什么意思| 彪是什么动物| 穿小鞋什么意思| 飘零是什么意思| 巴厘岛机场叫什么| 女性血常规都检查什么| 脸上过敏是什么症状| 百鸟归巢什么意思| 都有什么职业| 一什么方向| sds是什么| 手指有痣代表什么意思| 猪八戒的老婆叫什么| 大姨妈来吃什么水果好| 什么是横纹肌肉瘤| 中药一般什么时候喝最好| 马克华菲是什么档次| 吃什么下奶最快最多最有效| 歇后语是什么意思| 鼻子流血什么原因| 婴儿有眼屎是什么原因引起的| 自叹不如什么意思| 什么是提肛运动| 斑马吃什么| 1990年是什么命| 百度Перейти до вм?сту

???????к??????С???????????????????滮??????

Матер?ал з В?к?пед?? — в?льно? енциклопед??.
{{i}} Документац?я модуля[перегляд] [редагувати] [?стор?я] [очистити кеш]
百度 银联国际与ACI达成合作后,后者将在其全球支付解决方案中集成银联卡支付服务,让旗下客户能够安全、快速开通银联卡业务。

Цей модуль впроваджу? шаблон {{Navbox}}. Для ?нструкц?й його використання, будь ласка, див?ться стор?нку шаблону.

Категор?? спостереження/п?дтримки

--
-- This module will implement {{Navbox}}
--
 
require('strict')
local p = {}
local cfg = mw.loadData('Module:Navbox/configuration')
local inArray = require("Module:TableTools").inArray
local getArgs -- lazily initialized
local hiding_templatestyles = {} 

-- global passthrough variables
local passthrough = {
	[cfg.arg.above]=true,[cfg.arg.aboveclass]=true,[cfg.arg.abovestyle]=true,
	[cfg.arg.basestyle]=true,
	[cfg.arg.below]=true,[cfg.arg.belowclass]=true,[cfg.arg.belowstyle]=true,
	[cfg.arg.bodyclass]=true,
	[cfg.arg.groupclass]=true,
	[cfg.arg.image]=true,[cfg.arg.imageclass]=true,[cfg.arg.imagestyle]=true,
	[cfg.arg.imageleft]=true,[cfg.arg.imageleftstyle]=true,
	[cfg.arg.listclass]=true,
	[cfg.arg.name]=true,
	[cfg.arg.navbar]=true,
	[cfg.arg.state]=true,
	[cfg.arg.title]=true,[cfg.arg.titleclass]=true,[cfg.arg.titlestyle]=true,
	[cfg.transl_arg.above]=true,[cfg.transl_arg.aboveclass]=true,[cfg.transl_arg.abovestyle]=true,
	[cfg.transl_arg.basestyle]=true,
	[cfg.transl_arg.below]=true,[cfg.transl_arg.belowclass]=true,[cfg.transl_arg.belowstyle]=true,
	[cfg.transl_arg.bodyclass]=true,
	[cfg.transl_arg.groupclass]=true,
	[cfg.transl_arg.image]=true,[cfg.transl_arg.imageclass]=true,[cfg.transl_arg.imagestyle]=true,
	[cfg.transl_arg.imageleft]=true,[cfg.transl_arg.imageleftstyle]=true,
	[cfg.transl_arg.listclass]=true,
	[cfg.transl_arg.name]=true,
	[cfg.transl_arg.navbar]=true,
	[cfg.transl_arg.state]=true,
	[cfg.transl_arg.title]=true,[cfg.transl_arg.titleclass]=true,[cfg.transl_arg.titlestyle]=true,
	argHash=true
}

-- helper functions
local andnum = function(s, n, is_transl) return string.format(cfg[(is_transl and 'transl_' or '').. 'arg'][s .. '_and_num'], n) end
local isblank = function(v) return (v or '') == '' end
-- get value from original arg or from its translation
local getargvalue =  function(args, argname) return args[cfg.arg[argname]] or args[cfg.transl_arg[argname]] end
-- remove duplicates from the list (e.g. 3 will be duplicated if both list3
-- and список3 are specified)
local function removeDuplicates(t)
	for i = #t, 1, -1 do
		if t[i] == t[i - 1] then
			table.remove(t, i)
		end
	end
	return t
end	

local function concatstrings(s)
	local r = table.concat(s, '')
	if r:match('^%s*$') then return nil end
	return r
end

local function concatstyles(s)
	local r = ''
	for _, v in ipairs(s) do
		v = mw.text.trim(v, "%s;")
		if not isblank(v) then r = r .. v .. ';' end
	end
	if isblank(r) then return nil end
	return r
end

local function getSubgroup(args, listnum, listText, prefix)
	local subArgs = {
		[cfg.arg.border] = cfg.keyword.border_subgroup[1],
		[cfg.arg.navbar] = cfg.keyword.navbar_plain[1],
		argHash = 0
	}
	local hasSubArgs = false
	local subgroups_and_num = prefix and prefix or cfg.arg.subgroups_and_num
	for k, v in pairs(args) do
		k = tostring(k)
		for _, w in ipairs(subgroups_and_num) do
			w = string.format(w, listnum) .. "_"
			
			if (#k > #w) and (k:sub(1, #w) == w) then
				subArgs[k:sub(#w + 1)] = v
				hasSubArgs = true
				subArgs.argHash = subArgs.argHash + (v and #v or 0)
			end
		end
	end
	return hasSubArgs and p._navbox(subArgs) or listText
end

-- Main functions
function p._navbox(args)
	if args.type == cfg.keyword.with_collapsible_groups then
		return p._withCollapsibleGroups(args)
	elseif args.type == cfg.keyword.with_columns then
		return p._withColumns(args)
	end

	-- get value from original arg or translated arg (for general args of navbox)
	args[cfg.arg.above] = getargvalue(args, 'above')
	args[cfg.arg.aboveclass] = getargvalue(args, 'aboveclass')
	args[cfg.arg.abovestyle] = getargvalue(args, 'abovestyle')
	args[cfg.arg.basestyle] = getargvalue(args, 'basestyle')
	args[cfg.arg.below] = getargvalue(args, 'below')
	args[cfg.arg.belowclass] = getargvalue(args, 'belowclass')
	args[cfg.arg.belowstyle] = getargvalue(args, 'belowstyle')
	args[cfg.arg.bodyclass] = getargvalue(args, 'bodyclass')
	args[cfg.arg.bodystyle] = getargvalue(args, 'bodystyle')
	args[cfg.arg.border] = getargvalue(args, 'border')
	args[cfg.arg.evenodd] = getargvalue(args, 'evenodd')
	args[cfg.arg.evenstyle] = getargvalue(args, 'evenstyle')
	args[cfg.arg.groupclass] = getargvalue(args, 'groupclass')
	args[cfg.arg.groupwidth] = getargvalue(args, 'groupwidth')
	args[cfg.arg.groupstyle] = getargvalue(args, 'groupstyle')
	args[cfg.arg.group1] = getargvalue(args, 'group1')
	args[cfg.arg.group2] = getargvalue(args, 'group2')
	args[cfg.arg.image] = getargvalue(args, 'image')
	args[cfg.arg.imageclass] = getargvalue(args, 'imageclass')
	args[cfg.arg.imagestyle] = getargvalue(args, 'imagestyle')
	args[cfg.arg.imageleft] = getargvalue(args, 'imageleft')
	args[cfg.arg.innerstyle] = getargvalue(args, 'innerstyle')
	args[cfg.arg.imageleftstyle] = getargvalue(args, 'imageleftstyle')
	args[cfg.arg.listpadding] = getargvalue(args, 'listpadding')
	args[cfg.arg.list1padding] = getargvalue(args, 'list1padding')
	args[cfg.arg.listclass] = getargvalue(args, 'listclass')
	args[cfg.arg.liststyle] = getargvalue(args, 'liststyle')
	args[cfg.arg.name] = getargvalue(args, 'name')
	args[cfg.arg.navbar] = getargvalue(args, 'navbar')
	args[cfg.arg.nowrapitems] = getargvalue(args, 'nowrapitems')
	args[cfg.arg.oddstyle] = getargvalue(args, 'oddstyle')
	args[cfg.arg.state] = getargvalue(args, 'state')
	args[cfg.arg.style] = getargvalue(args, 'style')
	args[cfg.arg.templatestyles] = getargvalue(args, 'templatestyles')
	args[cfg.arg.child_templatestyles] = getargvalue(args, 'child_templatestyles')
	args[cfg.arg.title] = getargvalue(args, 'title')
	args[cfg.arg.titleclass] = getargvalue(args, 'titleclass')
	args[cfg.arg.titlestyle] = getargvalue(args, 'titlestyle')
	args[cfg.arg.tracking] = getargvalue(args, 'tracking')

	local function striped(wikitext, border)
		-- Return wikitext with markers replaced for odd/even striping.
		-- Child (subgroup) navboxes are flagged with a category that is removed
		-- by parent navboxes. The result is that the category shows all pages
		-- where a child navbox is not contained in a parent navbox.
		local orphanCat = cfg.category.orphan
		if inArray(cfg.keyword.border_subgroup, border) and not inArray(cfg.keyword.orphan_yes, args[cfg.arg.orphan]) then
			-- No change; striping occurs in outermost navbox.
			return wikitext .. orphanCat
		end
		local first, second = cfg.class.navbox_odd_part, cfg.class.navbox_even_part
		if args[cfg.arg.evenodd] then
			if inArray(cfg.keyword.evenodd_swap, args[cfg.arg.evenodd]) then
				first, second = second, first
			else
				first = args[cfg.arg.evenodd]
				second = first
			end
		end
		local changer
		if first == second then
			changer = first
		else
			local index = 0
			changer = function (code)
				if code == '0' then
					-- Current occurrence is for a group before a nested table.
					-- Set it to first as a valid although pointless class.
					-- The next occurrence will be the first row after a title
					-- in a subgroup and will also be first.
					index = 0
					return first
				end
				index = index + 1
				return index % 2 == 1 and first or second
			end
		end
		local regex = orphanCat:gsub('([%[%]])', '%%%1')
		return (wikitext:gsub(regex, ''):gsub(cfg.marker.regex, changer)) -- () omits gsub count
	end

	local function processItem(item, nowrapitems)
		if item:sub(1, 2) == '{|' then
			-- Applying nowrap to lines in a table does not make sense.
			-- Add newlines to compensate for trim of x in |parm=x in a template.
			return '\n' .. item .. '\n'
		end
		if inArray(cfg.keyword.nowrapitems_yes, nowrapitems) then
			local lines = {}
			for line in (item .. '\n'):gmatch('([^\n]*)\n') do
				local prefix, content = line:match('^([*:;#]+)%s*(.*)')
				if prefix and not content:match(cfg.pattern.nowrap) then
					line = string.format(cfg.nowrap_item, prefix, content)
				end
				table.insert(lines, line)
			end
			item = table.concat(lines, '\n')
		end
		if item:match('^[*:;#]') then
			return '\n' .. item .. '\n'
		end
		return item
	end

	local function has_navbar()
		return not inArray(cfg.keyword.navbar_off, args[cfg.arg.navbar])
			and not inArray(cfg.keyword.navbar_plain, args[cfg.arg.navbar])
			and (
				args[cfg.arg.name]
				or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.pattern.sandbox, '')
					~= cfg.pattern.navbox
			)
	end

	-- extract text color from css, which is the only permitted inline CSS for the navbar
	local function extract_color(css_str)
		-- return nil because navbar takes its argument into mw.html which handles
		-- nil gracefully, removing the associated style attribute
		return mw.ustring.match(';' .. css_str .. ';', '.*;%s*([Cc][Oo][Ll][Oo][Rr]%s*:%s*.-)%s*;') or nil
	end

	local function renderNavBar(titleCell)
		if has_navbar() then
			local navbar = require('Module:Navbar')._navbar
			titleCell:wikitext(navbar{
				[cfg.navbar.name] = args[cfg.arg.name],
				[cfg.navbar.mini] = 1,
				[cfg.navbar.fontstyle] = extract_color(
					(args[cfg.arg.basestyle] or '') .. ';' .. (args[cfg.arg.titlestyle] or '')
				)
			})
		end

	end

	local function renderTitleRow(tbl)
		if not args[cfg.arg.title] then return end

		local titleRow = tbl:tag('tr')

		local titleCell = titleRow:tag('th'):attr('scope', 'col')

		local titleColspan = 2
		if args[cfg.arg.imageleft] then titleColspan = titleColspan + 1 end
		if args[cfg.arg.image] then titleColspan = titleColspan + 1 end

		titleCell
			:cssText(args[cfg.arg.basestyle])
			:cssText(args[cfg.arg.titlestyle])
			:addClass(cfg.class.navbox_title)
			:attr('colspan', titleColspan)

		renderNavBar(titleCell)

		titleCell
			:tag('div')
				-- id for aria-labelledby attribute
				:attr('id', mw.uri.anchorEncode(args[cfg.arg.title]) .. args.argHash)
				:addClass(args[cfg.arg.titleclass])
				:css('font-size', '114%')
				:css('margin', '0 4em')
				:wikitext(processItem(args[cfg.arg.title]))
	end

	local function getAboveBelowColspan()
		local ret = 2
		if args[cfg.arg.imageleft] then ret = ret + 1 end
		if args[cfg.arg.image] then ret = ret + 1 end
		return ret
	end

	local function renderAboveRow(tbl)
		if not args[cfg.arg.above] then return end

		tbl:tag('tr')
			:tag('td')
				:addClass(cfg.class.navbox_abovebelow)
				:addClass(args[cfg.arg.aboveclass])
				:cssText(args[cfg.arg.basestyle])
				:cssText(args[cfg.arg.abovestyle])
				:attr('colspan', getAboveBelowColspan())
				:tag('div')
					-- id for aria-labelledby attribute, if no title
					:attr('id', (not args[cfg.arg.title]) and 
						(mw.uri.anchorEncode(args[cfg.arg.above]) .. args.argHash)
						or nil)
					:wikitext(processItem(args[cfg.arg.above], args[cfg.arg.nowrapitems]))
	end

	local function renderBelowRow(tbl)
		if not args[cfg.arg.below] then return end

		tbl:tag('tr')
			:tag('td')
				:addClass(cfg.class.navbox_abovebelow)
				:addClass(args[cfg.arg.belowclass])
				:cssText(args[cfg.arg.basestyle])
				:cssText(args[cfg.arg.belowstyle])
				:attr('colspan', getAboveBelowColspan())
				:tag('div')
					:wikitext(processItem(args[cfg.arg.below], args[cfg.arg.nowrapitems]))
	end

	local function renderListRow(tbl, index, listnum, listnums_size)
		local row = tbl:tag('tr')

		if index == 1 and args[cfg.arg.imageleft] then
			row
				:tag('td')
					:addClass(cfg.class.noviewer)
					:addClass(cfg.class.navbox_image)
					:addClass(args[cfg.arg.imageclass])
					:css('width', '1px')               -- Minimize width
					:css('padding', '0 2px 0 0')
					:cssText(args[cfg.arg.imageleftstyle])
					:attr('rowspan', listnums_size)
					:tag('div')
						:wikitext(processItem(args[cfg.arg.imageleft]))
		end

		local group_and_num = andnum('group', listnum)
		local groupstyle_and_num = andnum('groupstyle', listnum)
		local group_and_num_transl = andnum('group', listnum, true)
		local groupstyle_and_num_transl = andnum('groupstyle', listnum, true)
		
		args[group_and_num] = args[group_and_num] or args[group_and_num_transl]
		if args[group_and_num] then
			local groupCell = row:tag('th')

			-- id for aria-labelledby attribute, if lone group with no title or above
			if listnum == 1 and not (args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group2]) then
				groupCell
					:attr('id', mw.uri.anchorEncode(args[cfg.arg.group1]) .. args.argHash)
			end

			groupCell
				:attr('scope', 'row')
				:addClass(cfg.class.navbox_group)
				:addClass(args[cfg.arg.groupclass])
				:cssText(args[cfg.arg.basestyle])
				-- If groupwidth not specified, minimize width
				:css('width', args[cfg.arg.groupwidth] or '1%')

			groupCell
				:cssText(args[cfg.arg.groupstyle])
				:cssText(args[groupstyle_and_num] or args[groupstyle_and_num_transl])
				:wikitext(args[group_and_num])
		end

		local listCell = row:tag('td')

		if args[group_and_num] then
			listCell
				:addClass(cfg.class.navbox_list_with_group)
		else
			listCell:attr('colspan', 2)
		end

		if not args[cfg.arg.groupwidth] then
			listCell:css('width', '100%')
		end

		local rowstyle  -- usually nil so cssText(rowstyle) usually adds nothing
		if index % 2 == 1 then
			rowstyle = args[cfg.arg.oddstyle]
		else
			rowstyle = args[cfg.arg.evenstyle]
		end

		local list_and_num = andnum('list', listnum)
		local list_and_num_transl = andnum('list', listnum, true)
		args[list_and_num] = args[list_and_num] or args[list_and_num_transl]
		local listText = inArray(cfg.keyword.subgroups, args[list_and_num])
			and getSubgroup(args, listnum, args[list_and_num]) or args[list_and_num]

		local oddEven = cfg.marker.oddeven
		if listText:sub(1, 12) == '</div><table' then
			-- Assume list text is for a subgroup navbox so no automatic striping for this row.
			oddEven = listText:find(cfg.pattern.navbox_title) and cfg.marker.restart or cfg.class.navbox_odd_part
		end

		local liststyle_and_num = andnum('liststyle', listnum)
		local listclass_and_num = andnum('listclass', listnum)
		local liststyle_and_num_transl = andnum('liststyle', listnum, true)
		local listclass_and_num_transl = andnum('listclass', listnum, true)
		listCell
			:css('padding', '0')
			:cssText(args[cfg.arg.liststyle])
			:cssText(rowstyle)
			:cssText(args[liststyle_and_num] or args[liststyle_and_num_transl])
			:addClass(cfg.class.navbox_list)
			:addClass(cfg.class.navbox_part .. oddEven)
			:addClass(args[cfg.arg.listclass])
			:addClass(args[listclass_and_num] or args[listclass_and_num_transl])
			:tag('div')
				:css('padding',
					(index == 1 and args[cfg.arg.list1padding]) or args[cfg.arg.listpadding] or '0 0.25em'
				)
				:wikitext(processItem(listText, args[cfg.arg.nowrapitems]))

		if index == 1 and args[cfg.arg.image] then
			row
				:tag('td')
					:addClass(cfg.class.noviewer)
					:addClass(cfg.class.navbox_image)
					:addClass(args[cfg.arg.imageclass])
					:css('width', '1px')               -- Minimize width
					:css('padding', '0 0 0 2px')
					:cssText(args[cfg.arg.imagestyle])
					:attr('rowspan', listnums_size)
					:tag('div')
						:wikitext(processItem(args[cfg.arg.image]))
		end
	end

	local function has_list_class(htmlclass)
		local patterns = {
			'^' .. htmlclass .. '$',
			'%s' .. htmlclass .. '$',
			'^' .. htmlclass .. '%s',
			'%s' .. htmlclass .. '%s'
		}

		for arg, _ in pairs(args) do
			if type(arg) == 'string' and mw.ustring.find(arg, cfg.pattern.class) then
				for _, pattern in ipairs(patterns) do
					if mw.ustring.find(args[arg] or '', pattern) then
						return true
					end
				end
			end
		end
		return false
	end

	-- there are a lot of list classes in the wild, so we add their TemplateStyles
	local function add_list_styles()
		local frame = mw.getCurrentFrame()
		local function add_list_templatestyles(htmlclass, templatestyles)
			if has_list_class(htmlclass) then
				return frame:extensionTag{
					name = 'templatestyles', args = { src = templatestyles }
				}
			else
				return ''
			end
		end

		local hlist_styles = add_list_templatestyles('hlist', cfg.hlist_templatestyles)
		local plainlist_styles = add_list_templatestyles('plainlist', cfg.plainlist_templatestyles)

		-- a second workaround for [[phab:T303378]]
		-- when that issue is fixed, we can actually use has_navbar not to emit the
		-- tag here if we want
		if has_navbar() and hlist_styles == '' then
			hlist_styles = frame:extensionTag{
				name = 'templatestyles', args = { src = cfg.hlist_templatestyles }
			}
		end

		-- hlist -> plainlist is best-effort to preserve old Common.css ordering.
		-- this ordering is not a guarantee because most navboxes will emit only
		-- one of these classes [hlist_note]
		return hlist_styles .. plainlist_styles
	end

	local function needsHorizontalLists(border)
		if inArray(cfg.keyword.border_subgroup, border) or inArray(cfg.keyword.tracking_no, args[cfg.arg.tracking]) then
			return false
		end
		return not has_list_class(cfg.pattern.hlist) and not has_list_class(cfg.pattern.plainlist)
	end

	local function hasBackgroundColors()
		for _, key in ipairs({cfg.arg.titlestyle, cfg.arg.groupstyle,
			cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do
			if tostring(args[key]):find('background', 1, true) then
				return true
			end
		end
		return false
	end

	local function hasBorders()
		for _, key in ipairs({cfg.arg.groupstyle, cfg.arg.basestyle,
			cfg.arg.abovestyle, cfg.arg.belowstyle}) do
			if tostring(args[key]):find('border', 1, true) then
				return true
			end
		end
		return false
	end

	local function isIllegible()
		local styleratio = require('Module:Color contrast')._styleratio
		for key, style in pairs(args) do
			if tostring(key):match(cfg.pattern.style) then
				if styleratio{mw.text.unstripNoWiki(style)} < 4.5 then
					return true
				end
			end
		end
		return false
	end

	local function getTrackingCategories(border)
		local cats = {}
		if needsHorizontalLists(border) then table.insert(cats, cfg.category.horizontal_lists) end
		if hasBackgroundColors() then table.insert(cats, cfg.category.background_colors) end
		if isIllegible() then table.insert(cats, cfg.category.illegible) end
		if hasBorders() then table.insert(cats, cfg.category.borders) end
		return cats
	end

	local function renderTrackingCategories(builder, border)
		local title = mw.title.getCurrentTitle()
		if title.namespace ~= 10 then return end -- not in template space
		local subpage = title.subpageText
		if subpage == cfg.keyword.subpage_doc or subpage == cfg.keyword.subpage_sandbox
			or subpage == cfg.keyword.subpage_testcases then return end

		for _, cat in ipairs(getTrackingCategories(border)) do
			builder:wikitext('[[Категор?я:' .. cat .. ']]')
		end
	end

	local function renderMainTable(border, listnums)
		local tbl = mw.html.create('table')
			:addClass(cfg.class.nowraplinks)
			:addClass(args[cfg.arg.bodyclass])

		local state = args[cfg.arg.state]
		if args[cfg.arg.title] and not inArray(cfg.keyword.state_plain, state) and not inArray(cfg.keyword.state_off, state) then
			if inArray(cfg.keyword.state_collapsed, state) then
				state = cfg.class.collapsed
			end
			tbl
				:addClass(cfg.class.collapsible)
				:addClass(state or cfg.class.autocollapse)
		end

		tbl:css('border-spacing', 0)
		if inArray(cfg.keyword.border_subgroup, border) or inArray(cfg.keyword.border_none, border) then
			tbl
				:addClass(cfg.class.navbox_subgroup)
				:cssText(args[cfg.arg.bodystyle])
				:cssText(args[cfg.arg.style])
		else  -- regular navbox - bodystyle and style will be applied to the wrapper table
			tbl
				:addClass(cfg.class.navbox_inner)
				:css('background', 'transparent')
				:css('color', 'inherit')
		end
		tbl:cssText(args[cfg.arg.innerstyle])

		renderTitleRow(tbl)
		renderAboveRow(tbl)
		local listnums_size = #listnums
		for i, listnum in ipairs(listnums) do
			renderListRow(tbl, i, listnum, listnums_size)
		end
		renderBelowRow(tbl)

		return tbl
	end

	local function add_navbox_styles(hiding_templatestyles)
		local frame = mw.getCurrentFrame()
		-- This is a lambda so that it doesn't need the frame as a parameter
		local function add_user_styles(templatestyles)
			if not isblank(templatestyles) then
				return frame:extensionTag{
					name = 'templatestyles', args = { src = templatestyles }
				}
			end
			return ''
		end

		-- get templatestyles. load base from config so that Lua only needs to do
		-- the work once of parser tag expansion
		local base_templatestyles = cfg.templatestyles
		local templatestyles = add_user_styles(args[cfg.arg.templatestyles])
		local child_templatestyles = add_user_styles(args[cfg.arg.child_templatestyles])

		-- The 'navbox-styles' div exists to wrap the styles to work around T200206
		-- more elegantly. Instead of combinatorial rules, this ends up being linear
		-- number of CSS rules.
		return mw.html.create('div')
			:addClass(cfg.class.navbox_styles)
			:wikitext(
				add_list_styles() .. -- see [hlist_note] applied to 'before base_templatestyles'
				base_templatestyles ..
				templatestyles ..
				child_templatestyles ..
				table.concat(hiding_templatestyles)
			)
			:done()
	end

	-- work around [[phab:T303378]]
	-- for each arg: find all the templatestyles strip markers, insert them into a
	-- table. then remove all templatestyles markers from the arg
	local strip_marker_pattern = '(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)'
	local argHash = 0
	for k, arg in pairs(args) do
		if type(arg) == 'string' then
			for marker in string.gfind(arg, strip_marker_pattern) do
				table.insert(hiding_templatestyles, marker)
			end
			argHash = argHash + #arg
			args[k] = string.gsub(arg, strip_marker_pattern, '')
		end
	end
	
	if not args.argHash then args.argHash = argHash end

	local listnums = {}

	for k, _ in pairs(args) do
		if type(k) == 'string' then
			local listnum = k:match(cfg.pattern.listnum) or mw.ustring.match(k, cfg.pattern.listnum_transl)
			if listnum and (args[andnum('list', tonumber(listnum))] or args[andnum('list', tonumber(listnum), true)]) then
				table.insert(listnums, tonumber(listnum))
			end	
		end
	end
	table.sort(listnums)
	listnums = removeDuplicates(listnums)

	local border = mw.text.trim(args[cfg.arg.border] or args[1] or '')
	if inArray(cfg.keyword.border_child, border) then
		border = cfg.keyword.border_subgroup[1]
	end

	-- render the main body of the navbox
	local tbl = renderMainTable(border, listnums)

	local res = mw.html.create()
	-- render the appropriate wrapper for the navbox, based on the border param

	if inArray(cfg.keyword.border_none, border) then
		res:node(add_navbox_styles(hiding_templatestyles))
		local nav = res:tag('div')
			:attr('role', 'navigation')
			:node(tbl)
		-- aria-labelledby title, otherwise above, otherwise lone group
		if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1]
			and not args[cfg.arg.group2]) then
			nav:attr(
				'aria-labelledby',
				mw.uri.anchorEncode(
					args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1]
				) .. args.argHash
			)
		else
			nav:attr('aria-label', cfg.aria_label)
		end
	elseif inArray(cfg.keyword.border_subgroup, border) then
		-- We assume that this navbox is being rendered in a list cell of a
		-- parent navbox, and is therefore inside a div with padding:0em 0.25em.
		-- We start with a </div> to avoid the padding being applied, and at the
		-- end add a <div> to balance out the parent's </div>
		res
			:wikitext('</div>')
			:node(tbl)
			:wikitext('<div>')
	else
		res:node(add_navbox_styles(hiding_templatestyles))
		local nav = res:tag('div')
			:attr('role', 'navigation')
			:addClass(cfg.class.navbox)
			:addClass(args[cfg.arg.navboxclass])
			:cssText(args[cfg.arg.bodystyle])
			:cssText(args[cfg.arg.style])
			:css('padding', '3px')
			:node(tbl)
		-- aria-labelledby title, otherwise above, otherwise lone group
		if args[cfg.arg.title] or args[cfg.arg.above]
			or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then
			nav:attr(
				'aria-labelledby',
				mw.uri.anchorEncode(
					args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1]
				) .. args.argHash
			)
		else
			nav:attr('aria-label', cfg.aria_label .. args.argHash)
		end
	end

	if (args[cfg.arg.nocat] or cfg.keyword.nocat_false):lower() == cfg.keyword.nocat_false then
		renderTrackingCategories(res, border)
	end
	return striped(tostring(res), border)
end --p._navbox

function p._withCollapsibleGroups(pargs)
	-- table for args passed to navbox
	local targs = {}
	
	--get value from original arg or translated arg (only for specific to navbox with collapsible groups)
	pargs[cfg.arg.basestyle] = getargvalue(pargs, 'basestyle')
	pargs[cfg.arg.bodystyle] = getargvalue(pargs, 'bodystyle')
	pargs[cfg.arg.border] = getargvalue(pargs, 'border')
	pargs[cfg.arg.groupstyle] = getargvalue(pargs, 'groupstyle')
	pargs[cfg.arg.listpadding] = getargvalue(pargs, 'listpadding')
	pargs[cfg.arg.liststyle] = getargvalue(pargs, 'liststyle')
	pargs[cfg.arg.selected] = getargvalue(pargs, 'selected')
    pargs[cfg.arg.secttitlestyle] = getargvalue(pargs, 'secttitlestyle')
	pargs[cfg.arg.style] = getargvalue(pargs, 'style')

	-- process args
	local passthroughLocal = {
		[cfg.arg.bodystyle] = true,
		[cfg.arg.border] = true,
		[cfg.arg.style] = true,
	}
	for k,v in pairs(pargs) do
		if k and type(k) == 'string' then
			if passthrough[k] or passthroughLocal[k] then
				targs[k] = v
			elseif (mw.ustring.match(k, cfg.pattern.num)) then
				local n = mw.ustring.match(k, cfg.pattern.num)
				local list_and_num = andnum('list', n)
				local list_and_num_transl = andnum('list', n, true)
				if ((k:match(cfg.pattern.listnum) or k:match(cfg.pattern.contentnum) or
					mw.ustring.match(k, cfg.pattern.listnum_transl) or mw.ustring.match(k, cfg.pattern.contentnum_transl))
						and targs[list_and_num] == nil
						and pargs[andnum('group', n)] == nil
						and pargs[andnum('sect', n)] == nil
						and pargs[andnum('section', n)] == nil
						and targs[list_and_num_transl] == nil
						and pargs[andnum('group', n, true)] == nil
						and pargs[andnum('sect', n, true)] == nil
						and pargs[andnum('section', n, true)] == nil) then
					targs[list_and_num] = concatstrings({
						pargs[list_and_num] or pargs[list_and_num_transl] or '',
						pargs[andnum('content', n)] or pargs[andnum('content', n, true)] or ''
					})
					if (targs[list_and_num] and inArray(cfg.keyword.subgroups, targs[list_and_num])) then
						targs[list_and_num] = getSubgroup(pargs, n, targs[list_and_num])
					end
				elseif ((k:match(cfg.pattern.groupnum) or k:match(cfg.pattern.sectnum) or k:match(cfg.pattern.sectionnum) or
			           mw.ustring.match(k, cfg.pattern.groupnum_transl) or mw.ustring.match(k, cfg.pattern.sectnum_transl) or mw.ustring.match(k, cfg.pattern.sectionnum_transl))
						and targs[list_and_num] == nil) then
					local titlestyle = concatstyles({
						pargs[cfg.arg.groupstyle] or '',
						pargs[cfg.arg.secttitlestyle] or '', 
						pargs[andnum('groupstyle', n)] or pargs[andnum('groupstyle', n, true)] or '', 
						pargs[andnum('sectiontitlestyle', n)] or pargs[andnum('sectiontitlestyle', n, true)] or ''
					})
					local liststyle = concatstyles({
						pargs[cfg.arg.liststyle] or '',
						pargs[cfg.arg.contentstyle] or '', 
						pargs[andnum('liststyle', n)] or pargs[andnum('liststyle', n, true)] or '', 
						pargs[andnum('contentstyle', n)] or pargs[andnum('contentstyle', n, true)] or ''
					})
					local title = concatstrings({
						pargs[andnum('group', n)] or pargs[andnum('group', n, true)] or '',
						pargs[andnum('sect', n)] or pargs[andnum('sect', n, true)] or '',
						pargs[andnum('section', n)] or pargs[andnum('section', n, true)] or ''
					})
					local list = concatstrings({
						pargs[list_and_num] or pargs[list_and_num_transl] or '', 
						pargs[andnum('content', n)] or pargs[andnum('content', n, true)] or ''
					})
					if list and inArray(cfg.keyword.subgroups, list) then
						list = getSubgroup(pargs, n, list)
					end
					local abbr_and_num = andnum('abbr', n)
					local abbr_and_num_transl = andnum('abbr', n, true)
					pargs[abbr_and_num] = pargs[abbr_and_num] or pargs[abbr_and_num_transl]
					local state = (pargs[abbr_and_num] and pargs[abbr_and_num] == pargs[cfg.arg.selected]) 
						and cfg.keyword.state_uncollapsed
						or (pargs[andnum('state', n)] or pargs[andnum('state', n, true)] or cfg.keyword.state_collapsed[1])
					
					targs[list_and_num] =p._navbox({
						cfg.keyword.border_child[1],
						[cfg.arg.navbar] = cfg.keyword.navbar_plain[1],
						[cfg.arg.state] = state,
						[cfg.arg.basestyle] = pargs[cfg.arg.basestyle],
						[cfg.arg.title] = title,
						[cfg.arg.titlestyle] = titlestyle,
						[andnum('list', 1)] = list,
						[cfg.arg.liststyle] = liststyle,
						[cfg.arg.listclass] = pargs[andnum('listclass', n)] or pargs[andnum('listclass', n, true)],
						[cfg.arg.image] = pargs[andnum('image', n)] or pargs[andnum('image', n, true)],
						[cfg.arg.imageleft] = pargs[andnum('imageleft', n)] or pargs[andnum('imageleft', n, true)],
						[cfg.arg.listpadding] = pargs[cfg.arg.listpadding],
						argHash = pargs.argHash
					})
				end
			end
		end
	end
	-- ordering of style and bodystyle
	targs[cfg.arg.style] = concatstyles({targs[cfg.arg.style] or '', targs[cfg.arg.bodystyle] or ''})
	targs[cfg.arg.bodystyle] = nil

	-- child or subgroup
	if targs[cfg.arg.border] == nil then targs[cfg.arg.border] = pargs[1] end

	return p._navbox(targs)
end --p._withCollapsibleGroups

function p._withColumns(pargs)
	-- table for args passed to navbox
	local targs = {}

	-- tables of column numbers
	local colheadernums = {}
	local colnums = {}
	local colfooternums = {}
	
	--get value from original arg or translated arg (only for specific to navbox with сolumns)
	pargs[cfg.arg.bodystyle] = getargvalue(pargs, 'bodystyle')
	pargs[cfg.arg.border] = getargvalue(pargs, 'border')
	pargs[cfg.arg.colfooterstyle] = getargvalue(pargs, 'colfooterstyle')
	pargs[cfg.arg.colheaderstyle] = getargvalue(pargs, 'colheaderstyle')
	pargs[cfg.arg.colstyle] = getargvalue(pargs, 'colstyle')
	pargs[cfg.arg.coltablestyle] = getargvalue(pargs, 'coltablestyle')
	pargs[cfg.arg.colwidth] = getargvalue(pargs, 'colwidth')
	pargs[cfg.arg.evencolstyle] = getargvalue(pargs, 'evencolstyle')
	pargs[cfg.arg.evenodd] = getargvalue(pargs, 'evenodd')
	pargs[cfg.arg.fullwidth] = getargvalue(pargs, 'fullwidth')
	pargs[cfg.arg.oddcolstyle] = getargvalue(pargs, 'oddcolstyle')
	pargs[cfg.arg.padding] = getargvalue(pargs, 'padding')
	pargs[cfg.arg.style] = getargvalue(pargs, 'style')

	-- process args
	local passthroughLocal = {
		[cfg.arg.evenstyle]=true,
		[cfg.arg.groupstyle]=true,
		[cfg.arg.liststyle]=true,
		[cfg.arg.oddstyle]=true,
		[cfg.arg.state]=true,
		[cfg.transl_arg.evenstyle]=true,
		[cfg.transl_arg.groupstyle]=true,
		[cfg.transl_arg.liststyle]=true,
		[cfg.transl_arg.oddstyle]=true,
		[cfg.transl_arg.state]=true,
	}
	for k,v in pairs(pargs) do
		if passthrough[k] or passthroughLocal[k] then
			targs[k] = v
		elseif type(k) == 'string' then
			if k:match(cfg.pattern.listnum) or mw.ustring.match(k, cfg.pattern.listnum_transl) then
				local n = k:match(cfg.pattern.listnum) or mw.ustring.match(k, cfg.pattern.listnum_transl)
				targs[andnum('liststyle', n + 2)] = pargs[andnum('liststyle', n)] or pargs[andnum('liststyle', n, true)]
				targs[andnum('group', n + 2)] = pargs[andnum('group', n)] or pargs[andnum('group', n, true)]
				targs[andnum('groupstyle', n + 2)] = pargs[andnum('groupstyle', n)] or pargs[andnum('groupstyle', n, true)]
				if v and inArray(cfg.keyword.subgroups, v) then
					targs[andnum('list', n + 2)] = getSubgroup(pargs, n, v)
				else
					targs[andnum('list', n + 2)] = v
				end
			elseif ((k:match(cfg.pattern.colheadernum) or mw.ustring.match(k, cfg.pattern.colheadernum_transl)) and v ~= '') then
				table.insert(colheadernums, tonumber(k:match(cfg.pattern.colheadernum) or mw.ustring.match(k, cfg.pattern.colheadernum_transl)))
			elseif ((k:match(cfg.pattern.colnum) or mw.ustring.match(k, cfg.pattern.colnum_transl)) and v ~= '') then
				table.insert(colnums, tonumber(k:match(cfg.pattern.colnum) or mw.ustring.match(k, cfg.pattern.colnum_transl)))
			elseif ((k:match(cfg.pattern.colfooternum) or mw.ustring.match(k, cfg.pattern.colfooternum_transl)) and v ~= '') then
				table.insert(colfooternums, tonumber(k:match(cfg.pattern.colfooternum) or mw.ustring.match(k, cfg.pattern.colfooternum_transl)))
			end
		end
	end
	table.sort(colheadernums)
	table.sort(colnums)
	table.sort(colfooternums)
	colheadernums = removeDuplicates(colheadernums)
	colnums = removeDuplicates(colnums)
	colfooternums = removeDuplicates(colfooternums)

	-- HTML table for list1
	local coltable = mw.html.create( 'table' ):addClass('navbox-columns-table')
	local row, col

	local tablestyle = ( (#colheadernums > 0) or (not isblank(pargs[cfg.arg.fullwidth])) )
		and 'width:100%'
		or 'width:auto; margin-left:auto; margin-right:auto'

	coltable:cssText(concatstyles({
		'border-spacing: 0px; text-align:left',
		tablestyle,
		pargs[cfg.arg.coltablestyle] or ''
	}))

	--- Header row ---
	if (#colheadernums > 0) then
		row = coltable:tag('tr')
		for k, n in ipairs(colheadernums) do
			col = row:tag('td'):addClass('navbox-abovebelow')
			col:cssText(concatstyles({
				(k > 1) and 'border-left:2px solid #fdfdfd' or '',
				'font-weight:bold',
				pargs[cfg.arg.colheaderstyle] or '',
				pargs[andnum('colheaderstyle', n)] or pargs[andnum('colheaderstyle', n, true)] or ''
			}))
			col:attr('colspan', tonumber(pargs[andnum('colheadercolspan', n)] or pargs[andnum('colheadercolspan', n, true)]))
			col:wikitext(pargs[andnum('colheader', n)] or pargs[andnum('colheader', n, true)])
		end
	end

	--- Main columns ---
	row = coltable:tag('tr'):css('vertical-align', 'top')
	for k, n in ipairs(colnums) do
		if k == 1 and isblank(pargs[andnum('colheader', 1)] or pargs[andnum('colheader', 1, true)])
				and isblank(pargs[andnum('colfooter', 1)] or pargs[andnum('colfooter', 1, true)])
				and isblank(pargs[cfg.arg.fullwidth]) then
			local nopad = inArray(
				{'off', '0', '0em', '0px'},
				mw.ustring.gsub(pargs[cfg.arg.padding] or '', '[;%%]', ''))
			if not nopad then
				row:tag('td'):wikitext('&nbsp;&nbsp;&nbsp;')
					:css('width', (pargs[cfg.arg.padding] or '5em'))
			end
		end
		col = row:tag('td'):addClass('navbox-list')
		col:cssText(concatstyles({
			(k > 1) and 'border-left:2px solid #fdfdfd' or '',
			'padding:0px',
			pargs[cfg.arg.colstyle] or '',
			((n%2 == 0) and pargs[cfg.arg.evencolstyle] or pargs[cfg.arg.oddcolstyle]) or '',
			pargs[andnum('colstyle', n)] or pargs[andnum('colstyle', n, true)] or '',
			'width:' .. (pargs[andnum('colwidth', n)] or pargs[andnum('colwidth', n, true)] or pargs[cfg.arg.colwidth] or '10em')
		}))
		local wt = pargs[andnum('col', n)] or pargs[andnum('col', n, true)]
		if wt and inArray(cfg.keyword.subgroups, wt) then
			wt = getSubgroup(pargs, n, wt, {cfg.arg.col_and_num, cfg.transl_arg.col_and_num})
		end
		col:tag('div'):newline():wikitext(wt):newline()
	end

	--- Footer row ---
	if (#colfooternums > 0) then
		row = coltable:tag('tr')
		for k, n in ipairs(colfooternums) do
			col = row:tag('td'):addClass('navbox-abovebelow')
			col:cssText(concatstyles({
				(k > 1) and 'border-left:2px solid #fdfdfd' or '',
				'font-weight:bold',
				pargs[cfg.arg.colfooterstyle] or '',
				pargs[andnum('colfooterstyle', n)] or pargs[andnum('colfooterstyle', n, true)] or ''
			}))
			col:attr('colspan', tonumber(pargs[andnum('colfootercolspan', n)] or pargs[andnum('colfootercolspan', n, true)]))
			col:wikitext(pargs[andnum('colfooter', n)] or pargs[andnum('colfooter', n, true)])
		end
	end

	-- assign table to list1
	targs[andnum('list', 1)] = tostring(coltable)
	if isblank(pargs[andnum('colheader', 1)] or pargs[andnum('colheader', 1, true)]) 
			and isblank(pargs[andnum('col', 1)] or pargs[andnum('col', 1, true)])
			and isblank(pargs[andnum('colfooter', 1)] or pargs[andnum('colfooter', 1, true)]) then
		targs[andnum('list', 1)] = targs[andnum('list', 1)] ..
			cfg.category.without_first_col
	end

	-- Other parameters
	targs[cfg.arg.border] = pargs[cfg.arg.border] or pargs[1]
	targs[cfg.arg.evenodd] = (not isblank(pargs[cfg.arg.evenodd])) and pargs[cfg.arg.evenodd] or nil
	targs[cfg.arg.list1padding] = '0px'
	targs[andnum('liststyle', 1)] = 'background:transparent;color:inherit;'
	targs[cfg.arg.style] = concatstyles({pargs[cfg.arg.style], pargs[cfg.arg.bodystyle]})
	targs[cfg.arg.tracking] = 'no'
	
	return p._navbox(targs)
end --p._withColumns

-- Template entry points
function p.navbox (frame, boxtype)
	local function readArgs(args, prefix, transl_prefix)
		-- Read the arguments in the order they'll be output in, to make references
		-- number in the right order.
		local _ = 0
		args[prefix .. cfg.arg.title] = args[prefix .. cfg.arg.title] or args[transl_prefix .. cfg.transl_arg.title]
		args[prefix .. cfg.arg.above] = args[prefix .. cfg.arg.above] or args[transl_prefix .. cfg.transl_arg.above]
		_ = _ + (args[prefix .. cfg.arg.title] and #args[prefix .. cfg.arg.title] or 0)
		_ = _ + (args[prefix .. cfg.arg.above] and #args[prefix .. cfg.arg.above] or 0)
		-- Limit this to 20 as covering 'most' cases (that's a SWAG) and because
		-- iterator approach won't work here
		for i = 1, 20 do
			_ = _ + (args[prefix .. andnum('group', i)] and #args[prefix .. andnum('group', i)] or (args[transl_prefix .. andnum('group', i, true)] and #args[transl_prefix .. andnum('group', i, true)] or 0))
			if inArray(cfg.keyword.subgroups, args[prefix .. andnum('list', i)]) or inArray(cfg.keyword.subgroups, args[transl_prefix .. andnum('list', i, true)]) then
				for k=1,cfg.keyword.subgroups_type_num do
					readArgs(args, prefix .. string.format(cfg.arg.subgroups_and_num[k], i) .. "_", transl_prefix .. string.format(cfg.arg.subgroups_and_num[k+(cfg.keyword.subgroups_type_num-1)], i) .. "_")
				end
				readArgs(args, prefix .. andnum('col', i) .. "_", transl_prefix .. andnum('col', i, true) .. "_")
			end
		end
		args[prefix .. cfg.arg.below] = args[prefix .. cfg.arg.below] or args[transl_prefix .. cfg.transl_arg.below]
		_ = _ + (args[prefix .. cfg.arg.below] and #args[prefix .. cfg.arg.below] or 0)
		return _
	end

	if not getArgs then
		getArgs = require('Module:Arguments').getArgs
	end
	local args = getArgs(frame, {wrappers = {cfg.pattern[boxtype or 'navbox']}})
	args.argHash = readArgs(args, "", "")
	args.type = args.type or args['тип'] or cfg.keyword[boxtype]
	return p['_navbox'](args)
end

p[cfg.keyword.with_collapsible_groups] = function (frame)
	return p.navbox(frame, 'with_collapsible_groups')
end

p[cfg.keyword.with_columns] = function (frame)
	return p.navbox(frame, 'with_columns')
end

return p
脑挫伤是什么意思 hpv58阳性是什么意思 肾精亏虚吃什么中成药 bata鞋属于什么档次 什么牌子的蜂胶最好
丁羟甲苯是什么 麻叶是什么植物 伸筋草长什么样子 头尖适合什么发型 纳米是什么
头皮发红是什么原因 肌酐低是什么意思 润六月是什么意思 榕字五行属什么 数典忘祖指什么动物
9.29是什么星座 舌头麻什么原因 1932年属什么生肖 q是什么意思 酸碱度是什么意思
走投无路是什么意思clwhiglsz.com 莫名其妙是什么意思mmeoe.com 鹿晗的粉丝名叫什么hcv7jop6ns3r.cn 塔罗是什么意思hcv8jop6ns3r.cn 什么叫潮汐车道hanqikai.com
什么是沙龙bysq.com 杯酒释兵权是什么意思hcv8jop1ns6r.cn 通草是什么hcv9jop3ns5r.cn 动爻是什么意思inbungee.com 烟酰胺是什么东西hcv9jop4ns2r.cn
可望不可求是什么意思hcv7jop7ns1r.cn 请柬写伉俪什么意思hcv7jop4ns8r.cn 胆固醇高挂什么科bfb118.com 羊肉炖什么补肾壮阳hcv8jop1ns1r.cn 世界上最长的河流是什么hcv8jop0ns2r.cn
鲁肃的性格特点是什么hcv8jop9ns6r.cn 走路脚后跟疼是什么原因hcv8jop4ns1r.cn 外阴瘙痒用什么洗hcv9jop2ns5r.cn 慢性病是什么意思520myf.com 身上发冷是什么原因hcv9jop7ns3r.cn
百度