Module:User:Vorziblix/test


This is a private module sandbox of Vorziblix, for his own experimentation. Items in this module may be added and removed at Vorziblix's discretion; do not rely on this module's stability.


local export = {}

function export.concat(frame)
	return frame.args[1] .. frame.args[2]
end

function export.blahblahdebug(frame)
	local default_title = frame.args['head'] or mw.title.getCurrentTitle().text
	default_title = 'Alternative hieroglyphic writings of ' .. frame:expandTemplate{title = 'lang', args = {'egy', default_title, face = 'term'}}
	local tabletitle = frame.args['title'] or default_title
	local text = '<div class="NavFrame" style="clear:both;display:inline-block;">\n<div class="NavHead" style="">' .. tabletitle .. '&nbsp;&nbsp;</div>\n<div class="NavContent">\n{| style="text-align:center;"'
	local i = 1
	while frame.args[i] do
		text = text .. '\n| style="background-color:#efefef"|<span style="margin:0px 6px;">' .. frame.args[i] .. '</span>'
		i = i + 1
	end
	text = text .. '\n| nothing\n|}</div></div>'
	return text
end

function export.hieroforms(frame)
	local default_title = frame.args['head'] or mw.title.getCurrentTitle().text
	default_title = 'Alternative hieroglyphic writings of ' .. frame:expandTemplate{title = 'lang', args = {'egy', default_title, face = 'term'}}
	local tabletitle = frame.args['title'] or default_title
	local text = '<div class="NavFrame" style="clear:both;display:inline-block;">\n<div class="NavHead" style="">' .. tabletitle .. '&nbsp;&nbsp;</div>\n<div class="NavContent">\n{| style="text-align:center;"'
	local i = 1
	while frame.args[i] do
		text = text .. '\n| style="background-color:#efefef"|<span style="margin:0px 6px;">' .. frame.args[i] .. '</span>'
		i = i + 1
	end
	local j = 1
	local no_read = true
	local since_last = 1
	local read = 'read1'
	while j < i do
		if frame.args[read] then
			if no_read then
				text = text .. '\n|-'
				no_read = false
			end
			while since_last > 0 do
				text = text .. '\n|'
				since_last = since_last - 1
			end
			text = text .. 'style="background-color:#efefef"|' .. frame:expandTemplate{title = 'm-self', args = {'egy', frame.args[read]}}
		end
		since_last = since_last + 1
		j = j + 1
		read = 'read' .. j
	end
	j = 1
	local no_date = true
	since_last = 1
	local date = 'date1'
	while j < i do
		if frame.args[date] then
			if no_date then
				text = text .. '\n|-'
				no_date = false
			end
			while since_last > 0 do
				text = text .. '\n|'
				since_last = since_last - 1
			end
			text = text .. 'style="background-color:#efefef"|' .. frame:expandTemplate{title = 'defdate', args = {frame.args[date]}}
		end
		since_last = since_last + 1
		j = j + 1
		date = 'date' .. j
	end
	j = 1
	local no_note = true
	since_last = 1
	local since_note = 1
	local note = 'note1'
	while j < i do
		if frame.args[note] then
			if no_note then
				text = text .. '\n|- style="font-size:70%"'
				no_note = false
			end
			while since_last > 0 do
				text = text .. '\n|'
				since_last = since_last - 1
			end
			text = text .. 'style="background-color:#efefef"|' .. frame.args[note]
		end
		since_last = since_last + 1
		j = j + 1
		note = 'note' .. j
	end
	text = text .. '\n|}</div></div>'
	return text
end

function export.remove_comments(input)
	return mw.ustring.gsub(input, '<!%-%-(.-)%-%->', '')
end

function export.tokenize_hiero(input)
	input = mw.ustring.gsub(input, ' ', '-')
	input = mw.ustring.gsub(input, '\n', '-')
	input = mw.ustring.gsub(input, '\r', '-')
	input = mw.ustring.gsub(input, '\t', '-')
	input = mw.ustring.gsub(input, '%-%-+', '-')
	local quadrats = {}
	local i = 1
	while true do
		j = string.find(input, '-', i, true)
		if j ~= nil then
			table.insert(quadrats, string.sub(input, i, j - 1))
			i = j + 1
		else
			table.insert(quadrats, string.sub(input, i))
			break
		end
	end
	return quadrats
end

function export.mdc_to_image(mdc, height_in)
	local height = height_in or '38'
	local mirrored = ''
	if string.sub(mdc, -1) == '\\' then
		mirrored = '|class=mw-mirrored'
		mdc = string.sub(mdc, 1, -2)
	end
	local image = '<span style="margin: 1px;">\[\[File:Abydos-Bold-hieroglyph-' .. mdc .. '.png|' .. mdc .. '|x' .. height .. 'px|link=' .. mirrored .. '\]\]</span>'
	return image
end

function export.render_quadrat(unrendered)
	if unrendered == '!' then
		rendered = '</tr></table><table class="mw-hiero-table"><tr>'
	elseif unrendered == '<' then
		rendered = '<td>' .. '<span style="margin: 1px;">\[\[File:Hiero Ca1.svg|&lt;|x46px|link=\]\]</span>' .. '</td><td><table class="mw-hiero-table"><tr><td class="mw-hiero-box" style="height:2px;"></td></tr><tr><td><table class="mw-hiero-table"><tr><td>'
	elseif unrendered == '>' then
		rendered = '</td></tr></table></td></tr><tr><td class="mw-hiero-box" style="height:2px;"></td></tr></table></td><td>' .. '<span style="margin: 1px;">\[\[File:Hiero Ca2.svg|&gt;|x46px|link=\]\]</span>' .. '</td>'
	else
		stack = string.find(unrendered, ':')
		if stack ~= nil then
			upper = export.mdc_to_image(string.sub(unrendered, 1, stack - 1), '19')
			lower = export.mdc_to_image(string.sub(unrendered, stack + 1), '19')
			rendered = '<td height="40">' .. upper .. '<br>' .. lower .. '</td>'
		else
			rendered = export.mdc_to_image(unrendered)
			rendered = '<td height="40">' .. rendered .. '</td>'
		end
	end
	return rendered
end

function export.hiero(frame)
	local output = {}
	local hieros = frame.args[1]
	hieros = export.remove_comments(hieros)
	local tokenized = export.tokenize_hiero(hieros)
	for k, v in ipairs(tokenized) do
		v = export.render_quadrat(v)
		table.insert(output, v)
	end
	return '<table class="mw-hiero-table mw-hiero-outer" style="display:inline-table;vertical-align:middle;" dir="ltr"><tr><td><table class="mw-hiero-table"><tr>' .. table.concat(output) .. '</tr></table></td></tr></table>'
end

local mdc_complex_group_normalization_map = {
    ["a&r&t"] = "a:r*t",
    ["D&d&t"] = "D&d:t",
    ["D&t&N17"] = "D&t:N17",
    ["D&t&tA"] = "D&t:tA",
    ["D&z&f"] = "D&z:f",
    ["D52&t&r"] = "D52:t*r",
    ["f&r&t"] = "f:r:t",
    ["ini&n&n"] = "ini:n:n",
    ["mr&r&t"] = "U7:r*t",
    ["n&n&a"] = "n:n:a",
    ["n&n&f"] = "n:n:f",
    ["pr&r&t"] = "pr:r*t",
    ["r&D&d"] = "r:D&d",
    ["t&r&f"] = "t:r:f",
    ["wr&r&t"] = "wr:r:t",
    ["x&r&t"] = "x:r*t",
    ["z&A1&Z1"] = "z:A1*Z1",
}

local mdc_normalization_map = {
	["A1s"] = "A1",
	["A2s"] = "A2",
	["A21A"] = "A21",
	["A25as"] = "A25A",
	["A40s"] = "A40",
	["B1s"] = "B1",
	["D58s"] = "D58",
	["F31s"] = "F31",
	["F37B"] = "F37A",
	["F51*F51*F51"] = "F51A",
	["F51A"] = "F51",
	["F51B"] = "F51C",
	["G1s"] = "G1",
	["G5s"] = "G5",
	["G7AA"] = "G7B",
	["G17s"] = "G17",
	["G43s"] = "G43",
	["I1S"] = "I1",
	["Aa40"] = "M1A",
	["M12s"] = "M12",
	["M17s"] = "M17",
	["M23s"] = "M23",
	["N33B"] = "N33",
	["N33C"] = "N33",
	["N35B"] = "N35A",
	["O29V"] = "O29A",
	["S29s"] = "S29",
	["U35s"] = "U35",
	["V11A"] = "V11B",
	["V10A"] = "V11A",
	["W19s"] = "W19",
	["Y1V"] = "Y1A",
	["Z1s"] = "Z1",
	["Z2s"] = "Z2",
	["Z2ss"] = "Z2A",
	["Z1:Z1%*Z1"] = "Z2C",
	["Z1%*Z1:Z1"] = "Z2D",
	["Z3as"] = "Z3A",
	["N33B:N33B:N33B"] = "Z3B",
	["Z91"] = "Z16",
	["Z4B"] = "Z16A",
	["Z92"] = "Z16A",
	["Z93"] = "Z16B",
	["Z94"] = "Z16C",

    ["a&A1"] = "a:A1",
    ["a&b&t"] = "a:b*t",
    ["a&D"] = "a:D",
    ["a&F51a&Z2"] = "a:F51:Z2",
    ["a&n&D"] = "a:n:D",
    ["a&t&x"] = "a:t:x",
    ["A&t"] = "A@t",
    ["A1&n"] = "A1:n",
    ["A1&r"] = "A1:r",
    ["Aa8&D"] = "Aa8:D",
    ["Aa16&m"] = "Aa16:m",
    ["b&Hb"] = "b:Hb",
    ["b&t"] = "b:t",
    ["B2&Z2"] = "B2:Z2",
    ["bA&k"] = "bA:k",
    ["D&d"] = "D&d",
    ["D&ra"] = "D&ra",
    ["D&t"] = "D&t",
    ["d&w"] = "d:w",
    ["D&z"] = "D&z",
    ["f&n&d"] = "f:n:d",
    ["F39&Z1"] = "F39:Z1",
    ["G14&t"] = "G14@t",
    ["Hmw&kA"] = "kA𓐺Hm",
	["H8W"] = "t:H8:Z2A",
    ["ini&n"] = "ini:n",
    ["ir&n&f"] = "D6:n:f",
    ["ir&n&k"] = "D6:n:k",
    ["ir&r&f"] = "D6:r:f",
    ["ir&t&f"] = "D6:t:f",
    ["ir&t&n"] = "D6:t:n",
    ["m&&t"] = "m:t",
    ["m&a"] = "m:a",
    ["m&f"] = "m:f",
    ["m&n"] = "m:n",
    ["m&r"] = "m:r",
    ["m&t"] = "m@t",
    ["mn&n&t"] = "mn:n:t",
    ["mn&n&x"] = "mn:n:x",
    ["mr&&r&r"] = "U7:r*r",
    ["mr&r&r"] = "U7:r:r",
    ["n&A1"] = "n:A1",
    ["n&D"] = "n:D",
    ["n&f&n"] = "n:f:n",
    ["n&f&t"] = "n:f:t",
    ["n&nH"] = "n:nH",
    ["n&nm&m"] = "n:nm*m",
    ["n&t&f"] = "n:t:f",
    ["n&t&k"] = "n:t:k",
    ["n&t&t"] = "n:t:t",
    ["n&U19&nw"] = "n:U19:nw*W",
    ["n&w"] = "n:w",
    ["n&wa&w"] = "n:wa:W",
    ["n&x&f"] = "n:x:f",
    ["n&xAst&t"] = "n:xAst:t*Z1",
    ["n&xt"] = "n:xt:x*t",
    ["nswt&bity"] = "sw:t-bit:t",
    ["N35C"] = "n:n",
    ["p&z&f"] = "p:z:f",
    ["r&a&k"] = "r:a:k",
    ["r&a&t"] = "r:a:t",
    ["r&A1"] = "r:A1",
    ["r&f&n"] = "r:f:n",
    ["r&n&f"] = "r:n:f",
    ["r&r&t"] = "r*r:t:D6",
    ["r&r"] = "r*r",
    ["r&t"] = "r*t",
    ["S28&Z2"] = "S28:Z2",
    ["sSm&m"] = "sSm:m",
    ["sti&t"] = "sti:t",
    ["stp&s"] = "stp&z",
    ["t&A"] = "t:A",
    ["t&A19"] = "t:A19",
    ["t&H"] = "t:H",
    ["t&I12"] = "t:I12",
    ["t&M30"] = "t:M30",
    ["t&nw"] = "t:n:nw*W",
    ["t&r"] = "t*r",
    ["t&s"] = "t:s",
    ["t&sti"] = "t:sti",
    ["t&T30"] = "t:T30",
    ["w&&t"] = "w:t",
    ["w&t"] = "w@t",
    ["w&y"] = "w@y",
    ["wa&W&a"] = "wa:W:a",
    ["wn&n&t"] = "wn:n:t",
    ["x&f&t"] = "x:f:t",
    ["x&mt&t"] = "x:mt:t",
    ["Y1&A1"] = "Y1:A1",
    ["Y1&n&f"] = "Y1:n:f",
    ["z&A1"] = "z:A1",
    ["z&Ab&b"] = "z:Ab*b",
    ["z&Dr&r"] = "z:Dr:r",
    ["z&w"] = "z:w",
    ["z&X&k"] = "z:X:k",
    ["z&x&r"] = "z:x:r",
    ["Z6&A1"] = "Z6:A1",
    ["xAswt"] = "xAst:t*Z1:Z2",
    ["nbAki"] = "n:(bA:k)*A1",

	["G43A"] = "t-w",
    ["I11A"] = "D&t:N17",
	["L2A"] = "sw:t-bit:t",
	["M17A"] = "i-i",
	["M22A"] = "sw-sw",
	["O30A"] = "O30-O30-O30-O30",
	["W14A"] = "H*Hz:z",
	["W24A"] = "nw*nw*nw",

    ["H_SPACE"] = ".",
    ["Tr_HSPACE"] = ".",
    ["SPACE"] = "..",
    ["Tr_SPACE"] = "..",
    ["BLACKDOT"] = "O",
    ["REDDOT"] = "o",
    ["<0"] = "<",
    ["0>"] = ">",
    ["<h0"] = "<h1",
    ["h0>"] = "h1>",

    ["TWO"] = "Z15A",
    ["THREE"] = "Z15B",
    ["VTHREE"] = "Z16B",
}

