@limetech/lime-elements 40.5.4 → 40.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/cjs/{index-ETPz91V5.js → index-zZvs6xK-.js} +9382 -9504
  3. package/dist/cjs/lime-elements.cjs.js +1 -1
  4. package/dist/cjs/limel-file-viewer.cjs.entry.js +1 -1
  5. package/dist/cjs/limel-markdown.cjs.entry.js +28 -4
  6. package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +2 -2
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/markdown-exporter-9p7d3Q76.js +6210 -0
  9. package/dist/cjs/{markdown-parser-YH5HSSgF.js → markdown-parser-Cgv5Y9Z4.js} +579 -848
  10. package/dist/collection/components/markdown/markdown-exporter.js +186 -0
  11. package/dist/collection/components/markdown/markdown-parser.js +2 -3
  12. package/dist/collection/components/markdown/markdown.js +54 -2
  13. package/dist/esm/{index-CbciMfiU.js → index-BN64nlbO.js} +9369 -9505
  14. package/dist/esm/lime-elements.js +1 -1
  15. package/dist/esm/limel-file-viewer.entry.js +1 -1
  16. package/dist/esm/limel-markdown.entry.js +28 -4
  17. package/dist/esm/limel-prosemirror-adapter.entry.js +2 -2
  18. package/dist/esm/loader.js +1 -1
  19. package/dist/esm/markdown-exporter--3_MaqwD.js +6208 -0
  20. package/dist/esm/{markdown-parser-DrxxGLF5.js → markdown-parser-DCf-3dKZ.js} +506 -791
  21. package/dist/lime-elements/lime-elements.esm.js +1 -1
  22. package/dist/lime-elements/{p-05afb316.entry.js → p-20658306.entry.js} +1 -1
  23. package/dist/lime-elements/p-BPzhuHcl.js +1 -0
  24. package/dist/lime-elements/p-CC4Usa-Q.js +7 -0
  25. package/dist/lime-elements/p-_UXAljNc.js +1 -0
  26. package/dist/lime-elements/p-dc9cd793.entry.js +1 -0
  27. package/dist/lime-elements/{p-10594468.entry.js → p-dd62042a.entry.js} +1 -1
  28. package/dist/types/components/markdown/markdown-exporter.d.ts +15 -0
  29. package/dist/types/components/markdown/markdown.d.ts +19 -0
  30. package/dist/types/components.d.ts +10 -0
  31. package/dist/types/global/shared-types/custom-element.types.d.ts +25 -0
  32. package/package.json +7 -1
  33. package/dist/lime-elements/p-6d5b23ad.entry.js +0 -1
  34. package/dist/lime-elements/p-C9xHOCE_.js +0 -7
  35. package/dist/lime-elements/p-DMNtoJ8I.js +0 -1
