1 | /**
|
2 | * generated from https://raw.githubusercontent.com/w3c/html/26b5126f96f736f796b9e29718138919dd513744/entities.json
|
3 | * do not edit
|
4 | */
|
5 | var namedCharRefs = {
|
6 | Aacute: "Á", aacute: "á", Abreve: "Ă", abreve: "ă", ac: "∾", acd: "∿", acE: "∾̳", Acirc: "Â", acirc: "â", acute: "´", Acy: "А", acy: "а", AElig: "Æ", aelig: "æ", af: "\u2061", Afr: "𝔄", afr: "𝔞", Agrave: "À", agrave: "à", alefsym: "ℵ", aleph: "ℵ", Alpha: "Α", alpha: "α", Amacr: "Ā", amacr: "ā", amalg: "⨿", amp: "&", AMP: "&", andand: "⩕", And: "⩓", and: "∧", andd: "⩜", andslope: "⩘", andv: "⩚", ang: "∠", ange: "⦤", angle: "∠", angmsdaa: "⦨", angmsdab: "⦩", angmsdac: "⦪", angmsdad: "⦫", angmsdae: "⦬", angmsdaf: "⦭", angmsdag: "⦮", angmsdah: "⦯", angmsd: "∡", angrt: "∟", angrtvb: "⊾", angrtvbd: "⦝", angsph: "∢", angst: "Å", angzarr: "⍼", Aogon: "Ą", aogon: "ą", Aopf: "𝔸", aopf: "𝕒", apacir: "⩯", ap: "≈", apE: "⩰", ape: "≊", apid: "≋", apos: "'", ApplyFunction: "\u2061", approx: "≈", approxeq: "≊", Aring: "Å", aring: "å", Ascr: "𝒜", ascr: "𝒶", Assign: "≔", ast: "*", asymp: "≈", asympeq: "≍", Atilde: "Ã", atilde: "ã", Auml: "Ä", auml: "ä", awconint: "∳", awint: "⨑", backcong: "≌", backepsilon: "϶", backprime: "‵", backsim: "∽", backsimeq: "⋍", Backslash: "∖", Barv: "⫧", barvee: "⊽", barwed: "⌅", Barwed: "⌆", barwedge: "⌅", bbrk: "⎵", bbrktbrk: "⎶", bcong: "≌", Bcy: "Б", bcy: "б", bdquo: "„", becaus: "∵", because: "∵", Because: "∵", bemptyv: "⦰", bepsi: "϶", bernou: "ℬ", Bernoullis: "ℬ", Beta: "Β", beta: "β", beth: "ℶ", between: "≬", Bfr: "𝔅", bfr: "𝔟", bigcap: "⋂", bigcirc: "◯", bigcup: "⋃", bigodot: "⨀", bigoplus: "⨁", bigotimes: "⨂", bigsqcup: "⨆", bigstar: "★", bigtriangledown: "▽", bigtriangleup: "△", biguplus: "⨄", bigvee: "⋁", bigwedge: "⋀", bkarow: "⤍", blacklozenge: "⧫", blacksquare: "▪", blacktriangle: "▴", blacktriangledown: "▾", blacktriangleleft: "◂", blacktriangleright: "▸", blank: "␣", blk12: "▒", blk14: "░", blk34: "▓", block: "█", bne: "=⃥", bnequiv: "≡⃥", bNot: "⫭", bnot: "⌐", Bopf: "𝔹", bopf: "𝕓", bot: "⊥", bottom: "⊥", bowtie: "⋈", boxbox: "⧉", boxdl: "┐", boxdL: "╕", boxDl: "╖", boxDL: "╗", boxdr: "┌", boxdR: "╒", boxDr: "╓", boxDR: "╔", boxh: "─", boxH: "═", boxhd: "┬", boxHd: "╤", boxhD: "╥", boxHD: "╦", boxhu: "┴", boxHu: "╧", boxhU: "╨", boxHU: "╩", boxminus: "⊟", boxplus: "⊞", boxtimes: "⊠", boxul: "┘", boxuL: "╛", boxUl: "╜", boxUL: "╝", boxur: "└", boxuR: "╘", boxUr: "╙", boxUR: "╚", boxv: "│", boxV: "║", boxvh: "┼", boxvH: "╪", boxVh: "╫", boxVH: "╬", boxvl: "┤", boxvL: "╡", boxVl: "╢", boxVL: "╣", boxvr: "├", boxvR: "╞", boxVr: "╟", boxVR: "╠", bprime: "‵", breve: "˘", Breve: "˘", brvbar: "¦", bscr: "𝒷", Bscr: "ℬ", bsemi: "⁏", bsim: "∽", bsime: "⋍", bsolb: "⧅", bsol: "\\", bsolhsub: "⟈", bull: "•", bullet: "•", bump: "≎", bumpE: "⪮", bumpe: "≏", Bumpeq: "≎", bumpeq: "≏", Cacute: "Ć", cacute: "ć", capand: "⩄", capbrcup: "⩉", capcap: "⩋", cap: "∩", Cap: "⋒", capcup: "⩇", capdot: "⩀", CapitalDifferentialD: "ⅅ", caps: "∩︀", caret: "⁁", caron: "ˇ", Cayleys: "ℭ", ccaps: "⩍", Ccaron: "Č", ccaron: "č", Ccedil: "Ç", ccedil: "ç", Ccirc: "Ĉ", ccirc: "ĉ", Cconint: "∰", ccups: "⩌", ccupssm: "⩐", Cdot: "Ċ", cdot: "ċ", cedil: "¸", Cedilla: "¸", cemptyv: "⦲", cent: "¢", centerdot: "·", CenterDot: "·", cfr: "𝔠", Cfr: "ℭ", CHcy: "Ч", chcy: "ч", check: "✓", checkmark: "✓", Chi: "Χ", chi: "χ", circ: "ˆ", circeq: "≗", circlearrowleft: "↺", circlearrowright: "↻", circledast: "⊛", circledcirc: "⊚", circleddash: "⊝", CircleDot: "⊙", circledR: "®", circledS: "Ⓢ", CircleMinus: "⊖", CirclePlus: "⊕", CircleTimes: "⊗", cir: "○", cirE: "⧃", cire: "≗", cirfnint: "⨐", cirmid: "⫯", cirscir: "⧂", ClockwiseContourIntegral: "∲", CloseCurlyDoubleQuote: "”", CloseCurlyQuote: "’", clubs: "♣", clubsuit: "♣", colon: ":", Colon: "∷", Colone: "⩴", colone: "≔", coloneq: "≔", comma: ",", commat: "@", comp: "∁", compfn: "∘", complement: "∁", complexes: "ℂ", cong: "≅", congdot: "⩭", Congruent: "≡", conint: "∮", Conint: "∯", ContourIntegral: "∮", copf: "𝕔", Copf: "ℂ", coprod: "∐", Coproduct: "∐", copy: "©", COPY: "©", copysr: "℗", CounterClockwiseContourIntegral: "∳", crarr: "↵", cross: "✗", Cross: "⨯", Cscr: "𝒞", cscr: "𝒸", csub: "⫏", csube: "⫑", csup: "⫐", csupe: "⫒", ctdot: "⋯", cudarrl: "⤸", cudarrr: "⤵", cuepr: "⋞", cuesc: "⋟", cularr: "↶", cularrp: "⤽", cupbrcap: "⩈", cupcap: "⩆", CupCap: "≍", cup: "∪", Cup: "⋓", cupcup: "⩊", cupdot: "⊍", cupor: "⩅", cups: "∪︀", curarr: "↷", curarrm: "⤼", curlyeqprec: "⋞", curlyeqsucc: "⋟", curlyvee: "⋎", curlywedge: "⋏", curren: "¤", curvearrowleft: "↶", curvearrowright: "↷", cuvee: "⋎", cuwed: "⋏", cwconint: "∲", cwint: "∱", cylcty: "⌭", dagger: "†", Dagger: "‡", daleth: "ℸ", darr: "↓", Darr: "↡", dArr: "⇓", dash: "‐", Dashv: "⫤", dashv: "⊣", dbkarow: "⤏", dblac: "˝", Dcaron: "Ď", dcaron: "ď", Dcy: "Д", dcy: "д", ddagger: "‡", ddarr: "⇊", DD: "ⅅ", dd: "ⅆ", DDotrahd: "⤑", ddotseq: "⩷", deg: "°", Del: "∇", Delta: "Δ", delta: "δ", demptyv: "⦱", dfisht: "⥿", Dfr: "𝔇", dfr: "𝔡", dHar: "⥥", dharl: "⇃", dharr: "⇂", DiacriticalAcute: "´", DiacriticalDot: "˙", DiacriticalDoubleAcute: "˝", DiacriticalGrave: "`", DiacriticalTilde: "˜", diam: "⋄", diamond: "⋄", Diamond: "⋄", diamondsuit: "♦", diams: "♦", die: "¨", DifferentialD: "ⅆ", digamma: "ϝ", disin: "⋲", div: "÷", divide: "÷", divideontimes: "⋇", divonx: "⋇", DJcy: "Ђ", djcy: "ђ", dlcorn: "⌞", dlcrop: "⌍", dollar: "$", Dopf: "𝔻", dopf: "𝕕", Dot: "¨", dot: "˙", DotDot: "⃜", doteq: "≐", doteqdot: "≑", DotEqual: "≐", dotminus: "∸", dotplus: "∔", dotsquare: "⊡", doublebarwedge: "⌆", DoubleContourIntegral: "∯", DoubleDot: "¨", DoubleDownArrow: "⇓", DoubleLeftArrow: "⇐", DoubleLeftRightArrow: "⇔", DoubleLeftTee: "⫤", DoubleLongLeftArrow: "⟸", DoubleLongLeftRightArrow: "⟺", DoubleLongRightArrow: "⟹", DoubleRightArrow: "⇒", DoubleRightTee: "⊨", DoubleUpArrow: "⇑", DoubleUpDownArrow: "⇕", DoubleVerticalBar: "∥", DownArrowBar: "⤓", downarrow: "↓", DownArrow: "↓", Downarrow: "⇓", DownArrowUpArrow: "⇵", DownBreve: "̑", downdownarrows: "⇊", downharpoonleft: "⇃", downharpoonright: "⇂", DownLeftRightVector: "⥐", DownLeftTeeVector: "⥞", DownLeftVectorBar: "⥖", DownLeftVector: "↽", DownRightTeeVector: "⥟", DownRightVectorBar: "⥗", DownRightVector: "⇁", DownTeeArrow: "↧", DownTee: "⊤", drbkarow: "⤐", drcorn: "⌟", drcrop: "⌌", Dscr: "𝒟", dscr: "𝒹", DScy: "Ѕ", dscy: "ѕ", dsol: "⧶", Dstrok: "Đ", dstrok: "đ", dtdot: "⋱", dtri: "▿", dtrif: "▾", duarr: "⇵", duhar: "⥯", dwangle: "⦦", DZcy: "Џ", dzcy: "џ", dzigrarr: "⟿", Eacute: "É", eacute: "é", easter: "⩮", Ecaron: "Ě", ecaron: "ě", Ecirc: "Ê", ecirc: "ê", ecir: "≖", ecolon: "≕", Ecy: "Э", ecy: "э", eDDot: "⩷", Edot: "Ė", edot: "ė", eDot: "≑", ee: "ⅇ", efDot: "≒", Efr: "𝔈", efr: "𝔢", eg: "⪚", Egrave: "È", egrave: "è", egs: "⪖", egsdot: "⪘", el: "⪙", Element: "∈", elinters: "⏧", ell: "ℓ", els: "⪕", elsdot: "⪗", Emacr: "Ē", emacr: "ē", empty: "∅", emptyset: "∅", EmptySmallSquare: "◻", emptyv: "∅", EmptyVerySmallSquare: "▫", emsp13: " ", emsp14: " ", emsp: " ", ENG: "Ŋ", eng: "ŋ", ensp: " ", Eogon: "Ę", eogon: "ę", Eopf: "𝔼", eopf: "𝕖", epar: "⋕", eparsl: "⧣", eplus: "⩱", epsi: "ε", Epsilon: "Ε", epsilon: "ε", epsiv: "ϵ", eqcirc: "≖", eqcolon: "≕", eqsim: "≂", eqslantgtr: "⪖", eqslantless: "⪕", Equal: "⩵", equals: "=", EqualTilde: "≂", equest: "≟", Equilibrium: "⇌", equiv: "≡", equivDD: "⩸", eqvparsl: "⧥", erarr: "⥱", erDot: "≓", escr: "ℯ", Escr: "ℰ", esdot: "≐", Esim: "⩳", esim: "≂", Eta: "Η", eta: "η", ETH: "Ð", eth: "ð", Euml: "Ë", euml: "ë", euro: "€", excl: "!", exist: "∃", Exists: "∃", expectation: "ℰ", exponentiale: "ⅇ", ExponentialE: "ⅇ", fallingdotseq: "≒", Fcy: "Ф", fcy: "ф", female: "♀", ffilig: "ffi", fflig: "ff", ffllig: "ffl", Ffr: "𝔉", ffr: "𝔣", filig: "fi", FilledSmallSquare: "◼", FilledVerySmallSquare: "▪", fjlig: "fj", flat: "♭", fllig: "fl", fltns: "▱", fnof: "ƒ", Fopf: "𝔽", fopf: "𝕗", forall: "∀", ForAll: "∀", fork: "⋔", forkv: "⫙", Fouriertrf: "ℱ", fpartint: "⨍", frac12: "½", frac13: "⅓", frac14: "¼", frac15: "⅕", frac16: "⅙", frac18: "⅛", frac23: "⅔", frac25: "⅖", frac34: "¾", frac35: "⅗", frac38: "⅜", frac45: "⅘", frac56: "⅚", frac58: "⅝", frac78: "⅞", frasl: "⁄", frown: "⌢", fscr: "𝒻", Fscr: "ℱ", gacute: "ǵ", Gamma: "Γ", gamma: "γ", Gammad: "Ϝ", gammad: "ϝ", gap: "⪆", Gbreve: "Ğ", gbreve: "ğ", Gcedil: "Ģ", Gcirc: "Ĝ", gcirc: "ĝ", Gcy: "Г", gcy: "г", Gdot: "Ġ", gdot: "ġ", ge: "≥", gE: "≧", gEl: "⪌", gel: "⋛", geq: "≥", geqq: "≧", geqslant: "⩾", gescc: "⪩", ges: "⩾", gesdot: "⪀", gesdoto: "⪂", gesdotol: "⪄", gesl: "⋛︀", gesles: "⪔", Gfr: "𝔊", gfr: "𝔤", gg: "≫", Gg: "⋙", ggg: "⋙", gimel: "ℷ", GJcy: "Ѓ", gjcy: "ѓ", gla: "⪥", gl: "≷", glE: "⪒", glj: "⪤", gnap: "⪊", gnapprox: "⪊", gne: "⪈", gnE: "≩", gneq: "⪈", gneqq: "≩", gnsim: "⋧", Gopf: "𝔾", gopf: "𝕘", grave: "`", GreaterEqual: "≥", GreaterEqualLess: "⋛", GreaterFullEqual: "≧", GreaterGreater: "⪢", GreaterLess: "≷", GreaterSlantEqual: "⩾", GreaterTilde: "≳", Gscr: "𝒢", gscr: "ℊ", gsim: "≳", gsime: "⪎", gsiml: "⪐", gtcc: "⪧", gtcir: "⩺", gt: ">", GT: ">", Gt: "≫", gtdot: "⋗", gtlPar: "⦕", gtquest: "⩼", gtrapprox: "⪆", gtrarr: "⥸", gtrdot: "⋗", gtreqless: "⋛", gtreqqless: "⪌", gtrless: "≷", gtrsim: "≳", gvertneqq: "≩︀", gvnE: "≩︀", Hacek: "ˇ", hairsp: " ", half: "½", hamilt: "ℋ", HARDcy: "Ъ", hardcy: "ъ", harrcir: "⥈", harr: "↔", hArr: "⇔", harrw: "↭", Hat: "^", hbar: "ℏ", Hcirc: "Ĥ", hcirc: "ĥ", hearts: "♥", heartsuit: "♥", hellip: "…", hercon: "⊹", hfr: "𝔥", Hfr: "ℌ", HilbertSpace: "ℋ", hksearow: "⤥", hkswarow: "⤦", hoarr: "⇿", homtht: "∻", hookleftarrow: "↩", hookrightarrow: "↪", hopf: "𝕙", Hopf: "ℍ", horbar: "―", HorizontalLine: "─", hscr: "𝒽", Hscr: "ℋ", hslash: "ℏ", Hstrok: "Ħ", hstrok: "ħ", HumpDownHump: "≎", HumpEqual: "≏", hybull: "⁃", hyphen: "‐", Iacute: "Í", iacute: "í", ic: "\u2063", Icirc: "Î", icirc: "î", Icy: "И", icy: "и", Idot: "İ", IEcy: "Е", iecy: "е", iexcl: "¡", iff: "⇔", ifr: "𝔦", Ifr: "ℑ", Igrave: "Ì", igrave: "ì", ii: "ⅈ", iiiint: "⨌", iiint: "∭", iinfin: "⧜", iiota: "℩", IJlig: "IJ", ijlig: "ij", Imacr: "Ī", imacr: "ī", image: "ℑ", ImaginaryI: "ⅈ", imagline: "ℐ", imagpart: "ℑ", imath: "ı", Im: "ℑ", imof: "⊷", imped: "Ƶ", Implies: "⇒", incare: "℅", in: "∈", infin: "∞", infintie: "⧝", inodot: "ı", intcal: "⊺", int: "∫", Int: "∬", integers: "ℤ", Integral: "∫", intercal: "⊺", Intersection: "⋂", intlarhk: "⨗", intprod: "⨼", InvisibleComma: "\u2063", InvisibleTimes: "\u2062", IOcy: "Ё", iocy: "ё", Iogon: "Į", iogon: "į", Iopf: "𝕀", iopf: "𝕚", Iota: "Ι", iota: "ι", iprod: "⨼", iquest: "¿", iscr: "𝒾", Iscr: "ℐ", isin: "∈", isindot: "⋵", isinE: "⋹", isins: "⋴", isinsv: "⋳", isinv: "∈", it: "\u2062", Itilde: "Ĩ", itilde: "ĩ", Iukcy: "І", iukcy: "і", Iuml: "Ï", iuml: "ï", Jcirc: "Ĵ", jcirc: "ĵ", Jcy: "Й", jcy: "й", Jfr: "𝔍", jfr: "𝔧", jmath: "ȷ", Jopf: "𝕁", jopf: "𝕛", Jscr: "𝒥", jscr: "𝒿", Jsercy: "Ј", jsercy: "ј", Jukcy: "Є", jukcy: "є", Kappa: "Κ", kappa: "κ", kappav: "ϰ", Kcedil: "Ķ", kcedil: "ķ", Kcy: "К", kcy: "к", Kfr: "𝔎", kfr: "𝔨", kgreen: "ĸ", KHcy: "Х", khcy: "х", KJcy: "Ќ", kjcy: "ќ", Kopf: "𝕂", kopf: "𝕜", Kscr: "𝒦", kscr: "𝓀", lAarr: "⇚", Lacute: "Ĺ", lacute: "ĺ", laemptyv: "⦴", lagran: "ℒ", Lambda: "Λ", lambda: "λ", lang: "⟨", Lang: "⟪", langd: "⦑", langle: "⟨", lap: "⪅", Laplacetrf: "ℒ", laquo: "«", larrb: "⇤", larrbfs: "⤟", larr: "←", Larr: "↞", lArr: "⇐", larrfs: "⤝", larrhk: "↩", larrlp: "↫", larrpl: "⤹", larrsim: "⥳", larrtl: "↢", latail: "⤙", lAtail: "⤛", lat: "⪫", late: "⪭", lates: "⪭︀", lbarr: "⤌", lBarr: "⤎", lbbrk: "❲", lbrace: "{", lbrack: "[", lbrke: "⦋", lbrksld: "⦏", lbrkslu: "⦍", Lcaron: "Ľ", lcaron: "ľ", Lcedil: "Ļ", lcedil: "ļ", lceil: "⌈", lcub: "{", Lcy: "Л", lcy: "л", ldca: "⤶", ldquo: "“", ldquor: "„", ldrdhar: "⥧", ldrushar: "⥋", ldsh: "↲", le: "≤", lE: "≦", LeftAngleBracket: "⟨", LeftArrowBar: "⇤", leftarrow: "←", LeftArrow: "←", Leftarrow: "⇐", LeftArrowRightArrow: "⇆", leftarrowtail: "↢", LeftCeiling: "⌈", LeftDoubleBracket: "⟦", LeftDownTeeVector: "⥡", LeftDownVectorBar: "⥙", LeftDownVector: "⇃", LeftFloor: "⌊", leftharpoondown: "↽", leftharpoonup: "↼", leftleftarrows: "⇇", leftrightarrow: "↔", LeftRightArrow: "↔", Leftrightarrow: "⇔", leftrightarrows: "⇆", leftrightharpoons: "⇋", leftrightsquigarrow: "↭", LeftRightVector: "⥎", LeftTeeArrow: "↤", LeftTee: "⊣", LeftTeeVector: "⥚", leftthreetimes: "⋋", LeftTriangleBar: "⧏", LeftTriangle: "⊲", LeftTriangleEqual: "⊴", LeftUpDownVector: "⥑", LeftUpTeeVector: "⥠", LeftUpVectorBar: "⥘", LeftUpVector: "↿", LeftVectorBar: "⥒", LeftVector: "↼", lEg: "⪋", leg: "⋚", leq: "≤", leqq: "≦", leqslant: "⩽", lescc: "⪨", les: "⩽", lesdot: "⩿", lesdoto: "⪁", lesdotor: "⪃", lesg: "⋚︀", lesges: "⪓", lessapprox: "⪅", lessdot: "⋖", lesseqgtr: "⋚", lesseqqgtr: "⪋", LessEqualGreater: "⋚", LessFullEqual: "≦", LessGreater: "≶", lessgtr: "≶", LessLess: "⪡", lesssim: "≲", LessSlantEqual: "⩽", LessTilde: "≲", lfisht: "⥼", lfloor: "⌊", Lfr: "𝔏", lfr: "𝔩", lg: "≶", lgE: "⪑", lHar: "⥢", lhard: "↽", lharu: "↼", lharul: "⥪", lhblk: "▄", LJcy: "Љ", ljcy: "љ", llarr: "⇇", ll: "≪", Ll: "⋘", llcorner: "⌞", Lleftarrow: "⇚", llhard: "⥫", lltri: "◺", Lmidot: "Ŀ", lmidot: "ŀ", lmoustache: "⎰", lmoust: "⎰", lnap: "⪉", lnapprox: "⪉", lne: "⪇", lnE: "≨", lneq: "⪇", lneqq: "≨", lnsim: "⋦", loang: "⟬", loarr: "⇽", lobrk: "⟦", longleftarrow: "⟵", LongLeftArrow: "⟵", Longleftarrow: "⟸", longleftrightarrow: "⟷", LongLeftRightArrow: "⟷", Longleftrightarrow: "⟺", longmapsto: "⟼", longrightarrow: "⟶", LongRightArrow: "⟶", Longrightarrow: "⟹", looparrowleft: "↫", looparrowright: "↬", lopar: "⦅", Lopf: "𝕃", lopf: "𝕝", loplus: "⨭", lotimes: "⨴", lowast: "∗", lowbar: "_", LowerLeftArrow: "↙", LowerRightArrow: "↘", loz: "◊", lozenge: "◊", lozf: "⧫", lpar: "(", lparlt: "⦓", lrarr: "⇆", lrcorner: "⌟", lrhar: "⇋", lrhard: "⥭", lrm: "\u200e", lrtri: "⊿", lsaquo: "‹", lscr: "𝓁", Lscr: "ℒ", lsh: "↰", Lsh: "↰", lsim: "≲", lsime: "⪍", lsimg: "⪏", lsqb: "[", lsquo: "‘", lsquor: "‚", Lstrok: "Ł", lstrok: "ł", ltcc: "⪦", ltcir: "⩹", lt: "<", LT: "<", Lt: "≪", ltdot: "⋖", lthree: "⋋", ltimes: "⋉", ltlarr: "⥶", ltquest: "⩻", ltri: "◃", ltrie: "⊴", ltrif: "◂", ltrPar: "⦖", lurdshar: "⥊", luruhar: "⥦", lvertneqq: "≨︀", lvnE: "≨︀", macr: "¯", male: "♂", malt: "✠", maltese: "✠", Map: "⤅", map: "↦", mapsto: "↦", mapstodown: "↧", mapstoleft: "↤", mapstoup: "↥", marker: "▮", mcomma: "⨩", Mcy: "М", mcy: "м", mdash: "—", mDDot: "∺", measuredangle: "∡", MediumSpace: " ", Mellintrf: "ℳ", Mfr: "𝔐", mfr: "𝔪", mho: "℧", micro: "µ", midast: "*", midcir: "⫰", mid: "∣", middot: "·", minusb: "⊟", minus: "−", minusd: "∸", minusdu: "⨪", MinusPlus: "∓", mlcp: "⫛", mldr: "…", mnplus: "∓", models: "⊧", Mopf: "𝕄", mopf: "𝕞", mp: "∓", mscr: "𝓂", Mscr: "ℳ", mstpos: "∾", Mu: "Μ", mu: "μ", multimap: "⊸", mumap: "⊸", nabla: "∇", Nacute: "Ń", nacute: "ń", nang: "∠⃒", nap: "≉", napE: "⩰̸", napid: "≋̸", napos: "ʼn", napprox: "≉", natural: "♮", naturals: "ℕ", natur: "♮", nbsp: " ", nbump: "≎̸", nbumpe: "≏̸", ncap: "⩃", Ncaron: "Ň", ncaron: "ň", Ncedil: "Ņ", ncedil: "ņ", ncong: "≇", ncongdot: "⩭̸", ncup: "⩂", Ncy: "Н", ncy: "н", ndash: "–", nearhk: "⤤", nearr: "↗", neArr: "⇗", nearrow: "↗", ne: "≠", nedot: "≐̸", NegativeMediumSpace: "", NegativeThickSpace: "", NegativeThinSpace: "", NegativeVeryThinSpace: "", nequiv: "≢", nesear: "⤨", nesim: "≂̸", NestedGreaterGreater: "≫", NestedLessLess: "≪", NewLine: "\u000a", nexist: "∄", nexists: "∄", Nfr: "𝔑", nfr: "𝔫", ngE: "≧̸", nge: "≱", ngeq: "≱", ngeqq: "≧̸", ngeqslant: "⩾̸", nges: "⩾̸", nGg: "⋙̸", ngsim: "≵", nGt: "≫⃒", ngt: "≯", ngtr: "≯", nGtv: "≫̸", nharr: "↮", nhArr: "⇎", nhpar: "⫲", ni: "∋", nis: "⋼", nisd: "⋺", niv: "∋", NJcy: "Њ", njcy: "њ", nlarr: "↚", nlArr: "⇍", nldr: "‥", nlE: "≦̸", nle: "≰", nleftarrow: "↚", nLeftarrow: "⇍", nleftrightarrow: "↮", nLeftrightarrow: "⇎", nleq: "≰", nleqq: "≦̸", nleqslant: "⩽̸", nles: "⩽̸", nless: "≮", nLl: "⋘̸", nlsim: "≴", nLt: "≪⃒", nlt: "≮", nltri: "⋪", nltrie: "⋬", nLtv: "≪̸", nmid: "∤", NoBreak: "\u2060", NonBreakingSpace: " ", nopf: "𝕟", Nopf: "ℕ", Not: "⫬", not: "¬", NotCongruent: "≢", NotCupCap: "≭", NotDoubleVerticalBar: "∦", NotElement: "∉", NotEqual: "≠", NotEqualTilde: "≂̸", NotExists: "∄", NotGreater: "≯", NotGreaterEqual: "≱", NotGreaterFullEqual: "≧̸", NotGreaterGreater: "≫̸", NotGreaterLess: "≹", NotGreaterSlantEqual: "⩾̸", NotGreaterTilde: "≵", NotHumpDownHump: "≎̸", NotHumpEqual: "≏̸", notin: "∉", notindot: "⋵̸", notinE: "⋹̸", notinva: "∉", notinvb: "⋷", notinvc: "⋶", NotLeftTriangleBar: "⧏̸", NotLeftTriangle: "⋪", NotLeftTriangleEqual: "⋬", NotLess: "≮", NotLessEqual: "≰", NotLessGreater: "≸", NotLessLess: "≪̸", NotLessSlantEqual: "⩽̸", NotLessTilde: "≴", NotNestedGreaterGreater: "⪢̸", NotNestedLessLess: "⪡̸", notni: "∌", notniva: "∌", notnivb: "⋾", notnivc: "⋽", NotPrecedes: "⊀", NotPrecedesEqual: "⪯̸", NotPrecedesSlantEqual: "⋠", NotReverseElement: "∌", NotRightTriangleBar: "⧐̸", NotRightTriangle: "⋫", NotRightTriangleEqual: "⋭", NotSquareSubset: "⊏̸", NotSquareSubsetEqual: "⋢", NotSquareSuperset: "⊐̸", NotSquareSupersetEqual: "⋣", NotSubset: "⊂⃒", NotSubsetEqual: "⊈", NotSucceeds: "⊁", NotSucceedsEqual: "⪰̸", NotSucceedsSlantEqual: "⋡", NotSucceedsTilde: "≿̸", NotSuperset: "⊃⃒", NotSupersetEqual: "⊉", NotTilde: "≁", NotTildeEqual: "≄", NotTildeFullEqual: "≇", NotTildeTilde: "≉", NotVerticalBar: "∤", nparallel: "∦", npar: "∦", nparsl: "⫽⃥", npart: "∂̸", npolint: "⨔", npr: "⊀", nprcue: "⋠", nprec: "⊀", npreceq: "⪯̸", npre: "⪯̸", nrarrc: "⤳̸", nrarr: "↛", nrArr: "⇏", nrarrw: "↝̸", nrightarrow: "↛", nRightarrow: "⇏", nrtri: "⋫", nrtrie: "⋭", nsc: "⊁", nsccue: "⋡", nsce: "⪰̸", Nscr: "𝒩", nscr: "𝓃", nshortmid: "∤", nshortparallel: "∦", nsim: "≁", nsime: "≄", nsimeq: "≄", nsmid: "∤", nspar: "∦", nsqsube: "⋢", nsqsupe: "⋣", nsub: "⊄", nsubE: "⫅̸", nsube: "⊈", nsubset: "⊂⃒", nsubseteq: "⊈", nsubseteqq: "⫅̸", nsucc: "⊁", nsucceq: "⪰̸", nsup: "⊅", nsupE: "⫆̸", nsupe: "⊉", nsupset: "⊃⃒", nsupseteq: "⊉", nsupseteqq: "⫆̸", ntgl: "≹", Ntilde: "Ñ", ntilde: "ñ", ntlg: "≸", ntriangleleft: "⋪", ntrianglelefteq: "⋬", ntriangleright: "⋫", ntrianglerighteq: "⋭", Nu: "Ν", nu: "ν", num: "#", numero: "№", numsp: " ", nvap: "≍⃒", nvdash: "⊬", nvDash: "⊭", nVdash: "⊮", nVDash: "⊯", nvge: "≥⃒", nvgt: ">⃒", nvHarr: "⤄", nvinfin: "⧞", nvlArr: "⤂", nvle: "≤⃒", nvlt: "<⃒", nvltrie: "⊴⃒", nvrArr: "⤃", nvrtrie: "⊵⃒", nvsim: "∼⃒", nwarhk: "⤣", nwarr: "↖", nwArr: "⇖", nwarrow: "↖", nwnear: "⤧", Oacute: "Ó", oacute: "ó", oast: "⊛", Ocirc: "Ô", ocirc: "ô", ocir: "⊚", Ocy: "О", ocy: "о", odash: "⊝", Odblac: "Ő", odblac: "ő", odiv: "⨸", odot: "⊙", odsold: "⦼", OElig: "Œ", oelig: "œ", ofcir: "⦿", Ofr: "𝔒", ofr: "𝔬", ogon: "˛", Ograve: "Ò", ograve: "ò", ogt: "⧁", ohbar: "⦵", ohm: "Ω", oint: "∮", olarr: "↺", olcir: "⦾", olcross: "⦻", oline: "‾", olt: "⧀", Omacr: "Ō", omacr: "ō", Omega: "Ω", omega: "ω", Omicron: "Ο", omicron: "ο", omid: "⦶", ominus: "⊖", Oopf: "𝕆", oopf: "𝕠", opar: "⦷", OpenCurlyDoubleQuote: "“", OpenCurlyQuote: "‘", operp: "⦹", oplus: "⊕", orarr: "↻", Or: "⩔", or: "∨", ord: "⩝", order: "ℴ", orderof: "ℴ", ordf: "ª", ordm: "º", origof: "⊶", oror: "⩖", orslope: "⩗", orv: "⩛", oS: "Ⓢ", Oscr: "𝒪", oscr: "ℴ", Oslash: "Ø", oslash: "ø", osol: "⊘", Otilde: "Õ", otilde: "õ", otimesas: "⨶", Otimes: "⨷", otimes: "⊗", Ouml: "Ö", ouml: "ö", ovbar: "⌽", OverBar: "‾", OverBrace: "⏞", OverBracket: "⎴", OverParenthesis: "⏜", para: "¶", parallel: "∥", par: "∥", parsim: "⫳", parsl: "⫽", part: "∂", PartialD: "∂", Pcy: "П", pcy: "п", percnt: "%", period: ".", permil: "‰", perp: "⊥", pertenk: "‱", Pfr: "𝔓", pfr: "𝔭", Phi: "Φ", phi: "φ", phiv: "ϕ", phmmat: "ℳ", phone: "☎", Pi: "Π", pi: "π", pitchfork: "⋔", piv: "ϖ", planck: "ℏ", planckh: "ℎ", plankv: "ℏ", plusacir: "⨣", plusb: "⊞", pluscir: "⨢", plus: "+", plusdo: "∔", plusdu: "⨥", pluse: "⩲", PlusMinus: "±", plusmn: "±", plussim: "⨦", plustwo: "⨧", pm: "±", Poincareplane: "ℌ", pointint: "⨕", popf: "𝕡", Popf: "ℙ", pound: "£", prap: "⪷", Pr: "⪻", pr: "≺", prcue: "≼", precapprox: "⪷", prec: "≺", preccurlyeq: "≼", Precedes: "≺", PrecedesEqual: "⪯", PrecedesSlantEqual: "≼", PrecedesTilde: "≾", preceq: "⪯", precnapprox: "⪹", precneqq: "⪵", precnsim: "⋨", pre: "⪯", prE: "⪳", precsim: "≾", prime: "′", Prime: "″", primes: "ℙ", prnap: "⪹", prnE: "⪵", prnsim: "⋨", prod: "∏", Product: "∏", profalar: "⌮", profline: "⌒", profsurf: "⌓", prop: "∝", Proportional: "∝", Proportion: "∷", propto: "∝", prsim: "≾", prurel: "⊰", Pscr: "𝒫", pscr: "𝓅", Psi: "Ψ", psi: "ψ", puncsp: " ", Qfr: "𝔔", qfr: "𝔮", qint: "⨌", qopf: "𝕢", Qopf: "ℚ", qprime: "⁗", Qscr: "𝒬", qscr: "𝓆", quaternions: "ℍ", quatint: "⨖", quest: "?", questeq: "≟", quot: "\"", QUOT: "\"", rAarr: "⇛", race: "∽̱", Racute: "Ŕ", racute: "ŕ", radic: "√", raemptyv: "⦳", rang: "⟩", Rang: "⟫", rangd: "⦒", range: "⦥", rangle: "⟩", raquo: "»", rarrap: "⥵", rarrb: "⇥", rarrbfs: "⤠", rarrc: "⤳", rarr: "→", Rarr: "↠", rArr: "⇒", rarrfs: "⤞", rarrhk: "↪", rarrlp: "↬", rarrpl: "⥅", rarrsim: "⥴", Rarrtl: "⤖", rarrtl: "↣", rarrw: "↝", ratail: "⤚", rAtail: "⤜", ratio: "∶", rationals: "ℚ", rbarr: "⤍", rBarr: "⤏", RBarr: "⤐", rbbrk: "❳", rbrace: "}", rbrack: "]", rbrke: "⦌", rbrksld: "⦎", rbrkslu: "⦐", Rcaron: "Ř", rcaron: "ř", Rcedil: "Ŗ", rcedil: "ŗ", rceil: "⌉", rcub: "}", Rcy: "Р", rcy: "р", rdca: "⤷", rdldhar: "⥩", rdquo: "”", rdquor: "”", rdsh: "↳", real: "ℜ", realine: "ℛ", realpart: "ℜ", reals: "ℝ", Re: "ℜ", rect: "▭", reg: "®", REG: "®", ReverseElement: "∋", ReverseEquilibrium: "⇋", ReverseUpEquilibrium: "⥯", rfisht: "⥽", rfloor: "⌋", rfr: "𝔯", Rfr: "ℜ", rHar: "⥤", rhard: "⇁", rharu: "⇀", rharul: "⥬", Rho: "Ρ", rho: "ρ", rhov: "ϱ", RightAngleBracket: "⟩", RightArrowBar: "⇥", rightarrow: "→", RightArrow: "→", Rightarrow: "⇒", RightArrowLeftArrow: "⇄", rightarrowtail: "↣", RightCeiling: "⌉", RightDoubleBracket: "⟧", RightDownTeeVector: "⥝", RightDownVectorBar: "⥕", RightDownVector: "⇂", RightFloor: "⌋", rightharpoondown: "⇁", rightharpoonup: "⇀", rightleftarrows: "⇄", rightleftharpoons: "⇌", rightrightarrows: "⇉", rightsquigarrow: "↝", RightTeeArrow: "↦", RightTee: "⊢", RightTeeVector: "⥛", rightthreetimes: "⋌", RightTriangleBar: "⧐", RightTriangle: "⊳", RightTriangleEqual: "⊵", RightUpDownVector: "⥏", RightUpTeeVector: "⥜", RightUpVectorBar: "⥔", RightUpVector: "↾", RightVectorBar: "⥓", RightVector: "⇀", ring: "˚", risingdotseq: "≓", rlarr: "⇄", rlhar: "⇌", rlm: "\u200f", rmoustache: "⎱", rmoust: "⎱", rnmid: "⫮", roang: "⟭", roarr: "⇾", robrk: "⟧", ropar: "⦆", ropf: "𝕣", Ropf: "ℝ", roplus: "⨮", rotimes: "⨵", RoundImplies: "⥰", rpar: ")", rpargt: "⦔", rppolint: "⨒", rrarr: "⇉", Rrightarrow: "⇛", rsaquo: "›", rscr: "𝓇", Rscr: "ℛ", rsh: "↱", Rsh: "↱", rsqb: "]", rsquo: "’", rsquor: "’", rthree: "⋌", rtimes: "⋊", rtri: "▹", rtrie: "⊵", rtrif: "▸", rtriltri: "⧎", RuleDelayed: "⧴", ruluhar: "⥨", rx: "℞", Sacute: "Ś", sacute: "ś", sbquo: "‚", scap: "⪸", Scaron: "Š", scaron: "š", Sc: "⪼", sc: "≻", sccue: "≽", sce: "⪰", scE: "⪴", Scedil: "Ş", scedil: "ş", Scirc: "Ŝ", scirc: "ŝ", scnap: "⪺", scnE: "⪶", scnsim: "⋩", scpolint: "⨓", scsim: "≿", Scy: "С", scy: "с", sdotb: "⊡", sdot: "⋅", sdote: "⩦", searhk: "⤥", searr: "↘", seArr: "⇘", searrow: "↘", sect: "§", semi: ";", seswar: "⤩", setminus: "∖", setmn: "∖", sext: "✶", Sfr: "𝔖", sfr: "𝔰", sfrown: "⌢", sharp: "♯", SHCHcy: "Щ", shchcy: "щ", SHcy: "Ш", shcy: "ш", ShortDownArrow: "↓", ShortLeftArrow: "←", shortmid: "∣", shortparallel: "∥", ShortRightArrow: "→", ShortUpArrow: "↑", shy: "\u00ad", Sigma: "Σ", sigma: "σ", sigmaf: "ς", sigmav: "ς", sim: "∼", simdot: "⩪", sime: "≃", simeq: "≃", simg: "⪞", simgE: "⪠", siml: "⪝", simlE: "⪟", simne: "≆", simplus: "⨤", simrarr: "⥲", slarr: "←", SmallCircle: "∘", smallsetminus: "∖", smashp: "⨳", smeparsl: "⧤", smid: "∣", smile: "⌣", smt: "⪪", smte: "⪬", smtes: "⪬︀", SOFTcy: "Ь", softcy: "ь", solbar: "⌿", solb: "⧄", sol: "/", Sopf: "𝕊", sopf: "𝕤", spades: "♠", spadesuit: "♠", spar: "∥", sqcap: "⊓", sqcaps: "⊓︀", sqcup: "⊔", sqcups: "⊔︀", Sqrt: "√", sqsub: "⊏", sqsube: "⊑", sqsubset: "⊏", sqsubseteq: "⊑", sqsup: "⊐", sqsupe: "⊒", sqsupset: "⊐", sqsupseteq: "⊒", square: "□", Square: "□", SquareIntersection: "⊓", SquareSubset: "⊏", SquareSubsetEqual: "⊑", SquareSuperset: "⊐", SquareSupersetEqual: "⊒", SquareUnion: "⊔", squarf: "▪", squ: "□", squf: "▪", srarr: "→", Sscr: "𝒮", sscr: "𝓈", ssetmn: "∖", ssmile: "⌣", sstarf: "⋆", Star: "⋆", star: "☆", starf: "★", straightepsilon: "ϵ", straightphi: "ϕ", strns: "¯", sub: "⊂", Sub: "⋐", subdot: "⪽", subE: "⫅", sube: "⊆", subedot: "⫃", submult: "⫁", subnE: "⫋", subne: "⊊", subplus: "⪿", subrarr: "⥹", subset: "⊂", Subset: "⋐", subseteq: "⊆", subseteqq: "⫅", SubsetEqual: "⊆", subsetneq: "⊊", subsetneqq: "⫋", subsim: "⫇", subsub: "⫕", subsup: "⫓", succapprox: "⪸", succ: "≻", succcurlyeq: "≽", Succeeds: "≻", SucceedsEqual: "⪰", SucceedsSlantEqual: "≽", SucceedsTilde: "≿", succeq: "⪰", succnapprox: "⪺", succneqq: "⪶", succnsim: "⋩", succsim: "≿", SuchThat: "∋", sum: "∑", Sum: "∑", sung: "♪", sup1: "¹", sup2: "²", sup3: "³", sup: "⊃", Sup: "⋑", supdot: "⪾", supdsub: "⫘", supE: "⫆", supe: "⊇", supedot: "⫄", Superset: "⊃", SupersetEqual: "⊇", suphsol: "⟉", suphsub: "⫗", suplarr: "⥻", supmult: "⫂", supnE: "⫌", supne: "⊋", supplus: "⫀", supset: "⊃", Supset: "⋑", supseteq: "⊇", supseteqq: "⫆", supsetneq: "⊋", supsetneqq: "⫌", supsim: "⫈", supsub: "⫔", supsup: "⫖", swarhk: "⤦", swarr: "↙", swArr: "⇙", swarrow: "↙", swnwar: "⤪", szlig: "ß", Tab: "\u0009", target: "⌖", Tau: "Τ", tau: "τ", tbrk: "⎴", Tcaron: "Ť", tcaron: "ť", Tcedil: "Ţ", tcedil: "ţ", Tcy: "Т", tcy: "т", tdot: "⃛", telrec: "⌕", Tfr: "𝔗", tfr: "𝔱", there4: "∴", therefore: "∴", Therefore: "∴", Theta: "Θ", theta: "θ", thetasym: "ϑ", thetav: "ϑ", thickapprox: "≈", thicksim: "∼", ThickSpace: " ", ThinSpace: " ", thinsp: " ", thkap: "≈", thksim: "∼", THORN: "Þ", thorn: "þ", tilde: "˜", Tilde: "∼", TildeEqual: "≃", TildeFullEqual: "≅", TildeTilde: "≈", timesbar: "⨱", timesb: "⊠", times: "×", timesd: "⨰", tint: "∭", toea: "⤨", topbot: "⌶", topcir: "⫱", top: "⊤", Topf: "𝕋", topf: "𝕥", topfork: "⫚", tosa: "⤩", tprime: "‴", trade: "™", TRADE: "™", triangle: "▵", triangledown: "▿", triangleleft: "◃", trianglelefteq: "⊴", triangleq: "≜", triangleright: "▹", trianglerighteq: "⊵", tridot: "◬", trie: "≜", triminus: "⨺", TripleDot: "⃛", triplus: "⨹", trisb: "⧍", tritime: "⨻", trpezium: "⏢", Tscr: "𝒯", tscr: "𝓉", TScy: "Ц", tscy: "ц", TSHcy: "Ћ", tshcy: "ћ", Tstrok: "Ŧ", tstrok: "ŧ", twixt: "≬", twoheadleftarrow: "↞", twoheadrightarrow: "↠", Uacute: "Ú", uacute: "ú", uarr: "↑", Uarr: "↟", uArr: "⇑", Uarrocir: "⥉", Ubrcy: "Ў", ubrcy: "ў", Ubreve: "Ŭ", ubreve: "ŭ", Ucirc: "Û", ucirc: "û", Ucy: "У", ucy: "у", udarr: "⇅", Udblac: "Ű", udblac: "ű", udhar: "⥮", ufisht: "⥾", Ufr: "𝔘", ufr: "𝔲", Ugrave: "Ù", ugrave: "ù", uHar: "⥣", uharl: "↿", uharr: "↾", uhblk: "▀", ulcorn: "⌜", ulcorner: "⌜", ulcrop: "⌏", ultri: "◸", Umacr: "Ū", umacr: "ū", uml: "¨", UnderBar: "_", UnderBrace: "⏟", UnderBracket: "⎵", UnderParenthesis: "⏝", Union: "⋃", UnionPlus: "⊎", Uogon: "Ų", uogon: "ų", Uopf: "𝕌", uopf: "𝕦", UpArrowBar: "⤒", uparrow: "↑", UpArrow: "↑", Uparrow: "⇑", UpArrowDownArrow: "⇅", updownarrow: "↕", UpDownArrow: "↕", Updownarrow: "⇕", UpEquilibrium: "⥮", upharpoonleft: "↿", upharpoonright: "↾", uplus: "⊎", UpperLeftArrow: "↖", UpperRightArrow: "↗", upsi: "υ", Upsi: "ϒ", upsih: "ϒ", Upsilon: "Υ", upsilon: "υ", UpTeeArrow: "↥", UpTee: "⊥", upuparrows: "⇈", urcorn: "⌝", urcorner: "⌝", urcrop: "⌎", Uring: "Ů", uring: "ů", urtri: "◹", Uscr: "𝒰", uscr: "𝓊", utdot: "⋰", Utilde: "Ũ", utilde: "ũ", utri: "▵", utrif: "▴", uuarr: "⇈", Uuml: "Ü", uuml: "ü", uwangle: "⦧", vangrt: "⦜", varepsilon: "ϵ", varkappa: "ϰ", varnothing: "∅", varphi: "ϕ", varpi: "ϖ", varpropto: "∝", varr: "↕", vArr: "⇕", varrho: "ϱ", varsigma: "ς", varsubsetneq: "⊊︀", varsubsetneqq: "⫋︀", varsupsetneq: "⊋︀", varsupsetneqq: "⫌︀", vartheta: "ϑ", vartriangleleft: "⊲", vartriangleright: "⊳", vBar: "⫨", Vbar: "⫫", vBarv: "⫩", Vcy: "В", vcy: "в", vdash: "⊢", vDash: "⊨", Vdash: "⊩", VDash: "⊫", Vdashl: "⫦", veebar: "⊻", vee: "∨", Vee: "⋁", veeeq: "≚", vellip: "⋮", verbar: "|", Verbar: "‖", vert: "|", Vert: "‖", VerticalBar: "∣", VerticalLine: "|", VerticalSeparator: "❘", VerticalTilde: "≀", VeryThinSpace: " ", Vfr: "𝔙", vfr: "𝔳", vltri: "⊲", vnsub: "⊂⃒", vnsup: "⊃⃒", Vopf: "𝕍", vopf: "𝕧", vprop: "∝", vrtri: "⊳", Vscr: "𝒱", vscr: "𝓋", vsubnE: "⫋︀", vsubne: "⊊︀", vsupnE: "⫌︀", vsupne: "⊋︀", Vvdash: "⊪", vzigzag: "⦚", Wcirc: "Ŵ", wcirc: "ŵ", wedbar: "⩟", wedge: "∧", Wedge: "⋀", wedgeq: "≙", weierp: "℘", Wfr: "𝔚", wfr: "𝔴", Wopf: "𝕎", wopf: "𝕨", wp: "℘", wr: "≀", wreath: "≀", Wscr: "𝒲", wscr: "𝓌", xcap: "⋂", xcirc: "◯", xcup: "⋃", xdtri: "▽", Xfr: "𝔛", xfr: "𝔵", xharr: "⟷", xhArr: "⟺", Xi: "Ξ", xi: "ξ", xlarr: "⟵", xlArr: "⟸", xmap: "⟼", xnis: "⋻", xodot: "⨀", Xopf: "𝕏", xopf: "𝕩", xoplus: "⨁", xotime: "⨂", xrarr: "⟶", xrArr: "⟹", Xscr: "𝒳", xscr: "𝓍", xsqcup: "⨆", xuplus: "⨄", xutri: "△", xvee: "⋁", xwedge: "⋀", Yacute: "Ý", yacute: "ý", YAcy: "Я", yacy: "я", Ycirc: "Ŷ", ycirc: "ŷ", Ycy: "Ы", ycy: "ы", yen: "¥", Yfr: "𝔜", yfr: "𝔶", YIcy: "Ї", yicy: "ї", Yopf: "𝕐", yopf: "𝕪", Yscr: "𝒴", yscr: "𝓎", YUcy: "Ю", yucy: "ю", yuml: "ÿ", Yuml: "Ÿ", Zacute: "Ź", zacute: "ź", Zcaron: "Ž", zcaron: "ž", Zcy: "З", zcy: "з", Zdot: "Ż", zdot: "ż", zeetrf: "ℨ", ZeroWidthSpace: "", Zeta: "Ζ", zeta: "ζ", zfr: "𝔷", Zfr: "ℨ", ZHcy: "Ж", zhcy: "ж", zigrarr: "⇝", zopf: "𝕫", Zopf: "ℤ", Zscr: "𝒵", zscr: "𝓏", zwj: "\u200d", zwnj: "\u200c"
|
7 | };
|
8 |
|
9 | var HEXCHARCODE = /^#[xX]([A-Fa-f0-9]+)$/;
|
10 | var CHARCODE = /^#([0-9]+)$/;
|
11 | var NAMED = /^([A-Za-z0-9]+)$/;
|
12 | var EntityParser = /** @class */ (function () {
|
13 | function EntityParser(named) {
|
14 | this.named = named;
|
15 | }
|
16 | EntityParser.prototype.parse = function (entity) {
|
17 | if (!entity) {
|
18 | return;
|
19 | }
|
20 | var matches = entity.match(HEXCHARCODE);
|
21 | if (matches) {
|
22 | return String.fromCharCode(parseInt(matches[1], 16));
|
23 | }
|
24 | matches = entity.match(CHARCODE);
|
25 | if (matches) {
|
26 | return String.fromCharCode(parseInt(matches[1], 10));
|
27 | }
|
28 | matches = entity.match(NAMED);
|
29 | if (matches) {
|
30 | return this.named[matches[1]];
|
31 | }
|
32 | };
|
33 | return EntityParser;
|
34 | }());
|
35 |
|
36 | var WSP = /[\t\n\f ]/;
|
37 | var ALPHA = /[A-Za-z]/;
|
38 | var CRLF = /\r\n?/g;
|
39 | function isSpace(char) {
|
40 | return WSP.test(char);
|
41 | }
|
42 | function isAlpha(char) {
|
43 | return ALPHA.test(char);
|
44 | }
|
45 | function preprocessInput(input) {
|
46 | return input.replace(CRLF, '\n');
|
47 | }
|
48 |
|
49 | var EventedTokenizer = /** @class */ (function () {
|
50 | function EventedTokenizer(delegate, entityParser, mode) {
|
51 | if (mode === void 0) { mode = 'precompile'; }
|
52 | this.delegate = delegate;
|
53 | this.entityParser = entityParser;
|
54 | this.mode = mode;
|
55 | this.state = "beforeData" /* beforeData */;
|
56 | this.line = -1;
|
57 | this.column = -1;
|
58 | this.input = '';
|
59 | this.index = -1;
|
60 | this.tagNameBuffer = '';
|
61 | this.states = {
|
62 | beforeData: function () {
|
63 | var char = this.peek();
|
64 | if (char === '<' && !this.isIgnoredEndTag()) {
|
65 | this.transitionTo("tagOpen" /* tagOpen */);
|
66 | this.markTagStart();
|
67 | this.consume();
|
68 | }
|
69 | else {
|
70 | if (this.mode === 'precompile' && char === '\n') {
|
71 | var tag = this.tagNameBuffer.toLowerCase();
|
72 | if (tag === 'pre' || tag === 'textarea') {
|
73 | this.consume();
|
74 | }
|
75 | }
|
76 | this.transitionTo("data" /* data */);
|
77 | this.delegate.beginData();
|
78 | }
|
79 | },
|
80 | data: function () {
|
81 | var char = this.peek();
|
82 | var tag = this.tagNameBuffer;
|
83 | if (char === '<' && !this.isIgnoredEndTag()) {
|
84 | this.delegate.finishData();
|
85 | this.transitionTo("tagOpen" /* tagOpen */);
|
86 | this.markTagStart();
|
87 | this.consume();
|
88 | }
|
89 | else if (char === '&' && tag !== 'script' && tag !== 'style') {
|
90 | this.consume();
|
91 | this.delegate.appendToData(this.consumeCharRef() || '&');
|
92 | }
|
93 | else {
|
94 | this.consume();
|
95 | this.delegate.appendToData(char);
|
96 | }
|
97 | },
|
98 | tagOpen: function () {
|
99 | var char = this.consume();
|
100 | if (char === '!') {
|
101 | this.transitionTo("markupDeclarationOpen" /* markupDeclarationOpen */);
|
102 | }
|
103 | else if (char === '/') {
|
104 | this.transitionTo("endTagOpen" /* endTagOpen */);
|
105 | }
|
106 | else if (char === '@' || char === ':' || isAlpha(char)) {
|
107 | this.transitionTo("tagName" /* tagName */);
|
108 | this.tagNameBuffer = '';
|
109 | this.delegate.beginStartTag();
|
110 | this.appendToTagName(char);
|
111 | }
|
112 | },
|
113 | markupDeclarationOpen: function () {
|
114 | var char = this.consume();
|
115 | if (char === '-' && this.peek() === '-') {
|
116 | this.consume();
|
117 | this.transitionTo("commentStart" /* commentStart */);
|
118 | this.delegate.beginComment();
|
119 | }
|
120 | else {
|
121 | var maybeDoctype = char.toUpperCase() + this.input.substring(this.index, this.index + 6).toUpperCase();
|
122 | if (maybeDoctype === 'DOCTYPE') {
|
123 | this.consume();
|
124 | this.consume();
|
125 | this.consume();
|
126 | this.consume();
|
127 | this.consume();
|
128 | this.consume();
|
129 | this.transitionTo("doctype" /* doctype */);
|
130 | if (this.delegate.beginDoctype)
|
131 | this.delegate.beginDoctype();
|
132 | }
|
133 | }
|
134 | },
|
135 | doctype: function () {
|
136 | var char = this.consume();
|
137 | if (isSpace(char)) {
|
138 | this.transitionTo("beforeDoctypeName" /* beforeDoctypeName */);
|
139 | }
|
140 | },
|
141 | beforeDoctypeName: function () {
|
142 | var char = this.consume();
|
143 | if (isSpace(char)) {
|
144 | return;
|
145 | }
|
146 | else {
|
147 | this.transitionTo("doctypeName" /* doctypeName */);
|
148 | if (this.delegate.appendToDoctypeName)
|
149 | this.delegate.appendToDoctypeName(char.toLowerCase());
|
150 | }
|
151 | },
|
152 | doctypeName: function () {
|
153 | var char = this.consume();
|
154 | if (isSpace(char)) {
|
155 | this.transitionTo("afterDoctypeName" /* afterDoctypeName */);
|
156 | }
|
157 | else if (char === '>') {
|
158 | if (this.delegate.endDoctype)
|
159 | this.delegate.endDoctype();
|
160 | this.transitionTo("beforeData" /* beforeData */);
|
161 | }
|
162 | else {
|
163 | if (this.delegate.appendToDoctypeName)
|
164 | this.delegate.appendToDoctypeName(char.toLowerCase());
|
165 | }
|
166 | },
|
167 | afterDoctypeName: function () {
|
168 | var char = this.consume();
|
169 | if (isSpace(char)) {
|
170 | return;
|
171 | }
|
172 | else if (char === '>') {
|
173 | if (this.delegate.endDoctype)
|
174 | this.delegate.endDoctype();
|
175 | this.transitionTo("beforeData" /* beforeData */);
|
176 | }
|
177 | else {
|
178 | var nextSixChars = char.toUpperCase() + this.input.substring(this.index, this.index + 5).toUpperCase();
|
179 | var isPublic = nextSixChars.toUpperCase() === 'PUBLIC';
|
180 | var isSystem = nextSixChars.toUpperCase() === 'SYSTEM';
|
181 | if (isPublic || isSystem) {
|
182 | this.consume();
|
183 | this.consume();
|
184 | this.consume();
|
185 | this.consume();
|
186 | this.consume();
|
187 | this.consume();
|
188 | }
|
189 | if (isPublic) {
|
190 | this.transitionTo("afterDoctypePublicKeyword" /* afterDoctypePublicKeyword */);
|
191 | }
|
192 | else if (isSystem) {
|
193 | this.transitionTo("afterDoctypeSystemKeyword" /* afterDoctypeSystemKeyword */);
|
194 | }
|
195 | }
|
196 | },
|
197 | afterDoctypePublicKeyword: function () {
|
198 | var char = this.peek();
|
199 | if (isSpace(char)) {
|
200 | this.transitionTo("beforeDoctypePublicIdentifier" /* beforeDoctypePublicIdentifier */);
|
201 | this.consume();
|
202 | }
|
203 | else if (char === '"') {
|
204 | this.transitionTo("doctypePublicIdentifierDoubleQuoted" /* doctypePublicIdentifierDoubleQuoted */);
|
205 | this.consume();
|
206 | }
|
207 | else if (char === "'") {
|
208 | this.transitionTo("doctypePublicIdentifierSingleQuoted" /* doctypePublicIdentifierSingleQuoted */);
|
209 | this.consume();
|
210 | }
|
211 | else if (char === '>') {
|
212 | this.consume();
|
213 | if (this.delegate.endDoctype)
|
214 | this.delegate.endDoctype();
|
215 | this.transitionTo("beforeData" /* beforeData */);
|
216 | }
|
217 | },
|
218 | doctypePublicIdentifierDoubleQuoted: function () {
|
219 | var char = this.consume();
|
220 | if (char === '"') {
|
221 | this.transitionTo("afterDoctypePublicIdentifier" /* afterDoctypePublicIdentifier */);
|
222 | }
|
223 | else if (char === '>') {
|
224 | if (this.delegate.endDoctype)
|
225 | this.delegate.endDoctype();
|
226 | this.transitionTo("beforeData" /* beforeData */);
|
227 | }
|
228 | else {
|
229 | if (this.delegate.appendToDoctypePublicIdentifier)
|
230 | this.delegate.appendToDoctypePublicIdentifier(char);
|
231 | }
|
232 | },
|
233 | doctypePublicIdentifierSingleQuoted: function () {
|
234 | var char = this.consume();
|
235 | if (char === "'") {
|
236 | this.transitionTo("afterDoctypePublicIdentifier" /* afterDoctypePublicIdentifier */);
|
237 | }
|
238 | else if (char === '>') {
|
239 | if (this.delegate.endDoctype)
|
240 | this.delegate.endDoctype();
|
241 | this.transitionTo("beforeData" /* beforeData */);
|
242 | }
|
243 | else {
|
244 | if (this.delegate.appendToDoctypePublicIdentifier)
|
245 | this.delegate.appendToDoctypePublicIdentifier(char);
|
246 | }
|
247 | },
|
248 | afterDoctypePublicIdentifier: function () {
|
249 | var char = this.consume();
|
250 | if (isSpace(char)) {
|
251 | this.transitionTo("betweenDoctypePublicAndSystemIdentifiers" /* betweenDoctypePublicAndSystemIdentifiers */);
|
252 | }
|
253 | else if (char === '>') {
|
254 | if (this.delegate.endDoctype)
|
255 | this.delegate.endDoctype();
|
256 | this.transitionTo("beforeData" /* beforeData */);
|
257 | }
|
258 | else if (char === '"') {
|
259 | this.transitionTo("doctypeSystemIdentifierDoubleQuoted" /* doctypeSystemIdentifierDoubleQuoted */);
|
260 | }
|
261 | else if (char === "'") {
|
262 | this.transitionTo("doctypeSystemIdentifierSingleQuoted" /* doctypeSystemIdentifierSingleQuoted */);
|
263 | }
|
264 | },
|
265 | betweenDoctypePublicAndSystemIdentifiers: function () {
|
266 | var char = this.consume();
|
267 | if (isSpace(char)) {
|
268 | return;
|
269 | }
|
270 | else if (char === '>') {
|
271 | if (this.delegate.endDoctype)
|
272 | this.delegate.endDoctype();
|
273 | this.transitionTo("beforeData" /* beforeData */);
|
274 | }
|
275 | else if (char === '"') {
|
276 | this.transitionTo("doctypeSystemIdentifierDoubleQuoted" /* doctypeSystemIdentifierDoubleQuoted */);
|
277 | }
|
278 | else if (char === "'") {
|
279 | this.transitionTo("doctypeSystemIdentifierSingleQuoted" /* doctypeSystemIdentifierSingleQuoted */);
|
280 | }
|
281 | },
|
282 | doctypeSystemIdentifierDoubleQuoted: function () {
|
283 | var char = this.consume();
|
284 | if (char === '"') {
|
285 | this.transitionTo("afterDoctypeSystemIdentifier" /* afterDoctypeSystemIdentifier */);
|
286 | }
|
287 | else if (char === '>') {
|
288 | if (this.delegate.endDoctype)
|
289 | this.delegate.endDoctype();
|
290 | this.transitionTo("beforeData" /* beforeData */);
|
291 | }
|
292 | else {
|
293 | if (this.delegate.appendToDoctypeSystemIdentifier)
|
294 | this.delegate.appendToDoctypeSystemIdentifier(char);
|
295 | }
|
296 | },
|
297 | doctypeSystemIdentifierSingleQuoted: function () {
|
298 | var char = this.consume();
|
299 | if (char === "'") {
|
300 | this.transitionTo("afterDoctypeSystemIdentifier" /* afterDoctypeSystemIdentifier */);
|
301 | }
|
302 | else if (char === '>') {
|
303 | if (this.delegate.endDoctype)
|
304 | this.delegate.endDoctype();
|
305 | this.transitionTo("beforeData" /* beforeData */);
|
306 | }
|
307 | else {
|
308 | if (this.delegate.appendToDoctypeSystemIdentifier)
|
309 | this.delegate.appendToDoctypeSystemIdentifier(char);
|
310 | }
|
311 | },
|
312 | afterDoctypeSystemIdentifier: function () {
|
313 | var char = this.consume();
|
314 | if (isSpace(char)) {
|
315 | return;
|
316 | }
|
317 | else if (char === '>') {
|
318 | if (this.delegate.endDoctype)
|
319 | this.delegate.endDoctype();
|
320 | this.transitionTo("beforeData" /* beforeData */);
|
321 | }
|
322 | },
|
323 | commentStart: function () {
|
324 | var char = this.consume();
|
325 | if (char === '-') {
|
326 | this.transitionTo("commentStartDash" /* commentStartDash */);
|
327 | }
|
328 | else if (char === '>') {
|
329 | this.delegate.finishComment();
|
330 | this.transitionTo("beforeData" /* beforeData */);
|
331 | }
|
332 | else {
|
333 | this.delegate.appendToCommentData(char);
|
334 | this.transitionTo("comment" /* comment */);
|
335 | }
|
336 | },
|
337 | commentStartDash: function () {
|
338 | var char = this.consume();
|
339 | if (char === '-') {
|
340 | this.transitionTo("commentEnd" /* commentEnd */);
|
341 | }
|
342 | else if (char === '>') {
|
343 | this.delegate.finishComment();
|
344 | this.transitionTo("beforeData" /* beforeData */);
|
345 | }
|
346 | else {
|
347 | this.delegate.appendToCommentData('-');
|
348 | this.transitionTo("comment" /* comment */);
|
349 | }
|
350 | },
|
351 | comment: function () {
|
352 | var char = this.consume();
|
353 | if (char === '-') {
|
354 | this.transitionTo("commentEndDash" /* commentEndDash */);
|
355 | }
|
356 | else {
|
357 | this.delegate.appendToCommentData(char);
|
358 | }
|
359 | },
|
360 | commentEndDash: function () {
|
361 | var char = this.consume();
|
362 | if (char === '-') {
|
363 | this.transitionTo("commentEnd" /* commentEnd */);
|
364 | }
|
365 | else {
|
366 | this.delegate.appendToCommentData('-' + char);
|
367 | this.transitionTo("comment" /* comment */);
|
368 | }
|
369 | },
|
370 | commentEnd: function () {
|
371 | var char = this.consume();
|
372 | if (char === '>') {
|
373 | this.delegate.finishComment();
|
374 | this.transitionTo("beforeData" /* beforeData */);
|
375 | }
|
376 | else {
|
377 | this.delegate.appendToCommentData('--' + char);
|
378 | this.transitionTo("comment" /* comment */);
|
379 | }
|
380 | },
|
381 | tagName: function () {
|
382 | var char = this.consume();
|
383 | if (isSpace(char)) {
|
384 | this.transitionTo("beforeAttributeName" /* beforeAttributeName */);
|
385 | }
|
386 | else if (char === '/') {
|
387 | this.transitionTo("selfClosingStartTag" /* selfClosingStartTag */);
|
388 | }
|
389 | else if (char === '>') {
|
390 | this.delegate.finishTag();
|
391 | this.transitionTo("beforeData" /* beforeData */);
|
392 | }
|
393 | else {
|
394 | this.appendToTagName(char);
|
395 | }
|
396 | },
|
397 | endTagName: function () {
|
398 | var char = this.consume();
|
399 | if (isSpace(char)) {
|
400 | this.transitionTo("beforeAttributeName" /* beforeAttributeName */);
|
401 | this.tagNameBuffer = '';
|
402 | }
|
403 | else if (char === '/') {
|
404 | this.transitionTo("selfClosingStartTag" /* selfClosingStartTag */);
|
405 | this.tagNameBuffer = '';
|
406 | }
|
407 | else if (char === '>') {
|
408 | this.delegate.finishTag();
|
409 | this.transitionTo("beforeData" /* beforeData */);
|
410 | this.tagNameBuffer = '';
|
411 | }
|
412 | else {
|
413 | this.appendToTagName(char);
|
414 | }
|
415 | },
|
416 | beforeAttributeName: function () {
|
417 | var char = this.peek();
|
418 | if (isSpace(char)) {
|
419 | this.consume();
|
420 | return;
|
421 | }
|
422 | else if (char === '/') {
|
423 | this.transitionTo("selfClosingStartTag" /* selfClosingStartTag */);
|
424 | this.consume();
|
425 | }
|
426 | else if (char === '>') {
|
427 | this.consume();
|
428 | this.delegate.finishTag();
|
429 | this.transitionTo("beforeData" /* beforeData */);
|
430 | }
|
431 | else if (char === '=') {
|
432 | this.delegate.reportSyntaxError('attribute name cannot start with equals sign');
|
433 | this.transitionTo("attributeName" /* attributeName */);
|
434 | this.delegate.beginAttribute();
|
435 | this.consume();
|
436 | this.delegate.appendToAttributeName(char);
|
437 | }
|
438 | else {
|
439 | this.transitionTo("attributeName" /* attributeName */);
|
440 | this.delegate.beginAttribute();
|
441 | }
|
442 | },
|
443 | attributeName: function () {
|
444 | var char = this.peek();
|
445 | if (isSpace(char)) {
|
446 | this.transitionTo("afterAttributeName" /* afterAttributeName */);
|
447 | this.consume();
|
448 | }
|
449 | else if (char === '/') {
|
450 | this.delegate.beginAttributeValue(false);
|
451 | this.delegate.finishAttributeValue();
|
452 | this.consume();
|
453 | this.transitionTo("selfClosingStartTag" /* selfClosingStartTag */);
|
454 | }
|
455 | else if (char === '=') {
|
456 | this.transitionTo("beforeAttributeValue" /* beforeAttributeValue */);
|
457 | this.consume();
|
458 | }
|
459 | else if (char === '>') {
|
460 | this.delegate.beginAttributeValue(false);
|
461 | this.delegate.finishAttributeValue();
|
462 | this.consume();
|
463 | this.delegate.finishTag();
|
464 | this.transitionTo("beforeData" /* beforeData */);
|
465 | }
|
466 | else if (char === '"' || char === "'" || char === '<') {
|
467 | this.delegate.reportSyntaxError(char + ' is not a valid character within attribute names');
|
468 | this.consume();
|
469 | this.delegate.appendToAttributeName(char);
|
470 | }
|
471 | else {
|
472 | this.consume();
|
473 | this.delegate.appendToAttributeName(char);
|
474 | }
|
475 | },
|
476 | afterAttributeName: function () {
|
477 | var char = this.peek();
|
478 | if (isSpace(char)) {
|
479 | this.consume();
|
480 | return;
|
481 | }
|
482 | else if (char === '/') {
|
483 | this.delegate.beginAttributeValue(false);
|
484 | this.delegate.finishAttributeValue();
|
485 | this.consume();
|
486 | this.transitionTo("selfClosingStartTag" /* selfClosingStartTag */);
|
487 | }
|
488 | else if (char === '=') {
|
489 | this.consume();
|
490 | this.transitionTo("beforeAttributeValue" /* beforeAttributeValue */);
|
491 | }
|
492 | else if (char === '>') {
|
493 | this.delegate.beginAttributeValue(false);
|
494 | this.delegate.finishAttributeValue();
|
495 | this.consume();
|
496 | this.delegate.finishTag();
|
497 | this.transitionTo("beforeData" /* beforeData */);
|
498 | }
|
499 | else {
|
500 | this.delegate.beginAttributeValue(false);
|
501 | this.delegate.finishAttributeValue();
|
502 | this.transitionTo("attributeName" /* attributeName */);
|
503 | this.delegate.beginAttribute();
|
504 | this.consume();
|
505 | this.delegate.appendToAttributeName(char);
|
506 | }
|
507 | },
|
508 | beforeAttributeValue: function () {
|
509 | var char = this.peek();
|
510 | if (isSpace(char)) {
|
511 | this.consume();
|
512 | }
|
513 | else if (char === '"') {
|
514 | this.transitionTo("attributeValueDoubleQuoted" /* attributeValueDoubleQuoted */);
|
515 | this.delegate.beginAttributeValue(true);
|
516 | this.consume();
|
517 | }
|
518 | else if (char === "'") {
|
519 | this.transitionTo("attributeValueSingleQuoted" /* attributeValueSingleQuoted */);
|
520 | this.delegate.beginAttributeValue(true);
|
521 | this.consume();
|
522 | }
|
523 | else if (char === '>') {
|
524 | this.delegate.beginAttributeValue(false);
|
525 | this.delegate.finishAttributeValue();
|
526 | this.consume();
|
527 | this.delegate.finishTag();
|
528 | this.transitionTo("beforeData" /* beforeData */);
|
529 | }
|
530 | else {
|
531 | this.transitionTo("attributeValueUnquoted" /* attributeValueUnquoted */);
|
532 | this.delegate.beginAttributeValue(false);
|
533 | this.consume();
|
534 | this.delegate.appendToAttributeValue(char);
|
535 | }
|
536 | },
|
537 | attributeValueDoubleQuoted: function () {
|
538 | var char = this.consume();
|
539 | if (char === '"') {
|
540 | this.delegate.finishAttributeValue();
|
541 | this.transitionTo("afterAttributeValueQuoted" /* afterAttributeValueQuoted */);
|
542 | }
|
543 | else if (char === '&') {
|
544 | this.delegate.appendToAttributeValue(this.consumeCharRef() || '&');
|
545 | }
|
546 | else {
|
547 | this.delegate.appendToAttributeValue(char);
|
548 | }
|
549 | },
|
550 | attributeValueSingleQuoted: function () {
|
551 | var char = this.consume();
|
552 | if (char === "'") {
|
553 | this.delegate.finishAttributeValue();
|
554 | this.transitionTo("afterAttributeValueQuoted" /* afterAttributeValueQuoted */);
|
555 | }
|
556 | else if (char === '&') {
|
557 | this.delegate.appendToAttributeValue(this.consumeCharRef() || '&');
|
558 | }
|
559 | else {
|
560 | this.delegate.appendToAttributeValue(char);
|
561 | }
|
562 | },
|
563 | attributeValueUnquoted: function () {
|
564 | var char = this.peek();
|
565 | if (isSpace(char)) {
|
566 | this.delegate.finishAttributeValue();
|
567 | this.consume();
|
568 | this.transitionTo("beforeAttributeName" /* beforeAttributeName */);
|
569 | }
|
570 | else if (char === '/') {
|
571 | this.delegate.finishAttributeValue();
|
572 | this.consume();
|
573 | this.transitionTo("selfClosingStartTag" /* selfClosingStartTag */);
|
574 | }
|
575 | else if (char === '&') {
|
576 | this.consume();
|
577 | this.delegate.appendToAttributeValue(this.consumeCharRef() || '&');
|
578 | }
|
579 | else if (char === '>') {
|
580 | this.delegate.finishAttributeValue();
|
581 | this.consume();
|
582 | this.delegate.finishTag();
|
583 | this.transitionTo("beforeData" /* beforeData */);
|
584 | }
|
585 | else {
|
586 | this.consume();
|
587 | this.delegate.appendToAttributeValue(char);
|
588 | }
|
589 | },
|
590 | afterAttributeValueQuoted: function () {
|
591 | var char = this.peek();
|
592 | if (isSpace(char)) {
|
593 | this.consume();
|
594 | this.transitionTo("beforeAttributeName" /* beforeAttributeName */);
|
595 | }
|
596 | else if (char === '/') {
|
597 | this.consume();
|
598 | this.transitionTo("selfClosingStartTag" /* selfClosingStartTag */);
|
599 | }
|
600 | else if (char === '>') {
|
601 | this.consume();
|
602 | this.delegate.finishTag();
|
603 | this.transitionTo("beforeData" /* beforeData */);
|
604 | }
|
605 | else {
|
606 | this.transitionTo("beforeAttributeName" /* beforeAttributeName */);
|
607 | }
|
608 | },
|
609 | selfClosingStartTag: function () {
|
610 | var char = this.peek();
|
611 | if (char === '>') {
|
612 | this.consume();
|
613 | this.delegate.markTagAsSelfClosing();
|
614 | this.delegate.finishTag();
|
615 | this.transitionTo("beforeData" /* beforeData */);
|
616 | }
|
617 | else {
|
618 | this.transitionTo("beforeAttributeName" /* beforeAttributeName */);
|
619 | }
|
620 | },
|
621 | endTagOpen: function () {
|
622 | var char = this.consume();
|
623 | if (char === '@' || char === ':' || isAlpha(char)) {
|
624 | this.transitionTo("endTagName" /* endTagName */);
|
625 | this.tagNameBuffer = '';
|
626 | this.delegate.beginEndTag();
|
627 | this.appendToTagName(char);
|
628 | }
|
629 | }
|
630 | };
|
631 | this.reset();
|
632 | }
|
633 | EventedTokenizer.prototype.reset = function () {
|
634 | this.transitionTo("beforeData" /* beforeData */);
|
635 | this.input = '';
|
636 | this.tagNameBuffer = '';
|
637 | this.index = 0;
|
638 | this.line = 1;
|
639 | this.column = 0;
|
640 | this.delegate.reset();
|
641 | };
|
642 | EventedTokenizer.prototype.transitionTo = function (state) {
|
643 | this.state = state;
|
644 | };
|
645 | EventedTokenizer.prototype.tokenize = function (input) {
|
646 | this.reset();
|
647 | this.tokenizePart(input);
|
648 | this.tokenizeEOF();
|
649 | };
|
650 | EventedTokenizer.prototype.tokenizePart = function (input) {
|
651 | this.input += preprocessInput(input);
|
652 | while (this.index < this.input.length) {
|
653 | var handler = this.states[this.state];
|
654 | if (handler !== undefined) {
|
655 | handler.call(this);
|
656 | }
|
657 | else {
|
658 | throw new Error("unhandled state " + this.state);
|
659 | }
|
660 | }
|
661 | };
|
662 | EventedTokenizer.prototype.tokenizeEOF = function () {
|
663 | this.flushData();
|
664 | };
|
665 | EventedTokenizer.prototype.flushData = function () {
|
666 | if (this.state === 'data') {
|
667 | this.delegate.finishData();
|
668 | this.transitionTo("beforeData" /* beforeData */);
|
669 | }
|
670 | };
|
671 | EventedTokenizer.prototype.peek = function () {
|
672 | return this.input.charAt(this.index);
|
673 | };
|
674 | EventedTokenizer.prototype.consume = function () {
|
675 | var char = this.peek();
|
676 | this.index++;
|
677 | if (char === '\n') {
|
678 | this.line++;
|
679 | this.column = 0;
|
680 | }
|
681 | else {
|
682 | this.column++;
|
683 | }
|
684 | return char;
|
685 | };
|
686 | EventedTokenizer.prototype.consumeCharRef = function () {
|
687 | var endIndex = this.input.indexOf(';', this.index);
|
688 | if (endIndex === -1) {
|
689 | return;
|
690 | }
|
691 | var entity = this.input.slice(this.index, endIndex);
|
692 | var chars = this.entityParser.parse(entity);
|
693 | if (chars) {
|
694 | var count = entity.length;
|
695 | // consume the entity chars
|
696 | while (count) {
|
697 | this.consume();
|
698 | count--;
|
699 | }
|
700 | // consume the `;`
|
701 | this.consume();
|
702 | return chars;
|
703 | }
|
704 | };
|
705 | EventedTokenizer.prototype.markTagStart = function () {
|
706 | this.delegate.tagOpen();
|
707 | };
|
708 | EventedTokenizer.prototype.appendToTagName = function (char) {
|
709 | this.tagNameBuffer += char;
|
710 | this.delegate.appendToTagName(char);
|
711 | };
|
712 | EventedTokenizer.prototype.isIgnoredEndTag = function () {
|
713 | var tag = this.tagNameBuffer;
|
714 | return (tag === 'title' && this.input.substring(this.index, this.index + 8) !== '</title>') ||
|
715 | (tag === 'style' && this.input.substring(this.index, this.index + 8) !== '</style>') ||
|
716 | (tag === 'script' && this.input.substring(this.index, this.index + 9) !== '</script>');
|
717 | };
|
718 | return EventedTokenizer;
|
719 | }());
|
720 |
|
721 | var Tokenizer = /** @class */ (function () {
|
722 | function Tokenizer(entityParser, options) {
|
723 | if (options === void 0) { options = {}; }
|
724 | this.options = options;
|
725 | this.token = null;
|
726 | this.startLine = 1;
|
727 | this.startColumn = 0;
|
728 | this.tokens = [];
|
729 | this.tokenizer = new EventedTokenizer(this, entityParser, options.mode);
|
730 | this._currentAttribute = undefined;
|
731 | }
|
732 | Tokenizer.prototype.tokenize = function (input) {
|
733 | this.tokens = [];
|
734 | this.tokenizer.tokenize(input);
|
735 | return this.tokens;
|
736 | };
|
737 | Tokenizer.prototype.tokenizePart = function (input) {
|
738 | this.tokens = [];
|
739 | this.tokenizer.tokenizePart(input);
|
740 | return this.tokens;
|
741 | };
|
742 | Tokenizer.prototype.tokenizeEOF = function () {
|
743 | this.tokens = [];
|
744 | this.tokenizer.tokenizeEOF();
|
745 | return this.tokens[0];
|
746 | };
|
747 | Tokenizer.prototype.reset = function () {
|
748 | this.token = null;
|
749 | this.startLine = 1;
|
750 | this.startColumn = 0;
|
751 | };
|
752 | Tokenizer.prototype.current = function () {
|
753 | var token = this.token;
|
754 | if (token === null) {
|
755 | throw new Error('token was unexpectedly null');
|
756 | }
|
757 | if (arguments.length === 0) {
|
758 | return token;
|
759 | }
|
760 | for (var i = 0; i < arguments.length; i++) {
|
761 | if (token.type === arguments[i]) {
|
762 | return token;
|
763 | }
|
764 | }
|
765 | throw new Error("token type was unexpectedly " + token.type);
|
766 | };
|
767 | Tokenizer.prototype.push = function (token) {
|
768 | this.token = token;
|
769 | this.tokens.push(token);
|
770 | };
|
771 | Tokenizer.prototype.currentAttribute = function () {
|
772 | return this._currentAttribute;
|
773 | };
|
774 | Tokenizer.prototype.addLocInfo = function () {
|
775 | if (this.options.loc) {
|
776 | this.current().loc = {
|
777 | start: {
|
778 | line: this.startLine,
|
779 | column: this.startColumn
|
780 | },
|
781 | end: {
|
782 | line: this.tokenizer.line,
|
783 | column: this.tokenizer.column
|
784 | }
|
785 | };
|
786 | }
|
787 | this.startLine = this.tokenizer.line;
|
788 | this.startColumn = this.tokenizer.column;
|
789 | };
|
790 | // Data
|
791 | Tokenizer.prototype.beginDoctype = function () {
|
792 | this.push({
|
793 | type: "Doctype" /* Doctype */,
|
794 | name: '',
|
795 | });
|
796 | };
|
797 | Tokenizer.prototype.appendToDoctypeName = function (char) {
|
798 | this.current("Doctype" /* Doctype */).name += char;
|
799 | };
|
800 | Tokenizer.prototype.appendToDoctypePublicIdentifier = function (char) {
|
801 | var doctype = this.current("Doctype" /* Doctype */);
|
802 | if (doctype.publicIdentifier === undefined) {
|
803 | doctype.publicIdentifier = char;
|
804 | }
|
805 | else {
|
806 | doctype.publicIdentifier += char;
|
807 | }
|
808 | };
|
809 | Tokenizer.prototype.appendToDoctypeSystemIdentifier = function (char) {
|
810 | var doctype = this.current("Doctype" /* Doctype */);
|
811 | if (doctype.systemIdentifier === undefined) {
|
812 | doctype.systemIdentifier = char;
|
813 | }
|
814 | else {
|
815 | doctype.systemIdentifier += char;
|
816 | }
|
817 | };
|
818 | Tokenizer.prototype.endDoctype = function () {
|
819 | this.addLocInfo();
|
820 | };
|
821 | Tokenizer.prototype.beginData = function () {
|
822 | this.push({
|
823 | type: "Chars" /* Chars */,
|
824 | chars: ''
|
825 | });
|
826 | };
|
827 | Tokenizer.prototype.appendToData = function (char) {
|
828 | this.current("Chars" /* Chars */).chars += char;
|
829 | };
|
830 | Tokenizer.prototype.finishData = function () {
|
831 | this.addLocInfo();
|
832 | };
|
833 | // Comment
|
834 | Tokenizer.prototype.beginComment = function () {
|
835 | this.push({
|
836 | type: "Comment" /* Comment */,
|
837 | chars: ''
|
838 | });
|
839 | };
|
840 | Tokenizer.prototype.appendToCommentData = function (char) {
|
841 | this.current("Comment" /* Comment */).chars += char;
|
842 | };
|
843 | Tokenizer.prototype.finishComment = function () {
|
844 | this.addLocInfo();
|
845 | };
|
846 | // Tags - basic
|
847 | Tokenizer.prototype.tagOpen = function () { };
|
848 | Tokenizer.prototype.beginStartTag = function () {
|
849 | this.push({
|
850 | type: "StartTag" /* StartTag */,
|
851 | tagName: '',
|
852 | attributes: [],
|
853 | selfClosing: false
|
854 | });
|
855 | };
|
856 | Tokenizer.prototype.beginEndTag = function () {
|
857 | this.push({
|
858 | type: "EndTag" /* EndTag */,
|
859 | tagName: ''
|
860 | });
|
861 | };
|
862 | Tokenizer.prototype.finishTag = function () {
|
863 | this.addLocInfo();
|
864 | };
|
865 | Tokenizer.prototype.markTagAsSelfClosing = function () {
|
866 | this.current("StartTag" /* StartTag */).selfClosing = true;
|
867 | };
|
868 | // Tags - name
|
869 | Tokenizer.prototype.appendToTagName = function (char) {
|
870 | this.current("StartTag" /* StartTag */, "EndTag" /* EndTag */).tagName += char;
|
871 | };
|
872 | // Tags - attributes
|
873 | Tokenizer.prototype.beginAttribute = function () {
|
874 | this._currentAttribute = ['', '', false];
|
875 | };
|
876 | Tokenizer.prototype.appendToAttributeName = function (char) {
|
877 | this.currentAttribute()[0] += char;
|
878 | };
|
879 | Tokenizer.prototype.beginAttributeValue = function (isQuoted) {
|
880 | this.currentAttribute()[2] = isQuoted;
|
881 | };
|
882 | Tokenizer.prototype.appendToAttributeValue = function (char) {
|
883 | this.currentAttribute()[1] += char;
|
884 | };
|
885 | Tokenizer.prototype.finishAttributeValue = function () {
|
886 | this.current("StartTag" /* StartTag */).attributes.push(this._currentAttribute);
|
887 | };
|
888 | Tokenizer.prototype.reportSyntaxError = function (message) {
|
889 | this.current().syntaxError = message;
|
890 | };
|
891 | return Tokenizer;
|
892 | }());
|
893 |
|
894 | function tokenize(input, options) {
|
895 | var tokenizer = new Tokenizer(new EntityParser(namedCharRefs), options);
|
896 | return tokenizer.tokenize(input);
|
897 | }
|
898 |
|
899 | export { namedCharRefs as HTML5NamedCharRefs, EntityParser, EventedTokenizer, Tokenizer, tokenize };
|
900 | //# sourceMappingURL=index.js.map |
\ | No newline at end of file |