local mdc_phonogram_map = {
	["mSa"] = "A12",
	["xr"] = "A15",
	["Xrd"] = "A17",
	["sr"] = "A21",
	["mniw"] = "A33",
	["qiz"] = "A38",
	["iry"] = "A47",
	["Sps"] = "A50",
	["Spsi"] = "A51",
	["x"] = "Aa1",
	["mAa"] = "Aa11",
	["gs"] = "Aa13",
	["im"] = "Aa13",
	["M"] = "Aa15",
	["sA"] = "Aa17",
	["apr"] = "Aa20",
	["wDa"] = "Aa21",
	["nD"] = "Aa27",
	["qd"] = "Aa28",
	["Xkr"] = "Aa30",
	["Hp"] = "Aa5",
	["qn"] = "Aa8",
	["msi"] = "B3",
	["mAat"] = "C10",
	["HH"] = "C11",
	["DHwty"] = "C3",
	["Xnmw"] = "C4",
	["inpw"] = "C6",
	["stX"] = "C7",
	["mnw"] = "C8",
	["tp"] = "D1",
	["wDAt"] = "D10",
	["R"] = "D153",
	["fnD"] = "D19",
	["Hr"] = "D2",
	["r"] = "D21",
	["rA"] = "D21",
	["spt"] = "D24",
	["spty"] = "D25",
	["mnD"] = "D27",
	["kA"] = "D28",
	["Sny"] = "D3",
	["aHA"] = "D34",
	["a"] = "D36",
	["ir"] = "D4",
	["Dsr"] = "D45",
	["d"] = "D46",
	["Dba"] = "D50",
	["mt"] = "D52",
	["gH"] = "D56",
	["gHs"] = "D56",
	["rd"] = "D56",
	["sbq"] = "D56",
	["b"] = "D58",
	["ab"] = "D59",
	["wab"] = "D60",
	["sAH"] = "D61",
	["rmi"] = "D9",
	["zAb"] = "E17",
	["mAi"] = "E22",
	["l"] = "E23",
	["rw"] = "E23",
	["Aby"] = "E24",
	["wn"] = "E34",
	["zzmt"] = "E6",
	["wsr"] = "F12",
	["wp"] = "F13",
	["db"] = "F16",
	["Hw"] = "F18",
	["bH"] = "F18",
	["ns"] = "F20",
	["DrD"] = "F21",
	["idn"] = "F21",
	["msDr"] = "F21",
	["sDm"] = "F21",
	["kfA"] = "F22",
	["pH"] = "F22",
	["xpS"] = "F23",
	["wHm"] = "F25",
	["Xn"] = "F26",
	["sti"] = "F29",
	["Sd"] = "F30",
	["ms"] = "F31",
	["X"] = "F32",
	["sd"] = "F33",
	["ib"] = "F34",
	["nfr"] = "F35",
	["zmA"] = "F36",
	["imAx"] = "F39",
	["HAt"] = "F4",
	["Aw"] = "F40",
	["spr"] = "F42",
	["isw"] = "F44",
	["iwa"] = "F44",
	["pXr"] = "F46",
	["qAb"] = "F46",
	["SsA"] = "F5",
	["A"] = "G1",
	["mwt"] = "G14",
	["nbty"] = "G16",
	["m"] = "G17",
	["mm"] = "G18",
	["AA"] = "G2",
	["nH"] = "G21",
	["Db"] = "G22",
	["rxyt"] = "G23",
	["Ax"] = "G25",
	["dSr"] = "G27",
	["gm"] = "G28",
	["bA"] = "G29",
	["baHi"] = "G32",
	["aq"] = "G35",
	["wr"] = "G36",
	["nDs"] = "G37",
	["gb"] = "G38",
	["zA"] = "G39",
	["tyw"] = "G4",
	["pA"] = "G40",
	["xn"] = "G41",
	["wSA"] = "G42",
	["w"] = "G43",
	["ww"] = "G44",
	["mAw"] = "G46",
	["TA"] = "G47",
	["snD"] = "G54",
	["pq"] = "H2",
	["wSm"] = "H2",
	["pAq"] = "H3",
	["nr"] = "H4",
	["Sw"] = "H6",
	["aSA"] = "I1",
	["D"] = "I10",
	["DD"] = "I11",
	["Styw"] = "I2",
	["mzH"] = "I3",
	["sbk"] = "I4",
	["sAq"] = "I5",
	["km"] = "I6",
	["Hfn"] = "I8",
	["f"] = "I9",
	["in"] = "K1",
	["ad"] = "K3",
	["XA"] = "K4",
	["bz"] = "K5",
	["nSmt"] = "K6",
	["xpr"] = "L1",
	["bit"] = "L2",
	["srqt"] = "L7",
	["iAm"] = "M1",
	["wdn"] = "M11",
	["xA"] = "M12",
	["1000"] = "M12",
	["wAD"] = "M13",
	["HA"] = "M16",
	["i"] = "M17",
	["ii"] = "M18",
	["Hn"] = "M2",
	["sxt"] = "M20",
	["sm"] = "M21",
	["nn"] = "M22A",
	["sw"] = "M23",
	["rsw"] = "M24",
	["Sma"] = "M26",
	["nDm"] = "M29",
	["xt"] = "M3",
	["bnr"] = "M30",
	["bdt"] = "M34",
	["Dr"] = "M36",
	["rnp"] = "M4",
	["iz"] = "M40",
	["tr"] = "M6",
	["SA"] = "M8",
	["zSn"] = "M9",
	["pt"] = "N1",
	["Abd"] = "N11",
	["iaH"] = "N11",
	["dwA"] = "N14",
	["sbA"] = "N14",
	["dwAt"] = "N15",
	["tA"] = "N16",
	["iw"] = "N18",
	["wDb"] = "N20",
	["spAt"] = "N24",
	["xAst"] = "N25",
	["Dw"] = "N26",
	["Axt"] = "N27",
	["xa"] = "N28",
	["q"] = "N29",
	["iAt"] = "N30",
	["n"] = "N35",
	["mw"] = "N35A",
	["S"] = "N37",
	["iAdt"] = "N4",
	["idt"] = "N4",
	["Sm"] = "N40",
	["id"] = "N41",
	["hrw"] = "N5",
	["ra"] = "N5",
	["zw"] = "N5",
	["Hnmmt"] = "N8",
	["pzD"] = "N9",
	["pr"] = "O1",
	["aH"] = "O11",
	["wsxt"] = "O15",
	["kAr"] = "O18",
	["zH"] = "O22",
	["txn"] = "O25",
	["iwn"] = "O28",
	["aA"] = "O29",
	["zxnt"] = "O30",
	["z"] = "O34",
	["zb"] = "O35",
	["inb"] = "O36",
	["qnbt"] = "O38A",
	["h"] = "O4",
	["Szp"] = "O42",
	["ipt"] = "O45",
	["nxn"] = "O47",
	["niwt"] = "O49",
	["zp"] = "O50",
	["Snwt"] = "O51",
	["Hwt"] = "O6",
	["wHa"] = "P4",
	["TAw"] = "P5",
	["nfw"] = "P5",
	["aHa"] = "P6",
	["xrw"] = "P8",
	["st"] = "Q1",
	["wz"] = "Q2",
	["p"] = "Q3",
	["qrsw"] = "Q6",
	["xAt"] = "R1",
	["xAwt"] = "R1",
	["Dd"] = "R11",
	["dd"] = "R11",
	["imnt"] = "R14",
	["iAb"] = "R15",
	["wx"] = "R16",
	["xm"] = "R22",
	["Htp"] = "R4",
	["kAp"] = "R5",
	["kp"] = "R5",
	["snTr"] = "R7",
	["nTr"] = "R8",
	["nTrw"] = "R8A",
	["bd"] = "R9",
	["HDt"] = "S1",
	["mDH"] = "S10",
	["wsx"] = "S11",
	["nbw"] = "S12",
	["THn"] = "S15",
	["tHn"] = "S15",
	["mnit"] = "S18",
	["sDAw"] = "S19",
	["xtm"] = "S20",
	["sT"] = "S22",
	["dmD"] = "S23",
	["Tz"] = "S24",
	["Sndyt"] = "S26",
	["mnxt"] = "S27",
	["s"] = "S29",
	["N"] = "S3",
	["dSrt"] = "S3",
	["sf"] = "S30",
	["siA"] = "S32",
	["Tb"] = "S33",
	["anx"] = "S34",
	["Swt"] = "S35",
	["xw"] = "S37",
	["HqA"] = "S38",
	["awt"] = "S39",
	["wAs"] = "S40",
	["Dam"] = "S41",
	["abA"] = "S42",
	["sxm"] = "S42",
	["xrp"] = "S42",
	["md"] = "S43",
	["Ams"] = "S44",
	["nxxw"] = "S45",
	["K"] = "S56",
	["sxmty"] = "S6",
	["xprS"] = "S7",
	["Atf"] = "S8",
	["Swty"] = "S9",
	["pD"] = "T10",
	["sXr"] = "T11",
	["zin"] = "T11",
	["zwn"] = "T11",
	["Ai"] = "T12",
	["Ar"] = "T12",
	["rwD"] = "T12",
	["rwd"] = "T12",
	["rs"] = "T13",
	["qmA"] = "T14",
	["wrrt"] = "T17",
	["Sms"] = "T18",
	["qs"] = "T19",
	["wa"] = "T21",
	["sn"] = "T22",
	["iH"] = "T24",
	["DbA"] = "T25",
	["Xr"] = "T28",
	["nmt"] = "T29",
	["HD"] = "T3",
	["sSm"] = "T31",
	["nm"] = "T34",
	["HDD"] = "T6",
	["pd"] = "T9",
	["mA"] = "U1",
	["it"] = "U10",
	["HqAt"] = "U11",
	["Sna"] = "U13",
	["hb"] = "U13",
	["tm"] = "U15",
	["biA"] = "U16",
	["grg"] = "U17",
	["stp"] = "U21",
	["mnx"] = "U22",
	["Ab"] = "U23",
	["Hmt"] = "U24",
	["wbA"] = "U26",
	["DA"] = "U28",
	["rtH"] = "U31",
	["zmn"] = "U32",
	["ti"] = "U33",
	["xsf"] = "U34",
	["Hm"] = "U36",
	["mxAt"] = "U38",
	["mr"] = "U6",
	["100"] = "V1",
	["arq"] = "V12",
	["T"] = "V13",
	["iTi"] = "V15",
	["TmA"] = "V19",
	["XAr"] = "V19",
	["mDt"] = "V19",
	["sTA"] = "V2",
	["10"] = "V20",
	["mD"] = "V20",
	["mH"] = "V22",
	["wD"] = "V24",
	["aD"] = "V26",
	["H"] = "V28",
	["sk"] = "V29",
	["wAH"] = "V29",
	["sTAw"] = "V3",
	["nb"] = "V30",
	["k"] = "V31",
	["msn"] = "V32",
	["sSr"] = "V33",
	["idr"] = "V37",
	["wA"] = "V4",
	["snT"] = "V5",
	["sS"] = "V6",
	["Sn"] = "V7",
	["iab"] = "W10",
	["g"] = "W11",
	["nzt"] = "W11",
	["Hz"] = "W14",
	["xnt"] = "W17",
	["mi"] = "W19",
	["bAs"] = "W2",
	["Hnqt"] = "W22",
	["nw"] = "W24",
	["ini"] = "W25",
	["Hb"] = "W3",
	["Xnm"] = "W9",
	["t"] = "X1",
	["di"] = "X8",
	["rdi"] = "X8",
	["mDAt"] = "Y1",
	["mnhd"] = "Y3",
	["zS"] = "Y3",
	["mn"] = "Y5",
	["ibA"] = "Y6",
	["zSSt"] = "Y8",
	["imi"] = "Z11",
	["y"] = "Z4",
	["W"] = "Z7",
}