@@ -0,0 +1,7 @@
1
+ import{g as e}from"./p-B85MJLTf.js";import{s as t,p as n,f as r,g as i,v as o,h as a,i as s,j as l,k as c,E as u,l as h,m as f,n as d,w as p,z as g,o as m,q as b,t as k,x as y,B as v,u as E,a as w,b as S,r as T,d as x}from"./p-_UXAljNc.js";function C(e,t){return function(e){try{let t;return t=function(e){return e.startsWith("//")}(e)?new URL(window.location.protocol+e):new URL(e,window.location.origin),t.protocol.startsWith("http")&&t.hostname!==window.location.hostname}catch(e){return!1}}(e)?{href:e,title:t,target:"_blank",rel:"noopener noreferrer",referrerpolicy:"noreferrer"}:{href:e,title:t,target:null,rel:null,referrerpolicy:null}}const A={};function D(e){return R(e,"boolean"!=typeof A.includeImageAlt||A.includeImageAlt,"boolean"!=typeof A.includeHtml||A.includeHtml)}function R(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return _(e.children,t,n)}return Array.isArray(e)?_(e,t,n):""}function _(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=R(e[i],t,n);return r.join("")}const L={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"⁡",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"⁣",InvisibleTimes:"⁢",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",Nfr:"𝔑",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:"  ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"​",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"⁡",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",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:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"⁣",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",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:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"­",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"‍",zwnj:"‌"},N={}.hasOwnProperty;function I(e){return!!N.call(L,e)&&L[e]}function O(e,t,n,r){const i=e.length;let o,a=0;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function M(e,t){return e.length>0?(O(e,e.length,0,t),e):t}const P={}.hasOwnProperty;function q(e){const t={};let n=-1;for(;++n<e.length;)F(t,e[n]);return t}function F(e,t){let n;for(n in t){const r=(P.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let o;if(i)for(o in i){P.call(r,o)||(r[o]=[]);const e=i[o];B(r[o],Array.isArray(e)?e:e?[e]:[])}}}function B(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);O(e,0,0,r)}function U(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCharCode(n)}function H(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const z=te(/\p{P}/u),j=te(/[A-Za-z]/),V=te(/[\dA-Za-z]/),G=te(/[#-'*+\--9=?A-Z^-~]/);function $(e){return null!==e&&(e<32||127===e)}const Y=te(/\d/),W=te(/[\dA-Fa-f]/),Q=te(/[!-/:-@[-`{-~]/);function X(e){return null!==e&&e<-2}function K(e){return null!==e&&(e<0||32===e)}function Z(e){return-2===e||-1===e||32===e}function J(e){return Q(e)||z(e)}const ee=te(/\s/);function te(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function ne(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(37===o&&V(e.charCodeAt(n+1))&&V(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(a=String.fromCharCode(o,t),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function re(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return function(r){return Z(r)?(e.enter(n),a(r)):t(r)};function a(r){return Z(r)&&o++<i?(e.consume(r),a):(e.exit(n),t(r))}}const ie={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(n){if(null!==n)return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),re(e,t,"linePrefix");e.consume(n)}),(function(t){return e.enter("paragraph"),r(t)}));let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,i(t)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):X(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),i)}}},oe={tokenize:function(e){const t=this,n=[];let r,i,o,a=0;return s;function s(r){if(a<n.length){const i=n[a];return t.containerState=i[1],e.attempt(i[0].continuation,l,c)(r)}return c(r)}function l(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&k();const n=t.events.length;let i,o=n;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){i=t.events[o][1].end;break}b(a);let s=n;for(;s<t.events.length;)t.events[s][1].end=Object.assign({},i),s++;return O(t.events,o+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(i){if(a===n.length){if(!r)return f(i);if(r.currentConstruct&&r.currentConstruct.concrete)return p(i);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ae,u,h)(i)}function u(e){return r&&k(),b(a),f(e)}function h(e){return t.parser.lazy[t.now().line]=a!==n.length,o=t.now().offset,p(e)}function f(n){return t.containerState={},e.attempt(ae,d,p)(n)}function d(e){return a++,n.push([t.currentConstruct,t.containerState]),f(e)}function p(n){return null===n?(r&&k(),b(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:r}),g(n))}function g(n){return null===n?(m(e.exit("chunkFlow"),!0),b(0),void e.consume(n)):X(n)?(e.consume(n),m(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(n),g)}function m(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=i,i&&(i.next=e),i=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<o&&(!r.events[e][1].end||r.events[e][1].end.offset>o))return;const n=t.events.length;let i,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(i){s=t.events[l][1].end;break}i=!0}for(b(a),e=n;e<t.events.length;)t.events[e][1].end=Object.assign({},s),e++;O(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function b(r){let i=n.length;for(;i-- >r;){const r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function k(){r.write([null]),i=void 0,r=void 0,t.containerState._closeFlow=void 0}}},ae={tokenize:function(e,t,n){return re(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function se(e){return null===e||K(e)||ee(e)?1:J(e)?2:void 0}function le(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const ce={name:"attention",tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=se(r);let o;return function(t){return o=t,e.enter("attentionSequence"),a(t)};function a(s){if(s===o)return e.consume(s),a;const l=e.exit("attentionSequence"),c=se(s),u=!c||2===c&&i||n.includes(s),h=!i||2===i&&c||n.includes(r);return l._open=Boolean(42===o?u:u&&(i||!h)),l._close=Boolean(42===o?h:h&&(c||!u)),t(s)}},resolveAll:function(e,t){let n,r,i,o,a,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const h=Object.assign({},e[n][1].end),f=Object.assign({},e[u][1].start);ue(h,-s),ue(f,s),o={type:s>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},e[n][1].end)},a={type:s>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[u][1].start),end:f},i={type:s>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[u][1].start)},r={type:s>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},a.end)},e[n][1].end=Object.assign({},o.start),e[u][1].start=Object.assign({},a.end),l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=M(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=M(l,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",i,t]]),l=M(l,le(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=M(l,[["exit",i,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=M(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,O(e,n-1,u-n+3,l),u=n+l.length-c-2;break}for(u=-1;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e}};function ue(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const he={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return j(t)?(e.consume(t),o):l(t)}function o(e){return 43===e||45===e||46===e||V(e)?(r=1,a(e)):l(e)}function a(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||V(t))&&r++<32?(e.consume(t),a):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||$(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):G(t)?(e.consume(t),l):n(t)}function c(e){return V(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):h(n)}function h(t){if((45===t||V(t))&&r++<63){const n=45===t?h:u;return e.consume(t),n}return n(t)}}},fe={tokenize:function(e,t,n){return function(t){return Z(t)?re(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||X(e)?t(e):n(e)}},partial:!0},de={name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return Z(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}},continuation:{tokenize:function(e,t,n){const r=this;return function(t){return Z(t)?re(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):i(t)};function i(r){return e.attempt(de,t,n)(r)}}},exit:function(e){e.exit("blockQuote")}},pe={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return Q(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},ge={name:"characterReference",tokenize:function(e,t,n){const r=this;let i,o,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,o=V,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,o=W,c):(e.enter("characterReferenceValue"),i=7,o=Y,c(t))}function c(s){if(59===s&&a){const i=e.exit("characterReferenceValue");return o!==V||I(r.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return o(s)&&a++<i?(e.consume(s),c):n(s)}}},me={tokenize:function(e,t,n){const r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0},be={name:"codeFenced",tokenize:function(e,t,n){const r=this,i={tokenize:function(e,t,n){let i=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a};function a(t){return e.enter("codeFencedFence"),Z(t)?re(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===o?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===o?(i++,e.consume(t),c):i>=s?(e.exit("codeFencedFenceSequence"),Z(t)?re(e,u,"whitespace")(t):u(t)):n(t)}function u(r){return null===r||X(r)?(e.exit("codeFencedFence"),t(r)):n(r)}},partial:!0};let o,a=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return a=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===o?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),Z(t)?re(e,c,"whitespace")(t):c(t))}function c(n){return null===n||X(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(me,d,k)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||X(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):Z(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),re(e,h,"whitespace")(t)):96===t&&t===o?n(t):(e.consume(t),u)}function h(t){return null===t||X(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),f(t))}function f(t){return null===t||X(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===o?n(t):(e.consume(t),f)}function d(t){return e.attempt(i,k,p)(t)}function p(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),g}function g(t){return a>0&&Z(t)?re(e,m,"linePrefix",a+1)(t):m(t)}function m(t){return null===t||X(t)?e.check(me,d,k)(t):(e.enter("codeFlowValue"),b(t))}function b(t){return null===t||X(t)?(e.exit("codeFlowValue"),m(t)):(e.consume(t),b)}function k(n){return e.exit("codeFenced"),t(n)}},concrete:!0},ke={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),re(e,i,"linePrefix",5)(t)};function i(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return null===t?s(t):X(t)?e.attempt(ye,o,s)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||X(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),a)}function s(n){return e.exit("codeIndented"),t(n)}}},ye={tokenize:function(e,t,n){const r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):X(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):re(e,o,"linePrefix",5)(t)}function o(e){const o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):X(e)?i(e):n(e)}},partial:!0},ve={name:"codeText",tokenize:function(e,t,n){let r,i,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),o++,a):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(i=e.enter("codeTextSequence"),r=0,c(t)):X(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||X(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(i.type="codeTextData",l(n))}},resolve:function(e){let t,n,r=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}for(t=i-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}};function Ee(e){const t={};let n,r,i,o,a,s,l,c=-1;for(;++c<e.length;){for(;c in t;)c=t[c];if(n=e[c],c&&"chunkFlow"===n[1].type&&"listItemPrefix"===e[c-1][1].type&&(s=n[1]._tokenizer.events,i=0,i<s.length&&"lineEndingBlank"===s[i][1].type&&(i+=2),i<s.length&&"content"===s[i][1].type))for(;++i<s.length&&"content"!==s[i][1].type;)"chunkText"===s[i][1].type&&(s[i][1]._isInFirstContentOfListItem=!0,i++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,we(e,c)),c=t[c],l=!0);else if(n[1]._container){for(i=c,r=void 0;i--&&(o=e[i],"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type);)"enter"===o[0]&&(r&&(e[r][1].type="lineEndingBlank"),o[1].type="lineEnding",r=i);r&&(n[1].end=Object.assign({},e[r][1].start),a=e.slice(r,c),a.unshift(n),O(e,r,c-r+1,a))}}return!l}function we(e,t){const n=e[t][1],r=e[t][2];let i=t-1;const o=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,l=[],c={};let u,h,f=-1,d=n,p=0,g=0;const m=[g];for(;d;){for(;e[++i][1]!==d;);o.push(i),d._tokenizer||(u=r.sliceStream(d),d.next||u.push(null),h&&a.defineSkip(d.start),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),h=d,d=d.next}for(d=n;++f<s.length;)"exit"===s[f][0]&&"enter"===s[f-1][0]&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(g=f+1,m.push(g),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(a.events=[],d?(d._tokenizer=void 0,d.previous=void 0):m.pop(),f=m.length;f--;){const t=s.slice(m[f],m[f+1]),n=o.pop();l.unshift([n,n+t.length-1]),O(e,n,2,t)}for(f=-1;++f<l.length;)c[p+l[f][0]]=p+l[f][1],p+=l[f][1]-l[f][0]-1;return c}const Se={tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):X(t)?e.check(Te,o,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}},resolve:function(e){return Ee(e),e}},Te={tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),re(e,i,"linePrefix")};function i(i){if(null===i||X(i))return n(i);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}},partial:!0};function xe(e,t,n,r,i,o,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){return 60===t?(e.enter(r),e.enter(i),e.enter(o),e.consume(t),e.exit(o),h):null===t||32===t||41===t||$(t)?n(t):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),p(t))};function h(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),f(n))}function f(t){return 62===t?(e.exit("chunkString"),e.exit(s),h(t)):null===t||60===t||X(t)?n(t):(e.consume(t),92===t?d:f)}function d(t){return 60===t||62===t||92===t?(e.consume(t),f):f(t)}function p(i){return u||null!==i&&41!==i&&!K(i)?u<c&&40===i?(e.consume(i),u++,p):41===i?(e.consume(i),u--,p):null===i||32===i||40===i||$(i)?n(i):(e.consume(i),92===i?g:p):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(i))}function g(t){return 40===t||41===t||92===t?(e.consume(t),p):p(t)}}function Ce(e,t,n,r,i,o){const a=this;let s,l=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(o),c};function c(h){return l>999||null===h||91===h||93===h&&!s||94===h&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(h):93===h?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):X(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(h))}function u(t){return null===t||91===t||93===t||X(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!Z(t)),92===t?h:u)}function h(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function Ae(e,t,n,r,i,o){let a;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),a=40===t?41:t,s):n(t)};function s(n){return n===a?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(o),l(n))}function l(t){return t===a?(e.exit(o),s(a)):null===t?n(t):X(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),re(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||X(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===a||92===t?(e.consume(t),c):c(t)}}function De(e,t){let n;return function r(i){return X(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Z(i)?re(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Re={name:"definition",tokenize:function(e,t,n){const r=this;let i;return function(t){return e.enter("definition"),function(t){return Ce.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return i=H(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return K(t)?De(e,s)(t):s(t)}function s(t){return xe(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(_e,c,c)(t)}function c(t){return Z(t)?re(e,u,"whitespace")(t):u(t)}function u(o){return null===o||X(o)?(e.exit("definition"),r.parser.defined.push(i),t(o)):n(o)}}},_e={tokenize:function(e,t,n){return function(t){return K(t)?De(e,r)(t):n(t)};function r(t){return Ae(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return Z(t)?re(e,o,"whitespace")(t):o(t)}function o(e){return null===e||X(e)?t(e):n(e)}},partial:!0},Le={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return X(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},Ne={name:"headingAtx",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),i(t)}(t)};function i(t){return 35===t&&r++<6?(e.consume(t),i):null===t||K(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||X(n)?(e.exit("atxHeading"),t(n)):Z(n)?re(e,o,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),o(t))}function s(t){return null===t||35===t||K(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),s)}},resolve:function(e,t){let n,r,i=e.length-2,o=3;return"whitespace"===e[o][1].type&&(o+=2),i-2>o&&"whitespace"===e[i][1].type&&(i-=2),"atxHeadingSequence"===e[i][1].type&&(o===i-1||i-4>o&&"whitespace"===e[i-2][1].type)&&(i-=o+1===i?2:4),i>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[i][1].end},r={type:"chunkText",start:e[o][1].start,end:e[i][1].end,contentType:"text"},O(e,o,i-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e}},Ie=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Oe=["pre","script","style","textarea"],Me={name:"htmlFlow",tokenize:function(e,t,n){const r=this;let i,o,a,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),o=!0,d):63===s?(e.consume(s),i=3,r.interrupt?t:O):j(s)?(e.consume(s),a=String.fromCharCode(s),p):n(s)}function u(o){return 45===o?(e.consume(o),i=2,h):91===o?(e.consume(o),i=5,s=0,f):j(o)?(e.consume(o),i=4,r.interrupt?t:O):n(o)}function h(i){return 45===i?(e.consume(i),r.interrupt?t:O):n(i)}function f(i){return i==="CDATA[".charCodeAt(s++)?(e.consume(i),6===s?r.interrupt?t:C:f):n(i)}function d(t){return j(t)?(e.consume(t),a=String.fromCharCode(t),p):n(t)}function p(s){if(null===s||47===s||62===s||K(s)){const l=47===s,c=a.toLowerCase();return l||o||!Oe.includes(c)?Ie.includes(a.toLowerCase())?(i=6,l?(e.consume(s),g):r.interrupt?t(s):C(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):o?m(s):b(s)):(i=1,r.interrupt?t(s):C(s))}return 45===s||V(s)?(e.consume(s),a+=String.fromCharCode(s),p):n(s)}function g(i){return 62===i?(e.consume(i),r.interrupt?t:C):n(i)}function m(t){return Z(t)?(e.consume(t),m):T(t)}function b(t){return 47===t?(e.consume(t),T):58===t||95===t||j(t)?(e.consume(t),k):Z(t)?(e.consume(t),b):T(t)}function k(t){return 45===t||46===t||58===t||95===t||V(t)?(e.consume(t),k):y(t)}function y(t){return 61===t?(e.consume(t),v):Z(t)?(e.consume(t),y):b(t)}function v(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,E):Z(t)?(e.consume(t),v):w(t)}function E(t){return t===l?(e.consume(t),l=null,S):null===t||X(t)?n(t):(e.consume(t),E)}function w(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||K(t)?y(t):(e.consume(t),w)}function S(e){return 47===e||62===e||Z(e)?b(e):n(e)}function T(t){return 62===t?(e.consume(t),x):n(t)}function x(t){return null===t||X(t)?C(t):Z(t)?(e.consume(t),x):n(t)}function C(t){return 45===t&&2===i?(e.consume(t),_):60===t&&1===i?(e.consume(t),L):62===t&&4===i?(e.consume(t),M):63===t&&3===i?(e.consume(t),O):93===t&&5===i?(e.consume(t),I):!X(t)||6!==i&&7!==i?null===t||X(t)?(e.exit("htmlFlowData"),A(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(Pe,P,A)(t))}function A(t){return e.check(qe,D,P)(t)}function D(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),R}function R(t){return null===t||X(t)?A(t):(e.enter("htmlFlowData"),C(t))}function _(t){return 45===t?(e.consume(t),O):C(t)}function L(t){return 47===t?(e.consume(t),a="",N):C(t)}function N(t){if(62===t){const n=a.toLowerCase();return Oe.includes(n)?(e.consume(t),M):C(t)}return j(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),N):C(t)}function I(t){return 93===t?(e.consume(t),O):C(t)}function O(t){return 62===t?(e.consume(t),M):45===t&&2===i?(e.consume(t),O):C(t)}function M(t){return null===t||X(t)?(e.exit("htmlFlowData"),P(t)):(e.consume(t),M)}function P(n){return e.exit("htmlFlow"),t(n)}},resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e},concrete:!0},Pe={tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(fe,t,n)}},partial:!0},qe={tokenize:function(e,t,n){const r=this;return function(t){return X(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0},Fe={name:"htmlText",tokenize:function(e,t,n){const r=this;let i,o,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),v):63===t?(e.consume(t),k):j(t)?(e.consume(t),S):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),o=0,d):j(t)?(e.consume(t),b):n(t)}function c(t){return 45===t?(e.consume(t),f):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),h):X(t)?(a=u,N(t)):(e.consume(t),u)}function h(t){return 45===t?(e.consume(t),f):u(t)}function f(e){return 62===e?L(e):45===e?h(e):u(e)}function d(t){return t==="CDATA[".charCodeAt(o++)?(e.consume(t),6===o?p:d):n(t)}function p(t){return null===t?n(t):93===t?(e.consume(t),g):X(t)?(a=p,N(t)):(e.consume(t),p)}function g(t){return 93===t?(e.consume(t),m):p(t)}function m(t){return 62===t?L(t):93===t?(e.consume(t),m):p(t)}function b(t){return null===t||62===t?L(t):X(t)?(a=b,N(t)):(e.consume(t),b)}function k(t){return null===t?n(t):63===t?(e.consume(t),y):X(t)?(a=k,N(t)):(e.consume(t),k)}function y(e){return 62===e?L(e):k(e)}function v(t){return j(t)?(e.consume(t),E):n(t)}function E(t){return 45===t||V(t)?(e.consume(t),E):w(t)}function w(t){return X(t)?(a=w,N(t)):Z(t)?(e.consume(t),w):L(t)}function S(t){return 45===t||V(t)?(e.consume(t),S):47===t||62===t||K(t)?T(t):n(t)}function T(t){return 47===t?(e.consume(t),L):58===t||95===t||j(t)?(e.consume(t),x):X(t)?(a=T,N(t)):Z(t)?(e.consume(t),T):L(t)}function x(t){return 45===t||46===t||58===t||95===t||V(t)?(e.consume(t),x):C(t)}function C(t){return 61===t?(e.consume(t),A):X(t)?(a=C,N(t)):Z(t)?(e.consume(t),C):T(t)}function A(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),i=t,D):X(t)?(a=A,N(t)):Z(t)?(e.consume(t),A):(e.consume(t),R)}function D(t){return t===i?(e.consume(t),i=void 0,_):null===t?n(t):X(t)?(a=D,N(t)):(e.consume(t),D)}function R(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||K(t)?T(t):(e.consume(t),R)}function _(e){return 47===e||62===e||K(e)?T(e):n(e)}function L(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function N(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),I}function I(t){return Z(t)?re(e,O,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):O(t)}function O(t){return e.enter("htmlTextData"),a(t)}}},Be={name:"labelEnd",tokenize:function(e,t,n){const r=this;let i,o,a=r.events.length;for(;a--;)if(("labelImage"===r.events[a][1].type||"labelLink"===r.events[a][1].type)&&!r.events[a][1]._balanced){i=r.events[a][1];break}return function(t){return i?i._inactive?u(t):(o=r.parser.defined.includes(H(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s):n(t)};function s(t){return 40===t?e.attempt(Ue,c,o?c:u)(t):91===t?e.attempt(He,c,o?l:u)(t):o?c(t):u(t)}function l(t){return e.attempt(ze,c,u)(t)}function c(e){return t(e)}function u(e){return i._balanced=!0,n(e)}},resolveTo:function(e,t){let n,r,i,o,a=e.length,s=0;for(;a--;)if(n=e[a][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[a][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[a][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=a,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(i=a);const l={type:"labelLink"===e[r][1].type?"link":"image",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[r][1].start),end:Object.assign({},e[i][1].end)},u={type:"labelText",start:Object.assign({},e[r+s+2][1].end),end:Object.assign({},e[i-2][1].start)};return o=[["enter",l,t],["enter",c,t]],o=M(o,e.slice(r+1,r+s+3)),o=M(o,[["enter",u,t]]),o=M(o,le(t.parser.constructs.insideSpan.null,e.slice(r+s+4,i-3),t)),o=M(o,[["exit",u,t],e[i-2],e[i-1],["exit",c,t]]),o=M(o,e.slice(i+1)),o=M(o,[["exit",l,t]]),O(e,r,e.length,o),e},resolveAll:function(e){let t=-1;for(;++t<e.length;){const n=e[t][1];"labelImage"!==n.type&&"labelLink"!==n.type&&"labelEnd"!==n.type||(e.splice(t+1,"labelImage"===n.type?4:2),n.type="data",t++)}return e}},Ue={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return K(t)?De(e,i)(t):i(t)}function i(t){return 41===t?c(t):xe(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return K(t)?De(e,s)(t):c(t)}function a(e){return n(e)}function s(t){return 34===t||39===t||40===t?Ae(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return K(t)?De(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},He={tokenize:function(e,t,n){const r=this;return function(t){return Ce.call(r,e,i,o,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(H(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},ze={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},je={name:"labelStartImage",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:Be.resolveAll},Ve={name:"labelStartLink",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}},resolveAll:Be.resolveAll},Ge={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),re(e,t,"linePrefix")}}},$e={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,o(e)}(t)};function o(o){return o===r?(e.enter("thematicBreakSequence"),a(o)):i>=3&&(null===o||X(o))?(e.exit("thematicBreak"),t(o)):n(o)}function a(t){return t===r?(e.consume(t),i++,a):(e.exit("thematicBreakSequence"),Z(t)?re(e,o,"whitespace")(t):o(t))}}},Ye={name:"list",tokenize:function(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,a=0;return function(t){const i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:Y(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check($e,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return Y(t)&&++a<10?(e.consume(t),s):(!r.interrupt||a<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(fe,r.interrupt?n:c,e.attempt(We,h,u))}function c(e){return r.containerState.initialBlankLine=!0,o++,h(e)}function u(t){return Z(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),h):n(t)}function h(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}},continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(fe,(function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,re(e,t,"listItemIndent",r.containerState.size+1)(n)}),(function(n){return r.containerState.furtherBlankLines||!Z(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Qe,t,i)(n))}));function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,re(e,e.attempt(Ye,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)}},We={tokenize:function(e,t,n){const r=this;return re(e,(function(e){const i=r.events[r.events.length-1];return!Z(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)},partial:!0},Qe={tokenize:function(e,t,n){const r=this;return re(e,(function(e){const i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)},partial:!0},Xe={name:"setextUnderline",tokenize:function(e,t,n){const r=this;let i;return function(t){let a,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){a="paragraph"===r.events[s][1].type;break}return r.parser.lazy[r.now().line]||!r.interrupt&&!a?n(t):(e.enter("setextHeadingLine"),i=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t))};function o(t){return t===i?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),Z(t)?re(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||X(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}},resolveTo:function(e,t){let n,r,i,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),i||"definition"!==e[o][1].type||(i=o);const a={type:"setextHeading",start:Object.assign({},e[r][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",a,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end=Object.assign({},e[i][1].end)):e[n][1]=a,e.push(["exit",a,t]),e}},Ke={tokenize:function(e){const t=this,n=e.attempt(fe,(function(r){if(null!==r)return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n;e.consume(r)}),e.attempt(this.parser.constructs.flowInitial,r,re(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Se,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}},Ze={resolveAll:nt()},Je=tt("string"),et=tt("text");function tt(e){return{tokenize:function(t){const n=this,r=this.parser.constructs[e],i=t.attempt(r,o,a);return o;function o(e){return l(e)?i(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let i=-1;if(t)for(;++i<t.length;){const e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}},resolveAll:nt("text"===e?rt:void 0)}}function nt(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function rt(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],i=t.sliceStream(r);let o,a=i.length,s=-1,l=0;for(;a--;){const e=i[a];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)o=!0,l++;else if(-1!==e){a++;break}}if(l){const i={type:n===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-l,offset:r.end.offset-l,_index:r.start._index+a,_bufferIndex:a?s:r.start._bufferIndex+s},end:Object.assign({},r.end)};r.end=Object.assign({},i.start),r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,["enter",i,t],["exit",i,t]),n+=2)}n++}return e}function it(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let a=[],s=[];const l={consume:function(e){X(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,b()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=f(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(){const e=s.pop();return e.end=f(),c.events.push(["exit",e,c]),e},attempt:g((function(e,t){m(e,t.from)})),check:g(p),interrupt:g(p,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:h,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let a;if("string"==typeof o)a=o;else switch(o){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&i)continue;a=" ";break;default:a=String.fromCharCode(o)}i=-2===o,r.push(a)}return r.join("")}(h(e),t)},now:f,defineSkip:function(e){i[e.line]=e.column,b()},write:function(e){return a=M(a,e),function(){let e;for(;r._index<a.length;){const t=a[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)d(t.charCodeAt(r._bufferIndex));else d(t)}}(),null!==a[a.length-1]?[]:(m(t,0),c.events=le(o,c.events,c),c.events)}};let u=t.tokenize.call(c,l);return t.resolveAll&&o.push(t),c;function h(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}(a,e)}function f(){const{line:e,column:t,offset:n,_index:i,_bufferIndex:o}=r;return{line:e,column:t,offset:n,_index:i,_bufferIndex:o}}function d(e){u=u(e)}function p(e,t){t.restore()}function g(e,t){return function(n,i,o){let a,u,h,d;return Array.isArray(n)?p(n):"tokenize"in n?p([n]):function(e){return function(t){const n=null!==t&&e[t],r=null!==t&&e.null;return p([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function p(e){return a=e,u=0,0===e.length?o:g(e[u])}function g(e){return function(n){return d=function(){const e=f(),t=c.previous,n=c.currentConstruct,i=c.events.length,o=Array.from(s);return{restore:function(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=i,s=o,b()},from:i}}(),h=e,e.partial||(c.currentConstruct=e),e.name&&c.parser.constructs.disable.null.includes(e.name)?k():e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,m,k)(n)}}function m(){return e(h,d),i}function k(){return d.restore(),++u<a.length?g(a[u]):o}}}function m(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&O(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function b(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}var ot=Object.freeze({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Re},disable:{null:[]},document:{42:Ye,43:Ye,45:Ye,48:Ye,49:Ye,50:Ye,51:Ye,52:Ye,53:Ye,54:Ye,55:Ye,56:Ye,57:Ye,62:de},flow:{35:Ne,42:$e,45:[Xe,$e],60:Me,61:Xe,95:$e,96:be,126:be},flowInitial:{[-2]:ke,[-1]:ke,32:ke},insideSpan:{null:[ce,Ze]},string:{38:ge,92:pe},text:{[-5]:Ge,[-4]:Ge,[-3]:Ge,33:je,38:ge,42:ce,60:[he,Fe],91:Ve,92:[Le,pe],93:Be,95:ce,96:ve}});const at=/[\0\t\n\r]/g,st=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function lt(e){return e.replace(st,ct)}function ct(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return U(n.slice(t?2:1),t?16:10)}return I(n)||e}const ut={}.hasOwnProperty;function ht(e,n,r){return"string"!=typeof n&&(r=n,n=void 0),function(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(y),autolinkProtocol:h,autolinkEmail:h,atxHeading:o(m),blockQuote:o((function(){return{type:"blockquote",children:[]}})),characterEscape:h,characterReference:h,codeFenced:o(g),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(g,a),codeText:o((function(){return{type:"inlineCode",value:""}}),a),codeTextData:h,data:h,codeFlowValue:h,definition:o((function(){return{type:"definition",identifier:"",label:null,title:null,url:""}})),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o((function(){return{type:"emphasis",children:[]}})),hardBreakEscape:o(b),hardBreakTrailing:o(b),htmlFlow:o(k,a),htmlFlowData:h,htmlText:o(k,a),htmlTextData:h,image:o((function(){return{type:"image",title:null,url:"",alt:null}})),label:a,link:o(y),listItem:o((function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}})),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:o(v,(function(){this.data.expectingFirstListItemValue=!0})),listUnordered:o(v),paragraph:o((function(){return{type:"paragraph",children:[]}})),reference:function(){this.data.referenceType="collapsed"},referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(m),strong:o((function(){return{type:"strong",children:[]}})),thematicBreak:o((function(){return{type:"thematicBreak"}}))},exit:{atxHeading:l(),atxHeadingSequence:function(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}},autolink:l(),autolinkEmail:function(e){f.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){f.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:l(),characterEscapeValue:f,characterReferenceMarkerHexadecimal:p,characterReferenceMarkerNumeric:p,characterReferenceValue:function(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;n?(r=U(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0):r=I(t);const i=this.stack.pop();i.value+=r,i.position.end=ft(e.end)},codeFenced:l((function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0})),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){const e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){const e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:f,codeIndented:l((function(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")})),codeText:l((function(){const e=this.resume();this.stack[this.stack.length-1].value=e})),codeTextData:f,data:f,definition:l(),definitionDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=H(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:l(),hardBreakEscape:l(d),hardBreakTrailing:l(d),htmlFlow:l((function(){const e=this.resume();this.stack[this.stack.length-1].value=e})),htmlFlowData:f,htmlText:l((function(){const e=this.resume();this.stack[this.stack.length-1].value=e})),htmlTextData:f,image:l((function(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0})),label:function(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=lt(t),n.identifier=H(t).toLowerCase()},lineEnding:function(e){const t=this.stack[this.stack.length-1];if(this.data.atHardBreak)return t.children[t.children.length-1].position.end=ft(e.end),void(this.data.atHardBreak=void 0);!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(t.type)&&(h.call(this,e),f.call(this,e))},link:l((function(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0})),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:function(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=H(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){const e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){const e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:l((function(){this.data.setextHeadingSlurpLineEnding=void 0})),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:l(),thematicBreak:l()}};dt(n,(e||{}).mdastExtensions||[]);const r={};return function(e){let t={type:"root",children:[]};const o={stack:[t],tokenStack:[],config:n,enter:s,exit:c,buffer:a,resume:u,data:r},l=[];let h=-1;for(;++h<e.length;)"listOrdered"!==e[h][1].type&&"listUnordered"!==e[h][1].type||("enter"===e[h][0]?l.push(h):h=i(e,l.pop(),h));for(h=-1;++h<e.length;){const t=n[e[h][0]];ut.call(t,e[h][1].type)&&t[e[h][1].type].call(Object.assign({sliceSerialize:e[h][2].sliceSerialize},o),e[h][1])}if(o.tokenStack.length>0){const e=o.tokenStack[o.tokenStack.length-1];(e[1]||gt).call(o,void 0,e[0])}for(t.position={start:ft(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:ft(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},h=-1;++h<n.transforms.length;)t=n.transforms[h](t)||t;return t};function i(e,t,n){let r,i,o,a,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||l||o||(o=s),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let a=s;for(i=void 0;a--;){const t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",i=a}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!i||o<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=i,e.splice(s,0,["enter",i,t[2]]),s++,n++,o=void 0,a=!0}}}return e[t][1]._spread=c,n}function o(e,t){return function(n){s.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n]),e.position={start:ft(t.start),end:void 0}}function l(e){return function(t){e&&e.call(this,t),c.call(this,t)}}function c(e,n){const r=this.stack.pop(),i=this.tokenStack.pop();if(!i)throw new Error("Cannot close `"+e.type+"` ("+t({start:e.start,end:e.end})+"): it’s not open");i[0].type!==e.type&&(n?n.call(this,e,i[0]):(i[1]||gt).call(this,e,i[0])),r.position.end=ft(e.end)}function u(){return D(this.stack.pop())}function h(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n={type:"text",value:""},n.position={start:ft(e.start),end:void 0},t.push(n)),this.stack.push(n)}function f(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=ft(e.end)}function d(){this.data.atHardBreak=!0}function p(e){this.data.characterReferenceType=e.type}function g(){return{type:"code",lang:null,meta:null,value:""}}function m(){return{type:"heading",depth:0,children:[]}}function b(){return{type:"break"}}function k(){return{type:"html",value:""}}function y(){return{type:"link",title:null,url:"",children:[]}}function v(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}}(r)(function(e){for(;!Ee(e););return e}(function(e){const t={defined:[],lazy:{},constructs:q([ot,...(e||{}).extensions||[]]),content:n(ie),document:n(oe),flow:n(Ke),string:n(Je),text:n(et)};return t;function n(e){return function(n){return it(t,e,n)}}}(r).document().write(function(){let e,t=1,n="",r=!0;return function(i,o,a){const s=[];let l,c,u,h,f;for(i=n+("string"==typeof i?i.toString():new TextDecoder(o||void 0).decode(i)),u=0,n="",r&&(65279===i.charCodeAt(0)&&u++,r=void 0);u<i.length;){if(at.lastIndex=u,l=at.exec(i),h=l&&void 0!==l.index?l.index:i.length,f=i.charCodeAt(h),!l){n=i.slice(u);break}if(10===f&&u===h&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<h&&(s.push(i.slice(u,h)),t+=h-u),f){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=h+1}return a&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,n,!0))))}function ft(e){return{line:e.line,column:e.column,offset:e.offset}}function dt(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?dt(e,r):pt(e,r)}}function pt(e,t){let n;for(n in t)if(ut.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function gt(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+t({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+t({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+t({start:n.start,end:n.end})+") is still open")}function mt(e){const t=this;t.parser=function(n){return ht(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function bt(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&"text"===o.type?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&"text"===a.type?a.value+=r:i.push({type:"text",value:r}),i}function kt(e){const t=e.spread;return null==t?e.children.length>1:t}function yt(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(vt(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(vt(t.slice(i),i>0,!1)),o.join("")}function vt(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}const Et={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=ne(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=o+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return bt(e,t);const i={src:ne(r.url||""),alt:t.alt};null!=r.title&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){const n={src:ne(t.url)};null!=t.alt&&(n.alt=t.alt),null!=t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return bt(e,t);const i={href:ne(r.url||"")};null!=r.title&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){const n={href:ne(t.url)};null!=t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=kt(n[r])}return t}(n):kt(t),o={},a=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(i||0!==s||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?a.push(e):a.push(...e.children)}const l=r[r.length-1];l&&(i||"element"!==l.type||"p"!==l.tagName)&&a.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let i=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){const e=r[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const i=e.all(t),o=i.shift(),a=[];if(o){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([o],!0)};e.patch(t.children[0],n),a.push(n)}if(i.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(i,!0)},s=n(t.children[1]),l=r(t.children[t.children.length-1]);s&&l&&(o.position={start:s,end:l}),a.push(o)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,s),e.applyData(t,s)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,a=o?o.length:t.children.length;let s=-1;const l=[];for(;++s<a;){const n=t.children[s],r={},a=o?o[s]:void 0;a&&(r.align=a);let c={type:"element",tagName:i,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:yt(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:wt,yaml:wt,definition:wt,footnoteDefinition:wt};function wt(){}function St(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Tt(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const xt={}.hasOwnProperty,Ct={};function At(e,t){e.position&&(t.position=a(e))}function Dt(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}),"element"===n.type&&o&&Object.assign(n.properties,i(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Rt(e,t){const n=t.data||{},r=!("value"in t)||xt.call(n,"hProperties")||xt.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function _t(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function Lt(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Nt(e,t){const n=function(e,t){const n=t||Ct,r=new Map,a=new Map,s=new Map,l={...Et,...n.handlers},c={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const i=c.one(n[r],e);if(i){if(r&&"break"===n[r-1].type&&(Array.isArray(i)||"text"!==i.type||(i.value=Lt(i.value)),!Array.isArray(i)&&"element"===i.type)){const e=i.children[0];e&&"text"===e.type&&(e.value=Lt(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t},applyData:Dt,definitionById:r,footnoteById:a,footnoteCounts:s,footnoteOrder:[],handlers:l,one:function(e,t){const n=e.type,r=c.handlers[n];if(xt.call(c.handlers,n)&&r)return r(c,e,t);if(c.options.passThrough&&c.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=i(n);return r.children=c.all(e),r}return i(e)}return(c.options.unknownHandler||Rt)(c,e,t)},options:n,patch:At,wrap:_t};return o(e,(function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}})),c}(e,t),r=n.one(e,void 0),a=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||St,r=e.options.footnoteBackLabel||Tt,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;const o=e.all(i),a=String(i.identifier).toUpperCase(),s=ne(a.toLowerCase());let u=0;const h=[],f=e.footnoteCounts.get(a);for(;void 0!==f&&++u<=f;){h.length>0&&h.push({type:"text",value:" "});let e="string"==typeof n?n:n(c,u);"string"==typeof e&&(e={type:"text",value:e}),h.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+s+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(c,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const d=o[o.length-1];if(d&&"element"===d.type&&"p"===d.tagName){const e=d.children[d.children.length-1];e&&"text"===e.type?e.value+=" ":d.children.push({type:"text",value:" "}),d.children.push(...h)}else o.push(...h);const p={type:"element",tagName:"li",properties:{id:t+"fn-"+s},children:e.wrap(o,!0)};e.patch(i,p),l.push(p)}if(0!==l.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...i(s),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:"\n"}]}}(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&s.children.push({type:"text",value:"\n"},a),s}function It(e,t){return e&&"run"in e?async function(n,r){const i=Nt(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Nt(n,{file:r,...e||t})}}function Ot(e,t,n){const r=s((n||{}).ignore||[]),i=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([(i=e[0],"string"==typeof i?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(i),"g"):i),Mt(e[1])])}var i;return t}(t);let o=-1;for(;++o<i.length;)l(e,"text",a);function a(e,t){let n,a=-1;for(;++a<t.length;){const e=t[a],i=n?n.children:void 0;if(r(e,i?i.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=i[o][0],a=i[o][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let h=r.exec(e.value);for(;h;){const n=h.index,i={index:h.index,input:h.input,stack:[...t,e]};let o=a(...h,i);if("string"==typeof o&&(o=o.length>0?{type:"text",value:o}:void 0),!1===o?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(o)?u.push(...o):o&&u.push(o),s=n+h[0].length,c=!0),!r.global)break;h=r.exec(e.value)}return c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e],l+u.length}(e,t)}}function Mt(e){return"function"==typeof e?e:function(){return e}}const Pt="phrasing",qt=["autolink","link","image","label"];function Ft(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Bt(e){this.config.enter.autolinkProtocol.call(this,e)}function Ut(e){this.config.exit.autolinkProtocol.call(this,e)}function Ht(e){this.config.exit.data.call(this,e),this.stack[this.stack.length-1].url="http://"+this.sliceSerialize(e)}function zt(e){this.config.exit.autolinkEmail.call(this,e)}function jt(e){this.exit(e)}function Vt(e){Ot(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Gt],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,$t]],{ignore:["link","linkReference"]})}function Gt(e,t,n,r,i){let o="";if(!Yt(i))return!1;if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!function(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}(n))return!1;const a=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=c(e,"(");let o=c(e,")");for(;-1!==r&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function $t(e,t,n,r){return!(!Yt(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Yt(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||ee(n)||J(n))&&(!t||47!==n)}function Wt(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Qt(){this.buffer()}function Xt(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=H(this.sliceSerialize(e)).toLowerCase()}function Kt(e){this.exit(e)}function Zt(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Jt(){this.buffer()}function en(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=H(this.sliceSerialize(e)).toLowerCase()}function tn(e){this.exit(e)}function nn(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function rn(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteDefinition"),s=n.enter("label");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(n.indentLines(n.containerFlow(e,i.current()),on)),a(),o}function on(e,t,n){return 0===t?e:(n?"":" ")+e}nn.peek=function(){return"["};const an=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function sn(e){this.enter({type:"delete",children:[]},e)}function ln(e){this.exit(e)}function cn(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function un(e){return e.length}function hn(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}cn.peek=function(){return"~"};const fn=s(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","link","linkReference","strong","text"]);function dn(e,t,n){return">"+(n?"":" ")+e}function pn(e,t){return gn(e,t.inConstruct,!0)&&!gn(e,t.notInConstruct,!1)}function gn(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function mn(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){const e=n.unsafe[i];if("\n"===e.character&&!e.before&&!e.after&&pn(n.stack,e))return/[\t ]/.test(r.before)?"":" "}return"\\\n"}function bn(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function kn(e,t,n){return(n?"":" ")+e}function yn(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function vn(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function En(e,t,n,r){const i=n.enter("phrasing"),o=n.containerPhrasing({type:"root",children:[e]},r);return i(),o}function wn(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Sn(e,t){let n=!1;return o(e,(function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,u})),Boolean((!e.depth||e.depth<3)&&D(e)&&(t.options.setext||n))}function Tn(e){return e.value||""}function xn(e,t,n,r){const i=yn(n),o='"'===i?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),c+=l.move(")"),a(),c}function Cn(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=u.filter((function(e){return"phrasing"!==e})),a=n.enter("reference");const h=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,o(),"full"!==i&&c&&c===h?"shortcut"===i?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(h+"]"),l}function An(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const e=n.unsafe[o],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(i.index+1)}}return i+r+i}function Dn(e,t){const n=D(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][+\-.a-z]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function Rn(e,t,n,r){const i=yn(n),o='"'===i?"Quote":"Apostrophe",a=n.createTracker(r);if(Dn(e,n)){const t=n.stack;n.stack=t.filter((function(e){return"phrasing"!==e}));const r=n.enter("autolink");let i=a.move("<");return i+=a.move(n.containerPhrasing(e,{before:i,after:">",...a.current()})),i+=a.move(">"),r(),n.stack=t,i}const s=n.enter("link");let l=n.enter("label"),c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),c+=a.move(" "+i),c+=a.move(n.safe(e.title,{before:c,after:i,...a.current()})),c+=a.move(i),l()),c+=a.move(")"),s(),c}function _n(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=u.filter((function(e){return"phrasing"!==e})),a=n.enter("reference");const h=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,o(),"full"!==i&&c&&c===h?"shortcut"===i?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(h+"]"),l}function Ln(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Nn(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function In(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}function On(e,t,n,r){const i=n.enter("phrasing"),o=n.containerPhrasing({type:"root",children:[e]},r);return i(),o}En.attention=function(e,t){return{construct:"emphasis",markers:"*"===vn(t)?["*","_"]:["_","*"],sizes:[1]}},En.peek=function(e,t,n){return n.options.emphasis||"*"},Tn.peek=function(){return"<"},xn.peek=function(){return"!"},Cn.peek=function(){return"!"},An.peek=function(){return"`"},Rn.peek=function(e,t,n){return Dn(e,n)?"<":"["},_n.peek=function(){return"["},On.attention=function(e,t){return{construct:"strong",markers:"*"===In(t)?["*","_"]:["_","*"],sizes:[2]}},On.peek=function(e,t,n){return n.options.strong||"*"};const Mn={blockquote:function(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const a=n.indentLines(n.containerFlow(e,o.current()),dn);return i(),a},break:mn,code:function(e,t,n,r){const i=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),o=e.value||"";if(bn(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(o,kn);return e(),t}const a=n.createTracker(r),s=i.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,a=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===i?++o>a&&(a=o):o=1,i=r+t.length,r=n.indexOf(t,i);return a}(o,i)+1,3)),l=n.enter("codeFenced"),c="`"===i?"GraveAccent":"Tilde";let u=a.move(s);if(e.lang){const t=n.enter(`codeFencedLang${c}`);u+=a.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...a.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${c}`);u+=a.move(" "),u+=a.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...a.current()})),t()}return u+=a.move("\n"),o&&(u+=a.move(o+"\n")),u+=a.move(s),l(),u},definition:function(e,t,n,r){const i=yn(n),o='"'===i?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),a(),c},emphasis:En,hardBreak:mn,heading:function(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(Sn(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),a=n.containerPhrasing(e,{...o.current(),before:"\n",after:"\n"});return r(),t(),a+"\n"+(1===i?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const a="#".repeat(i),s=n.enter("headingAtx"),l=n.enter("phrasing");o.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...o.current()});const u=c.charCodeAt(0);return 9!==u&&32!==u||(c=wn(u)+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c},html:Tn,image:xn,imageReference:Cn,inlineCode:An,link:Rn,linkReference:_n,list:function(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let a=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):Ln(n);const s=e.ordered?"."===a?")":".":function(e){const t=Ln(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&a===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==a&&"-"!==a||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),Nn(n)===a&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=o,i(),c},listItem:function(e,t,n,r){const i=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let o=n.bulletCurrent||Ln(n);t&&"list"===t.type&&t.ordered&&(o=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+o);let a=o.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));const s=n.createTracker(r);s.move(o+" ".repeat(a-o.length)),s.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),(function(e,t,n){return t?(n?"":" ".repeat(a))+e:(n?o:o+" ".repeat(a-o.length))+e}));return l(),c},paragraph:function(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),a=n.containerPhrasing(e,r);return o(),i(),a},root:function(e,t,n,r){if(!e.children.some((function(e){return fn(e)})))return n.containerFlow(e,r);const i=n.enter("phrasing"),o=n.containerPhrasing(e,r);return i(),o},strong:On,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(Nn(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function Pn(e){this.enter({type:"table",align:e._align.map((function(e){return"none"===e?null:e})),children:[]},e),this.data.inTable=!0}function qn(e){this.exit(e),this.data.inTable=void 0}function Fn(e){this.enter({type:"tableRow",children:[]},e)}function Bn(e){this.exit(e)}function Un(e){this.enter({type:"tableCell",children:[]},e)}function Hn(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,zn)),this.stack[this.stack.length-1].value=t,this.exit(e)}function zn(e,t){return"|"===t?t:e}function jn(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=Mn.inlineCode(e,t,n);return n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&")),r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let i=-1;const o=[],a=t.enter("table");for(;++i<r.length;)o[i]=l(r[i],t,n);return a(),o}(e,n,r),e.align)},tableCell:a,tableRow:function(e,t,n,r){const i=s([l(e,n,r)]);return i.slice(0,i.indexOf("\n"))}}};function a(e,t,n,r){const i=n.enter("tableCell"),a=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:o,after:o});return a(),i(),s}function s(e,t){return function(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||un,i=[],o=[],a=[],s=[];let l=0,c=-1;for(;++c<e.length;){const n=[],i=[];let h=-1;for(e[c].length>l&&(l=e[c].length);++h<e[c].length;){const o=null==(u=e[c][h])?"":String(u);if(!1!==t.alignDelimiters){const e=r(o);i[h]=e,(void 0===s[h]||e>s[h])&&(s[h]=e)}n.push(o)}o[c]=n,a[c]=i}var u;let h=-1;if("object"==typeof n&&"length"in n)for(;++h<l;)i[h]=hn(n[h]);else{const e=hn(n);for(;++h<l;)i[h]=e}h=-1;const f=[],d=[];for(;++h<l;){const e=i[h];let n="",r="";99===e?(n=":",r=":"):108===e?n=":":114===e&&(r=":");let o=!1===t.alignDelimiters?1:Math.max(1,s[h]-n.length-r.length);const a=n+"-".repeat(o)+r;!1!==t.alignDelimiters&&(o=n.length+o+r.length,o>s[h]&&(s[h]=o),d[h]=o),f[h]=a}o.splice(1,0,f),a.splice(1,0,d),c=-1;const p=[];for(;++c<o.length;){const e=o[c],n=a[c];h=-1;const r=[];for(;++h<l;){const o=e[h]||"";let a="",c="";if(!1!==t.alignDelimiters){const e=s[h]-(n[h]||0),t=i[h];114===t?a=" ".repeat(e):99===t?e%2?(a=" ".repeat(e/2+.5),c=" ".repeat(e/2-.5)):(a=" ".repeat(e/2),c=a):c=" ".repeat(e)}!1===t.delimiterStart||h||r.push("|"),!1===t.padding||!1===t.alignDelimiters&&""===o||!1===t.delimiterStart&&!h||r.push(" "),!1!==t.alignDelimiters&&r.push(a),r.push(o),!1!==t.alignDelimiters&&r.push(c),!1!==t.padding&&r.push(" "),!1===t.delimiterEnd&&h===l-1||r.push("|")}p.push(!1===t.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return p.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function l(e,t,n){const r=e.children;let i=-1;const o=[],s=t.enter("tableRow");for(;++i<r.length;)o[i]=a(r[i],0,t,n);return s(),o}}function Vn(e){this.stack[this.stack.length-2].checked="taskListCheckValueChecked"===e.type}function Gn(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1],n=e.children[0];if(n&&"text"===n.type){const r=t.children;let i,o=-1;for(;++o<r.length;){const e=r[o];if("paragraph"===e.type){i=e;break}}i===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function $n(e,t,n,r){const i=e.children[0],o="boolean"==typeof e.checked&&i&&"paragraph"===i.type,a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(a);let l=Mn.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+a}))),l}const Yn={tokenize:function(e,t,n){let r=0;return function t(o){return(87===o||119===o)&&r<3?(r++,e.consume(o),t):46===o&&3===r?(e.consume(o),i):n(o)};function i(e){return null===e?n(e):t(e)}},partial:!0},Wn={tokenize:function(e,t,n){let r,i,o;return a;function a(t){return 46===t||95===t?e.check(Xn,l,s)(t):null===t||K(t)||ee(t)||45!==t&&J(t)?l(t):(o=!0,e.consume(t),a)}function s(t){return 95===t?r=!0:(i=r,r=void 0),e.consume(t),a}function l(e){return i||r||!o?n(e):t(e)}},partial:!0},Qn={tokenize:function(e,t){let n=0,r=0;return i;function i(a){return 40===a?(n++,e.consume(a),i):41===a&&r<n?o(a):33===a||34===a||38===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||60===a||63===a||93===a||95===a||126===a?e.check(Xn,t,o)(a):null===a||K(a)||ee(a)?t(a):(e.consume(a),i)}function o(t){return 41===t&&r++,e.consume(t),i}},partial:!0},Xn={tokenize:function(e,t,n){return r;function r(a){return 33===a||34===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||63===a||95===a||126===a?(e.consume(a),r):38===a?(e.consume(a),o):93===a?(e.consume(a),i):60===a||null===a||K(a)||ee(a)?t(a):n(a)}function i(e){return null===e||40===e||91===e||K(e)||ee(e)?t(e):r(e)}function o(e){return j(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):j(t)?(e.consume(t),a):n(t)}},partial:!0},Kn={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return V(e)?n(e):t(e)}},partial:!0},Zn={tokenize:function(e,t,n){const r=this;return function(t){return 87!==t&&119!==t||!rr.call(r,r.previous)||sr(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Yn,e.attempt(Wn,e.attempt(Qn,i),n),n)(t))};function i(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:rr},Jn={tokenize:function(e,t,n){const r=this;let i="",o=!1;return function(t){return 72!==t&&104!==t||!ir.call(r,r.previous)||sr(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(t),e.consume(t),a)};function a(t){if(j(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),a;if(58===t){const n=i.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),o?l:(o=!0,s)):n(t)}function l(t){return null===t||$(t)||K(t)||ee(t)||J(t)?n(t):e.attempt(Wn,e.attempt(Qn,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:ir},er={tokenize:function(e,t,n){const r=this;let i,o;return function(t){return ar(t)&&or.call(r,r.previous)&&!sr(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)):n(t)};function a(t){return ar(t)?(e.consume(t),a):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(Kn,c,l)(t):45===t||95===t||V(t)?(o=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),i=!0,s}function c(a){return o&&i&&j(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:or},tr={};let nr=48;for(;nr<123;)tr[nr]=er,nr++,58===nr?nr=65:91===nr&&(nr=97);function rr(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||K(e)}function ir(e){return!j(e)}function or(e){return!(47===e||ar(e))}function ar(e){return 43===e||45===e||46===e||95===e||V(e)}function sr(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}tr[43]=er,tr[45]=er,tr[46]=er,tr[95]=er,tr[72]=[er,Jn],tr[104]=[er,Jn],tr[87]=[er,Zn],tr[119]=[er,Zn];const lr={tokenize:function(e,t,n){const r=this;return re(e,(function(e){const i=r.events[r.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):n(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function cr(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const e=r.events[i][1];if("labelImage"===e.type){a=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(i){if(!a||!a._balanced)return n(i);const s=H(r.sliceSerialize({start:a.end,end:r.now()}));return 94===s.codePointAt(0)&&o.includes(s.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(i),e.exit("gfmFootnoteCallLabelMarker"),t(i)):n(i)}}function ur(e,t){let n=e.length;for(;n--&&("labelImage"!==e[n][1].type||"enter"!==e[n][0]););e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)};return e.splice(n,e.length-n+1,e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]),e}function hr(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(a>999||93===s&&!o||null===s||91===s||K(s))return n(s);if(93===s){e.exit("chunkString");const o=e.exit("gfmFootnoteCallString");return i.includes(H(r.sliceSerialize(o)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return K(s)||(o=!0),a++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,l):l(t)}}function fr(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!a||null===t||91===t||K(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return o=H(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return K(t)||(a=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function h(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i.includes(o)||i.push(o),re(e,f,"gfmFootnoteDefinitionWhitespace")):n(t)}function f(e){return t(e)}}function dr(e,t,n){return e.check(fe,t,e.attempt(lr,t,n))}function pr(e){e.exit("gfmFootnoteDefinition")}function gr(e){let t=(e||{}).singleTilde;const n={tokenize:function(e,n,r){const i=this.previous,o=this.events;let a=0;return function(t){return 126===i&&"characterEscape"!==o[o.length-1][1].type?r(t):(e.enter("strikethroughSequenceTemporary"),s(t))};function s(o){const l=se(i);if(126===o)return a>1?r(o):(e.consume(o),a++,s);if(a<2&&!t)return r(o);const c=e.exit("strikethroughSequenceTemporary"),u=se(o);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(o)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const i={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},o={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},a=[["enter",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",o,t]],s=t.parser.constructs.insideSpan.null;s&&O(a,a.length,0,le(s,e.slice(r+1,n),t)),O(a,a.length,0,[["exit",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",i,t]]),O(e,r-1,n-r+3,a),n=r+a.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class mr{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let i=0;if(0!==n||0!==r.length){for(;i<e.map.length;){if(e.map[i][0]===t)return e.map[i][1]+=n,void e.map[i][2].push(...r);i+=1}e.map.push([t,n,r])}}(this,e,t,n)}consume(e){if(this.map.sort((function(e,t){return e[0]-t[0]})),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push([...e]),e.length=0;let r=n.pop();for(;r;)e.push(...r),r=n.pop();this.map.length=0}}function br(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if("enter"===i[0])"tableContent"===i[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===i[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===i[1].type)break}else"enter"===i[0]&&"tableDelimiterRow"===i[1].type&&(n=!0);t+=1}return r}function kr(e,t,n){const r=this;let i,o=0,a=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const i=t>-1?r.events[t][1].type:null,o="tableHead"===i||"tableRow"===i?v:s;return o===v&&r.parser.lazy[r.now().line]?n(e):o(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){return 124===e||(i=!0,a+=1),l(e)}(t)}function l(t){return null===t?n(t):X(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),h):n(t):Z(t)?re(e,l,"whitespace")(t):(a+=1,i&&(i=!1,o+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),i=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||K(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function h(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),i=!1,Z(t)?re(e,f,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):f(t))}function f(t){return 45===t||58===t?p(t):124===t?(i=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),d):y(t)}function d(t){return Z(t)?re(e,p,"whitespace")(t):p(t)}function p(t){return 58===t?(a+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),g):45===t?(a+=1,g(t)):null===t||X(t)?k(t):y(t)}function g(t){return 45===t?(e.enter("tableDelimiterFiller"),m(t)):y(t)}function m(t){return 45===t?(e.consume(t),m):58===t?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(t))}function b(t){return Z(t)?re(e,k,"whitespace")(t):k(t)}function k(n){return 124===n?f(n):(null===n||X(n))&&i&&o===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):y(n)}function y(e){return n(e)}function v(t){return e.enter("tableRow"),E(t)}function E(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),E):null===n||X(n)?(e.exit("tableRow"),t(n)):Z(n)?re(e,E,"whitespace")(n):(e.enter("data"),w(n))}function w(t){return null===t||124===t||K(t)?(e.exit("data"),E(t)):(e.consume(t),92===t?S:w)}function S(t){return 92===t||124===t?(e.consume(t),w):w(t)}}function yr(e,t){let n,r,i,o=-1,a=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,h=0;const f=new mr;for(;++o<e.length;){const d=e[o],p=d[1];"enter"===d[0]?"tableHead"===p.type?(u=!1,0!==h&&(Er(f,t,h,n,r),r=void 0,h=0),n={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},f.add(o,0,[["enter",n,t]])):"tableRow"===p.type||"tableDelimiterRow"===p.type?(a=!0,i=void 0,l=[0,0,0,0],c=[0,o+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},f.add(o,0,[["enter",r,t]])),s="tableDelimiterRow"===p.type?2:r?3:1):!s||"data"!==p.type&&"tableDelimiterMarker"!==p.type&&"tableDelimiterFiller"!==p.type?"tableCellDivider"===p.type&&(a?a=!1:(0!==l[1]&&(c[0]=c[1],i=vr(f,t,l,s,void 0,i)),l=c,c=[l[1],o,0,0])):(a=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],i=vr(f,t,l,s,void 0,i),l=[0,0,0,0]),c[2]=o)):"tableHead"===p.type?(u=!0,h=o):"tableRow"===p.type||"tableDelimiterRow"===p.type?(h=o,0!==l[1]?(c[0]=c[1],i=vr(f,t,l,s,o,i)):0!==c[1]&&(i=vr(f,t,c,s,o,i)),s=0):!s||"data"!==p.type&&"tableDelimiterMarker"!==p.type&&"tableDelimiterFiller"!==p.type||(c[3]=o)}for(0!==h&&Er(f,t,h,n,r),f.consume(t.events),o=-1;++o<t.events.length;){const e=t.events[o];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=br(t.events,o))}return e}function vr(e,t,n,r,i,o){const a=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(o.end=Object.assign({},wr(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=wr(t.events,n[1]);if(o={type:a,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),0!==n[2]){const i=wr(t.events,n[2]),o=wr(t.events,n[3]),a={type:"tableContent",start:Object.assign({},i),end:Object.assign({},o)};if(e.add(n[2],0,[["enter",a,t]]),2!==r){const r=t.events[n[2]];r[1].end=Object.assign({},t.events[n[3]][1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1&&e.add(n[2]+1,n[3]-n[2]-1,[])}e.add(n[3]+1,0,[["exit",a,t]])}return void 0!==i&&(o.end=Object.assign({},wr(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Er(e,t,n,r,i){const o=[],a=wr(t.events,n);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function wr(e,t){const n=e[t];return n[1]["enter"===n[0]?"start":"end"]}const Sr={tokenize:function(e,t,n){const r=this;return function(t){return null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i):n(t)};function i(t){return K(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):n(t)}function o(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(t)}function a(r){return X(r)?t(r):Z(r)?e.check({tokenize:Tr},t,n)(r):n(r)}}};function Tr(e,t,n){return re(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}const xr={};function Cr(e){const t=e||xr,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return q([{text:tr},{document:{91:{tokenize:fr,continuation:{tokenize:dr},exit:pr}},text:{91:{tokenize:hr},93:{add:"after",tokenize:cr,resolveTo:ur}}},gr(e),{flow:{null:{tokenize:kr,resolveAll:yr}}},{text:{91:Sr}}])}(t)),i.push([{transforms:[Vt],enter:{literalAutolink:Ft,literalAutolinkEmail:Bt,literalAutolinkHttp:Bt,literalAutolinkWww:Bt},exit:{literalAutolink:jt,literalAutolinkEmail:zt,literalAutolinkHttp:Ut,literalAutolinkWww:Ht}},{enter:{gfmFootnoteDefinition:Wt,gfmFootnoteDefinitionLabelString:Qt,gfmFootnoteCall:Zt,gfmFootnoteCallString:Jt},exit:{gfmFootnoteDefinition:Kt,gfmFootnoteDefinitionLabelString:Xt,gfmFootnoteCall:tn,gfmFootnoteCallString:en}},{canContainEols:["delete"],enter:{strikethrough:sn},exit:{strikethrough:ln}},{enter:{table:Pn,tableData:Un,tableHeader:Un,tableRow:Fn},exit:{codeText:Hn,table:qn,tableData:Bn,tableHeader:Bn,tableRow:Bn}},{exit:{taskListCheckValueChecked:Vn,taskListCheckValueUnchecked:Vn,paragraph:Gn}}]),o.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Pt,notInConstruct:qt},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Pt,notInConstruct:qt},{character:":",before:"[ps]",after:"\\/",inConstruct:Pt,notInConstruct:qt}]},{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:rn,footnoteReference:nn}},{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:an}],handlers:{delete:cn}},jn(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:$n}}]}}(t))}function Ar(){return{type:"break"}}function Dr(){return function(e){!function(e){Ot(e,[/\r?\n|\r/g,Ar])}(e)}}let Rr=class{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}};function _r(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Rr(n,r,t)}function Lr(e){return e.toLowerCase()}Rr.prototype.property={},Rr.prototype.normal={},Rr.prototype.space=null;let Nr=class{constructor(e,t){this.property=e,this.attribute=t}};Nr.prototype.space=null,Nr.prototype.boolean=!1,Nr.prototype.booleanish=!1,Nr.prototype.overloadedBoolean=!1,Nr.prototype.number=!1,Nr.prototype.commaSeparated=!1,Nr.prototype.spaceSeparated=!1,Nr.prototype.commaOrSpaceSeparated=!1,Nr.prototype.mustUseProperty=!1,Nr.prototype.defined=!1;let Ir=0;const Or=Hr(),Mr=Hr(),Pr=Hr(),qr=Hr(),Fr=Hr(),Br=Hr(),Ur=Hr();function Hr(){return 2**++Ir}var zr=Object.freeze({__proto__:null,boolean:Or,booleanish:Mr,commaOrSpaceSeparated:Ur,commaSeparated:Br,number:qr,overloadedBoolean:Pr,spaceSeparated:Fr});const jr=Object.keys(zr);let Vr=class extends Nr{constructor(e,t,n,r){let i=-1;if(super(e,t),Gr(this,"space",r),"number"==typeof n)for(;++i<jr.length;){const e=jr[i];Gr(this,jr[i],(n&zr[e])===zr[e])}}};function Gr(e,t,n){n&&(e[t]=n)}Vr.prototype.defined=!0;const $r={}.hasOwnProperty;function Yr(e){const t={},n={};let r;for(r in e.properties)if($r.call(e.properties,r)){const i=e.properties[r],o=new Vr(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Lr(r)]=r,n[Lr(o.attribute)]=r}return new Rr(t,n,e.space)}const Wr=Yr({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Qr=Yr({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Xr(e,t){return t in e?e[t]:t}function Kr(e,t){return Xr(e,t.toLowerCase())}const Zr=Yr({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Kr,properties:{xmlns:null,xmlnsXLink:null}}),Jr=Yr({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:Mr,ariaAutoComplete:null,ariaBusy:Mr,ariaChecked:Mr,ariaColCount:qr,ariaColIndex:qr,ariaColSpan:qr,ariaControls:Fr,ariaCurrent:null,ariaDescribedBy:Fr,ariaDetails:null,ariaDisabled:Mr,ariaDropEffect:Fr,ariaErrorMessage:null,ariaExpanded:Mr,ariaFlowTo:Fr,ariaGrabbed:Mr,ariaHasPopup:null,ariaHidden:Mr,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Fr,ariaLevel:qr,ariaLive:null,ariaModal:Mr,ariaMultiLine:Mr,ariaMultiSelectable:Mr,ariaOrientation:null,ariaOwns:Fr,ariaPlaceholder:null,ariaPosInSet:qr,ariaPressed:Mr,ariaReadOnly:Mr,ariaRelevant:null,ariaRequired:Mr,ariaRoleDescription:Fr,ariaRowCount:qr,ariaRowIndex:qr,ariaRowSpan:qr,ariaSelected:Mr,ariaSetSize:qr,ariaSort:null,ariaValueMax:qr,ariaValueMin:qr,ariaValueNow:qr,ariaValueText:null,role:null}}),ei=Yr({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Kr,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Br,acceptCharset:Fr,accessKey:Fr,action:null,allow:null,allowFullScreen:Or,allowPaymentRequest:Or,allowUserMedia:Or,alt:null,as:null,async:Or,autoCapitalize:null,autoComplete:Fr,autoFocus:Or,autoPlay:Or,blocking:Fr,capture:Or,charSet:null,checked:Or,cite:null,className:Fr,cols:qr,colSpan:null,content:null,contentEditable:Mr,controls:Or,controlsList:Fr,coords:qr|Br,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Or,defer:Or,dir:null,dirName:null,disabled:Or,download:Pr,draggable:Mr,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Or,formTarget:null,headers:Fr,height:qr,hidden:Or,high:qr,href:null,hrefLang:null,htmlFor:Fr,httpEquiv:Fr,id:null,imageSizes:null,imageSrcSet:null,inert:Or,inputMode:null,integrity:null,is:null,isMap:Or,itemId:null,itemProp:Fr,itemRef:Fr,itemScope:Or,itemType:Fr,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Or,low:qr,manifest:null,max:null,maxLength:qr,media:null,method:null,min:null,minLength:qr,multiple:Or,muted:Or,name:null,nonce:null,noModule:Or,noValidate:Or,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Or,optimum:qr,pattern:null,ping:Fr,placeholder:null,playsInline:Or,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Or,referrerPolicy:null,rel:Fr,required:Or,reversed:Or,rows:qr,rowSpan:qr,sandbox:Fr,scope:null,scoped:Or,seamless:Or,selected:Or,shape:null,size:qr,sizes:null,slot:null,span:qr,spellCheck:Mr,src:null,srcDoc:null,srcLang:null,srcSet:null,start:qr,step:null,style:null,tabIndex:qr,target:null,title:null,translate:null,type:null,typeMustMatch:Or,useMap:null,value:Mr,width:qr,wrap:null,align:null,aLink:null,archive:Fr,axis:null,background:null,bgColor:null,border:qr,borderColor:null,bottomMargin:qr,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Or,declare:Or,event:null,face:null,frame:null,frameBorder:null,hSpace:qr,leftMargin:qr,link:null,longDesc:null,lowSrc:null,marginHeight:qr,marginWidth:qr,noResize:Or,noHref:Or,noShade:Or,noWrap:Or,object:null,profile:null,prompt:null,rev:null,rightMargin:qr,rules:null,scheme:null,scrolling:Mr,standby:null,summary:null,text:null,topMargin:qr,valueType:null,version:null,vAlign:null,vLink:null,vSpace:qr,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Or,disableRemotePlayback:Or,prefix:null,property:null,results:qr,security:null,unselectable:null}}),ti=Yr({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Xr,properties:{about:Ur,accentHeight:qr,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:qr,amplitude:qr,arabicForm:null,ascent:qr,attributeName:null,attributeType:null,azimuth:qr,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:qr,by:null,calcMode:null,capHeight:qr,className:Fr,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:qr,diffuseConstant:qr,direction:null,display:null,dur:null,divisor:qr,dominantBaseline:null,download:Or,dx:null,dy:null,edgeMode:null,editable:null,elevation:qr,enableBackground:null,end:null,event:null,exponent:qr,externalResourcesRequired:null,fill:null,fillOpacity:qr,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Br,g2:Br,glyphName:Br,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:qr,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:qr,horizOriginX:qr,horizOriginY:qr,id:null,ideographic:qr,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:qr,k:qr,k1:qr,k2:qr,k3:qr,k4:qr,kernelMatrix:Ur,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:qr,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:qr,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:qr,overlineThickness:qr,paintOrder:null,panose1:null,path:null,pathLength:qr,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Fr,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:qr,pointsAtY:qr,pointsAtZ:qr,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ur,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ur,rev:Ur,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ur,requiredFeatures:Ur,requiredFonts:Ur,requiredFormats:Ur,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:qr,specularExponent:qr,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:qr,strikethroughThickness:qr,string:null,stroke:null,strokeDashArray:Ur,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:qr,strokeOpacity:qr,strokeWidth:null,style:null,surfaceScale:qr,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ur,tabIndex:qr,tableValues:null,target:null,targetX:qr,targetY:qr,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ur,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:qr,underlineThickness:qr,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:qr,values:null,vAlphabetic:qr,vMathematical:qr,vectorEffect:null,vHanging:qr,vIdeographic:qr,version:null,vertAdvY:qr,vertOriginX:qr,vertOriginY:qr,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:qr,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),ni=/^data[-\w.:]+$/i,ri=/-[a-z]/g,ii=/[A-Z]/g;function oi(e,t){const n=Lr(t);let r=t,i=Nr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&ni.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(ri,si);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!ri.test(e)){let n=e.replace(ii,ai);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=Vr}return new i(r,t)}function ai(e){return"-"+e.toLowerCase()}function si(e){return e.charAt(1).toUpperCase()}const li=_r([Qr,Wr,Zr,Jr,ei],"html"),ci=_r([Qr,Wr,Zr,Jr,ti],"svg"),ui=new Set(["button","menu","reset","submit"]),hi={}.hasOwnProperty;function fi(e,t,n){const r=n&&function(e){const t={};let n=-1;for(;++n<e.length;)t[e[n].toLowerCase()]=e[n];return t}(n);return function(n,i,...o){let a,s=-1;if(null==n)a={type:"root",children:[]},o.unshift(i);else if(a=h(n,t),a.tagName=a.tagName.toLowerCase(),r&&hi.call(r,a.tagName)&&(a.tagName=r[a.tagName]),c=a.tagName,null==(l=i)||"object"!=typeof l||Array.isArray(l)||"input"!==c&&l.type&&"string"==typeof l.type&&("children"in l&&Array.isArray(l.children)||("button"===c?!ui.has(l.type.toLowerCase()):"value"in l)))o.unshift(i);else{let t;for(t in i)hi.call(i,t)&&di(e,a.properties,t,i[t])}for(var l,c;++s<o.length;)pi(a.children,o[s]);return"element"===a.type&&"template"===a.tagName&&(a.content={type:"root",children:a.children},a.children=[]),a}}function di(e,t,n,r){const i=oi(e,n);let o,a=-1;if(null!=r){if("number"==typeof r){if(Number.isNaN(r))return;o=r}else o="boolean"==typeof r?r:"string"==typeof r?i.spaceSeparated?f(r):i.commaSeparated?d(r):i.commaOrSpaceSeparated?f(d(r).join(" ")):gi(i,i.property,r):Array.isArray(r)?r.concat():"style"===i.property?function(e){const t=[];let n;for(n in e)hi.call(e,n)&&t.push([n,e[n]].join(": "));return t.join("; ")}(r):String(r);if(Array.isArray(o)){const e=[];for(;++a<o.length;){const t=gi(i,i.property,o[a]);e[a]=t}o=e}"className"===i.property&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[i.property]=o}}function pi(e,t){let n=-1;if(null==t);else if("string"==typeof t||"number"==typeof t)e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(;++n<t.length;)pi(e,t[n]);else{if("object"!=typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");"root"===t.type?pi(e,t.children):e.push(t)}}function gi(e,t,n){if("string"==typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||Lr(n)===Lr(t)))return!0}return n}const mi=fi(li,"div"),bi=fi(ci,"g",["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"]),ki=/\r?\n|\r/g,yi={}.hasOwnProperty,vi=Object.prototype;function Ei(e,t){let n;switch(t.nodeName){case"#comment":return n={type:"comment",value:t.data},Si(e,t,n),n;case"#document":case"#document-fragment":{const r="mode"in t&&("quirks"===t.mode||"limited-quirks"===t.mode);if(n={type:"root",children:wi(e,t.childNodes),data:{quirksMode:r}},e.file&&e.location){const t=String(e.file),r=function(e){const t=String(e),n=[];for(ki.lastIndex=0;ki.test(t);)n.push(ki.lastIndex);return n.push(t.length+1),{toPoint:function(e){let t=-1;if("number"==typeof e&&e>-1&&e<n[n.length-1])for(;++t<n.length;)if(n[t]>e)return{line:t+1,column:e-(t>0?n[t-1]:0)+1,offset:e}},toOffset:function(e){const t=e&&e.line,r=e&&e.column;if("number"==typeof t&&"number"==typeof r&&!Number.isNaN(t)&&!Number.isNaN(r)&&t-1 in n){const e=(n[t-2]||0)+r-1||0;if(e>-1&&e<n[n.length-1])return e}}}}(t),i=r.toPoint(0),o=r.toPoint(t.length);n.position={start:i,end:o}}return n}case"#documentType":return n={type:"doctype"},Si(e,t,n),n;case"#text":return n={type:"text",value:t.value},Si(e,t,n),n;default:return n=function(e,t){const n=e.schema;e.schema=t.namespaceURI===p.svg?ci:li;let r=-1;const i={};for(;++r<t.attrs.length;){const e=t.attrs[r],n=(e.prefix?e.prefix+":":"")+e.name;yi.call(vi,n)||(i[n]=e.value)}const o=("svg"===e.schema.space?bi:mi)(t.tagName,i,wi(e,t.childNodes));if(Si(e,t,o),"template"===o.tagName){const n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&xi(r.startTag),a=r&&r.endTag&&xi(r.endTag),s=Ei(e,n.content);i&&a&&e.file&&(s.position={start:i.end,end:a.start}),o.content=s}return e.schema=n,o}(e,t),n}}function wi(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Ei(e,t[n]);r.push(i)}return r}function Si(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=Ti(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Ti(e,t,n){const r=xi(n);if("element"===t.type){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const r={};let i;if(n.attrs)for(i in n.attrs)yi.call(n.attrs,i)&&(r[oi(e.schema,i).property]=xi(n.attrs[i]));const o=xi(n.startTag),a=n.endTag?xi(n.endTag):void 0,s={opening:o};a&&(s.closing=a),s.properties=r,t.data={position:s}}}return r}function xi(e){const t=Ci({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Ci({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Ci(e){return e.line&&e.column?e:void 0}class Ai{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function Di(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Ai(n,r,t)}function Ri(e){return e.toLowerCase()}Ai.prototype.property={},Ai.prototype.normal={},Ai.prototype.space=null;class _i{constructor(e,t){this.property=e,this.attribute=t}}_i.prototype.space=null,_i.prototype.boolean=!1,_i.prototype.booleanish=!1,_i.prototype.overloadedBoolean=!1,_i.prototype.number=!1,_i.prototype.commaSeparated=!1,_i.prototype.spaceSeparated=!1,_i.prototype.commaOrSpaceSeparated=!1,_i.prototype.mustUseProperty=!1,_i.prototype.defined=!1;let Li=0;const Ni=Bi(),Ii=Bi(),Oi=Bi(),Mi=Bi(),Pi=Bi(),qi=Bi(),Fi=Bi();function Bi(){return 2**++Li}var Ui=Object.freeze({__proto__:null,boolean:Ni,booleanish:Ii,commaOrSpaceSeparated:Fi,commaSeparated:qi,number:Mi,overloadedBoolean:Oi,spaceSeparated:Pi});const Hi=Object.keys(Ui);class zi extends _i{constructor(e,t,n,r){let i=-1;if(super(e,t),ji(this,"space",r),"number"==typeof n)for(;++i<Hi.length;){const e=Hi[i];ji(this,Hi[i],(n&Ui[e])===Ui[e])}}}function ji(e,t,n){n&&(e[t]=n)}zi.prototype.defined=!0;const Vi={}.hasOwnProperty;function Gi(e){const t={},n={};let r;for(r in e.properties)if(Vi.call(e.properties,r)){const i=e.properties[r],o=new zi(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Ri(r)]=r,n[Ri(o.attribute)]=r}return new Ai(t,n,e.space)}const $i=Gi({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Yi=Gi({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Wi(e,t){return t in e?e[t]:t}function Qi(e,t){return Wi(e,t.toLowerCase())}const Xi=Gi({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Qi,properties:{xmlns:null,xmlnsXLink:null}}),Ki=Gi({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:Ii,ariaAutoComplete:null,ariaBusy:Ii,ariaChecked:Ii,ariaColCount:Mi,ariaColIndex:Mi,ariaColSpan:Mi,ariaControls:Pi,ariaCurrent:null,ariaDescribedBy:Pi,ariaDetails:null,ariaDisabled:Ii,ariaDropEffect:Pi,ariaErrorMessage:null,ariaExpanded:Ii,ariaFlowTo:Pi,ariaGrabbed:Ii,ariaHasPopup:null,ariaHidden:Ii,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Pi,ariaLevel:Mi,ariaLive:null,ariaModal:Ii,ariaMultiLine:Ii,ariaMultiSelectable:Ii,ariaOrientation:null,ariaOwns:Pi,ariaPlaceholder:null,ariaPosInSet:Mi,ariaPressed:Ii,ariaReadOnly:Ii,ariaRelevant:null,ariaRequired:Ii,ariaRoleDescription:Pi,ariaRowCount:Mi,ariaRowIndex:Mi,ariaRowSpan:Mi,ariaSelected:Ii,ariaSetSize:Mi,ariaSort:null,ariaValueMax:Mi,ariaValueMin:Mi,ariaValueNow:Mi,ariaValueText:null,role:null}}),Zi=Gi({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Qi,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:qi,acceptCharset:Pi,accessKey:Pi,action:null,allow:null,allowFullScreen:Ni,allowPaymentRequest:Ni,allowUserMedia:Ni,alt:null,as:null,async:Ni,autoCapitalize:null,autoComplete:Pi,autoFocus:Ni,autoPlay:Ni,blocking:Pi,capture:Ni,charSet:null,checked:Ni,cite:null,className:Pi,cols:Mi,colSpan:null,content:null,contentEditable:Ii,controls:Ni,controlsList:Pi,coords:Mi|qi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ni,defer:Ni,dir:null,dirName:null,disabled:Ni,download:Oi,draggable:Ii,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ni,formTarget:null,headers:Pi,height:Mi,hidden:Ni,high:Mi,href:null,hrefLang:null,htmlFor:Pi,httpEquiv:Pi,id:null,imageSizes:null,imageSrcSet:null,inert:Ni,inputMode:null,integrity:null,is:null,isMap:Ni,itemId:null,itemProp:Pi,itemRef:Pi,itemScope:Ni,itemType:Pi,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ni,low:Mi,manifest:null,max:null,maxLength:Mi,media:null,method:null,min:null,minLength:Mi,multiple:Ni,muted:Ni,name:null,nonce:null,noModule:Ni,noValidate:Ni,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ni,optimum:Mi,pattern:null,ping:Pi,placeholder:null,playsInline:Ni,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ni,referrerPolicy:null,rel:Pi,required:Ni,reversed:Ni,rows:Mi,rowSpan:Mi,sandbox:Pi,scope:null,scoped:Ni,seamless:Ni,selected:Ni,shape:null,size:Mi,sizes:null,slot:null,span:Mi,spellCheck:Ii,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Mi,step:null,style:null,tabIndex:Mi,target:null,title:null,translate:null,type:null,typeMustMatch:Ni,useMap:null,value:Ii,width:Mi,wrap:null,align:null,aLink:null,archive:Pi,axis:null,background:null,bgColor:null,border:Mi,borderColor:null,bottomMargin:Mi,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ni,declare:Ni,event:null,face:null,frame:null,frameBorder:null,hSpace:Mi,leftMargin:Mi,link:null,longDesc:null,lowSrc:null,marginHeight:Mi,marginWidth:Mi,noResize:Ni,noHref:Ni,noShade:Ni,noWrap:Ni,object:null,profile:null,prompt:null,rev:null,rightMargin:Mi,rules:null,scheme:null,scrolling:Ii,standby:null,summary:null,text:null,topMargin:Mi,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Mi,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ni,disableRemotePlayback:Ni,prefix:null,property:null,results:Mi,security:null,unselectable:null}}),Ji=Gi({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Wi,properties:{about:Fi,accentHeight:Mi,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Mi,amplitude:Mi,arabicForm:null,ascent:Mi,attributeName:null,attributeType:null,azimuth:Mi,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Mi,by:null,calcMode:null,capHeight:Mi,className:Pi,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Mi,diffuseConstant:Mi,direction:null,display:null,dur:null,divisor:Mi,dominantBaseline:null,download:Ni,dx:null,dy:null,edgeMode:null,editable:null,elevation:Mi,enableBackground:null,end:null,event:null,exponent:Mi,externalResourcesRequired:null,fill:null,fillOpacity:Mi,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:qi,g2:qi,glyphName:qi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Mi,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Mi,horizOriginX:Mi,horizOriginY:Mi,id:null,ideographic:Mi,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Mi,k:Mi,k1:Mi,k2:Mi,k3:Mi,k4:Mi,kernelMatrix:Fi,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Mi,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Mi,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Mi,overlineThickness:Mi,paintOrder:null,panose1:null,path:null,pathLength:Mi,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Pi,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Mi,pointsAtY:Mi,pointsAtZ:Mi,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Fi,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Fi,rev:Fi,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Fi,requiredFeatures:Fi,requiredFonts:Fi,requiredFormats:Fi,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Mi,specularExponent:Mi,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Mi,strikethroughThickness:Mi,string:null,stroke:null,strokeDashArray:Fi,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Mi,strokeOpacity:Mi,strokeWidth:null,style:null,surfaceScale:Mi,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Fi,tabIndex:Mi,tableValues:null,target:null,targetX:Mi,targetY:Mi,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Fi,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Mi,underlineThickness:Mi,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Mi,values:null,vAlphabetic:Mi,vMathematical:Mi,vectorEffect:null,vHanging:Mi,vIdeographic:Mi,version:null,vertAdvY:Mi,vertOriginX:Mi,vertOriginY:Mi,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Mi,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),eo=/^data[-\w.:]+$/i,to=/-[a-z]/g,no=/[A-Z]/g;function ro(e){return"-"+e.toLowerCase()}function io(e){return e.charAt(1).toUpperCase()}const oo=Di([Yi,$i,Xi,Ki,Zi],"html"),ao=Di([Yi,$i,Xi,Ki,Ji],"svg"),so={},lo={}.hasOwnProperty,co=g("type",{handlers:{root:function(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=ho(e.children,n,t),fo(e,n),n},element:function(e,t){const n=t;let r=n;"element"===e.type&&"svg"===e.tagName.toLowerCase()&&"html"===n.space&&(r=ao);const i=[];let o;if(e.properties)for(o in e.properties)if("children"!==o&&lo.call(e.properties,o)){const t=uo(r,o,e.properties[o]);t&&i.push(t)}const a={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:p[r.space],childNodes:[],parentNode:null};return a.childNodes=ho(e.children,a,r),fo(e,a),"template"===e.tagName&&e.content&&(a.content=function(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=ho(e.children,n,t),fo(e,n),n}(e.content,r)),a},text:function(e){const t={nodeName:"#text",value:e.value,parentNode:null};return fo(e,t),t},comment:function(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return fo(e,t),t},doctype:function(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return fo(e,t),t}}});function uo(e,t,n){const r=function(e,t){const n=Ri(t);let r=t,i=_i;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&eo.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(to,io);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!to.test(e)){let n=e.replace(no,ro);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=zi}return new i(r,t)}(e,t);if(!1===n||null==n||"number"==typeof n&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?m(n):b(n));const i={name:r.attribute,value:!0===n?"":String(n)};if(r.space&&"html"!==r.space&&"svg"!==r.space){const e=i.name.indexOf(":");e<0?i.prefix="":(i.name=i.name.slice(e+1),i.prefix=r.attribute.slice(0,e)),i.namespace=p[r.space]}return i}function ho(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const o=co(e[r],n);o.parentNode=t,i.push(o)}return i}function fo(e,t){const n=e.position;n&&n.start&&n.end&&(t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const po=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],go=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),mo="�";var bo;!function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.NUMBER_SIGN=35]="NUMBER_SIGN",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",e[e.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_F=102]="LATIN_SMALL_F",e[e.LATIN_SMALL_X=120]="LATIN_SMALL_X",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",e[e.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"}(bo=bo||(bo={}));const ko="[CDATA[",yo="doctype",vo="script";function Eo(e){return e>=55296&&e<=57343}function wo(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159}function So(e){return e>=64976&&e<=65007||go.has(e)}var To,xo,Co,Ao,Do,Ro,_o;!function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"}(To=To||(To={}));class Lo{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e){const{line:t,col:n,offset:r}=this;return{code:e,startLine:t,endLine:t,startCol:n,endCol:n,startOffset:r,endOffset:r}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if(function(e){return e>=56320&&e<=57343}(t))return this.pos++,this._addGap(),1024*(e-55296)+9216+t}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,bo.EOF;return this._err(To.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((32|this.html.charCodeAt(this.pos+t))!==e.charCodeAt(t))return!1;return!0}peek(e){const t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,bo.EOF;const n=this.html.charCodeAt(t);return n===bo.CARRIAGE_RETURN?bo.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,bo.EOF;let e=this.html.charCodeAt(this.pos);return e===bo.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,bo.LINE_FEED):e===bo.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Eo(e)&&(e=this._processSurrogate(e)),null===this.handler.onParseError||e>31&&e<127||e===bo.LINE_FEED||e===bo.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){wo(e)?this._err(To.controlCharacterInInputStream):So(e)&&this._err(To.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}function No(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}!function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"}(xo=xo||(xo={})),function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"}(Co=Co||(Co={})),function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"}(Ao=Ao||(Ao={})),function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"}(Do=Do||(Do={})),function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"}(Ro=Ro||(Ro={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SECTION=94]="SECTION",e[e.SELECT=95]="SELECT",e[e.SOURCE=96]="SOURCE",e[e.SMALL=97]="SMALL",e[e.SPAN=98]="SPAN",e[e.STRIKE=99]="STRIKE",e[e.STRONG=100]="STRONG",e[e.STYLE=101]="STYLE",e[e.SUB=102]="SUB",e[e.SUMMARY=103]="SUMMARY",e[e.SUP=104]="SUP",e[e.TABLE=105]="TABLE",e[e.TBODY=106]="TBODY",e[e.TEMPLATE=107]="TEMPLATE",e[e.TEXTAREA=108]="TEXTAREA",e[e.TFOOT=109]="TFOOT",e[e.TD=110]="TD",e[e.TH=111]="TH",e[e.THEAD=112]="THEAD",e[e.TITLE=113]="TITLE",e[e.TR=114]="TR",e[e.TRACK=115]="TRACK",e[e.TT=116]="TT",e[e.U=117]="U",e[e.UL=118]="UL",e[e.SVG=119]="SVG",e[e.VAR=120]="VAR",e[e.WBR=121]="WBR",e[e.XMP=122]="XMP"}(_o=_o||(_o={}));const Io=new Map([[Ro.A,_o.A],[Ro.ADDRESS,_o.ADDRESS],[Ro.ANNOTATION_XML,_o.ANNOTATION_XML],[Ro.APPLET,_o.APPLET],[Ro.AREA,_o.AREA],[Ro.ARTICLE,_o.ARTICLE],[Ro.ASIDE,_o.ASIDE],[Ro.B,_o.B],[Ro.BASE,_o.BASE],[Ro.BASEFONT,_o.BASEFONT],[Ro.BGSOUND,_o.BGSOUND],[Ro.BIG,_o.BIG],[Ro.BLOCKQUOTE,_o.BLOCKQUOTE],[Ro.BODY,_o.BODY],[Ro.BR,_o.BR],[Ro.BUTTON,_o.BUTTON],[Ro.CAPTION,_o.CAPTION],[Ro.CENTER,_o.CENTER],[Ro.CODE,_o.CODE],[Ro.COL,_o.COL],[Ro.COLGROUP,_o.COLGROUP],[Ro.DD,_o.DD],[Ro.DESC,_o.DESC],[Ro.DETAILS,_o.DETAILS],[Ro.DIALOG,_o.DIALOG],[Ro.DIR,_o.DIR],[Ro.DIV,_o.DIV],[Ro.DL,_o.DL],[Ro.DT,_o.DT],[Ro.EM,_o.EM],[Ro.EMBED,_o.EMBED],[Ro.FIELDSET,_o.FIELDSET],[Ro.FIGCAPTION,_o.FIGCAPTION],[Ro.FIGURE,_o.FIGURE],[Ro.FONT,_o.FONT],[Ro.FOOTER,_o.FOOTER],[Ro.FOREIGN_OBJECT,_o.FOREIGN_OBJECT],[Ro.FORM,_o.FORM],[Ro.FRAME,_o.FRAME],[Ro.FRAMESET,_o.FRAMESET],[Ro.H1,_o.H1],[Ro.H2,_o.H2],[Ro.H3,_o.H3],[Ro.H4,_o.H4],[Ro.H5,_o.H5],[Ro.H6,_o.H6],[Ro.HEAD,_o.HEAD],[Ro.HEADER,_o.HEADER],[Ro.HGROUP,_o.HGROUP],[Ro.HR,_o.HR],[Ro.HTML,_o.HTML],[Ro.I,_o.I],[Ro.IMG,_o.IMG],[Ro.IMAGE,_o.IMAGE],[Ro.INPUT,_o.INPUT],[Ro.IFRAME,_o.IFRAME],[Ro.KEYGEN,_o.KEYGEN],[Ro.LABEL,_o.LABEL],[Ro.LI,_o.LI],[Ro.LINK,_o.LINK],[Ro.LISTING,_o.LISTING],[Ro.MAIN,_o.MAIN],[Ro.MALIGNMARK,_o.MALIGNMARK],[Ro.MARQUEE,_o.MARQUEE],[Ro.MATH,_o.MATH],[Ro.MENU,_o.MENU],[Ro.META,_o.META],[Ro.MGLYPH,_o.MGLYPH],[Ro.MI,_o.MI],[Ro.MO,_o.MO],[Ro.MN,_o.MN],[Ro.MS,_o.MS],[Ro.MTEXT,_o.MTEXT],[Ro.NAV,_o.NAV],[Ro.NOBR,_o.NOBR],[Ro.NOFRAMES,_o.NOFRAMES],[Ro.NOEMBED,_o.NOEMBED],[Ro.NOSCRIPT,_o.NOSCRIPT],[Ro.OBJECT,_o.OBJECT],[Ro.OL,_o.OL],[Ro.OPTGROUP,_o.OPTGROUP],[Ro.OPTION,_o.OPTION],[Ro.P,_o.P],[Ro.PARAM,_o.PARAM],[Ro.PLAINTEXT,_o.PLAINTEXT],[Ro.PRE,_o.PRE],[Ro.RB,_o.RB],[Ro.RP,_o.RP],[Ro.RT,_o.RT],[Ro.RTC,_o.RTC],[Ro.RUBY,_o.RUBY],[Ro.S,_o.S],[Ro.SCRIPT,_o.SCRIPT],[Ro.SECTION,_o.SECTION],[Ro.SELECT,_o.SELECT],[Ro.SOURCE,_o.SOURCE],[Ro.SMALL,_o.SMALL],[Ro.SPAN,_o.SPAN],[Ro.STRIKE,_o.STRIKE],[Ro.STRONG,_o.STRONG],[Ro.STYLE,_o.STYLE],[Ro.SUB,_o.SUB],[Ro.SUMMARY,_o.SUMMARY],[Ro.SUP,_o.SUP],[Ro.TABLE,_o.TABLE],[Ro.TBODY,_o.TBODY],[Ro.TEMPLATE,_o.TEMPLATE],[Ro.TEXTAREA,_o.TEXTAREA],[Ro.TFOOT,_o.TFOOT],[Ro.TD,_o.TD],[Ro.TH,_o.TH],[Ro.THEAD,_o.THEAD],[Ro.TITLE,_o.TITLE],[Ro.TR,_o.TR],[Ro.TRACK,_o.TRACK],[Ro.TT,_o.TT],[Ro.U,_o.U],[Ro.UL,_o.UL],[Ro.SVG,_o.SVG],[Ro.VAR,_o.VAR],[Ro.WBR,_o.WBR],[Ro.XMP,_o.XMP]]);function Oo(e){var t;return null!==(t=Io.get(e))&&void 0!==t?t:_o.UNKNOWN}const Mo=_o,Po={[Co.HTML]:new Set([Mo.ADDRESS,Mo.APPLET,Mo.AREA,Mo.ARTICLE,Mo.ASIDE,Mo.BASE,Mo.BASEFONT,Mo.BGSOUND,Mo.BLOCKQUOTE,Mo.BODY,Mo.BR,Mo.BUTTON,Mo.CAPTION,Mo.CENTER,Mo.COL,Mo.COLGROUP,Mo.DD,Mo.DETAILS,Mo.DIR,Mo.DIV,Mo.DL,Mo.DT,Mo.EMBED,Mo.FIELDSET,Mo.FIGCAPTION,Mo.FIGURE,Mo.FOOTER,Mo.FORM,Mo.FRAME,Mo.FRAMESET,Mo.H1,Mo.H2,Mo.H3,Mo.H4,Mo.H5,Mo.H6,Mo.HEAD,Mo.HEADER,Mo.HGROUP,Mo.HR,Mo.HTML,Mo.IFRAME,Mo.IMG,Mo.INPUT,Mo.LI,Mo.LINK,Mo.LISTING,Mo.MAIN,Mo.MARQUEE,Mo.MENU,Mo.META,Mo.NAV,Mo.NOEMBED,Mo.NOFRAMES,Mo.NOSCRIPT,Mo.OBJECT,Mo.OL,Mo.P,Mo.PARAM,Mo.PLAINTEXT,Mo.PRE,Mo.SCRIPT,Mo.SECTION,Mo.SELECT,Mo.SOURCE,Mo.STYLE,Mo.SUMMARY,Mo.TABLE,Mo.TBODY,Mo.TD,Mo.TEMPLATE,Mo.TEXTAREA,Mo.TFOOT,Mo.TH,Mo.THEAD,Mo.TITLE,Mo.TR,Mo.TRACK,Mo.UL,Mo.WBR,Mo.XMP]),[Co.MATHML]:new Set([Mo.MI,Mo.MO,Mo.MN,Mo.MS,Mo.MTEXT,Mo.ANNOTATION_XML]),[Co.SVG]:new Set([Mo.TITLE,Mo.FOREIGN_OBJECT,Mo.DESC]),[Co.XLINK]:new Set,[Co.XML]:new Set,[Co.XMLNS]:new Set};function qo(e){return e===Mo.H1||e===Mo.H2||e===Mo.H3||e===Mo.H4||e===Mo.H5||e===Mo.H6}const Fo=new Map([[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);var Bo;!function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",e[e.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",e[e.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",e[e.HEXADEMICAL_CHARACTER_REFERENCE=76]="HEXADEMICAL_CHARACTER_REFERENCE",e[e.DECIMAL_CHARACTER_REFERENCE=77]="DECIMAL_CHARACTER_REFERENCE",e[e.NUMERIC_CHARACTER_REFERENCE_END=78]="NUMERIC_CHARACTER_REFERENCE_END"}(Bo||(Bo={}));const Uo={DATA:Bo.DATA,RCDATA:Bo.RCDATA,RAWTEXT:Bo.RAWTEXT,SCRIPT_DATA:Bo.SCRIPT_DATA,PLAINTEXT:Bo.PLAINTEXT};function Ho(e){return e>=bo.DIGIT_0&&e<=bo.DIGIT_9}function zo(e){return e>=bo.LATIN_CAPITAL_A&&e<=bo.LATIN_CAPITAL_Z}function jo(e){return function(e){return e>=bo.LATIN_SMALL_A&&e<=bo.LATIN_SMALL_Z}(e)||zo(e)}function Vo(e){return jo(e)||Ho(e)}function Go(e){return e>=bo.LATIN_CAPITAL_A&&e<=bo.LATIN_CAPITAL_F}function $o(e){return e>=bo.LATIN_SMALL_A&&e<=bo.LATIN_SMALL_F}function Yo(e){return e+32}function Wo(e){return e===bo.SPACE||e===bo.LINE_FEED||e===bo.TABULATION||e===bo.FORM_FEED}function Qo(e){return Wo(e)||e===bo.SOLIDUS||e===bo.GREATER_THAN_SIGN}class Xo{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=Bo.DATA,this.returnState=Bo.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Lo(t),this.currentLocation=this.getCurrentLocation(-1)}_err(e){var t,n;null===(n=(t=this.handler).onParseError)||void 0===n||n.call(t,this.preprocessor.getError(e))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,this.inLoop||(this._runParsingLoop(),this.paused||null==e||e())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||null==n||n()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return!!this.preprocessor.endOfChunkHit&&(this._unconsume(this.consumedAfterSnapshot),this.active=!1,!0)}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(e){this.consumedAfterSnapshot-=e,this.preprocessor.retreat(e)}_reconsumeInState(e,t){this.state=e,this._callState(t)}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return!!this.preprocessor.startsWith(e,t)&&(this._advanceBy(e.length-1),!0)}_createStartTagToken(){this.currentToken={type:xo.START_TAG,tagName:"",tagID:_o.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:xo.END_TAG,tagName:"",tagID:_o.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:xo.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:xo.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t;const n=this.currentToken;null===No(n,this.currentAttr.name)?(n.attrs.push(this.currentAttr),n.location&&this.currentLocation&&((null!==(e=(t=n.location).attrs)&&void 0!==e?e:t.attrs=Object.create(null))[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue())):this._err(To.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const e=this.currentToken;this.prepareToken(e),e.tagID=Oo(e.tagName),e.type===xo.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(To.endTagWithAttributes),e.selfClosing&&this._err(To.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case xo.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case xo.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case xo.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:xo.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e)return void(this.currentCharacterToken.chars+=t);this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){const t=Wo(e)?xo.WHITESPACE_CHARACTER:e===bo.NULL?xo.NULL_CHARACTER:xo.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(xo.CHARACTER,e)}_matchNamedCharacterReference(e){let t=null,n=0,r=!1;for(let o=0,a=y[0];o>=0&&(o=k(y,a,o+1,e),!(o<0));e=this._consume()){n+=1,a=y[o];const s=a&v.VALUE_LENGTH;if(s){const a=(s>>14)-1;if(e!==bo.SEMICOLON&&this._isCharacterReferenceInAttribute()&&((i=this.preprocessor.peek(1))===bo.EQUALS_SIGN||Vo(i))?(t=[bo.AMPERSAND],o+=a):(t=0===a?[y[o]&~v.VALUE_LENGTH]:1===a?[y[++o]]:[y[++o],y[++o]],n=0,r=e!==bo.SEMICOLON),0===a){this._consume();break}}}var i;return this._unconsume(n),r&&!this.preprocessor.endOfChunkHit&&this._err(To.missingSemicolonAfterCharacterReference),this._unconsume(1),t}_isCharacterReferenceInAttribute(){return this.returnState===Bo.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Bo.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Bo.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Bo.DATA:this._stateData(e);break;case Bo.RCDATA:this._stateRcdata(e);break;case Bo.RAWTEXT:this._stateRawtext(e);break;case Bo.SCRIPT_DATA:this._stateScriptData(e);break;case Bo.PLAINTEXT:this._statePlaintext(e);break;case Bo.TAG_OPEN:this._stateTagOpen(e);break;case Bo.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Bo.TAG_NAME:this._stateTagName(e);break;case Bo.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Bo.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Bo.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Bo.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Bo.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Bo.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Bo.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Bo.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Bo.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Bo.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Bo.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Bo.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Bo.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Bo.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Bo.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Bo.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Bo.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Bo.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Bo.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Bo.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Bo.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Bo.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Bo.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Bo.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Bo.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Bo.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Bo.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Bo.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Bo.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Bo.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Bo.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Bo.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Bo.BOGUS_COMMENT:this._stateBogusComment(e);break;case Bo.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Bo.COMMENT_START:this._stateCommentStart(e);break;case Bo.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Bo.COMMENT:this._stateComment(e);break;case Bo.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Bo.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Bo.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Bo.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Bo.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Bo.COMMENT_END:this._stateCommentEnd(e);break;case Bo.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Bo.DOCTYPE:this._stateDoctype(e);break;case Bo.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Bo.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Bo.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Bo.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Bo.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Bo.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Bo.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Bo.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Bo.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Bo.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Bo.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Bo.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Bo.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Bo.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Bo.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Bo.CDATA_SECTION:this._stateCdataSection(e);break;case Bo.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Bo.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Bo.CHARACTER_REFERENCE:this._stateCharacterReference(e);break;case Bo.NAMED_CHARACTER_REFERENCE:this._stateNamedCharacterReference(e);break;case Bo.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;case Bo.NUMERIC_CHARACTER_REFERENCE:this._stateNumericCharacterReference(e);break;case Bo.HEXADEMICAL_CHARACTER_REFERENCE_START:this._stateHexademicalCharacterReferenceStart(e);break;case Bo.HEXADEMICAL_CHARACTER_REFERENCE:this._stateHexademicalCharacterReference(e);break;case Bo.DECIMAL_CHARACTER_REFERENCE:this._stateDecimalCharacterReference(e);break;case Bo.NUMERIC_CHARACTER_REFERENCE_END:this._stateNumericCharacterReferenceEnd(e);break;default:throw new Error("Unknown state")}}_stateData(e){switch(e){case bo.LESS_THAN_SIGN:this.state=Bo.TAG_OPEN;break;case bo.AMPERSAND:this.returnState=Bo.DATA,this.state=Bo.CHARACTER_REFERENCE;break;case bo.NULL:this._err(To.unexpectedNullCharacter),this._emitCodePoint(e);break;case bo.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case bo.AMPERSAND:this.returnState=Bo.RCDATA,this.state=Bo.CHARACTER_REFERENCE;break;case bo.LESS_THAN_SIGN:this.state=Bo.RCDATA_LESS_THAN_SIGN;break;case bo.NULL:this._err(To.unexpectedNullCharacter),this._emitChars(mo);break;case bo.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case bo.LESS_THAN_SIGN:this.state=Bo.RAWTEXT_LESS_THAN_SIGN;break;case bo.NULL:this._err(To.unexpectedNullCharacter),this._emitChars(mo);break;case bo.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case bo.LESS_THAN_SIGN:this.state=Bo.SCRIPT_DATA_LESS_THAN_SIGN;break;case bo.NULL:this._err(To.unexpectedNullCharacter),this._emitChars(mo);break;case bo.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case bo.NULL:this._err(To.unexpectedNullCharacter),this._emitChars(mo);break;case bo.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(jo(e))this._createStartTagToken(),this.state=Bo.TAG_NAME,this._stateTagName(e);else switch(e){case bo.EXCLAMATION_MARK:this.state=Bo.MARKUP_DECLARATION_OPEN;break;case bo.SOLIDUS:this.state=Bo.END_TAG_OPEN;break;case bo.QUESTION_MARK:this._err(To.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Bo.BOGUS_COMMENT,this._stateBogusComment(e);break;case bo.EOF:this._err(To.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(To.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=Bo.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(jo(e))this._createEndTagToken(),this.state=Bo.TAG_NAME,this._stateTagName(e);else switch(e){case bo.GREATER_THAN_SIGN:this._err(To.missingEndTagName),this.state=Bo.DATA;break;case bo.EOF:this._err(To.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break;default:this._err(To.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=Bo.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){const t=this.currentToken;switch(e){case bo.SPACE:case bo.LINE_FEED:case bo.TABULATION:case bo.FORM_FEED:this.state=Bo.BEFORE_ATTRIBUTE_NAME;break;case bo.SOLIDUS:this.state=Bo.SELF_CLOSING_START_TAG;break;case bo.GREATER_THAN_SIGN:this.state=Bo.DATA,this.emitCurrentTagToken();break;case bo.NULL:this._err(To.unexpectedNullCharacter),t.tagName+=mo;break;case bo.EOF:this._err(To.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(zo(e)?Yo(e):e)}}_stateRcdataLessThanSign(e){e===bo.SOLIDUS?this.state=Bo.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=Bo.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){jo(e)?(this.state=Bo.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=Bo.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();switch(this._createEndTagToken(),this.currentToken.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case bo.SPACE:case bo.LINE_FEED:case bo.TABULATION:case bo.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=Bo.BEFORE_ATTRIBUTE_NAME,!1;case bo.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=Bo.SELF_CLOSING_START_TAG,!1;case bo.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=Bo.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=Bo.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===bo.SOLIDUS?this.state=Bo.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=Bo.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){jo(e)?(this.state=Bo.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=Bo.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=Bo.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case bo.SOLIDUS:this.state=Bo.SCRIPT_DATA_END_TAG_OPEN;break;case bo.EXCLAMATION_MARK:this.state=Bo.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break;default:this._emitChars("<"),this.state=Bo.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){jo(e)?(this.state=Bo.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=Bo.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=Bo.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===bo.HYPHEN_MINUS?(this.state=Bo.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=Bo.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===bo.HYPHEN_MINUS?(this.state=Bo.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=Bo.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case bo.HYPHEN_MINUS:this.state=Bo.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break;case bo.LESS_THAN_SIGN:this.state=Bo.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case bo.NULL:this._err(To.unexpectedNullCharacter),this._emitChars(mo);break;case bo.EOF:this._err(To.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case bo.HYPHEN_MINUS:this.state=Bo.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break;case bo.LESS_THAN_SIGN:this.state=Bo.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case bo.NULL:this._err(To.unexpectedNullCharacter),this.state=Bo.SCRIPT_DATA_ESCAPED,this._emitChars(mo);break;case bo.EOF:this._err(To.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Bo.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case bo.HYPHEN_MINUS:this._emitChars("-");break;case bo.LESS_THAN_SIGN:this.state=Bo.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case bo.GREATER_THAN_SIGN:this.state=Bo.SCRIPT_DATA,this._emitChars(">");break;case bo.NULL:this._err(To.unexpectedNullCharacter),this.state=Bo.SCRIPT_DATA_ESCAPED,this._emitChars(mo);break;case bo.EOF:this._err(To.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Bo.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===bo.SOLIDUS?this.state=Bo.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:jo(e)?(this._emitChars("<"),this.state=Bo.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=Bo.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){jo(e)?(this.state=Bo.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=Bo.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=Bo.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(vo,!1)&&Qo(this.preprocessor.peek(6))){this._emitCodePoint(e);for(let e=0;e<6;e++)this._emitCodePoint(this._consume());this.state=Bo.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=Bo.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case bo.HYPHEN_MINUS:this.state=Bo.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break;case bo.LESS_THAN_SIGN:this.state=Bo.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case bo.NULL:this._err(To.unexpectedNullCharacter),this._emitChars(mo);break;case bo.EOF:this._err(To.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case bo.HYPHEN_MINUS:this.state=Bo.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break;case bo.LESS_THAN_SIGN:this.state=Bo.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case bo.NULL:this._err(To.unexpectedNullCharacter),this.state=Bo.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(mo);break;case bo.EOF:this._err(To.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Bo.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case bo.HYPHEN_MINUS:this._emitChars("-");break;case bo.LESS_THAN_SIGN:this.state=Bo.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case bo.GREATER_THAN_SIGN:this.state=Bo.SCRIPT_DATA,this._emitChars(">");break;case bo.NULL:this._err(To.unexpectedNullCharacter),this.state=Bo.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(mo);break;case bo.EOF:this._err(To.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Bo.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===bo.SOLIDUS?(this.state=Bo.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=Bo.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(vo,!1)&&Qo(this.preprocessor.peek(6))){this._emitCodePoint(e);for(let e=0;e<6;e++)this._emitCodePoint(this._consume());this.state=Bo.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Bo.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case bo.SPACE:case bo.LINE_FEED:case bo.TABULATION:case bo.FORM_FEED:break;case bo.SOLIDUS:case bo.GREATER_THAN_SIGN:case bo.EOF:this.state=Bo.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case bo.EQUALS_SIGN:this._err(To.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=Bo.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=Bo.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case bo.SPACE:case bo.LINE_FEED:case bo.TABULATION:case bo.FORM_FEED:case bo.SOLIDUS:case bo.GREATER_THAN_SIGN:case bo.EOF:this._leaveAttrName(),this.state=Bo.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case bo.EQUALS_SIGN:this._leaveAttrName(),this.state=Bo.BEFORE_ATTRIBUTE_VALUE;break;case bo.QUOTATION_MARK:case bo.APOSTROPHE:case bo.LESS_THAN_SIGN:this._err(To.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case bo.NULL:this._err(To.unexpectedNullCharacter),this.currentAttr.name+=mo;break;default:this.currentAttr.name+=String.fromCodePoint(zo(e)?Yo(e):e)}}_stateAfterAttributeName(e){switch(e){case bo.SPACE:case bo.LINE_FEED:case bo.TABULATION:case bo.FORM_FEED:break;case bo.SOLIDUS:this.state=Bo.SELF_CLOSING_START_TAG;break;case bo.EQUALS_SIGN:this.state=Bo.BEFORE_ATTRIBUTE_VALUE;break;case bo.GREATER_THAN_SIGN:this.state=Bo.DATA,this.emitCurrentTagToken();break;case bo.EOF:this._err(To.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=Bo.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case bo.SPACE:case bo.LINE_FEED:case bo.TABULATION:case bo.FORM_FEED:break;case bo.QUOTATION_MARK:this.state=Bo.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case bo.APOSTROPHE:this.state=Bo.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case bo.GREATER_THAN_SIGN:this._err(To.missingAttributeValue),this.state=Bo.DATA,this.emitCurrentTagToken();break;default:this.state=Bo.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case bo.QUOTATION_MARK:this.state=Bo.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case bo.AMPERSAND:this.returnState=Bo.ATTRIBUTE_VALUE_DOUBLE_QUOTED,this.state=Bo.CHARACTER_REFERENCE;break;case bo.NULL:this._err(To.unexpectedNullCharacter),this.currentAttr.value+=mo;break;case bo.EOF:this._err(To.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case bo.APOSTROPHE:this.state=Bo.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case bo.AMPERSAND:this.returnState=Bo.ATTRIBUTE_VALUE_SINGLE_QUOTED,this.state=Bo.CHARACTER_REFERENCE;break;case bo.NULL:this._err(To.unexpectedNullCharacter),this.currentAttr.value+=mo;break;case bo.EOF:this._err(To.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case bo.SPACE:case bo.LINE_FEED:case bo.TABULATION:case bo.FORM_FEED:this._leaveAttrValue(),this.state=Bo.BEFORE_ATTRIBUTE_NAME;break;case bo.AMPERSAND:this.returnState=Bo.ATTRIBUTE_VALUE_UNQUOTED,this.state=Bo.CHARACTER_REFERENCE;break;case bo.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Bo.DATA,this.emitCurrentTagToken();break;case bo.NULL:this._err(To.unexpectedNullCharacter),this.currentAttr.value+=mo;break;case bo.QUOTATION_MARK:case bo.APOSTROPHE:case bo.LESS_THAN_SIGN:case bo.EQUALS_SIGN:case bo.GRAVE_ACCENT:this._err(To.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case bo.EOF:this._err(To.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case bo.SPACE:case bo.LINE_FEED:case bo.TABULATION:case bo.FORM_FEED:this._leaveAttrValue(),this.state=Bo.BEFORE_ATTRIBUTE_NAME;break;case bo.SOLIDUS:this._leaveAttrValue(),this.state=Bo.SELF_CLOSING_START_TAG;break;case bo.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Bo.DATA,this.emitCurrentTagToken();break;case bo.EOF:this._err(To.eofInTag),this._emitEOFToken();break;default:this._err(To.missingWhitespaceBetweenAttributes),this.state=Bo.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case bo.GREATER_THAN_SIGN:this.currentToken.selfClosing=!0,this.state=Bo.DATA,this.emitCurrentTagToken();break;case bo.EOF:this._err(To.eofInTag),this._emitEOFToken();break;default:this._err(To.unexpectedSolidusInTag),this.state=Bo.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){const t=this.currentToken;switch(e){case bo.GREATER_THAN_SIGN:this.state=Bo.DATA,this.emitCurrentComment(t);break;case bo.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case bo.NULL:this._err(To.unexpectedNullCharacter),t.data+=mo;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch("--",!0)?(this._createCommentToken(3),this.state=Bo.COMMENT_START):this._consumeSequenceIfMatch(yo,!1)?(this.currentLocation=this.getCurrentLocation(8),this.state=Bo.DOCTYPE):this._consumeSequenceIfMatch(ko,!0)?this.inForeignNode?this.state=Bo.CDATA_SECTION:(this._err(To.cdataInHtmlContent),this._createCommentToken(8),this.currentToken.data="[CDATA[",this.state=Bo.BOGUS_COMMENT):this._ensureHibernation()||(this._err(To.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Bo.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case bo.HYPHEN_MINUS:this.state=Bo.COMMENT_START_DASH;break;case bo.GREATER_THAN_SIGN:this._err(To.abruptClosingOfEmptyComment),this.state=Bo.DATA,this.emitCurrentComment(this.currentToken);break;default:this.state=Bo.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){const t=this.currentToken;switch(e){case bo.HYPHEN_MINUS:this.state=Bo.COMMENT_END;break;case bo.GREATER_THAN_SIGN:this._err(To.abruptClosingOfEmptyComment),this.state=Bo.DATA,this.emitCurrentComment(t);break;case bo.EOF:this._err(To.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=Bo.COMMENT,this._stateComment(e)}}_stateComment(e){const t=this.currentToken;switch(e){case bo.HYPHEN_MINUS:this.state=Bo.COMMENT_END_DASH;break;case bo.LESS_THAN_SIGN:t.data+="<",this.state=Bo.COMMENT_LESS_THAN_SIGN;break;case bo.NULL:this._err(To.unexpectedNullCharacter),t.data+=mo;break;case bo.EOF:this._err(To.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){const t=this.currentToken;switch(e){case bo.EXCLAMATION_MARK:t.data+="!",this.state=Bo.COMMENT_LESS_THAN_SIGN_BANG;break;case bo.LESS_THAN_SIGN:t.data+="<";break;default:this.state=Bo.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===bo.HYPHEN_MINUS?this.state=Bo.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Bo.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===bo.HYPHEN_MINUS?this.state=Bo.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Bo.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==bo.GREATER_THAN_SIGN&&e!==bo.EOF&&this._err(To.nestedComment),this.state=Bo.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){const t=this.currentToken;switch(e){case bo.HYPHEN_MINUS:this.state=Bo.COMMENT_END;break;case bo.EOF:this._err(To.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=Bo.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){const t=this.currentToken;switch(e){case bo.GREATER_THAN_SIGN:this.state=Bo.DATA,this.emitCurrentComment(t);break;case bo.EXCLAMATION_MARK:this.state=Bo.COMMENT_END_BANG;break;case bo.HYPHEN_MINUS:t.data+="-";break;case bo.EOF:this._err(To.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=Bo.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){const t=this.currentToken;switch(e){case bo.HYPHEN_MINUS:t.data+="--!",this.state=Bo.COMMENT_END_DASH;break;case bo.GREATER_THAN_SIGN:this._err(To.incorrectlyClosedComment),this.state=Bo.DATA,this.emitCurrentComment(t);break;case bo.EOF:this._err(To.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=Bo.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case bo.SPACE:case bo.LINE_FEED:case bo.TABULATION:case bo.FORM_FEED:this.state=Bo.BEFORE_DOCTYPE_NAME;break;case bo.GREATER_THAN_SIGN:this.state=Bo.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case bo.EOF:{this._err(To.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(To.missingWhitespaceBeforeDoctypeName),this.state=Bo.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(zo(e))this._createDoctypeToken(String.fromCharCode(Yo(e))),this.state=Bo.DOCTYPE_NAME;else switch(e){case bo.SPACE:case bo.LINE_FEED:case bo.TABULATION:case bo.FORM_FEED:break;case bo.NULL:this._err(To.unexpectedNullCharacter),this._createDoctypeToken(mo),this.state=Bo.DOCTYPE_NAME;break;case bo.GREATER_THAN_SIGN:{this._err(To.missingDoctypeName),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=Bo.DATA;break}case bo.EOF:{this._err(To.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=Bo.DOCTYPE_NAME}}_stateDoctypeName(e){const t=this.currentToken;switch(e){case bo.SPACE:case bo.LINE_FEED:case bo.TABULATION:case bo.FORM_FEED:this.state=Bo.AFTER_DOCTYPE_NAME;break;case bo.GREATER_THAN_SIGN:this.state=Bo.DATA,this.emitCurrentDoctype(t);break;case bo.NULL:this._err(To.unexpectedNullCharacter),t.name+=mo;break;case bo.EOF:this._err(To.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(zo(e)?Yo(e):e)}}_stateAfterDoctypeName(e){const t=this.currentToken;switch(e){case bo.SPACE:case bo.LINE_FEED:case bo.TABULATION:case bo.FORM_FEED:break;case bo.GREATER_THAN_SIGN:this.state=Bo.DATA,this.emitCurrentDoctype(t);break;case bo.EOF:this._err(To.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch("public",!1)?this.state=Bo.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch("system",!1)?this.state=Bo.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(To.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=Bo.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){const t=this.currentToken;switch(e){case bo.SPACE:case bo.LINE_FEED:case bo.TABULATION:case bo.FORM_FEED:this.state=Bo.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case bo.QUOTATION_MARK:this._err(To.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=Bo.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case bo.APOSTROPHE:this._err(To.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=Bo.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case bo.GREATER_THAN_SIGN:this._err(To.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Bo.DATA,this.emitCurrentDoctype(t);break;case bo.EOF:this._err(To.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(To.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Bo.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case bo.SPACE:case bo.LINE_FEED:case bo.TABULATION:case bo.FORM_FEED:break;case bo.QUOTATION_MARK:t.publicId="",this.state=Bo.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case bo.APOSTROPHE:t.publicId="",this.state=Bo.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case bo.GREATER_THAN_SIGN:this._err(To.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Bo.DATA,this.emitCurrentDoctype(t);break;case bo.EOF:this._err(To.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(To.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Bo.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case bo.QUOTATION_MARK:this.state=Bo.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case bo.NULL:this._err(To.unexpectedNullCharacter),t.publicId+=mo;break;case bo.GREATER_THAN_SIGN:this._err(To.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Bo.DATA;break;case bo.EOF:this._err(To.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case bo.APOSTROPHE:this.state=Bo.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case bo.NULL:this._err(To.unexpectedNullCharacter),t.publicId+=mo;break;case bo.GREATER_THAN_SIGN:this._err(To.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Bo.DATA;break;case bo.EOF:this._err(To.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case bo.SPACE:case bo.LINE_FEED:case bo.TABULATION:case bo.FORM_FEED:this.state=Bo.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case bo.GREATER_THAN_SIGN:this.state=Bo.DATA,this.emitCurrentDoctype(t);break;case bo.QUOTATION_MARK:this._err(To.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=Bo.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case bo.APOSTROPHE:this._err(To.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=Bo.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case bo.EOF:this._err(To.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(To.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Bo.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){const t=this.currentToken;switch(e){case bo.SPACE:case bo.LINE_FEED:case bo.TABULATION:case bo.FORM_FEED:break;case bo.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Bo.DATA;break;case bo.QUOTATION_MARK:t.systemId="",this.state=Bo.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case bo.APOSTROPHE:t.systemId="",this.state=Bo.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case bo.EOF:this._err(To.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(To.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Bo.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){const t=this.currentToken;switch(e){case bo.SPACE:case bo.LINE_FEED:case bo.TABULATION:case bo.FORM_FEED:this.state=Bo.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case bo.QUOTATION_MARK:this._err(To.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=Bo.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case bo.APOSTROPHE:this._err(To.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=Bo.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case bo.GREATER_THAN_SIGN:this._err(To.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Bo.DATA,this.emitCurrentDoctype(t);break;case bo.EOF:this._err(To.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(To.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Bo.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case bo.SPACE:case bo.LINE_FEED:case bo.TABULATION:case bo.FORM_FEED:break;case bo.QUOTATION_MARK:t.systemId="",this.state=Bo.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case bo.APOSTROPHE:t.systemId="",this.state=Bo.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case bo.GREATER_THAN_SIGN:this._err(To.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Bo.DATA,this.emitCurrentDoctype(t);break;case bo.EOF:this._err(To.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(To.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Bo.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case bo.QUOTATION_MARK:this.state=Bo.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case bo.NULL:this._err(To.unexpectedNullCharacter),t.systemId+=mo;break;case bo.GREATER_THAN_SIGN:this._err(To.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Bo.DATA;break;case bo.EOF:this._err(To.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case bo.APOSTROPHE:this.state=Bo.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case bo.NULL:this._err(To.unexpectedNullCharacter),t.systemId+=mo;break;case bo.GREATER_THAN_SIGN:this._err(To.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Bo.DATA;break;case bo.EOF:this._err(To.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case bo.SPACE:case bo.LINE_FEED:case bo.TABULATION:case bo.FORM_FEED:break;case bo.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Bo.DATA;break;case bo.EOF:this._err(To.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(To.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Bo.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){const t=this.currentToken;switch(e){case bo.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Bo.DATA;break;case bo.NULL:this._err(To.unexpectedNullCharacter);break;case bo.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case bo.RIGHT_SQUARE_BRACKET:this.state=Bo.CDATA_SECTION_BRACKET;break;case bo.EOF:this._err(To.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===bo.RIGHT_SQUARE_BRACKET?this.state=Bo.CDATA_SECTION_END:(this._emitChars("]"),this.state=Bo.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case bo.GREATER_THAN_SIGN:this.state=Bo.DATA;break;case bo.RIGHT_SQUARE_BRACKET:this._emitChars("]");break;default:this._emitChars("]]"),this.state=Bo.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(e){e===bo.NUMBER_SIGN?this.state=Bo.NUMERIC_CHARACTER_REFERENCE:Vo(e)?(this.state=Bo.NAMED_CHARACTER_REFERENCE,this._stateNamedCharacterReference(e)):(this._flushCodePointConsumedAsCharacterReference(bo.AMPERSAND),this._reconsumeInState(this.returnState,e))}_stateNamedCharacterReference(e){const t=this._matchNamedCharacterReference(e);if(this._ensureHibernation());else if(t){for(let e=0;e<t.length;e++)this._flushCodePointConsumedAsCharacterReference(t[e]);this.state=this.returnState}else this._flushCodePointConsumedAsCharacterReference(bo.AMPERSAND),this.state=Bo.AMBIGUOUS_AMPERSAND}_stateAmbiguousAmpersand(e){Vo(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===bo.SEMICOLON&&this._err(To.unknownNamedCharacterReference),this._reconsumeInState(this.returnState,e))}_stateNumericCharacterReference(e){this.charRefCode=0,e===bo.LATIN_SMALL_X||e===bo.LATIN_CAPITAL_X?this.state=Bo.HEXADEMICAL_CHARACTER_REFERENCE_START:Ho(e)?(this.state=Bo.DECIMAL_CHARACTER_REFERENCE,this._stateDecimalCharacterReference(e)):(this._err(To.absenceOfDigitsInNumericCharacterReference),this._flushCodePointConsumedAsCharacterReference(bo.AMPERSAND),this._flushCodePointConsumedAsCharacterReference(bo.NUMBER_SIGN),this._reconsumeInState(this.returnState,e))}_stateHexademicalCharacterReferenceStart(e){!function(e){return Ho(e)||Go(e)||$o(e)}(e)?(this._err(To.absenceOfDigitsInNumericCharacterReference),this._flushCodePointConsumedAsCharacterReference(bo.AMPERSAND),this._flushCodePointConsumedAsCharacterReference(bo.NUMBER_SIGN),this._unconsume(2),this.state=this.returnState):(this.state=Bo.HEXADEMICAL_CHARACTER_REFERENCE,this._stateHexademicalCharacterReference(e))}_stateHexademicalCharacterReference(e){Go(e)?this.charRefCode=16*this.charRefCode+e-55:$o(e)?this.charRefCode=16*this.charRefCode+e-87:Ho(e)?this.charRefCode=16*this.charRefCode+e-48:e===bo.SEMICOLON?this.state=Bo.NUMERIC_CHARACTER_REFERENCE_END:(this._err(To.missingSemicolonAfterCharacterReference),this.state=Bo.NUMERIC_CHARACTER_REFERENCE_END,this._stateNumericCharacterReferenceEnd(e))}_stateDecimalCharacterReference(e){Ho(e)?this.charRefCode=10*this.charRefCode+e-48:e===bo.SEMICOLON?this.state=Bo.NUMERIC_CHARACTER_REFERENCE_END:(this._err(To.missingSemicolonAfterCharacterReference),this.state=Bo.NUMERIC_CHARACTER_REFERENCE_END,this._stateNumericCharacterReferenceEnd(e))}_stateNumericCharacterReferenceEnd(e){if(this.charRefCode===bo.NULL)this._err(To.nullCharacterReference),this.charRefCode=bo.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(To.characterReferenceOutsideUnicodeRange),this.charRefCode=bo.REPLACEMENT_CHARACTER;else if(Eo(this.charRefCode))this._err(To.surrogateCharacterReference),this.charRefCode=bo.REPLACEMENT_CHARACTER;else if(So(this.charRefCode))this._err(To.noncharacterCharacterReference);else if(wo(this.charRefCode)||this.charRefCode===bo.CARRIAGE_RETURN){this._err(To.controlCharacterReference);const e=Fo.get(this.charRefCode);void 0!==e&&(this.charRefCode=e)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState,e)}}const Ko=new Set([_o.DD,_o.DT,_o.LI,_o.OPTGROUP,_o.OPTION,_o.P,_o.RB,_o.RP,_o.RT,_o.RTC]),Zo=new Set([...Ko,_o.CAPTION,_o.COLGROUP,_o.TBODY,_o.TD,_o.TFOOT,_o.TH,_o.THEAD,_o.TR]),Jo=new Map([[_o.APPLET,Co.HTML],[_o.CAPTION,Co.HTML],[_o.HTML,Co.HTML],[_o.MARQUEE,Co.HTML],[_o.OBJECT,Co.HTML],[_o.TABLE,Co.HTML],[_o.TD,Co.HTML],[_o.TEMPLATE,Co.HTML],[_o.TH,Co.HTML],[_o.ANNOTATION_XML,Co.MATHML],[_o.MI,Co.MATHML],[_o.MN,Co.MATHML],[_o.MO,Co.MATHML],[_o.MS,Co.MATHML],[_o.MTEXT,Co.MATHML],[_o.DESC,Co.SVG],[_o.FOREIGN_OBJECT,Co.SVG],[_o.TITLE,Co.SVG]]),ea=[_o.H1,_o.H2,_o.H3,_o.H4,_o.H5,_o.H6],ta=[_o.TR,_o.TEMPLATE,_o.HTML],na=[_o.TBODY,_o.TFOOT,_o.THEAD,_o.TEMPLATE,_o.HTML],ra=[_o.TABLE,_o.TEMPLATE,_o.HTML],ia=[_o.TD,_o.TH];class oa{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=_o.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===_o.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===Co.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){const r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do{t=this.tagIDs.lastIndexOf(e,t-1)}while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==Co.HTML);this.shortenToLength(t<0?0:t)}shortenToLength(e){for(;this.stackTop>=e;){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){const t=this._indexOf(e);this.shortenToLength(t<0?0:t)}popUntilPopped(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(n<0?0:n)}popUntilNumberedHeaderPopped(){this.popUntilPopped(ea,Co.HTML)}popUntilTableCellPopped(){this.popUntilPopped(ia,Co.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.includes(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(ra,Co.HTML)}clearBackToTableBodyContext(){this.clearBackTo(na,Co.HTML)}clearBackToTableRowContext(){this.clearBackTo(ta,Co.HTML)}remove(e){const t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===_o.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.tagIDs[0]===_o.HTML}hasInScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t],r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===Co.HTML)return!0;if(Jo.get(n)===r)return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e],n=this.treeAdapter.getNamespaceURI(this.items[e]);if(qo(t)&&n===Co.HTML)return!0;if(Jo.get(t)===n)return!1}return!0}hasInListItemScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t],r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===Co.HTML)return!0;if((n===_o.UL||n===_o.OL)&&r===Co.HTML||Jo.get(n)===r)return!1}return!0}hasInButtonScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t],r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===Co.HTML)return!0;if(n===_o.BUTTON&&r===Co.HTML||Jo.get(n)===r)return!1}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===Co.HTML){if(n===e)return!0;if(n===_o.TABLE||n===_o.TEMPLATE||n===_o.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];if(this.treeAdapter.getNamespaceURI(this.items[e])===Co.HTML){if(t===_o.TBODY||t===_o.THEAD||t===_o.TFOOT)return!0;if(t===_o.TABLE||t===_o.HTML)return!1}}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===Co.HTML){if(n===e)return!0;if(n!==_o.OPTION&&n!==_o.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;Ko.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;Zo.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==e&&Zo.has(this.currentTagId);)this.pop()}}var aa;!function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"}(aa=aa||(aa={}));const sa={type:aa.Marker};class la{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){const n=[],r=t.length,i=this.treeAdapter.getTagName(e),o=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){const t=this.entries[e];if(t.type===aa.Marker)break;const{element:a}=t;if(this.treeAdapter.getTagName(a)===i&&this.treeAdapter.getNamespaceURI(a)===o){const t=this.treeAdapter.getAttrList(a);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<3)return;const t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<3)return;const r=new Map(t.map((e=>[e.name,e.value])));let i=0;for(let e=0;e<n.length;e++){const t=n[e];t.attrs.every((e=>r.get(e.name)===e.value))&&(i+=1,i>=3&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(sa)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:aa.Element,element:e,token:t})}insertElementAfterBookmark(e,t){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:aa.Element,element:e,token:t})}removeEntry(e){const t=this.entries.indexOf(e);t>=0&&this.entries.splice(t,1)}clearToLastMarker(){const e=this.entries.indexOf(sa);e>=0?this.entries.splice(0,e+1):this.entries.length=0}getElementEntryInScopeWithTagName(e){const t=this.entries.find((t=>t.type===aa.Marker||this.treeAdapter.getTagName(t.element)===e));return t&&t.type===aa.Element?t:null}getElementEntry(e){return this.entries.find((t=>t.type===aa.Element&&t.element===e))}}function ca(e){return{nodeName:"#text",value:e,parentNode:null}}const ua={createDocument:()=>({nodeName:"#document",mode:Do.NO_QUIRKS,childNodes:[]}),createDocumentFragment:()=>({nodeName:"#document-fragment",childNodes:[]}),createElement:(e,t,n)=>({nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}),createCommentNode:e=>({nodeName:"#comment",data:e,parentNode:null}),appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent:e=>e.content,setDocumentType(e,t,n,r){const i=e.childNodes.find((e=>"#documentType"===e.nodeName));i?(i.name=t,i.publicId=n,i.systemId=r):ua.appendChild(e,{nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null})},setDocumentMode(e,t){e.mode=t},getDocumentMode:e=>e.mode,detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(ua.isTextNode(n))return void(n.value+=t)}ua.appendChild(e,ca(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&ua.isTextNode(r)?r.value+=t:ua.insertBefore(e,ca(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map((e=>e.name)));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild:e=>e.childNodes[0],getChildNodes:e=>e.childNodes,getParentNode:e=>e.parentNode,getAttrList:e=>e.attrs,getTagName:e=>e.tagName,getNamespaceURI:e=>e.namespaceURI,getTextNodeContent:e=>e.value,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName:e=>e.name,getDocumentTypeNodePublicId:e=>e.publicId,getDocumentTypeNodeSystemId:e=>e.systemId,isTextNode:e=>"#text"===e.nodeName,isCommentNode:e=>"#comment"===e.nodeName,isDocumentTypeNode:e=>"#documentType"===e.nodeName,isElementNode:e=>Object.prototype.hasOwnProperty.call(e,"tagName"),setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},ha="html",fa=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],da=[...fa,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],pa=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),ga=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],ma=[...ga,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function ba(e,t){return t.some((t=>e.startsWith(t)))}const ka=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((e=>[e.toLowerCase(),e]))),ya=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:Co.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:Co.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:Co.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:Co.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:Co.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:Co.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:Co.XLINK}],["xml:base",{prefix:"xml",name:"base",namespace:Co.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:Co.XML}],["xml:space",{prefix:"xml",name:"space",namespace:Co.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:Co.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:Co.XMLNS}]]),va=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((e=>[e.toLowerCase(),e]))),Ea=new Set([_o.B,_o.BIG,_o.BLOCKQUOTE,_o.BODY,_o.BR,_o.CENTER,_o.CODE,_o.DD,_o.DIV,_o.DL,_o.DT,_o.EM,_o.EMBED,_o.H1,_o.H2,_o.H3,_o.H4,_o.H5,_o.H6,_o.HEAD,_o.HR,_o.I,_o.IMG,_o.LI,_o.LISTING,_o.MENU,_o.META,_o.NOBR,_o.OL,_o.P,_o.PRE,_o.RUBY,_o.S,_o.SMALL,_o.SPAN,_o.STRONG,_o.STRIKE,_o.SUB,_o.SUP,_o.TABLE,_o.TT,_o.U,_o.UL,_o.VAR]);function wa(e){for(let t=0;t<e.attrs.length;t++)if("definitionurl"===e.attrs[t].name){e.attrs[t].name="definitionURL";break}}function Sa(e){for(let t=0;t<e.attrs.length;t++){const n=ka.get(e.attrs[t].name);null!=n&&(e.attrs[t].name=n)}}function Ta(e){for(let t=0;t<e.attrs.length;t++){const n=ya.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}var xa;!function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"}(xa||(xa={}));const Ca={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Aa=new Set([_o.TABLE,_o.TBODY,_o.TFOOT,_o.THEAD,_o.TR]),Da={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ua,onParseError:null};class Ra{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=xa.INITIAL,this.originalInsertionMode=xa.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Da,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=null!=t?t:this.treeAdapter.createDocument(),this.tokenizer=new Xo(this.options,this),this.activeFormattingElements=new la(this.treeAdapter),this.fragmentContextID=n?Oo(this.treeAdapter.getTagName(n)):_o.UNKNOWN,this._setContextModes(null!=n?n:this.document,this.fragmentContextID),this.openElements=new oa(this.document,this.treeAdapter,this)}static parse(e,t){const n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){const n={...Da,...t};null!=e||(e=n.treeAdapter.createElement(Ro.TEMPLATE,Co.HTML,[]));const r=n.treeAdapter.createElement("documentmock",Co.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===_o.TEMPLATE&&i.tmplInsertionModeStack.unshift(xa.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){const e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){var r;if(!this.onParseError)return;const i=null!==(r=e.location)&&void 0!==r?r:Ca;this.onParseError({code:t,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:n?i.startLine:i.endLine,endCol:n?i.startCol:i.endCol,endOffset:n?i.startOffset:i.endOffset})}onItemPush(e,t,n){var r,i;null===(i=(r=this.treeAdapter).onItemPush)||void 0===i||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),null===(r=(n=this.treeAdapter).onItemPop)||void 0===r||r.call(n,e,this.openElements.current),t){let e,t;0===this.openElements.stackTop&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):({current:e,currentTagId:t}=this.openElements),this._setContextModes(e,t)}}_setContextModes(e,t){const n=e===this.document||this.treeAdapter.getNamespaceURI(e)===Co.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,Co.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=xa.TEXT}switchToPlaintextParsing(){this.insertionMode=xa.TEXT,this.originalInsertionMode=xa.IN_BODY,this.tokenizer.state=Uo.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===Ro.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===Co.HTML)switch(this.fragmentContextID){case _o.TITLE:case _o.TEXTAREA:this.tokenizer.state=Uo.RCDATA;break;case _o.STYLE:case _o.XMP:case _o.IFRAME:case _o.NOEMBED:case _o.NOFRAMES:case _o.NOSCRIPT:this.tokenizer.state=Uo.RAWTEXT;break;case _o.SCRIPT:this.tokenizer.state=Uo.SCRIPT_DATA;break;case _o.PLAINTEXT:this.tokenizer.state=Uo.PLAINTEXT}}_setDocumentType(e){if(this.treeAdapter.setDocumentType(this.document,e.name||"",e.publicId||"",e.systemId||""),e.location){const t=this.treeAdapter.getChildNodes(this.document).find((e=>this.treeAdapter.isDocumentTypeNode(e)));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){const n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}this._shouldFosterParentOnInsertion()?this._fosterParentElement(e):this.treeAdapter.appendChild(this.openElements.currentTmplContentOrNode,e)}_appendElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){const n=this.treeAdapter.createElement(e,Co.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,Co.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(Ro.HTML,Co.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,_o.HTML)}_appendCommentNode(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?(({parent:t,beforeElement:n}=this._findFosterParentingLocation()),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;const r=this.treeAdapter.getChildNodes(t),i=n?r.lastIndexOf(n):r.length,o=r[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===xo.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return 0===this.openElements.stackTop&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):({current:t,currentTagId:n}=this.openElements),(e.tagID!==_o.SVG||this.treeAdapter.getTagName(t)!==Ro.ANNOTATION_XML||this.treeAdapter.getNamespaceURI(t)!==Co.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===_o.MGLYPH||e.tagID===_o.MALIGNMARK)&&!this._isIntegrationPoint(n,t,Co.HTML))}_processToken(e){switch(e.type){case xo.CHARACTER:this.onCharacter(e);break;case xo.NULL_CHARACTER:this.onNullCharacter(e);break;case xo.COMMENT:this.onComment(e);break;case xo.DOCTYPE:this.onDoctype(e);break;case xo.START_TAG:this._processStartTag(e);break;case xo.END_TAG:this.onEndTag(e);break;case xo.EOF:this.onEof(e);break;case xo.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return function(e,t,n,r){return(!r||r===Co.HTML)&&function(e,t,n){if(t===Co.MATHML&&e===_o.ANNOTATION_XML)for(let e=0;e<n.length;e++)if(n[e].name===Ao.ENCODING){const t=n[e].value.toLowerCase();return"text/html"===t||"application/xhtml+xml"===t}return t===Co.SVG&&(e===_o.FOREIGN_OBJECT||e===_o.DESC||e===_o.TITLE)}(e,t,n)||(!r||r===Co.MATHML)&&function(e,t){return t===Co.MATHML&&(e===_o.MI||e===_o.MO||e===_o.MN||e===_o.MS||e===_o.MTEXT)}(e,t)}(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const t=this.activeFormattingElements.entries.findIndex((e=>e.type===aa.Marker||this.openElements.contains(e.element)));for(let n=t<0?e-1:t-1;n>=0;n--){const e=this.activeFormattingElements.entries[n];this._insertElement(e.token,this.treeAdapter.getNamespaceURI(e.element)),e.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=xa.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(_o.P),this.openElements.popUntilTagNamePopped(_o.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(0===e&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case _o.TR:return void(this.insertionMode=xa.IN_ROW);case _o.TBODY:case _o.THEAD:case _o.TFOOT:return void(this.insertionMode=xa.IN_TABLE_BODY);case _o.CAPTION:return void(this.insertionMode=xa.IN_CAPTION);case _o.COLGROUP:return void(this.insertionMode=xa.IN_COLUMN_GROUP);case _o.TABLE:return void(this.insertionMode=xa.IN_TABLE);case _o.BODY:return void(this.insertionMode=xa.IN_BODY);case _o.FRAMESET:return void(this.insertionMode=xa.IN_FRAMESET);case _o.SELECT:return void this._resetInsertionModeForSelect(e);case _o.TEMPLATE:return void(this.insertionMode=this.tmplInsertionModeStack[0]);case _o.HTML:return void(this.insertionMode=this.headElement?xa.AFTER_HEAD:xa.BEFORE_HEAD);case _o.TD:case _o.TH:if(e>0)return void(this.insertionMode=xa.IN_CELL);break;case _o.HEAD:if(e>0)return void(this.insertionMode=xa.IN_HEAD)}this.insertionMode=xa.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.tagIDs[t];if(e===_o.TEMPLATE)break;if(e===_o.TABLE)return void(this.insertionMode=xa.IN_SELECT_IN_TABLE)}this.insertionMode=xa.IN_SELECT}_isElementCausesFosterParenting(e){return Aa.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case _o.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===Co.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case _o.TABLE:{const n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){const n=this.treeAdapter.getNamespaceURI(e);return Po[n].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){e._insertCharacters(t),e.framesetOk=!1}(this,e);else switch(this.insertionMode){case xa.INITIAL:Ba(this,e);break;case xa.BEFORE_HTML:Ua(this,e);break;case xa.BEFORE_HEAD:Ha(this,e);break;case xa.IN_HEAD:Va(this,e);break;case xa.IN_HEAD_NO_SCRIPT:Ga(this,e);break;case xa.AFTER_HEAD:$a(this,e);break;case xa.IN_BODY:case xa.IN_CAPTION:case xa.IN_CELL:case xa.IN_TEMPLATE:Qa(this,e);break;case xa.TEXT:case xa.IN_SELECT:case xa.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case xa.IN_TABLE:case xa.IN_TABLE_BODY:case xa.IN_ROW:is(this,e);break;case xa.IN_TABLE_TEXT:cs(this,e);break;case xa.IN_COLUMN_GROUP:ds(this,e);break;case xa.AFTER_BODY:ws(this,e);break;case xa.AFTER_AFTER_BODY:Ss(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){t.chars=mo,e._insertCharacters(t)}(this,e);else switch(this.insertionMode){case xa.INITIAL:Ba(this,e);break;case xa.BEFORE_HTML:Ua(this,e);break;case xa.BEFORE_HEAD:Ha(this,e);break;case xa.IN_HEAD:Va(this,e);break;case xa.IN_HEAD_NO_SCRIPT:Ga(this,e);break;case xa.AFTER_HEAD:$a(this,e);break;case xa.TEXT:this._insertCharacters(e);break;case xa.IN_TABLE:case xa.IN_TABLE_BODY:case xa.IN_ROW:is(this,e);break;case xa.IN_COLUMN_GROUP:ds(this,e);break;case xa.AFTER_BODY:ws(this,e);break;case xa.AFTER_AFTER_BODY:Ss(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)qa(this,e);else switch(this.insertionMode){case xa.INITIAL:case xa.BEFORE_HTML:case xa.BEFORE_HEAD:case xa.IN_HEAD:case xa.IN_HEAD_NO_SCRIPT:case xa.AFTER_HEAD:case xa.IN_BODY:case xa.IN_TABLE:case xa.IN_CAPTION:case xa.IN_COLUMN_GROUP:case xa.IN_TABLE_BODY:case xa.IN_ROW:case xa.IN_CELL:case xa.IN_SELECT:case xa.IN_SELECT_IN_TABLE:case xa.IN_TEMPLATE:case xa.IN_FRAMESET:case xa.AFTER_FRAMESET:qa(this,e);break;case xa.IN_TABLE_TEXT:us(this,e);break;case xa.AFTER_BODY:!function(e,t){e._appendCommentNode(t,e.openElements.items[0])}(this,e);break;case xa.AFTER_AFTER_BODY:case xa.AFTER_AFTER_FRAMESET:!function(e,t){e._appendCommentNode(t,e.document)}(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case xa.INITIAL:!function(e,t){e._setDocumentType(t);const n=t.forceQuirks?Do.QUIRKS:function(e){if(e.name!==ha)return Do.QUIRKS;const{systemId:t}=e;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return Do.QUIRKS;let{publicId:n}=e;if(null!==n){if(n=n.toLowerCase(),pa.has(n))return Do.QUIRKS;let e=null===t?da:fa;if(ba(n,e))return Do.QUIRKS;if(e=null===t?ga:ma,ba(n,e))return Do.LIMITED_QUIRKS}return Do.NO_QUIRKS}(t);(function(e){return e.name===ha&&null===e.publicId&&(null===e.systemId||"about:legacy-compat"===e.systemId)})(t)||e._err(t,To.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=xa.BEFORE_HTML}(this,e);break;case xa.BEFORE_HEAD:case xa.IN_HEAD:case xa.IN_HEAD_NO_SCRIPT:case xa.AFTER_HEAD:this._err(e,To.misplacedDoctype);break;case xa.IN_TABLE_TEXT:us(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,To.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?function(e,t){if(function(e){const t=e.tagID;return t===_o.FONT&&e.attrs.some((({name:e})=>e===Ao.COLOR||e===Ao.SIZE||e===Ao.FACE))||Ea.has(t)}(t))Ts(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===Co.MATHML?wa(t):r===Co.SVG&&(function(e){const t=va.get(e.tagName);null!=t&&(e.tagName=t,e.tagID=Oo(e.tagName))}(t),Sa(t)),Ta(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case xa.INITIAL:Ba(this,e);break;case xa.BEFORE_HTML:!function(e,t){t.tagID===_o.HTML?(e._insertElement(t,Co.HTML),e.insertionMode=xa.BEFORE_HEAD):Ua(e,t)}(this,e);break;case xa.BEFORE_HEAD:!function(e,t){switch(t.tagID){case _o.HTML:es(e,t);break;case _o.HEAD:e._insertElement(t,Co.HTML),e.headElement=e.openElements.current,e.insertionMode=xa.IN_HEAD;break;default:Ha(e,t)}}(this,e);break;case xa.IN_HEAD:za(this,e);break;case xa.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case _o.HTML:es(e,t);break;case _o.BASEFONT:case _o.BGSOUND:case _o.HEAD:case _o.LINK:case _o.META:case _o.NOFRAMES:case _o.STYLE:za(e,t);break;case _o.NOSCRIPT:e._err(t,To.nestedNoscriptInHead);break;default:Ga(e,t)}}(this,e);break;case xa.AFTER_HEAD:!function(e,t){switch(t.tagID){case _o.HTML:es(e,t);break;case _o.BODY:e._insertElement(t,Co.HTML),e.framesetOk=!1,e.insertionMode=xa.IN_BODY;break;case _o.FRAMESET:e._insertElement(t,Co.HTML),e.insertionMode=xa.IN_FRAMESET;break;case _o.BASE:case _o.BASEFONT:case _o.BGSOUND:case _o.LINK:case _o.META:case _o.NOFRAMES:case _o.SCRIPT:case _o.STYLE:case _o.TEMPLATE:case _o.TITLE:e._err(t,To.abandonedHeadElementChild),e.openElements.push(e.headElement,_o.HEAD),za(e,t),e.openElements.remove(e.headElement);break;case _o.HEAD:e._err(t,To.misplacedStartTagForHeadElement);break;default:$a(e,t)}}(this,e);break;case xa.IN_BODY:es(this,e);break;case xa.IN_TABLE:os(this,e);break;case xa.IN_TABLE_TEXT:us(this,e);break;case xa.IN_CAPTION:!function(e,t){hs.has(t.tagID)?e.openElements.hasInTableScope(_o.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(_o.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=xa.IN_TABLE,os(e,t)):es(e,t)}(this,e);break;case xa.IN_COLUMN_GROUP:fs(this,e);break;case xa.IN_TABLE_BODY:ps(this,e);break;case xa.IN_ROW:ms(this,e);break;case xa.IN_CELL:!function(e,t){hs.has(t.tagID)?(e.openElements.hasInTableScope(_o.TD)||e.openElements.hasInTableScope(_o.TH))&&(e._closeTableCell(),ms(e,t)):es(e,t)}(this,e);break;case xa.IN_SELECT:ks(this,e);break;case xa.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===_o.CAPTION||n===_o.TABLE||n===_o.TBODY||n===_o.TFOOT||n===_o.THEAD||n===_o.TR||n===_o.TD||n===_o.TH?(e.openElements.popUntilTagNamePopped(_o.SELECT),e._resetInsertionMode(),e._processStartTag(t)):ks(e,t)}(this,e);break;case xa.IN_TEMPLATE:!function(e,t){switch(t.tagID){case _o.BASE:case _o.BASEFONT:case _o.BGSOUND:case _o.LINK:case _o.META:case _o.NOFRAMES:case _o.SCRIPT:case _o.STYLE:case _o.TEMPLATE:case _o.TITLE:za(e,t);break;case _o.CAPTION:case _o.COLGROUP:case _o.TBODY:case _o.TFOOT:case _o.THEAD:e.tmplInsertionModeStack[0]=xa.IN_TABLE,e.insertionMode=xa.IN_TABLE,os(e,t);break;case _o.COL:e.tmplInsertionModeStack[0]=xa.IN_COLUMN_GROUP,e.insertionMode=xa.IN_COLUMN_GROUP,fs(e,t);break;case _o.TR:e.tmplInsertionModeStack[0]=xa.IN_TABLE_BODY,e.insertionMode=xa.IN_TABLE_BODY,ps(e,t);break;case _o.TD:case _o.TH:e.tmplInsertionModeStack[0]=xa.IN_ROW,e.insertionMode=xa.IN_ROW,ms(e,t);break;default:e.tmplInsertionModeStack[0]=xa.IN_BODY,e.insertionMode=xa.IN_BODY,es(e,t)}}(this,e);break;case xa.AFTER_BODY:!function(e,t){t.tagID===_o.HTML?es(e,t):ws(e,t)}(this,e);break;case xa.IN_FRAMESET:!function(e,t){switch(t.tagID){case _o.HTML:es(e,t);break;case _o.FRAMESET:e._insertElement(t,Co.HTML);break;case _o.FRAME:e._appendElement(t,Co.HTML),t.ackSelfClosing=!0;break;case _o.NOFRAMES:za(e,t)}}(this,e);break;case xa.AFTER_FRAMESET:!function(e,t){switch(t.tagID){case _o.HTML:es(e,t);break;case _o.NOFRAMES:za(e,t)}}(this,e);break;case xa.AFTER_AFTER_BODY:!function(e,t){t.tagID===_o.HTML?es(e,t):Ss(e,t)}(this,e);break;case xa.AFTER_AFTER_FRAMESET:!function(e,t){switch(t.tagID){case _o.HTML:es(e,t);break;case _o.NOFRAMES:za(e,t)}}(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?function(e,t){if(t.tagID===_o.P||t.tagID===_o.BR)return Ts(e),void e._endTagOutsideForeignContent(t);for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===Co.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case xa.INITIAL:Ba(this,e);break;case xa.BEFORE_HTML:!function(e,t){const n=t.tagID;n!==_o.HTML&&n!==_o.HEAD&&n!==_o.BODY&&n!==_o.BR||Ua(e,t)}(this,e);break;case xa.BEFORE_HEAD:!function(e,t){const n=t.tagID;n===_o.HEAD||n===_o.BODY||n===_o.HTML||n===_o.BR?Ha(e,t):e._err(t,To.endTagWithoutMatchingOpenElement)}(this,e);break;case xa.IN_HEAD:!function(e,t){switch(t.tagID){case _o.HEAD:e.openElements.pop(),e.insertionMode=xa.AFTER_HEAD;break;case _o.BODY:case _o.BR:case _o.HTML:Va(e,t);break;case _o.TEMPLATE:ja(e,t);break;default:e._err(t,To.endTagWithoutMatchingOpenElement)}}(this,e);break;case xa.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case _o.NOSCRIPT:e.openElements.pop(),e.insertionMode=xa.IN_HEAD;break;case _o.BR:Ga(e,t);break;default:e._err(t,To.endTagWithoutMatchingOpenElement)}}(this,e);break;case xa.AFTER_HEAD:!function(e,t){switch(t.tagID){case _o.BODY:case _o.HTML:case _o.BR:$a(e,t);break;case _o.TEMPLATE:ja(e,t);break;default:e._err(t,To.endTagWithoutMatchingOpenElement)}}(this,e);break;case xa.IN_BODY:ns(this,e);break;case xa.TEXT:!function(e,t){var n;t.tagID===_o.SCRIPT&&(null===(n=e.scriptHandler)||void 0===n||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}(this,e);break;case xa.IN_TABLE:as(this,e);break;case xa.IN_TABLE_TEXT:us(this,e);break;case xa.IN_CAPTION:!function(e,t){const n=t.tagID;switch(n){case _o.CAPTION:case _o.TABLE:e.openElements.hasInTableScope(_o.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(_o.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=xa.IN_TABLE,n===_o.TABLE&&as(e,t));break;case _o.BODY:case _o.COL:case _o.COLGROUP:case _o.HTML:case _o.TBODY:case _o.TD:case _o.TFOOT:case _o.TH:case _o.THEAD:case _o.TR:break;default:ns(e,t)}}(this,e);break;case xa.IN_COLUMN_GROUP:!function(e,t){switch(t.tagID){case _o.COLGROUP:e.openElements.currentTagId===_o.COLGROUP&&(e.openElements.pop(),e.insertionMode=xa.IN_TABLE);break;case _o.TEMPLATE:ja(e,t);break;case _o.COL:break;default:ds(e,t)}}(this,e);break;case xa.IN_TABLE_BODY:gs(this,e);break;case xa.IN_ROW:bs(this,e);break;case xa.IN_CELL:!function(e,t){const n=t.tagID;switch(n){case _o.TD:case _o.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=xa.IN_ROW);break;case _o.TABLE:case _o.TBODY:case _o.TFOOT:case _o.THEAD:case _o.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),bs(e,t));break;case _o.BODY:case _o.CAPTION:case _o.COL:case _o.COLGROUP:case _o.HTML:break;default:ns(e,t)}}(this,e);break;case xa.IN_SELECT:ys(this,e);break;case xa.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===_o.CAPTION||n===_o.TABLE||n===_o.TBODY||n===_o.TFOOT||n===_o.THEAD||n===_o.TR||n===_o.TD||n===_o.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(_o.SELECT),e._resetInsertionMode(),e.onEndTag(t)):ys(e,t)}(this,e);break;case xa.IN_TEMPLATE:!function(e,t){t.tagID===_o.TEMPLATE&&ja(e,t)}(this,e);break;case xa.AFTER_BODY:Es(this,e);break;case xa.IN_FRAMESET:!function(e,t){t.tagID!==_o.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagId===_o.FRAMESET||(e.insertionMode=xa.AFTER_FRAMESET))}(this,e);break;case xa.AFTER_FRAMESET:!function(e,t){t.tagID===_o.HTML&&(e.insertionMode=xa.AFTER_AFTER_FRAMESET)}(this,e);break;case xa.AFTER_AFTER_BODY:Ss(this,e)}}onEof(e){switch(this.insertionMode){case xa.INITIAL:Ba(this,e);break;case xa.BEFORE_HTML:Ua(this,e);break;case xa.BEFORE_HEAD:Ha(this,e);break;case xa.IN_HEAD:Va(this,e);break;case xa.IN_HEAD_NO_SCRIPT:Ga(this,e);break;case xa.AFTER_HEAD:$a(this,e);break;case xa.IN_BODY:case xa.IN_TABLE:case xa.IN_CAPTION:case xa.IN_COLUMN_GROUP:case xa.IN_TABLE_BODY:case xa.IN_ROW:case xa.IN_CELL:case xa.IN_SELECT:case xa.IN_SELECT_IN_TABLE:rs(this,e);break;case xa.TEXT:!function(e,t){e._err(t,To.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}(this,e);break;case xa.IN_TABLE_TEXT:us(this,e);break;case xa.IN_TEMPLATE:vs(this,e);break;case xa.AFTER_BODY:case xa.IN_FRAMESET:case xa.AFTER_FRAMESET:case xa.AFTER_AFTER_BODY:case xa.AFTER_AFTER_FRAMESET:Fa(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===bo.LINE_FEED)){if(1===e.chars.length)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)this._insertCharacters(e);else switch(this.insertionMode){case xa.IN_HEAD:case xa.IN_HEAD_NO_SCRIPT:case xa.AFTER_HEAD:case xa.TEXT:case xa.IN_COLUMN_GROUP:case xa.IN_SELECT:case xa.IN_SELECT_IN_TABLE:case xa.IN_FRAMESET:case xa.AFTER_FRAMESET:this._insertCharacters(e);break;case xa.IN_BODY:case xa.IN_CAPTION:case xa.IN_CELL:case xa.IN_TEMPLATE:case xa.AFTER_BODY:case xa.AFTER_AFTER_BODY:case xa.AFTER_AFTER_FRAMESET:Wa(this,e);break;case xa.IN_TABLE:case xa.IN_TABLE_BODY:case xa.IN_ROW:is(this,e);break;case xa.IN_TABLE_TEXT:ls(this,e)}}}function _a(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):ts(e,t),n}function La(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}function Na(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let o=0,a=i;a!==n;o++,a=i){i=e.openElements.getCommonAncestor(a);const n=e.activeFormattingElements.getElementEntry(a),s=n&&o>=3;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(a)):(a=Ia(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function Ia(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Oa(e,t,n){const r=Oo(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{const i=e.treeAdapter.getNamespaceURI(t);r===_o.TEMPLATE&&i===Co.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Ma(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,o=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o,i.tagID)}function Pa(e,t){for(let n=0;n<8;n++){const n=_a(e,t);if(!n)break;const r=La(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;const i=Na(e,r,n.element),o=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),o&&Oa(e,o,i),Ma(e,r,n)}}function qa(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Fa(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function Ba(e,t){e._err(t,To.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Do.QUIRKS),e.insertionMode=xa.BEFORE_HTML,e._processToken(t)}function Ua(e,t){e._insertFakeRootElement(),e.insertionMode=xa.BEFORE_HEAD,e._processToken(t)}function Ha(e,t){e._insertFakeElement(Ro.HEAD,_o.HEAD),e.headElement=e.openElements.current,e.insertionMode=xa.IN_HEAD,e._processToken(t)}function za(e,t){switch(t.tagID){case _o.HTML:es(e,t);break;case _o.BASE:case _o.BASEFONT:case _o.BGSOUND:case _o.LINK:case _o.META:e._appendElement(t,Co.HTML),t.ackSelfClosing=!0;break;case _o.TITLE:e._switchToTextParsing(t,Uo.RCDATA);break;case _o.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Uo.RAWTEXT):(e._insertElement(t,Co.HTML),e.insertionMode=xa.IN_HEAD_NO_SCRIPT);break;case _o.NOFRAMES:case _o.STYLE:e._switchToTextParsing(t,Uo.RAWTEXT);break;case _o.SCRIPT:e._switchToTextParsing(t,Uo.SCRIPT_DATA);break;case _o.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=xa.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(xa.IN_TEMPLATE);break;case _o.HEAD:e._err(t,To.misplacedStartTagForHeadElement);break;default:Va(e,t)}}function ja(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==_o.TEMPLATE&&e._err(t,To.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(_o.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,To.endTagWithoutMatchingOpenElement)}function Va(e,t){e.openElements.pop(),e.insertionMode=xa.AFTER_HEAD,e._processToken(t)}function Ga(e,t){e._err(t,t.type===xo.EOF?To.openElementsLeftAfterEof:To.disallowedContentInNoscriptInHead),e.openElements.pop(),e.insertionMode=xa.IN_HEAD,e._processToken(t)}function $a(e,t){e._insertFakeElement(Ro.BODY,_o.BODY),e.insertionMode=xa.IN_BODY,Ya(e,t)}function Ya(e,t){switch(t.type){case xo.CHARACTER:Qa(e,t);break;case xo.WHITESPACE_CHARACTER:Wa(e,t);break;case xo.COMMENT:qa(e,t);break;case xo.START_TAG:es(e,t);break;case xo.END_TAG:ns(e,t);break;case xo.EOF:rs(e,t)}}function Wa(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Qa(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Xa(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Co.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Ka(e){const t=No(e,Ao.TYPE);return null!=t&&"hidden"===t.toLowerCase()}function Za(e,t){e._switchToTextParsing(t,Uo.RAWTEXT)}function Ja(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Co.HTML)}function es(e,t){switch(t.tagID){case _o.I:case _o.S:case _o.B:case _o.U:case _o.EM:case _o.TT:case _o.BIG:case _o.CODE:case _o.FONT:case _o.SMALL:case _o.STRIKE:case _o.STRONG:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Co.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case _o.A:!function(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Ro.A);n&&(Pa(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,Co.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case _o.H1:case _o.H2:case _o.H3:case _o.H4:case _o.H5:case _o.H6:!function(e,t){e.openElements.hasInButtonScope(_o.P)&&e._closePElement(),qo(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,Co.HTML)}(e,t);break;case _o.P:case _o.DL:case _o.OL:case _o.UL:case _o.DIV:case _o.DIR:case _o.NAV:case _o.MAIN:case _o.MENU:case _o.ASIDE:case _o.CENTER:case _o.FIGURE:case _o.FOOTER:case _o.HEADER:case _o.HGROUP:case _o.DIALOG:case _o.DETAILS:case _o.ADDRESS:case _o.ARTICLE:case _o.SECTION:case _o.SUMMARY:case _o.FIELDSET:case _o.BLOCKQUOTE:case _o.FIGCAPTION:!function(e,t){e.openElements.hasInButtonScope(_o.P)&&e._closePElement(),e._insertElement(t,Co.HTML)}(e,t);break;case _o.LI:case _o.DD:case _o.DT:!function(e,t){e.framesetOk=!1;const n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){const r=e.openElements.tagIDs[t];if(n===_o.LI&&r===_o.LI||(n===_o.DD||n===_o.DT)&&(r===_o.DD||r===_o.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==_o.ADDRESS&&r!==_o.DIV&&r!==_o.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(_o.P)&&e._closePElement(),e._insertElement(t,Co.HTML)}(e,t);break;case _o.BR:case _o.IMG:case _o.WBR:case _o.AREA:case _o.EMBED:case _o.KEYGEN:Xa(e,t);break;case _o.HR:!function(e,t){e.openElements.hasInButtonScope(_o.P)&&e._closePElement(),e._appendElement(t,Co.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t);break;case _o.RB:case _o.RTC:!function(e,t){e.openElements.hasInScope(_o.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,Co.HTML)}(e,t);break;case _o.RT:case _o.RP:!function(e,t){e.openElements.hasInScope(_o.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(_o.RTC),e._insertElement(t,Co.HTML)}(e,t);break;case _o.PRE:case _o.LISTING:!function(e,t){e.openElements.hasInButtonScope(_o.P)&&e._closePElement(),e._insertElement(t,Co.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}(e,t);break;case _o.XMP:!function(e,t){e.openElements.hasInButtonScope(_o.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Uo.RAWTEXT)}(e,t);break;case _o.SVG:!function(e,t){e._reconstructActiveFormattingElements(),Sa(t),Ta(t),t.selfClosing?e._appendElement(t,Co.SVG):e._insertElement(t,Co.SVG),t.ackSelfClosing=!0}(e,t);break;case _o.HTML:!function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t);break;case _o.BASE:case _o.LINK:case _o.META:case _o.STYLE:case _o.TITLE:case _o.SCRIPT:case _o.BGSOUND:case _o.BASEFONT:case _o.TEMPLATE:za(e,t);break;case _o.BODY:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}(e,t);break;case _o.FORM:!function(e,t){const n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(_o.P)&&e._closePElement(),e._insertElement(t,Co.HTML),n||(e.formElement=e.openElements.current))}(e,t);break;case _o.NOBR:!function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(_o.NOBR)&&(Pa(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,Co.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case _o.MATH:!function(e,t){e._reconstructActiveFormattingElements(),wa(t),Ta(t),t.selfClosing?e._appendElement(t,Co.MATHML):e._insertElement(t,Co.MATHML),t.ackSelfClosing=!0}(e,t);break;case _o.TABLE:!function(e,t){e.treeAdapter.getDocumentMode(e.document)!==Do.QUIRKS&&e.openElements.hasInButtonScope(_o.P)&&e._closePElement(),e._insertElement(t,Co.HTML),e.framesetOk=!1,e.insertionMode=xa.IN_TABLE}(e,t);break;case _o.INPUT:!function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Co.HTML),Ka(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t);break;case _o.PARAM:case _o.TRACK:case _o.SOURCE:!function(e,t){e._appendElement(t,Co.HTML),t.ackSelfClosing=!0}(e,t);break;case _o.IMAGE:!function(e,t){t.tagName=Ro.IMG,t.tagID=_o.IMG,Xa(e,t)}(e,t);break;case _o.BUTTON:!function(e,t){e.openElements.hasInScope(_o.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(_o.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,Co.HTML),e.framesetOk=!1}(e,t);break;case _o.APPLET:case _o.OBJECT:case _o.MARQUEE:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Co.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}(e,t);break;case _o.IFRAME:!function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Uo.RAWTEXT)}(e,t);break;case _o.SELECT:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Co.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===xa.IN_TABLE||e.insertionMode===xa.IN_CAPTION||e.insertionMode===xa.IN_TABLE_BODY||e.insertionMode===xa.IN_ROW||e.insertionMode===xa.IN_CELL?xa.IN_SELECT_IN_TABLE:xa.IN_SELECT}(e,t);break;case _o.OPTION:case _o.OPTGROUP:!function(e,t){e.openElements.currentTagId===_o.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,Co.HTML)}(e,t);break;case _o.NOEMBED:Za(e,t);break;case _o.FRAMESET:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,Co.HTML),e.insertionMode=xa.IN_FRAMESET)}(e,t);break;case _o.TEXTAREA:!function(e,t){e._insertElement(t,Co.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Uo.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=xa.TEXT}(e,t);break;case _o.NOSCRIPT:e.options.scriptingEnabled?Za(e,t):Ja(e,t);break;case _o.PLAINTEXT:!function(e,t){e.openElements.hasInButtonScope(_o.P)&&e._closePElement(),e._insertElement(t,Co.HTML),e.tokenizer.state=Uo.PLAINTEXT}(e,t);break;case _o.COL:case _o.TH:case _o.TD:case _o.TR:case _o.HEAD:case _o.FRAME:case _o.TBODY:case _o.TFOOT:case _o.THEAD:case _o.CAPTION:case _o.COLGROUP:break;default:Ja(e,t)}}function ts(e,t){const n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){const i=e.openElements.items[t],o=e.openElements.tagIDs[t];if(r===o&&(r!==_o.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,o))break}}function ns(e,t){switch(t.tagID){case _o.A:case _o.B:case _o.I:case _o.S:case _o.U:case _o.EM:case _o.TT:case _o.BIG:case _o.CODE:case _o.FONT:case _o.NOBR:case _o.SMALL:case _o.STRIKE:case _o.STRONG:Pa(e,t);break;case _o.P:!function(e){e.openElements.hasInButtonScope(_o.P)||e._insertFakeElement(Ro.P,_o.P),e._closePElement()}(e);break;case _o.DL:case _o.UL:case _o.OL:case _o.DIR:case _o.DIV:case _o.NAV:case _o.PRE:case _o.MAIN:case _o.MENU:case _o.ASIDE:case _o.BUTTON:case _o.CENTER:case _o.FIGURE:case _o.FOOTER:case _o.HEADER:case _o.HGROUP:case _o.DIALOG:case _o.ADDRESS:case _o.ARTICLE:case _o.DETAILS:case _o.SECTION:case _o.SUMMARY:case _o.LISTING:case _o.FIELDSET:case _o.BLOCKQUOTE:case _o.FIGCAPTION:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case _o.LI:!function(e){e.openElements.hasInListItemScope(_o.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(_o.LI),e.openElements.popUntilTagNamePopped(_o.LI))}(e);break;case _o.DD:case _o.DT:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case _o.H1:case _o.H2:case _o.H3:case _o.H4:case _o.H5:case _o.H6:!function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e);break;case _o.BR:!function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Ro.BR,_o.BR),e.openElements.pop(),e.framesetOk=!1}(e);break;case _o.BODY:!function(e,t){if(e.openElements.hasInScope(_o.BODY)&&(e.insertionMode=xa.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}(e,t);break;case _o.HTML:!function(e,t){e.openElements.hasInScope(_o.BODY)&&(e.insertionMode=xa.AFTER_BODY,Es(e,t))}(e,t);break;case _o.FORM:!function(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(_o.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(_o.FORM):n&&e.openElements.remove(n))}(e);break;case _o.APPLET:case _o.OBJECT:case _o.MARQUEE:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}(e,t);break;case _o.TEMPLATE:ja(e,t);break;default:ts(e,t)}}function rs(e,t){e.tmplInsertionModeStack.length>0?vs(e,t):Fa(e,t)}function is(e,t){if(Aa.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=xa.IN_TABLE_TEXT,t.type){case xo.CHARACTER:cs(e,t);break;case xo.WHITESPACE_CHARACTER:ls(e,t)}else ss(e,t)}function os(e,t){switch(t.tagID){case _o.TD:case _o.TH:case _o.TR:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Ro.TBODY,_o.TBODY),e.insertionMode=xa.IN_TABLE_BODY,ps(e,t)}(e,t);break;case _o.STYLE:case _o.SCRIPT:case _o.TEMPLATE:za(e,t);break;case _o.COL:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Ro.COLGROUP,_o.COLGROUP),e.insertionMode=xa.IN_COLUMN_GROUP,fs(e,t)}(e,t);break;case _o.FORM:!function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,Co.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t);break;case _o.TABLE:!function(e,t){e.openElements.hasInTableScope(_o.TABLE)&&(e.openElements.popUntilTagNamePopped(_o.TABLE),e._resetInsertionMode(),e._processStartTag(t))}(e,t);break;case _o.TBODY:case _o.TFOOT:case _o.THEAD:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Co.HTML),e.insertionMode=xa.IN_TABLE_BODY}(e,t);break;case _o.INPUT:!function(e,t){Ka(t)?e._appendElement(t,Co.HTML):ss(e,t),t.ackSelfClosing=!0}(e,t);break;case _o.CAPTION:!function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,Co.HTML),e.insertionMode=xa.IN_CAPTION}(e,t);break;case _o.COLGROUP:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Co.HTML),e.insertionMode=xa.IN_COLUMN_GROUP}(e,t);break;default:ss(e,t)}}function as(e,t){switch(t.tagID){case _o.TABLE:e.openElements.hasInTableScope(_o.TABLE)&&(e.openElements.popUntilTagNamePopped(_o.TABLE),e._resetInsertionMode());break;case _o.TEMPLATE:ja(e,t);break;case _o.BODY:case _o.CAPTION:case _o.COL:case _o.COLGROUP:case _o.HTML:case _o.TBODY:case _o.TD:case _o.TFOOT:case _o.TH:case _o.THEAD:case _o.TR:break;default:ss(e,t)}}function ss(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ya(e,t),e.fosterParentingEnabled=n}function ls(e,t){e.pendingCharacterTokens.push(t)}function cs(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function us(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ss(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const hs=new Set([_o.CAPTION,_o.COL,_o.COLGROUP,_o.TBODY,_o.TD,_o.TFOOT,_o.TH,_o.THEAD,_o.TR]);function fs(e,t){switch(t.tagID){case _o.HTML:es(e,t);break;case _o.COL:e._appendElement(t,Co.HTML),t.ackSelfClosing=!0;break;case _o.TEMPLATE:za(e,t);break;default:ds(e,t)}}function ds(e,t){e.openElements.currentTagId===_o.COLGROUP&&(e.openElements.pop(),e.insertionMode=xa.IN_TABLE,e._processToken(t))}function ps(e,t){switch(t.tagID){case _o.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,Co.HTML),e.insertionMode=xa.IN_ROW;break;case _o.TH:case _o.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Ro.TR,_o.TR),e.insertionMode=xa.IN_ROW,ms(e,t);break;case _o.CAPTION:case _o.COL:case _o.COLGROUP:case _o.TBODY:case _o.TFOOT:case _o.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=xa.IN_TABLE,os(e,t));break;default:os(e,t)}}function gs(e,t){const n=t.tagID;switch(t.tagID){case _o.TBODY:case _o.TFOOT:case _o.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=xa.IN_TABLE);break;case _o.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=xa.IN_TABLE,as(e,t));break;case _o.BODY:case _o.CAPTION:case _o.COL:case _o.COLGROUP:case _o.HTML:case _o.TD:case _o.TH:case _o.TR:break;default:as(e,t)}}function ms(e,t){switch(t.tagID){case _o.TH:case _o.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,Co.HTML),e.insertionMode=xa.IN_CELL,e.activeFormattingElements.insertMarker();break;case _o.CAPTION:case _o.COL:case _o.COLGROUP:case _o.TBODY:case _o.TFOOT:case _o.THEAD:case _o.TR:e.openElements.hasInTableScope(_o.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=xa.IN_TABLE_BODY,ps(e,t));break;default:os(e,t)}}function bs(e,t){switch(t.tagID){case _o.TR:e.openElements.hasInTableScope(_o.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=xa.IN_TABLE_BODY);break;case _o.TABLE:e.openElements.hasInTableScope(_o.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=xa.IN_TABLE_BODY,gs(e,t));break;case _o.TBODY:case _o.TFOOT:case _o.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(_o.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=xa.IN_TABLE_BODY,gs(e,t));break;case _o.BODY:case _o.CAPTION:case _o.COL:case _o.COLGROUP:case _o.HTML:case _o.TD:case _o.TH:break;default:as(e,t)}}function ks(e,t){switch(t.tagID){case _o.HTML:es(e,t);break;case _o.OPTION:e.openElements.currentTagId===_o.OPTION&&e.openElements.pop(),e._insertElement(t,Co.HTML);break;case _o.OPTGROUP:e.openElements.currentTagId===_o.OPTION&&e.openElements.pop(),e.openElements.currentTagId===_o.OPTGROUP&&e.openElements.pop(),e._insertElement(t,Co.HTML);break;case _o.INPUT:case _o.KEYGEN:case _o.TEXTAREA:case _o.SELECT:e.openElements.hasInSelectScope(_o.SELECT)&&(e.openElements.popUntilTagNamePopped(_o.SELECT),e._resetInsertionMode(),t.tagID!==_o.SELECT&&e._processStartTag(t));break;case _o.SCRIPT:case _o.TEMPLATE:za(e,t)}}function ys(e,t){switch(t.tagID){case _o.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===_o.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===_o.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===_o.OPTGROUP&&e.openElements.pop();break;case _o.OPTION:e.openElements.currentTagId===_o.OPTION&&e.openElements.pop();break;case _o.SELECT:e.openElements.hasInSelectScope(_o.SELECT)&&(e.openElements.popUntilTagNamePopped(_o.SELECT),e._resetInsertionMode());break;case _o.TEMPLATE:ja(e,t)}}function vs(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(_o.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Fa(e,t)}function Es(e,t){var n;if(t.tagID===_o.HTML){if(e.fragmentContext||(e.insertionMode=xa.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===_o.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(null===(n=e.treeAdapter.getNodeSourceCodeLocation(r))||void 0===n?void 0:n.endTag)&&e._setEndLocation(r,t)}}else ws(e,t)}function ws(e,t){e.insertionMode=xa.IN_BODY,Ya(e,t)}function Ss(e,t){e.insertionMode=xa.IN_BODY,Ya(e,t)}function Ts(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==Co.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}const xs=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Cs={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function As(e,t){const r=function(e){const t="root"===e.type?e.children[0]:e;return Boolean(t&&("doctype"===t.type||"element"===t.type&&"html"===t.tagName.toLowerCase()))}(e),i=g("type",{handlers:{root:Rs,element:_s,text:Ls,comment:Is,doctype:Ns,raw:Os},unknown:Ms}),a={parser:r?new Ra(Cs):Ra.getFragmentParser(void 0,Cs),handle(e){i(e,a)},stitches:!1,options:t||{}};i(e,a),Ps(a,n());const s=function(e,t){const n=t||{};return Ei({file:n.file||void 0,location:!1,schema:"svg"===n.space?ci:li,verbose:n.verbose||!1},e)}(r?a.parser.document:a.parser.getFragment(),{file:a.options.file});return a.stitches&&o(s,"comment",(function(e,t,n){if(e.value.stitch&&n&&void 0!==t)return n.children[t]=e.value.stitch,t})),"root"===s.type&&1===s.children.length&&s.children[0].type===e.type?s.children[0]:s}function Ds(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Rs(e,t){Ds(e.children,t)}function _s(e,t){!function(e,t){const r=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Uo.PLAINTEXT)return;Ps(t,n(e));const i=t.parser.openElements.current;let o="namespaceURI"in i?i.namespaceURI:p.html;o===p.html&&"svg"===r&&(o=p.svg);const a=(l={...e,children:[]},co(l,"svg"===({space:o===p.svg?"svg":"html"}||so).space?ao:oo)),s={type:xo.START_TAG,tagName:r,tagID:Oo(r),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Fs(e)};var l;t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=r}(e,t),Ds(e.children,t),function(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&po.includes(n))return;if(t.parser.tokenizer.state===Uo.PLAINTEXT)return;Ps(t,r(e));const i={type:xo.END_TAG,tagName:n,tagID:Oo(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Fs(e)};t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken),n!==t.parser.tokenizer.lastStartTagName||t.parser.tokenizer.state!==Uo.RCDATA&&t.parser.tokenizer.state!==Uo.RAWTEXT&&t.parser.tokenizer.state!==Uo.SCRIPT_DATA||(t.parser.tokenizer.state=Uo.DATA)}(e,t)}function Ls(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const r={type:xo.CHARACTER,chars:e.value,location:Fs(e)};Ps(t,n(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Ns(e,t){const r={type:xo.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Fs(e)};Ps(t,n(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Is(e,t){const r={type:xo.COMMENT,data:e.value,location:Fs(e)};Ps(t,n(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Os(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,qs(t,n(e)),t.parser.tokenizer.write(e.value,!1),t.parser.tokenizer._runParsingLoop(),72===t.parser.tokenizer.state||78===t.parser.tokenizer.state){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function Ms(e,t){const n=e;if(!t.options.passThrough||!t.options.passThrough.includes(n.type)){let e="";throw xs.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+e)}!function(e,t){t.stitches=!0;const n=function(e){return i("children"in e?{...e,children:[]}:e)}(e);if("children"in e&&"children"in n){const r=As({type:"root",children:e.children},t.options);n.children=r.children}Is({type:"comment",value:{stitch:n}},t)}(n,t)}function Ps(e,t){qs(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Uo.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function qs(e,t){if(t&&void 0!==t.offset){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=1-t.column,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function Fs(e){const t=n(e)||{line:void 0,column:void 0,offset:void 0},i=r(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:i.line,endCol:i.column,endOffset:i.offset}}function Bs(e){return function(t,n){return As(t,{...e,file:n})}}var Us,Hs,zs=/\/\*(?:[^*]|\*(?!\/))*\*\//g,js=/\n/g,Vs=/^\s*/,Gs=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,$s=/^:\s*/,Ys=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,Ws=/^[;\s]*/;var Qs,Xs,Ks=e(Hs?Us:(Hs=1,Us={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]})),Zs=function(){if(Xs)return Qs;Xs=1;const e="a-f\\d",t=`#?[${e}]{3}[${e}]?`,n=`#?[${e}]{6}([${e}]{2})?`,r=new RegExp(`[^#${e}]`,"gi"),i=new RegExp(`^${t}$|^${n}$`,"i");return Qs=(e,t={})=>{if("string"!=typeof e||r.test(e)||!i.test(e))throw new TypeError("Expected a valid hex string");let n=1;8===(e=e.replace(/^#/,"")).length&&(n=Number.parseInt(e.slice(6,8),16)/255,e=e.slice(0,6)),4===e.length&&(n=Number.parseInt(e.slice(3,4).repeat(2),16)/255,e=e.slice(0,3)),3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const o=Number.parseInt(e,16),a=o>>16,s=o>>8&255,l=255&o,c="number"==typeof t.alpha?t.alpha:n;return"array"===t.format?[a,s,l,c]:"css"===t.format?`rgb(${a} ${s} ${l}${1===c?"":` / ${Number((100*c).toFixed(2))}%`})`:{red:a,green:s,blue:l,alpha:c}},Qs}(),Js=e(Zs),el=new RegExp(/^#([a-f0-9]{3,4}|[a-f0-9]{4}(?:[a-f0-9]{2}){1,2})\b$/,"i");const tl="-?\\d*(?:\\.\\d+)",nl=`(${tl}?)`,rl=`(${tl}?%)`,il=`(${tl}?%?)`,ol=`^\n hsla?\\(\n \\s*(-?\\d*(?:\\.\\d+)?(?:deg|rad|turn)?)\\s*,\n \\s*${rl}\\s*,\n \\s*${rl}\\s*\n (?:,\\s*${il}\\s*)?\n \\)\n $\n`.replace(/\n|\s/g,"");var al=new RegExp(ol);const sl=`^\n hsla?\\(\n \\s*(-?\\d*(?:\\.\\d+)?(?:deg|rad|turn)?)\\s*\n \\s+${rl}\n \\s+${rl}\n \\s*(?:\\s*\\/\\s*${il}\\s*)?\n \\)\n $\n`.replace(/\n|\s/g,"");var ll=new RegExp(sl);const cl=`^\n rgba?\\(\n \\s*${nl}\\s*,\n \\s*${nl}\\s*,\n \\s*${nl}\\s*\n (?:,\\s*${il}\\s*)?\n \\)\n $\n`.replace(/\n|\s/g,"");var ul=new RegExp(cl);const hl=`^\n rgba?\\(\n \\s*${rl}\\s*,\n \\s*${rl}\\s*,\n \\s*${rl}\\s*\n (?:,\\s*${il}\\s*)?\n \\)\n $\n`.replace(/\n|\s/g,"");var fl=new RegExp(hl);const dl=`^\n rgba?\\(\n \\s*${nl}\n \\s+${nl}\n \\s+${nl}\n \\s*(?:\\s*\\/\\s*${il}\\s*)?\n \\)\n$\n`.replace(/\n|\s/g,"");var pl=new RegExp(dl);const gl=`^\n rgba?\\(\n \\s*${rl}\n \\s+${rl}\n \\s+${rl}\n \\s*(?:\\s*\\/\\s*${il}\\s*)?\n \\)\n$\n`.replace(/\n|\s/g,"");var ml=new RegExp(gl),bl=new RegExp(/^transparent$/,"i");const kl=(e,t,n)=>Math.min(Math.max(t,e),n),yl=e=>{let t=e;return"number"!=typeof t&&(t=t.endsWith("%")?255*parseFloat(t)/100:parseFloat(t)),kl(Math.round(t),0,255)},vl=e=>kl(parseFloat(e),0,100);function El(e){let t=e;return"number"!=typeof t&&(t=t.endsWith("%")?parseFloat(t)/100:parseFloat(t)),kl(t,0,1)}function wl([,e,t,n,r=1]){return{type:"rgb",values:[e,t,n].map(yl),alpha:El(null===r?1:r)}}
2
+ /**
3
+ * parse-css-color
4
+ * @version v0.2.1
5
+ * @link http://github.com/noeldelgado/parse-css-color/
6
+ * @license MIT
7
+ */const Sl=["background-color","color","font-style","font-weight","text-decoration-color","text-decoration-line","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-decoration","width","height","min-width","min-height"];function Tl(e){var t;e.tagName&&(null===(t=e.properties)||void 0===t?void 0:t.style)&&(e.properties.style=function(e,t){try{const n=function(e){const t=Object.assign({},e);return delete t.background,"background"in e&&null!==(e=>{if("string"!=typeof e)return null;const t=el.exec(e);if(t)return function(e){const[t,n,r,i]=Js(e,{format:"array"});return wl([null,t,n,r,i])}(t[0]);const n=ll.exec(e)||al.exec(e);if(n)return function([,e,t,n,r=1]){let i=e;return i=i.endsWith("turn")?360*parseFloat(i)/1:i.endsWith("rad")?Math.round(180*parseFloat(i)/Math.PI):parseFloat(i),{type:"hsl",values:[i,vl(t),vl(n)],alpha:El(null===r?1:r)}}(n);const r=pl.exec(e)||ml.exec(e)||ul.exec(e)||fl.exec(e);if(r)return wl(r);if(bl.exec(e))return wl([null,0,0,0,0]);const i=Ks[e.toLowerCase()];return i?wl([null,i[0],i[1],i[2],1]):null})(e.background)&&(t["background-color"]=e.background),t}(function(e){let t=null;if(!e||"string"!=typeof e)return t;const n=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(e){var t=e.match(js);t&&(n+=t.length);var i=e.lastIndexOf("\n");r=~i?e.length-i:r+e.length}function o(){var e={line:n,column:r};return function(t){return t.position=new a(e),c(),t}}function a(e){this.start=e,this.end={line:n,column:r},this.source=t.source}function s(i){var o=new Error(t.source+":"+n+":"+r+": "+i);if(o.reason=i,o.filename=t.source,o.line=n,o.column=r,o.source=e,!t.silent)throw o}function l(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function c(){l(Vs)}function u(e){for(var t;t=h();)e.push(t);return e}function h(){var t=o();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;""!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(""===e.charAt((n+=2)-1))return s("End of comment missing");var a=e.slice(2,n-2);return r+=2,i(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function f(){var e=o(),t=l(Gs);if(t){if(h(),!l($s))return s("property missing ':'");var n=l(Ys),r=e({type:"declaration",property:t[0].replace(zs,"").trim(),value:n?n[0].replace(zs,"").trim():""});return l(Ws),r}}return a.prototype.content=e,c(),function(){var e,t=[];for(u(t);e=f();)t.push(e),u(t);return t}()}(e);return n.forEach((e=>{if("declaration"!==e.type)return;const{property:n,value:r}=e;r&&(t=t??{},t[n]=r)})),t}(e));return Object.entries(n).filter((([e])=>Sl.includes(e))).filter((([e,n])=>!function(e,t,n){return"table"===e&&"width"===t&&function(e){return 0===Number.parseFloat(e)}(n)}(t,e,n))).map((([e,t])=>`${e}: ${t}`)).join("; ")}catch(t){return console.error("Failed to parse style value",e,t),""}}(e.properties.style,e.tagName))}const xl=/\u00A0/g,Cl=["200B","200C","200D","FEFF"],Al=new Set(["audio","canvas","embed","iframe","img","input","object","svg","video"]),Dl=new Set(["br"]),Rl=(e,t)=>{if(e&&"object"==typeof e){if("element"===e.type&&"p"===e.tagName&&t&&_l(e)&&Array.isArray(t.children)){const n=t.children.indexOf(e);if(-1!==n)return void t.children.splice(n,1)}if(Array.isArray(e.children)&&0!==e.children.length)for(let t=e.children.length-1;t>=0;t--)Rl(e.children[t],e)}},_l=e=>!Array.isArray(e.children)||0===e.children.length||e.children.every((e=>Ll(e))),Ll=e=>{if(!e)return!0;if("text"===e.type)return Il("string"==typeof e.value?e.value:"");if("comment"===e.type)return!0;if("element"===e.type){const t=e,n=t.tagName;return"string"!=typeof n||!Nl(n)&&(!!Dl.has(n)||!Array.isArray(t.children)||0===t.children.length||t.children.every((e=>Ll(e))))}return!0},Nl=e=>Al.has(e)||(e=>e.includes("-"))(e),Il=e=>{if(!e)return!0;const t=(e=>{let t=e;for(const e of Cl){const n=String.fromCodePoint(Number.parseInt(e,16));t=t.split(n).join("")}return t})(e.replaceAll(xl," "));return""===t.trim()};async function Ol(e,t){var n;return(await E().use(mt).use(Cr).use((null==t?void 0:t.forceHardLineBreaks)?[Dr]:[]).use(It,{allowDangerousHtml:!0}).use(Bs).use((()=>e=>(o(e,"element",(e=>{var t,n;if("a"===e.tagName){const r=null===(t=e.properties)||void 0===t?void 0:t.href,i=null===(n=e.properties)||void 0===n?void 0:n.title;if(!r)return;const o=C(r,i);e.properties.target=o.target,e.properties.rel=o.rel,e.properties.referrerpolicy=o.referrerpolicy}})),e))).use(w,Pl(null!==(n=null==t?void 0:t.whitelist)&&void 0!==n?n:[])).use((()=>e=>{o(e,"element",Tl)})).use(((e=!1)=>()=>e?e=>(Rl(e,null),e):e=>e)(null==t?void 0:t.removeEmptyParagraphs)).use(function(e=!1){return()=>e?e=>(o(e,"element",(e=>{"img"===e.tagName&&(e.properties=e.properties||{},e.properties.loading="lazy",e.properties.src&&(e.properties["data-src"]=e.properties.src,e.properties.src=void 0))})),e):e=>e}(null==t?void 0:t.lazyLoadImages)).use(S).process(e)).toString()}async function Ml(e,t){return(await E().use(T).use(w,Pl(null!=t?t:[])).use((()=>e=>{o(e,"element",Tl)})).use(S).process(e)).toString()}function Pl(e){var t,n,r,i;const o=[...null!==(t=x.attributes["*"])&&void 0!==t?t:[]].filter((e=>"height"!==e));o.push("style");const a=Object.assign(Object.assign({},x),{clobberPrefix:"",strip:[...null!==(n=x.strip)&&void 0!==n?n:[],"style"],tagNames:[...x.tagNames||[],"colgroup","col",...e.map((e=>e.tagName))],attributes:Object.assign(Object.assign({},x.attributes),{p:[...null!==(r=x.attributes.p)&&void 0!==r?r:[],["className","MsoNormal"]],a:[...null!==(i=x.attributes.a)&&void 0!==i?i:[],"referrerpolicy"],"*":o})});for(const t of e)a.attributes[t.tagName]=t.attributes;return a}export{j as a,V as b,Ie as c,Sn as d,lt as e,bn as f,C as g,Oe as h,se as i,Q as j,wn as k,Mn as l,Ol as m,fn as n,mt as o,pn as p,Cr as r,Ml as s,D as t}