local hiero_map = {
    ["A1"] = "𓀀",
    ["A2"] = "𓀁",
    ["A3"] = "𓀂",
    ["A4"] = "𓀃",
    ["A5"] = "𓀄",
    ["A5A"] = "𓀅",
    ["A6"] = "𓀆",
    ["A6A"] = "𓀇",
    ["A6B"] = "𓀈",
    ["A7"] = "𓀉",
    ["A8"] = "𓀊",
    ["A9"] = "𓀋",
    ["A10"] = "𓀌",
    ["A11"] = "𓀍",
    ["A12"] = "𓀎",
    ["A13"] = "𓀏",
    ["A14"] = "𓀐",
    ["A14A"] = "𓀑",
    ["A15"] = "𓀒",
    ["A16"] = "𓀓",
    ["A17"] = "𓀔",
    ["A17A"] = "𓀕",
    ["A18"] = "𓀖",
    ["A19"] = "𓀗",
    ["A20"] = "𓀘",
    ["A21"] = "𓀙",
    ["A22"] = "𓀚",
    ["A23"] = "𓀛",
    ["A24"] = "𓀜",
    ["A25"] = "𓀝",
    ["A26"] = "𓀞",
    ["A27"] = "𓀟",
    ["A28"] = "𓀠",
    ["A29"] = "𓀡",
    ["A30"] = "𓀢",
    ["A31"] = "𓀣",
    ["A32"] = "𓀤",
    ["A32A"] = "𓀥",
    ["A33"] = "𓀦",
    ["A34"] = "𓀧",
    ["A35"] = "𓀨",
    ["A36"] = "𓀩",
    ["A37"] = "𓀪",
    ["A38"] = "𓀫",
    ["A39"] = "𓀬",
    ["A40"] = "𓀭",
    ["A40A"] = "𓀮",
    ["A41"] = "𓀯",
    ["A42"] = "𓀰",
    ["A42A"] = "𓀱",
    ["A43"] = "𓀲",
    ["A43A"] = "𓀳",
    ["A44"] = "𓀴",
    ["A45"] = "𓀵",
    ["A45A"] = "𓀶",
    ["A46"] = "𓀷",
    ["A47"] = "𓀸",
    ["A48"] = "𓀹",
    ["A49"] = "𓀺",
    ["A50"] = "𓀻",
    ["A51"] = "𓀼",
    ["A52"] = "𓀽",
    ["A53"] = "𓀾",
    ["A54"] = "𓀿",
    ["A55"] = "𓁀",
    ["A56"] = "𓁁",
    ["A57"] = "𓁂",
    ["A58"] = "𓁃",
    ["A59"] = "𓁄",
    ["A60"] = "𓁅",
    ["A61"] = "𓁆",
    ["A62"] = "𓁇",
    ["A63"] = "𓁈",
    ["A64"] = "𓁉",
    ["A65"] = "𓁊",
    ["A66"] = "𓁋",
    ["A67"] = "𓁌",
    ["A68"] = "𓁍",
    ["A69"] = "𓁎",
    ["A70"] = "𓁏",
    ["B1"] = "𓁐",
    ["B2"] = "𓁑",
    ["B3"] = "𓁒",
    ["B4"] = "𓁓",
    ["B5"] = "𓁔",
    ["B5A"] = "𓁕",
    ["B6"] = "𓁖",
    ["B7"] = "𓁗",
    ["B8"] = "𓁘",
    ["B9"] = "𓁙",
    ["C1"] = "𓁚",
    ["C2"] = "𓁛",
    ["C2A"] = "𓁜",
    ["C2B"] = "𓁝",
    ["C2C"] = "𓁞",
    ["C3"] = "𓁟",
    ["C4"] = "𓁠",
    ["C5"] = "𓁡",
    ["C6"] = "𓁢",
    ["C7"] = "𓁣",
    ["C8"] = "𓁤",
    ["C9"] = "𓁥",
    ["C10"] = "𓁦",
    ["C10A"] = "𓁧",
    ["C11"] = "𓁨",
    ["C12"] = "𓁩",
    ["C13"] = "𓁪",
    ["C14"] = "𓁫",
    ["C15"] = "𓁬",
    ["C16"] = "𓁭",
    ["C17"] = "𓁮",
    ["C18"] = "𓁯",
    ["C19"] = "𓁰",
    ["C20"] = "𓁱",
    ["C21"] = "𓁲",
    ["C22"] = "𓁳",
    ["C23"] = "𓁴",
    ["C24"] = "𓁵",
    ["D1"] = "𓁶",
    ["D2"] = "𓁷",
    ["D3"] = "𓁸",
    ["D4"] = "𓁹",
    ["D5"] = "𓁺",
    ["D6"] = "𓁻",
    ["D7"] = "𓁼",
    ["D8"] = "𓁽",
    ["D8A"] = "𓁾",
    ["D9"] = "𓁿",
    ["D10"] = "𓂀",
    ["D11"] = "𓂁",
    ["D12"] = "𓂂",
    ["D13"] = "𓂃",
    ["D14"] = "𓂄",
    ["D15"] = "𓂅",
    ["D16"] = "𓂆",
    ["D17"] = "𓂇",
    ["D18"] = "𓂈",
    ["D19"] = "𓂉",
    ["D20"] = "𓂊",
    ["D21"] = "𓂋",
    ["D22"] = "𓂌",
    ["D23"] = "𓂍",
    ["D24"] = "𓂎",
    ["D25"] = "𓂏",
    ["D26"] = "𓂐",
    ["D27"] = "𓂑",
    ["D27A"] = "𓂒",
    ["D28"] = "𓂓",
    ["D29"] = "𓂔",
    ["D30"] = "𓂕",
    ["D31"] = "𓂖",
    ["D31A"] = "𓂗",
    ["D32"] = "𓂘",
    ["D33"] = "𓂙",
    ["D34"] = "𓂚",
    ["D34A"] = "𓂛",
    ["D35"] = "𓂜",
    ["D36"] = "𓂝",
    ["D37"] = "𓂞",
    ["D38"] = "𓂟",
    ["D39"] = "𓂠",
    ["D40"] = "𓂡",
    ["D41"] = "𓂢",
    ["D42"] = "𓂣",
    ["D43"] = "𓂤",
    ["D44"] = "𓂥",
    ["D45"] = "𓂦",
    ["D46"] = "𓂧",
    ["D46A"] = "𓂨",
    ["D47"] = "𓂩",
    ["D48"] = "𓂪",
    ["D48A"] = "𓂫",
    ["D49"] = "𓂬",
    ["D50"] = "𓂭",
    ["D50A"] = "𓂮",
    ["D50B"] = "𓂯",
    ["D50C"] = "𓂰",
    ["D50D"] = "𓂱",
    ["D50E"] = "𓂲",
    ["D50F"] = "𓂳",
    ["D50G"] = "𓂴",
    ["D50H"] = "𓂵",
    ["D50I"] = "𓂶",
    ["D51"] = "𓂷",
    ["D52"] = "𓂸",
    ["D52A"] = "𓂹",
    ["D53"] = "𓂺",
    ["D54"] = "𓂻",
    ["D54A"] = "𓂼",
    ["D55"] = "𓂽",
    ["D56"] = "𓂾",
    ["D57"] = "𓂿",
    ["D58"] = "𓃀",
    ["D59"] = "𓃁",
    ["D60"] = "𓃂",
    ["D61"] = "𓃃",
    ["D62"] = "𓃄",
    ["D63"] = "𓃅",
    ["D64"] = "𓃆",
    ["D65"] = "𓃇",
    ["D66"] = "𓃈",
    ["D67"] = "𓃉",
    ["D67A"] = "𓃊",
    ["D67B"] = "𓃋",
    ["D67C"] = "𓃌",
    ["D67D"] = "𓃍",
    ["D67E"] = "𓃎",
    ["D67F"] = "𓃏",
    ["D67G"] = "𓃐",
    ["D67H"] = "𓃑",
    ["E1"] = "𓃒",
    ["E2"] = "𓃓",
    ["E3"] = "𓃔",
    ["E4"] = "𓃕",
    ["E5"] = "𓃖",
    ["E6"] = "𓃗",
    ["E7"] = "𓃘",
    ["E8"] = "𓃙",
    ["E8A"] = "𓃚",
    ["E9"] = "𓃛",
    ["E9A"] = "𓃜",
    ["E10"] = "𓃝",
    ["E11"] = "𓃞",
    ["E12"] = "𓃟",
    ["E13"] = "𓃠",
    ["E14"] = "𓃡",
    ["E15"] = "𓃢",
    ["E16"] = "𓃣",
    ["E16A"] = "𓃤",
    ["E17"] = "𓃥",
    ["E17A"] = "𓃦",
    ["E18"] = "𓃧",
    ["E19"] = "𓃨",
    ["E20"] = "𓃩",
    ["E20A"] = "𓃪",
    ["E21"] = "𓃫",
    ["E22"] = "𓃬",
    ["E23"] = "𓃭",
    ["E24"] = "𓃮",
    ["E25"] = "𓃯",
    ["E26"] = "𓃰",
    ["E27"] = "𓃱",
    ["E28"] = "𓃲",
    ["E28A"] = "𓃳",
    ["E29"] = "𓃴",
    ["E30"] = "𓃵",
    ["E31"] = "𓃶",
    ["E32"] = "𓃷",
    ["E33"] = "𓃸",
    ["E34"] = "𓃹",
    ["E34A"] = "𓃺",
    ["E36"] = "𓃻",
    ["E37"] = "𓃼",
    ["E38"] = "𓃽",
    ["F1"] = "𓃾",
    ["F1A"] = "𓃿",
    ["F2"] = "𓄀",
    ["F3"] = "𓄁",
    ["F4"] = "𓄂",
    ["F5"] = "𓄃",
    ["F6"] = "𓄄",
    ["F7"] = "𓄅",
    ["F8"] = "𓄆",
    ["F9"] = "𓄇",
    ["F10"] = "𓄈",
    ["F11"] = "𓄉",
    ["F12"] = "𓄊",
    ["F13"] = "𓄋",
    ["F13A"] = "𓄌",
    ["F14"] = "𓄍",
    ["F15"] = "𓄎",
    ["F16"] = "𓄏",
    ["F17"] = "𓄐",
    ["F18"] = "𓄑",
    ["F19"] = "𓄒",
    ["F20"] = "𓄓",
    ["F21"] = "𓄔",
    ["F21A"] = "𓄕",
    ["F22"] = "𓄖",
    ["F23"] = "𓄗",
    ["F24"] = "𓄘",
    ["F25"] = "𓄙",
    ["F26"] = "𓄚",
    ["F27"] = "𓄛",
    ["F28"] = "𓄜",
    ["F29"] = "𓄝",
    ["F30"] = "𓄞",
    ["F31"] = "𓄟",
    ["F31A"] = "𓄠",
    ["F32"] = "𓄡",
    ["F33"] = "𓄢",
    ["F34"] = "𓄣",
    ["F35"] = "𓄤",
    ["F36"] = "𓄥",
    ["F37"] = "𓄦",
    ["F37A"] = "𓄧",
    ["F38"] = "𓄨",
    ["F38A"] = "𓄩",
    ["F39"] = "𓄪",
    ["F40"] = "𓄫",
    ["F41"] = "𓄬",
    ["F42"] = "𓄭",
    ["F43"] = "𓄮",
    ["F44"] = "𓄯",
    ["F45"] = "𓄰",
    ["F45A"] = "𓄱",
    ["F46"] = "𓄲",
    ["F46A"] = "𓄳",
    ["F47"] = "𓄴",
    ["F47A"] = "𓄵",
    ["F48"] = "𓄶",
    ["F49"] = "𓄷",
    ["F50"] = "𓄸",
    ["F51"] = "𓄹",
    ["F51A"] = "𓄺",
    ["F51B"] = "𓄻",
    ["F51C"] = "𓄼",
    ["F52"] = "𓄽",
    ["F53"] = "𓄾",
    ["G1"] = "𓄿",
    ["G2"] = "𓅀",
    ["G3"] = "𓅁",
    ["G4"] = "𓅂",
    ["G5"] = "𓅃",
    ["G6"] = "𓅄",
    ["G6A"] = "𓅅",
    ["G7"] = "𓅆",
    ["G7A"] = "𓅇",
    ["G7B"] = "𓅈",
    ["G8"] = "𓅉",
    ["G9"] = "𓅊",
    ["G10"] = "𓅋",
    ["G11"] = "𓅌",
    ["G11A"] = "𓅍",
    ["G12"] = "𓅎",
    ["G13"] = "𓅏",
    ["G14"] = "𓅐",
    ["G15"] = "𓅑",
    ["G16"] = "𓅒",
    ["G17"] = "𓅓",
    ["G18"] = "𓅔",
    ["G19"] = "𓅕",
    ["G20"] = "𓅖",
    ["G20A"] = "𓅗",
    ["G21"] = "𓅘",
    ["G22"] = "𓅙",
    ["G23"] = "𓅚",
    ["G24"] = "𓅛",
    ["G25"] = "𓅜",
    ["G26"] = "𓅝",
    ["G26A"] = "𓅞",
    ["G27"] = "𓅟",
    ["G28"] = "𓅠",
    ["G29"] = "𓅡",
    ["G30"] = "𓅢",
    ["G31"] = "𓅣",
    ["G32"] = "𓅤",
    ["G33"] = "𓅥",
    ["G34"] = "𓅦",
    ["G35"] = "𓅧",
    ["G36"] = "𓅨",
    ["G36A"] = "𓅩",
    ["G37"] = "𓅪",
    ["G37A"] = "𓅫",
    ["G38"] = "𓅬",
    ["G39"] = "𓅭",
    ["G40"] = "𓅮",
    ["G41"] = "𓅯",
    ["G42"] = "𓅰",
    ["G43"] = "𓅱",
    ["G43A"] = "𓅲",
    ["G44"] = "𓅳",
    ["G45"] = "𓅴",
    ["G45A"] = "𓅵",
    ["G46"] = "𓅶",
    ["G47"] = "𓅷",
    ["G48"] = "𓅸",
    ["G49"] = "𓅹",
    ["G50"] = "𓅺",
    ["G51"] = "𓅻",
    ["G52"] = "𓅼",
    ["G53"] = "𓅽",
    ["G54"] = "𓅾",
    ["H1"] = "𓅿",
    ["H2"] = "𓆀",
    ["H3"] = "𓆁",
    ["H4"] = "𓆂",
    ["H5"] = "𓆃",
    ["H6"] = "𓆄",
    ["H6A"] = "𓆅",
    ["H7"] = "𓆆",
    ["H8"] = "𓆇",
    ["I1"] = "𓆈",
    ["I2"] = "𓆉",
    ["I3"] = "𓆊",
    ["I4"] = "𓆋",
    ["I5"] = "𓆌",
    ["I5A"] = "𓆍",
    ["I6"] = "𓆎",
    ["I7"] = "𓆏",
    ["I8"] = "𓆐",
    ["I9"] = "𓆑",
    ["I9A"] = "𓆒",
    ["I10"] = "𓆓",
    ["I10A"] = "𓆔",
    ["I11"] = "𓆕",
    ["I11A"] = "𓆖",
    ["I12"] = "𓆗",
    ["I13"] = "𓆘",
    ["I14"] = "𓆙",
    ["I15"] = "𓆚",
    ["K1"] = "𓆛",
    ["K2"] = "𓆜",
    ["K3"] = "𓆝",
    ["K4"] = "𓆞",
    ["K5"] = "𓆟",
    ["K6"] = "𓆠",
    ["K7"] = "𓆡",
    ["K8"] = "𓆢",
    ["L1"] = "𓆣",
    ["L2"] = "𓆤",
    ["L2A"] = "𓆥",
    ["L3"] = "𓆦",
    ["L4"] = "𓆧",
    ["L5"] = "𓆨",
    ["L6"] = "𓆩",
    ["L6A"] = "𓆪",
    ["L7"] = "𓆫",
    ["L8"] = "𓆬",
    ["M1"] = "𓆭",
    ["M1A"] = "𓆮",
    ["M1B"] = "𓆯",
    ["M2"] = "𓆰",
    ["M3"] = "𓆱",
    ["M3A"] = "𓆲",
    ["M4"] = "𓆳",
    ["M5"] = "𓆴",
    ["M6"] = "𓆵",
    ["M7"] = "𓆶",
    ["M8"] = "𓆷",
    ["M9"] = "𓆸",
    ["M10"] = "𓆹",
    ["M10A"] = "𓆺",
    ["M11"] = "𓆻",
    ["M12"] = "𓆼",
    ["M12A"] = "𓆽",
    ["M12B"] = "𓆾",
    ["M12C"] = "𓆿",
    ["M12D"] = "𓇀",
    ["M12E"] = "𓇁",
    ["M12F"] = "𓇂",
    ["M12G"] = "𓇃",
    ["M12H"] = "𓇄",
    ["M13"] = "𓇅",
    ["M14"] = "𓇆",
    ["M15"] = "𓇇",
    ["M15A"] = "𓇈",
    ["M16"] = "𓇉",
    ["M16A"] = "𓇊",
    ["M17"] = "𓇋",
    ["M17A"] = "𓇌",
    ["M18"] = "𓇍",
    ["M19"] = "𓇎",
    ["M20"] = "𓇏",
    ["M21"] = "𓇐",
    ["M22"] = "𓇑",
    ["M22A"] = "𓇒",
    ["M23"] = "𓇓",
    ["M24"] = "𓇔",
    ["M24A"] = "𓇕",
    ["M25"] = "𓇖",
    ["M26"] = "𓇗",
    ["M27"] = "𓇘",
    ["M28"] = "𓇙",
    ["M28A"] = "𓇚",
    ["M29"] = "𓇛",
    ["M30"] = "𓇜",
    ["M31"] = "𓇝",
    ["M31A"] = "𓇞",
    ["M32"] = "𓇟",
    ["M33"] = "𓇠",
    ["M33A"] = "𓇡",
    ["M33B"] = "𓇢",
    ["M34"] = "𓇣",
    ["M35"] = "𓇤",
    ["M36"] = "𓇥",
    ["M37"] = "𓇦",
    ["M38"] = "𓇧",
    ["M39"] = "𓇨",
    ["M40"] = "𓇩",
    ["M40A"] = "𓇪",
    ["M41"] = "𓇫",
    ["M42"] = "𓇬",
    ["M43"] = "𓇭",
    ["M44"] = "𓇮",
    ["N1"] = "𓇯",
    ["N2"] = "𓇰",
    ["N3"] = "𓇱",
    ["N4"] = "𓇲",
    ["N5"] = "𓇳",
    ["N6"] = "𓇴",
    ["N7"] = "𓇵",
    ["N8"] = "𓇶",
    ["N9"] = "𓇷",
    ["N10"] = "𓇸",
    ["N11"] = "𓇹",
    ["N12"] = "𓇺",
    ["N13"] = "𓇻",
    ["N14"] = "𓇼",
    ["N15"] = "𓇽",
    ["N16"] = "𓇾",
    ["N17"] = "𓇿",
    ["N18"] = "𓈀",
    ["N18A"] = "𓈁",
    ["N18B"] = "𓈂",
    ["N19"] = "𓈃",
    ["N20"] = "𓈄",
    ["N21"] = "𓈅",
    ["N22"] = "𓈆",
    ["N23"] = "𓈇",
    ["N24"] = "𓈈",
    ["N25"] = "𓈉",
    ["N25A"] = "𓈊",
    ["N26"] = "𓈋",
    ["N27"] = "𓈌",
    ["N28"] = "𓈍",
    ["N29"] = "𓈎",
    ["N30"] = "𓈏",
    ["N31"] = "𓈐",
    ["N32"] = "𓈑",
    ["N33"] = "𓈒",
    ["N33A"] = "𓈓",
    ["N34"] = "𓈔",
    ["N34A"] = "𓈕",
    ["N35"] = "𓈖",
    ["N35A"] = "𓈗",
    ["N36"] = "𓈘",
    ["N37"] = "𓈙",
    ["N37A"] = "𓈚",
    ["N38"] = "𓈛",
    ["N39"] = "𓈜",
    ["N40"] = "𓈝",
    ["N41"] = "𓈞",
    ["N42"] = "𓈟",
    ["NL1"] = "𓈠",
    ["NL2"] = "𓈡",
    ["NL3"] = "𓈢",
    ["NL4"] = "𓈣",
    ["NL5"] = "𓈤",
    ["NL5A"] = "𓈥",
    ["NL6"] = "𓈦",
    ["NL7"] = "𓈧",
    ["NL8"] = "𓈨",
    ["NL9"] = "𓈩",
    ["NL10"] = "𓈪",
    ["NL11"] = "𓈫",
    ["NL12"] = "𓈬",
    ["NL13"] = "𓈭",
    ["NL14"] = "𓈮",
    ["NL15"] = "𓈯",
    ["NL16"] = "𓈰",
    ["NL17"] = "𓈱",
    ["NL17A"] = "𓈲",
    ["NL18"] = "𓈳",
    ["NL19"] = "𓈴",
    ["NL20"] = "𓈵",
    ["NU1"] = "𓈶",
    ["NU2"] = "𓈷",
    ["NU3"] = "𓈸",
    ["NU4"] = "𓈹",
    ["NU5"] = "𓈺",
    ["NU6"] = "𓈻",
    ["NU7"] = "𓈼",
    ["NU8"] = "𓈽",
    ["NU9"] = "𓈾",
    ["NU10"] = "𓈿",
    ["NU10A"] = "𓉀",
    ["NU11"] = "𓉁",
    ["NU11A"] = "𓉂",
    ["NU12"] = "𓉃",
    ["NU13"] = "𓉄",
    ["NU14"] = "𓉅",
    ["NU15"] = "𓉆",
    ["NU16"] = "𓉇",
    ["NU17"] = "𓉈",
    ["NU18"] = "𓉉",
    ["NU18A"] = "𓉊",
    ["NU19"] = "𓉋",
    ["NU20"] = "𓉌",
    ["NU21"] = "𓉍",
    ["NU22"] = "𓉎",
    ["NU22A"] = "𓉏",
    ["O1"] = "𓉐",
    ["O1A"] = "𓉑",
    ["O2"] = "𓉒",
    ["O3"] = "𓉓",
    ["O4"] = "𓉔",
    ["O5"] = "𓉕",
    ["O5A"] = "𓉖",
    ["O6"] = "𓉗",
    ["O6A"] = "𓉘",
    ["O6B"] = "𓉙",
    ["O6C"] = "𓉚",
    ["O6D"] = "𓉛",
    ["O6E"] = "𓉜",
    ["O6F"] = "𓉝",
    ["O7"] = "𓉞",
    ["O8"] = "𓉟",
    ["O9"] = "𓉠",
    ["O10"] = "𓉡",
    ["O10A"] = "𓉢",
    ["O10B"] = "𓉣",
    ["O10C"] = "𓉤",
    ["O11"] = "𓉥",
    ["O12"] = "𓉦",
    ["O13"] = "𓉧",
    ["O14"] = "𓉨",
    ["O15"] = "𓉩",
    ["O16"] = "𓉪",
    ["O17"] = "𓉫",
    ["O18"] = "𓉬",
    ["O19"] = "𓉭",
    ["O19A"] = "𓉮",
    ["O20"] = "𓉯",
    ["O20A"] = "𓉰",
    ["O21"] = "𓉱",
    ["O22"] = "𓉲",
    ["O23"] = "𓉳",
    ["O24"] = "𓉴",
    ["O24A"] = "𓉵",
    ["O25"] = "𓉶",
    ["O25A"] = "𓉷",
    ["O26"] = "𓉸",
    ["O27"] = "𓉹",
    ["O28"] = "𓉺",
    ["O29"] = "𓉻",
    ["O29A"] = "𓉼",
    ["O30"] = "𓉽",
    ["O30A"] = "𓉾",
    ["O31"] = "𓉿",
    ["O32"] = "𓊀",
    ["O33"] = "𓊁",
    ["O33A"] = "𓊂",
    ["O34"] = "𓊃",
    ["O35"] = "𓊄",
    ["O36"] = "𓊅",
    ["O36A"] = "𓊆",
    ["O36B"] = "𓊇",
    ["O36C"] = "𓊈",
    ["O36D"] = "𓊉",
    ["O37"] = "𓊊",
    ["O38"] = "𓊋",
    ["O39"] = "𓊌",
    ["O40"] = "𓊍",
    ["O41"] = "𓊎",
    ["O42"] = "𓊏",
    ["O43"] = "𓊐",
    ["O44"] = "𓊑",
    ["O45"] = "𓊒",
    ["O46"] = "𓊓",
    ["O47"] = "𓊔",
    ["O48"] = "𓊕",
    ["O49"] = "𓊖",
    ["O50"] = "𓊗",
    ["O50A"] = "𓊘",
    ["O50B"] = "𓊙",
    ["O51"] = "𓊚",
    ["P1"] = "𓊛",
    ["P1A"] = "𓊜",
    ["P2"] = "𓊝",
    ["P3"] = "𓊞",
    ["P3A"] = "𓊟",
    ["P4"] = "𓊠",
    ["P5"] = "𓊡",
    ["P6"] = "𓊢",
    ["P7"] = "𓊣",
    ["P8"] = "𓊤",
    ["P9"] = "𓊥",
    ["P10"] = "𓊦",
    ["P11"] = "𓊧",
    ["Q1"] = "𓊨",
    ["Q2"] = "𓊩",
    ["Q3"] = "𓊪",
    ["Q4"] = "𓊫",
    ["Q5"] = "𓊬",
    ["Q6"] = "𓊭",
    ["Q7"] = "𓊮",
    ["R1"] = "𓊯",
    ["R2"] = "𓊰",
    ["R2A"] = "𓊱",
    ["R3"] = "𓊲",
    ["R3A"] = "𓊳",
    ["R3B"] = "𓊴",
    ["R4"] = "𓊵",
    ["R5"] = "𓊶",
    ["R6"] = "𓊷",
    ["R7"] = "𓊸",
    ["R8"] = "𓊹",
    ["R9"] = "𓊺",
    ["R10"] = "𓊻",
    ["R10A"] = "𓊼",
    ["R11"] = "𓊽",
    ["R12"] = "𓊾",
    ["R13"] = "𓊿",
    ["R14"] = "𓋀",
    ["R15"] = "𓋁",
    ["R16"] = "𓋂",
    ["R16A"] = "𓋃",
    ["R17"] = "𓋄",
    ["R18"] = "𓋅",
    ["R19"] = "𓋆",
    ["R20"] = "𓋇",
    ["R21"] = "𓋈",
    ["R22"] = "𓋉",
    ["R23"] = "𓋊",
    ["R24"] = "𓋋",
    ["R25"] = "𓋌",
    ["R26"] = "𓋍",
    ["R27"] = "𓋎",
    ["R28"] = "𓋏",
    ["R29"] = "𓋐",
    ["S1"] = "𓋑",
    ["S2"] = "𓋒",
    ["S2A"] = "𓋓",
    ["S3"] = "𓋔",
    ["S4"] = "𓋕",
    ["S5"] = "𓋖",
    ["S6"] = "𓋗",
    ["S6A"] = "𓋘",
    ["S7"] = "𓋙",
    ["S8"] = "𓋚",
    ["S9"] = "𓋛",
    ["S10"] = "𓋜",
    ["S11"] = "𓋝",
    ["S12"] = "𓋞",
    ["S13"] = "𓋟",
    ["S14"] = "𓋠",
    ["S14A"] = "𓋡",
    ["S14B"] = "𓋢",
    ["S15"] = "𓋣",
    ["S16"] = "𓋤",
    ["S17"] = "𓋥",
    ["S17A"] = "𓋦",
    ["S18"] = "𓋧",
    ["S19"] = "𓋨",
    ["S20"] = "𓋩",
    ["S21"] = "𓋪",
    ["S22"] = "𓋫",
    ["S23"] = "𓋬",
    ["S24"] = "𓋭",
    ["S25"] = "𓋮",
    ["S26"] = "𓋯",
    ["S26A"] = "𓋰",
    ["S26B"] = "𓋱",
    ["S27"] = "𓋲",
    ["S28"] = "𓋳",
    ["S29"] = "𓋴",
    ["S30"] = "𓋵",
    ["S31"] = "𓋶",
    ["S32"] = "𓋷",
    ["S33"] = "𓋸",
    ["S34"] = "𓋹",
    ["S35"] = "𓋺",
    ["S35A"] = "𓋻",
    ["S36"] = "𓋼",
    ["S37"] = "𓋽",
    ["S38"] = "𓋾",
    ["S39"] = "𓋿",
    ["S40"] = "𓌀",
    ["S41"] = "𓌁",
    ["S42"] = "𓌂",
    ["S43"] = "𓌃",
    ["S44"] = "𓌄",
    ["S45"] = "𓌅",
    ["S46"] = "𓌆",
    ["T1"] = "𓌇",
    ["T2"] = "𓌈",
    ["T3"] = "𓌉",
    ["T3A"] = "𓌊",
    ["T4"] = "𓌋",
    ["T5"] = "𓌌",
    ["T6"] = "𓌍",
    ["T7"] = "𓌎",
    ["T7A"] = "𓌏",
    ["T8"] = "𓌐",
    ["T8A"] = "𓌑",
    ["T9"] = "𓌒",
    ["T9A"] = "𓌓",
    ["T10"] = "𓌔",
    ["T11"] = "𓌕",
    ["T11A"] = "𓌖",
    ["T12"] = "𓌗",
    ["T13"] = "𓌘",
    ["T14"] = "𓌙",
    ["T15"] = "𓌚",
    ["T16"] = "𓌛",
    ["T16A"] = "𓌜",
    ["T17"] = "𓌝",
    ["T18"] = "𓌞",
    ["T19"] = "𓌟",
    ["T20"] = "𓌠",
    ["T21"] = "𓌡",
    ["T22"] = "𓌢",
    ["T23"] = "𓌣",
    ["T24"] = "𓌤",
    ["T25"] = "𓌥",
    ["T26"] = "𓌦",
    ["T27"] = "𓌧",
    ["T28"] = "𓌨",
    ["T29"] = "𓌩",
    ["T30"] = "𓌪",
    ["T31"] = "𓌫",
    ["T32"] = "𓌬",
    ["T32A"] = "𓌭",
    ["T33"] = "𓌮",
    ["T33A"] = "𓌯",
    ["T34"] = "𓌰",
    ["T35"] = "𓌱",
    ["T36"] = "𓌲",
    ["U1"] = "𓌳",
    ["U2"] = "𓌴",
    ["U3"] = "𓌵",
    ["U4"] = "𓌶",
    ["U5"] = "𓌷",
    ["U6"] = "𓌸",
    ["U6A"] = "𓌹",
    ["U6B"] = "𓌺",
    ["U7"] = "𓌻",
    ["U8"] = "𓌼",
    ["U9"] = "𓌽",
    ["U10"] = "𓌾",
    ["U11"] = "𓌿",
    ["U12"] = "𓍀",
    ["U13"] = "𓍁",
    ["U14"] = "𓍂",
    ["U15"] = "𓍃",
    ["U16"] = "𓍄",
    ["U17"] = "𓍅",
    ["U18"] = "𓍆",
    ["U19"] = "𓍇",
    ["U20"] = "𓍈",
    ["U21"] = "𓍉",
    ["U22"] = "𓍊",
    ["U23"] = "𓍋",
    ["U23A"] = "𓍌",
    ["U24"] = "𓍍",
    ["U25"] = "𓍎",
    ["U26"] = "𓍏",
    ["U27"] = "𓍐",
    ["U28"] = "𓍑",
    ["U29"] = "𓍒",
    ["U29A"] = "𓍓",
    ["U30"] = "𓍔",
    ["U31"] = "𓍕",
    ["U32"] = "𓍖",
    ["U32A"] = "𓍗",
    ["U33"] = "𓍘",
    ["U34"] = "𓍙",
    ["U35"] = "𓍚",
    ["U36"] = "𓍛",
    ["U37"] = "𓍜",
    ["U38"] = "𓍝",
    ["U39"] = "𓍞",
    ["U40"] = "𓍟",
    ["U41"] = "𓍠",
    ["U42"] = "𓍡",
    ["V1"] = "𓍢",
    ["V1A"] = "𓍣",
    ["V1B"] = "𓍤",
    ["V1C"] = "𓍥",
    ["V1D"] = "𓍦",
    ["V1E"] = "𓍧",
    ["V1F"] = "𓍨",
    ["V1G"] = "𓍩",
    ["V1H"] = "𓍪",
    ["V1I"] = "𓍫",
    ["V2"] = "𓍬",
    ["V2A"] = "𓍭",
    ["V3"] = "𓍮",
    ["V4"] = "𓍯",
    ["V5"] = "𓍰",
    ["V6"] = "𓍱",
    ["V7"] = "𓍲",
    ["V7A"] = "𓍳",
    ["V7B"] = "𓍴",
    ["V8"] = "𓍵",
    ["V9"] = "𓍶",
    ["V10"] = "𓍷",
    ["V11"] = "𓍸",
    ["V11A"] = "𓍹",
    ["V11B"] = "𓍺",
    ["V11C"] = "𓍻",
    ["V12"] = "𓍼",
    ["V12A"] = "𓍽",
    ["V12B"] = "𓍾",
    ["V13"] = "𓍿",
    ["V14"] = "𓎀",
    ["V15"] = "𓎁",
    ["V16"] = "𓎂",
    ["V17"] = "𓎃",
    ["V18"] = "𓎄",
    ["V19"] = "𓎅",
    ["V20"] = "𓎆",
    ["V20A"] = "𓎇",
    ["V20B"] = "𓎈",
    ["V20C"] = "𓎉",
    ["V20D"] = "𓎊",
    ["V20E"] = "𓎋",
    ["V20F"] = "𓎌",
    ["V20G"] = "𓎍",
    ["V20H"] = "𓎎",
    ["V20I"] = "𓎏",
    ["V20J"] = "𓎐",
    ["V20K"] = "𓎑",
    ["V20L"] = "𓎒",
    ["V21"] = "𓎓",
    ["V22"] = "𓎔",
    ["V23"] = "𓎕",
    ["V23A"] = "𓎖",
    ["V24"] = "𓎗",
    ["V25"] = "𓎘",
    ["V26"] = "𓎙",
    ["V27"] = "𓎚",
    ["V28"] = "𓎛",
    ["V28A"] = "𓎜",
    ["V29"] = "𓎝",
    ["V29A"] = "𓎞",
    ["V30"] = "𓎟",
    ["V30A"] = "𓎠",
    ["V31"] = "𓎡",
    ["V31A"] = "𓎢",
    ["V32"] = "𓎣",
    ["V33"] = "𓎤",
    ["V33A"] = "𓎥",
    ["V34"] = "𓎦",
    ["V35"] = "𓎧",
    ["V36"] = "𓎨",
    ["V37"] = "𓎩",
    ["V37A"] = "𓎪",
    ["V38"] = "𓎫",
    ["V39"] = "𓎬",
    ["V40"] = "𓎭",
    ["V40A"] = "𓎮",
    ["W1"] = "𓎯",
    ["W2"] = "𓎰",
    ["W3"] = "𓎱",
    ["W3A"] = "𓎲",
    ["W4"] = "𓎳",
    ["W5"] = "𓎴",
    ["W6"] = "𓎵",
    ["W7"] = "𓎶",
    ["W8"] = "𓎷",
    ["W9"] = "𓎸",
    ["W9A"] = "𓎹",
    ["W10"] = "𓎺",
    ["W10A"] = "𓎻",
    ["W11"] = "𓎼",
    ["W12"] = "𓎽",
    ["W13"] = "𓎾",
    ["W14"] = "𓎿",
    ["W14A"] = "𓏀",
    ["W15"] = "𓏁",
    ["W16"] = "𓏂",
    ["W17"] = "𓏃",
    ["W17A"] = "𓏄",
    ["W18"] = "𓏅",
    ["W18A"] = "𓏆",
    ["W19"] = "𓏇",
    ["W20"] = "𓏈",
    ["W21"] = "𓏉",
    ["W22"] = "𓏊",
    ["W23"] = "𓏋",
    ["W24"] = "𓏌",
    ["W24A"] = "𓏍",
    ["W25"] = "𓏎",
    ["X1"] = "𓏏",
    ["X2"] = "𓏐",
    ["X3"] = "𓏑",
    ["X4"] = "𓏒",
    ["X4A"] = "𓏓",
    ["X4B"] = "𓏔",
    ["X5"] = "𓏕",
    ["X6"] = "𓏖",
    ["X6A"] = "𓏗",
    ["X7"] = "𓏘",
    ["X8"] = "𓏙",
    ["X8A"] = "𓏚",
    ["Y1"] = "𓏛",
    ["Y1A"] = "𓏜",
    ["Y2"] = "𓏝",
    ["Y3"] = "𓏞",
    ["Y4"] = "𓏟",
    ["Y5"] = "𓏠",
    ["Y6"] = "𓏡",
    ["Y7"] = "𓏢",
    ["Y8"] = "𓏣",
    ["Z1"] = "𓏤",
    ["Z2"] = "𓏥",
    ["Z2A"] = "𓏦",
    ["Z2B"] = "𓏧",
    ["Z2C"] = "𓏨",
    ["Z2D"] = "𓏩",
    ["Z3"] = "𓏪",
    ["Z3A"] = "𓏫",
    ["Z3B"] = "𓏬",
    ["Z4"] = "𓏭",
    ["Z4A"] = "𓏮",
    ["Z5"] = "𓏯",
    ["Z5A"] = "𓏰",
    ["Z6"] = "𓏱",
    ["Z7"] = "𓏲",
    ["Z8"] = "𓏳",
    ["Z9"] = "𓏴",
    ["Z10"] = "𓏵",
    ["Z11"] = "𓏶",
    ["Z12"] = "𓏷",
    ["Z13"] = "𓏸",
    ["Z14"] = "𓏹",
    ["Z15"] = "𓏺",
    ["Z15A"] = "𓏻",
    ["Z15B"] = "𓏼",
    ["Z15C"] = "𓏽",
    ["Z15D"] = "𓏾",
    ["Z15E"] = "𓏿",
    ["Z15F"] = "𓐀",
    ["Z15G"] = "𓐁",
    ["Z15H"] = "𓐂",
    ["Z15I"] = "𓐃",
    ["Z16"] = "𓐄",
    ["Z16A"] = "𓐅",
    ["Z16B"] = "𓐆",
    ["Z16C"] = "𓐇",
    ["Z16D"] = "𓐈",
    ["Z16E"] = "𓐉",
    ["Z16F"] = "𓐊",
    ["Z16G"] = "𓐋",
    ["Z16H"] = "𓐌",
    ["Aa1"] = "𓐍",
    ["Aa2"] = "𓐎",
    ["Aa3"] = "𓐏",
    ["Aa4"] = "𓐐",
    ["Aa5"] = "𓐑",
    ["Aa6"] = "𓐒",
    ["Aa7"] = "𓐓",
    ["Aa7A"] = "𓐔",
    ["Aa7B"] = "𓐕",
    ["Aa8"] = "𓐖",
    ["Aa9"] = "𓐗",
    ["Aa10"] = "𓐘",
    ["Aa11"] = "𓐙",
    ["Aa12"] = "𓐚",
    ["Aa13"] = "𓐛",
    ["Aa14"] = "𓐜",
    ["Aa15"] = "𓐝",
    ["Aa16"] = "𓐞",
    ["Aa17"] = "𓐟",
    ["Aa18"] = "𓐠",
    ["Aa19"] = "𓐡",
    ["Aa20"] = "𓐢",
    ["Aa21"] = "𓐣",
    ["Aa22"] = "𓐤",
    ["Aa23"] = "𓐥",
    ["Aa24"] = "𓐦",
    ["Aa25"] = "𓐧",
    ["Aa26"] = "𓐨",
    ["Aa27"] = "𓐩",
    ["Aa28"] = "𓐪",
    ["Aa29"] = "𓐫",
    ["Aa30"] = "𓐬",
    ["Aa31"] = "𓐭",
    ["Aa32"] = "𓐮",

    ["Q_HASH"] = "𓑄",
    ["H_HASH"] = "𓑆",
    ["V_HASH"] = "𓑅",
    ["HASH"] = "𓑃",
    ["hatching"] = "𓑃𓑃",

    ["O"] = "⬤",
    ["o"] = "🔴",
    ["QUERY"] = "?",

    ["<"] = "𓍹𓐼",
    [">"] = "𓐽𓍺",
    ["<1"] = "𓍹𓐼",
    ["1>"] = "𓐽𓍻",
    ["<2"] = "𓐯𓐼",
    ["2>"] = "𓐽𓍺",
    ["<h1"] = "𓉘𓐼",
    ["h1>"] = "𓐽𓉝",
    ["<h2"] = "𓉙𓐼",
    ["h2>"] = "𓐽𓉜",
    ["<h3"] = "𓉚𓐼",
    ["h3>"] = "𓐽𓉛",
}

local mdc_symbol_map = {
    ["\\"] = "𓑀",
    [":"] = "𓐰",
    ["%*"] = "𓐱",
    ["%-"] = "",
    ["!"] = "</span><br><span class=\"Egyp\" lang=\"egy\">",
    ["%."] = "𓑂",
    [">&<"] = ">𓐳<",
    ["@"] = "𓐴",
    ["\n"] = "",
    ["\r"] = "",

    ["%[%["] = "[",
    ["%]%]"] = "]",
    ["%[{"] = "{",
    ["}%]"] = "}",
    ["%[&"] = "⟨",
    ["&%]"] = "⟩",
    ["%[\""] = "⟦",
    ["\"%]"] = "⟧",
    ["%[\'"] = "⸢",
    ["\'%]"] = "⸣",
}

local wikihiero_bracket_fix_map = {
    ["&%]"] = "Ba16a",
    ["%[\""] = "Ba18",
    ["\"%]"] = "Ba18a",
    ["%[\'"] = "Ba19",
    ["\'%]"] = "Ba19a",
}

local wikihiero_word_set = {
    ["A1"] = true,
    ["A10"] = true,
    ["A11"] = true,
    ["A113"] = true,
    ["A12"] = true,
    ["A12D"] = true,
    ["A13"] = true,
    ["A14"] = true,
    ["A14A"] = true,
    ["A15"] = true,
    ["A16"] = true,
    ["A17"] = true,
    ["A17A"] = true,
    ["A18"] = true,
    ["A19"] = true,
    ["A1s"] = true,
    ["A2"] = true,
    ["A20"] = true,
    ["A21"] = true,
    ["A21A"] = true,
    ["A22"] = true,
    ["A23"] = true,
    ["A24"] = true,
    ["A25"] = true,
    ["A25A"] = true,
    ["A25as"] = true,
    ["A26"] = true,
    ["A27"] = true,
    ["A28"] = true,
    ["A29"] = true,
    ["A2s"] = true,
    ["A3"] = true,
    ["A30"] = true,
    ["A31"] = true,
    ["A316"] = true,
    ["A32"] = true,
    ["A33"] = true,
    ["A335"] = true,
    ["A34"] = true,
    ["A347"] = true,
    ["A35"] = true,
    ["A36"] = true,
    ["A37"] = true,
    ["A38"] = true,
    ["A39"] = true,
    ["A4"] = true,
    ["A40"] = true,
    ["A40s"] = true,
    ["A41"] = true,
    ["A42"] = true,
    ["A43"] = true,
    ["A44"] = true,
    ["A45"] = true,
    ["A46"] = true,
    ["A47"] = true,
    ["A48"] = true,
    ["A49"] = true,
    ["A5"] = true,
    ["A50"] = true,
    ["A51"] = true,
    ["A52"] = true,
    ["A53"] = true,
    ["A54"] = true,
    ["A55"] = true,
    ["A56"] = true,
    ["A59"] = true,
    ["A6"] = true,
    ["A7"] = true,
    ["A8"] = true,
    ["A9"] = true,
    ["Aa1"] = true,
    ["Aa10"] = true,
    ["Aa11"] = true,
    ["Aa12"] = true,
    ["Aa13"] = true,
    ["Aa14"] = true,
    ["Aa15"] = true,
    ["Aa16"] = true,
    ["Aa17"] = true,
    ["Aa18"] = true,
    ["Aa19"] = true,
    ["Aa2"] = true,
    ["Aa20"] = true,
    ["Aa21"] = true,
    ["Aa22"] = true,
    ["Aa23"] = true,
    ["Aa24"] = true,
    ["Aa25"] = true,
    ["Aa26"] = true,
    ["Aa27"] = true,
    ["Aa28"] = true,
    ["Aa29"] = true,
    ["Aa3"] = true,
    ["Aa30"] = true,
    ["Aa30A"] = true,
    ["Aa31"] = true,
    ["Aa32"] = true,
    ["Aa4"] = true,
    ["Aa40"] = true,
    ["Aa41"] = true,
    ["Aa5"] = true,
    ["Aa6"] = true,
    ["Aa7"] = true,
    ["Aa8"] = true,
    ["Aa9"] = true,
    ["B1"] = true,
    ["B10"] = true,
    ["B11"] = true,
    ["B12"] = true,
    ["B1s"] = true,
    ["B2"] = true,
    ["B23B"] = true,
    ["B3"] = true,
    ["B4"] = true,
    ["B5"] = true,
    ["B6"] = true,
    ["B7"] = true,
    ["B8"] = true,
    ["B9"] = true,
    ["Ba14"] = true,
    ["Ba14a"] = true,
    ["Ba14as"] = true,
    ["Ba14s"] = true,
    ["Ba15"] = true,
    ["Ba15a"] = true,
    ["Ba15as"] = true,
    ["Ba15s"] = true,
    ["Ba16"] = true,
    ["Ba16a"] = true,
    ["Ba16as"] = true,
    ["Ba16s"] = true,
    ["Ba17"] = true,
    ["Ba17a"] = true,
    ["Ba17as"] = true,
    ["Ba17s"] = true,
    ["Ba18"] = true,
    ["Ba18a"] = true,
    ["Ba18as"] = true,
    ["Ba18s"] = true,
    ["Ba19"] = true,
    ["Ba19a"] = true,
    ["Ba19as"] = true,
    ["Ba19s"] = true,
    ["C1"] = true,
    ["C10"] = true,
    ["C11"] = true,
    ["C12"] = true,
    ["C17"] = true,
    ["C18"] = true,
    ["C19"] = true,
    ["C2"] = true,
    ["C20"] = true,
    ["C3"] = true,
    ["C4"] = true,
    ["C5"] = true,
    ["C6"] = true,
    ["C7"] = true,
    ["C8"] = true,
    ["C9"] = true,
    ["Ca0"] = true,
    ["Ca1"] = true,
    ["Ca1a"] = true,
    ["Ca2"] = true,
    ["Ca2a"] = true,
    ["Cah1"] = true,
    ["Cah1a"] = true,
    ["Cah2"] = true,
    ["Cah2a"] = true,
    ["Cah3"] = true,
    ["Cah3a"] = true,
    ["D1"] = true,
    ["D10"] = true,
    ["D11"] = true,
    ["D12"] = true,
    ["D13"] = true,
    ["D14"] = true,
    ["D15"] = true,
    ["D16"] = true,
    ["D17"] = true,
    ["D18"] = true,
    ["D19"] = true,
    ["D2"] = true,
    ["D20"] = true,
    ["D21"] = true,
    ["D22"] = true,
    ["D23"] = true,
    ["D24"] = true,
    ["D25"] = true,
    ["D26"] = true,
    ["D27"] = true,
    ["D27A"] = true,
    ["D28"] = true,
    ["D29"] = true,
    ["D3"] = true,
    ["D30"] = true,
    ["D31"] = true,
    ["D32"] = true,
    ["D33"] = true,
    ["D34"] = true,
    ["D34A"] = true,
    ["D35"] = true,
    ["D36"] = true,
    ["D37"] = true,
    ["D38"] = true,
    ["D39"] = true,
    ["D4"] = true,
    ["D40"] = true,
    ["D41"] = true,
    ["D42"] = true,
    ["D43"] = true,
    ["D44"] = true,
    ["D45"] = true,
    ["D46"] = true,
    ["D46A"] = true,
    ["D47"] = true,
    ["D48"] = true,
    ["D49"] = true,
    ["D5"] = true,
    ["D50"] = true,
    ["D51"] = true,
    ["D52"] = true,
    ["D53"] = true,
    ["D54"] = true,
    ["D55"] = true,
    ["D56"] = true,
    ["D57"] = true,
    ["D58"] = true,
    ["D58s"] = true,
    ["D59"] = true,
    ["D6"] = true,
    ["D60"] = true,
    ["D61"] = true,
    ["D62"] = true,
    ["D63"] = true,
    ["D7"] = true,
    ["D8"] = true,
    ["D9"] = true,
    ["E1"] = true,
    ["E10"] = true,
    ["E11"] = true,
    ["E12"] = true,
    ["E13"] = true,
    ["E14"] = true,
    ["E15"] = true,
    ["E16"] = true,
    ["E17"] = true,
    ["E18"] = true,
    ["E19"] = true,
    ["E2"] = true,
    ["E20"] = true,
    ["E21"] = true,
    ["E22"] = true,
    ["E23"] = true,
    ["E24"] = true,
    ["E25"] = true,
    ["E26"] = true,
    ["E27"] = true,
    ["E28"] = true,
    ["E29"] = true,
    ["E3"] = true,
    ["E30"] = true,
    ["E31"] = true,
    ["E32"] = true,
    ["E33"] = true,
    ["E34"] = true,
    ["E4"] = true,
    ["E5"] = true,
    ["E6"] = true,
    ["E7"] = true,
    ["E8"] = true,
    ["E8A"] = true,
    ["E9"] = true,
    ["F1"] = true,
    ["F10"] = true,
    ["F11"] = true,
    ["F12"] = true,
    ["F13"] = true,
    ["F14"] = true,
    ["F15"] = true,
    ["F16"] = true,
    ["F17"] = true,
    ["F18"] = true,
    ["F19"] = true,
    ["F2"] = true,
    ["F20"] = true,
    ["F21"] = true,
    ["F22"] = true,
    ["F23"] = true,
    ["F24"] = true,
    ["F25"] = true,
    ["F26"] = true,
    ["F27"] = true,
    ["F28"] = true,
    ["F29"] = true,
    ["F3"] = true,
    ["F30"] = true,
    ["F31"] = true,
    ["F31s"] = true,
    ["F32"] = true,
    ["F33"] = true,
    ["F34"] = true,
    ["F35"] = true,
    ["F36"] = true,
    ["F37"] = true,
    ["F37B"] = true,
    ["F38"] = true,
    ["F39"] = true,
    ["F4"] = true,
    ["F40"] = true,
    ["F41"] = true,
    ["F42"] = true,
    ["F43"] = true,
    ["F44"] = true,
    ["F45"] = true,
    ["F46"] = true,
    ["F47"] = true,
    ["F48"] = true,
    ["F49"] = true,
    ["F5"] = true,
    ["F50"] = true,
    ["F51"] = true,
    ["F51A"] = true,
    ["F51B"] = true,
    ["F52"] = true,
    ["F6"] = true,
    ["F7"] = true,
    ["F8"] = true,
    ["F9"] = true,
    ["G1"] = true,
    ["G10"] = true,
    ["G11"] = true,
    ["G12"] = true,
    ["G13"] = true,
    ["G14"] = true,
    ["G15"] = true,
    ["G16"] = true,
    ["G17"] = true,
    ["G17s"] = true,
    ["G18"] = true,
    ["G19"] = true,
    ["G1s"] = true,
    ["G2"] = true,
    ["G20"] = true,
    ["G21"] = true,
    ["G22"] = true,
    ["G23"] = true,
    ["G24"] = true,
    ["G25"] = true,
    ["G26"] = true,
    ["G26A"] = true,
    ["G27"] = true,
    ["G28"] = true,
    ["G29"] = true,
    ["G3"] = true,
    ["G30"] = true,
    ["G31"] = true,
    ["G32"] = true,
    ["G33"] = true,
    ["G34"] = true,
    ["G35"] = true,
    ["G36"] = true,
    ["G37"] = true,
    ["G38"] = true,
    ["G39"] = true,
    ["G4"] = true,
    ["G40"] = true,
    ["G41"] = true,
    ["G42"] = true,
    ["G43"] = true,
    ["G43s"] = true,
    ["G44"] = true,
    ["G45"] = true,
    ["G46"] = true,
    ["G47"] = true,
    ["G48"] = true,
    ["G49"] = true,
    ["G5"] = true,
    ["G50"] = true,
    ["G51"] = true,
    ["G52"] = true,
    ["G53"] = true,
    ["G54"] = true,
    ["G5s"] = true,
    ["G6"] = true,
    ["G7"] = true,
    ["G7A"] = true,
    ["G7AA"] = true,
    ["G8"] = true,
    ["G9"] = true,
    ["H1"] = true,
    ["H2"] = true,
    ["H3"] = true,
    ["H4"] = true,
    ["H5"] = true,
    ["H6"] = true,
    ["H6A"] = true,
    ["H7"] = true,
    ["H8"] = true,
    ["H8W"] = true,
    ["I1"] = true,
    ["I10"] = true,
    ["I11"] = true,
    ["I12"] = true,
    ["I13"] = true,
    ["I14"] = true,
    ["I15"] = true,
    ["I1S"] = true,
    ["I2"] = true,
    ["I3"] = true,
    ["I4"] = true,
    ["I5"] = true,
    ["I5A"] = true,
    ["I6"] = true,
    ["I7"] = true,
    ["I8"] = true,
    ["I9"] = true,
    ["K1"] = true,
    ["K2"] = true,
    ["K3"] = true,
    ["K4"] = true,
    ["K5"] = true,
    ["K6"] = true,
    ["K7"] = true,
    ["L1"] = true,
    ["L2"] = true,
    ["L3"] = true,
    ["L4"] = true,
    ["L5"] = true,
    ["L6"] = true,
    ["L7"] = true,
    ["M1"] = true,
    ["M10"] = true,
    ["M11"] = true,
    ["M12"] = true,
    ["M12s"] = true,
    ["M13"] = true,
    ["M14"] = true,
    ["M15"] = true,
    ["M16"] = true,
    ["M17"] = true,
    ["M17s"] = true,
    ["M18"] = true,
    ["M19"] = true,
    ["M2"] = true,
    ["M20"] = true,
    ["M21"] = true,
    ["M22"] = true,
    ["M23"] = true,
    ["M23s"] = true,
    ["M24"] = true,
    ["M25"] = true,
    ["M26"] = true,
    ["M27"] = true,
    ["M28"] = true,
    ["M29"] = true,
    ["M3"] = true,
    ["M30"] = true,
    ["M31"] = true,
    ["M32"] = true,
    ["M33"] = true,
    ["M34"] = true,
    ["M35"] = true,
    ["M36"] = true,
    ["M37"] = true,
    ["M38"] = true,
    ["M39"] = true,
    ["M4"] = true,
    ["M40"] = true,
    ["M41"] = true,
    ["M42"] = true,
    ["M43"] = true,
    ["M43A"] = true,
    ["M44"] = true,
    ["M5"] = true,
    ["M6"] = true,
    ["M7"] = true,
    ["M8"] = true,
    ["M9"] = true,
    ["N1"] = true,
    ["N10"] = true,
    ["N11"] = true,
    ["N12"] = true,
    ["N13"] = true,
    ["N14"] = true,
    ["N15"] = true,
    ["N16"] = true,
    ["N17"] = true,
    ["N18"] = true,
    ["N19"] = true,
    ["N2"] = true,
    ["N20"] = true,
    ["N21"] = true,
    ["N22"] = true,
    ["N23"] = true,
    ["N24"] = true,
    ["N25"] = true,
    ["N26"] = true,
    ["N27"] = true,
    ["N28"] = true,
    ["N29"] = true,
    ["N3"] = true,
    ["N30"] = true,
    ["N31"] = true,
    ["N32"] = true,
    ["N33"] = true,
    ["N33A"] = true,
    ["N33B"] = true,
    ["N33C"] = true,
    ["N34"] = true,
    ["N35"] = true,
    ["N35A"] = true,
    ["N35B"] = true,
    ["N35C"] = true,
    ["N36"] = true,
    ["N37"] = true,
    ["N38"] = true,
    ["N39"] = true,
    ["N4"] = true,
    ["N40"] = true,
    ["N41"] = true,
    ["N42"] = true,
    ["N5"] = true,
    ["N6"] = true,
    ["N7"] = true,
    ["N8"] = true,
    ["N9"] = true,
    ["O1"] = true,
    ["O10"] = true,
    ["O11"] = true,
    ["O12"] = true,
    ["O13"] = true,
    ["O14"] = true,
    ["O15"] = true,
    ["O16"] = true,
    ["O17"] = true,
    ["O18"] = true,
    ["O19"] = true,
    ["O2"] = true,
    ["O20"] = true,
    ["O21"] = true,
    ["O22"] = true,
    ["O23"] = true,
    ["O24"] = true,
    ["O25"] = true,
    ["O26"] = true,
    ["O27"] = true,
    ["O28"] = true,
    ["O29"] = true,
    ["O29V"] = true,
    ["O3"] = true,
    ["O30"] = true,
    ["O31"] = true,
    ["O32"] = true,
    ["O33"] = true,
    ["O34"] = true,
    ["O35"] = true,
    ["O36"] = true,
    ["O37"] = true,
    ["O38"] = true,
    ["O39"] = true,
    ["O4"] = true,
    ["O40"] = true,
    ["O41"] = true,
    ["O42"] = true,
    ["O43"] = true,
    ["O44"] = true,
    ["O45"] = true,
    ["O46"] = true,
    ["O47"] = true,
    ["O48"] = true,
    ["O49"] = true,
    ["O5"] = true,
    ["O50"] = true,
    ["O51"] = true,
    ["O6"] = true,
    ["O7"] = true,
    ["O8"] = true,
    ["O9"] = true,
    ["P1"] = true,
    ["P10"] = true,
    ["P11"] = true,
    ["P13"] = true,
    ["P1A"] = true,
    ["P2"] = true,
    ["P3"] = true,
    ["P4"] = true,
    ["P44A"] = true,
    ["P5"] = true,
    ["P6"] = true,
    ["P7"] = true,
    ["P8"] = true,
    ["P8H"] = true,
    ["P9"] = true,
    ["Q1"] = true,
    ["Q2"] = true,
    ["Q3"] = true,
    ["Q4"] = true,
    ["Q5"] = true,
    ["Q6"] = true,
    ["Q7"] = true,
    ["R1"] = true,
    ["R10"] = true,
    ["R11"] = true,
    ["R12"] = true,
    ["R13"] = true,
    ["R14"] = true,
    ["R15"] = true,
    ["R16"] = true,
    ["R17"] = true,
    ["R18"] = true,
    ["R19"] = true,
    ["R2"] = true,
    ["R20"] = true,
    ["R21"] = true,
    ["R22"] = true,
    ["R23"] = true,
    ["R24"] = true,
    ["R25"] = true,
    ["R3"] = true,
    ["R4"] = true,
    ["R5"] = true,
    ["R6"] = true,
    ["R7"] = true,
    ["R8"] = true,
    ["R8A"] = true,
    ["R9"] = true,
    ["S1"] = true,
    ["S10"] = true,
    ["S106"] = true,
    ["S11"] = true,
    ["S12"] = true,
    ["S13"] = true,
    ["S14"] = true,
    ["S14A"] = true,
    ["S15"] = true,
    ["S16"] = true,
    ["S17"] = true,
    ["S17A"] = true,
    ["S18"] = true,
    ["S19"] = true,
    ["S2"] = true,
    ["S20"] = true,
    ["S21"] = true,
    ["S22"] = true,
    ["S23"] = true,
    ["S24"] = true,
    ["S25"] = true,
    ["S26"] = true,
    ["S27"] = true,
    ["S28"] = true,
    ["S29"] = true,
    ["S29s"] = true,
    ["S3"] = true,
    ["S30"] = true,
    ["S31"] = true,
    ["S32"] = true,
    ["S33"] = true,
    ["S34"] = true,
    ["S35"] = true,
    ["S36"] = true,
    ["S37"] = true,
    ["S38"] = true,
    ["S39"] = true,
    ["S4"] = true,
    ["S40"] = true,
    ["S41"] = true,
    ["S42"] = true,
    ["S43"] = true,
    ["S44"] = true,
    ["S45"] = true,
    ["S5"] = true,
    ["S6"] = true,
    ["S7"] = true,
    ["S8"] = true,
    ["S9"] = true,
    ["T1"] = true,
    ["T10"] = true,
    ["T11"] = true,
    ["T12"] = true,
    ["T13"] = true,
    ["T14"] = true,
    ["T15"] = true,
    ["T16"] = true,
    ["T17"] = true,
    ["T18"] = true,
    ["T19"] = true,
    ["T2"] = true,
    ["T20"] = true,
    ["T21"] = true,
    ["T22"] = true,
    ["T23"] = true,
    ["T24"] = true,
    ["T25"] = true,
    ["T26"] = true,
    ["T27"] = true,
    ["T28"] = true,
    ["T29"] = true,
    ["T3"] = true,
    ["T30"] = true,
    ["T31"] = true,
    ["T32"] = true,
    ["T33"] = true,
    ["T34"] = true,
    ["T35"] = true,
    ["T4"] = true,
    ["T5"] = true,
    ["T6"] = true,
    ["T7"] = true,
    ["T7A"] = true,
    ["T8"] = true,
    ["T8A"] = true,
    ["T8B"] = true,
    ["T9"] = true,
    ["T9A"] = true,
    ["U1"] = true,
    ["U10"] = true,
    ["U11"] = true,
    ["U12"] = true,
    ["U13"] = true,
    ["U14"] = true,
    ["U15"] = true,
    ["U16"] = true,
    ["U17"] = true,
    ["U18"] = true,
    ["U19"] = true,
    ["U2"] = true,
    ["U20"] = true,
    ["U21"] = true,
    ["U22"] = true,
    ["U23"] = true,
    ["U24"] = true,
    ["U25"] = true,
    ["U26"] = true,
    ["U27"] = true,
    ["U28"] = true,
    ["U29"] = true,
    ["U3"] = true,
    ["U30"] = true,
    ["U31"] = true,
    ["U32"] = true,
    ["U33"] = true,
    ["U34"] = true,
    ["U35"] = true,
    ["U35s"] = true,
    ["U36"] = true,
    ["U37"] = true,
    ["U38"] = true,
    ["U39"] = true,
    ["U4"] = true,
    ["U40"] = true,
    ["U41"] = true,
    ["U5"] = true,
    ["U6"] = true,
    ["U7"] = true,
    ["U8"] = true,
    ["U9"] = true,
    ["V1"] = true,
    ["V10"] = true,
    ["V10A"] = true,
    ["V11"] = true,
    ["V11A"] = true,
    ["V12"] = true,
    ["V13"] = true,
    ["V14"] = true,
    ["V15"] = true,
    ["V16"] = true,
    ["V17"] = true,
    ["V18"] = true,
    ["V19"] = true,
    ["V2"] = true,
    ["V20"] = true,
    ["V21"] = true,
    ["V22"] = true,
    ["V23"] = true,
    ["V24"] = true,
    ["V25"] = true,
    ["V26"] = true,
    ["V27"] = true,
    ["V28"] = true,
    ["V29"] = true,
    ["V3"] = true,
    ["V30"] = true,
    ["V31"] = true,
    ["V31A"] = true,
    ["V32"] = true,
    ["V33"] = true,
    ["V34"] = true,
    ["V35"] = true,
    ["V36"] = true,
    ["V37"] = true,
    ["V38"] = true,
    ["V39"] = true,
    ["V4"] = true,
    ["V5"] = true,
    ["V6"] = true,
    ["V7"] = true,
    ["V8"] = true,
    ["V9"] = true,
    ["W1"] = true,
    ["W10"] = true,
    ["W10A"] = true,
    ["W11"] = true,
    ["W12"] = true,
    ["W13"] = true,
    ["W14"] = true,
    ["W15"] = true,
    ["W16"] = true,
    ["W17"] = true,
    ["W18"] = true,
    ["W19"] = true,
    ["W19s"] = true,
    ["W2"] = true,
    ["W20"] = true,
    ["W21"] = true,
    ["W22"] = true,
    ["W23"] = true,
    ["W24"] = true,
    ["W25"] = true,
    ["W3"] = true,
    ["W4"] = true,
    ["W5"] = true,
    ["W6"] = true,
    ["W7"] = true,
    ["W8"] = true,
    ["W9"] = true,
    ["X1"] = true,
    ["X2"] = true,
    ["X3"] = true,
    ["X4"] = true,
    ["X5"] = true,
    ["X6"] = true,
    ["X7"] = true,
    ["X8"] = true,
    ["Y1"] = true,
    ["Y1V"] = true,
    ["Y2"] = true,
    ["Y3"] = true,
    ["Y4"] = true,
    ["Y5"] = true,
    ["Y6"] = true,
    ["Y7"] = true,
    ["Y8"] = true,
    ["Z1"] = true,
    ["Z10"] = true,
    ["Z11"] = true,
    ["Z1s"] = true,
    ["Z2"] = true,
    ["Z2s"] = true,
    ["Z2ss"] = true,
    ["Z3"] = true,
    ["Z3A"] = true,
    ["Z3as"] = true,
    ["Z4"] = true,
    ["Z4B"] = true,
    ["Z5"] = true,
    ["Z6"] = true,
    ["Z7"] = true,
    ["Z8"] = true,
    ["Z9"] = true,
    ["Z91"] = true,
    ["Z92"] = true,
    ["Z93"] = true,
    ["Z94"] = true,
    ["Z95"] = true,
    ["Z98A"] = true,
    ["nswt"] = true,
    ["bity"] = true,
    ["F51a"] = true,
    ["Hmw"] = true,
    ["xAswt"] = true,
    ["nbAki"] = true,
    ["BLACKDOT"] = true,
    ["H_HASH"] = true,
    ["H_SPACE"] = true,
    ["HASH"] = true,
    ["hatching"] = true,
    ["Q_HASH"] = true,
    ["QUERY"] = true,
    ["REDDOT"] = true,
    ["SPACE"] = true,
    ["THREE"] = true,
    ["Tr_HSPACE"] = true,
    ["Tr_SPACE"] = true,
    ["TWO"] = true,
    ["V_HASH"] = true,
    ["VTHREE"] = true,
    ["0"] = true,
    ["1"] = true,
    ["2"] = true,
    ["h0"] = true,
    ["h1"] = true,
    ["h2"] = true,
    ["h3"] = true,
    ["hiero"] = true,
}

function export.mdc_to_unicode(frame)
    local mdc = frame.args[1]
    local unicode = export.remove_comments(mdc)

    unicode = mw.ustring.gsub(unicode, ":%*", ":")
    unicode = mw.ustring.gsub(unicode, "%*%*", "%*")
    unicode = mw.ustring.gsub(unicode, " ", "-")

    unicode = mw.ustring.gsub(unicode, "x&r&t&Y1", "x:r*t:Y1")

    for pat, repl in pairs(mdc_complex_group_normalization_map) do
        unicode = unicode:gsub("%f[%w_<>]" .. pat .. "%f[^%w_<>]", repl)
    end

    for pat, repl in pairs(mdc_normalization_map) do
        unicode = unicode:gsub("%f[%w_<>]" .. pat .. "%f[^%w_<>]", repl)
    end

    unicode = mw.ustring.gsub(unicode, "%f[%w_<>](.-)%f[^%w_<>]", "<span title=\"%1\">%1</span>")
    unicode = mw.ustring.gsub(unicode, "\"<", "\"&lt;")
    unicode = mw.ustring.gsub(unicode, ">\"", "&gt;\"")

    for pat, repl in pairs(mdc_phonogram_map) do
        unicode = unicode:gsub("\"([%w_<>]+)\">" .. pat .. "<", "\"" .. repl .. " %[%1%]\">" .. repl .. "<")
    end

    for pat, repl in pairs(hiero_map) do
        unicode = unicode:gsub(">" .. pat .. "<", ">" .. repl .. "<")
    end

    unicode = mw.ustring.gsub(unicode, "%.%.", "𓑁")
    for pat, repl in pairs(mdc_symbol_map) do
        unicode = unicode:gsub(pat, repl)
    end

    unicode = "<span class=\"Egyp\" lang=\"egy\">" .. unicode .. "</span>"

    return unicode
end

function export.mdc_to_wikihiero(frame)
	local mdc = frame.args[1]
    local wikihiero = export.remove_comments(mdc)

    for pat, repl in pairs(wikihiero_bracket_fix_map) do
        wikihiero = wikihiero:gsub(pat, repl)
    end

    for glyph in string.gmatch(wikihiero, "%f[%w_](.-)%f[^%w_]") do
        if (wikihiero_word_set[glyph] == nil and mdc_phonogram_map[glyph] == nil) then
            wikihiero = mw.ustring.gsub(wikihiero, glyph, frame:preprocess("</hiero>{{egy-glyph|" .. glyph .. "}}<hiero>"))
        end
    end

    wikihiero = mw.ustring.gsub(wikihiero, "!", frame:preprocess("</hiero><br><hiero>"))

    local wikihiero = frame:preprocess("<hiero>" .. wikihiero .. "</hiero>")
    return wikihiero
end

return export