upkram 1.0.5 → 1.0.7

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.
package/upkram-ni.js CHANGED
@@ -1 +1 @@
1
- (function(){const ESCAPABLE_CHARS="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";const AUTO_COLORS=["#6b5acf","#e74c6f","#4a90d9","#f59e0b","#10b981","#8b5cf6","#ec4899","#06b6d4","#d97706","#059669"];const COLOR_ALIASES={red:"#e74c6f",green:"#10b981",orange:"#d97706",yellow:"#f59e0b",blue:"#4a90d9",purple:"#6b5acf",pink:"#ec4899",cyan:"#06b6d4",gray:"#8a8ab5",grey:"#8a8ab5"};const RAINBOW=["#e74c6f","#f59e0b","#10b981","#06b6d4","#4a90d9","#6b5acf","#8b5cf6","#ec4899"];const BLOCK_HTML_TAGS=/^<(div|details|summary|section|article|aside|nav|header|footer|main|figure|figcaption|table|thead|tbody|tfoot|tr|td|th|ul|ol|li|dl|dt|dd|pre|blockquote|iframe|video|audio|canvas|svg|form|fieldset|legend|style|script|noscript|template|hr)(?:\s[^>]*)?\/?>/i;const BLOCK_TAGS_SET={address:1,article:1,aside:1,audio:1,base:1,basefont:1,blockquote:1,body:1,canvas:1,caption:1,center:1,col:1,colgroup:1,dd:1,details:1,dialog:1,dir:1,div:1,dl:1,dt:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,frame:1,frameset:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,head:1,header:1,hgroup:1,hr:1,html:1,iframe:1,legend:1,li:1,link:1,main:1,math:1,menu:1,menuitem:1,nav:1,noframes:1,noscript:1,object:1,ol:1,optgroup:1,option:1,p:1,param:1,pre:1,search:1,section:1,style:1,script:1,summary:1,svg:1,table:1,tbody:1,td:1,template:1,tfoot:1,th:1,thead:1,title:1,tr:1,track:1,ul:1,video:1};let katexLib=null;try{if(typeof require==="function")katexLib=require("katex")}catch(e){}let nodeEmojiLib=null;try{if(typeof require==="function")nodeEmojiLib=require("emoji-js")}catch(e){}let __emojiConv=null;function getEmojiConv(){if(!nodeEmojiLib)return null;if(__emojiConv)return __emojiConv;__emojiConv=new nodeEmojiLib;__emojiConv.replace_mode="unified";__emojiConv.allow_native=true;__emojiConv.colons_mode=false;return __emojiConv}function escapeHtml(text){if(text===null||text===undefined)return"";return String(text).replace(/\uE002/g,"&amp;").replace(/&(?!(?:#\d{1,7}|#[xX][0-9a-fA-F]{1,6}|(?:CounterClockwiseContourIntegral|ClockwiseContourIntegral|DoubleLongLeftRightArrow|NotNestedGreaterGreater|DiacriticalDoubleAcute|NotSquareSupersetEqual|CloseCurlyDoubleQuote|DoubleContourIntegral|FilledVerySmallSquare|NegativeVeryThinSpace|NotPrecedesSlantEqual|NotRightTriangleEqual|NotSucceedsSlantEqual|CapitalDifferentialD|DoubleLeftRightArrow|DoubleLongRightArrow|EmptyVerySmallSquare|NestedGreaterGreater|NotDoubleVerticalBar|NotGreaterSlantEqual|NotLeftTriangleEqual|NotSquareSubsetEqual|OpenCurlyDoubleQuote|ReverseUpEquilibrium|DoubleLongLeftArrow|DownLeftRightVector|LeftArrowRightArrow|leftrightsquigarrow|NegativeMediumSpace|NotGreaterFullEqual|NotRightTriangleBar|RightArrowLeftArrow|SquareSupersetEqual|blacktriangleright|DownRightTeeVector|DownRightVectorBar|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|NegativeThickSpace|NotLeftTriangleBar|PrecedesSlantEqual|ReverseEquilibrium|RightDoubleBracket|RightDownTeeVector|RightDownVectorBar|RightTriangleEqual|SquareIntersection|SucceedsSlantEqual|blacktriangledown|blacktriangleleft|DoubleUpDownArrow|DoubleVerticalBar|DownLeftTeeVector|DownLeftVectorBar|FilledSmallSquare|GreaterSlantEqual|LeftDoubleBracket|LeftDownTeeVector|LeftDownVectorBar|leftrightharpoons|LeftTriangleEqual|NegativeThinSpace|NotGreaterGreater|NotLessSlantEqual|NotNestedLessLess|NotReverseElement|NotSquareSuperset|NotTildeFullEqual|RightAngleBracket|rightleftharpoons|RightUpDownVector|SquareSubsetEqual|twoheadrightarrow|VerticalSeparator|circlearrowright|DiacriticalAcute|DiacriticalGrave|DiacriticalTilde|DoubleRightArrow|DownArrowUpArrow|downharpoonright|EmptySmallSquare|GreaterEqualLess|GreaterFullEqual|LeftAngleBracket|LeftUpDownVector|LessEqualGreater|NonBreakingSpace|NotPrecedesEqual|NotRightTriangle|NotSucceedsEqual|NotSucceedsTilde|NotSupersetEqual|ntrianglerighteq|rightharpoondown|rightrightarrows|RightTriangleBar|RightUpTeeVector|RightUpVectorBar|twoheadleftarrow|UnderParenthesis|UpArrowDownArrow|vartriangleright|bigtriangledown|circlearrowleft|CloseCurlyQuote|ContourIntegral|curvearrowright|DoubleDownArrow|DoubleLeftArrow|downharpoonleft|DownRightVector|leftharpoondown|leftrightarrows|LeftRightVector|LeftTriangleBar|LeftUpTeeVector|LeftUpVectorBar|LowerRightArrow|nleftrightarrow|nLeftrightarrow|NotGreaterEqual|NotGreaterTilde|NotHumpDownHump|NotLeftTriangle|NotSquareSubset|ntrianglelefteq|OverParenthesis|RightDownVector|rightleftarrows|rightsquigarrow|rightthreetimes|ShortRightArrow|straightepsilon|trianglerighteq|UpperRightArrow|vartriangleleft|curvearrowleft|DiacriticalDot|doublebarwedge|DoubleRightTee|downdownarrows|DownLeftVector|GreaterGreater|hookrightarrow|HorizontalLine|InvisibleComma|InvisibleTimes|LeftDownVector|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|leftthreetimes|LessSlantEqual|longrightarrow|Longrightarrow|LongRightArrow|looparrowright|LowerLeftArrow|NestedLessLess|NotGreaterLess|NotLessGreater|NotSubsetEqual|NotVerticalBar|nshortparallel|ntriangleright|OpenCurlyQuote|ReverseElement|rightarrowtail|rightharpoonup|RightTeeVector|RightVectorBar|ShortDownArrow|ShortLeftArrow|SquareSuperset|TildeFullEqual|trianglelefteq|upharpoonright|UpperLeftArrow|ZeroWidthSpace|ApplyFunction|bigtriangleup|blacktriangle|DifferentialD|divideontimes|DoubleLeftTee|DoubleUpArrow|fallingdotseq|hookleftarrow|leftarrowtail|leftharpoonup|LeftTeeVector|LeftVectorBar|LessFullEqual|longleftarrow|Longleftarrow|LongLeftArrow|looparrowleft|measuredangle|NotEqualTilde|NotTildeEqual|NotTildeTilde|ntriangleleft|Poincareplane|PrecedesEqual|PrecedesTilde|RightArrowBar|RightTeeArrow|RightTriangle|RightUpVector|shortparallel|smallsetminus|SucceedsEqual|SucceedsTilde|SupersetEqual|triangleright|UpEquilibrium|upharpoonleft|varsubsetneqq|varsupsetneqq|VerticalTilde|VeryThinSpace|blacklozenge|DownArrowBar|DownTeeArrow|exponentiale|ExponentialE|GreaterEqual|GreaterTilde|HilbertSpace|HumpDownHump|Intersection|LeftArrowBar|LeftTeeArrow|LeftTriangle|LeftUpVector|NotCongruent|NotHumpEqual|NotLessEqual|NotLessTilde|Proportional|RightCeiling|risingdotseq|RoundImplies|ShortUpArrow|SquareSubset|triangledown|triangleleft|UnderBracket|varsubsetneq|varsupsetneq|VerticalLine|backepsilon|blacksquare|circledcirc|circleddash|CircleMinus|CircleTimes|curlyeqprec|curlyeqsucc|diamondsuit|eqslantless|Equilibrium|expectation|GreaterLess|LeftCeiling|LessGreater|MediumSpace|NotLessLess|NotPrecedes|NotSucceeds|NotSuperset|nrightarrow|nRightarrow|OverBracket|preccurlyeq|precnapprox|quaternions|RightVector|Rrightarrow|RuleDelayed|SmallCircle|SquareUnion|straightphi|SubsetEqual|succcurlyeq|succnapprox|thickapprox|updownarrow|Updownarrow|UpDownArrow|VerticalBar|Bernoullis|circledast|CirclePlus|complement|curlywedge|eqslantgtr|EqualTilde|Fouriertrf|gtreqqless|ImaginaryI|Laplacetrf|LeftVector|lessapprox|lesseqqgtr|Lleftarrow|lmoustache|longmapsto|mapstodown|mapstoleft|nleftarrow|nLeftarrow|NotElement|NotGreater|nsubseteqq|nsupseteqq|precapprox|Proportion|rightarrow|Rightarrow|RightArrow|RightFloor|rmoustache|sqsubseteq|sqsupseteq|subsetneqq|succapprox|supsetneqq|ThickSpace|TildeEqual|TildeTilde|UnderBrace|UpArrowBar|UpTeeArrow|upuparrows|varepsilon|varnothing|backprime|backsimeq|Backslash|bigotimes|centerdot|CenterDot|checkmark|CircleDot|complexes|Congruent|Coproduct|dotsquare|DoubleDot|downarrow|Downarrow|DownArrow|DownBreve|gtrapprox|gtreqless|gvertneqq|heartsuit|HumpEqual|leftarrow|Leftarrow|LeftArrow|LeftFloor|lesseqgtr|LessTilde|lvertneqq|Mellintrf|MinusPlus|ngeqslant|nleqslant|NotCupCap|NotExists|NotSubset|nparallel|nshortmid|nsubseteq|nsupseteq|OverBrace|pitchfork|PlusMinus|rationals|spadesuit|subseteqq|subsetneq|supseteqq|supsetneq|therefore|Therefore|ThinSpace|triangleq|TripleDot|UnionPlus|varpropto|andslope|angmsdaa|angmsdab|angmsdac|angmsdad|angmsdae|angmsdaf|angmsdag|angmsdah|angrtvbd|approxeq|awconint|backcong|barwedge|bbrktbrk|bigoplus|bigsqcup|biguplus|bigwedge|boxminus|boxtimes|bsolhsub|capbrcup|circledR|circledS|cirfnint|clubsuit|cupbrcap|curlyvee|cwconint|DDotrahd|doteqdot|DotEqual|dotminus|drbkarow|dzigrarr|elinters|emptyset|eqvparsl|fpartint|geqslant|gesdotol|gnapprox|hksearow|hkswarow|imagline|imagpart|infintie|integers|Integral|intercal|intlarhk|laemptyv|ldrushar|leqslant|lesdotor|LessLess|llcorner|lnapprox|lrcorner|lurdshar|mapstoup|multimap|naturals|ncongdot|NotEqual|notindot|NotTilde|otimesas|parallel|PartialD|plusacir|pointint|Precedes|precneqq|precnsim|profalar|profline|profsurf|raemptyv|realpart|RightTee|rppolint|rtriltri|scpolint|setminus|shortmid|smeparsl|sqsubset|sqsupset|subseteq|Succeeds|succneqq|succnsim|SuchThat|Superset|supseteq|thetasym|thicksim|timesbar|triangle|triminus|trpezium|Uarrocir|ulcorner|UnderBar|urcorner|varkappa|varsigma|vartheta|alefsym|angrtvb|angzarr|asympeq|backsim|because|Because|bemptyv|between|bigcirc|bigodot|bigstar|bnequiv|boxplus|Cayleys|Cconint|ccupssm|Cedilla|cemptyv|cirscir|coloneq|congdot|cudarrl|cudarrr|cularrp|curarrm|dbkarow|ddagger|ddotseq|demptyv|diamond|Diamond|digamma|dotplus|DownTee|dwangle|Element|epsilon|Epsilon|eqcolon|equivDD|gesdoto|gtquest|gtrless|harrcir|Implies|intprod|isindot|larrbfs|larrsim|lbrksld|lbrkslu|ldrdhar|LeftTee|lesdoto|lessdot|lessgtr|lesssim|lotimes|lozenge|ltquest|luruhar|maltese|minusdu|napprox|natural|nearrow|NewLine|nexists|NoBreak|notinva|notinvb|notinvc|NotLess|notniva|notnivb|notnivc|npolint|npreceq|nsqsube|nsqsupe|nsubset|nsucceq|nsupset|nvinfin|nvltrie|nvrtrie|nwarrow|olcross|omicron|Omicron|orderof|orslope|OverBar|pertenk|planckh|pluscir|plussim|plustwo|precsim|Product|quatint|questeq|rarrbfs|rarrsim|rbrksld|rbrkslu|rdldhar|realine|rotimes|ruluhar|searrow|simplus|simrarr|subedot|submult|subplus|subrarr|succsim|supdsub|supedot|suphsol|suphsub|suplarr|supmult|supplus|swarrow|topfork|triplus|tritime|uparrow|Uparrow|UpArrow|upsilon|Upsilon|uwangle|vzigzag|zigrarr|aacute|Aacute|abreve|Abreve|agrave|Agrave|andand|angmsd|angsph|apacir|approx|Assign|atilde|Atilde|barvee|barwed|Barwed|becaus|bernou|bigcap|bigcup|bigvee|bkarow|bottom|bowtie|boxbox|bprime|brvbar|bullet|bumpeq|Bumpeq|cacute|Cacute|capand|capcap|capcup|capdot|ccaron|Ccaron|ccedil|Ccedil|circeq|cirmid|colone|Colone|commat|compfn|conint|Conint|coprod|copysr|cularr|cupcap|CupCap|cupcup|cupdot|curarr|curren|cylcty|dagger|Dagger|daleth|dcaron|Dcaron|dfisht|divide|divonx|dlcorn|dlcrop|dollar|DotDot|drcorn|drcrop|dstrok|Dstrok|eacute|Eacute|easter|ecaron|Ecaron|ecolon|egrave|Egrave|egsdot|elsdot|emptyv|emsp13|emsp14|eparsl|eqcirc|equals|equest|Exists|female|ffilig|ffllig|forall|ForAll|frac12|frac13|frac14|frac15|frac16|frac18|frac23|frac25|frac34|frac35|frac38|frac45|frac56|frac58|frac78|gacute|gammad|Gammad|gbreve|Gbreve|Gcedil|gesdot|gesles|gtlPar|gtrarr|gtrdot|gtrsim|hairsp|hamilt|hardcy|HARDcy|hearts|hellip|hercon|homtht|horbar|hslash|hstrok|Hstrok|hybull|hyphen|iacute|Iacute|igrave|Igrave|iiiint|iinfin|incare|inodot|intcal|iquest|isinsv|itilde|Itilde|jsercy|Jsercy|kappav|kcedil|Kcedil|kgreen|lacute|Lacute|lagran|lambda|Lambda|langle|larrfs|larrhk|larrlp|larrpl|larrtl|latail|lAtail|lbrace|lbrack|lcaron|Lcaron|lcedil|Lcedil|ldquor|lesdot|lesges|lfisht|lfloor|lharul|llhard|lmidot|Lmidot|lmoust|loplus|lowast|lowbar|lparlt|lrhard|lsaquo|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|ltrPar|mapsto|marker|mcomma|midast|midcir|middot|minusb|minusd|mnplus|models|mstpos|nacute|Nacute|nbumpe|ncaron|Ncaron|ncedil|Ncedil|nearhk|nequiv|nesear|nexist|nltrie|notinE|nparsl|nprcue|nrarrc|nrarrw|nrtrie|nsccue|nsimeq|ntilde|Ntilde|numero|nvdash|nvDash|nVdash|nVDash|nvHarr|nvlArr|nvrArr|nwarhk|nwnear|oacute|Oacute|odblac|Odblac|odsold|ograve|Ograve|ominus|origof|oslash|Oslash|otilde|Otilde|otimes|Otimes|parsim|percnt|period|permil|phmmat|planck|plankv|plusdo|plusdu|plusmn|preceq|primes|prnsim|propto|prurel|puncsp|qprime|racute|Racute|rangle|rarrap|rarrfs|rarrhk|rarrlp|rarrpl|rarrtl|Rarrtl|ratail|rAtail|rbrace|rbrack|rcaron|Rcaron|rcedil|Rcedil|rdquor|rfisht|rfloor|rharul|rmoust|roplus|rpargt|rsaquo|rsquor|rthree|rtimes|sacute|Sacute|scaron|Scaron|scedil|Scedil|scnsim|searhk|seswar|sfrown|shchcy|SHCHcy|sigmaf|sigmav|simdot|smashp|softcy|SOFTcy|solbar|spades|sqcaps|sqcups|sqsube|sqsupe|square|Square|squarf|ssetmn|ssmile|sstarf|subdot|subset|Subset|subsim|subsub|subsup|succeq|supdot|supset|Supset|supsim|supsub|supsup|swarhk|swnwar|target|tcaron|Tcaron|tcedil|Tcedil|telrec|there4|thetav|thinsp|thksim|timesb|timesd|topbot|topcir|tprime|tridot|tstrok|Tstrok|uacute|Uacute|ubreve|Ubreve|udblac|Udblac|ufisht|ugrave|Ugrave|ulcorn|ulcrop|urcorn|urcrop|utilde|Utilde|vangrt|varphi|varrho|Vdashl|veebar|vellip|verbar|Verbar|vsubne|vsubnE|vsupne|vsupnE|Vvdash|wedbar|wedgeq|weierp|wreath|xoplus|xotime|xsqcup|xuplus|xwedge|yacute|Yacute|zacute|Zacute|zcaron|Zcaron|zeetrf|acirc|Acirc|acute|aelig|AElig|aleph|alpha|Alpha|amacr|Amacr|amalg|angle|angrt|angst|aogon|Aogon|aring|Aring|asymp|awint|bcong|bdquo|bepsi|blank|blk12|blk14|blk34|block|boxdl|boxdL|boxDl|boxDL|boxdr|boxdR|boxDr|boxDR|boxhd|boxhD|boxHd|boxHD|boxhu|boxhU|boxHu|boxHU|boxul|boxuL|boxUl|boxUL|boxur|boxuR|boxUr|boxUR|boxvh|boxvH|boxVh|boxVH|boxvl|boxvL|boxVl|boxVL|boxvr|boxvR|boxVr|boxVR|breve|Breve|bsemi|bsime|bsolb|bumpe|bumpE|caret|caron|ccaps|ccirc|Ccirc|ccups|cedil|check|clubs|colon|Colon|comma|crarr|cross|Cross|csube|csupe|ctdot|cuepr|cuesc|cupor|cuvee|cuwed|cwint|dashv|Dashv|dblac|ddarr|delta|Delta|dharl|dharr|diams|disin|doteq|dtdot|dtrif|duarr|duhar|ecirc|Ecirc|eDDot|efDot|emacr|Emacr|empty|eogon|Eogon|eplus|epsiv|eqsim|Equal|equiv|erarr|erDot|esdot|exist|fflig|filig|fjlig|fllig|fltns|forkv|frasl|frown|gamma|Gamma|gcirc|Gcirc|gescc|gimel|gneqq|gnsim|grave|gsime|gsiml|gtcir|gtdot|Hacek|harrw|hcirc|Hcirc|hoarr|icirc|Icirc|iexcl|iiint|iiota|ijlig|IJlig|imacr|Imacr|image|imath|imped|infin|iogon|Iogon|iprod|isinE|isins|isinv|iukcy|Iukcy|jcirc|Jcirc|jmath|jukcy|Jukcy|kappa|Kappa|lAarr|langd|laquo|larrb|lates|lbarr|lBarr|lbbrk|lbrke|lceil|ldquo|lescc|lhard|lharu|lhblk|llarr|lltri|lneqq|lnsim|loang|loarr|lobrk|lopar|lrarr|lrhar|lrtri|lsime|lsimg|lsquo|ltcir|ltdot|ltrie|ltrif|mdash|mDDot|micro|minus|mumap|nabla|napid|napos|natur|nbump|ncong|ndash|nearr|neArr|nedot|nesim|ngeqq|ngsim|nharr|nhArr|nhpar|nlarr|nlArr|nleqq|nless|nlsim|nltri|notin|notni|npart|nprec|nrarr|nrArr|nrtri|nsime|nsmid|nspar|nsube|nsubE|nsucc|nsupe|nsupE|numsp|nvsim|nwarr|nwArr|ocirc|Ocirc|odash|oelig|OElig|ofcir|ohbar|olarr|olcir|oline|omacr|Omacr|omega|Omega|operp|oplus|orarr|order|ovbar|parsl|phone|plusb|pluse|pound|prcue|prime|Prime|prnap|prsim|quest|rAarr|radic|rangd|range|raquo|rarrb|rarrc|rarrw|ratio|rbarr|rBarr|RBarr|rbbrk|rbrke|rceil|rdquo|reals|rhard|rharu|rlarr|rlhar|rnmid|roang|roarr|robrk|ropar|rrarr|rsquo|rtrie|rtrif|sbquo|sccue|scirc|Scirc|scnap|scsim|sdotb|sdote|searr|seArr|setmn|sharp|sigma|Sigma|simeq|simgE|simlE|simne|slarr|smile|smtes|sqcap|sqcup|sqsub|sqsup|srarr|starf|strns|subne|subnE|supne|supnE|swarr|swArr|szlig|theta|Theta|thkap|thorn|THORN|tilde|Tilde|times|trade|TRADE|trisb|tshcy|TSHcy|twixt|ubrcy|Ubrcy|ucirc|Ucirc|udarr|udhar|uharl|uharr|uhblk|ultri|umacr|Umacr|Union|uogon|Uogon|uplus|upsih|UpTee|uring|Uring|urtri|utdot|utrif|uuarr|varpi|vBarv|vdash|vDash|Vdash|VDash|veeeq|vltri|vnsub|vnsup|vprop|vrtri|wcirc|Wcirc|wedge|Wedge|xcirc|xdtri|xharr|xhArr|xlarr|xlArr|xodot|xrarr|xrArr|xutri|ycirc|Ycirc|andd|andv|ange|aopf|Aopf|apid|apos|ascr|Ascr|auml|Auml|Barv|bbrk|beta|Beta|beth|bnot|bNot|bopf|Bopf|boxh|boxH|boxv|boxV|bscr|Bscr|bsim|bsol|bull|bump|caps|cdot|Cdot|cent|chcy|CHcy|circ|cire|cirE|comp|cong|copf|Copf|copy|COPY|cscr|Cscr|csub|csup|cups|darr|dArr|Darr|dash|dHar|diam|djcy|DJcy|dopf|Dopf|dscr|Dscr|dscy|DScy|dsol|dtri|dzcy|DZcy|ecir|edot|eDot|Edot|emsp|ensp|eopf|Eopf|epar|epsi|escr|Escr|esim|Esim|euml|Euml|euro|excl|flat|fnof|fopf|Fopf|fork|fscr|Fscr|gdot|Gdot|geqq|gesl|gjcy|GJcy|gnap|gneq|gopf|Gopf|gscr|Gscr|gsim|gtcc|gvnE|half|harr|hArr|hbar|hopf|Hopf|hscr|Hscr|Idot|iecy|IEcy|imof|iocy|IOcy|iopf|Iopf|iota|Iota|iscr|Iscr|isin|iuml|Iuml|jopf|Jopf|jscr|Jscr|khcy|KHcy|kjcy|KJcy|kopf|Kopf|kscr|Kscr|lang|Lang|larr|lArr|Larr|late|lcub|ldca|ldsh|leqq|lesg|lHar|ljcy|LJcy|lnap|lneq|lopf|Lopf|lozf|lpar|lscr|Lscr|lsim|lsqb|ltcc|ltri|lvnE|macr|male|malt|mlcp|mldr|mopf|Mopf|mscr|Mscr|nang|napE|nbsp|ncap|ncup|ngeq|nges|ngtr|nGtv|nisd|njcy|NJcy|nldr|nleq|nles|nLtv|nmid|nopf|Nopf|npar|npre|nsce|nscr|Nscr|nsim|nsub|nsup|ntgl|ntlg|nvap|nvge|nvgt|nvle|nvlt|oast|ocir|odiv|odot|ogon|oint|omid|oopf|Oopf|opar|ordf|ordm|oror|oscr|Oscr|osol|ouml|Ouml|para|part|perp|phiv|plus|popf|Popf|prap|prec|prnE|prod|prop|pscr|Pscr|qint|qopf|Qopf|qscr|Qscr|quot|QUOT|race|rang|Rang|rarr|rArr|Rarr|rcub|rdca|rdsh|real|rect|rHar|rhov|ring|ropf|Ropf|rpar|rscr|Rscr|rsqb|rtri|scap|scnE|sdot|sect|semi|sext|shcy|SHcy|sime|simg|siml|smid|smte|solb|sopf|Sopf|spar|Sqrt|squf|sscr|Sscr|star|Star|sube|subE|succ|sung|sup1|sup2|sup3|supe|supE|tbrk|tdot|tint|toea|topf|Topf|tosa|trie|tscr|Tscr|tscy|TScy|uarr|uArr|Uarr|uHar|uopf|Uopf|upsi|Upsi|uscr|Uscr|utri|uuml|Uuml|varr|vArr|vBar|Vbar|vert|Vert|vopf|Vopf|vscr|Vscr|wopf|Wopf|wscr|Wscr|xcap|xcup|xmap|xnis|xopf|Xopf|xscr|Xscr|xvee|yacy|YAcy|yicy|YIcy|yopf|Yopf|yscr|Yscr|yucy|YUcy|yuml|Yuml|zdot|Zdot|zeta|Zeta|zhcy|ZHcy|zopf|Zopf|zscr|Zscr|zwnj|acd|acE|acy|Acy|afr|Afr|amp|AMP|and|And|ang|ape|apE|ast|bcy|Bcy|bfr|Bfr|bne|bot|cap|Cap|cfr|Cfr|chi|Chi|cir|cup|Cup|dcy|Dcy|deg|Del|dfr|Dfr|die|div|dot|Dot|ecy|Ecy|efr|Efr|egs|ell|els|eng|ENG|eta|Eta|eth|ETH|fcy|Fcy|ffr|Ffr|gap|gcy|Gcy|gel|gEl|geq|ges|gfr|Gfr|ggg|gla|glE|glj|gne|gnE|Hat|hfr|Hfr|icy|Icy|iff|ifr|Ifr|int|Int|jcy|Jcy|jfr|Jfr|kcy|Kcy|kfr|Kfr|lap|lat|lcy|Lcy|leg|lEg|leq|les|lfr|Lfr|lgE|lne|lnE|loz|lrm|lsh|Lsh|map|Map|mcy|Mcy|mfr|Mfr|mho|mid|nap|ncy|Ncy|nfr|Nfr|nge|ngE|nGg|ngt|nGt|nis|niv|nle|nlE|nLl|nlt|nLt|not|Not|npr|nsc|num|ocy|Ocy|ofr|Ofr|ogt|ohm|olt|ord|orv|par|pcy|Pcy|pfr|Pfr|phi|Phi|piv|pre|prE|psi|Psi|qfr|Qfr|rcy|Rcy|reg|REG|rfr|Rfr|rho|Rho|rlm|rsh|Rsh|sce|scE|scy|Scy|sfr|Sfr|shy|sim|smt|sol|squ|sub|Sub|sum|Sum|sup|Sup|Tab|tau|Tau|tcy|Tcy|tfr|Tfr|top|ucy|Ucy|ufr|Ufr|uml|vcy|Vcy|vee|Vee|vfr|Vfr|wfr|Wfr|xfr|Xfr|ycy|Ycy|yen|yfr|Yfr|zcy|Zcy|zfr|Zfr|zwj|ac|af|ap|dd|DD|ee|eg|el|ge|gE|gg|Gg|gl|gt|Gt|GT|ic|ii|Im|in|it|le|lE|lg|ll|Ll|lt|Lt|LT|mp|mu|Mu|ne|ni|nu|Nu|or|Or|oS|pi|Pi|pm|pr|Pr|Re|rx|sc|Sc|wp|wr|xi|Xi));)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function escapeHtmlStrict(text){if(text===null||text===undefined)return"";return String(text).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}const esc=escapeHtml;function isSafeHref(h){h=String(h===null||h===undefined?"":h).trim();if(h==="")return true;var p=h.replace(/[\u0000-\u001F\u007F]/g,"");if(/^[a-z][a-z0-9+.-]*:/i.test(p)){return/^(https?|ftp|ftps|mailto|tel|sms|irc|ircs|git|ssh|news|nntp):/i.test(p)}return true}function escapeRe(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function isThematicBreak(line){const s=String(line);let c=0,n=0;for(let i=0;i<s.length;i++){const k=s.charCodeAt(i);if(k===32||k===9)continue;if(c===0){if(k!==42&&k!==45&&k!==95)return false;c=k;n=1}else if(k!==c)return false;else n++}return n>=3}function splitAttrs(raw){const m=String(raw).match(/\s+\{([^}]+)\}\s*$/);if(!m)return{text:raw,attrs:null};const inner=m[1];const attrs={id:"",cls:[],no:null,fold:false,nofold:false};const tokens=inner.split(/\s+/);for(const t of tokens){if(!t)continue;if(t.charAt(0)==="#"){attrs.id=t.slice(1)}else if(t.charAt(0)==="."){attrs.cls.push(t.slice(1))}else{const eq=t.indexOf("=");if(eq>0){const k=t.slice(0,eq),v=t.slice(eq+1);if(k==="no")attrs.no=v}else if(t==="fold"){attrs.fold=true}else if(t==="nofold"){attrs.nofold=true}}}return{text:raw.slice(0,m.index),attrs:attrs}}function normalizeRefLabel(s){return String(s).replace(/\uE004/g," ").replace(/ẞ/g,"ss").toUpperCase().toLowerCase().trim().replace(/\s+/g," ")}function extractTextFromNodes(nodes){let s="";for(const c of nodes){if(!c)continue;const t=c.type;if(t==="text"||t==="code"||t==="inlineCode")s+=(c.value||"").replace(/\uE004/g," ");else if(t==="abbr")s+=c.text||"";else if(t==="badge"||t==="term")s+=c.label||"";else if(t==="key")s+=c.value||"";else if(t==="lang")s+=c.name||"";else if(t==="date")s+=c.raw||"";else if(t==="ruby")s+=c.base||"";else if(t==="mathInline"||t==="mathBlock")s+=c.value||"";else if(t==="copy"||t==="copyBlock")s+=c.value||"";else if(t==="image")s+=c.alt||"";else if(t==="alt")s+=c.options&&c.options.length?c.options[0]:"";else if(t==="ref")s+=c.target||"";else if(t==="dot"||t==="pn"||t==="upper"||t==="lower"||t==="cap"||t==="cmd"||t==="flag")s+=c.text||"";else if(t==="note")s+=c.label||"";else if(c.children)s+=extractTextFromNodes(c.children)}return s}function slugify(text){let s=String(text).toLowerCase().trim();s=s.replace(/[\s,。、!?;:""''《》【】·—…,.!?;:'"()\[\]{}<>|\\\/]+/g,"-");s=s.replace(/[^\p{L}\p{N}\p{M}_-]/gu,"");s=s.replace(/-+/g,"-");s=s.replace(/^-|-$/g,"");if(!s)s="section";return s}function autoColor(name){let h=0;for(let i=0;i<name.length;i++)h=h*31+name.charCodeAt(i)>>>0;return AUTO_COLORS[h%AUTO_COLORS.length]}function isSafeAutolink(h){h=String(h===null||h===undefined?"":h).trim();var p=h.replace(/[\u0000-\u001F\u007F]/g,"");var m=/^([a-z][a-z0-9+.-]*):/i.exec(p);if(!m)return true;return!/^(javascript|vbscript|data|file)$/i.test(m[1])}function __cmSafeHrefAttr(v){var raw=__cmDecodeEntities(String(v===null||v===undefined?"":v)).trim();return isSafeHref(raw)?raw:""}function __cmSafeMediaSrc(v){var raw=__cmDecodeEntities(String(v===null||v===undefined?"":v)).trim().replace(/[\u0000-\u001F\u007F]/g,"");if(!raw)return raw;var m=/^([a-z][a-z0-9+.-]*):/i.exec(raw);if(m){var s=m[1].toLowerCase();if(s==="javascript"||s==="vbscript"||s==="file")return"";if(s==="data"&&/^data:text\/html/i.test(raw))return""}return raw}var __CM_ENT={colon:":",Tab:"\t",NewLine:"\n",sol:"/",bsol:"\\",amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ",copy:"©",reg:"®",trade:"™",hellip:"…",mdash:"—",ndash:"–",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",middot:"·",bull:"•",dagger:"†",Dagger:"‡",permil:"‰",prime:"′",Prime:"″",euro:"€",pound:"£",yen:"¥",cent:"¢",sect:"§",para:"¶",deg:"°",plusmn:"±",times:"×",divide:"÷",micro:"µ",laquo:"«",raquo:"»",lsaquo:"‹",rsaquo:"›",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ"};function __cmDecodeEntities(s){return String(s===null||s===undefined?"":s).replace(/&(?:#(\d{1,7})|#[xX]([0-9a-fA-F]{1,6})|([a-zA-Z][a-zA-Z0-9]{1,31}));/g,function(_,d,h,n){if(d!==undefined){var cp=parseInt(d,10);if(cp===0||cp>=55296&&cp<=57343||cp>1114111)return"�";if(cp>=0){try{return String.fromCodePoint(cp)}catch(e){}}return _}if(h!==undefined){var cp2=parseInt(h,16);if(cp2===0||cp2>=55296&&cp2<=57343||cp2>1114111)return"�";if(cp2>=0){try{return String.fromCodePoint(cp2)}catch(e){}}return _}var v=__CM_ENT[n];return v!==undefined?v:_})}function resolveColor(token){if(!token)return null;token=String(token).trim();if(/^#[0-9a-fA-F]{3,8}$/.test(token))return token;const lower=token.toLowerCase();if(COLOR_ALIASES[lower])return COLOR_ALIASES[lower];return null}function hexToRgba(hex,alpha){hex=String(hex).replace("#","");if(hex.length===3)hex=hex.split("").map(c=>c+c).join("");if(hex.length===8)hex=hex.slice(0,6);if(hex.length!==6)return"rgba(107,90,207,"+alpha+")";const r=parseInt(hex.slice(0,2),16),g=parseInt(hex.slice(2,4),16),b=parseInt(hex.slice(4,6),16);if(isNaN(r)||isNaN(g)||isNaN(b))return"rgba(107,90,207,"+alpha+")";return"rgba("+r+","+g+","+b+","+alpha+")"}function pad2(n){return String(n).padStart(2,"0")}function fmtD(ts){const d=new Date(ts);return d.getFullYear()+"-"+pad2(d.getMonth()+1)+"-"+pad2(d.getDate())}function fmtDT(ts){const d=new Date(ts);return fmtD(ts)+" "+pad2(d.getHours())+":"+pad2(d.getMinutes())}function parseDateStr(str){str=String(str).trim();const hasTime=/[T ]\d{1,2}:\d{2}/.test(str);const norm=str.replace(/\//g,"-").replace(" ","T");const d=new Date(norm);if(isNaN(d.getTime()))return{ts:null,text:str};const ts=d.getTime();return{ts:ts,text:hasTime?fmtDT(ts):fmtD(ts)}}function relTime(ts,raw,lang){const dict=I18N_DICT[lang]||I18N_DICT["zh-CN"];const T=function(k,p){return __cmI18nPick(dict,k,p,lang)};const diff=Date.now()-ts,abs=Math.abs(diff),future=diff<0;if(abs<2*864e5)return abs<1e3?T("date.justNow"):abs<6e4?T(future?"date.secLater":"date.secAgo",{n:Math.floor(abs/1e3)}):abs<36e5?T(future?"date.minLater":"date.minAgo",{n:Math.floor(abs/6e4)}):abs<864e5?T(future?"date.hourLater":"date.hourAgo",{n:Math.floor(abs/36e5)}):future?T("date.tomorrow"):T("date.yesterday");raw=String(raw||"");const hM=/[-/]\d{1,2}([-/]|$)/.test(raw),hD=/[-/]\d{1,2}[-/]\d{1,2}/.test(raw);let d1=new Date(ts),d2=new Date;if(future){const tmp=d1;d1=d2;d2=tmp}let yD=d2.getFullYear()-d1.getFullYear(),mD=d2.getMonth()-d1.getMonth(),dD=d2.getDate()-d1.getDate();if(dD<0){mD--;dD+=new Date(d2.getFullYear(),d2.getMonth(),0).getDate()}if(mD<0){yD--;mD+=12}const parts=[];if(yD>0)parts.push(yD+T("date.yearUnit"));if((hM||hD)&&mD>0)parts.push(mD+T("date.monthUnit"));if(hD&&dD>0)parts.push(dD+T("date.dayUnit"));const res=parts.join("")||T("date.justNow");return res+(future?T("date.laterUnit"):T("date.agoUnit"))}function parseBadge(raw){const parts=String(raw).trim().split(/\s+/).filter(Boolean);let url="";for(let i=parts.length-1;i>=0;i--){const um=parts[i].match(/^url=(.+)$/);if(um){url=um[1];parts.splice(i,1);break}}if(!parts.length)return{label:"",color:"#6b5acf",url:url};if(parts.length===1)return{label:parts[0],color:"#6b5acf",url:url};const lp=parts[parts.length-1];if(lp.charAt(0)==="\\"){parts[parts.length-1]=lp.slice(1);return{label:parts.join(" "),color:"#6b5acf",url:url}}const c=resolveColor(lp);if(c)return{label:parts.slice(0,-1).join(" "),color:c,url:url};return{label:parts.join(" "),color:"#6b5acf",url:url}}function parseCol(raw){const parts=String(raw||"").trim().split(/\s+/).filter(Boolean);if(!parts.length)return{title:"",color:""};if(parts.length===1)return{title:parts[0],color:""};const c=resolveColor(parts[parts.length-1]);if(c)return{title:parts.slice(0,-1).join(" "),color:c};return{title:parts.join(" "),color:""}}function parseTimelineHeader(raw){const t=String(raw||"").trim().toLowerCase();if(!t)return"";if(t==="rainbow")return"rainbow";const c=resolveColor(raw);return c||""}const RE_OPEN=/^:::(tip|hint|important|info|warn|warning|caution|attention|danger|error|ask|question|help|faq|ok|success|check|done|note|abstract|summary|tldr|todo|failure|fail|missing|bug|example|quote|cite|detail|link|pbar|tree|chat|users|tabs|tab|timeline|grid|cell|compare|col|msg|sys|mcq|saq|key|copy|hei|center|right|left|say|swipe|vote|flashcard|flashcards|kanban|task|style|btnimg|game|row|box|blur|scr|collage|ghr|cfg|dl|chartbar|chartline|bg|when|if|print|screen|ssr|client|let|macro|use|fig|tbl|eq|meta)(?:[+\-_~]*)(?:\s|$)/;const RE_CLOSE_X=/^:::\/([a-z][a-z0-9]*)[ \t]*$/;const RE_CLOSE=/^:::[ \t]*$/;function scanContainer(lines,start,selfName,breakOnSameName){const body=[];let j=start;const stack=[selfName||"_"];let fenceChar="",fenceLen=0;while(j<lines.length){const l=lines[j];if(fenceChar){const fc=l.match(/^ {0,3}(`{3,}|~{3,})[ \t]*$/);if(fc&&fc[1].charAt(0)===fenceChar&&fc[1].length>=fenceLen){fenceChar="";fenceLen=0}body.push(l);j++;continue}const fo=l.match(/^ {0,3}(`{3,}|~{3,})/);if(fo){fenceChar=fo[1].charAt(0);fenceLen=fo[1].length;body.push(l);j++;continue}const xm=l.match(RE_CLOSE_X);if(xm){if(stack[stack.length-1]===xm[1]){stack.pop();if(stack.length===0)return{body:body.join("\n"),next:j+1,closed:true};body.push(l);j++;continue}body.push(l);j++;continue}if(RE_CLOSE.test(l)){if(j>start&&/^:::(redpacket|transfer|card|img)(?:\s|$)/.test(lines[j-1])){body.push(l);j++;continue}stack.pop();if(stack.length===0)return{body:body.join("\n"),next:j+1,closed:true};body.push(l);j++;continue}const om=l.match(RE_OPEN);if(om){const nm=om[1];if(breakOnSameName&&stack.length===1&&nm===stack[0])return{body:body.join("\n"),next:j,closed:true};stack.push(nm);body.push(l);j++;continue}body.push(l);j++}return{body:body.join("\n"),next:j,closed:false}}function collectContainer(lines,start,selfName,breakOnSameName){return scanContainer(lines,start,selfName,breakOnSameName)}function renderToc(headings,ctx){if(!headings.length)return"";const root={children:[]};const stack=[root];for(const h of headings){while(stack.length>1&&stack[stack.length-1].depth>=h.depth){stack.pop()}const node={heading:h,children:[],depth:h.depth};stack[stack.length-1].children.push(node);stack.push(node)}function sortCh(n){n.children.sort((a,b)=>{const ap=a.heading.suffix&&a.heading.suffix.indexOf("!")>=0?0:1;const bp=b.heading.suffix&&b.heading.suffix.indexOf("!")>=0?0:1;return ap-bp});for(const c of n.children)sortCh(c)}sortCh(root);function r(n){if(!n.children.length)return"";let html="<ul>";for(const ch of n.children){const hasCh=ch.children&&ch.children.length>0;html+="<li"+(ch.heading.suffix?' data-hd="'+escapeHtml(ch.heading.suffix)+'"':"")+">";html+='<div class="md-toc-item">';if(hasCh)html+='<span class="md-toc-toggle"></span>';else html+='<span class="md-toc-toggle empty"></span>';html+='<span class="md-toc-marker"></span><a href="#'+escapeHtml(ch.heading.id)+'">'+escapeHtml(ch.heading.text)+"</a></div>";html+=r(ch)+"</li>"}return html+"</ul>"}return'<nav class="md-toc"><div class="md-toc-header"><span class="md-toc-title">'+escapeHtml(__i18nT(ctx,"toc.title"))+'</span><button class="md-toc-global-btn"><i class="fas fa-chevron-up"></i> <span>'+escapeHtml(__i18nT(ctx,"toc.collapse"))+'</span></button></div><div class="md-toc-content">'+r(root)+"</div></nav>"}function __listLoose(list){if(!list)return false;for(let i=0;i<list.items.length;i++){if(list.items[i].__looseSelf)return true}return false}function __nodesHaveLoose(nodes){if(!nodes)return false;for(let i=0;i<nodes.length;i++){const n=nodes[i];if(n&&n.type==="list"&&__listLoose(n))return true}return false}function __cmSubLoose(subLines,itemText){var inFence=false,fChar="",fLen=0,nestedMarker=false;var fm=itemText.match(/^ {0,3}(`{3,}|~{3,})/);if(fm){inFence=true;fChar=fm[1].charAt(0);fLen=fm[1].length}for(var k=0;k<subLines.length;k++){var sl=subLines[k];var ind=(sl.match(/^ */)||[""])[0].length;if(inFence){var fc=sl.match(/^ {0,3}(`{3,}|~{3,})/);if(fc&&fc[1].charAt(0)===fChar&&fc[1].length>=fLen){inFence=false}continue}var fo=sl.match(/^ {0,3}(`{3,}|~{3,})/);if(fo){inFence=true;fChar=fo[1].charAt(0);fLen=fo[1].length;continue}if(!sl.trim()){var nx=k+1;while(nx<subLines.length&&!subLines[nx].trim())nx++;if(nx>=subLines.length)continue;var nl=subLines[nx];var nind=(nl.match(/^ */)||[""])[0].length;var prev=k>0?subLines[k-1]:itemText.split("\n").pop();var pind=prev?(prev.match(/^ */)||[""])[0].length:0;var prevMarker=!!(prev&&/^ {0,3}(?:[-*+]|\d{1,9}[.)])\s/.test(prev));var nextMarker=/^ {0,3}(?:[-*+]|\d{1,9}[.)])\s/.test(nl);if(nestedMarker&&(nind>0||nextMarker)||prevMarker&&(nind>pind||nextMarker))continue;return true}if(/^ {0,3}(?:[-*+]|\d{1,9}[.)])\s/.test(sl))nestedMarker=true}return false}const DEFAULT_CONFIG={hljs:true,katex:true,mermaid:true,tip:true,copy:true,zoom:true,anchor:true,gfm:true,table:true,tasklist:true,strike:true,autolink:true,math:true,emoji:true,html:true,footnote:true,abbr:true,toc:true,decorations:true,containers:true,chat:true,scr:true,links:true,keepmd:false,autocollage:false,headingline:false,dropcap:false,breaks:true,lazycontinuation:false,tableexport:true,smartypants:true,headnum:false,headnumsep:".",headnumsuffix:" ",blanklines:true,blankmin:2,langattr:false,codeblocktrim:true,gfmsingletilde:false};const DECORATION_TYPES={circle:1,cross:1,stamp:1,score:1,wave:1,echo:1,neon:1,marker:1,vert:1,cursor:1,shadow:1,blur:1,path:1,shake:1};function parseCfg(raw){const cfg=Object.create(null);raw.split("\n").forEach(line=>{line=line.trim();if(!line||line.charAt(0)==="#")return;let idx=line.indexOf(":");if(idx<0)idx=line.indexOf(":");if(idx<0)return;const k=line.slice(0,idx).trim().toLowerCase();const vRaw=line.slice(idx+1).trim();const v=vRaw.toLowerCase();if(!k)return;if(k==="reset"){if(v==="on"||v==="true"||v==="1")cfg.__reset=true;return}if(k==="lang"){if(vRaw)cfg.lang=vRaw;return}if(k==="headnumsep"||k==="headnumsuffix"){cfg[k]=vRaw;return}if(k==="blankmin"){const __bn=parseInt(vRaw,10);if(isFinite(__bn)&&__bn>=1)cfg[k]=__bn;return}if(v==="on"||v==="true"||v==="1")cfg[k]=true;else if(v==="off"||v==="false"||v==="0")cfg[k]=false});return cfg}function isNodeAllowed(type,node,ctx){const c=ctx.config;if(type==="html")return c.html;if(type==="mathInline"||type==="mathBlock")return c.math;if(type==="delete")return c.gfm&&c.strike;if(type==="footnoteRef")return c.footnote;if(type==="emoji")return c.emoji;if(DECORATION_TYPES[type])return c.decorations;return true}var CHART_UNITS={"zh-CN":[{v:1e100,s:"古戈尔"},{v:1e68,s:"无量大数"},{v:1e64,s:"不可思议"},{v:1e60,s:"那由他"},{v:1e56,s:"阿僧祇"},{v:1e52,s:"恒河沙"},{v:1e48,s:"极"},{v:1e44,s:"载"},{v:1e40,s:"正"},{v:1e36,s:"涧"},{v:1e32,s:"沟"},{v:1e28,s:"穰"},{v:1e24,s:"秭"},{v:1e20,s:"垓"},{v:1e16,s:"京"},{v:1e12,s:"兆"},{v:1e8,s:"亿"},{v:1e4,s:"万"},{v:1e3,s:"k"}],"zh-TW":[{v:1e100,s:"古戈爾"},{v:1e68,s:"無量大數"},{v:1e64,s:"不可思議"},{v:1e60,s:"那由他"},{v:1e56,s:"阿僧祇"},{v:1e52,s:"恆河沙"},{v:1e48,s:"極"},{v:1e44,s:"載"},{v:1e40,s:"正"},{v:1e36,s:"澗"},{v:1e32,s:"溝"},{v:1e28,s:"穰"},{v:1e24,s:"秭"},{v:1e20,s:"垓"},{v:1e16,s:"京"},{v:1e12,s:"兆"},{v:1e8,s:"億"},{v:1e4,s:"萬"},{v:1e3,s:"k"}],ja:[{v:1e100,s:"古戈尔"},{v:1e68,s:"無量大数"},{v:1e64,s:"不可思議"},{v:1e60,s:"那由他"},{v:1e56,s:"阿僧祇"},{v:1e52,s:"恒河沙"},{v:1e48,s:"極"},{v:1e44,s:"載"},{v:1e40,s:"正"},{v:1e36,s:"澗"},{v:1e32,s:"溝"},{v:1e28,s:"穣"},{v:1e24,s:"秭"},{v:1e20,s:"垓"},{v:1e16,s:"京"},{v:1e12,s:"兆"},{v:1e8,s:"億"},{v:1e4,s:"万"},{v:1e3,s:"k"}],ko:[{v:1e48,s:"극"},{v:1e44,s:"재"},{v:1e40,s:"정"},{v:1e36,s:"간"},{v:1e32,s:"구"},{v:1e28,s:"양"},{v:1e24,s:"자"},{v:1e20,s:"해"},{v:1e16,s:"경"},{v:1e12,s:"조"},{v:1e8,s:"억"},{v:1e4,s:"만"},{v:1e3,s:"k"}],en:[{v:1e33,s:"Dc"},{v:1e30,s:"No"},{v:1e27,s:"Oc"},{v:1e24,s:"Sp"},{v:1e21,s:"Sx"},{v:1e18,s:"Qi"},{v:1e15,s:"Qa"},{v:1e12,s:"T"},{v:1e9,s:"B"},{v:1e6,s:"M"},{v:1e3,s:"k"}]};var I18N_DICT={"zh-CN":{"toc.title":"目录","toc.collapse":"收起","toc.expand":"展开","code.copy":"复制代码","code.lines":"行","code.cols":"列","code.chars":"字符","dl.download":"下载","mcq.selected":"已选·","mcq.single":"单选","mcq.multi":"多选","mcq.submit":"提交答案","mcq.hintClick":"点击选项作答","mcq.hintMulti":"可选多个选项","mcq.toggleView":"我也要选","mcq.togglePlay":"查看答案","mcq.reset":"重新作答","mcq.explain":"解析","mcq.ok":"回答正确","mcq.partial":"回答不完整","mcq.wrong":"回答错误","mcq.authorNone":"未作答","mcq.authorPick":"选择了","mcq.authorOk":"答对了","mcq.authorPartial":"回答不完整","mcq.authorWrong":"答错了","fc.hint":"点击翻转","fcs.shuffle":"洗牌","chat.card":"个人名片","chat.rpDefault":"恭喜发财,大吉大利","vote.total":"共 {n} 人参与","ghr.loading":"加载中...","audio.subsToggle":"展开/收起字幕","audio.noSubs":"无字幕","audio.subsErr":"字幕解析错误","audio.unknownTitle":"未知标题","audio.unknownSource":"未知来源","audio.fieldTitle":"标题","audio.fieldSource":"来源","audio.fieldCover":"封面","audio.fieldAudio":"音频","audio.copy":"复制","audio.copied":"已复制","mermaid.loading":"Mermaid loading","mermaid.copy":"复制源码","mermaid.zoom":"放大","table.export":"导出 CSV","table.filename":"table_export.csv","heading.copyLink":"复制标题链接","rp.from":"来自 {name} 的红包","rp.opened":"红包已被领完","rp.summary":"共 {n} 人领取,已全部领完","warn.unclosed":"[UpKram] 有 {n} 个容器未闭合,请检查源文档","code.wrap":"换行/滚动切换","mcq.selectFirst":"请至少选择一个选项","rp.someone":"某人","rp.giverName":"{name} 的红包","rp.openAria":"拆红包","ghr.justNow":"刚刚","ghr.minAgo":"{n} 分钟前","ghr.hourAgo":"{n} 小时前","ghr.dayAgo":"{n} 天前","ghr.monthAgo":"{n} 个月前","ghr.yearAgo":"{n} 年前","ghr.updated":"{time}更新","ghr.archived":"已归档","ghr.noDesc":"暂无描述","ghr.invalidRepo":"无效的仓库格式(应写为 owner/repo)","ghr.unknownLang":"未知","warn.unclosedBadge":"未闭合"},en:{"toc.title":"Contents","toc.collapse":"Collapse","toc.expand":"Expand","code.copy":"Copy code","code.lines":"lines","code.cols":"cols","code.chars":"chars","dl.download":"Download","mcq.selected":"Selected·","mcq.single":"Single","mcq.multi":"Multiple","mcq.submit":"Submit","mcq.hintClick":"Click an option","mcq.hintMulti":"Multiple answers allowed","mcq.toggleView":"Try it","mcq.togglePlay":"View answer","mcq.reset":"Reset","mcq.explain":"Explanation","mcq.ok":"Correct","mcq.partial":"Incomplete","mcq.wrong":"Incorrect","mcq.authorNone":"No answer","mcq.authorPick":"Selected","mcq.authorOk":"Correct","mcq.authorPartial":"Incomplete","mcq.authorWrong":"Incorrect","fc.hint":"Click to flip","fcs.shuffle":"Shuffle","chat.card":"Contact card","chat.rpDefault":"Best wishes","vote.total":"{n} votes","ghr.loading":"Loading...","audio.subsToggle":"Toggle subtitles","audio.noSubs":"No subtitles","audio.subsErr":"Subtitle error","audio.unknownTitle":"Unknown title","audio.unknownSource":"Unknown source","audio.fieldTitle":"Title","audio.fieldSource":"Source","audio.fieldCover":"Cover","audio.fieldAudio":"Audio","audio.copy":"Copy","audio.copied":"Copied","mermaid.loading":"Mermaid loading","mermaid.copy":"Copy source","mermaid.zoom":"Zoom","table.export":"Export CSV","table.filename":"table_export.csv","heading.copyLink":"Copy link to heading","rp.from":"Red packet from {name}","rp.opened":"All packets claimed","rp.summary":"{n} claimed · all gone","warn.unclosed":"[UpKram] {n} unclosed container(s) detected","code.wrap":"Toggle wrap","mcq.selectFirst":"Please select at least one option","rp.someone":"Someone","rp.giverName":"{name}'s red packet","rp.openAria":"Open red packet","ghr.justNow":"just now","ghr.minAgo":"{n} min ago","ghr.hourAgo":"{n} hr ago","ghr.dayAgo":"{n} d ago","ghr.monthAgo":"{n} mo ago","ghr.yearAgo":"{n} yr ago","ghr.updated":"updated {time}","ghr.archived":"Archived","ghr.noDesc":"No description","ghr.invalidRepo":"Invalid repository format (should be owner/repo)","ghr.unknownLang":"Unknown","warn.unclosedBadge":"Unclosed"}};I18N_DICT["zh-TW"]={"toc.title":"目錄","toc.collapse":"收合","toc.expand":"展開","code.copy":"複製程式碼","code.lines":"行","code.cols":"欄","code.chars":"字元","dl.download":"下載","mcq.selected":"已選·","mcq.single":"單選","mcq.multi":"多選","mcq.submit":"提交答案","mcq.hintClick":"點選選項作答","mcq.hintMulti":"可選多個選項","mcq.toggleView":"我也要選","mcq.togglePlay":"查看答案","mcq.reset":"重新作答","mcq.explain":"解析","mcq.ok":"回答正確","mcq.partial":"回答不完整","mcq.wrong":"回答錯誤","mcq.authorNone":"未作答","mcq.authorPick":"選擇了","mcq.authorOk":"答對了","mcq.authorPartial":"回答不完整","mcq.authorWrong":"答錯了","fc.hint":"點擊翻轉","fcs.shuffle":"洗牌","chat.card":"個人名片","chat.rpDefault":"恭喜發財,大吉大利","vote.total":"共 {n} 人參與","ghr.loading":"載入中...","audio.subsToggle":"展開/收合字幕","audio.noSubs":"無字幕","audio.subsErr":"字幕解析錯誤","audio.unknownTitle":"未知標題","audio.unknownSource":"未知來源","audio.fieldTitle":"標題","audio.fieldSource":"來源","audio.fieldCover":"封面","audio.fieldAudio":"音訊","audio.copy":"複製","audio.copied":"已複製","mermaid.loading":"Mermaid 載入中","mermaid.copy":"複製原始碼","mermaid.zoom":"放大","table.export":"匯出 CSV","table.filename":"table_export.csv","heading.copyLink":"複製標題連結","rp.from":"來自 {name} 的紅包","rp.opened":"紅包已被領完","rp.summary":"共 {n} 人領取,已全部領完","warn.unclosed":"[UpKram] 有 {n} 個容器未閉合,請檢查原始文件","code.wrap":"換行/滾動切換","mcq.selectFirst":"請至少選擇一個選項","rp.someone":"某人","rp.giverName":"{name} 的紅包","rp.openAria":"拆紅包","ghr.justNow":"剛剛","ghr.minAgo":"{n} 分鐘前","ghr.hourAgo":"{n} 小時前","ghr.dayAgo":"{n} 天前","ghr.monthAgo":"{n} 個月前","ghr.yearAgo":"{n} 年前","ghr.updated":"{time}更新","ghr.archived":"已封存","ghr.noDesc":"暫無描述","ghr.invalidRepo":"無效的倉庫格式(應寫為 owner/repo)","ghr.unknownLang":"未知","warn.unclosedBadge":"未閉合"};I18N_DICT["ja"]={"toc.title":"目次","toc.collapse":"折りたたむ","toc.expand":"展開","code.copy":"コードをコピー","code.lines":"行","code.cols":"列","code.chars":"文字","dl.download":"ダウンロード","mcq.selected":"選択済み·","mcq.single":"単一選択","mcq.multi":"複数選択","mcq.submit":"回答を送信","mcq.hintClick":"選択肢をクリック","mcq.hintMulti":"複数選択可能","mcq.toggleView":"自分も選ぶ","mcq.togglePlay":"回答を見る","mcq.reset":"やり直す","mcq.explain":"解説","mcq.ok":"正解","mcq.partial":"不完全","mcq.wrong":"不正解","mcq.authorNone":"未回答","mcq.authorPick":"選択","mcq.authorOk":"正解","mcq.authorPartial":"不完全","mcq.authorWrong":"不正解","fc.hint":"クリックでめくる","fcs.shuffle":"シャッフル","chat.card":"プロフィールカード","chat.rpDefault":"おめでとうございます","vote.total":"{n} 人が参加","ghr.loading":"読み込み中...","audio.subsToggle":"字幕の表示切替","audio.noSubs":"字幕なし","audio.subsErr":"字幕解析エラー","audio.unknownTitle":"不明なタイトル","audio.unknownSource":"不明なソース","audio.fieldTitle":"タイトル","audio.fieldSource":"ソース","audio.fieldCover":"カバー","audio.fieldAudio":"音声","audio.copy":"コピー","audio.copied":"コピー済み","mermaid.loading":"Mermaid 読み込み中","mermaid.copy":"ソースをコピー","mermaid.zoom":"拡大","table.export":"CSV エクスポート","table.filename":"table_export.csv","heading.copyLink":"見出しリンクをコピー","rp.from":"{name} からの紅包","rp.opened":"紅包は配布済み","rp.summary":"{n} 人が受取済み","warn.unclosed":"[UpKram] 閉じられていないコンテナが {n} 個あります","code.wrap":"折り返し/スクロール切替","mcq.selectFirst":"少なくとも 1 つ選択してください","rp.someone":"誰か","rp.giverName":"{name} の紅包","rp.openAria":"紅包を開く","ghr.justNow":"たった今","ghr.minAgo":"{n} 分前","ghr.hourAgo":"{n} 時間前","ghr.dayAgo":"{n} 日前","ghr.monthAgo":"{n} か月前","ghr.yearAgo":"{n} 年前","ghr.updated":"{time}更新","ghr.archived":"アーカイブ済み","ghr.noDesc":"説明なし","ghr.invalidRepo":"無効なリポジトリ形式(owner/repo で指定してください)","ghr.unknownLang":"不明","warn.unclosedBadge":"未閉合"};I18N_DICT["ko"]={"toc.title":"목차","toc.collapse":"접기","toc.expand":"펼치기","code.copy":"코드 복사","code.lines":"행","code.cols":"열","code.chars":"자","dl.download":"다운로드","mcq.selected":"선택됨·","mcq.single":"단일 선택","mcq.multi":"다중 선택","mcq.submit":"답안 제출","mcq.hintClick":"선택지를 클릭하세요","mcq.hintMulti":"여러 개 선택 가능","mcq.toggleView":"나도 선택하기","mcq.togglePlay":"답 보기","mcq.reset":"다시 풀기","mcq.explain":"해설","mcq.ok":"정답","mcq.partial":"불완전","mcq.wrong":"오답","mcq.authorNone":"답하지 않음","mcq.authorPick":"선택","mcq.authorOk":"정답","mcq.authorPartial":"불완전","mcq.authorWrong":"오답","fc.hint":"클릭하여 뒤집기","fcs.shuffle":"섞기","chat.card":"프로필 카드","chat.rpDefault":"축하합니다","vote.total":"{n}명 참여","ghr.loading":"불러오는 중...","audio.subsToggle":"자막 표시 전환","audio.noSubs":"자막 없음","audio.subsErr":"자막 파싱 오류","audio.unknownTitle":"알 수 없는 제목","audio.unknownSource":"알 수 없는 출처","audio.fieldTitle":"제목","audio.fieldSource":"출처","audio.fieldCover":"커버","audio.fieldAudio":"오디오","audio.copy":"복사","audio.copied":"복사됨","mermaid.loading":"Mermaid 불러오는 중","mermaid.copy":"소스 복사","mermaid.zoom":"확대","table.export":"CSV 내보내기","table.filename":"table_export.csv","heading.copyLink":"제목 링크 복사","rp.from":"{name}님의 홍바오","rp.opened":"홍바오가 모두 소진됨","rp.summary":"{n}명이 수령 완료","warn.unclosed":"[UpKram] 닫히지 않은 컨테이너 {n}개","code.wrap":"줄바꿈/스크롤 전환","mcq.selectFirst":"최소 하나를 선택하세요","rp.someone":"누군가","rp.giverName":"{name}님의 홍바오","rp.openAria":"홍바오 열기","ghr.justNow":"방금","ghr.minAgo":"{n}분 전","ghr.hourAgo":"{n}시간 전","ghr.dayAgo":"{n}일 전","ghr.monthAgo":"{n}개월 전","ghr.yearAgo":"{n}년 전","ghr.updated":"{time} 업데이트","ghr.archived":"보관됨","ghr.noDesc":"설명 없음","ghr.invalidRepo":"잘못된 저장소 형식(owner/repo 형식이어야 함)","ghr.unknownLang":"알 수 없음","warn.unclosedBadge":"닫히지 않음"};I18N_DICT["zh-CN"]["ghr.repository"]="GitHub 仓库";I18N_DICT["zh-CN"]["chat.unknownName"]="未知";I18N_DICT["zh-CN"]["ghr.noData"]="无法获取实时数据,可能不存在或被限流。";I18N_DICT["en"]["ghr.repository"]="GitHub repository";I18N_DICT["en"]["chat.unknownName"]="Unknown";I18N_DICT["en"]["ghr.noData"]="Failed to fetch live data. The repo may not exist or is rate limited.";I18N_DICT["zh-TW"]["ghr.repository"]="GitHub 儲存庫";I18N_DICT["zh-TW"]["chat.unknownName"]="未知";I18N_DICT["zh-TW"]["ghr.noData"]="無法取得即時資料,可能不存在或被限流。";I18N_DICT["ja"]["ghr.repository"]="GitHub リポジトリ";I18N_DICT["ja"]["chat.unknownName"]="不明";I18N_DICT["ja"]["ghr.noData"]="リアルタイムデータを取得できませんでした。リポジトリが存在しないか、レート制限の可能性があります。";I18N_DICT["ko"]["ghr.repository"]="GitHub 저장소";I18N_DICT["ko"]["chat.unknownName"]="알 수 없음";I18N_DICT["ko"]["ghr.noData"]="실시간 데이터를 가져올 수 없습니다. 저장소가 없거나 요청 제한일 수 있습니다.";I18N_DICT["zh-CN"]["saq.tag"]="主观题";I18N_DICT["zh-CN"]["saq.answer"]="参考答案";I18N_DICT["zh-CN"]["saq.explain"]="解析";I18N_DICT["zh-CN"]["saq.reveal"]="点击查看";I18N_DICT["en"]["saq.tag"]="Short answer";I18N_DICT["en"]["saq.answer"]="Reference answer";I18N_DICT["en"]["saq.explain"]="Explanation";I18N_DICT["en"]["saq.reveal"]="Click to reveal";I18N_DICT["zh-TW"]["saq.tag"]="簡答題";I18N_DICT["zh-TW"]["saq.answer"]="參考答案";I18N_DICT["zh-TW"]["saq.explain"]="解析";I18N_DICT["zh-TW"]["saq.reveal"]="點擊查看";I18N_DICT["ja"]["saq.tag"]="記述式";I18N_DICT["ja"]["saq.answer"]="模範解答";I18N_DICT["ja"]["saq.explain"]="解説";I18N_DICT["ja"]["saq.reveal"]="クリックで表示";I18N_DICT["ko"]["saq.tag"]="주관식";I18N_DICT["ko"]["saq.answer"]="모범답안";I18N_DICT["ko"]["saq.explain"]="해설";I18N_DICT["ko"]["saq.reveal"]="클릭하여 보기";I18N_DICT["zh-CN"]["date.justNow"]="刚刚";I18N_DICT["zh-CN"]["date.secAgo"]="{n}秒前";I18N_DICT["zh-CN"]["date.secLater"]="{n}秒后";I18N_DICT["zh-CN"]["date.minAgo"]="{n}分钟前";I18N_DICT["zh-CN"]["date.minLater"]="{n}分钟后";I18N_DICT["zh-CN"]["date.hourAgo"]="{n}小时前";I18N_DICT["zh-CN"]["date.hourLater"]="{n}小时后";I18N_DICT["zh-CN"]["date.yesterday"]="昨天";I18N_DICT["zh-CN"]["date.tomorrow"]="明天";I18N_DICT["zh-CN"]["date.yearUnit"]="年";I18N_DICT["zh-CN"]["date.monthUnit"]="个月";I18N_DICT["zh-CN"]["date.dayUnit"]="天";I18N_DICT["zh-CN"]["date.agoUnit"]="前";I18N_DICT["zh-CN"]["date.laterUnit"]="后";I18N_DICT["en"]["date.justNow"]="just now";I18N_DICT["en"]["date.secAgo"]="{n}s ago";I18N_DICT["en"]["date.secLater"]="{n}s later";I18N_DICT["en"]["date.minAgo"]="{n}m ago";I18N_DICT["en"]["date.minLater"]="{n}m later";I18N_DICT["en"]["date.hourAgo"]="{n}h ago";I18N_DICT["en"]["date.hourLater"]="{n}h later";I18N_DICT["en"]["date.yesterday"]="yesterday";I18N_DICT["en"]["date.tomorrow"]="tomorrow";I18N_DICT["en"]["date.yearUnit"]="y";I18N_DICT["en"]["date.monthUnit"]="mo";I18N_DICT["en"]["date.dayUnit"]="d";I18N_DICT["en"]["date.agoUnit"]=" ago";I18N_DICT["en"]["date.laterUnit"]=" later";I18N_DICT["zh-TW"]["date.justNow"]="剛剛";I18N_DICT["zh-TW"]["date.secAgo"]="{n}秒前";I18N_DICT["zh-TW"]["date.secLater"]="{n}秒後";I18N_DICT["zh-TW"]["date.minAgo"]="{n}分鐘前";I18N_DICT["zh-TW"]["date.minLater"]="{n}分鐘後";I18N_DICT["zh-TW"]["date.hourAgo"]="{n}小時前";I18N_DICT["zh-TW"]["date.hourLater"]="{n}小時後";I18N_DICT["zh-TW"]["date.yesterday"]="昨天";I18N_DICT["zh-TW"]["date.tomorrow"]="明天";I18N_DICT["zh-TW"]["date.yearUnit"]="年";I18N_DICT["zh-TW"]["date.monthUnit"]="個月";I18N_DICT["zh-TW"]["date.dayUnit"]="天";I18N_DICT["zh-TW"]["date.agoUnit"]="前";I18N_DICT["zh-TW"]["date.laterUnit"]="後";I18N_DICT["ja"]["date.justNow"]="たった今";I18N_DICT["ja"]["date.secAgo"]="{n}秒前";I18N_DICT["ja"]["date.secLater"]="{n}秒後";I18N_DICT["ja"]["date.minAgo"]="{n}分前";I18N_DICT["ja"]["date.minLater"]="{n}分後";I18N_DICT["ja"]["date.hourAgo"]="{n}時間前";I18N_DICT["ja"]["date.hourLater"]="{n}時間後";I18N_DICT["ja"]["date.yesterday"]="昨日";I18N_DICT["ja"]["date.tomorrow"]="明日";I18N_DICT["ja"]["date.yearUnit"]="年";I18N_DICT["ja"]["date.monthUnit"]="か月";I18N_DICT["ja"]["date.dayUnit"]="日";I18N_DICT["ja"]["date.agoUnit"]="前";I18N_DICT["ja"]["date.laterUnit"]="後";I18N_DICT["ko"]["date.justNow"]="방금";I18N_DICT["ko"]["date.secAgo"]="{n}초 전";I18N_DICT["ko"]["date.secLater"]="{n}초 후";I18N_DICT["ko"]["date.minAgo"]="{n}분 전";I18N_DICT["ko"]["date.minLater"]="{n}분 후";I18N_DICT["ko"]["date.hourAgo"]="{n}시간 전";I18N_DICT["ko"]["date.hourLater"]="{n}시간 후";I18N_DICT["ko"]["date.yesterday"]="어제";I18N_DICT["ko"]["date.tomorrow"]="내일";I18N_DICT["ko"]["date.yearUnit"]="년";I18N_DICT["ko"]["date.monthUnit"]="개월";I18N_DICT["ko"]["date.dayUnit"]="일";I18N_DICT["ko"]["date.agoUnit"]=" 전";I18N_DICT["ko"]["date.laterUnit"]=" 후";I18N_DICT["zh-CN"]["chat.quote"]="[引用 {name}]";I18N_DICT["zh-CN"]["chat.img"]="[图片]";I18N_DICT["zh-CN"]["chat.rp"]="[红包]";I18N_DICT["zh-CN"]["chat.transfer"]="[转账]";I18N_DICT["zh-CN"]["chat.cardTag"]="[名片]";I18N_DICT["en"]["chat.quote"]="[Quote {name}]";I18N_DICT["en"]["chat.img"]="[Image]";I18N_DICT["en"]["chat.rp"]="[Red packet]";I18N_DICT["en"]["chat.transfer"]="[Transfer]";I18N_DICT["en"]["chat.cardTag"]="[Card]";I18N_DICT["zh-TW"]["chat.quote"]="[引用 {name}]";I18N_DICT["zh-TW"]["chat.img"]="[圖片]";I18N_DICT["zh-TW"]["chat.rp"]="[紅包]";I18N_DICT["zh-TW"]["chat.transfer"]="[轉帳]";I18N_DICT["zh-TW"]["chat.cardTag"]="[名片]";I18N_DICT["ja"]["chat.quote"]="[引用 {name}]";I18N_DICT["ja"]["chat.img"]="[画像]";I18N_DICT["ja"]["chat.rp"]="[紅包]";I18N_DICT["ja"]["chat.transfer"]="[送金]";I18N_DICT["ja"]["chat.cardTag"]="[名刺]";I18N_DICT["ko"]["chat.quote"]="[인용 {name}]";I18N_DICT["ko"]["chat.img"]="[이미지]";I18N_DICT["ko"]["chat.rp"]="[홍바오]";I18N_DICT["ko"]["chat.transfer"]="[송금]";I18N_DICT["ko"]["chat.cardTag"]="[명함]";I18N_DICT["zh-CN"]["fig.label"]="图 {n}";I18N_DICT["zh-CN"]["tbl.label"]="表 {n}";I18N_DICT["zh-CN"]["eq.label"]="式 ({n})";I18N_DICT["zh-CN"]["fig.refMissing"]="[图 {key} 未找到]";I18N_DICT["zh-CN"]["tbl.refMissing"]="[表 {key} 未找到]";I18N_DICT["zh-CN"]["eq.refMissing"]="[式 {key} 未找到]";I18N_DICT["en"]["fig.label"]="Fig. {n}";I18N_DICT["en"]["tbl.label"]="Table {n}";I18N_DICT["en"]["eq.label"]="Eq. ({n})";I18N_DICT["en"]["fig.refMissing"]="[Fig. {key} not found]";I18N_DICT["en"]["tbl.refMissing"]="[Table {key} not found]";I18N_DICT["en"]["eq.refMissing"]="[Eq. {key} not found]";I18N_DICT["zh-TW"]["fig.label"]="圖 {n}";I18N_DICT["zh-TW"]["tbl.label"]="表 {n}";I18N_DICT["zh-TW"]["eq.label"]="式 ({n})";I18N_DICT["zh-TW"]["fig.refMissing"]="[圖 {key} 未找到]";I18N_DICT["zh-TW"]["tbl.refMissing"]="[表 {key} 未找到]";I18N_DICT["zh-TW"]["eq.refMissing"]="[式 {key} 未找到]";I18N_DICT["ja"]["fig.label"]="図 {n}";I18N_DICT["ja"]["tbl.label"]="表 {n}";I18N_DICT["ja"]["eq.label"]="式 ({n})";I18N_DICT["ja"]["fig.refMissing"]="[図 {key} が見つかりません]";I18N_DICT["ja"]["tbl.refMissing"]="[表 {key} が見つかりません]";I18N_DICT["ja"]["eq.refMissing"]="[式 {key} が見つかりません]";I18N_DICT["ko"]["fig.label"]="그림 {n}";I18N_DICT["ko"]["tbl.label"]="표 {n}";I18N_DICT["ko"]["eq.label"]="식 ({n})";I18N_DICT["ko"]["fig.refMissing"]="[그림 {key} 찾을 수 없음]";I18N_DICT["ko"]["tbl.refMissing"]="[표 {key} 찾을 수 없음]";I18N_DICT["ko"]["eq.refMissing"]="[식 {key} 찾을 수 없음]";I18N_DICT["zh-CN"]["dl.verify"]="查看签名";I18N_DICT["en"]["dl.verify"]="Verify signature";I18N_DICT["zh-TW"]["dl.verify"]="查看簽名";I18N_DICT["ja"]["dl.verify"]="署名を確認";I18N_DICT["ko"]["dl.verify"]="서명 확인";I18N_DICT["de"]={"toc.title":"Inhalt","toc.collapse":"Einklappen","toc.expand":"Ausklappen","code.copy":"Code kopieren","mcq.wrong":"Falsch","mcq.authorNone":"Keine Antwort","mcq.authorPick":"Ausgewählt","mcq.authorOk":"Richtig","mcq.authorPartial":"Unvollständig","mcq.authorWrong":"Falsch","fc.hint":"Zum Umdrehen klicken","fcs.shuffle":"Mischen","chat.card":"Kontaktkarte","chat.rpDefault":"Alles Gute","vote.total":"{n} Stimmen","ghr.loading":"Lädt...","audio.subsToggle":"Untertitel ein-/ausblenden","audio.noSubs":"Keine Untertitel","audio.subsErr":"Fehler beim Parsen der Untertitel","audio.unknownTitle":"Unbekannter Titel","audio.unknownSource":"Unbekannte Quelle","audio.fieldTitle":"Titel","audio.fieldSource":"Quelle","audio.fieldCover":"Titelbild","audio.fieldAudio":"Audio","audio.copy":"Kopieren","audio.copied":"Kopiert","mermaid.loading":"Mermaid wird geladen","mermaid.copy":"Quelltext kopieren","mermaid.zoom":"Vergrößern","table.export":"CSV exportieren","table.filename":"table_export.csv","heading.copyLink":"Link zur Überschrift kopieren","rp.from":"Geldgeschenk von {name}","rp.opened":"Alle Geschenke verteilt","rp.summary":"{n} verteilt · alle weg","warn.unclosed":"[UpKram] {n} nicht geschlossene Container erkannt","code.wrap":"Umbruch umschalten","code.lines":"Zeilen","code.cols":"Spalten","code.chars":"Zeichen","dl.download":"Herunterladen","mcq.selected":"Ausgewählt·","mcq.single":"Einfachauswahl","mcq.multi":"Mehrfachauswahl","mcq.submit":"Antwort absenden","mcq.hintClick":"Option anklicken","mcq.hintMulti":"Mehrere Antworten möglich","mcq.toggleView":"Selbst ausprobieren","mcq.togglePlay":"Antwort anzeigen","mcq.reset":"Zurücksetzen","mcq.explain":"Erklärung","mcq.ok":"Richtig","mcq.partial":"Unvollständig"};I18N_DICT["de"]["ghr.repository"]="GitHub-Repository";I18N_DICT["de"]["chat.unknownName"]="Unbekannt";I18N_DICT["de"]["ghr.noData"]="Live-Daten konnten nicht geladen werden. Das Repository existiert möglicherweise nicht oder die Rate-Limitierung greift.";I18N_DICT["de"]["saq.tag"]="Kurzantwort";I18N_DICT["de"]["saq.answer"]="Musterantwort";I18N_DICT["de"]["saq.explain"]="Erklärung";I18N_DICT["de"]["saq.reveal"]="Zum Anzeigen klicken";I18N_DICT["de"]["mcq.selectFirst"]="Bitte mindestens eine Option auswählen";I18N_DICT["de"]["rp.someone"]="Jemand";I18N_DICT["de"]["rp.giverName"]="{name}s Geldgeschenk";I18N_DICT["de"]["rp.openAria"]="Geldgeschenk öffnen";I18N_DICT["de"]["ghr.justNow"]="gerade eben";I18N_DICT["de"]["ghr.minAgo"]="vor {n} Min.";I18N_DICT["de"]["ghr.hourAgo"]="vor {n} Std.";I18N_DICT["de"]["ghr.dayAgo"]="vor {n} T.";I18N_DICT["de"]["ghr.monthAgo"]="vor {n} Mon.";I18N_DICT["de"]["ghr.yearAgo"]="vor {n} J.";I18N_DICT["de"]["ghr.updated"]="aktualisiert {time}";I18N_DICT["de"]["ghr.archived"]="Archiviert";I18N_DICT["de"]["ghr.noDesc"]="Keine Beschreibung";I18N_DICT["de"]["ghr.invalidRepo"]="Ungültiges Repository-Format (owner/repo erwartet)";I18N_DICT["de"]["date.justNow"]="gerade eben";I18N_DICT["de"]["date.secAgo"]="vor {n} Sek.";I18N_DICT["de"]["date.secLater"]="in {n} Sek.";I18N_DICT["de"]["date.minAgo"]="vor {n} Min.";I18N_DICT["de"]["date.minLater"]="in {n} Min.";I18N_DICT["de"]["date.hourAgo"]="vor {n} Std.";I18N_DICT["de"]["date.hourLater"]="in {n} Std.";I18N_DICT["de"]["date.yesterday"]="gestern";I18N_DICT["de"]["date.tomorrow"]="morgen";I18N_DICT["de"]["date.yearUnit"]="J.";I18N_DICT["de"]["date.monthUnit"]="Mon.";I18N_DICT["de"]["date.dayUnit"]="T.";I18N_DICT["de"]["date.agoUnit"]=" zuvor";I18N_DICT["de"]["date.laterUnit"]=" später";I18N_DICT["de"]["chat.quote"]="[Zitat {name}]";I18N_DICT["de"]["chat.img"]="[Bild]";I18N_DICT["de"]["chat.rp"]="[Geldgeschenk]";I18N_DICT["de"]["chat.transfer"]="[Überweisung]";I18N_DICT["de"]["chat.cardTag"]="[Karte]";I18N_DICT["de"]["ghr.unknownLang"]="Unbekannt";I18N_DICT["de"]["warn.unclosedBadge"]="Nicht geschlossen";I18N_DICT["de"]["fig.label"]="Abb. {n}";I18N_DICT["de"]["tbl.label"]="Tabelle {n}";I18N_DICT["de"]["eq.label"]="Gl. ({n})";I18N_DICT["de"]["fig.refMissing"]="[Abb. {key} nicht gefunden]";I18N_DICT["de"]["tbl.refMissing"]="[Tabelle {key} nicht gefunden]";I18N_DICT["de"]["eq.refMissing"]="[Gl. {key} nicht gefunden]";I18N_DICT["de"]["dl.verify"]="Signatur prüfen";I18N_DICT["fr"]={"toc.title":"Sommaire","toc.collapse":"Réduire","toc.expand":"Développer","code.copy":"Copier le code","mcq.wrong":"Incorrect","mcq.authorNone":"Aucune réponse","mcq.authorPick":"Sélectionné","mcq.authorOk":"Correct","mcq.authorPartial":"Incomplet","mcq.authorWrong":"Incorrect","fc.hint":"Cliquez pour retourner","fcs.shuffle":"Mélanger","chat.card":"Carte de contact","chat.rpDefault":"Meilleures salutations","vote.total":"{n} votes","ghr.loading":"Chargement...","audio.subsToggle":"Afficher/masquer les sous-titres","audio.noSubs":"Aucun sous-titre","audio.subsErr":"Erreur de sous-titres","audio.unknownTitle":"Titre inconnu","audio.unknownSource":"Source inconnue","audio.fieldTitle":"Titre","audio.fieldSource":"Source","audio.fieldCover":"Couverture","audio.fieldAudio":"Audio","audio.copy":"Copier","audio.copied":"Copié","mermaid.loading":"Chargement de Mermaid","mermaid.copy":"Copier le code source","mermaid.zoom":"Zoom","table.export":"Exporter en CSV","table.filename":"table_export.csv","heading.copyLink":"Copier le lien vers le titre","rp.from":"Cadeau de {name}","rp.opened":"Tous les cadeaux distribués","rp.summary":"{n} distribués · plus rien","warn.unclosed":"[UpKram] {n} conteneurs non fermés détectés","code.wrap":"Basculer le retour à la ligne","code.lines":"lignes","code.cols":"colonnes","code.chars":"caractères","dl.download":"Télécharger","mcq.selected":"Sélectionné·","mcq.single":"Choix unique","mcq.multi":"Choix multiple","mcq.submit":"Envoyer","mcq.hintClick":"Cliquez sur une option","mcq.hintMulti":"Plusieurs réponses possibles","mcq.toggleView":"Essayer","mcq.togglePlay":"Voir la réponse","mcq.reset":"Réinitialiser","mcq.explain":"Explication","mcq.ok":"Correct","mcq.partial":"Incomplet"};I18N_DICT["fr"]["ghr.repository"]="Dépôt GitHub";I18N_DICT["fr"]["chat.unknownName"]="Inconnu";I18N_DICT["fr"]["ghr.noData"]="Impossible de récupérer les données en direct. Le dépôt n’existe peut-être pas ou la limite de requêtes est atteinte.";I18N_DICT["fr"]["saq.tag"]="Réponse courte";I18N_DICT["fr"]["saq.answer"]="Réponse de référence";I18N_DICT["fr"]["saq.explain"]="Explication";I18N_DICT["fr"]["saq.reveal"]="Cliquez pour afficher";I18N_DICT["fr"]["mcq.selectFirst"]="Veuillez sélectionner au moins une option";I18N_DICT["fr"]["rp.someone"]="Quelqu’un";I18N_DICT["fr"]["rp.giverName"]="Cadeau de {name}";I18N_DICT["fr"]["rp.openAria"]="Ouvrir le cadeau";I18N_DICT["fr"]["ghr.justNow"]="à l’instant";I18N_DICT["fr"]["ghr.minAgo"]="il y a {n} min";I18N_DICT["fr"]["ghr.hourAgo"]="il y a {n} h";I18N_DICT["fr"]["ghr.dayAgo"]="il y a {n} j";I18N_DICT["fr"]["ghr.monthAgo"]="il y a {n} mois";I18N_DICT["fr"]["ghr.yearAgo"]="il y a {n} an";I18N_DICT["fr"]["ghr.updated"]="mis à jour {time}";I18N_DICT["fr"]["ghr.archived"]="Archivé";I18N_DICT["fr"]["ghr.noDesc"]="Aucune description";I18N_DICT["fr"]["ghr.invalidRepo"]="Format de dépôt invalide (owner/repo attendu)";I18N_DICT["fr"]["date.justNow"]="à l’instant";I18N_DICT["fr"]["date.secAgo"]="il y a {n} s";I18N_DICT["fr"]["date.secLater"]="dans {n} s";I18N_DICT["fr"]["date.minAgo"]="il y a {n} min";I18N_DICT["fr"]["date.minLater"]="dans {n} min";I18N_DICT["fr"]["date.hourAgo"]="il y a {n} h";I18N_DICT["fr"]["date.hourLater"]="dans {n} h";I18N_DICT["fr"]["date.yesterday"]="hier";I18N_DICT["fr"]["date.tomorrow"]="demain";I18N_DICT["fr"]["date.yearUnit"]="a";I18N_DICT["fr"]["date.monthUnit"]="mois";I18N_DICT["fr"]["date.dayUnit"]="j";I18N_DICT["fr"]["date.agoUnit"]=" auparavant";I18N_DICT["fr"]["date.laterUnit"]=" plus tard";I18N_DICT["fr"]["chat.quote"]="[Citation {name}]";I18N_DICT["fr"]["chat.img"]="[Image]";I18N_DICT["fr"]["chat.rp"]="[Cadeau]";I18N_DICT["fr"]["chat.transfer"]="[Transfert]";I18N_DICT["fr"]["chat.cardTag"]="[Carte]";I18N_DICT["fr"]["ghr.unknownLang"]="Inconnu";I18N_DICT["fr"]["warn.unclosedBadge"]="Non fermé";I18N_DICT["fr"]["fig.label"]="Fig. {n}";I18N_DICT["fr"]["tbl.label"]="Tableau {n}";I18N_DICT["fr"]["eq.label"]="Éq. ({n})";I18N_DICT["fr"]["fig.refMissing"]="[Fig. {key} introuvable]";I18N_DICT["fr"]["tbl.refMissing"]="[Tableau {key} introuvable]";I18N_DICT["fr"]["eq.refMissing"]="[Éq. {key} introuvable]";I18N_DICT["fr"]["dl.verify"]="Vérifier la signature";I18N_DICT["es"]={"toc.title":"Contenidos","toc.collapse":"Contraer","toc.expand":"Expandir","code.copy":"Copiar código","mcq.wrong":"Incorrecto","mcq.authorNone":"Sin respuesta","mcq.authorPick":"Seleccionado","mcq.authorOk":"Correcto","mcq.authorPartial":"Incompleto","mcq.authorWrong":"Incorrecto","fc.hint":"Haz clic para girar","fcs.shuffle":"Mezclar","chat.card":"Tarjeta de contacto","chat.rpDefault":"Saludos","vote.total":"{n} votos","ghr.loading":"Cargando...","audio.subsToggle":"Mostrar/ocultar subtítulos","audio.noSubs":"Sin subtítulos","audio.subsErr":"Error de subtítulos","audio.unknownTitle":"Título desconocido","audio.unknownSource":"Fuente desconocida","audio.fieldTitle":"Título","audio.fieldSource":"Fuente","audio.fieldCover":"Portada","audio.fieldAudio":"Audio","audio.copy":"Copiar","audio.copied":"Copiado","mermaid.loading":"Cargando Mermaid","mermaid.copy":"Copiar código fuente","mermaid.zoom":"Zoom","table.export":"Exportar CSV","table.filename":"table_export.csv","heading.copyLink":"Copiar enlace al encabezado","rp.from":"Regalo de {name}","rp.opened":"Todos los regalos repartidos","rp.summary":"{n} repartidos · ya no quedan","warn.unclosed":"[UpKram] {n} contenedores sin cerrar detectados","code.wrap":"Alternar ajuste de línea","code.lines":"líneas","code.cols":"columnas","code.chars":"caracteres","dl.download":"Descargar","mcq.selected":"Seleccionado·","mcq.single":"Opción única","mcq.multi":"Múltiple","mcq.submit":"Enviar","mcq.hintClick":"Haz clic en una opción","mcq.hintMulti":"Se permiten varias respuestas","mcq.toggleView":"Probarlo","mcq.togglePlay":"Ver respuesta","mcq.reset":"Reiniciar","mcq.explain":"Explicación","mcq.ok":"Correcto","mcq.partial":"Incompleto"};I18N_DICT["es"]["ghr.repository"]="Repositorio de GitHub";I18N_DICT["es"]["chat.unknownName"]="Desconocido";I18N_DICT["es"]["ghr.noData"]="No se pudieron obtener datos en vivo. Es posible que el repositorio no exista o que se haya alcanzado el límite de solicitudes.";I18N_DICT["es"]["saq.tag"]="Respuesta corta";I18N_DICT["es"]["saq.answer"]="Respuesta de referencia";I18N_DICT["es"]["saq.explain"]="Explicación";I18N_DICT["es"]["saq.reveal"]="Haz clic para mostrar";I18N_DICT["es"]["mcq.selectFirst"]="Selecciona al menos una opción";I18N_DICT["es"]["rp.someone"]="Alguien";I18N_DICT["es"]["rp.giverName"]="Regalo de {name}";I18N_DICT["es"]["rp.openAria"]="Abrir regalo";I18N_DICT["es"]["ghr.justNow"]="ahora mismo";I18N_DICT["es"]["ghr.minAgo"]="hace {n} min";I18N_DICT["es"]["ghr.hourAgo"]="hace {n} h";I18N_DICT["es"]["ghr.dayAgo"]="hace {n} d";I18N_DICT["es"]["ghr.monthAgo"]="hace {n} mes";I18N_DICT["es"]["ghr.yearAgo"]="hace {n} a";I18N_DICT["es"]["ghr.updated"]="actualizado {time}";I18N_DICT["es"]["ghr.archived"]="Archivado";I18N_DICT["es"]["ghr.noDesc"]="Sin descripción";I18N_DICT["es"]["ghr.invalidRepo"]="Formato de repositorio no válido (se espera owner/repo)";I18N_DICT["es"]["date.justNow"]="ahora mismo";I18N_DICT["es"]["date.secAgo"]="hace {n} s";I18N_DICT["es"]["date.secLater"]="en {n} s";I18N_DICT["es"]["date.minAgo"]="hace {n} min";I18N_DICT["es"]["date.minLater"]="en {n} min";I18N_DICT["es"]["date.hourAgo"]="hace {n} h";I18N_DICT["es"]["date.hourLater"]="en {n} h";I18N_DICT["es"]["date.yesterday"]="ayer";I18N_DICT["es"]["date.tomorrow"]="mañana";I18N_DICT["es"]["date.yearUnit"]="a";I18N_DICT["es"]["date.monthUnit"]="mes";I18N_DICT["es"]["date.dayUnit"]="d";I18N_DICT["es"]["date.agoUnit"]=" antes";I18N_DICT["es"]["date.laterUnit"]=" después";I18N_DICT["es"]["chat.quote"]="[Cita {name}]";I18N_DICT["es"]["chat.img"]="[Imagen]";I18N_DICT["es"]["chat.rp"]="[Regalo]";I18N_DICT["es"]["chat.transfer"]="[Transferencia]";I18N_DICT["es"]["chat.cardTag"]="[Tarjeta]";I18N_DICT["es"]["ghr.unknownLang"]="Desconocido";I18N_DICT["es"]["warn.unclosedBadge"]="Sin cerrar";I18N_DICT["es"]["fig.label"]="Fig. {n}";I18N_DICT["es"]["tbl.label"]="Tabla {n}";I18N_DICT["es"]["eq.label"]="Ec. ({n})";I18N_DICT["es"]["fig.refMissing"]="[Fig. {key} no encontrada]";I18N_DICT["es"]["tbl.refMissing"]="[Tabla {key} no encontrada]";I18N_DICT["es"]["eq.refMissing"]="[Ec. {key} no encontrada]";I18N_DICT["es"]["dl.verify"]="Verificar firma";I18N_DICT["pt-BR"]={"toc.title":"Índice","toc.collapse":"Recolher","toc.expand":"Expandir","code.copy":"Copiar código","mcq.wrong":"Incorreto","mcq.authorNone":"Sem resposta","mcq.authorPick":"Selecionado","mcq.authorOk":"Correto","mcq.authorPartial":"Incompleto","mcq.authorWrong":"Incorreto","fc.hint":"Clique para virar","fcs.shuffle":"Embaralhar","chat.card":"Cartão de contato","chat.rpDefault":"Boas festas","vote.total":"{n} votos","ghr.loading":"Carregando...","audio.subsToggle":"Mostrar/ocultar legendas","audio.noSubs":"Sem legendas","audio.subsErr":"Erro nas legendas","audio.unknownTitle":"Título desconhecido","audio.unknownSource":"Fonte desconhecida","audio.fieldTitle":"Título","audio.fieldSource":"Fonte","audio.fieldCover":"Capa","audio.fieldAudio":"Áudio","audio.copy":"Copiar","audio.copied":"Copiado","mermaid.loading":"Carregando Mermaid","mermaid.copy":"Copiar código-fonte","mermaid.zoom":"Zoom","table.export":"Exportar CSV","table.filename":"table_export.csv","heading.copyLink":"Copiar link do título","rp.from":"Presente de {name}","rp.opened":"Todos os presentes distribuídos","rp.summary":"{n} distribuídos · esgotados","warn.unclosed":"[UpKram] {n} contêineres não fechados detectados","code.wrap":"Alternar quebra de linha","code.lines":"linhas","code.cols":"colunas","code.chars":"caracteres","dl.download":"Baixar","mcq.selected":"Selecionado·","mcq.single":"Escolha única","mcq.multi":"Múltipla","mcq.submit":"Enviar","mcq.hintClick":"Clique em uma opção","mcq.hintMulti":"Várias respostas permitidas","mcq.toggleView":"Testar","mcq.togglePlay":"Ver resposta","mcq.reset":"Reiniciar","mcq.explain":"Explicação","mcq.ok":"Correto","mcq.partial":"Incompleto"};I18N_DICT["pt-BR"]["ghr.repository"]="Repositório do GitHub";I18N_DICT["pt-BR"]["chat.unknownName"]="Desconhecido";I18N_DICT["pt-BR"]["ghr.noData"]="Não foi possível carregar dados ao vivo. O repositório pode não existir ou o limite de requisições foi atingido.";I18N_DICT["pt-BR"]["saq.tag"]="Resposta curta";I18N_DICT["pt-BR"]["saq.answer"]="Resposta de referência";I18N_DICT["pt-BR"]["saq.explain"]="Explicação";I18N_DICT["pt-BR"]["saq.reveal"]="Clique para revelar";I18N_DICT["pt-BR"]["mcq.selectFirst"]="Selecione pelo menos uma opção";I18N_DICT["pt-BR"]["rp.someone"]="Alguém";I18N_DICT["pt-BR"]["rp.giverName"]="Presente de {name}";I18N_DICT["pt-BR"]["rp.openAria"]="Abrir presente";I18N_DICT["pt-BR"]["ghr.justNow"]="agora mesmo";I18N_DICT["pt-BR"]["ghr.minAgo"]="há {n} min";I18N_DICT["pt-BR"]["ghr.hourAgo"]="há {n} h";I18N_DICT["pt-BR"]["ghr.dayAgo"]="há {n} d";I18N_DICT["pt-BR"]["ghr.monthAgo"]="há {n} meses";I18N_DICT["pt-BR"]["ghr.yearAgo"]="há {n} anos";I18N_DICT["pt-BR"]["ghr.updated"]="atualizado {time}";I18N_DICT["pt-BR"]["ghr.archived"]="Arquivado";I18N_DICT["pt-BR"]["ghr.noDesc"]="Sem descrição";I18N_DICT["pt-BR"]["ghr.invalidRepo"]="Formato de repositório inválido (esperado owner/repo)";I18N_DICT["pt-BR"]["date.justNow"]="agora mesmo";I18N_DICT["pt-BR"]["date.secAgo"]="há {n} s";I18N_DICT["pt-BR"]["date.secLater"]="em {n} s";I18N_DICT["pt-BR"]["date.minAgo"]="há {n} min";I18N_DICT["pt-BR"]["date.minLater"]="em {n} min";I18N_DICT["pt-BR"]["date.hourAgo"]="há {n} h";I18N_DICT["pt-BR"]["date.hourLater"]="em {n} h";I18N_DICT["pt-BR"]["date.yesterday"]="ontem";I18N_DICT["pt-BR"]["date.tomorrow"]="amanhã";I18N_DICT["pt-BR"]["date.yearUnit"]="a";I18N_DICT["pt-BR"]["date.monthUnit"]="meses";I18N_DICT["pt-BR"]["date.dayUnit"]="d";I18N_DICT["pt-BR"]["date.agoUnit"]=" atrás";I18N_DICT["pt-BR"]["date.laterUnit"]=" à frente";I18N_DICT["pt-BR"]["chat.quote"]="[Citação {name}]";I18N_DICT["pt-BR"]["chat.img"]="[Imagem]";I18N_DICT["pt-BR"]["chat.rp"]="[Presente]";I18N_DICT["pt-BR"]["chat.transfer"]="[Transferência]";I18N_DICT["pt-BR"]["chat.cardTag"]="[Cartão]";I18N_DICT["pt-BR"]["ghr.unknownLang"]="Desconhecido";I18N_DICT["pt-BR"]["warn.unclosedBadge"]="Não fechado";I18N_DICT["pt-BR"]["fig.label"]="Fig. {n}";I18N_DICT["pt-BR"]["tbl.label"]="Tabela {n}";I18N_DICT["pt-BR"]["eq.label"]="Eq. ({n})";I18N_DICT["pt-BR"]["fig.refMissing"]="[Fig. {key} não encontrada]";I18N_DICT["pt-BR"]["tbl.refMissing"]="[Tabela {key} não encontrada]";I18N_DICT["pt-BR"]["eq.refMissing"]="[Eq. {key} não encontrada]";I18N_DICT["pt-BR"]["dl.verify"]="Verificar assinatura";I18N_DICT["ru"]={"toc.title":"Содержание","toc.collapse":"Свернуть","toc.expand":"Развернуть","code.copy":"Копировать код","mcq.wrong":"Неверно","mcq.authorNone":"Нет ответа","mcq.authorPick":"Выбрано","mcq.authorOk":"Верно","mcq.authorPartial":"Неполный ответ","mcq.authorWrong":"Неверно","fc.hint":"Нажмите, чтобы перевернуть","fcs.shuffle":"Перемешать","chat.card":"Контактная карточка","chat.rpDefault":"Всего хорошего","vote.total":{one:"{n} голос",few:"{n} голоса",many:"{n} голосов",other:"{n} голосов"},"ghr.loading":"Загрузка...","audio.subsToggle":"Показать/скрыть субтитры","audio.noSubs":"Без субтитров","audio.subsErr":"Ошибка субтитров","audio.unknownTitle":"Неизвестный заголовок","audio.unknownSource":"Неизвестный источник","audio.fieldTitle":"Заголовок","audio.fieldSource":"Источник","audio.fieldCover":"Обложка","audio.fieldAudio":"Аудио","audio.copy":"Копировать","audio.copied":"Скопировано","mermaid.loading":"Загрузка Mermaid","mermaid.copy":"Копировать исходный код","mermaid.zoom":"Масштаб","table.export":"Экспорт CSV","table.filename":"table_export.csv","heading.copyLink":"Копировать ссылку на заголовок","rp.from":"Подарок от {name}","rp.opened":"Все подарки розданы","rp.summary":"{n} получено · все разобраны","warn.unclosed":{one:"[UpKram] обнаружен {n} незакрытый контейнер",few:"[UpKram] обнаружено {n} незакрытых контейнера",many:"[UpKram] обнаружено {n} незакрытых контейнеров",other:"[UpKram] обнаружено {n} незакрытых контейнеров"},"code.wrap":"Переключить перенос строк","code.lines":"строк","code.cols":"столбцов","code.chars":"символов","dl.download":"Скачать","mcq.selected":"Выбрано·","mcq.single":"Один выбор","mcq.multi":"Несколько","mcq.submit":"Отправить","mcq.hintClick":"Нажмите на вариант","mcq.hintMulti":"Разрешено несколько ответов","mcq.toggleView":"Попробовать","mcq.togglePlay":"Показать ответ","mcq.reset":"Сбросить","mcq.explain":"Объяснение","mcq.ok":"Верно","mcq.partial":"Неполный ответ"};I18N_DICT["ru"]["ghr.repository"]="Репозиторий GitHub";I18N_DICT["ru"]["chat.unknownName"]="Неизвестно";I18N_DICT["ru"]["ghr.noData"]="Не удалось загрузить данные в реальном времени. Репозиторий может не существовать или достигнут лимит запросов.";I18N_DICT["ru"]["saq.tag"]="Краткий ответ";I18N_DICT["ru"]["saq.answer"]="Эталонный ответ";I18N_DICT["ru"]["saq.explain"]="Объяснение";I18N_DICT["ru"]["saq.reveal"]="Нажмите, чтобы показать";I18N_DICT["ru"]["mcq.selectFirst"]="Выберите хотя бы один вариант";I18N_DICT["ru"]["rp.someone"]="Кто-то";I18N_DICT["ru"]["rp.giverName"]="Подарок от {name}";I18N_DICT["ru"]["rp.openAria"]="Открыть подарок";I18N_DICT["ru"]["ghr.justNow"]="только что";I18N_DICT["ru"]["ghr.minAgo"]={one:"{n} минуту назад",few:"{n} минуты назад",many:"{n} минут назад",other:"{n} минут назад"};I18N_DICT["ru"]["ghr.hourAgo"]={one:"{n} час назад",few:"{n} часа назад",many:"{n} часов назад",other:"{n} часов назад"};I18N_DICT["ru"]["ghr.dayAgo"]={one:"{n} день назад",few:"{n} дня назад",many:"{n} дней назад",other:"{n} дней назад"};I18N_DICT["ru"]["ghr.monthAgo"]={one:"{n} месяц назад",few:"{n} месяца назад",many:"{n} месяцев назад",other:"{n} месяцев назад"};I18N_DICT["ru"]["ghr.yearAgo"]={one:"{n} год назад",few:"{n} года назад",many:"{n} лет назад",other:"{n} лет назад"};I18N_DICT["ru"]["ghr.updated"]="обновлено {time}";I18N_DICT["ru"]["ghr.archived"]="Архивирован";I18N_DICT["ru"]["ghr.noDesc"]="Без описания";I18N_DICT["ru"]["ghr.invalidRepo"]="Неверный формат репозитория (ожидается owner/repo)";I18N_DICT["ru"]["date.justNow"]="только что";I18N_DICT["ru"]["date.secAgo"]={one:"{n} секунду назад",few:"{n} секунды назад",many:"{n} секунд назад",other:"{n} секунд назад"};I18N_DICT["ru"]["date.secLater"]={one:"через {n} секунду",few:"через {n} секунды",many:"через {n} секунд",other:"через {n} секунд"};I18N_DICT["ru"]["date.minAgo"]={one:"{n} минуту назад",few:"{n} минуты назад",many:"{n} минут назад",other:"{n} минут назад"};I18N_DICT["ru"]["date.minLater"]={one:"через {n} минуту",few:"через {n} минуты",many:"через {n} минут",other:"через {n} минут"};I18N_DICT["ru"]["date.hourAgo"]={one:"{n} час назад",few:"{n} часа назад",many:"{n} часов назад",other:"{n} часов назад"};I18N_DICT["ru"]["date.hourLater"]={one:"через {n} час",few:"через {n} часа",many:"через {n} часов",other:"через {n} часов"};I18N_DICT["ru"]["date.yesterday"]="вчера";I18N_DICT["ru"]["date.tomorrow"]="завтра";I18N_DICT["ru"]["date.yearUnit"]="г";I18N_DICT["ru"]["date.monthUnit"]="мес";I18N_DICT["ru"]["date.dayUnit"]="д";I18N_DICT["ru"]["date.agoUnit"]=" назад";I18N_DICT["ru"]["date.laterUnit"]=" через";I18N_DICT["ru"]["chat.quote"]="[Цитата {name}]";I18N_DICT["ru"]["chat.img"]="[Изображение]";I18N_DICT["ru"]["chat.rp"]="[Подарок]";I18N_DICT["ru"]["chat.transfer"]="[Перевод]";I18N_DICT["ru"]["chat.cardTag"]="[Карточка]";I18N_DICT["ru"]["ghr.unknownLang"]="Неизвестно";I18N_DICT["ru"]["warn.unclosedBadge"]="Незакрыто";I18N_DICT["ru"]["fig.label"]="Рис. {n}";I18N_DICT["ru"]["tbl.label"]="Таблица {n}";I18N_DICT["ru"]["eq.label"]="Ур. ({n})";I18N_DICT["ru"]["fig.refMissing"]="[Рис. {key} не найден]";I18N_DICT["ru"]["tbl.refMissing"]="[Таблица {key} не найдена]";I18N_DICT["ru"]["eq.refMissing"]="[Ур. {key} не найден]";I18N_DICT["ru"]["dl.verify"]="Проверить подпись";function __i18nT(ctx,key,params){return __cmI18nPick(ctx&&ctx.i18n?ctx.i18n:I18N_DICT["zh-CN"],key,params,ctx&&ctx.langKey)}function __normLang(s){s=String(s||"").trim();if(!s)return"";var lower=s.toLowerCase();for(var key in I18N_DICT){if(key.toLowerCase()===lower)return key}return""}function __resolveI18n(lang,i18nObj){var i18n=I18N_DICT["zh-CN"];var langKey=__normLang(lang);if(!langKey&&typeof i18nObj==="string")langKey=__normLang(i18nObj);if(langKey&&I18N_DICT[langKey])i18n=I18N_DICT[langKey];if(i18nObj&&typeof i18nObj==="object"){var __m=Object.assign({},i18n);for(var __lk in i18nObj)__m[__lk]=i18nObj[__lk];i18n=__m}return i18n}var SPEC_BASE={html:true,smartypants:false,breaks:false,zoom:false,emoji:false,decorations:false,anchor:false,links:false,toc:false,chat:false,scr:false,abbr:false,blanklines:false,autocollage:false,headingline:false,dropcap:false,lazycontinuation:true,tableexport:false,wikilink:false};var SPEC_PRESETS={commonmark:Object.assign({},SPEC_BASE,{gfm:false,autolink:false}),"gfm-core":Object.assign({},SPEC_BASE,{autolink:false,gfmsingletilde:true}),gfm:Object.assign({},SPEC_BASE,{autolink:true,gfmsingletilde:true,disallowedhtml:true})};function __cmHash(s){var h=2166136261;for(var i=0;i<s.length;i++){h^=s.charCodeAt(i);h=Math.imul(h,16777619)}return(h>>>0).toString(36)}function __cmPluralForm(lang,n){var l=String(lang||"").toLowerCase();n=Math.abs(Number(n)||0);if(l==="ru"||l==="ru-ru"){var m10=n%10,m100=n%100;if(m10===1&&m100!==11)return"one";if(m10>=2&&m10<=4&&(m100<12||m100>14))return"few";return"many"}return n===1?"one":"other"}function __cmI18nPick(dict,key,params,lang){var v=dict&&dict[key];if(v===undefined)v=I18N_DICT["zh-CN"]&&I18N_DICT["zh-CN"][key];if(v===undefined)return key;if(v&&typeof v==="object"&&params&&params.n!==undefined){var f=__cmPluralForm(lang,params.n);v=v[f]!==undefined?v[f]:v.other!==undefined?v.other:v.many!==undefined?v.many:v.few!==undefined?v.few:v.one}var out=String(v);if(params){for(var pk in params)out=out.split("{"+pk+"}").join(String(params[pk]))}return out}function __cmSafeImgSrc(src){var v=__cmDecodeEntities(String(src==null?"":src)).trim();v=v.replace(/[\u0000-\u001F\u007F]/g,"");if(!v)return v;if(/^data:text\//i.test(v))return"";if(/^data:image\/(?:png|jpe?g|gif|webp|avif|bmp);/i.test(v))return v;if(/^[a-z][a-z0-9+.-]*:/i.test(v)&&!/^(?:https?|ftps?):/i.test(v))return"";return v}function __cmRestoreSaves(nodes,saves){for(var i=0;i<nodes.length;i++){var n=nodes[i];if(n&&n.type==="text"&&typeof n.value==="string")n.value=n.value.replace(/\uE000([\uE100-\uE11F])/g,function(m,c){var k=c.charCodeAt(0)-57600;if(k<0||k>=ESCAPABLE_CHARS.length)return m;var ch=ESCAPABLE_CHARS.charAt(k);return ch==="&"?"":ch});if(n&&n.children)__cmRestoreSaves(n.children,saves)}}function __cmEmRescue(nodes,full){var has=false;for(var q=0;q<nodes.length;q++){var nd=nodes[q];if(nd&&nd.type==="text"&&/[*_]/.test(nd.value||"")){has=true;break}}if(!has)return nodes;var items=[],cursor=0;for(var q=0;q<nodes.length;q++){var nd=nodes[q];if(!nd||nd.type!=="text"){items.push({v:nd});continue}var v=nd.value||"",base=typeof nd._pos==="number"&&full?nd._pos:full?full.indexOf(v,cursor):cursor;var exact=base>=0;if(base<0)base=cursor;else cursor=base+v.length;var i=0;while(i<v.length){var c=v.charAt(i);if(c==="*"||c==="_"){var j=i+1;while(j<v.length&&v.charAt(j)===c)j++;var len=j-i;var b=exact&&base+i>0?full.charAt(base+i-1):i>0?v.charAt(i-1):"\n";var a=exact&&base+j<full.length?full.charAt(base+j):j<v.length?v.charAt(j):"\n";var lf=!__cmWs(a)&&(!__cmPunct(a)||__cmWs(b)||__cmPunct(b)),rf=!__cmWs(b)&&(!__cmPunct(b)||__cmWs(a)||__cmPunct(a));var co=c==="_"?lf&&(!rf||__cmPunct(b)):lf,cc=c==="_"?rf&&(!lf||__cmPunct(a)):rf;var ent=full&&/&(?:#\d+|#x[0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]{1,31});/.test(full.slice(Math.max(0,base-16),base+1))&&(exact&&base+i>0&&full.charAt(base+i-1)==="&");items.push({d:1,ch:c,len:len,orig:len,co:co,cc:cc,active:true,ent:ent});i=j;continue}var j2=i+1;while(j2<v.length&&v.charAt(j2)!=="*"&&v.charAt(j2)!=="_")j2++;items.push({v:{type:"text",value:v.slice(i,j2)}});i=j2}}if(!items.length)return nodes;for(var k=0;k<items.length;k++){items[k].p=k>0?items[k-1]:null;items[k].n=k+1<items.length?items[k+1]:null}var stack=[],head=items[0],cur=head,guard=0;while(cur&&guard++<2e5){var nx=cur.n;if(cur.d&&cur.active&&!cur.ent&&cur.co)stack.push(cur);if(cur.d&&cur.active&&!cur.ent&&cur.cc){var op=null,si=-1;for(var s=stack.length-1;s>=0;s--){var o=stack[s];if(o===cur||!o.active||!o.co||o.ch!==cur.ch)continue;if((cur.co||o.cc)&&cur.orig%3!==0&&(o.orig+cur.orig)%3===0)continue;op=o;si=s;break}if(op){var inner=[],x=op.n;while(x&&x!==cur){inner.push(x.d?{type:"text",value:new Array(x.len+1).join(x.ch)}:x.v);x=x.n}var it="";for(var z=0;z<inner.length;z++)it+=inner[z]&&inner[z].type==="text"?inner[z].value:"X";if(!it.trim()){cur.active=false}else{var use=op.len<2||cur.len<2?1:2;op.len-=use;cur.len-=use;stack.length=si;var wrap={type:use===2?"strong":"emphasis",children:inner};var frag=[];if(op.len>0)frag.push(op);frag.push({v:wrap});if(cur.len>0)frag.push(cur);var before=op.p,after=cur.n;for(var f=0;f<frag.length;f++){frag[f].p=f>0?frag[f-1]:before;frag[f].n=f+1<frag.length?frag[f+1]:after}if(before)before.n=frag[0];else head=frag[0];if(after)after.p=frag[frag.length-1];nx=op.len>0?op:cur.len>0?cur:after}}}cur=nx}var res=[],h=head;while(h){res.push(h.d?{type:"text",value:new Array(h.len+1).join(h.ch)}:h.v);h=h.n}return res}function __cmWs(c){return c===undefined||c===""||/\s/.test(c)}var __cmPunctUni=null;try{__cmPunctUni=new RegExp("[\\p{P}]","u")}catch(e){}function __cmPunct(c){if(!c)return false;var __cp=c.charCodeAt(0);if(__cp>=57344&&__cp<=57375||__cp>=57600&&__cp<=57631)return true;if(__cp<128)return/[!-\/:-@\[-`{-~]/.test(c);if(__cmPunctUni)return __cmPunctUni.test(c);return/[!-\/:-@\[-`{-~\u00a1\u00a7\u00ab\u00b6\u00b7\u00bb\u00bf\u2000-\u206f\u2e00-\u2e7f]/.test(c)}function __cmFlags(input,pos,len,ch){var b=pos>0?input.charAt(pos-1):"\n",a=pos+len<input.length?input.charAt(pos+len):"\n";var lf=!__cmWs(a)&&(!__cmPunct(a)||__cmWs(b)||__cmPunct(b));var rf=!__cmWs(b)&&(!__cmPunct(b)||__cmWs(a)||__cmPunct(a));return{co:ch==="_"?lf&&(!rf||__cmPunct(b)):lf,cc:ch==="_"?rf&&(!lf||__cmPunct(a)):rf}}function __cmEmOk(m,ch,openLen,closeLen){var input=m.input||"",p=m.index||0;if(p>0&&input.charAt(p-1)===ch)return false;var cp=p+m[0].length-closeLen;if(cp+closeLen<input.length&&input.charAt(cp+closeLen)===ch)return false;if(!__cmFlags(input,p,openLen,ch).co)return false;return __cmFlags(input,cp,closeLen,ch).cc}function __cmHasHardBreak(s){return typeof s==="string"&&/(?: {2,}|\\)$/.test(s)}function __cmOpenHtmlAtEnd(s){var i=0,len=s.length;while(i<len){var lt=s.indexOf("<",i);if(lt<0)break;if(lt+1>=len)return true;var c=s.charAt(lt+1);if(s.substr(lt,4)==="\x3c!--"){var e=s.indexOf("--\x3e",lt+4);if(e<0)return true;i=e+3;continue}if(c==="!"||c==="?"||/[a-zA-Z\/]/.test(c)){var j=lt+1,q="";while(j<len){var ch=s.charAt(j);if(q){if(ch===q)q=""}else if(ch==='"'||ch==="'"){q=ch}else if(ch===">")break;j++}if(j>=len)return true;i=j+1;continue}i=lt+1}return __cmOpenLinkAtEnd(s)}function __cmOpenLinkAtEnd(s){var i=s.lastIndexOf("](");if(i<0)return false;var depth=0,q="";for(var j=i+2;j<s.length;j++){var c=s[j];if(q){if(c===q)q="";continue}if(c==='"'||c==="'"){q=c;continue}if(c==="("){depth++;continue}if(c===")"){if(depth===0)return false;depth--}}return true}function __cmValidCrossLineLink(s){if(s.indexOf("\n")<0)return false;if(!/\]\([^)]*\n/.test(s))return false;return!!s.match(/\]\([ \t]*(?:<[^>]*>|[^"')]+)(?:[ \t\n]+["'][^"']*["'])?[ \t]*\)/)||!!s.match(/\]\([ \t]*[^)]*\)/)}function __cmValidCrossLineHtml(s){if(s.indexOf("\n")<0)return false;var re=/<!--(?!>|->)(?:(?!--)[\s\S])*?(?<!-)-->|<\/?[a-zA-Z][a-zA-Z0-9-]*(?:\s+[a-zA-Z_:][a-zA-Z0-9_.:-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*\s*\/?>/g,m;while(m=re.exec(s)){if(m[0].indexOf("\n")>=0)return true}return __cmValidCrossLineLink(s)}function __cmMergeParaLines(lines){var out=[],joined=[],i=0;while(i<lines.length){var buf=lines[i],j=i+1,mode="";var runMatch=buf.match(/(`+)/);var run=runMatch?runMatch[1].length:0;var closeRe=run?new RegExp("(^|[^`])`{"+run+",}(?!`)"):null;if(run&&closeRe&&!closeRe.test(buf.slice(run)))mode="code";else if(__cmOpenHtmlAtEnd(buf))mode="html";if(mode==="code"){while(j<lines.length){buf+="\n"+lines[j];var hit=closeRe.test(lines[j]);j++;if(hit)break}out.push(buf);for(var k=i;k<j;k++)joined.push(k>i);i=j}else if(mode==="html"){var hb=buf,he=j;while(he<lines.length&&__cmOpenHtmlAtEnd(hb)){hb+="\n"+lines[he];he++}if(__cmValidCrossLineHtml(hb)){buf=hb;j=he;out.push(buf);for(var k2=i;k2<j;k2++)joined.push(k2>i);i=j}else{out.push(buf);joined.push(false);i++}}else{out.push(buf);joined.push(false);i++}}return{lines:out,joined:joined}}function createContext(userConfig){var config=Object.assign({},DEFAULT_CONFIG);if(userConfig&&userConfig.preset&&SPEC_PRESETS[userConfig.preset])Object.assign(config,SPEC_PRESETS[userConfig.preset]);var locked=[];if(userConfig){if(userConfig.locked)locked=userConfig.locked.map(function(x){return String(x).toLowerCase()});for(var k in userConfig){if(k!=="locked"&&k!=="env")config[k.toLowerCase()]=userConfig[k]}}var i18n=__resolveI18n(userConfig&&userConfig.lang,userConfig&&userConfig.i18n);var env=userConfig&&userConfig.env&&typeof userConfig.env==="object"?userConfig.env:{};return{stamp:__cmHash("upkram"),config:config,locked:locked,hostConfig:userConfig,i18n:i18n,langKey:__normLang(userConfig&&userConfig.lang)||"zh-CN",isSSR:true,env:env,vars:Object.create(null),macros:Object.create(null),meta:null,__warnings:[],codeIndex:0,chatIndex:0,footnoteMap:Object.create(null),footnoteCount:0,footnoteDefs:Object.create(null),globalUsers:Object.create(null),refLinks:Object.create(null),__refDefSpan:Object.create(null),abbrs:Object.create(null),hasAbbr:false,headings:[],usedSlugs:Object.create(null),headnumCounter:[0,0,0,0,0]}}function footnoteIndex(ctx,key){if(!ctx.footnoteMap[key]){ctx.footnoteCount++;ctx.footnoteMap[key]=ctx.footnoteCount}return ctx.footnoteMap[key]}function __cmRefJoinLabel(lines,ctx){var out=lines.slice();for(var i=0;i<out.length;i++){var m=out[i].match(/^ {0,3}\[((?:\\.|[^\]\\])*)$/);if(!m)continue;var j=i+1,buf=out[i],found=false;while(j<out.length&&out[j].trim()!==""){buf+=" "+out[j].trim();if(/\]:[ \t]*/.test(out[j])){found=true;j++;break}j++}if(!found)continue;if(!buf.slice(1,buf.indexOf("]")).trim())continue;out[i]=buf;for(var k=i+1;k<j;k++)out[k]="";if(!ctx.__refJoinSpan)ctx.__refJoinSpan=Object.create(null);ctx.__refJoinSpan[i]=j-1;i=j-1}return out}function __cmRefJoin(lines,ctx){var out=lines.slice();for(var i=0;i<out.length;i++){var m=out[i].match(/^ {0,3}\[((?:\\.|[^\]\[\\])+)\]:[ \t]*(?:<([^>]*)>|(\S+))[ \t]+(["'])(.*)$/);if(!m)continue;var q=m[4];if(m[5].indexOf(q)>=0)continue;var buf=m[5],j=i+1;while(j<out.length){if(out[j].trim()==="")break;buf+="\n"+out[j];if(out[j].indexOf(q)>=0){j++;break}j++}var pre=out[i].slice(0,out[i].length-m[5].length);out[i]=pre+buf;for(var k=i+1;k<j;k++)out[k]="";if(!ctx.__refJoinSpan)ctx.__refJoinSpan=Object.create(null);ctx.__refJoinSpan[i]=j-1;i=j-1}return out}function preScanRefLinks(source,ctx){const __srcLines=source.split("\n");const lines=__cmRefJoinLabel(__cmRefJoin(source.split("\n"),ctx),ctx);let fenceChar="",fenceLen=0,contDepth=0;let __paraOpen=false;for(let i=0;i<lines.length;i++){const l=lines[i];if(fenceChar){const fc=l.match(/^ {0,3}(`{3,}|~{3,})[ \t]*$/);if(fc&&fc[1].charAt(0)===fenceChar&&fc[1].length>=fenceLen){fenceChar="";fenceLen=0}continue}const fo=l.match(/^ {0,3}(`{3,}|~{3,})([\w.+#-]*)(?:[ \t]+(.+?))?[ \t]*$/);if(fo){fenceChar=fo[1].charAt(0);fenceLen=fo[1].length;continue}if(/^:::[a-z]/.test(l)){contDepth++;continue}if(/^:::\/[a-z]/.test(l)){if(contDepth>0)contDepth--;continue}if(/^:::[ \t]*$/.test(l)){if(contDepth>0)contDepth--;continue}if(l.trim()==="")__paraOpen=false;if(/^ {0,3}(?:>|[-*+]|\d{1,9}[.)])/.test(l))__paraOpen=false;if(contDepth>0)continue;const __refLine=l.replace(/^ {0,3}>[ \t]?/,"").replace(/^(?: {0,3}(?:[-*+]|\d{1,9}[.)])[ \t]+)+/,"");let m=__refLine.match(/^ {0,3}\[((?:\\.|[^\]\[\\])+)\]:[ \t]*(?:<([^>]*)>|(\S+))?(?:[ \t]+(?:"((?:\\.|[^"\\])*)"|'((?:\\.|[^'\\])*)'|\(([^)]*)\)))?[ \t]*$/);if(m){if(__paraOpen)continue;if(m[1].length>999)continue;if(m[1].charAt(0)==="^")continue;let __urlRaw=m[2]!==undefined?m[2]:m[3];if(__urlRaw&&__urlRaw.charAt(0)==="<"&&m[2]===undefined)continue;let __titleRaw=m[4]||m[5]||m[6]||"";let __extra=0;if(__urlRaw===undefined){const __nl=lines[i+1];if(__nl===undefined||!/^\s*\S/.test(__nl))continue;if(/^ {0,3}(?:>|[-*+]|\d{1,9}[.)])/.test(__nl))continue;const __nm=__nl.match(/^\s*(?:<([^>]*)>|(\S+))(?:[ \t]+(?:"((?:\\.|[^"\\])*)"|'((?:\\.|[^'\\])*)'|\(([^)]*)\)))?[ \t]*$/);if(!__nm)continue;__urlRaw=__nm[1]!==undefined?__nm[1]:__nm[2];if(__urlRaw.charAt(0)==="<"&&__nm[1]===undefined)continue;__titleRaw=__nm[3]||__nm[4]||__nm[5]||"";__extra=1;if(!__titleRaw){const __tl=lines[i+2];if(__tl!==undefined&&/^\s*(?:"[^"]*"|'[^']*'|\([^)]*\))[ \t]*$/.test(__tl)){const __tm=__tl.match(/^\s*(?:"((?:\\.|[^"\\])*)"|'((?:\\.|[^'\\])*)'|\(([^)]*)\))[ \t]*$/);if(__tm){__titleRaw=__tm[1]||__tm[2]||__tm[3]||"";__extra=2}}}}if(!__titleRaw){const __t2=lines[i+1+__extra];if(__t2!==undefined&&/^\s*(?:"[^"]*"|'[^']*'|\([^)]*\))[ \t]*$/.test(__t2)){const __t2m=__t2.match(/^\s*(?:"((?:\\.|[^"\\])*)"|'((?:\\.|[^'\\])*)'|\(([^)]*)\))[ \t]*$/);if(__t2m){__titleRaw=__t2m[1]||__t2m[2]||__t2m[3]||"";__extra++}}}if(!/[^ \t\r\n]/.test(m[1].replace(/\\./g,"x")))continue;const label=normalizeRefLabel(m[1].replace(/\\([\[\]\\])/g,"$1"));if(!ctx.refLinks[label]){const __refUrl=String(__urlRaw).replace(/ /g,"%20").replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_\x60{|}~])/g,"$1");ctx.refLinks[label]={url:__refUrl,title:String(__titleRaw).replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_\x60{|}~])/g,"$1")};if(ctx.__refJoinSpan&&ctx.__refJoinSpan[i]!==undefined)__extra=ctx.__refJoinSpan[i];ctx.__refDefSpan[label]={start:i,end:i+__extra,text:__srcLines[i],endText:__srcLines[i+__extra]}}i+=__extra;continue}if(l.trim()!==""&&!/^(?: {0,3}(?:#{1,6}\s|>|`{3,}|~{3,}|[-*+]\s|\d+[.)]\s|(-{3,}|_{3,}|\*{3,})[ \t]*$)| {4,}|\t)/.test(l))__paraOpen=true;let ma=l.match(/^ {0,3}\*\[([^\]]+)\]:[ \t]*(.+?)[ \t]*$/);if(ma){ctx.abbrs[normalizeRefLabel(ma[1])]=ma[2];ctx.hasAbbr=true}}}var LANG_DATA={js:{icon:"fab fa-js",name:"JavaScript",color:"#f7df1e",tree:1,meta:1},mjs:{icon:"fab fa-js",color:"#f7df1e",tree:1},ts:{icon:"fab fa-js",color:"#3178c6",tree:1},jsx:{icon:"fab fa-react",name:"JSX",color:"#61dafb",tree:1,meta:1},tsx:{icon:"fab fa-react",color:"#61dafb",tree:1},vue:{icon:"fab fa-vuejs",name:"Vue",color:"#42b883",tree:1,meta:1,ghrColor:"#41b883"},html:{icon:"fab fa-html5",name:"HTML",color:"#e34c26",tree:1,meta:1,ghrColor:"#e34c26"},htm:{icon:"fab fa-html5",color:"#e34c26",tree:1},css:{icon:"fab fa-css3-alt",name:"CSS",color:"#264de4",tree:1,meta:1,ghrColor:"#563d7c"},scss:{icon:"fab fa-sass",color:"#cd6799",tree:1},sass:{icon:"fab fa-sass",name:"Sass",color:"#cd6799",tree:1,meta:1},less:{icon:"fab fa-less",name:"Less",color:"#1d365d",tree:1,meta:1},py:{icon:"fab fa-python",name:"Python",color:"#3776ab",tree:1,meta:1},java:{icon:"fab fa-java",name:"Java",color:"#f89820",tree:1,meta:1,ghrColor:"#b07219"},go:{icon:"fab fa-golang",name:"Go",color:"#00acd7",tree:1,meta:1,ghrColor:"#00ADD8"},golang:{icon:"fab fa-golang",name:"Go",color:"#00acd7",tree:1,meta:1},rs:{icon:"fab fa-rust",name:"Rust",color:"#dea584",tree:1,meta:1},rust:{icon:"fab fa-rust",name:"Rust",color:"#dea584",tree:1,meta:1,ghrColor:"#dea584"},php:{icon:"fab fa-php",name:"PHP",color:"#777bb4",tree:1,meta:1,ghrColor:"#4F5D95"},rb:{icon:"fas fa-gem",name:"Ruby",color:"#cc342d",tree:1,meta:1},ruby:{icon:"fas fa-gem",name:"Ruby",color:"#cc342d",tree:1,meta:1,ghrColor:"#701516"},swift:{icon:"fab fa-swift",name:"Swift",color:"#fa7343",tree:1,meta:1,ghrColor:"#F05138"},sh:{icon:"fas fa-terminal",color:"#89e051",tree:1},bash:{icon:"fas fa-terminal",color:"#89e051",tree:1},json:{icon:"fas fa-code",color:"#f7df1e",tree:1},yml:{icon:"fas fa-gear",color:"#cb171e",tree:1},yaml:{icon:"fas fa-gear",color:"#cb171e",tree:1},toml:{icon:"fas fa-gear",color:"#9c4221",tree:1},md:{icon:"fab fa-markdown",name:"Markdown",color:"#888888",tree:1,meta:1},markdown:{icon:"fab fa-markdown",name:"Markdown",color:"#888888",tree:1,meta:1},txt:{icon:"fas fa-file-lines",color:"#888888",tree:1},png:{icon:"fas fa-image",color:"#10b981",tree:1},jpg:{icon:"fas fa-image",color:"#10b981",tree:1},jpeg:{icon:"fas fa-image",color:"#10b981",tree:1},gif:{icon:"fas fa-image",color:"#10b981",tree:1},svg:{icon:"fas fa-bezier-curve",color:"#f59e0b",tree:1},webp:{icon:"fas fa-image",color:"#10b981",tree:1},ico:{icon:"fas fa-image",color:"#10b981",tree:1},zip:{icon:"fas fa-file-zipper",color:"#f59e0b",tree:1},rar:{icon:"fas fa-file-zipper",color:"#f59e0b",tree:1},"7z":{icon:"fas fa-file-zipper",color:"#f59e0b",tree:1},pdf:{icon:"fas fa-file-pdf",color:"#e74c6f",tree:1},doc:{icon:"fas fa-file-word",color:"#2b579a",tree:1},docx:{icon:"fas fa-file-word",color:"#2b579a",tree:1},xls:{icon:"fas fa-file-excel",color:"#217346",tree:1},xlsx:{icon:"fas fa-file-excel",color:"#217346",tree:1},ppt:{icon:"fas fa-file-powerpoint",color:"#d24726",tree:1},pptx:{icon:"fas fa-file-powerpoint",color:"#d24726",tree:1},exe:{icon:"fas fa-microchip",color:"#8a8ab5",tree:1},dll:{icon:"fas fa-microchip",color:"#8a8ab5",tree:1},lock:{icon:"fas fa-lock",color:"#8a8ab5",tree:1},env:{icon:"fas fa-key",color:"#f59e0b",tree:1},db:{icon:"fas fa-database",color:"#8b5cf6",tree:1},sql:{icon:"fas fa-database",color:"#8b5cf6",tree:1},sqlite:{icon:"fas fa-database",color:"#8b5cf6",tree:1},log:{icon:"fas fa-file-lines",color:"#8a8ab5",tree:1},wasm:{icon:"fas fa-microchip",color:"#8b5cf6",tree:1},map:{icon:"fas fa-map",color:"#10b981",tree:1},csv:{icon:"fas fa-file-csv",color:"#10b981",tree:1},xml:{icon:"fas fa-code",color:"#f1662a",tree:1},mp3:{icon:"fas fa-music",color:"#8b5cf6",tree:1},wav:{icon:"fas fa-music",color:"#8b5cf6",tree:1},flac:{icon:"fas fa-music",color:"#8b5cf6",tree:1},mp4:{icon:"fas fa-video",color:"#8b5cf6",tree:1},avi:{icon:"fas fa-video",color:"#8b5cf6",tree:1},mov:{icon:"fas fa-video",color:"#8b5cf6",tree:1},mkv:{icon:"fas fa-video",color:"#8b5cf6",tree:1},javascript:{icon:"fab fa-js",name:"JavaScript",meta:1,ghrColor:"#f1e05a"},node:{icon:"fab fa-node-js",name:"Node.js",meta:1},nodejs:{icon:"fab fa-node-js",name:"Node.js",meta:1},"node.js":{icon:"fab fa-node-js",name:"Node.js",meta:1},python:{icon:"fab fa-python",name:"Python",meta:1,ghrColor:"#3572A5"},html5:{icon:"fab fa-html5",name:"HTML",meta:1},css3:{icon:"fab fa-css3-alt",name:"CSS",meta:1},vuejs:{icon:"fab fa-vuejs",name:"Vue",meta:1},react:{icon:"fab fa-react",name:"React",meta:1},angular:{icon:"fab fa-angular",name:"Angular",meta:1},docker:{icon:"fab fa-docker",name:"Docker",meta:1},git:{icon:"fab fa-git-alt",name:"Git",meta:1},npm:{icon:"fab fa-npm",name:"NPM",meta:1},JavaScript:{ghrAlias:"javascript"},typescript:{ghrColor:"#3178c6"},TypeScript:{ghrAlias:"typescript"},HTML:{ghrAlias:"html"},CSS:{ghrAlias:"css"},Python:{ghrAlias:"python"},Java:{ghrAlias:"java"},Go:{ghrAlias:"go"},Rust:{ghrAlias:"rust"},c:{ghrColor:"#555555"},C:{ghrAlias:"c"},"c++":{ghrColor:"#f34b7d"},"C++":{ghrAlias:"c++"},shell:{ghrColor:"#89e051"},Shell:{ghrAlias:"shell"},PHP:{ghrAlias:"php"},Ruby:{ghrAlias:"ruby"},Swift:{ghrAlias:"swift"},kotlin:{ghrColor:"#A97BFF"},Kotlin:{ghrAlias:"kotlin"},dart:{ghrColor:"#00B4AB"},Dart:{ghrAlias:"dart"},Vue:{ghrAlias:"vue"}};function __langMeta(k){var d=LANG_DATA[k];return d&&d.meta?d:null}function __treeIcon(k){var d=LANG_DATA[k];return d&&d.tree?[d.icon,d.color]:null}function __ghrColor(k){var d=LANG_DATA[k];if(d&&d.ghrAlias)d=LANG_DATA[d.ghrAlias];return d&&d.ghrColor||"#8a8ab5"}function getTreeFileIcon(name){const idx=name.lastIndexOf(".");const ext=idx>0?name.slice(idx+1).toLowerCase():"";const icon=__treeIcon(ext);return icon?'<i class="'+icon[0]+'" style="color:'+icon[1]+'"></i>':'<i class="fas fa-file" style="color:#8a8ab5"></i>'}function sortTree(node){node.children.sort((a,b)=>{const aIsFolder=a.children.length>0;const bIsFolder=b.children.length>0;if(aIsFolder!==bIsFolder)return aIsFolder?1:-1;return a.name.localeCompare(b.name)});for(const child of node.children)sortTree(child)}function parseTree(raw){const root={name:"",path:"",children:[]};const map=new Map([["",root]]);for(const line of raw.split("\n")){const trimmed=line.trim();if(!trimmed||trimmed.startsWith("//"))continue;const parts=trimmed.split("|").map(s=>s.trim());const path=parts[0];const size=parts[1]||"";const date=parts[2]||"";const url=parts[3]||"";if(!path)continue;const segs=path.split("/").filter(Boolean);let currentPath="";let parent=root;for(let i=0;i<segs.length;i++){const seg=segs[i];const isLast=i===segs.length-1;currentPath=currentPath?currentPath+"/"+seg:seg;let node=map.get(currentPath);if(!node){node={name:seg,path:currentPath,children:[],size:"",date:"",url:""};parent.children.push(node);map.set(currentPath,node)}if(isLast){node.size=size;node.date=date;node.url=url}parent=node}}sortTree(root);return root}function renderTreeNode(node){if(node.children.length===0){let nameHtml=escapeHtml(node.name);var __treeHref=__cmSafeHrefAttr(node.url);if(__treeHref){nameHtml='<a href="'+escapeHtml(__treeHref)+'" target="_blank" rel="noopener" class="tree-link">'+escapeHtml(node.name)+"</a>"}let metaHtml="";if(node.date)metaHtml+='<span class="meta-date">'+escapeHtml(node.date)+"</span>";if(node.size)metaHtml+='<span class="meta-size">'+escapeHtml(node.size)+"</span>";return'<li class="tree-file"><div class="tree-row"><span class="tree-left"><i class="tree-spacer"></i>'+getTreeFileIcon(node.name)+'<span class="tree-name">'+nameHtml+'</span></span><span class="tree-meta">'+metaHtml+"</span></div></li>"}const childrenHtml=node.children.map(c=>renderTreeNode(c)).join("");return'<li class="tree-folder"><div class="tree-row"><span class="tree-left"><i class="fas fa-chevron-down tree-arrow"></i><i class="fas fa-folder"></i><span class="tree-name">'+escapeHtml(node.name)+'</span></span></div><ul class="tree-children">'+childrenHtml+"</ul></li>"}function renderTree(root){return'<div class="tree-wrapper"><div class="md-tree"><ul>'+root.children.map(c=>renderTreeNode(c)).join("")+"</ul></div></div>"}function parseUserTable(lines,out){for(let li=0;li<lines.length;li++){const t=lines[li].trim();if(!t)continue;const idx=t.indexOf(":");if(idx<0){if(!out[t])out[t]={name:t,avatar:"",color:""};continue}const name=t.slice(0,idx).trim();const rest=t.slice(idx+1).trim();if(!name)continue;let avatar="",color="";const ps=rest.split(/\s+/);for(const p of ps){if(!p)continue;const cm=p.match(/^color=(.+)$/);if(cm){color=cm[1];continue}const am=p.match(/^avatar=(.+)$/);if(am){avatar=am[1];continue}if(!avatar&&/^(https?:|\/\/|\/\/|\/|\.\/)/.test(p))avatar=p}out[name]={name:name,avatar:avatar,color:color}}}function lookupUser(name,localUsers,globalUsers){return localUsers&&localUsers[name]||globalUsers&&globalUsers[name]||{name:name,avatar:"",color:""}}function parseKV(str){const result=Object.create(null);const re=/(\w+)=(?:"([^"]*)"|(\S+))/g;let m;while((m=re.exec(str))!==null){result[m[1]]=m[2]!==undefined?m[2]:m[3]}const rest=str.replace(/(\w+)=(?:"[^"]*"|\S+)/g," ");const flags=rest.split(/\s+/).filter(Boolean);for(const fl of flags){if(/^\w+$/.test(fl))result[fl]=true}return result}function parseMsgArgs(rest){const tokens=[];const re=/"((?:\\.|[^"\\])*)"|'((?:\\.|[^'\\])*)'|(\S+)/g;let m;while((m=re.exec(rest))!==null){if(m[1]!==undefined)tokens.push({v:m[1].replace(/\\(.)/g,"$1"),q:true});else if(m[2]!==undefined)tokens.push({v:m[2].replace(/\\(.)/g,"$1"),q:true});else tokens.push({v:m[3],q:false})}const name=tokens.length?tokens.shift().v:"";const opts={side:"left",time:"",id:"",status:""};for(const tk of tokens){const t=tk.v;if(!tk.q&&(t==="left"||t==="right"))opts.side=t;else if(/^\d{1,2}:\d{2}(?::\d{2})?$/.test(t))opts.time=t;else if(/^\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[T ]\d{1,2}:\d{2}(?::\d{2})?)?$/.test(t))opts.time=t;else if(!tk.q&&(m=t.match(/^id=(\S+)$/)))opts.id=m[1];else if(tk.q)opts.status=opts.status?opts.status+" "+t:t}return{name:name,opts:opts}}function parseMsgBody(text,ctx,localUsers,globalUsers){const lines=text.split("\n");const parts=[];let buf=[];let i=0;function flush(){const j=buf.join("\n");if(j.replace(/\s/g,"")!=="")parts.push({type:"text",text:j});buf=[]}while(i<lines.length){const line=lines[i];let m=line.match(/^:::quote\s+(.+)$/);if(m){flush();const qTokens=m[1].trim().split(/\s+/);const qName=qTokens[0]||"";let refId="";for(let qi=1;qi<qTokens.length;qi++){const qm=qTokens[qi].match(/^id=(\S+)$/);if(qm)refId=qm[1]}const qRes=scanContainer(lines,i+1,"quote",false);parts.push({type:"chatQuote",name:qName,refId:refId,user:lookupUser(qName,localUsers,globalUsers),targetId:"",parts:parseMsgBody(qRes.body,ctx,localUsers,globalUsers)});i=qRes.next;continue}if(/^:::\s*$/.test(line)){flush();i++;continue}m=line.match(/^:::img\s+(.+)$/);if(m){flush();parts.push({type:"image",kv:parseKV(m[1])});i++;continue}m=line.match(/^:::redpacket(?:\s+(.+))?$/);if(m){flush();parts.push({type:"redpacket",kv:parseKV(m[1]||"")});i++;continue}m=line.match(/^:::transfer(?:\s+(.+))?$/);if(m){flush();parts.push({type:"transfer",kv:parseKV(m[1]||"")});i++;continue}m=line.match(/^:::card(?:\s+(.+))?$/);if(m){flush();parts.push({type:"card",kv:parseKV(m[1]||"")});i++;continue}buf.push(line);i++}flush();return parts}function parseChat(raw,ctx,chatTitle){const lines=raw.split("\n");const localUsers=Object.create(null);const messages=[];let i=0;const chatId="chat-"+ctx.stamp+"-"+ctx.chatIndex++;let msgIndex=0;while(i<lines.length){const line=lines[i];if(line.trim()===""){i++;continue}if(/^:::users\s*$/.test(line)){const ub=[];let uj=i+1,ud=1;while(uj<lines.length){if(/^:::users\s*$/.test(lines[uj]))ud++;else if(/^:::\s*$/.test(lines[uj])){ud--;if(ud===0)break}ub.push(lines[uj]);uj++}parseUserTable(ub,localUsers);i=uj+1;continue}let m=line.match(/^:::msg\s+(.+)$/);if(m){const parsed=parseMsgArgs(m[1]);const mbRes=scanContainer(lines,i+1,"msg",false);const msgId=chatId+"-msg-"+msgIndex++;messages.push({type:"chatMsg",id:msgId,userId:parsed.opts.id,name:parsed.name,user:lookupUser(parsed.name,localUsers,ctx.globalUsers),side:parsed.opts.side,time:parsed.opts.time,status:parsed.opts.status,parts:parseMsgBody(mbRes.body,ctx,localUsers,ctx.globalUsers)});i=mbRes.next;continue}m=line.match(/^:::sys(?:\s+(.+))?$/);if(m){const tokens=(m[1]||"").trim().split(/\s+/).filter(Boolean);let sysType="default",iconOverride="",colorOverride="";const inlineText=[];for(const tk of tokens){const im=tk.match(/^icon=(.+)$/),cm=tk.match(/^color=(.+)$/);if(im){iconOverride=im[1];continue}if(cm){colorOverride=cm[1];continue}if(sysType==="default"&&tk!=="default"&&SYS_TYPES[tk]){sysType=tk;continue}inlineText.push(tk)}const sb=[];let sj=i+1,sd=1;while(sj<lines.length){if(/^:::sys\b/.test(lines[sj]))sd++;else if(/^:::\s*$/.test(lines[sj])){sd--;if(sd===0)break}sb.push(lines[sj]);sj++}let bodyText=inlineText.join(" ");if(sb.length)bodyText=bodyText?bodyText+"\n"+sb.join("\n"):sb.join("\n");const noIcon=!iconOverride&&sysType==="default";messages.push({type:"chatSys",sysType:sysType,iconOverride:iconOverride,colorOverride:colorOverride,noIcon:noIcon,text:bodyText});i=sj+1;continue}i++}const idMap=Object.create(null);for(const msg of messages){if(msg.type==="chatMsg"&&msg.userId)idMap[msg.userId]=msg.id}function resolveTargets(parts,lastMsgByUser){for(const p of parts){if(p.type==="chatQuote"){if(p.refId&&idMap[p.refId])p.targetId=idMap[p.refId];else p.targetId=lastMsgByUser[p.name]||"";resolveTargets(p.parts,lastMsgByUser)}}}const lastMsgByUser=Object.create(null);for(const msg of messages){if(msg.type==="chatMsg"){resolveTargets(msg.parts,lastMsgByUser);lastMsgByUser[msg.name]=msg.id}}function summarizeParts(parts,ctx){let s="";for(const sp of parts){if(sp.type==="text")s+=(s?" ":"")+sp.text.replace(/\n+/g," ").trim();else if(sp.type==="chatQuote")s+=(s?" ":"")+__i18nT(ctx,"chat.quote",{name:sp.name});else if(sp.type==="image")s+=(s?" ":"")+__i18nT(ctx,"chat.img");else if(sp.type==="redpacket")s+=(s?" ":"")+__i18nT(ctx,"chat.rp");else if(sp.type==="transfer")s+=(s?" ":"")+__i18nT(ctx,"chat.transfer");else if(sp.type==="card")s+=(s?" ":"")+__i18nT(ctx,"chat.cardTag")}return s.slice(0,80)}const refPreviewMap=Object.create(null);for(const m4 of messages){if(m4.type==="chatMsg"&&m4.userId){refPreviewMap[m4.userId]=summarizeParts(m4.parts,ctx)}}function fillAutoPreview(parts){for(const p of parts){if(p.type==="chatQuote"){if(p.refId&&refPreviewMap[p.refId]){p.autoPreview=refPreviewMap[p.refId]}fillAutoPreview(p.parts)}}}for(const m5 of messages){if(m5.type==="chatMsg")fillAutoPreview(m5.parts)}return{type:"chat",messages:messages,users:localUsers,title:chatTitle||""}}const INLINE_RULES=[{re:/\[!\[([^\]]*)\]\(([^)]*?)(?:\s+"([^"]*)")?\)\]\(([^)]*?)(?:\s+"([^"]*)")?\)/y,build:(m,ctx)=>({type:"link",href:m[4],autolink:false,title:m[5]||"",children:[{type:"image",alt:m[1],src:m[2],title:m[3]||"",width:"",height:""}]})},{re:/<([a-zA-Z][a-zA-Z0-9+.-]{1,31}:[^\s<>]*)>/y,build:m=>({type:"link",href:m[1],autolink:true,title:"",children:[{type:"text",value:m[1]}]})},{re:/<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/y,build:m=>({type:"link",href:"mailto:"+m[1],autolink:true,title:"",children:[{type:"text",value:m[1]}]})},{re:/(?:<[a-zA-Z][a-zA-Z0-9-]*(?:\s+[a-zA-Z_:][a-zA-Z0-9_.:-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*\s*\/?>|<\/[a-zA-Z][a-zA-Z0-9-]*\s*>)/y,build:(m,ctx)=>{var __dt=m[0].match(/^<\/?([a-zA-Z][a-zA-Z0-9-]*)/);if(ctx&&ctx.config&&ctx.config.disallowedhtml&&__dt&&/^(?:title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)$/i.test(__dt[1]))return null;return{type:"html",value:m[0]}}},{re:/!\[((?:\\.|[^\]\\])*)\]\[((?:\\.|[^\]\\])*)\]/y,build:(m,ctx)=>{const t1=m[1].replace(/\\(.)/g,"$1");const t2=m[2].replace(/\\(.)/g,"$1");const label=normalizeRefLabel(t2===""?t1:t2);const def=ctx.refLinks[label];if(!def)return null;return{type:"image",alt:extractTextFromNodes(parseInline(t1,ctx,true)),src:def.url,title:def.title||"",width:"",height:""}}},{re:/!\[((?:\\.|[^\]\\])*)\]\(([^)]*?)(?:\s+"([^"]*)")?(?:\s+=\s*([^x\s)]*)(?:x([^\s)]+))?)?(?:\s+(flip(?:-[xy]{1,2}|-both)?))?\)/y,build:(m,ctx)=>{let __flip="";if(m[6]){const __f=m[6].toLowerCase();if(__f==="flip-y")__flip="y";else if(__f==="flip-xy"||__f==="flip-yx"||__f==="flip-both")__flip="xy";else __flip="x"}return{type:"image",alt:extractTextFromNodes(parseInline(m[1].replace(/\\(.)/g,"$1"),ctx,true)),src:m[2],title:m[3]||"",width:m[4]||"",height:m[5]||"",flip:__flip}}},{re:/!video\[((?:\\.|[^\]\\])*)\]\(([^)]*?)(?:\s+"([^"]*)")?(?:\s+=\s*([^x\s)]+)(?:x([^\s)]+))?)?\)/y,build:(m,ctx)=>({type:"video",alt:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx),src:m[2],title:m[3]||"",width:m[4]||"",height:m[5]||""})},{re:/!audio\[((?:\\.|[^\]\\])*)\]\(([^)]*)\)/y,build:m=>{const __sp=m[2].replace(/\s+"[^"]*"/g,"");const __as=[];let __ac="";for(let __i=0;__i<__sp.length;__i++){const __ch=__sp.charAt(__i);if(__ch==="="){const __l=__i>0?__sp.charAt(__i-1):"";const __r=__i+1<__sp.length?__sp.charAt(__i+1):"";if(!__l||!__r||/\s/.test(__l)||/\s/.test(__r)){__as.push(__ac);__ac="";continue}}__ac+=__ch}__as.push(__ac);const parts=__as.length===1&&/\S=\S/.test(__sp)&&!/[?&]/.test(__sp)?__sp.split("="):__as;return{type:"audio",title:m[1].replace(/\\(.)/g,"$1"),src:(parts[0]||"").trim(),cover:(parts[1]||"").trim(),subtitle:(parts[2]||"").trim()}}},{re:/(`+)(?!`)([\s\S]*?)(?<!`)\1(?!`)/y,build:m=>{if(m.index>0&&m.input.charAt(m.index-1)==="`")return null;var v=m[2].replace(/\n/g," ");if(v.length>2&&v.charAt(0)===" "&&v.charAt(v.length-1)===" "){v=v.slice(1,-1)}return{type:"code",value:v}}},{re:/:([a-zA-Z0-9_+\-]+):/y,build:m=>{const ec=getEmojiConv();if(!ec)return null;const probe=ec.replace_colons(m[0]);if(probe===m[0])return null;return{type:"emoji",value:probe}}},{re:/\$((?:\\.|[^\$\n])+?)\$/y,build:m=>({type:"mathInline",value:m[1].trim()})},{re:/\*\*\*(?!\s)(.*?)(?<!\s)\*\*\*|\*\*(?!\s)(.*?)(?<!\s)\*\*/y,build:(m,ctx)=>{var __k=m[1]!==undefined?3:2;if(!__cmEmOk(m,"*",__k,__k))return{type:"text",value:m[0]};if(m[1]!==undefined)return{type:"emphasis",children:[{type:"strong",children:parseInline(m[1],ctx)}]};if(m[2].trim()==="")return null;return{type:"strong",children:parseInline(m[2],ctx)}}},{re:/(?<!\w)__(?!\s)((?:[^_]|_[^_]+?_)+?)(?<!\s)__(?!\w)/y,build:(m,ctx)=>{if(!__cmEmOk(m,"_",2,2))return{type:"text",value:m[0]};return{type:"strong",children:parseInline(m[1],ctx)}}},{re:/\*(?!\*)(?!\s)((?:[^*]|\*\*[^*]+?\*\*|\*[^*]+?\*)+?)(?<!\s)\*(?!\*)/y,build:(m,ctx)=>{if(!__cmEmOk(m,"*",1,1))return{type:"text",value:m[0]};return{type:"emphasis",children:parseInline(m[1],ctx)}}},{re:/(?<![\w\u4e00-\u9fa5])_(?!\s)((?:[^_]|__[^_]+?__|_[^_]+?_)+?)(?<!\s)_(?![\w\u4e00-\u9fa5])/y,build:(m,ctx)=>{if(!__cmEmOk(m,"_",1,1))return{type:"text",value:m[0]};return{type:"emphasis",children:parseInline(m[1],ctx)}}},{re:/~~(.*?)~~/y,build:(m,ctx)=>{if(m.index>0&&m.input.charAt(m.index-1)==="~"||m.input.charAt(m.index+m[0].length)==="~")return null;return{type:"delete",children:parseInline(m[1],ctx)}}},{re:/==([^=]+)==/y,build:(m,ctx)=>({type:"mark",children:parseInline(m[1],ctx)})},{re:/\^([^\^]+)\^/y,build:(m,ctx)=>({type:"sup",children:parseInline(m[1],ctx)})},{re:/~([^~]+)~/y,build:(m,ctx)=>{if(m.index>0&&m.input.charAt(m.index-1)==="~"||m.input.charAt(m.index+m[0].length)==="~")return null;if(ctx.config.gfmsingletilde)return{type:"delete",children:parseInline(m[1],ctx)};return{type:"sub",children:parseInline(m[1],ctx)}}},{re:/\[((?:\\.|\[[^\]]*\]|[^\[\]\\])*)\]\[((?:\\.|\[[^\]]*\]|[^\[\]\\])*)\]/y,build:(m,ctx)=>{const t1=m[1].replace(/\\(.)/g,"$1");const t2=m[2].replace(/\\(.)/g,"$1");const label=normalizeRefLabel(t2===""?t1:t2);const def=ctx.refLinks[label];if(/\]\(/.test(m[1]))return null;if(!def)return null;return{type:"link",href:def.url,autolink:false,title:def.title||"",children:parseInline(t1,ctx,true)}}},{re:/\[((?:\\.|[^\]\\])*)\]\(<((?:\\.|[^>\\\n])*)>(?:\s+(?:"([^"]*)"|'([^']*)'|\(([^()]*)\)))?\)/y,build:(m,ctx)=>({type:"link",href:m[2],autolink:false,title:m[3]||m[4]||m[5]||"",children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx,true)})},{re:/\[((?:\\.|\[[^\]]*\]|[^\[\]\\])*)\]\((?!<)([^()\s]*(?:\([^()\s]*(?:\([^()\s]*(?:\([^()]*\)[^()\s]*)*\)[^()\s]*)*\)[^()\s]*)*)(?:\s+(?:"((?:\\.|[^"\\])*)"|'((?:\\.|[^'\\])*)'|\(([^()]*)\)))?\)/y,build:(m,ctx)=>{if((m[1].match(/`/g)||[]).length%2)return null;let __t=m[3]||m[4]||m[5]||"";__t=__t.replace(/\\(.)/g,"$1");let __h=m[2].replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_\x60{|}~])/g,"$1");return{type:"link",href:__h,autolink:false,title:__t,children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx,true)}}},{re:/::lang(\+)?[ \t]+([\s\S]*?)[ \t]*::(?!:)/y,build:m=>({type:"lang",showText:!!m[1],name:m[2].trim()})},{re:/::(center|right)[ \t]+([\s\S]*?)[ \t]*::(?!:)/y,build:(m,ctx)=>({type:"alignBlockInline",align:m[1],children:parseInline(m[2],ctx)})},{re:/%%([\s\S]*?)%%/y,build:m=>({type:"mdComment",text:m[1]})},{re:/::hei[ \t]+([\s\S]*?)[ \t]*::(?!:)/y,build:(m,ctx)=>({type:"hei",children:parseInline(m[1],ctx)})},{re:/::key[ \t]+([\s\S]*?)[ \t]*::(?!:)/y,build:m=>({type:"key",value:m[1].trim()})},{re:/::copy[ \t]+([\s\S]*?)[ \t]*::(?!:)/y,build:m=>({type:"copy",value:m[1]})},{re:/::term\[((?:\\.|[^\]\\])+)\]\{((?:\\.|[^}\\])+)\}::/y,build:(m,ctx)=>{let tp=m[2].replace(/\\(.)/g,"$1");if(tp.indexOf("::")>=0)tp=extractTextFromNodes(parseInline(tp,ctx)).replace(/::[a-z]+\[([^\]]*)\]::/g,"$1");return{type:"term",label:m[1].replace(/\\(.)/g,"$1"),tip:tp}}},{re:/::ruby[ \t]+([^\s((]+)[((]([^))]+)[))](?:[ \t]*\{([^}]+)\})?::/y,build:(m,ctx)=>{const PUNCT=/[\s,。、!?;:""''()《》【】·—…,.!?;:'"()\[\]{}<>]/;const attrs=m[3]?parseKV(m[3]):{};let pos=(attrs.pos||"").toLowerCase();if(pos!=="under"){if(pos!=="over"&&attrs.pos){if(ctx&&!ctx.__warnings)ctx.__warnings=[];if(ctx&&ctx.__warnings)ctx.__warnings.push({type:"ruby-pos-invalid",value:attrs.pos})}pos=""}const chars=Array.from(m[1]),pys=m[2].trim().split(/\s+/).filter(Boolean),idxs=[];for(let i=0;i<chars.length;i++){if(!PUNCT.test(chars[i]))idxs.push(i)}if(idxs.length>1&&pys.length===idxs.length){const parts=[];let pi=0;for(let j=0;j<chars.length;j++){if(PUNCT.test(chars[j]))parts.push({punct:chars[j]});else parts.push({base:chars[j],rt:pys[pi++]})}return{type:"ruby",parts:parts,pos:pos}}return{type:"ruby",base:m[1],rt:m[2],pos:pos}}},{re:/::qr(?:\[((?:\\.|[^\]\\])+)\]|\(((?:\\.|[^)\\])+)\))::/y,build:(m,ctx)=>{const qu=(m[1]||m[2]).replace(/\\(.)/g,"$1");if(/\b(?:token|api[_-]?key|secret|password|passwd|pwd|session|auth|access[_-]?key|signature|sig)\b/i.test(qu)){if(!ctx.__warnings)ctx.__warnings=[];ctx.__warnings.push({type:"qr-sensitive-url",value:qu})}return{type:"qr",url:qu}}},{re:/::date\[((?:\\.|[^\]\\])+)\]((?:\([^)]*\))*)::/y,build:m=>{let raw=m[1].replace(/\\(.)/g,"$1");const brackets=m[2]||"";const contents=[];const re=/\(([^)]*)\)/g;let bm;while((bm=re.exec(brackets))!==null){contents.push(bm[1].replace(/\\([\[\]\\])/g,"$1"))}const joined=contents.join(" ");if(/\b(before|after)\s*=/.test(joined)){const __rest=joined.replace(/\b(before|after)\s*=\s*("([^"]*)"|'([^']*)'|(\S+))/g,"").trim();if(__rest===""){const kv={};joined.replace(/\b(before|after)\s*=\s*("([^"]*)"|'([^']*)'|(\S+))/g,function(_,k,_v,d,s,u){kv[k]=d!==undefined?d:s!==undefined?s:u});return{type:"date",raw:raw,before:kv.before||"",after:kv.after||""}}}let fixed=contents[0]||"";const p1=parseDateStr(raw);if(p1.ts===null&&fixed){const p2=parseDateStr(fixed);if(p2.ts!==null){raw=fixed;fixed=m[1].replace(/\\(.)/g,"$1")}}return{type:"date",raw:raw,fixed:fixed}}},{re:/::btnimg\[((?:\\.|[^\]\\])*)\]\(((?:\\.|[^)\\])*)\)\(((?:\\.|[^)\\])*)\)(?:\{((?:\\.|[^}\\])+)\})?::/y,build:m=>({type:"btnimg",alt:m[1].replace(/\\(.)/g,"$1"),src:m[2].replace(/\\(.)/g,"$1"),href:m[3].replace(/\\(.)/g,"$1"),attrs:m[4]?parseKV(m[4].replace(/\\([\[\]\\])/g,"$1")):{}})},{re:/::style\[((?:[^\[\]\\]|\\.|\[[^\[\]]*\])*)\](?:\{((?:\\.|[^}\\])+)\})?::/y,build:(m,ctx)=>({type:"style",attrs:m[2]?parseKV(m[2].replace(/\\([\[\]\\])/g,"$1")):{},children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx)})},{re:/::alt\[((?:\\.|[^\]\\])+)\]((?:\((?:\\.|[^)\\])*\))+)::/y,build:m=>{const opts=[m[1].replace(/\\(.)/g,"$1")];const pr=/\(((?:\\.|[^)\\])*)\)/g;let pm;while((pm=pr.exec(m[2]))!==null)opts.push(pm[1].replace(/\\([\[\]\\])/g,"$1"));return{type:"alt",options:opts}}},{re:/::ref\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>{const __rt=m[1].replace(/\\(.)/g,"$1");if(/^fig:/.test(__rt)){const __fk=__rt.slice(4).trim();if(__fk.indexOf(",")>=0){if(!ctx.__warnings)ctx.__warnings=[];ctx.__warnings.push({type:"ref-invalid-list",kind:"fig",key:__fk});return{type:"text",value:m[0]}}return{type:"figRef",key:slugify(__fk)}}if(/^tbl:/.test(__rt))return{type:"tblRef",key:slugify(__rt.slice(4))};if(/^eq:/.test(__rt))return{type:"eqRef",key:__rt.slice(3).trim()};return{type:"ref",target:__rt}}},{re:/::dot\[((?:\\.|[^\]\\])+)\](?:\(((?:\\.|[^)\\])+)\))?::/y,build:(m,ctx)=>{const raw=m[2]?m[2].replace(/\\(.)/g,"$1"):"";let shape="",color="";if(raw){const parts=raw.split(/\s+/).filter(Boolean);const sMap={sq:"'■'","sq-o":"'□'",tri:"'▲'","tri-o":"'△'",dot:"'•'","dot-o":"'◦'",circle:"'●'","circle-o":"'○'",double:"'◎'","double-o":"'◉'",sesame:"'﹅'","sesame-o":"'﹆'"};for(const p of parts){if(sMap[p])shape=sMap[p];else color=p}}return{type:"dot",children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx),shape:shape,color:color}}},{re:/::pn\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>{const raw=m[1].replace(/\\(.)/g,"$1");const node={type:"pn",text:raw};if(raw.indexOf("::")>=0)node.children=parseInline(raw,ctx);return node}},{re:/::upper\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>{const raw=m[1].replace(/\\(.)/g,"$1");const node={type:"upper",text:raw};if(raw.indexOf("::")>=0)node.children=parseInline(raw,ctx);return node}},{re:/::lower\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>{const raw=m[1].replace(/\\(.)/g,"$1");const node={type:"lower",text:raw};if(raw.indexOf("::")>=0)node.children=parseInline(raw,ctx);return node}},{re:/::cap\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>{const raw=m[1].replace(/\\(.)/g,"$1");const node={type:"cap",text:raw};if(raw.indexOf("::")>=0)node.children=parseInline(raw,ctx);return node}},{re:/::note\[((?:\\.|[^\]\\])+)\](?:\{((?:\\.|[^}\\])*)\})?::/y,build:(m,ctx)=>{let tp=(m[2]||"").replace(/\\(.)/g,"$1");if(tp.indexOf("::")>=0)tp=extractTextFromNodes(parseInline(tp,ctx)).replace(/::[a-z]+\[([^\]]*)\]::/g,"$1");return{type:"note",label:m[1].replace(/\\(.)/g,"$1"),tip:tp}}},{re:/::cmd\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>{const raw=m[1].replace(/\\(.)/g,"$1");const node={type:"cmd",text:raw};if(raw.indexOf("::")>=0)node.children=parseInline(raw,ctx);return node}},{re:/::flag\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>{const raw=m[1].replace(/\\(.)/g,"$1");const node={type:"flag",text:raw};if(raw.indexOf("::")>=0)node.children=parseInline(raw,ctx);return node}},{re:/::sup\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>({type:"sup",children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx)})},{re:/::sub\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>({type:"sub",children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx)})},{re:/@@([^@\n]+)@@/y,build:(m,ctx)=>({type:"md-u",children:parseInline(m[1],ctx)})},{re:/\+\+([^+\n]+)\+\+/y,build:(m,ctx)=>({type:"md-ins",children:parseInline(m[1],ctx)})},{re:/::circle\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>({type:"circle",children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx)})},{re:/::cross\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>({type:"cross",children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx)})},{re:/::stamp\[((?:\\.|[^\]\\])+)\](?:\(((?:\\.|[^)\\])+)\))?::/y,build:m=>({type:"stamp",text:m[1].replace(/\\(.)/g,"$1"),color:m[2]?m[2].replace(/\\(.)/g,"$1"):""})},{re:/::score\[([\d.]+)\]([+])?::/y,build:m=>({type:"score",value:parseFloat(m[1])||0,showNum:!!m[2]})},{re:/::wave\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>({type:"wave",children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx)})},{re:/::echo\[((?:\\.|[^\]\[\\])+)\]::/y,build:m=>({type:"echo",text:m[1].replace(/\\(.)/g,"$1")})},{re:/::neon\[((?:\\.|[^\]\\])+)\](?:\(((?:\\.|[^)\\])+)\))?::/y,build:m=>({type:"neon",text:m[1].replace(/\\(.)/g,"$1"),color:m[2]?m[2].replace(/\\(.)/g,"$1"):""})},{re:/::marker\[((?:\\.|[^\]\\])+)\](?:\(((?:\\.|[^)\\])+)\))?::/y,build:(m,ctx)=>({type:"marker",children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx),color:m[2]?m[2].replace(/\\(.)/g,"$1"):""})},{re:/::vert\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>({type:"vert",children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx)})},{re:/::cursor\[((?:\\.|[^\]\[\\])+)\]::/y,build:m=>({type:"cursor",text:m[1].replace(/\\(.)/g,"$1")})},{re:/::shadow\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>({type:"shadow",children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx)})},{re:/::blur\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>({type:"blur",children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx)})},{re:/::path\[((?:\\.|[^\]\[\\])+)\]::/y,build:m=>{const raw=m[1];const phGt="";const phPipe="";const safe=raw.replace(/\\>/g,phGt).replace(/\\\|/g,phPipe);return{type:"path",items:safe.split(">").map(s=>s.replace(new RegExp(phGt,"g"),">").replace(new RegExp(phPipe,"g"),"|").replace(/\\(.)/g,"$1").trim())}}},{re:/::shake\[((?:\\.|[^\]\\])+)\](?:\(((?:\\.|[^)\\])*)\))?::/y,build:(m,ctx)=>({type:"shake",children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx),args:m[2]!==undefined?m[2].replace(/\\(.)/g,"$1"):""})},{re:/::ap\[((?:\\.|[^\]\[\\])+)\]::/y,build:m=>({type:"anchor",target:m[1].replace(/\\(.)/g,"$1")})},{re:/::goto\[((?:\\.|[^\]\\])*)\]\(((?:\\.|[^)\\])+)\)::/y,build:m=>({type:"goto",label:m[1].replace(/\\(.)/g,"$1"),target:m[2].replace(/\\(.)/g,"$1")})},{re:/\^\[((?:\\.|[^\]\\])+)\]/y,build:(m,ctx)=>{const content=m[1].replace(/\\(.)/g,"$1");const key="__inline_note_"+(ctx.footnoteCount+1);const idx=footnoteIndex(ctx,key);ctx.footnoteDefs[idx]={key:key,content:content};return{type:"footnoteRef",index:idx}}},{re:/&(?:#(\d{1,7})|#[xX]([0-9a-fA-F]{1,6})|([a-zA-Z][a-zA-Z0-9]{1,31}));/y,build:m=>{const MAP={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ",copy:"©",reg:"®",trade:"™",hellip:"…",mdash:"—",ndash:"–",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",middot:"·",bull:"•",dagger:"†",Dagger:"‡",permil:"‰",prime:"′",Prime:"″",euro:"€",pound:"£",yen:"¥",cent:"¢",sect:"§",para:"¶",deg:"°",plusmn:"±",times:"×",divide:"÷",micro:"µ",laquo:"«",raquo:"»",lsaquo:"‹",rsaquo:"›",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ"};if(m[1]!==undefined){const cp=parseInt(m[1],10);if(cp===0||cp>=55296&&cp<=57343||cp>1114111)return{type:"text",value:"�"};if(cp>=0){try{return{type:"text",value:String.fromCodePoint(cp)}}catch(e){}}return{type:"text",value:m[0]}}if(m[2]!==undefined){const cp2=parseInt(m[2],16);if(cp2===0||cp2>=55296&&cp2<=57343||cp2>1114111)return{type:"text",value:"�"};if(cp2>=0){try{return{type:"text",value:String.fromCodePoint(cp2)}}catch(e){}}return{type:"text",value:m[0]}}if(m[3]&&MAP[m[3]])return{type:"text",value:MAP[m[3]]};return{type:"text",value:m[0]}}},{re:/(`+)(?!`)((?:(?!\1)[\s\S])*?)(?<!`)\1(?!`)\{([^{}\n]+)\}/y,build:m=>{const tokens=String(m[3]||"").trim().split(/\s+/).filter(Boolean);const RES={highlight:1,"no-highlight":1,hljs:1};let lang="",i,t,mm;for(i=0;i<tokens.length;i++){t=tokens[i];mm=t.match(/^(?:language|lang)=([\w+#.-]+)$/);if(mm){lang=mm[1];break}}if(!lang)for(i=0;i<tokens.length;i++){mm=tokens[i].match(/^:?\.language-([\w+#.-]+)$/);if(mm){lang=mm[1];break}}if(!lang)for(i=0;i<tokens.length;i++){mm=tokens[i].match(/^:?\.([\w+#.-]+)$/);if(mm&&!RES[mm[1]]){lang=mm[1];break}}if(!lang)for(i=0;i<tokens.length;i++){t=tokens[i];if(/^[\w+#.-]+$/.test(t)&&!RES[t]){lang=t;break}}if(!lang)return null;let v=m[2].replace(/\n/g," ");if(v.length>2&&v.charAt(0)===" "&&v.charAt(v.length-1)===" "){v=v.slice(1,-1)}return{type:"inlineCode",lang:lang.toLowerCase(),value:v}}},{re:/::badge\[((?:\\.|[^\]\\])*)\](?:\(((?:\\.|[^)\\])+)\))?(?:\{((?:\\.|[^}\\])+)\})?::/y,build:m=>{const attrs=m[3]?parseKV(m[3].replace(/\\([\[\]\\])/g,"$1")):{};if(m[2]){const cv=m[2].replace(/\\(.)/g,"$1");const c=resolveColor(cv)||cv.trim()||"#6b5acf";return{type:"badge",label:m[1].replace(/\\(.)/g,"$1"),color:c,url:attrs.url||"",attrs:attrs}}const b=parseBadge(m[1].replace(/\\([\[\]\\])/g,"$1"));return{type:"badge",label:b.label,color:b.color,url:b.url,attrs:attrs}}},{re:/::color\[((?:\\.|[^\]\\])+)\](?:\(((?:\\.|[^)\\])+)\))?[ \t]*([\s\S]*?)[ \t]*::(?!:)/y,build:(m,ctx)=>{if(m[2]){const cv=m[2].replace(/\\(.)/g,"$1");const c=resolveColor(cv)||cv.trim();return{type:"colorSpan",color:c,children:parseInline(m[1].replace(/\\(.)/g,"$1")+(m[3]||""),ctx)}}const cv=m[1].replace(/\\(.)/g,"$1");const c=resolveColor(cv)||cv.trim();return{type:"colorSpan",color:c,children:parseInline(m[3]||"",ctx)}}},{re:/::var\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>{const key=m[1].replace(/\\(.)/g,"$1");if(ctx.vars&&key in ctx.vars)return{type:"text",value:String(ctx.vars[key])};return{type:"text",value:m[0]}}},{re:/::use\[((?:\\.|[^\]\\])+)\](?:\(((?:\\.|[^)\\])*)\))?::/y,build:(m,ctx)=>{const __uname=m[1].replace(/\\(.)/g,"$1");if(!__uname||!ctx.macros||!ctx.macros[__uname])return{type:"text",value:m[0]};if((ctx.__macroDepth||0)>=8){if(!ctx.__warnings)ctx.__warnings=[];ctx.__warnings.push({type:"macro-depth",name:__uname});return{type:"text",value:m[0]}}const __mp={};if(m[2]){const __kv=parseKV(m[2].replace(/\\([\[\]\\])/g,"$1"));for(const __k in __kv){if(typeof __kv[__k]==="string")__mp[__k]=__kv[__k]}}const __sv=ctx.vars,__sm=ctx.macros,__st=ctx.meta;ctx.vars=Object.assign({},__sv,__mp);ctx.macros=Object.assign(Object.create(null),__sm);ctx.meta=__st?Object.assign(Object.create(null),__st):null;ctx.__macroDepth=(ctx.__macroDepth||0)+1;const __body=__sm[__uname].body;const __children=parseInline(__body,ctx);ctx.__macroDepth--;ctx.vars=__sv;ctx.macros=__sm;ctx.meta=__st;return __children}}];const DC_INLINE_NAMES={color:1,center:1,right:1,hei:1,key:1,copy:1,lang:1,term:1,ruby:1,qr:1,badge:1,style:1,btnimg:1,alt:1,ref:1,dot:1,pn:1,upper:1,lower:1,cap:1,note:1,cmd:1,flag:1,sup:1,sub:1,circle:1,cross:1,stamp:1,score:1,wave:1,echo:1,neon:1,marker:1,vert:1,cursor:1,shadow:1,blur:1,path:1,shake:1,goto:1,ap:1,date:1,var:1,use:1};const DC_INLINE_SPECIAL={date:/^::date\[[^\]]+\](?:\([^)]*\))?::/};const DC_INLINE_RULE_MAP=function(){const map={};for(let i=0;i<INLINE_RULES.length;i++){const src=INLINE_RULES[i].re.source;const m=/^::([a-z]+)/.exec(src);if(!m){const g=/^::\(([a-z|]+)\)/.exec(src);if(g){const names=g[1].split("|");for(let ni=0;ni<names.length;ni++){if(DC_INLINE_NAMES[names[ni]])map[names[ni]]={rule:INLINE_RULES[i],greedy:new RegExp("^"+src+"$")}}}}else if(DC_INLINE_NAMES[m[1]]){map[m[1]]={rule:INLINE_RULES[i],greedy:new RegExp("^"+src+"$")}}}return map}();function scanInlineDoubleColon(text,start){if(text.charAt(start)!==":"||text.charAt(start+1)!==":")return null;const len=text.length;const nm=/^::([a-z]+)/.exec(text.substring(start,Math.min(start+20,len)));if(!nm)return null;const name=nm[1];if(!DC_INLINE_NAMES[name])return null;let pos=start+2+name.length;const __cs=pos;while(pos<len){const idx=text.indexOf("::",pos);if(idx<0)return null;const after=idx+2;if(after>=len)return{name:name,contentStart:__cs,contentEnd:idx,endPos:after};const ch=text.charAt(after);if(ch===":"){pos=after+1;continue}if(!(ch>="a"&&ch<="z"))return{name:name,contentStart:__cs,contentEnd:idx,endPos:after};const nm2=/^([a-z]+)/.exec(text.substring(after,Math.min(after+20,len)));if(!nm2)return{name:name,contentStart:__cs,contentEnd:idx,endPos:after};const nestedName=nm2[1];if(DC_INLINE_SPECIAL[nestedName]){const spm=DC_INLINE_SPECIAL[nestedName].exec(text.substring(idx,Math.min(idx+500,len)));if(spm){pos=idx+spm[0].length;continue}return{name:name,contentStart:__cs,contentEnd:idx,endPos:after}}if(DC_INLINE_NAMES[nestedName]){const nested=scanInlineDoubleColon(text,idx);if(!nested)return null;pos=nested.endPos;continue}const __unk=/^[a-z]+\[[^\]]*\]::/.exec(text.substring(idx,Math.min(idx+500,len)));var __pf=text.substring(start,idx),__op=__pf.split("[").length-__pf.split("]").length+(__pf.split("{").length-__pf.split("}").length);if(__unk&&__op>0){pos=idx+__unk[0].length;continue}return{name:name,contentStart:__cs,contentEnd:idx,endPos:after}}return null}function __cmSkipCodeRun(text,i){var m=/^(`+)/.exec(text.slice(i));if(!m)return i+1;var run=m[1],e=text.indexOf(run,i+run.length);return e<0?text.length:e+run.length}function __cmBuildLabelCloses(text){const map=Object.create(null),stack=[];const len=text.length;let i=0;while(i<len){const c=text[i];if(c==="\\"){i+=2;continue}if(c==="`"){i=__cmSkipCodeRun(text,i);continue}if(c==="<"){const gt=text.indexOf(">",i+1);if(gt>=0){i=gt+1;continue}}if(c==="["){stack.push(i);i++;continue}if(c==="]"){if(stack.length){const p=stack.pop();if(map[p]===undefined)map[p]=i}i++;continue}if(c==="\n"&&text.charAt(i-1)==="\n")break;i++}return map}function __cmLabelClose(text,start){var out=[],depth=0,i=start+1;if(text.indexOf("]",start+1)<0)return out;while(i<text.length){var c=text[i];if(c==="\\"){i+=2;continue}if(c==="`"){i=__cmSkipCodeRun(text,i);continue}if(c==="<"){var gt=text.indexOf(">",i+1);if(gt>=0){i=gt+1;continue}}if(c==="["){depth++;i++;continue}if(c==="]"){if(depth===0)out.push(i);else depth--;i++;continue}if(c==="\n"&&text.charAt(i-1)==="\n")break;i++}return out}function __cmLabelBalanced(label){var depth=0,i=0;while(i<label.length){var c=label[i];if(c==="\\"){i+=2;continue}if(c==="`"){i=__cmSkipCodeRun(label,i);continue}if(c==="<"){var gt=label.indexOf(">",i+1);if(gt>=0){i=gt+1;continue}}if(c==="[")depth++;else if(c==="]"){if(depth===0)return false;depth--}i++}return depth===0}function __cmInlineDest(text,pos){var i=pos+1,len=text.length;while(i<len&&/[ \t\n]/.test(text[i]))i++;if(i>=len)return null;var href="";if(text[i]==="<"){i++;while(i<len&&text[i]!==">"){if(text[i]==="\\"&&i+1<len&&ESCAPABLE_CHARS.indexOf(text[i+1])>=0){href+=text[i+1];i+=2;continue}if(text[i]==="\n"||text[i]==="<")return null;href+=text[i];i++}if(i>=len)return null;i++}else{var dep=0;while(i<len){var c=text[i];if(c==="\\"&&i+1<len&&ESCAPABLE_CHARS.indexOf(text[i+1])>=0){href+=text[i+1];i+=2;continue}if(c==="("){dep++;href+=c;i++;continue}if(c===")"){if(dep===0)break;dep--;href+=c;i++;continue}if(/[ \t\n]/.test(c))break;href+=c;i++}}while(i<len&&/[ \t\n]/.test(text[i]))i++;var title="",hasTitle=false,closed=false;if(i<len&&(text[i]==='"'||text[i]==="'"||text[i]==="(")){var q=text[i]==="("?")":text[i];hasTitle=true;i++;var tdep=1;while(i<len){if(text[i]==="\\"&&i+1<len){title+=text[i+1];i+=2;continue}if(q===")"&&text[i]==="(")return null;if(text[i]===q){tdep--;i++;if(tdep===0){closed=true;break}title+=q;continue}title+=text[i];i++}if(!closed)return null;while(i<len&&/[ \t\n]/.test(text[i]))i++}if(text[i]!==")")return null;return{end:i+1,href:href.replace(/\n/g," "),title:title.replace(/\n/g," "),hasTitle:hasTitle}}function __cmHasLinkNode(nodes){for(var i=0;i<nodes.length;i++){var n=nodes[i];if(!n||n.nodeName!=="#text"&&!n.type)continue;var t=n.type||n.nodeName;if(t==="link"||t==="wikiLink"||t==="footnoteRef"||t==="autolink")return true;if(n.children&&__cmHasLinkNode(n.children))return true}return false}function __cmLinkLikeAt(text,start,ctx,isImage,closeMap){var p=isImage?start+1:start;if(text.charAt(p)!=="[")return null;if(text.indexOf("](",p+1)<0&&text.indexOf("][",p+1)<0&&(!ctx.refLinks||!Object.keys(ctx.refLinks).length))return null;var closes=closeMap&&closeMap[p]!==undefined?[closeMap[p]]:__cmLabelClose(text,p);for(var k=0;k<closes.length;k++){var close=closes[k],label=text.slice(p+1,close),after=close+1;if(!__cmLabelBalanced(label))continue;var href,title="",end,def=null;if(text.charAt(after)==="("){var d=__cmInlineDest(text,after);if(!d){if(text.charAt(after+1)==="[")continue;var __sd=ctx.refLinks[normalizeRefLabel(label.replace(/\\([\[\]\\])/g,"$1"))];if(!__sd)continue;href=__sd.url;title=__sd.title||"";end=after}else{href=d.href;title=d.title;end=d.end}}else if(text.charAt(after)==="["){var j=after+1,dep=0,refEnd=-1;while(j<text.length){var c=text[j];if(c==="\\"){j+=2;continue}if(c==="["){dep++;j++;continue}if(c==="]"){if(dep===0){refEnd=j;break}dep--;j++;continue}j++}if(refEnd<0)continue;var ref=text.slice(after+1,refEnd);if(!__cmLabelBalanced(ref))continue;def=ctx.refLinks[normalizeRefLabel((ref===""?label:ref).replace(/\\([\[\]\\])/g,"$1"))];if(!def)continue;href=def.url;title=def.title||"";end=refEnd+1}else{if(text.charAt(after)===":"&&p===0&&/^ {0,3}\[((?:\\.|[^\]\[\\])+)\]:[ \t]*(?:<([^>]*)>|(\S+))/.test(text))continue;def=ctx.refLinks[normalizeRefLabel(label.replace(/\\([\[\]\\])/g,"$1"))];if(!def)continue;href=def.url;title=def.title||"";end=after}if(isImage){var alt=extractTextFromNodes(parseInline(label,ctx,true));return{len:end-start,node:{type:"image",alt:alt,src:href,title:title||"",width:"",height:""}}}var kids=parseInline(label,ctx,true);if(__cmHasLinkNode(kids))continue;return{len:end-start,node:{type:"link",href:href,autolink:false,title:title||"",children:kids}}}return null}var __RE_GFM_MAILTO=/(mailto|xmpp):([A-Za-z0-9.!#$%&'*+\/=?^_`{|}~-]+@[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*)(\/[^\s\/<>"']*)?/iy;var __RE_GFM_EMAIL=/[A-Za-z0-9.!#$%&'*+\/=?^_`{|}~-]+@[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/y;function __cmGfmAutoAt(text,i,ctx){if(ctx.config.autolink===false)return null;if(i>0&&/[A-Za-z0-9._%+\-]/.test(text.charAt(i-1)))return null;if(!/[A-Za-z0-9.!#$%&'*+\/=?^_`{|}~-]/.test(text.charAt(i)))return null;__RE_GFM_MAILTO.lastIndex=i;var m=__RE_GFM_MAILTO.exec(text);if(m&&m.index===i){var after=text.charAt(i+m[0].length);if(after==="-"||after==="_")return null;var scheme=m[1].toLowerCase();var path=scheme==="mailto"?"":m[3]||"";var len=scheme.length+1+m[2].length+path.length;var shown=m[0].slice(0,len);var full=scheme+":"+m[2]+path;return{len:len,node:{type:"link",href:full,autolink:true,title:"",children:[{type:"text",value:shown}]}}}__RE_GFM_EMAIL.lastIndex=i;var e=__RE_GFM_EMAIL.exec(text);if(e&&e.index===i){var a2=text.charAt(i+e[0].length);if(a2==="-"||a2==="_"||a2==="@"||a2==="+")return null;return{len:e[0].length,node:{type:"link",href:"mailto:"+e[0],autolink:true,title:"",children:[{type:"text",value:e[0]}]}}}return null}var AUTOLINK_RULE={re:/(?<![A-Za-z0-9_\/.\-])(?<!<)(?<!\[)(?<!\]\()(?<!["'])(?<![A-Za-z0-9_-]=)((?:https?:\/\/|www\.)[^\s<>"'\u3000-\u303F\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\u200B-\u200D\uFEFF\u2260`|{}^]+)/iy,build:function(m,ctx){if(ctx.config.autolink===false)return null;var raw=m[1],cand=raw,changed=true;while(changed&&cand.length>0){changed=false;var ch=cand.charAt(cand.length-1);if(/[\u4e00-\u9fa5]/.test(ch)){var __pe=cand.indexOf("://");var __h0=__pe!==-1?__pe+3:0;var __sl=cand.indexOf("/",__h0);var __he=__sl===-1?cand.length:__sl;var __ps=cand.length-1;if(__ps>=__he)break;var __qh=Math.max(cand.indexOf("?"),cand.indexOf("#"));var __rs=__ps;while(__rs>__h0&&/[\u4e00-\u9fa5]/.test(cand.charAt(__rs-1)))__rs--;if(__qh!==-1&&__rs>__qh)break;if(/[\u4e00-\u9fa5]/.test(cand.slice(__h0,__rs)))break;cand=cand.slice(0,-1);changed=true;continue}if(ch==="#"){cand=cand.slice(0,-1);changed=true;continue}if(ch===";"&&/&[A-Za-z][A-Za-z0-9]{1,31};$/.test(cand)){cand=cand.replace(/&[A-Za-z][A-Za-z0-9]{1,31};$/,"");changed=true;continue}if(/[!"'*,.:?_~`|]/.test(ch)){cand=cand.slice(0,-1);changed=true;continue}if(ch===")"){var o=0,c=0;for(var i=0;i<cand.length;i++){if(cand.charAt(i)==="(")o++;else if(cand.charAt(i)===")")c++}if(c>o){cand=cand.slice(0,-1);changed=true;continue}}if(ch==="]"){cand=cand.slice(0,-1);changed=true;continue}}if(m.index>0&&m.input.charAt(m.index-1)==="<"&&/^\s*>/.test(m.input.slice(m.index+m[0].length)))return{type:"text",value:m[0]};if(!cand||!/^(?:https?:\/\/|www\.).+/i.test(cand)){return{type:"text",value:m[0]}}var tail=raw.slice(cand.length),href=cand,isHttp=/^https?:\/\//i.test(cand);if(!isHttp)href="http://"+cand;var res=[{type:"link",href:href,autolink:isHttp,title:"",children:[{type:"text",value:cand}]}];if(tail)res.push({type:"text",value:tail});return res}};var CRITIC_RULES=[{re:/\{\+\+([\s\S]+?)\+\+\}/y,build:function(m,ctx){return{type:"criticAdd",children:parseInline(m[1],ctx)}}},{re:/\{--([\s\S]+?)--\}/y,build:function(m,ctx){return{type:"criticDel",children:parseInline(m[1],ctx)}}},{re:/\{~~([\s\S]+?)~>([\s\S]+?)~~\}/y,build:function(m,ctx){return{type:"criticReplace",oldContent:parseInline(m[1],ctx),newContent:parseInline(m[2],ctx)}}},{re:/\{==([\s\S]+?)==\}/y,build:function(m,ctx){return{type:"criticHighlight",children:parseInline(m[1],ctx)}}},{re:/\{>>([\s\S]+?)<<\}/y,build:function(m){return{type:"criticComment",text:m[1].trim()}}}];var RULES_BY_CHAR={"[":[{re:/\[\[([^\[\]\n]+?)\]\]/y,build:(m,ctx)=>{if(ctx.config.wikilink===false)return null;const raw=m[1];if(m.index>0&&m.input.charAt(m.index-1)==="[")return null;if(m.input.charAt(m.index+m[0].length)==="]")return null;if(ctx.refLinks&&ctx.refLinks[normalizeRefLabel(raw)])return null;const pipe=raw.indexOf("|");let target,label;if(pipe>=0){target=raw.slice(0,pipe).trim();label=raw.slice(pipe+1).trim()}else{target=raw.trim();label=raw.trim()}if(!target||target.toLowerCase()==="toc")return null;return{type:"wikiLink",target:target,label:label}}},{re:/\[\^((?:\\.|[^\]\\])+)\]/y,build:(m,ctx)=>{if(!ctx.config.footnote)return null;const key=m[1].replace(/\\(.)/g,"$1");const idx=footnoteIndex(ctx,key);return{type:"footnoteRef",index:idx}}},INLINE_RULES[0]],"<":[{re:/<!--(?!>|->)(?:(?!--)[\s\S])*?(?<!-)-->/y,build:function(m){return{type:"html",value:m[0]}}},{re:/<\?[\s\S]*?\?>/y,build:function(m){return{type:"html",value:m[0]}}},{re:/<!\[CDATA\[[\s\S]*?\]\]>/y,build:function(m){return{type:"html",value:m[0]}}},{re:/<![A-Z][^>]*>/y,build:function(m){return{type:"html",value:m[0]}}},INLINE_RULES[1],INLINE_RULES[2],INLINE_RULES[3]],"!":[{re:/!\[((?:\\.|[^\[\]])+)\](?!\[|\(|:)/y,build:(m,ctx)=>{const label=normalizeRefLabel(m[1].replace(/\\([\[\]\\])/g,"$1"));const def=ctx.refLinks[label];if(!def)return null;return{type:"image",alt:m[1].replace(/\\(.)/g,"$1"),src:def.url,title:def.title||"",width:"",height:""}}},INLINE_RULES[4],INLINE_RULES[5],INLINE_RULES[6],INLINE_RULES[7]],"`":[INLINE_RULES[66],INLINE_RULES[8]],":":[INLINE_RULES[9]],$:[INLINE_RULES[10]],"*":[INLINE_RULES[11],INLINE_RULES[13]],_:[INLINE_RULES[12],INLINE_RULES[14]],"~":[INLINE_RULES[15],INLINE_RULES[18]],"=":[INLINE_RULES[16]],"^":[INLINE_RULES[64],INLINE_RULES[17]],"%":[INLINE_RULES[24]],"@":[INLINE_RULES[46]],"+":[INLINE_RULES[47]],"&":[INLINE_RULES[65]],"{":CRITIC_RULES,h:[AUTOLINK_RULE],H:[AUTOLINK_RULE],w:[AUTOLINK_RULE],W:[AUTOLINK_RULE]};function splitAbbr(text,abbrs){const keys=Object.keys(abbrs).sort((a,b)=>b.length-a.length);const result=[];let i=0;const isWordChar=c=>c!==""&&/[A-Za-z0-9_+#]/.test(c);while(i<text.length){if(text.charAt(i)==="\\"&&i+1<text.length){result.push({type:"text",value:text.charAt(i+1)});i+=2;continue}let matched=null;for(let k=0;k<keys.length;k++){const key=keys[k];if(text.substr(i,key.length).toLowerCase()===key){const bd=i===0?true:!isWordChar(text.charAt(i-1));const ad=i+key.length>=text.length?true:!isWordChar(text.charAt(i+key.length));if(bd&&ad){matched=key;break}}}if(matched){result.push({type:"abbr",text:text.substr(i,matched.length),title:abbrs[matched]});i+=matched.length}else{const start=i;i++;while(i<text.length){if(text.charAt(i)==="\\"&&i+1<text.length){i+=2;continue}let found=false;for(let k2=0;k2<keys.length;k2++){const key2=keys[k2];if(text.substr(i,key2.length).toLowerCase()===key2){const bd2=!isWordChar(text.charAt(i-1));const ad2=i+key2.length>=text.length?true:!isWordChar(text.charAt(i+key2.length));if(bd2&&ad2){found=true;break}}}if(found)break;i++}result.push({type:"text",value:text.slice(start,i)})}}return result}function __cmDcGreedyMatch(text,start,dc,entry){const fullText=text.substring(start,dc.endPos);const ph="";let store=[],out=fullText.substring(0,dc.contentStart-start),p=dc.contentStart;while(p<dc.endPos-2){if(text.charAt(p)===":"&&text.charAt(p+1)===":"){const nd=scanInlineDoubleColon(text,p);if(nd&&nd.endPos<=dc.endPos-2){store.push(text.slice(p,nd.endPos));out+=ph;p=nd.endPos;continue}}out+=text.charAt(p);p++}out+=fullText.substring(dc.endPos-2-start);let m=entry.greedy.exec(out);if(!m)return null;m=Array.prototype.slice.call(m);m[0]=fullText;for(let k=1;k<m.length;k++){if(typeof m[k]==="string"&&m[k].indexOf(ph)>=0)m[k]=m[k].replace(new RegExp(ph,"g"),()=>store.shift()||"")}return m}function parseInline(text,ctx,noAbbr){ctx.__cmDepth=(ctx.__cmDepth||0)+1;if(ctx.__cmDepth>32){ctx.__cmDepth--;return[{type:"text",value:String(text)}]}try{let __emSaves=null;const nodes=[];let buf="";let i=0;const len=text.length;let __lastGt=-2,__validStarClose=null,__validStarCloseIdx=0;const __labelCloses=len>1e3?__cmBuildLabelCloses(text):null;if(len>1e3){__lastGt=text.lastIndexOf(">");if(text.indexOf("*")!==-1){__validStarClose=[];for(let __si=1;__si<len;__si++){if(text.charCodeAt(__si)===42){const __sp=text.charCodeAt(__si-1);if(__sp!==32&&__sp!==9&&__sp!==10&&__sp!==13){const __sn=__si+1<len?text.charCodeAt(__si+1):0;if(__sn!==42)__validStarClose.push(__si)}}}}}const flush=()=>{if(buf){const __pos=i-buf.length;const __tn={type:"text",value:buf,_pos:__pos};if(ctx.hasAbbr&&!noAbbr&&ctx.config.abbr){const pa=splitAbbr(buf,ctx.abbrs);for(let pi=0;pi<pa.length;pi++){pa[pi]._pos=__pos;nodes.push(pa[pi])}}else{nodes.push(__tn)}buf=""}};while(i<len){const ch=text[i];const __ga=__cmGfmAutoAt(text,i,ctx);if(__ga){flush();nodes.push(__ga.node);i+=__ga.len;continue}if(ch==="["||ch==="!"){const __lk=__cmLinkLikeAt(text,i,ctx,ch==="!",__labelCloses);if(__lk){flush();nodes.push(__lk.node);i+=__lk.len;continue}}if(ch==="\\"&&i+1<len&&ESCAPABLE_CHARS.indexOf(text[i+1])>=0){const __nc=text[i+1];buf+=""+String.fromCharCode(57600+ESCAPABLE_CHARS.indexOf(__nc));i+=2;continue}if(ch===":"&&text[i+1]===":"){const dc=scanInlineDoubleColon(text,i);if(dc){const dcEntry=DC_INLINE_RULE_MAP[dc.name];if(dcEntry){const fullText=text.substring(i,dc.endPos);const dm=__cmDcGreedyMatch(text,i,dc,dcEntry);if(dm){const dcNode=dcEntry.rule.build(dm,ctx);if(dcNode!==null){if(Array.isArray(dcNode)){flush();for(let __dj=0;__dj<dcNode.length;__dj++){dcNode[__dj]._md=fullText;nodes.push(dcNode[__dj])}i=dc.endPos;continue}if(isNodeAllowed(dcNode.type,dcNode,ctx)){flush();dcNode._md=fullText;nodes.push(dcNode);i=dc.endPos;continue}else{flush();buf+=text.slice(i,dc.endPos);i=dc.endPos;continue}}}}}}if(ch==="<"&&__lastGt>=-1&&i>__lastGt){buf+="<";i++;continue}let __skipStar13=false;if(ch==="*"&&__validStarClose){while(__validStarCloseIdx<__validStarClose.length&&__validStarClose[__validStarCloseIdx]<=i){__validStarCloseIdx++}if(__validStarCloseIdx>=__validStarClose.length)__skipStar13=true}let rules=RULES_BY_CHAR[ch];if(ch==="*"||ch==="_")rules=null;if(!rules){const start=i;i++;while(i<len){const c=text[i];if(c==="\\"||RULES_BY_CHAR[c])break;i++}buf+=text.slice(start,i);continue}let matched=false;for(let r=0;r<rules.length;r++){const rule=rules[r];if(!rule)continue;if(__skipStar13&&rule===INLINE_RULES[13])continue;rule.re.lastIndex=i;const m=rule.re.exec(text);if(m&&m.index===i){const node=rule.build(m,ctx);if(node===null)continue;if(!Array.isArray(node)&&!isNodeAllowed(node.type,node,ctx)){if(node.type==="html"&&m[0]){flush();nodes.push({type:"text",value:m[0],noSmart:true});i+=m[0].length;matched=true;break}continue}flush();if(Array.isArray(node)){for(let ni=0;ni<node.length;ni++)nodes.push(node[ni])}else{nodes.push(node)}i+=m[0].length;matched=true;break}}if(matched)continue;buf+=text[i];i++}flush();var __res=__cmEmRescue(nodes,text);__cmRestoreSaves(__res,__emSaves);return __res}finally{ctx.__cmDepth--}}function splitSuffix(raw){const m=raw.match(/\s+(\\?)([\^!~?*]+)$/);if(!m)return{text:raw,suffix:""};const prefix=raw.slice(0,m.index);if(m[1]==="\\")return{text:prefix+" "+m[2],suffix:""};return{text:prefix,suffix:m[2]}}function extractHeadingParts(raw){let cur=raw,suffix="",attrs=null,sub="";for(let k=0;k<5;k++){let changed=false;if(!attrs){const a=splitAttrs(cur);if(a.attrs){attrs=a.attrs;cur=a.text;changed=true}}if(!suffix){const s=splitSuffix(cur);if(s.suffix){suffix=s.suffix;cur=s.text;changed=true}}if(!sub){const sepIdx=cur.indexOf("-=>");if(sepIdx!==-1){sub=cur.slice(sepIdx+3).trim();cur=cur.slice(0,sepIdx).trim();changed=true}}if(!changed)break}return{text:cur,suffix:suffix,attrs:attrs,sub:sub}}function pushHeading(ctx,nodes,hDepth,hChildren,suffix,attrs,sub){const hText=extractTextFromNodes(hChildren);let hId=attrs&&attrs.id?attrs.id:slugify(hText);if(!hId||!/[\p{L}\p{N}\p{M}_]/u.test(hId))hId="h"+hDepth+"-"+(ctx.headings.length+1);if(ctx.usedSlugs[hId]){ctx.usedSlugs[hId]++;hId=hId+"-"+ctx.usedSlugs[hId]}else{ctx.usedSlugs[hId]=1}suffix=suffix||"";if(suffix.indexOf("^")===-1&&!ctx.inContainer)ctx.headings.push({depth:hDepth,id:hId,text:hText,suffix:suffix});let num="";let foldInit=null;if(attrs&&attrs.fold)foldInit=true;else if(attrs&&attrs.nofold)foldInit=false;const shouldNum=ctx.config.headnum||attrs&&typeof attrs.no==="string";if(shouldNum&&hDepth>=2&&hDepth<=6){const slot=hDepth-2;const no=attrs?attrs.no:null;if(no===""){ctx.headnumCounter[slot]++;for(let r=slot+1;r<5;r++)ctx.headnumCounter[r]=0;num=""}else if(typeof no==="string"&&no){const noParts=no.split(".");for(let nk=0;nk<5;nk++)ctx.headnumCounter[nk]=0;for(let nk1=0;nk1<noParts.length&&nk1<5;nk1++)ctx.headnumCounter[nk1]=parseInt(noParts[nk1],10)||0;num=no}else{ctx.headnumCounter[slot]++;for(let r2=slot+1;r2<5;r2++)ctx.headnumCounter[r2]=0;const segs=[];for(let s2=0;s2<=slot;s2++)segs.push(ctx.headnumCounter[s2]);num=segs.join(ctx.config.headnumsep!==undefined?ctx.config.headnumsep:".")}}nodes.push({type:"heading",depth:hDepth,id:hId,children:hChildren,suffix:suffix,cls:attrs&&attrs.cls?attrs.cls:[],num:num,foldInit:foldInit,sub:sub||""})}function __cmBqCanLazy(quoted){if(!quoted.length)return true;var last=quoted[quoted.length-1];if(!last||!last.trim())return false;var s=last;var depth=0;while(depth<32&&/^ {0,3}>/.test(s)){s=s.replace(/^ {0,3}>[ \t]?/,"");depth++}if(!s||!s.trim())return false;if(/^(?: {4,}|\t)/.test(s))return false;if(/^ {0,3}(`{3,}|~{3,})/.test(s))return false;return true}function __cmLazyBlockStart(s){if(isThematicBreak(s))return true;return/^(?: {0,3}(?:#{1,6}\s|>|`{3,}|~{3,}|:::[a-z]|[-*+]\s|\d+[.)]\s|(?=[ivxlcdm])m{0,4}(?:cm|cd|d?c{0,3})(?:xc|xl|l?x{0,3})(?:ix|iv|v?i{0,3})[.)]\s|(-{3,}|_{3,}|\*{3,})[ \t]*$|\$\$|\s*\|)| {0,3}(?:<!--|<\?|<!\[CDATA\[|<![A-Z])| {0,3}<\/?(?: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|h[1-6]|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)(?:\s|\/?>))/i.test(s)}function __cmLazyLeafStart(s){if(isThematicBreak(s)||/^ {0,3}(=+|-+)[ \t]*$/.test(s))return true;return/^(?: {0,3}(?:#{1,6}\s|`{3,}|~{3,}|(-{3,}|_{3,}|\*{3,})[ \t]*$|\$\$)| {4,}|\t| {0,3}(?:<!--|<\?|<!\[CDATA\[|<![A-Z])| {0,3}<\/?(?: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|h[1-6]|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)(?:\s|\/?>))/i.test(s)}function __cmRefContLine(prev,cur){if(typeof prev!=="string"||typeof cur!=="string")return false;let p=prev;for(let z=0;z<8;z++){const np=p.replace(/^(?: {0,3}>[ \t]?| {0,3}(?:[-*+]|\d{1,9}[.)])[ \t]+)+/,"");if(np===p)break;p=np}const m=p.match(/^ {0,3}\[((?:\\.|[^\]\[\\])+)\]:[ \t]*(.*)$/);if(!m)return false;const rest=m[2].trim();if(!rest)return cur.trim()!==""&&/^[ \t]*(?:<[^>]*>|\S+)(?:[ \t]+(?:"[^"]*"|'[^']*'|\([^)]*\)))?[ \t]*$/.test(cur);if(/^(?:<[^>]*>|\S+)$/.test(rest))return/^[ \t]*(?:"[^"]*"|'[^']*'|\([^)]*\))[ \t]*$/.test(cur);return false}function __cmApplySoftBreaks(nodes,brk){var out=[];for(var i=0;i<nodes.length;i++){var n=nodes[i];if(n&&n.type==="text"&&typeof n.value==="string"&&n.value.indexOf("\n")>=0){var ps=n.value.split("\n");for(var j=0;j<ps.length;j++){if(j>0)out.push(brk?{type:"break"}:{type:"text",value:" "});if(ps[j]){var c={};for(var kk in n)c[kk]=n[kk];c.value=ps[j];out.push(c)}}}else{if(n&&n.children)n.children=__cmApplySoftBreaks(n.children,brk);if(n&&typeof n.value==="string"&&n.value.indexOf("\n")>=0)n.value=n.value.replace(/\n/g," ");out.push(n)}}return out}function parseBlocks(source,ctx){ctx.__blockDepth=(ctx.__blockDepth||0)+1;if(ctx.__blockDepth>100){ctx.__blockDepth--;return{type:"root",children:[{type:"paragraph",children:parseInline(source,ctx)}]}}try{const lines=source.split("\n").map(function(l){if(l.indexOf("\t")===-1)return l;let out="",col=0;for(let k=0;k<l.length;k++){if(l[k]==="\t"){const n=4-col%4;out+=" ".repeat(n);col+=n}else{out+=l[k];col++}}return out});const nodes=[];let para=[];let listStack=[];let i=0;const flushPara=()=>{if(!para.length)return;const children=[];let __ph=false;const __cmPara=__cmMergeParaLines(para);var __xem=false;if(__cmPara.lines.length===2){var __l0=__cmPara.lines[0],__l1=__cmPara.lines[1];var __m0=__l0.match(/^(\*\*?|__?)(?!\s)/),__m1=__l1.match(/(\*\*?|__?)$/);if(__m0&&__m1&&__m0[1]===__m1[1])__xem=true}if(__xem){var __j=__cmPara.lines[0].replace(/(?: {2,}|\\)$/,"").replace(/ +$/,"")+" "+__cmPara.lines[1].replace(/^[ \t]+/,"");var __jn=parseInline(__j,ctx);for(var __z=0;__z<__jn.length;__z++)children.push(__jn[__z]);__cmPara.lines=[]}const __groups=[];let __cur=null;for(let k=0;k<__cmPara.lines.length;k++){let __p=__cmPara.lines[k];let __hard=false;if(k<__cmPara.lines.length-1&&__p.charCodeAt(__p.length-1)===92){__hard=true;__p=__p.slice(0,-1)}else if(k<__cmPara.lines.length-1&&__p.length>=2&&__p.charCodeAt(__p.length-1)===32&&__p.charCodeAt(__p.length-2)===32){__hard=true;__p=__p.replace(/ +$/,"")}__p=__p.replace(/^[ \t]+/,"").replace(/\uE003/g,"");if(!__cur||__hard){__cur={text:__p,hard:__hard};__groups.push(__cur)}else{__cur.text+="\n"+__p}}for(let g=0;g<__groups.length;g++){if(g>0&&__groups[g].hard)children.push({type:"break"});const inl=parseInline(__groups[g].text,ctx);const __ad=__cmApplySoftBreaks(inl,ctx.config.breaks);for(const n of __ad)children.push(n)}if(ctx.config.autocollage&&children.length>0){let __ok=true;const __imgs=[];for(let __i=0;__i<children.length;__i++){const __ch=children[__i];if(__ch.type==="image"){if(__ch.width||__ch.height){__ok=false;break}__imgs.push(__ch)}else if(__ch.type==="text"&&/^\s*$/.test(__ch.value||"")){}else if(__ch.type==="break"){}else{__ok=false;break}}if(__ok&&__imgs.length>=2){const __lay=__imgs.length<=4?String(__imgs.length):"multi";nodes.push({type:"collage",layout:__lay,items:__imgs.map(im=>({alt:im.alt||"",src:im.src,title:im.title||"",width:"",height:""}))});para=[];return}}let __blankPara=true;for(let __bpi=0;__bpi<children.length;__bpi++){const __bpn=children[__bpi];if(!__bpn)continue;const __bpt=__bpn.type;if(__bpt==="mdComment")continue;if(__bpt==="break")continue;if(__bpt==="text"&&(!__bpn.value||!__bpn.value.trim()))continue;__blankPara=false;break}if(!__blankPara){nodes.push({type:"paragraph",children:children})}para=[]};const endList=()=>{listStack=[]};const endAll=()=>{endList();flushPara()};while(i<lines.length){const line=lines[i];if(line===""||(line.charCodeAt(0)===32||line.charCodeAt(0)===9)&&line.trim()===""){if(ctx.config.blanklines&&!listStack.length){let __bl=0;while(i<lines.length&&(lines[i]===""||(lines[i].charCodeAt(0)===32||lines[i].charCodeAt(0)===9)&&lines[i].trim()==="")){__bl++;i++}endAll();if(__bl>0){const __bmin=ctx.config.blankmin||1;if(__bl>=__bmin)nodes.push({type:"blankLines",count:__bl})}continue}let __nla=i+1;while(__nla<lines.length&&(lines[__nla]===""||(lines[__nla].charCodeAt(0)===32||lines[__nla].charCodeAt(0)===9)&&lines[__nla].trim()===""))__nla++;if(listStack.length&&__nla<lines.length){const __nl=lines[__nla];const __lm=__nl.match(/^(\s*)([-*+]|\d+[.)]|(?=[ivxlcdm])m{0,4}(?:cm|cd|d?c{0,3})(?:xc|xl|l?x{0,3})(?:ix|iv|v?i{0,3})[.)])\s+/i);if(__lm){const __nInd=__lm[1].length;const __top=listStack[listStack.length-1];const __mk=__lm[2];const __mb2=__mk.replace(/[.)]$/,"");const __rm2=/^(?=[ivxlcdm])m{0,4}(?:cm|cd|d?c{0,3})(?:xc|xl|l?x{0,3})(?:ix|iv|v?i{0,3})$/i.test(__mb2);const __ord2=__rm2||/^\d+[.)]$/.test(__mk);const __mt2=__rm2?__mb2===__mb2.toUpperCase()?"I":"i":__ord2?__mk.charAt(__mk.length-1):__mk;if(__nInd<__top.contentCol&&__ord2===__top.node.ordered&&__mt2===__top.node.mtype){__top.node.loose=true;i=__nla;continue}}}endAll();i++;continue}if(/^ {0,3}%%/.test(line)){const __cOpen=line.indexOf("%%"),__cClose=line.indexOf("%%",__cOpen+2);if(__cClose===-1){endAll();let __cbj=i+1,__cfound=false;while(__cbj<lines.length){const __cidx=lines[__cbj].indexOf("%%");if(__cidx!==-1){__cfound=true;lines[__cbj]=lines[__cbj].slice(__cidx+2);i=__cbj;break}__cbj++}if(!__cfound)i=__cbj;continue}}const __c0=line.charCodeAt(0);if((__c0>=65&&__c0<=90||__c0>=97&&__c0<=122||__c0>=128)&&!/^(\s*)(?=[ivxlcdm])m{0,4}(?:cm|cd|d?c{0,3})(?:xc|xl|l?x{0,3})(?:ix|iv|v?i{0,3})[.)]\s/i.test(line)){const __nx=lines[i+1];const __setext=__nx&&/^ {0,3}(=+|-+)[ \t]*$/.test(__nx);const __def=__nx&&/^:\s+/.test(__nx);const __tbl=__nx&&line.indexOf("|")!==-1&&/^[\s:|-]*\|[\s:|-]*$/.test(__nx.trim())&&/-/.test(__nx);if(!__setext&&!__def&&!__tbl){if(listStack.length)endList();para.push(line);i++;continue}}if(!listStack.length&&i+1<lines.length&&/^ {0,3}(=+|-+)[ \t]*$/.test(lines[i+1])&&!isThematicBreak(line)&&!/^( |\t)/.test(line)&&!/^ {0,3}([-*+]|\d+[.)])\s/.test(line)&&!/^ {0,3}#{1,6}\s/.test(line)&&line.charCodeAt(0)!==62&&!/^:::/.test(line)&&!/^\|/.test(line)&&!/^ {0,3}(`{3,}|~{3,})/.test(line)&&!/^ {0,3}\[(?:\\.|[^\]\\])+\]:/.test(line)){const setextDepth=lines[i+1].trim().charAt(0)==="="?1:2;const __setextText=para.length?para.concat([line]).join("\n"):line;para=[];endAll();const __hp2=extractHeadingParts(__setextText);pushHeading(ctx,nodes,setextDepth,parseInline(__hp2.text,ctx),__hp2.suffix,__hp2.attrs,__hp2.sub);i+=2;continue}if(ctx.config.html){const __hb1=line.match(/^ {0,3}<(script|pre|style|textarea)(?:\s|>|$)/i),__hb2=line.match(/^ {0,3}<!--/),__hb3=line.match(/^ {0,3}<\?/),__hb4=line.match(/^ {0,3}<![A-Z]/),__hb5=line.match(/^ {0,3}<!\[CDATA\[/),__hb6=line.match(/^ {0,3}<\/?([a-z][a-z0-9-]*)(?:\s|\/?>|$)/),__hb7=line.match(/^ {0,3}(<[a-zA-Z][a-zA-Z0-9-]*(?:\s+[a-zA-Z_:][a-zA-Z0-9_.:-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>\x60]+))?)*\s*\/?>|<\/[a-zA-Z][a-zA-Z0-9-]*\s*>)\s*$/);if(__hb1||__hb2||__hb3||__hb4||__hb5){endAll();let __endPat=null;if(__hb1)__endPat=new RegExp("</"+__hb1[1].toLowerCase()+">","i");else if(__hb2)__endPat=/-->/;else if(__hb3)__endPat=/\?>/;else if(__hb5)__endPat=/\]\]>/;else __endPat=/>/;const __bL=[line];if(!__endPat.test(line)){let __bj=i+1;while(__bj<lines.length){__bL.push(lines[__bj]);if(__endPat.test(lines[__bj])){__bj++;break}__bj++;if(__bj-i>500)break}i=__bj}else{i++}nodes.push({type:"htmlBlock",raw:__bL.join("\n")});continue}if(__hb6&&BLOCK_TAGS_SET[__hb6[1]]&&!listStack.length){endAll();const __bL2=[line];let __bj2=i+1;while(__bj2<lines.length){if(lines[__bj2].trim()==="")break;__bL2.push(lines[__bj2]);__bj2++;if(__bj2-i>500)break}i=__bj2;nodes.push({type:"htmlBlock",raw:__bL2.join("\n")});continue}if(__hb7&&!para.length&&!listStack.length){const __tg=__hb7[1].match(/<\/?([a-zA-Z][a-zA-Z0-9-]*)/)[1];if(!BLOCK_TAGS_SET[__tg]){endAll();const __bL3=[line];let __bj3=i+1;while(__bj3<lines.length){if(lines[__bj3].trim()==="")break;__bL3.push(lines[__bj3]);__bj3++;if(__bj3-i>500)break}i=__bj3;nodes.push({type:"htmlBlock",raw:__bL3.join("\n")});continue}}}if(!listStack.length&&para.length&&__cmHasHardBreak(para[para.length-1])&&!__cmLazyBlockStart(line)&&!isThematicBreak(line)){para.push(line.replace(/^[ \t]+/,""));i++;continue}if(!para.length&&/^( |\t)/.test(line)){if(listStack.length)endList();endAll();const codeLines=[];let cj=i;while(cj<lines.length){const cl=lines[cj];if(cl.trim()===""){let ck=cj+1;while(ck<lines.length&&lines[ck].trim()==="")ck++;if(ck<lines.length&&/^( |\t)/.test(lines[ck])){for(let cm=cj;cm<ck;cm++)codeLines.push("");cj=ck;continue}else break}else if(/^( |\t)/.test(cl)){codeLines.push(cl.replace(/^( |\t)/,""));cj++}else break}if(ctx.config.codeblocktrim!==false)while(codeLines.length&&codeLines[codeLines.length-1]==="")codeLines.pop();if(codeLines.length)nodes.push({type:"codeBlock",lang:"",code:codeLines.join("\n")});i=cj;continue}let m;m=line.match(/^(\s*)(`{3,}|~{3,})([^ \t]*)(?:[ \t]+(.+?))?[ \t]*$/);if(m&&(m[2].charAt(0)!=="`"||((m[3]||"")+(m[4]||"")).indexOf("`")<0)){const indent=m[1];const fenceChar=m[2].charAt(0);const fenceLen=m[2].length;const lang=m[3];const fenceMeta=m[4]||"";const closeRe=new RegExp("^[ \t]{0,"+Math.max(3,indent.length)+"}"+escapeRe(fenceChar)+"{"+fenceLen+",}[ \t]*$");let j=i+1;while(j<lines.length&&!closeRe.test(lines[j]))j++;if(true){j=Math.min(j,lines.length);endAll();let __rawLines=lines.slice(i+1,j);if(indent){const __fenceStrip=new RegExp("^ {1,"+indent.length+"}");__rawLines=__rawLines.map(__rl=>__rl.replace(__fenceStrip,""))}let __rawCode=__rawLines.join("\n");if(ctx.config.codeblocktrim!==false)__rawCode=__rawCode.replace(/^\n+|\n+$/g,"");const __marks={},__cleanLines=[];const __cl=__rawCode.split("\n");for(let __ci=0;__ci<__cl.length;__ci++){const __cm=__cl[__ci].match(/\s*(?:\/\/|#|--|<!--)\s*\[!code\s+([^\]]+)\]\s*(?:-->)?\s*$/);if(__cm){__marks[__ci+1]={type:"_codeMark",mark:__cm[1].trim()};__cleanLines.push(__cl[__ci].replace(/\s*(?:\/\/|#|--|<!--)\s*\[!code\s+[^\]]+\]\s*(?:-->)?\s*$/,""))}else{__cleanLines.push(__cl[__ci])}}nodes.push({type:"codeBlock",lang:lang,meta:fenceMeta,marks:Object.keys(__marks).length?__marks:null,code:__cleanLines.join("\n")});i=j+1;continue}}m=line.match(/^:::([a-z]+)([+\-_~]*)[ \t]*([^\n]*)$/);if(m&&RE_OPEN.test(line)){const cType=m[1].toLowerCase();const cMod=m[2]||"";const cPlus=cMod.indexOf("+")>=0;const cSilent=cMod.indexOf("~")>=0;const cTitle=m[3].trim();const cRes=scanContainer(lines,i+1,cType,false);endAll();const __savedIC=ctx.inContainer;ctx.inContainer=cType==="meta"?false:true;const __cn=buildContainer(cType,cPlus,cTitle,cRes.body,ctx,cMod);ctx.inContainer=__savedIC;if(__cn.type==="cfg"){const __c=__cn.config;applyArticleConfig(ctx,__c);nodes.push(__cn);i=cRes.next;continue}if(cRes.closed===false&&!cSilent){__cn.unclosed=true;if(!ctx.__warnings)ctx.__warnings=[];ctx.__warnings.push({type:"unclosed",line:i+1,container:cType})}nodes.push(__cn);i=cRes.next;continue}if(ctx.config.math&&/^\$\$[ \t]*$/.test(line.trim())){endAll();const mlines=[];let mjj=i+1;while(mjj<lines.length&&!/^\$\$[ \t]*$/.test(lines[mjj].trim())){mlines.push(lines[mjj]);mjj++}if(mjj<lines.length){nodes.push({type:"mathBlock",value:mlines.join("\n")});i=mjj+1;continue}}m=ctx.config.math?line.match(/^\$\$([^\n]+?)\$\$[ \t]*$/):null;if(m){endAll();nodes.push({type:"mathBlock",value:m[1].trim()});i++;continue}if(ctx.config.toc&&/^\[\[toc\]\]$/i.test(line.trim())){endAll();nodes.push({type:"toc"});i++;continue}m=ctx.config.footnote?line.match(/^\[\^([^\]]+)\]:\s*(.*)/):null;if(m){endAll();const idx=footnoteIndex(ctx,m[1]);let fContent=m[2];let fj=i+1;while(fj<lines.length&&/^( {2,}|\t)/.test(lines[fj])){fContent+="\n"+lines[fj].replace(/^( {1,4}|\t)/,"");fj++}ctx.footnoteDefs[idx]={key:m[1],content:fContent};i=fj;continue}const __rmk=line.match(/^ {0,3}(\*?)\[((?:\\.|[^\]\[\\])+)\]:/);if(__rmk){const __rk=normalizeRefLabel(__rmk[2].replace(/\\([\[\]\\])/g,"$1"));const __span=ctx.__refDefSpan&&ctx.__refDefSpan[__rk];const __nxDef=lines[i+1];const __rdRest=line.slice(__rmk[0].length).trim();const __rdOK=!!__rdRest||__nxDef!==undefined&&!/^ {0,3}(?:>|[-*+]|\d{1,9}[.)])/.test(__nxDef)&&/^\s*(?:<[^>]*>|\S+)(?:[ \t]+(?:"[^"]*"|'[^']*'|\([^)]*\)))?[ \t]*$/.test(__nxDef);if((__rmk[1]==="*"||ctx.refLinks[__rk])&&__rdOK){endAll();if(__span&&__span.start===i&&__span.text===line&&__span.endText===lines[__span.end]){i=__span.end+1;var __dt0=0;while(i<lines.length&&__dt0<3&&/^\s+(?:<?[^\s>]+>?(?:[ \t]+(?:"[^"]*"|'[^']*'|\([^)]*\)))?|(?:"[^"]*"|'[^']*'|\([^)]*\)))[ \t]*$/.test(lines[i])){i++;__dt0++}}else{i++;var __dt=0;while(i<lines.length&&__dt<3&&/^\s+(?:<?[^\s>]+>?(?:[ \t]+(?:"[^"]*"|'[^']*'|\([^)]*\)))?|(?:"[^"]*"|'[^']*'|\([^)]*\)))[ \t]*$/.test(lines[i])){i++;__dt++}}continue}}if(/^ {0,3}>/.test(line)){endAll();const quoted=[];quoted.push(line.replace(/^ {0,3}>[ \t]?/,""));i++;while(i<lines.length){const ql=lines[i];if(/^ {0,3}>/.test(ql)){quoted.push(ql.replace(/^ {0,3}>[ \t]?/,""));i++;continue}if(ctx.config.lazycontinuation&&__cmBqCanLazy(quoted)&&ql.trim()!==""&&quoted.length&&quoted[quoted.length-1].trim()!==""&&!/^(?: {0,3}(?:#{1,6}\s|>|`{3,}|~{3,}|:::[a-z]|[-*+]\s|\d+[.)]\s|(?=[ivxlcdm])m{0,4}(?:cm|cd|d?c{0,3})(?:xc|xl|l?x{0,3})(?:ix|iv|v?i{0,3})[.)]\s|(-{3,}|_{3,}|\*{3,})[ \t]*$|\$\$|\s*\|)| {0,3}(?:<!--|<\?|<!\[CDATA\[|<![A-Z])| {0,3}<\/?(?: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|h[1-6]|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)(?:\s|\/?>))/i.test(ql)&&!isThematicBreak(ql)){if(/^ {0,3}(=+|-+)[ \t]*$/.test(ql))quoted.push(""+ql);else quoted.push(ql);i++;continue}break}const __qm=quoted[0]&&quoted[0].match(/^\[!([a-zA-Z][a-zA-Z0-9_-]*)\]([+\-])?[ \t]*(.*)$/);if(__qm){const __ct=__qm[1].toLowerCase();if(CALLOUT_MAP[__ct]){const __cmod=__qm[2]||"";const __ctitle=__qm[3]||"";const __cbody=quoted.slice(1).join("\n");nodes.push({type:"callout",variant:__ct,title:__ctitle,icon:"",color:"",children:parseBlocks(__cbody,ctx).children,open:__cmod==="+"?true:__cmod==="-"?false:undefined});continue}}nodes.push({type:"blockquote",children:parseBlocks(quoted.join("\n"),ctx).children});continue}m=line.match(/^ {0,3}(#{1,6})(?!#)(?:[ \t]+(.*)|[ \t]*$)/);if(m){endAll();var __atx=(m[2]||"").replace(/^#+$/,"").replace(/[ \t]+#+[ \t]*$/,"");var __hp=extractHeadingParts(__atx);pushHeading(ctx,nodes,m[1].length,parseInline(__hp.text,ctx),__hp.suffix,__hp.attrs,__hp.sub);i++;continue}m=line.match(/^ {0,3}---[ \t]+(.+?)[ \t]+---(?:[ \t]+\{([^}]+)\})?[ \t]*$/);if(m){let __t=m[1],__a={};if(m[2]){m[2].replace(/(\w+)=(\w+)/g,(_,k,v)=>{__a[k]=v})}endAll();nodes.push({type:"hrText",style:"solid",text:__t,attrs:__a});i++;continue}m=line.match(/^ {0,3}\*\*\*[ \t]+(.+?)[ \t]+\*\*\*(?:[ \t]+\{([^}]+)\})?[ \t]*$/);if(m){let __t2=m[1],__a2={};if(m[2]){m[2].replace(/(\w+)=(\w+)/g,(_,k,v)=>{__a2[k]=v})}endAll();nodes.push({type:"hrText",style:"dashed",text:__t2,attrs:__a2});i++;continue}if(/^ {0,3}[*_-]/.test(line)&&isThematicBreak(line)){endAll();nodes.push({type:"thematicBreak"});i++;continue}if(ctx.config.gfm&&ctx.config.table&&line.indexOf("|")!==-1&&i+1<lines.length&&/^[\s:|-]*\|[\s:|-]*$/.test(lines[i+1].trim())&&/-/.test(lines[i+1])&&__cmTableDelimOK(line,lines[i+1])){let __cap="";if(para.length===1){const __tm=para[0].match(/^Table:\s*(.*)$/i);if(__tm){__cap=__tm[1].trim();para=[]}}else if(para.length===0&&nodes.length>0){const __last=nodes[nodes.length-1];if(__last.type==="paragraph"&&__last.children.length===1&&__last.children[0].type==="text"){const __tm2=__last.children[0].value.match(/^Table:\s*(.*)$/i);if(__tm2){__cap=__tm2[1].trim();nodes.pop()}}}endAll();const tRows=[];let tj=i;while(tj<lines.length){const tl=lines[tj].trim();if(tl.indexOf("|")===-1){if(tl===""||/^ {0,3}(?:#{1,6}\s|>|[*`~]|\[|-{3,}|_{3,}|\*{3,})/.test(tl))break}let row=tl;if(row.charAt(0)==="|")row=row.slice(1);if(row.charAt(row.length-1)==="|")row=row.slice(0,-1);tRows.push(row);tj++}if(tRows.length>=2){const __tbl=buildTable(tRows,ctx);__tbl.caption=__cap.replace(/\s*\{sort\}\s*$/i,"");__tbl.sortable=/\{sort\}/i.test(__cap);nodes.push(__tbl)}i=tj;continue}m=line.match(/^( {0,3})([-*+]|\d{1,9}[.)]|(?=[ivxlcdm])m{0,4}(?:cm|cd|d?c{0,3})(?:xc|xl|l?x{0,3})(?:ix|iv|v?i{0,3})[.)])(?:[ \t]+(.*)|[ \t]*$)/i);if(m){if(para.length&&/^\d{1,9}[.)]$/.test(m[2])&&parseInt(m[2],10)!==1){para.push(line);i++;continue}if(!m[3]&&para.length){para.push(line);i++;continue}flushPara();const lIndent=m[1].length;const marker=m[2];let lContent=m[3]||"";const __spm=line.slice(m[1].length+marker.length).match(/^[ \t]*/);const __sp=__spm?__spm[0].length:0;const __mw=marker.length+(m[3]===undefined||m[3]===""?1:__sp>4?1:__sp||1);if(__sp>4)lContent=new Array(__sp).join(" ")+lContent;const taskMatch=ctx.config.tasklist?lContent.match(/^\[([ xX])\]\s+(.*)/):null;const checked=taskMatch?taskMatch[1].toLowerCase()==="x":null;const itemText=taskMatch?taskMatch[2]:lContent;const __mb=marker.replace(/[.)]$/,"");const roman=/^(?=[ivxlcdm])m{0,4}(?:cm|cd|d?c{0,3})(?:xc|xl|l?x{0,3})(?:ix|iv|v?i{0,3})$/i.test(__mb)?__mb===__mb.toUpperCase()?"I":"i":"";const ordered=roman?true:/^\d+[.)]$/.test(marker);const mtype=roman||(ordered?marker.charAt(marker.length-1):marker);const contentCol=lIndent+__mw;const subLines=[];let jj=i+1;while(jj<lines.length){const nl=lines[jj];const nm=nl.match(/^(\s*)/);const nIndent=nm?nm[1].length:0;if(nl.trim()===""){if(itemText.replace(/\s/g,"")==="")break;let __kk=jj;while(__kk<lines.length&&lines[__kk].trim()==="")__kk++;if(__kk<lines.length){const afm=lines[__kk].match(/^(\s*)/);const afIndent=afm?afm[1].length:0;if(afIndent>=lIndent+__mw){while(jj<__kk){subLines.push("");jj++}continue}}break}if(/^ {0,3}(?:[-*+]|\d{1,9}[.)])[ \t]*$/.test(nl))break;if(nIndent>=lIndent+__mw){var __sl=nl.slice(lIndent+__mw);if(__cmRefContLine(subLines.length?subLines[subLines.length-1]:itemText,__sl))__sl=nl;subLines.push(__sl);jj++;continue}if(ctx.config.lazycontinuation&&itemText.replace(/\s/g,"")!==""&&!__cmLazyBlockStart(nl)&&!__cmLazyLeafStart(subLines.length?subLines[subLines.length-1]:itemText)){var __lzn=nl.trim();if(/^(?:[-*+]|\d+[.)])\s/.test(__lzn))__lzn="\\"+__lzn;if(__cmRefContLine(subLines.length?subLines[subLines.length-1]:itemText,__lzn))__lzn=nl;if(/^ {0,3}(=+|-+)[ \t]*$/.test(__lzn))__lzn=""+__lzn;subLines.push(__lzn);jj++;continue}break}let item;if(subLines.length===0){const __subAst=parseBlocks(itemText,ctx);if(__subAst.children.length===1&&__subAst.children[0].type==="paragraph"){item={type:"listItem",checked:checked,inline:__subAst.children[0].children,list:null}}else{item={type:"listItem",checked:checked,children:__subAst.children,list:null}}}else{const subAst=parseBlocks(itemText+"\n"+subLines.join("\n"),ctx);item={type:"listItem",checked:checked,children:subAst.children,list:null};if(__cmSubLoose(subLines,itemText))item.__looseSelf=true}if(!listStack.length){const rootList={type:"list",ordered:ordered,mtype:mtype,start:roman?null:ordered?parseInt(marker,10):null,roman:roman,task:checked!==null,items:[item]};listStack.push({node:rootList,contentCol:contentCol,listIndent:lIndent});nodes.push(rootList)}else{while(listStack.length>1&&lIndent<listStack[listStack.length-1].listIndent){listStack.pop()}const top=listStack[listStack.length-1];if(!top){const newList={type:"list",ordered:ordered,mtype:mtype,start:roman?null:ordered?parseInt(marker,10):null,roman:roman,task:checked!==null,items:[item]};listStack.push({node:newList,contentCol:contentCol,listIndent:lIndent});nodes.push(newList)}else if(lIndent>=top.contentCol){const newList={type:"list",ordered:ordered,mtype:mtype,start:roman?null:ordered?parseInt(marker,10):null,roman:roman,task:checked!==null,items:[item]};listStack.push({node:newList,contentCol:contentCol,listIndent:lIndent});const parentItem=top.node.items[top.node.items.length-1];if(parentItem)parentItem.list=newList;else nodes.push(newList)}else if(top.node.ordered!==ordered||top.node.mtype!==mtype){listStack.pop();var parent=listStack[listStack.length-1];var newList={type:"list",ordered:ordered,mtype:mtype,start:roman?null:ordered?parseInt(marker,10):null,roman:roman,task:checked!==null,items:[item]};listStack.push({node:newList,contentCol:contentCol,listIndent:lIndent});if(parent){var pItem=parent.node.items[parent.node.items.length-1];if(pItem)pItem.list=newList;else nodes.push(newList)}else{nodes.push(newList)}}else{top.node.items.push(item);top.contentCol=contentCol}}i=jj;continue}if(!listStack.length&&i+1<lines.length&&/^:\s+/.test(lines[i+1])&&line.trim()&&!/^[ \t]/.test(line)&&!/^::/.test(line)){endAll();const term=parseInline(line.trim(),ctx);const defs=[];i++;while(i<lines.length&&/^:\s+/.test(lines[i])){let __d=lines[i].replace(/^:\s+/,"");i++;while(i<lines.length&&/^( {2,}|\t)/.test(lines[i])&&!/^:\s+/.test(lines[i])){__d+="\n"+lines[i].replace(/^( {1,4}|\t)/,"");i++}defs.push(parseInline(__d.replace(/\n/g,"<br>"),ctx))}while(i<lines.length&&lines[i].trim()==="")i++;nodes.push({type:"definitionList",term:term,defs:defs});continue}if(listStack.length)endList();para.push(line);i++}endAll();return{type:"root",children:nodes}}finally{ctx.__blockDepth--}}function parseCalloutHeader(arg){const opts={title:"",icon:"",color:""};if(!arg)return opts;const prot=[];const s=String(arg).replace(/"([^"]*)"/g,(_,inner)=>{prot.push(inner);return"\0"+(prot.length-1)+"\0"});const toks=s.split(/\s+/).filter(Boolean);const titleToks=[];for(const t of toks){const pm=t.match(/^\u0000(\d+)\u0000$/);if(pm){titleToks.push(prot[parseInt(pm[1],10)]);continue}const im=t.match(/^icon=(\S+)$/);if(im){opts.icon=im[1];continue}const cm=t.match(/^color=(\S+)$/);if(cm){opts.color=cm[1];continue}titleToks.push(t)}opts.title=titleToks.join(" ").trim();return opts}function parseBgHeader(raw){const result={text:"",opacity:null,scale:null,blur:null,rotate:null,color:"",repeat:false};if(!raw)return result;const prot=[];const s=String(raw).replace(/"((?:\\.|[^"\\])*)"/g,(_,inner)=>{prot.push(inner.replace(/\\([\[\]\\])/g,"$1"));return"\0"+(prot.length-1)+"\0"});const toks=s.split(/\s+/).filter(Boolean);const PARAM_KEYS={opacity:1,scale:1,blur:1,rotate:1,color:1,repeat:1};const rest=[];let textFound=false;for(const t of toks){const pm=t.match(/^\u0000(\d+)\u0000$/);if(pm){if(!textFound){result.text=prot[parseInt(pm[1],10)];textFound=true}continue}const kv=t.match(/^([a-zA-Z]+)=(.*)$/);if(kv&&PARAM_KEYS[kv[1].toLowerCase()]){rest.push(t);continue}if(t.toLowerCase()==="repeat"&&!textFound){rest.push(t);continue}if(!textFound&&t.indexOf("=")===-1){result.text=t;textFound=true;continue}rest.push(t)}for(const r of rest){const m=r.match(/^([a-zA-Z]+)=(.*)$/);if(m){const k=m[1].toLowerCase(),v=m[2];if(k==="opacity"){const ov=parseFloat(v);if(isFinite(ov))result.opacity=Math.max(0,Math.min(1,ov))}else if(k==="scale"){const sv=parseFloat(v);if(isFinite(sv))result.scale=Math.max(.1,Math.min(20,sv))}else if(k==="blur"){const bv=parseFloat(v);if(isFinite(bv))result.blur=Math.max(0,Math.min(40,bv))}else if(k==="rotate"){const rv=parseFloat(v);if(isFinite(rv))result.rotate=Math.max(-360,Math.min(360,rv))}else if(k==="color"){const cv=resolveColor(v);if(cv)result.color=cv}}else if(r.toLowerCase()==="repeat"){result.repeat=true}}if(result.text.length>200)result.text=result.text.slice(0,200);return result}function __matchEnv(conds,ctx){const env=ctx.env||{};let any=false;for(const k in conds){any=true;const want=String(conds[k]).toLowerCase();if(k==="mode"){if(want==="ssr"&&!ctx.isSSR)return false;if(want==="client"&&ctx.isSSR)return false;if(want==="print"&&env.mode!=="print")return false;if(want==="screen"&&env.mode==="print")return false;continue}if(k==="lang"){const el=String(env.lang||ctx.langKey||"").toLowerCase();if(el!==want&&el.indexOf(want+"-")!==0)return false;continue}if(k==="role"){const roles=env.roles||(env.role?[env.role]:[]);let ok=false;for(let i=0;i<roles.length;i++){if(String(roles[i]).toLowerCase()===want){ok=true;break}}if(!ok)return false;continue}const ev=String(env[k]===undefined?"":env[k]).toLowerCase();if(ev!==want)return false}return any}function buildContainer(type,plus,title,raw,ctx,mod){if(type==="cfg"){const cMd=":::cfg"+(plus?"+":"")+(title?" "+title:"")+"\n"+raw+"\n:::";return{type:"cfg",config:parseCfg(raw),_md:cMd}}if(type==="when"||type==="if"){const __w=parseKV(title||"");const __wk=Object.keys(__w);if(!__wk.length){if(!ctx.__warnings)ctx.__warnings=[];ctx.__warnings.push({type:"when-empty"});return{type:"fragment",children:parseBlocks(raw,ctx).children}}if(__matchEnv(__w,ctx)){return{type:"fragment",children:parseBlocks(raw,ctx).children}}return{type:"fragment",children:[]}}if(type==="print"){if(__matchEnv({mode:"print"},ctx)){return{type:"fragment",children:parseBlocks(raw,ctx).children}}return{type:"fragment",children:[]}}if(type==="screen"){if(__matchEnv({mode:"screen"},ctx)){return{type:"fragment",children:parseBlocks(raw,ctx).children}}return{type:"fragment",children:[]}}if(type==="ssr"){if(__matchEnv({mode:"ssr"},ctx)){return{type:"fragment",children:parseBlocks(raw,ctx).children}}return{type:"fragment",children:[]}}if(type==="client"){if(__matchEnv({mode:"client"},ctx)){return{type:"fragment",children:parseBlocks(raw,ctx).children}}return{type:"fragment",children:[]}}if(type==="let"){if(!ctx.vars)ctx.vars=Object.create(null);const __seen=Object.create(null);raw.split("\n").forEach(l=>{l=l.trim();if(!l||l.charAt(0)==="#")return;const mm=l.match(/^([\w\u4e00-\u9fa5.$-]+)\s*[=:]\s*(.*)$/);if(mm){if(__seen[mm[1]]&&ctx.__warnings)ctx.__warnings.push({type:"let-override",key:mm[1]});__seen[mm[1]]=true;ctx.vars[mm[1]]=mm[2].trim()}});return{type:"fragment",children:[]}}if(type==="macro"){const __mk=parseKV(title||"");let __mname=__mk.name||"";if(!__mname){const __mtk=(title||"").trim();if(__mtk&&!/=/.test(__mtk))__mname=__mtk}if(!__mname)return{type:"fragment",children:[]};if(!ctx.macros)ctx.macros=Object.create(null);ctx.macros[__mname]={body:raw};return{type:"fragment",children:[]}}if(type==="use"){const __uk=parseKV(title||"");if(!(title||"").trim()&&raw){raw.split("\n").forEach(function(__ul){__ul=__ul.trim();const __um=__ul.match(/^([A-Za-z_][\w-]*)\s*[:=]\s*(.*)$/);if(__um)__uk[__um[1]]=__um[2].trim()})}let __uname=__uk.name||"";if(!__uname){const __utk=(title||"").trim();if(__utk&&!/=/.test(__utk))__uname=__utk}if(!__uname||!ctx.macros||!ctx.macros[__uname])return{type:"fragment",children:[]};if((ctx.__macroDepth||0)>=8){if(!ctx.__warnings)ctx.__warnings=[];ctx.__warnings.push({type:"macro-depth",name:__uname});return{type:"fragment",children:[]}}const __mp={};for(const __uk2 in __uk){if(__uk2!=="name"&&typeof __uk[__uk2]==="string")__mp[__uk2]=__uk[__uk2]}const __sv=ctx.vars,__sm=ctx.macros,__st=ctx.meta;ctx.vars=Object.assign({},__sv,__mp);ctx.macros=Object.assign(Object.create(null),__sm);ctx.meta=__st?Object.assign(Object.create(null),__st):null;ctx.__macroDepth=(ctx.__macroDepth||0)+1;const __useFrag={type:"fragment",children:parseBlocks(__sm[__uname].body,ctx).children};ctx.__macroDepth--;ctx.vars=__sv;ctx.macros=__sm;ctx.meta=__st;return __useFrag}if(type==="meta"){if(ctx.inContainer){if(!ctx.__warnings)ctx.__warnings=[];ctx.__warnings.push({type:"meta-in-container"});return{type:"fragment",children:[]}}if(!ctx.meta)ctx.meta=Object.create(null);if(!ctx.vars)ctx.vars=Object.create(null);raw.split("\n").forEach(l=>{l=l.trim();if(!l||l.charAt(0)==="#")return;let idx=l.indexOf(":");if(idx<0)idx=l.indexOf(":");if(idx<0)return;const k=l.slice(0,idx).trim();const v=l.slice(idx+1).trim();if(!k)return;ctx.meta[k]=v;ctx.vars["meta."+k]=v});return{type:"fragment",children:[]}}if(type==="fig"){if(!ctx.figIndex)ctx.figIndex=Object.create(null);ctx.figCount=(ctx.figCount||0)+1;const __fs=slugify(title||"fig-"+ctx.figCount);if(ctx.figIndex[__fs]===undefined)ctx.figIndex[__fs]=ctx.figCount;return{type:"figure",num:ctx.figCount,slug:__fs,title:title||"",children:parseBlocks(raw,ctx).children}}if(type==="tbl"){if(!ctx.tblIndex)ctx.tblIndex=Object.create(null);ctx.tblCount=(ctx.tblCount||0)+1;const __ts=slugify(title||"tbl-"+ctx.tblCount);if(ctx.tblIndex[__ts]===undefined)ctx.tblIndex[__ts]=ctx.tblCount;return{type:"tblBlock",num:ctx.tblCount,slug:__ts,title:title||"",children:parseBlocks(raw,ctx).children}}if(type==="eq"){if(!ctx.eqIndex)ctx.eqIndex=Object.create(null);ctx.eqCount=(ctx.eqCount||0)+1;const __ekey=String(ctx.eqCount);ctx.eqIndex[__ekey]=ctx.eqCount;return{type:"eqBlock",num:ctx.eqCount,key:__ekey,title:title||"",text:raw.trim()}}if(type==="dl"){const dlF={};let dlFn=title||"";const dlSums=[];const __SUMS={sha256:64,sha512:128,sha384:96,sha1:40,md5:32,crc32:8,xxh3:16,blake3:64,blake2b:128};raw.split("\n").forEach(l=>{const t=l.trim();if(!t)return;const idx=t.indexOf(":");if(idx>0){const k=t.slice(0,idx).trim().toLowerCase();const v=t.slice(idx+1).trim();if(!v)return;const __nk=k.replace(/[-_]/g,"");if(__SUMS[__nk]){dlSums.push({algo:__nk,expected:__SUMS[__nk],value:v})}else{dlF[k]=v}}else if(!dlFn){dlFn=t}});for(const __s of dlSums){const __hc=__s.value.replace(/[\s:-]/g,"").toLowerCase();if(!/^[0-9a-f]+$/.test(__hc)){if(!ctx.__warnings)ctx.__warnings=[];ctx.__warnings.push({type:"dl-hash-invalid",algo:__s.algo,value:__s.value.slice(0,16)})}else if(__hc.length!==__s.expected){if(!ctx.__warnings)ctx.__warnings=[];ctx.__warnings.push({type:"dl-hash-length",algo:__s.algo,expected:__s.expected,actual:__hc.length})}}return{type:"dl",filename:dlFn,url:dlF.url||"",size:dlF.size||"",date:dlF.date||"",verify:dlF.verify||"",icon:dlF.icon||"",checksums:dlSums}}if(type==="chartbar"){const __isStack=/^\s*stack=yes\b/i.test(title);const __cleanTitle=__isStack?title.replace(/^\s*stack=yes\s*/i,"").trim():title;if(__isStack){const cbStack=[];raw.split("\n").forEach(l=>{const t=l.trim();if(!t)return;const idx=t.indexOf(":");if(idx<0)return;const lbl=t.slice(0,idx).trim();const rest=t.slice(idx+1).trim();const segs=[];rest.split(/\s+/).forEach(function(p){const eq=p.indexOf("=");if(eq>0){const name=p.slice(0,eq).trim();const val=parseFloat(p.slice(eq+1));if(name&&isFinite(val)&&val>=0)segs.push({name:name,value:val})}});if(lbl&&segs.length)cbStack.push({label:lbl,segments:segs})});return{type:"chartbar",title:__cleanTitle,items:cbStack,stacked:true}}const cbItems=[];raw.split("\n").forEach(l=>{const t=l.trim();if(!t)return;const idx=t.indexOf(":");if(idx<0)return;const lbl=t.slice(0,idx).trim();const vStr=t.slice(idx+1).trim(),cleanStr=vStr.replace(/[元人民币美元欧元英镑日元港币块钱整钱$¥€£¥]/g,"").trim(),vm=cleanStr.match(/^([+-]?\d+(?:\.\d+)?(?:e[+-]?\d+)?)\s*(.*)$/i);if(lbl&&vm){const num=parseFloat(vm[1]),unit=(vm[2]||"").toLowerCase().trim();const U={"千":1e3,"万":1e4,"十万":1e5,"百万":1e6,"千万":1e7,"亿":1e8,"十亿":1e9,"百亿":1e10,"千亿":1e11,"万亿":1e12,"兆":1e12,"京":1e16,"垓":1e20,"秭":1e24,"穰":1e28,"沟":1e32,"涧":1e36,"正":1e40,"载":1e44,"极":1e48,"恒河沙":1e52,"阿僧祇":1e56,"那由他":1e60,"不可思议":1e64,"无量大数":1e68,"古戈尔":1e100,k:1e3,m:1e6,b:1e9,t:1e12,q:1e15,qi:1e18,s:1e21,sp:1e24,o:1e27,n:1e30,d:1e33,g:1e9,p:1e15,e:1e18,z:1e21,y:1e24};const m=U[unit]||1;cbItems.push({label:lbl,value:num*m,raw:vStr})}});return{type:"chartbar",title:title||"",items:cbItems}}if(type==="chartline"){const clLines=raw.split("\n");const clRows=[];let clLT=[];for(let cli=0;cli<clLines.length;cli++){const cl=clLines[cli].trim();if(!cl)continue;const lm=cl.match(/^lines\s*[::]\s*(.+)$/i);if(lm){clLT=lm[1].split(",").map(s=>s.trim().toLowerCase());continue}if(cl.indexOf("|")!==-1){let clean=cl;if(clean.charAt(0)==="|")clean=clean.slice(1);if(clean.charAt(clean.length-1)==="|")clean=clean.slice(0,-1);clRows.push(clean)}}if(clRows.length<2)return{type:"fragment",children:[]};const clHeaders=splitRow(clRows[0]);const clAlignCells=splitRow(clRows[1]);const clHasAlign=clAlignCells.every(c=>/^:?-+:?$/.test(c.c));const clStart=clHasAlign?2:1;const clLabels=[];const clSeries=[];for(let clci=0;clci<clHeaders.length-1;clci++)clSeries.push({name:clHeaders[clci+1].c,data:[]});for(let clri=clStart;clri<clRows.length;clri++){const cells=splitRow(clRows[clri]);if(!cells.length)continue;clLabels.push(cells[0].c||"");for(let clsi=0;clsi<clSeries.length;clsi++){clSeries[clsi].data.push(parseFloat(cells[clsi+1]?cells[clsi+1].c:"")||0)}}for(let clti=0;clti<clSeries.length;clti++){clSeries[clti].type=clLT[clti]==="dashed"?"dashed":"solid"}return{type:"chartline",title:title||"",labels:clLabels,series:clSeries}}if(type==="bg"){const bgCfg=parseBgHeader(title);return{type:"bg",text:bgCfg.text,opacity:bgCfg.opacity,scale:bgCfg.scale,blur:bgCfg.blur,rotate:bgCfg.rotate,color:bgCfg.color,repeat:bgCfg.repeat,children:parseBlocks(raw,ctx).children}}if(!ctx.config.containers){if(type==="collage"||ctx.config.stripcontainerchrome)return{type:"fragment",children:parseBlocks(raw,ctx).children};return{type:"fragment",children:[]}}if(type==="chat"&&!ctx.config.chat)return{type:"fragment",children:[]};if(type==="scr"&&!ctx.config.scr)return{type:"fragment",children:[]};if(CALLOUT_MAP[type]){const co=parseCalloutHeader(title);const __co_open=mod.indexOf("+")>=0?true:mod.indexOf("-")>=0?false:undefined;return{type:"callout",variant:type,title:co.title,icon:co.icon,color:co.color,children:parseBlocks(raw,ctx).children,open:__co_open}}if(type==="say"){return{type:"say",author:(title||"").trim(),children:parseBlocks(raw,ctx).children}}if(type==="swipe"){const imgs=[];for(const line of raw.split("\n")){const m=line.match(/!\[([^\]]*)\]\(([^)]+)\)/);if(m)imgs.push({alt:m[1],src:m[2]})}return{type:"swipe",imgs:imgs}}if(type==="detail"){return{type:"detail",open:plus,collapsed:mod.indexOf("-")>=0,hover:mod.indexOf("_")>=0,title:title||"",children:parseBlocks(raw,ctx).children}}if(type==="link"){const fields=Object.create(null);raw.split("\n").forEach(l=>{const idx=l.indexOf(":");if(idx>0){const k=l.slice(0,idx).trim().toLowerCase();const v=l.slice(idx+1).trim();if(k&&v)fields[k]=v}});if(!fields.url){return{type:"fragment",children:parseBlocks(raw,ctx).children}}return{type:"linkCard",big:title.toLowerCase()==="big",fields:fields}}if(type==="pbar"){const pf=Object.create(null);raw.split("\n").forEach(l=>{const idx=l.indexOf(":");if(idx>0){const k=l.slice(0,idx).trim().toLowerCase();const v=l.slice(idx+1).trim();if(k&&v)pf[k]=v}});if(pf.segments){const segs=[];pf.segments.split(",").forEach(function(s){const parts=s.trim().split("=");const pct=parseFloat(parts[0]);const rawC=(parts[1]||"").trim();const color=rawC?safeColor(rawC)||"#6b5acf":"#6b5acf";if(isFinite(pct)&&pct>0)segs.push({pct:pct,color:color})});if(!segs.length)return{type:"fragment",children:[]};let __tot=0;for(let __si=0;__si<segs.length;__si++)__tot+=segs[__si].pct;if(__tot>0){for(let __si2=0;__si2<segs.length;__si2++)segs[__si2].pct=segs[__si2].pct/__tot*100}return{type:"pbar",segments:segs,title:title}}const empty={type:"fragment",children:[]};if(pf.pct===undefined)return empty;const pct=Number(pf.pct);if(!isFinite(pct)||pct<0)return empty;let max=100,maxProvided=false;if(pf.max!==undefined){max=Number(pf.max);if(!isFinite(max)||max<0)return empty;maxProvided=true}if(max<=0)return empty;if(pct>max)return empty;let color=pf.color||"";if(color&&!/^(#[0-9a-fA-F]{3,8}|[a-zA-Z]{3,20})$/.test(color))color="";if(!color)color="#6b5acf";return{type:"pbar",pct:pct,max:max,maxProvided:maxProvided,color:color,showText:plus,title:title}}if(type==="tree"){return{type:"tree",data:parseTree(raw)}}if(type==="chat"){return parseChat(raw,ctx,title)}if(type==="users"){parseUserTable(raw.split("\n"),ctx.globalUsers);return{type:"fragment",children:[]}}if(type==="tabs"){const tabs=[];const tlines=raw.split("\n");let ti=0;while(ti<tlines.length){const tm=tlines[ti].match(/^:::tab[ \t]*(.*)$/);if(tm){const tTitle=tm[1].trim();const tRes=collectContainer(tlines,ti+1,"tab",true);tabs.push({title:tTitle,body:tRes.body});ti=tRes.next}else{ti++}}return{type:"tabs",tabs:tabs,plus:plus}}if(type==="timeline"){const globalColor=parseTimelineHeader(title);const items=[];const tls=raw.split("\n");for(let li=0;li<tls.length;li++){const rt=tls[li].trim();if(!rt)continue;const ps=rt.split("|").map(s=>s.trim());if(ps.length<2)continue;const date=ps[0],t=ps[1];let rest=ps.slice(2);let itemColor="";if(rest.length>=1){const last=rest[rest.length-1];const rc=resolveColor(last);if(rc){itemColor=rc;rest=rest.slice(0,-1)}}const desc=rest.join(" | ");items.push({date:date,title:t,desc:desc,color:itemColor})}return{type:"timeline",items:items,globalColor:globalColor,numbered:plus}}if(type==="grid"){const cols=title||"2";const cells=[];const glines=raw.split("\n");let gi=0;while(gi<glines.length){if(/^:::cell[ \t]*$/.test(glines[gi])){const cRes=collectContainer(glines,gi+1,"cell",true);cells.push(cRes.body);gi=cRes.next}else{gi++}}return{type:"grid",cols:cols,cells:cells}}if(type==="compare"){const panels=[];const plines=raw.split("\n");let pi=0;while(pi<plines.length){const pm=plines[pi].match(/^:::col(?:[ \t]+(.*))?$/);if(pm){const pc=parseCol(pm[1]||"");const pRes=collectContainer(plines,pi+1,"col",true);panels.push({title:pc.title,color:pc.color,body:pRes.body});pi=pRes.next}else{pi++}}return{type:"compare",panels:panels}}if(type==="mcq"){const mls=raw.split("\n");let mTitle="",mHint="",mOpen=null,mSel=[],mExpl="";const mOpts=[];const mExpls={specific:{},correct:"",wrong:"",fallback:""};const strip=s=>String(s).replace(/[.。.、))\]】]$/,"");for(const ml of mls){const mt=ml.trim();if(!mt)continue;let mm;mm=mt.match(/^\*\^\s*[::]\s*([\s\S]*)$/);if(mm){mExpls.correct=mm[1].trim();continue}mm=mt.match(/^-\^\s*[::]\s*([\s\S]*)$/);if(mm){mExpls.wrong=mm[1].trim();continue}mm=mt.match(/^\^([^\s::]+)\s*[::]\s*([\s\S]*)$/);if(mm){mExpls.specific[strip(mm[1])]=mm[2].trim();continue}mm=mt.match(/^\^\s*[::]\s*([\s\S]*)$/);if(mm){mExpl=mm[1].trim();continue}mm=mt.match(/^title\s*[::]\s*(.*)$/);if(mm){mTitle=mm[1].trim();continue}mm=mt.match(/^hint\s*[::]\s*([\s\S]*)$/);if(mm){mHint=mm[1].trim();continue}mm=mt.match(/^open\s*[::]?\s*(.*)$/);if(mm){const ov=mm[1].trim().toLowerCase();mOpen=ov===""||ov==="true"||ov==="yes"||ov==="1"||ov==="on";continue}mm=mt.match(/^sel\s*[::]\s*(.*)$/);if(mm){mSel=mm[1].trim().split(/[,\s,、]+/).map(strip).filter(Boolean);continue}mm=mt.match(/^([-*])\s+(.+)$/);if(mm){const cOK=mm[1]==="*";const cR=mm[2];const cSp=cR.indexOf(" ");let cM,cT;if(cSp>0){cM=cR.slice(0,cSp);cT=cR.slice(cSp+1).trim()}else{cM=cR;cT=""}cM=strip(cM);mOpts.push({marker:cM,text:cT,correct:cOK,expl:""})}}for(const mo of mOpts){if(mExpls.specific[mo.marker])mo.expl=mExpls.specific[mo.marker];else if(mo.correct&&mExpls.correct)mo.expl=mExpls.correct;else if(!mo.correct&&mExpls.wrong)mo.expl=mExpls.wrong;else if(mExpls.fallback)mo.expl=mExpls.fallback}const mCC=mOpts.filter(o=>o.correct).length;return{type:"mcq",title:mTitle,subtitle:title||"",options:mOpts,explanation:mExpl,hint:mHint,open:mOpen===null?!!plus:mOpen,sel:mSel,isMulti:mCC>1,display:plus}}if(type==="saq"){const sls=raw.split("\n");let sTitle="",sHint="",sAnswer="",sExplain="",sCur=null,sBuf=[];for(const st of sls){const sm=st.match(/^\s*(title|hint|answer|explain)\s*[::]\s*([\s\S]*)$/i);if(sm){if(sCur==="answer")sAnswer=sBuf.join("\n").trim();else if(sCur==="explain")sExplain=sBuf.join("\n").trim();sBuf=[];const sk=sm[1].toLowerCase(),sv=sm[2];if(sk==="title"){sTitle=sv.trim();sCur=null}else if(sk==="hint"){sHint=sv.trim();sCur=null}else if(sk==="answer"){sCur="answer";sBuf=[sv]}else{sCur="explain";sBuf=[sv]}continue}if(sCur)sBuf.push(st)}if(sCur==="answer")sAnswer=sBuf.join("\n").trim();else if(sCur==="explain")sExplain=sBuf.join("\n").trim();return{type:"saq",title:sTitle,subtitle:(title||"").trim(),hint:sHint,answer:sAnswer,explain:sExplain}}if(type==="key"){return{type:"keyBlock",value:raw.replace(/\n+/g," ").trim()}}if(type==="copy"){return{type:"copyBlock",value:raw.replace(/^\n+|\n+$/g,"")}}if(type==="hei"){return{type:"hei",children:parseInline(raw.replace(/\n+/g," ").trim(),ctx)}}if(type==="center"||type==="right"){return{type:"alignBlock",align:type,children:parseBlocks(raw,ctx).children}}if(type==="style"){return{type:"styleBlock",attrs:parseKV(stripBraces(title)),children:parseBlocks(raw,ctx).children}}if(type==="btnimg"){return{type:"btnImgBlock",attrs:parseKV(stripBraces(title)),lines:raw.split("\n").map(s=>s.trim()).filter(Boolean)}}if(type==="game"){var gf={};raw.split("\n").forEach(function(l){var m=l.match(/^([a-zA-Z_]\w*)\s*:\s*(.*)$/);if(m)gf[m[1].toLowerCase()]=m[2].trim()});return{type:"game",title:title,fields:gf}}if(type==="row"){var rl=raw.split("\n"),lb="",rb="",cur=null,dp=0;for(var ri=0;ri<rl.length;ri++){var ln=rl[ri];if(/^:::left\s*$/.test(ln)){cur="left";dp=1;continue}if(/^:::right\s*$/.test(ln)){cur="right";dp=1;continue}if(dp>0&&/^:::[a-z]/.test(ln))dp++;else if(dp>0&&/^:::\s*$/.test(ln)){dp--;if(dp===0){cur=null;continue}}if(cur==="left")lb+=ln+"\n";else if(cur==="right")rb+=ln+"\n"}var rs="",rv=false;var sm=(title||"").match(/^(\d+):(\d+)(?:\s+(reverse|right))?$/);if(sm){rs=sm[1]+"-"+sm[2];if(sm[3]==="reverse"||sm[3]==="right")rv=true}return{type:"row",split:rs,reverse:rv,left:lb.trim(),right:rb.trim()}}if(type==="box"){var kv=parseKV(title);var bs=kv.square||title.trim().toLowerCase()==="square"?"square":kv.round||title.trim().toLowerCase()==="round"?"round":"";return{type:"box",shape:bs,tl:kv.tl||"",tr:kv.tr||"",bl:kv.bl||"",br:kv.br||"",children:parseBlocks(raw,ctx).children}}if(type==="blur"){return{type:"blurBlock",children:parseBlocks(raw,ctx).children}}if(type==="scr"){return{type:"scrBlock",params:title,children:parseBlocks(raw,ctx).children}}if(type==="ghr"){const lines=raw.split("\n").map(l=>l.trim()).filter(Boolean);if(!lines.length)return{type:"fragment",children:[]};const repo=lines[0];const footer=lines.slice(1).join(" ").trim();if(!/^[\w.-]+\/[\w.-]+$/.test(repo))return{type:"fragment",children:[]};return{type:"ghr",repo:repo,footer:footer}}if(type==="collage"){const imgs=[];const clines=raw.split("\n");for(let ci=0;ci<clines.length;ci++){const cm=clines[ci].match(/^!\[((?:\\.|[^\]\\])*)\]\(([^)]*?)(?:\s+"([^"]*)")?(?:\s+=\s*([^x\s)]*)(?:x([^\s)]+))?)?\)\s*$/);if(cm)imgs.push({alt:cm[1].replace(/\\(.)/g,"$1"),src:cm[2],title:cm[3]||"",width:cm[4]||"",height:cm[5]||""})}if(!imgs.length)return{type:"fragment",children:[]};const lay=imgs.length<=4?String(imgs.length):"multi";return{type:"collage",layout:lay,items:imgs}}var __nc=tryBuildNew(type,plus,title,raw,ctx);if(__nc)return __nc;return{type:"fragment",children:parseBlocks(raw,ctx).children}}function splitRow(row){return row.replace(/\\\|/g,"\0").split("|").map(c=>{c=c.replace(/\u0000/g,"|").trim();const span={colspan:1,rowspan:1};const m=c.match(/^(.*?)\s*\{((?:c=\d+|r=\d+)(?:,(?:c=\d+|r=\d+))*)\}\s*$/);if(m&&m[1].trim()!==""){const tokens=m[2].split(",");for(let i=0;i<tokens.length;i++){const tk=tokens[i].split("=");if(tk[0]==="c")span.colspan=Math.max(1,parseInt(tk[1],10)||1);else if(tk[0]==="r")span.rowspan=Math.max(1,parseInt(tk[1],10)||1)}return{c:m[1].trim(),span:span}}return{c:c,span:span}})}function __cmTableDelimOK(headerLine,delimLine){var hc=splitRow(String(headerLine).trim().replace(/^\|/,"").replace(/\|$/,"")).length;var dc=splitRow(String(delimLine).trim().replace(/^\|/,"").replace(/\|$/,"")).length;return hc===dc}function buildTable(rows,ctx){const headers=splitRow(rows[0]);const alignRow=splitRow(rows[1]);const hasAlign=alignRow.every(c=>/^:?-+:?$/.test(c.c));const dataStart=hasAlign?2:1;const aligns=hasAlign?alignRow.map(c=>/^:-+:$/.test(c.c)?"center":/^-+:$/.test(c.c)?"right":"left"):headers.map(()=>"left");while(aligns.length<headers.length)aligns.push("left");const headerCells=headers.map((c,idx)=>({align:aligns[idx],children:parseInline(c.c,ctx),colspan:c.span.colspan,rowspan:c.span.rowspan}));const bodyRows=[];for(let r=dataStart;r<rows.length;r++){const cells=splitRow(rows[r]);const row=[];for(let ci=0;ci<headers.length;ci++){const cc=cells[ci]||{c:"",span:{}};row.push({align:aligns[ci]||"left",children:parseInline(cc.c,ctx),colspan:cc.span.colspan,rowspan:cc.span.rowspan})}bodyRows.push(row)}return{type:"table",headers:headerCells,rows:bodyRows}}const CALLOUT_MAP={tip:{icon:"fa-lightbulb",cls:"md-callout-tip",label:"TIP"},hint:{icon:"fa-lightbulb",cls:"md-callout-tip",label:"HINT"},important:{icon:"fa-lightbulb",cls:"md-callout-tip",label:"IMPORTANT"},info:{icon:"fa-circle-info",cls:"md-callout-info",label:"INFO"},warn:{icon:"fa-triangle-exclamation",cls:"md-callout-warn",label:"WARNING"},warning:{icon:"fa-triangle-exclamation",cls:"md-callout-warn",label:"WARNING"},caution:{icon:"fa-triangle-exclamation",cls:"md-callout-warn",label:"CAUTION"},attention:{icon:"fa-triangle-exclamation",cls:"md-callout-warn",label:"ATTENTION"},danger:{icon:"fa-circle-exclamation",cls:"md-callout-danger",label:"DANGER"},error:{icon:"fa-circle-exclamation",cls:"md-callout-danger",label:"ERROR"},ask:{icon:"fa-circle-question",cls:"md-callout-ask",label:"QUESTION"},question:{icon:"fa-circle-question",cls:"md-callout-ask",label:"QUESTION"},help:{icon:"fa-circle-question",cls:"md-callout-ask",label:"HELP"},faq:{icon:"fa-circle-question",cls:"md-callout-ask",label:"FAQ"},ok:{icon:"fa-circle-check",cls:"md-callout-ok",label:"OK"},success:{icon:"fa-circle-check",cls:"md-callout-ok",label:"SUCCESS"},check:{icon:"fa-circle-check",cls:"md-callout-ok",label:"CHECK"},done:{icon:"fa-circle-check",cls:"md-callout-ok",label:"DONE"},note:{icon:"fa-pencil",cls:"md-callout-note",label:"NOTE"},abstract:{icon:"fa-clipboard-list",cls:"md-callout-abstract",label:"ABSTRACT"},summary:{icon:"fa-clipboard-list",cls:"md-callout-abstract",label:"SUMMARY"},tldr:{icon:"fa-clipboard-list",cls:"md-callout-abstract",label:"TL;DR"},todo:{icon:"fa-square-check",cls:"md-callout-todo",label:"TODO"},failure:{icon:"fa-xmark",cls:"md-callout-failure",label:"FAILURE"},fail:{icon:"fa-xmark",cls:"md-callout-failure",label:"FAIL"},missing:{icon:"fa-xmark",cls:"md-callout-failure",label:"MISSING"},bug:{icon:"fa-bug",cls:"md-callout-bug",label:"BUG"},example:{icon:"fa-list",cls:"md-callout-example",label:"EXAMPLE"},quote:{icon:"fa-quote-left",cls:"md-callout-quote",label:"QUOTE"},cite:{icon:"fa-quote-left",cls:"md-callout-quote",label:"CITE"}};const SYS_TYPES={default:{icon:"fa-circle-info",color:"#8a8ab5",effect:""},join:{icon:"fa-arrow-right-to-bracket",color:"#10b981",effect:""},leave:{icon:"fa-arrow-right-from-bracket",color:"#8a8ab5",effect:""},kick:{icon:"fa-user-xmark",color:"#e74c6f",effect:""},warn:{icon:"fa-triangle-exclamation",color:"#f59e0b",effect:""},poke:{icon:"fa-hand-point-right",color:"#ec4899",effect:"shake"},gift:{icon:"fa-gift",color:"#f59e0b",effect:""},ban:{icon:"fa-ban",color:"#e74c6f",effect:""},mute:{icon:"fa-microphone-slash",color:"#8a8ab5",effect:""},top:{icon:"fa-thumbtack",color:"#6b5acf",effect:""},music:{icon:"fa-music",color:"#8b5cf6",effect:""},like:{icon:"fa-heart",color:"#ec4899",effect:""},fire:{icon:"fa-fire",color:"#f59e0b",effect:""},time:{icon:"fa-clock",color:"#8a8ab5",effect:""},notify:{icon:"fa-bell",color:"#6b5acf",effect:""}};function imageStyle(node){let w=node.width||"",h=node.height||"";if(w&&!/^\d+(?:px|em|rem|%)?$/.test(w))w="";if(h&&!/^\d+(?:px|em|rem|%)?$/.test(h))h="";if(w&&/^\d+$/.test(w))w+="px";if(h&&/^\d+$/.test(h))h+="px";if(!w&&!h)return"";let s="";if(w&&h)s="width:"+w+"; height:"+h+";";else if(w)s="width:"+w+"; height:auto;";else s="height:"+h+"; width:auto;";s+=" max-width:100%;";return' style="'+s+'"'}function renderInlineText(text,ctx){return renderNodes(parseInline(text,ctx),ctx)}function renderChatParts(parts,ctx){let html="";for(const p of parts){if(p.type==="chatQuote"){html+=renderNode(p,ctx);continue}if(p.type==="text"){const lines=p.text.split("\n");for(const l of lines){if(l.trim()==="")continue;html+='<div class="chat-line">'+renderInlineText(l,ctx)+"</div>"}continue}if(p.type==="image"){if(p.kv.url)html+='<img class="chat-image" src="'+escapeHtml(__cmSafeImgSrc(p.kv.url))+'" alt="'+escapeHtml(p.kv.alt||"")+'" loading="lazy">';continue}if(p.type==="redpacket"){const rpBlessing=p.kv.blessing||__i18nT(ctx,"chat.rpDefault");const rpAmount=p.kv.amount||"";const rpWinners=p.kv.winners||"";const rpGiver=p.kv.giver||"";const rpClickable=rpWinners?" clickable":"";let rpAttrs=' data-blessing="'+escapeHtml(rpBlessing)+'"';if(rpAmount)rpAttrs+=' data-amount="'+escapeHtml(rpAmount)+'"';if(rpGiver)rpAttrs+=' data-giver="'+escapeHtml(rpGiver)+'"';if(rpWinners)rpAttrs+=' data-winners="'+escapeHtml(rpWinners)+'"';html+='<div class="chat-redpacket'+rpClickable+'"'+rpAttrs+'><div class="rp-icon"><i class="fas fa-envelope-open-text"></i></div><div class="rp-body"><div class="rp-blessing">'+escapeHtml(rpBlessing)+"</div></div></div>";continue}if(p.type==="transfer"){html+='<div class="chat-transfer"><div class="tf-icon"><i class="fas fa-yen-sign"></i></div><div class="tf-body"><div class="tf-amount">¥ '+escapeHtml(p.kv.amount||"0")+'</div><div class="tf-note">'+escapeHtml(p.kv.note||"")+"</div></div></div>";continue}if(p.type==="card"){const cname=p.kv.name||__i18nT(ctx,"chat.unknownName");const cav=p.kv.avatar||"";const cAvatar=cav?'<img class="card-avatar-img" src="'+escapeHtml(__cmSafeImgSrc(cav))+'" alt="">':'<span class="card-avatar-fallback" style="background:'+escapeHtml(autoColor(cname))+'">'+escapeHtml(cname.charAt(0))+"</span>";html+='<div class="chat-card"><div class="card-avatar">'+cAvatar+'</div><div class="card-body"><div class="card-name">'+escapeHtml(cname)+'</div><div class="card-desc">'+escapeHtml(p.kv.desc||"")+'</div></div><div class="card-tag"><i class="fas fa-address-card"></i> '+escapeHtml(__i18nT(ctx,"chat.card"))+"</div></div>";continue}}return html}function isBareChatParts(parts){if(!parts.length)return false;for(const p of parts){const t=p.type;if(t!=="image"&&t!=="redpacket"&&t!=="transfer"&&t!=="card")return false}return true}const DL_ICON_STYLE_RE=/(^|\s)(fa[srbdl]|fa-(solid|regular|brands|light|duotone|thin|sharp|kit))\b/i;function dlIconHtml(raw,fallback){const v=raw===null||raw===undefined?"":String(raw).trim();if(!v)return'<i class="fas '+fallback+'"></i>';const __iv=__cmSafeImgSrc(v);if(__iv&&(/^(?:https?:)?\/\//i.test(v)||/^data:image\//i.test(v)||/^\.{0,2}\//.test(v)||/^[\w.-]+\.(png|jpe?g|gif|svg|webp|ico|avif)$/i.test(v)))return'<img class="dl-icon-img" src="'+escapeHtml(__iv)+'" alt="">';if(/fa-/i.test(v)||/(^|\s)fa[srbdl]\b/i.test(v)){const cls=DL_ICON_STYLE_RE.test(v)?v:"fas "+v;return'<i class="'+escapeHtml(cls)+'"></i>'}if(/^[A-Za-z0-9_-]+$/.test(v))return'<i class="fas fa-'+escapeHtml(v)+'"></i>';return'<span class="dl-icon-emoji">'+escapeHtml(v)+"</span>"}const RENDERERS={root(node,ctx){return renderBlockChildren(node.children,ctx)},fragment(node,ctx){return renderBlockChildren(node.children,ctx)},dropcap(node){return'<span class="md-dropcap-letter">'+escapeHtml(node.char)+"</span>"},paragraph(node,ctx){var isDrop=!ctx.dropcapDone&&ctx.config.dropcap;var hasDrop=false;if(isDrop&&node.children&&node.children.length>0){var first=node.children[0];if(first.type==="text"&&first.value){var t=first.value.replace(/^\s+/,"");if(t){var m=t.match(/^[^,。、!?;:""''()《》【】·—…,.!?;:'"()\[\]{}<>\s]+/);if(m){var c=m[0].charAt(0);var idx=t.indexOf(c);first.value=t.slice(0,idx)+t.slice(idx+1);node.children.unshift({type:"dropcap",char:c});ctx.dropcapDone=true;hasDrop=true}}}}return"<p"+(hasDrop?' class="md-dropcap-para"':"")+">"+renderNodes(node.children,ctx)+"</p>\n"},blankLines(node){return'<div class="md-blank-line" style="height:'+(node.count*1.9).toFixed(2)+'em"></div>\n'},break(){return"<br>"},heading(node,ctx){const tag="h"+node.depth;const idAttr=node.id?' id="'+escapeHtml(node.id)+'"':"";const hdAttr=node.suffix?' data-hd="'+escapeHtml(node.suffix)+'"':"";const clsArr=node.cls?node.cls.slice():[];if(ctx.config.headingline)clsArr.push("md-heading-line");const clsAttr=clsArr.length?' class="'+escapeHtml(clsArr.join(" "))+'"':"";var __foldAttr=node.foldInit===true?' data-fold="1"':node.foldInit===false?' data-fold="0"':"";var __numHtml="";if(node.num){var __sfx=ctx.config.headnumsuffix!==undefined?ctx.config.headnumsuffix:" ";__numHtml='<span class="md-h-num">'+escapeHtml(node.num)+"</span>"+escapeHtml(__sfx)}var __out="<"+tag+idAttr+hdAttr+clsAttr+__foldAttr+">"+__numHtml+renderNodes(node.children,ctx)+"</"+tag+">\n";if(node.sub){__out+='<div class="md-h-sub">'+escapeHtml(node.sub)+"</div>\n"}return __out},toc(node,ctx){return renderToc(ctx.headings,ctx)},thematicBreak(){return"<hr />\n"},hrText(node,ctx){const a=node.attrs||{};const V={solid:1,dashed:1,dotted:1,double:1};let st="";if(V[a.l]||a.l==="none")st+="--l:"+a.l+";";if(V[a.lt]||a.lt==="none")st+="--lt:"+a.lt+";";if(V[a.lb]||a.lb==="none")st+="--lb:"+a.lb+";";if(V[a.r]||a.r==="none")st+="--r:"+a.r+";";if(V[a.rt]||a.rt==="none")st+="--rt:"+a.rt+";";if(V[a.rb]||a.rb==="none")st+="--rb:"+a.rb+";";if(a.l==="none"||a.t||a.b)st+="--hide-l:1;";if(a.r==="none"||a.t||a.b)st+="--hide-r:1;";let iSt="";let tb="";if(V[a.t])tb+="border-top:1px "+a.t+" currentColor;";if(V[a.b])tb+="border-bottom:1px "+a.b+" currentColor;";if(tb)iSt=' style="'+tb+'"';return'<div class="md-hr-text md-hr-'+node.style+'"'+(st?' style="'+st+'"':"")+'><span class="md-hr-text-inner"'+iSt+">"+renderNodes(parseInline(node.text,ctx),ctx)+"</span></div>\n"},blockquote(node,ctx){return"<blockquote>"+renderBlockChildren(node.children,ctx)+"</blockquote>\n"},htmlBlock(node,ctx){let r=node.raw;if(ctx&&ctx.config&&ctx.config.disallowedhtml)r=r.replace(/<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)\b/gi,(_,s1,t)=>"&lt;"+s1+t);return r},codeBlock(node,ctx){if(node.lang==="mermaid"){if(ctx.config&&ctx.config.mermaid===false)return'<pre><code class="language-mermaid">'+escapeHtmlStrict(node.code)+"</code></pre>\n";return'<div class="mermaid" data-src="'+escapeHtmlStrict(node.code)+'">'+escapeHtmlStrict(node.code)+"</div>\n"}if(node.lang==="diff"){const cid="code-"+ctx.stamp+"-"+(ctx.codeIndex=(ctx.codeIndex||0)+1);let body="";const lines=node.code.split("\n");lines.forEach((line,j)=>{let cls="";if(line.charAt(0)==="+")cls=" md-diff-add";else if(line.charAt(0)==="-")cls=" md-diff-del";else if(line.slice(0,2)==="@@")cls=" md-diff-hunk";body+='<span class="code-line'+cls+'"><span class="line-number">'+(j+1)+'</span><span class="hljs">'+escapeHtmlStrict(line)+"</span></span>"});return'<div class="code-block-wrapper" id="cbw-'+cid+'" data-lang="diff"><div class="code-block-header"><span class="lang-label"><i class="fas fa-file-code"></i>DIFF</span><span class="code-stats"><span title="'+lines.length+" "+escapeHtml(__i18nT(ctx,"code.lines"))+'"><i class="fas fa-bars"></i>'+lines.length+'</span></span><span class="header-actions"><button class="copy-btn" data-copy="'+cid+'" title="'+escapeHtml(__i18nT(ctx,"code.copy"))+'"><i class="fas fa-copy"></i></button></span></div><div class="code-block-body-wrapper"><div class="code-block-body" id="code-body-'+cid+'">'+body+"</div></div></div>\n"}var hlAttr="";if(node.meta){var hm=node.meta.match(/(?:^|\s)hl=([\d,\-\s]+?)(?=\s+[a-z]+=|$|\})/)||node.meta.match(/(?:^|\s)hl=([^\s}]+)/)||node.meta.match(/\{([\d,\-]+)\}/);if(hm)hlAttr=' data-hl-lines="'+escapeHtml(hm[1].replace(/\s/g,""))+'"'}var __mk=Object.assign({},node.marks||{});if(!node.marks){if(!hlAttr)return"<pre"+(node.meta?' data-meta="'+escapeHtml(node.meta)+'"':"")+'><code class="language-'+escapeHtml(node.lang||"text")+'">'+escapeHtmlStrict(node.code)+"</code></pre>\n";var __hmap={};hm[1].replace(/\s/g,"").split(",").forEach(function(__hx){var __hr=__hx.match(/^(\d+)(?:-(\d+))?$/);if(!__hr)return;var __ha=parseInt(__hr[1],10),__hb=__hr[2]?parseInt(__hr[2],10):__ha;if(__hb<__ha)return;for(var __hq=__ha;__hq<=__hb&&__hq-__ha<5e3;__hq++)__hmap[__hq]={type:"_codeMark",mark:"highlight"}});Object.assign(__mk,__hmap)}var __words=[];for(var __wk in __mk){var __wv=__mk[__wk];if(__wv&&__wv.type&&__wv.type.indexOf("word:")===0){var __w=__wv.type.slice(5);if(__w&&__words.indexOf(__w)===-1)__words.push(__w)}}var __wpat=null;if(__words.length){__wpat=new RegExp("("+__words.map(function(x){return escapeHtml(x).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}).join("|")+")","g")}var __body="";var __lines=node.code.split("\n");for(var __i=0;__i<__lines.length;__i++){var __m=__mk[__i+1],__extra="";if(__m){var __t=__m.type==="_codeMark"?__m.mark:__m.type;if(__t==="highlight")__extra=' data-hl="1"';else if(__t.indexOf("highlight:")===0){__extra=' data-hl="1"';var __n=parseInt(__t.split(":")[1],10)||0;for(var __h=1;__h<=__n;__h++){__mk[__i+1+__h]={type:"_codeMark",mark:"highlight"}}}else if(__t==="focus")__extra=' data-focus="1"';else if(__t.indexOf("focus:")===0){__extra=' data-focus="1"';var __fn=parseInt(__t.split(":")[1],10)||0;for(var __f=1;__f<=__fn;__f++){__mk[__i+1+__f]={type:"_codeMark",mark:"focus"}}}else if(__t==="++")__extra=' data-diff="add"';else if(__t==="--")__extra=' data-diff="del"';else if(__t==="error")__extra=' data-status="error"';else if(__t==="warning")__extra=' data-status="warning"';else if(__t.indexOf("word:")===0)__extra=' data-word="'+escapeHtml(__t.slice(5))+'"'}var __escLine=escapeHtmlStrict(__lines[__i]);if(__wpat){__wpat.lastIndex=0;__escLine=__escLine.replace(__wpat,function(m){return'<span class="code-word">'+m+"</span>"})}__body+='<span class="code-line"'+__extra+'><span class="line-number">'+(__i+1)+'</span><span class="hljs">'+__escLine+"</span></span>"}var __cid="code-"+ctx.stamp+"-"+(ctx.codeIndex=(ctx.codeIndex||0)+1);var __lk=String(node.lang||"").toLowerCase().trim();var __meta=__langMeta(__lk)||{icon:"",name:__lk.toUpperCase()};return'<div class="code-block-wrapper" id="cbw-'+__cid+'" data-lang="'+escapeHtml(node.lang||"")+'"><div class="code-block-header"><span class="lang-label">'+(__meta.icon?'<i class="'+__meta.icon+'"></i>':"")+escapeHtml(__meta.name)+'</span><span class="header-actions"><button class="copy-btn" data-copy="'+__cid+'" title="'+escapeHtml(__i18nT(ctx,"code.copy"))+'"><i class="fas fa-copy"></i></button></span></div><div class="code-block-body-wrapper"><div class="code-block-body" id="code-body-'+__cid+'">'+__body+"</div></div></div>\n"},list(node,ctx){const tag=node.ordered?"ol":"ul";const cls=node.task?' class="task-list"':"";const start=node.ordered&&node.start!==null&&node.start!==1?' start="'+node.start+'"':"";const typeAttr=node.roman?' type="'+node.roman+'"':"";const __loose=!!node.loose||__listLoose(node);const items=[];for(let i=0;i<node.items.length;i++){node.items[i].__loose=__loose;items.push(renderNode(node.items[i],ctx))}return"<"+tag+cls+start+typeAttr+">\n"+items.join("\n")+"\n</"+tag+">\n"},listItem(node,ctx){const attr=node.checked!==null?' data-checked="'+(node.checked?"true":"false")+'"':"";let html="<li"+attr+">";const __loose=node.__loose;let __body="";let __lists="";if(node.children&&node.children.length){const __parts=[];for(let __i=0;__i<node.children.length;__i++){const __ch=node.children[__i];if(!__loose&&__ch.type==="paragraph"){__parts.push(renderNodes(__ch.children,ctx))}else{__parts.push(renderNode(__ch,ctx))}}__body=__parts.join("\n")}else if(node.inline){if(__loose){__body="<p>"+renderNodes(node.inline,ctx)+"</p>"}else{__body=renderNodes(node.inline,ctx)}}if(__body&&node.checked===true)__body='<span class="md-task-text">'+__body+"</span>";html+=__body;if(__lists)html+="\n"+__lists;if(node.list)html+="\n"+renderNode(node.list,ctx);html+="</li>";return html},table(node,ctx){let html="<table"+(node.sortable?' data-sortable="1"':"")+">"+(node.caption?"<caption>"+renderNodes(parseInline(node.caption,ctx),ctx)+"</caption>":"")+"<thead><tr>";for(let i=0;i<node.headers.length;i++){const hc=node.headers[i];const hsa=(hc.colspan>1?' colspan="'+hc.colspan+'"':"")+(hc.rowspan>1?' rowspan="'+hc.rowspan+'"':"");html+='<th style="text-align:'+hc.align+';"'+hsa+">"+renderNodes(hc.children,ctx)+"</th>"}html+="</tr></thead>";if(node.rows.length)html+="<tbody>";for(let r=0;r<node.rows.length;r++){html+="<tr>";for(let c=0;c<node.rows[r].length;c++){const cc=node.rows[r][c];const csa=(cc.colspan>1?' colspan="'+cc.colspan+'"':"")+(cc.rowspan>1?' rowspan="'+cc.rowspan+'"':"");html+='<td style="text-align:'+cc.align+';"'+csa+">"+renderNodes(cc.children,ctx)+"</td>"}html+="</tr>"}if(node.rows.length)html+="</tbody>";html+="</table>\n";return html},definitionList(node,ctx){let html="<dl><dt>"+renderNodes(node.term,ctx)+"</dt>";for(let i=0;i<node.defs.length;i++){html+="<dd>"+renderNodes(node.defs[i],ctx)+"</dd>"}html+="</dl>\n";return html},callout(node,ctx){const cfg=CALLOUT_MAP[node.variant]||CALLOUT_MAP.info;const title=node.title||cfg.label;const icon=node.icon||cfg.icon;const color=node.color?resolveColor(node.color):null;let sty="",hsty="";if(color){sty=' style="border-color:'+color+";background:"+hexToRgba(color,.08)+'"';hsty=' style="color:'+color+'"'}const __bodyHtml=renderBlockChildren(node.children,ctx);const __dataAttr=' data-callout="'+escapeHtml(node.variant)+'"';if(node.open===true||node.open===false){const __openAttr=node.open?" open":"";return'<details class="md-callout '+cfg.cls+'"'+sty+__dataAttr+__openAttr+'><summary class="md-callout-head"'+hsty+'><i class="fas '+icon+'"></i>'+escapeHtml(title)+'<i class="fas fa-chevron-right callout-caret"></i></summary><div class="md-callout-body">'+__bodyHtml+"</div></details>"}return'<div class="md-callout '+cfg.cls+'"'+sty+__dataAttr+'><div class="md-callout-head"'+hsty+'><i class="fas '+icon+'"></i>'+escapeHtml(title)+'</div><div class="md-callout-body">'+__bodyHtml+"</div></div>"},bg(node,ctx){const v=[];if(node.opacity!==null)v.push("--bg-op:"+node.opacity);if(node.scale!==null)v.push("--bg-scale:"+node.scale);if(node.blur!==null)v.push("--bg-blur:"+node.blur+"px");if(node.rotate!==null)v.push("--bg-rot:"+node.rotate+"deg");if(node.color)v.push("--bg-c:"+node.color);const bgStyle=v.length?' style="'+v.join(";")+'"':"";const dataAttr=node.text?' data-bg="'+escapeHtml(node.text)+'"':"";const layer=node.text?'<div class="md-bg-layer" aria-hidden="true"><span class="md-bg-text">'+escapeHtml(node.text)+"</span></div>":"";const content='<div class="md-bg-content">'+renderNodes(node.children,ctx)+"</div>";return'<div class="md-bg"'+bgStyle+dataAttr+">"+layer+content+"</div>\n"},say(node,ctx){const author=node.author||"";return'<div class="md-say"><div class="md-say-text">'+renderNodes(node.children,ctx)+"</div>"+(author?'<div class="md-say-author">'+renderNodes(parseInline(author,ctx),ctx)+"</div>":"")+"</div>\n"},swipe(node){const imgs=node.imgs||[];if(!imgs.length)return"";const N=imgs.length;let cards="",dots="";for(let i=0;i<N;i++){cards+='<div class="swipe-card" data-i="'+i+'"><img src="'+escapeHtml(__cmSafeImgSrc(imgs[i].src))+'" alt="'+escapeHtml(imgs[i].alt)+'" loading="lazy" draggable="false"></div>';dots+='<span class="swipe-dot" data-idx="'+i+'"><i></i></span>'}const badge=N>1?'<span class="swipe-badge">1/'+N+"</span>":"";return'<div class="md-swipe" data-total="'+N+'"><div class="swipe-stage">'+cards+badge+'</div><div class="swipe-dots" data-total="'+N+'">'+dots+"</div></div>\n"},alt(node){const opts=node.options.map(s=>escapeHtml(s)).join("|");return'<span class="md-alt" data-options="'+opts+'"><span class="md-alt-text">'+escapeHtml(node.options[0])+'</span><svg class="md-alt-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"/><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"/></svg></span>'},ref(node){return'<span class="md-ref" data-ref-target="'+escapeHtml(node.target)+'">'+escapeHtml(node.target)+"</span>"},wikiLink(node,ctx){const slug=slugify(node.target);return'<a class="md-ref md-wikilink" href="#'+escapeHtml(slug)+'" data-ref-target="'+escapeHtml(node.target)+'">'+renderInlineText(node.label,ctx)+"</a>"},dot(node,ctx){const sh=node.shape||"'•'";let c="";if(node.color){const r=resolveColor(node.color);if(r)c=r;else if(/^[a-zA-Z]+$/.test(node.color))c=escapeHtml(node.color)}let st="--dot-shape:"+sh+";";if(c)st+="--dot-color:"+c+";";return'<span class="md-dot" style="'+st+'">'+renderNodes(node.children,ctx)+"</span>"},pn(node,ctx){return'<span class="md-pn">'+(node.children?renderNodes(node.children,ctx):escapeHtml(node.text))+"</span>"},upper(node,ctx){return'<span class="md-upper">'+(node.children?renderNodes(node.children,ctx):escapeHtml(node.text.toUpperCase()))+"</span>"},lower(node,ctx){return'<span class="md-lower">'+(node.children?renderNodes(node.children,ctx):escapeHtml(node.text.toLowerCase()))+"</span>"},cap(node,ctx){if(node.children)return'<span class="md-cap">'+renderNodes(node.children,ctx)+"</span>";const t=node.text;return'<span class="md-cap">'+escapeHtml(t.charAt(0).toUpperCase()+t.slice(1))+"</span>"},note(node){const tip=node.tip?' data-tip="'+escapeHtml(node.tip)+'"':"";return'<span class="md-note"'+tip+">"+escapeHtml(node.label)+"</span>"},cmd(node,ctx){return'<span class="md-cmd"><i class="fas fa-terminal"></i>'+(node.children?renderNodes(node.children,ctx):escapeHtml(node.text))+"</span>"},flag(node,ctx){return'<span class="md-flag"><i class="fas fa-flag"></i>'+(node.children?renderNodes(node.children,ctx):escapeHtml(node.text))+"</span>"},"md-u"(node,ctx){return'<span class="md-u">'+renderNodes(node.children,ctx)+"</span>"},"md-ins"(node,ctx){return'<ins class="md-ins">'+renderNodes(node.children,ctx)+"</ins>"},term(node){return'<span class="md-term" data-tip="'+escapeHtml(node.tip)+'">'+escapeHtml(node.label)+'<i class="fa-regular fa-circle-question md-term-icon"></i></span>'},abbr(node){return'<span class="md-term" data-tip="'+escapeHtml(node.title)+'">'+escapeHtml(node.text)+"</span>"},ruby(node){const st=node.pos==="under"?' style="ruby-position:under"':"";if(node.parts){let s="";for(const p of node.parts){if(p.punct)s+=escapeHtml(p.punct);else s+="<ruby"+st+">"+escapeHtml(p.base)+"<rt>"+escapeHtml(p.rt)+"</rt></ruby>"}return s}return"<ruby"+st+">"+escapeHtml(node.base)+"<rt>"+escapeHtml(node.rt)+"</rt></ruby>"},qr(node){return'<span class="md-qr"><img src="https://api.qrserver.com/v1/create-qr-code/?size=168x168&margin=0&data='+encodeURIComponent(node.url)+'" alt="QR"></span>'},date(node,ctx){const p=parseDateStr(node.raw);if(p.ts===null)return'<span class="md-date">'+escapeHtml(p.text)+"</span>";let txt;if(node.before!==undefined||node.after!==undefined){const now=Date.now();txt=now<p.ts?node.before||relTime(p.ts,node.raw,ctx.langKey||"zh-CN"):node.after||relTime(p.ts,node.raw,ctx.langKey||"zh-CN")}else{const fixed=node.fixed||"";txt=fixed||relTime(p.ts,node.raw,ctx.langKey||"zh-CN")}const fx=node.fixed?' data-fixed="true"':"";return'<span class="md-date" data-ts="'+p.ts+'" data-raw="'+escapeHtml(node.raw)+'" data-tip="'+escapeHtml(p.text)+'" data-lang="'+escapeHtml(ctx.langKey||"zh-CN")+'"'+fx+">"+escapeHtml(txt)+'<i class="fa-regular fa-clock md-date-icon"></i></span>'},detail(node,ctx){return'<details class="md-detail'+(node.hover?" md-detail-hover":"")+'"'+(node.open?" open":"")+(node.collapsed?' data-collapsed="true"':"")+(node.hover?' data-hover="1"':"")+'><summary><i class="fas fa-chevron-right"></i>'+renderNodes(parseInline(node.title,ctx),ctx)+'</summary><div class="md-detail-body">'+renderNodes(node.children,ctx)+"</div></details>\n"},linkCard(node){const f=node.fields;const __u=__cmSafeHrefAttr(f.url);const url=__u?escapeHtml(__u):"";const tag=__u?"a":"div";const href=__u?' href="'+url+'" target="_blank" rel="noopener"':"";const website=f.website||"";const content=f.content||"";const author=f.author||"";const img=__cmSafeImgSrc(f.img||"");if(node.big){return"<"+tag+' class="md-link big"'+href+">"+(img?'<img class="md-link-cover" src="'+escapeHtml(img)+'" alt="" loading="lazy">':"")+'<div class="md-link-inner">'+(website?'<div class="md-link-website">'+escapeHtml(website)+"</div>":"")+(content?'<div class="md-link-content">'+escapeHtml(content)+"</div>":"")+(author?'<div class="md-link-author"><i class="fas fa-user"></i>'+escapeHtml(author)+"</div>":"")+"</div></"+tag+">\n"}return"<"+tag+' class="md-link"'+href+">"+(img?'<img class="md-link-thumb" src="'+escapeHtml(img)+'" alt="" loading="lazy">':"")+'<div class="md-link-body">'+(website?'<div class="md-link-website">'+escapeHtml(website)+"</div>":"")+'<div class="md-link-content">'+escapeHtml(content||f.url)+"</div>"+(author?'<div class="md-link-author"><i class="fas fa-user"></i>'+escapeHtml(author)+"</div>":"")+"</div></"+tag+">\n"},pbar(node,ctx){if(node.segments){const __tH=node.title?'<div class="md-pbar-title">'+renderNodes(parseInline(node.title,ctx),ctx)+"</div>":"";let __sH="";for(let __si=0;__si<node.segments.length;__si++){const __sg=node.segments[__si];__sH+='<div class="md-pbar-seg" style="width:'+__sg.pct+"%;background:"+escapeHtml(__sg.color)+'"></div>'}return'<div class="md-pbar">'+__tH+'<div class="md-pbar-track md-pbar-stacked">'+__sH+"</div></div>"}const pct=node.pct,max=node.max;const ratio=max>0?pct/max*100:0;const width=Math.max(0,Math.min(100,ratio));const color=node.color||"#6b5acf";const titleHtml=node.title?'<div class="md-pbar-title">'+renderNodes(parseInline(node.title,ctx),ctx)+"</div>":"";let textHtml="";if(node.showText){const ratioStr=ratio.toFixed(1).replace(/\.0$/,"");let label;if(node.maxProvided){const pctStr=String(pct).replace(/\.0+$/,"");const maxStr=String(max).replace(/\.0+$/,"");label=pctStr+"/"+maxStr+"("+ratioStr+"%)"}else{label=ratioStr+"%"}textHtml='<div class="md-pbar-text">'+escapeHtml(label)+"</div>"}return'<div class="md-pbar">'+titleHtml+'<div class="md-pbar-track"><div class="md-pbar-fill" style="width:'+width+"%;background:"+escapeHtml(color)+'"></div></div>'+textHtml+"</div>\n"},tree(node,ctx){return renderTree(node.data)},badge(node,ctx){const attrs=node.attrs||{};const dis=attrs.dis===true;const outline=attrs.style==="outline";const cls="md-badge"+(outline?" md-badge-outline":"")+(dis?" md-dis":"");let st=outline?"color:"+escapeHtml(node.color)+";border-color:"+escapeHtml(node.color)+";":"background:"+escapeHtml(node.color)+";color:#fff;";const sz=safeSize(attrs.size);if(sz)st+="font-size:"+sz+";";let inner=renderNodes(parseInline(node.label,ctx),ctx);const url=attrs.url||node.url;const hasLink=url&&isSafeHref(url);if(hasLink)inner+='<i class="fas fa-arrow-up-right-from-square md-ext-icon"></i>';if(dis)return'<span class="'+cls+'" style="'+st+'" aria-disabled="true">'+inner+"</span>";if(hasLink)return'<a class="'+cls+'" href="'+escapeHtml(url)+'" target="_blank" rel="noopener" style="'+st+'">'+inner+"</a>";return'<span class="'+cls+'" style="'+st+'">'+inner+"</span>"},colorSpan(node,ctx){return'<span class="md-color" style="color:'+escapeHtml(node.color)+'">'+renderNodes(node.children,ctx)+"</span>"},tabs(node,ctx){let isJelly=!!node.plus;let cls="md-tabs"+(isJelly?" jelly-tabs":"");let navHtml="",panelHtml="";for(let t=0;t<node.tabs.length;t++){let title=escapeHtml(node.tabs[t].title||"");let innerHtml=isJelly?'<span class="t-normal">'+title+'</span><span class="t-bold">'+title+"</span>":title;navHtml+='<button class="'+(t===0?"active":"")+'" data-tab="'+t+'">'+innerHtml+"</button>";panelHtml+='<div class="md-tabs-panel'+(t===0?" active":"")+'" data-panel="'+t+'">'+renderNodes(parseBlocks(node.tabs[t].body,ctx).children,ctx)+"</div>"}let indicator=isJelly?'<span class="md-tabs-indicator"></span>':"";return'<div class="'+cls+'"><div class="md-tabs-nav">'+navHtml+indicator+"</div>"+panelHtml+"</div>"},timeline(node,ctx){let out='<div class="md-timeline'+(node.numbered?" numbered":"")+'">';for(let k=0;k<node.items.length;k++){const it=node.items[k];let dotColor;if(it.color)dotColor=it.color;else if(node.globalColor==="rainbow")dotColor=RAINBOW[k%RAINBOW.length];else if(node.globalColor)dotColor=node.globalColor;else dotColor="#6b5acf";const segColor=dotColor;const halo=hexToRgba(dotColor,.18);out+='<div class="md-timeline-item" style="--dot-c:'+escapeHtml(dotColor)+";--dot-halo:"+halo+";--line-c-seg:"+escapeHtml(segColor)+'">'+'<div class="md-timeline-date">'+renderInlineText(it.date,ctx)+"</div>"+'<div class="md-timeline-title">'+renderInlineText(it.title,ctx)+"</div>"+(it.desc?'<div class="md-timeline-desc">'+renderInlineText(it.desc,ctx)+"</div>":"")+"</div>"}return out+"</div>"},grid(node,ctx){let out='<div class="md-grid" data-cols="'+escapeHtml(node.cols)+'">';for(let c=0;c<node.cells.length;c++){out+='<div class="md-grid-cell">'+renderNodes(parseBlocks(node.cells[c],ctx).children,ctx)+"</div>"}return out+"</div>"},compare(node,ctx){let out='<div class="md-compare">';for(let p=0;p<node.panels.length;p++){const panel=node.panels[p];const style=panel.color?' style="background:'+hexToRgba(panel.color,.06)+";--c:"+escapeHtml(panel.color)+'"':"";out+='<div class="md-compare-panel"'+style+">";if(panel.title){out+='<div class="md-compare-title">'+escapeHtml(panel.title)+"</div>"}out+='<div class="md-compare-body">'+renderNodes(parseBlocks(panel.body,ctx).children,ctx)+"</div>";out+="</div>"}return out+"</div>"},mcq(node,ctx){const T=k=>escapeHtml(__i18nT(ctx,k));let h='<div class="md-mcq'+(node.display?" display":"")+'" data-multi="'+(node.isMulti?1:0)+'" data-display="'+(node.display?1:0)+'" data-open="'+(node.open?1:0)+'" data-sel="'+escapeHtml(node.sel.join(","))+'">';h+='<div class="md-mcq-head'+(node.subtitle?" has-sub":"")+'">';h+='<span class="md-mcq-tag'+(node.isMulti?" multi":"")+'"><i class="fas '+(node.isMulti?"fa-list-check":"fa-circle-dot")+'"></i>'+(node.sel&&node.sel.length?T("mcq.selected"):"")+(node.isMulti?T("mcq.multi"):T("mcq.single"))+"</span>";if(node.subtitle){h+='<span class="md-mcq-meta">'+renderNodes(parseInline(node.subtitle,ctx),ctx)+"</span>";h+="</div>";if(node.title)h+='<div class="md-mcq-title-row"><span class="md-mcq-title">'+renderNodes(parseInline(node.title,ctx),ctx)+"</span></div>"}else{if(node.title)h+='<span class="md-mcq-title">'+renderNodes(parseInline(node.title,ctx),ctx)+"</span>";h+="</div>"}if(node.hint){h+='<div class="md-mcq-hint-bar"><i class="fas fa-circle-info"></i><span>'+renderNodes(parseInline(node.hint,ctx),ctx)+"</span></div>"}h+='<div class="md-mcq-options">';for(let i=0;i<node.options.length;i++){const o=node.options[i];h+='<div class="md-mcq-opt" data-idx="'+i+'" data-marker="'+escapeHtml(o.marker)+'" data-correct="'+(o.correct?1:0)+'">';h+='<span class="md-mcq-marker">'+escapeHtml(o.marker)+"</span>";h+='<span class="md-mcq-text">'+renderNodes(parseInline(o.text,ctx),ctx)+"</span>";if(o.expl){h+='<div class="md-mcq-opt-expl">'+renderNodes(parseInline(o.expl,ctx),ctx)+"</div>"}h+="</div>"}h+="</div>";h+='<div class="md-mcq-actions">';if(node.isMulti){h+='<button class="md-mcq-submit"><i class="fas fa-paper-plane"></i>'+T("mcq.submit")+'</button><span class="md-mcq-hint"><i class="fas fa-circle-info"></i>'+T("mcq.hintMulti")+"</span>"}else{h+='<span class="md-mcq-hint"><i class="fas fa-hand-pointer"></i>'+T("mcq.hintClick")+"</span>"}h+='<div class="md-mcq-result"></div>';h+='<button class="md-mcq-toggle"><span class="toggle-view"><i class="fas fa-pen-to-square"></i>'+T("mcq.toggleView")+'</span><span class="toggle-play"><i class="fas fa-eye"></i>'+T("mcq.togglePlay")+"</span></button>";h+='<button class="md-mcq-reset" title="'+T("mcq.reset")+'"><i class="fas fa-rotate-right"></i></button>';h+="</div>";if(node.explanation){h+='<div class="md-mcq-explain"><div class="md-mcq-explain-label"><i class="fas fa-lightbulb"></i>'+T("mcq.explain")+"</div><div>"+renderNodes(parseInline(node.explanation,ctx),ctx)+"</div></div>"}h+="</div>";return h},saq(node,ctx){const T=k=>escapeHtml(__i18nT(ctx,k));let h='<div class="md-saq">';h+='<div class="md-saq-head">';h+='<span class="md-saq-tag"><i class="fas fa-pen-fancy"></i>'+T("saq.tag")+"</span>";if(node.subtitle)h+='<span class="md-saq-meta">'+renderNodes(parseInline(node.subtitle,ctx),ctx)+"</span>";h+="</div>";if(node.title)h+='<div class="md-saq-title">'+renderNodes(parseInline(node.title,ctx),ctx)+"</div>";if(node.hint)h+='<div class="md-saq-hint"><i class="fas fa-circle-info"></i><span>'+renderNodes(parseInline(node.hint,ctx),ctx)+"</span></div>";if(node.answer){h+='<div class="md-saq-section"><div class="md-saq-label"><i class="fas fa-check-circle"></i>'+T("saq.answer")+'</div><div class="md-saq-content">'+renderNodes(parseBlocks(node.answer,ctx).children,ctx)+'</div><div class="md-saq-veil"><i class="fas fa-eye"></i>'+T("saq.reveal")+"</div></div>"}if(node.explain){h+='<div class="md-saq-section explain"><div class="md-saq-label"><i class="fas fa-lightbulb"></i>'+T("saq.explain")+'</div><div class="md-saq-content">'+renderNodes(parseBlocks(node.explain,ctx).children,ctx)+'</div><div class="md-saq-veil"><i class="fas fa-eye"></i>'+T("saq.reveal")+"</div></div>"}return h+"</div>"},text(node,ctx){let v=node.value;if(ctx&&ctx.config&&ctx.config.smartypants&&!node.noSmart){v=v.replace(/---/g,"—").replace(/--/g,"–").replace(/\.{3}/g,"…").replace(/(^|[-—/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-—/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”")}return escapeHtml(v)},mdComment(){return""},emoji(node){return escapeHtml(node.value)},html(node){return node.value},code(node){return"<code>"+escapeHtmlStrict(node.value)+"</code>"},inlineCode(node,ctx){if(!node.lang)return"<code>"+escapeHtmlStrict(node.value)+"</code>";var H=ctx&&ctx.config&&ctx.config.highlighter;if(typeof H!=="function")return"<code>"+escapeHtmlStrict(node.value)+"</code>";try{var h=H(node.value,node.lang);if(typeof h!=="string"||!h)return"<code>"+escapeHtmlStrict(node.value)+"</code>";return'<code class="hljs language-'+escapeHtml(node.lang)+'">'+h+"</code>"}catch(e){return"<code>"+escapeHtmlStrict(node.value)+"</code>"}},mathInline(node,ctx){if(ctx.config&&ctx.config.katex===false)return'<span class="math-raw">'+escapeHtml("$"+node.value+"$")+"</span>";if(katexLib){try{return katexLib.renderToString(node.value,{displayMode:false,throwOnError:false})}catch(e){}}return'<span class="math-inline" data-tex="'+escapeHtml(node.value)+'">'+escapeHtml("$"+node.value+"$")+"</span>"},mathBlock(node,ctx){if(ctx.config&&ctx.config.katex===false)return'<div class="math-raw">'+escapeHtml("$$"+node.value+"$$")+"</div>";let __mv=node.value;if(__mv.indexOf("\\\\")===-1&&__mv.indexOf("\n")!==-1)__mv=__mv.replace(/\n/g,"\\\\\n");if(katexLib){try{return katexLib.renderToString(__mv,{displayMode:true,throwOnError:false})}catch(e){}}return'<div class="math-block" data-tex="'+escapeHtml(node.value)+'">'+escapeHtml("$$"+node.value+"$$")+"</div>"},strong(node,ctx){return"<strong>"+renderNodes(node.children,ctx)+"</strong>"},emphasis(node,ctx){return"<em>"+renderNodes(node.children,ctx)+"</em>"},delete(node,ctx){return"<del>"+renderNodes(node.children,ctx)+"</del>"},mark(node,ctx){return"<mark>"+renderNodes(node.children,ctx)+"</mark>"},sup(node,ctx){return"<sup>"+renderNodes(node.children,ctx)+"</sup>"},sub(node,ctx){return"<sub>"+renderNodes(node.children,ctx)+"</sub>"},link(node,ctx){const __hrefRaw=__cmDecodeEntities(node.href);if(!(node.autolink?isSafeAutolink(__hrefRaw):isSafeHref(__hrefRaw)))return renderNodes(node.children,ctx);if(ctx.__inA)return renderNodes(node.children,ctx);const __inthref=String(__hrefRaw).charAt(0)==="#";const attrs=__inthref?"":' target="_blank" rel="noopener"';const title=node.title?' title="'+escapeHtml(__cmDecodeEntities(node.title))+'"':"";const href=String(__hrefRaw).replace(/%(?![0-9A-Fa-f]{2})|[\\\x20\t\n\r\f\v"`\[\]<>^{}|]/g,function(c){const h=c.charCodeAt(0).toString(16).toUpperCase();return"%"+(h.length<2?"0"+h:h)}).replace(/[^\x00-\x7F]/g,function(c){return encodeURIComponent(c)});const isExt=/^https?:\/\//i.test(node.href)&&ctx.config.links!==false;const extIcon=isExt?'<i class="fas fa-arrow-up-right-from-square md-ext-link-icon"></i>':"";let __lo;ctx.__inA=true;try{__lo='<a href="'+href+'"'+attrs+title+">"+renderNodes(node.children,ctx)+extIcon+"</a>"}finally{ctx.__inA=false}return __lo},image(node){var isInline=!!(node.width||node.height);var st=imageStyle(node);var __isrc=__cmSafeImgSrc(node.src);if(__isrc!==node.src)node=Object.assign({},node,{src:__isrc});var flipStyle="";if(node.flip)flipStyle=node.flip==="x"?"transform:scaleX(-1);":node.flip==="y"?"transform:scaleY(-1);":"transform:scale(-1,-1);";if(isInline){if(st){st=st.replace('style="','style="display:inline-block;vertical-align:middle;border-radius:12px;object-fit:cover;box-shadow:none;'+flipStyle)}else{st=' style="display:inline-block;vertical-align:middle;border-radius:12px;object-fit:cover;box-shadow:none;'+flipStyle+'"'}return'<img class="img-inline" src="'+escapeHtml(node.src)+'" alt="'+escapeHtml(node.alt)+'" loading="lazy"'+st+(node.title?' title="'+escapeHtml(node.title)+'"':"")+" />"}if(flipStyle){var rStyle="border-radius:12px;";if(st){st=st.replace('style="','style="'+flipStyle+rStyle)}else{st=' style="'+flipStyle+rStyle+'"'}}return'<img src="'+escapeHtml(node.src)+'" alt="'+escapeHtml(node.alt)+'" loading="lazy"'+st+(node.title?' title="'+escapeHtml(node.title)+'"':"")+" />"},video(node,ctx){const style=imageStyle(node);const altHtml=node.alt&&node.alt.length?'<div class="video-alt-text">'+renderNodes(node.alt,ctx)+"</div>":"";let m=node.src.match(/(?:youtube(?:-nocookie)?\.com\/(?:watch\?v=|embed\/)|youtu\.be\/)([a-zA-Z0-9_-]{11})/);if(m){const __ytHost=node.src.indexOf("youtube-nocookie.com")!==-1?"https://www.youtube-nocookie.com/embed/":"https://www.youtube.com/embed/";return'<div class="video-placeholder"><iframe src="'+__ytHost+m[1]+'" frameborder="0" allowfullscreen'+style+"></iframe>"+altHtml+"</div>"}m=node.src.match(/(?:bilibili\.com\/video\/)(BV[a-zA-Z0-9]+|av\d+)/i);if(m){let __bvid=m[1],__bsrc=__bvid.toLowerCase().startsWith("av")?"https://player.bilibili.com/player.html?aid="+__bvid.slice(2):"https://player.bilibili.com/player.html?bvid="+__bvid;return'<div class="video-placeholder"><iframe src="'+__bsrc+'" frameborder="0" allowfullscreen'+style+"></iframe>"+altHtml+"</div>"}m=node.src.match(/(?:vimeo\.com\/(?:video\/)?)(\d{6,})(?:\/([a-zA-Z0-9]+))?/);if(m){const __vh=m[2]?"?h="+m[2]:"";return'<div class="video-placeholder"><iframe src="https://player.vimeo.com/video/'+m[1]+__vh+'" frameborder="0" allowfullscreen'+style+"></iframe>"+altHtml+"</div>"}return'<div class="video-placeholder"><video src="'+escapeHtml(__cmSafeMediaSrc(node.src))+'" controls'+style+"></video>"+altHtml+"</div>"},audio(node){const __src=__cmSafeMediaSrc(node.src),__cover=__cmSafeImgSrc(node.cover||"");const t=node.title?' title="'+escapeHtml(node.title)+'"':"";const c=__cover?' data-cover="'+escapeHtml(__cover)+'"':"";const s=node.subtitle?' data-subs="'+escapeHtml(node.subtitle)+'"':"";return'<audio controls src="'+escapeHtml(__src)+'"'+t+c+s+' preload="metadata"></audio>'},footnoteRef(node){return'<sup class="footnote-ref"><a href="#footnote-def-'+node.index+'" data-footnote-ref="'+node.index+'">'+node.index+"</a></sup>"},alignBlockInline(node,ctx){return'<span class="md-align-'+node.align+'">'+renderNodes(node.children,ctx)+"</span>"},alignBlock(node,ctx){return'<div class="md-align-'+node.align+'">'+renderNodes(node.children,ctx)+"</div>"},hei(node,ctx){return'<span class="md-hei is-hidden">'+renderNodes(node.children,ctx)+"</span>"},lang(node){const key=node.name.toLowerCase().replace(/\s+/g,"");const meta=__langMeta(key);const cls="md-lang"+(node.showText?"":" no-text");let html='<span class="'+cls+'" data-lang="'+escapeHtml(key)+'" title="'+escapeHtml(node.name)+'">';if(meta)html+='<i class="'+meta.icon+'"></i>';if(node.showText||!meta)html+='<span class="md-lang-text">'+escapeHtml(node.name)+"</span>";return html+"</span>"},key(node){const parts=String(node.value).split(/\s*\+\s*/).filter(Boolean);const out=[];for(let i=0;i<parts.length;i++){if(i>0)out.push('<span class="md-key-sep">+</span>');out.push('<span class="md-key">'+escapeHtml(parts[i])+"</span>")}return out.join("")},keyBlock(node){const parts=String(node.value).split(/\s*\+\s*/).filter(Boolean);const out=[];for(let i=0;i<parts.length;i++){if(i>0)out.push('<span class="md-key-sep">+</span>');out.push('<span class="md-key big">'+escapeHtml(parts[i])+"</span>")}return'<div class="md-key-block">'+out.join("")+"</div>"},copy(node){const v=String(node.value);return'<span class="md-copy" data-copy="'+escapeHtml(v)+'"><span class="md-copy-text">'+escapeHtml(v)+'</span><i class="fas fa-copy md-copy-icon"></i></span>'},copyBlock(node){const v=String(node.value);return'<div class="md-copy-block" data-copy="'+escapeHtml(v)+'">'+escapeHtml(v)+'<i class="fas fa-copy md-copy-icon"></i></div>'},chat(node,ctx){let html='<div class="chat-wrapper">';if(node.title)html+='<div class="chat-title">'+renderInlineText(node.title,ctx)+"</div>";for(const m of node.messages)html+=renderNode(m,ctx);return html+"</div>"},chatMsg(node,ctx){const user=node.user||{name:node.name,avatar:"",color:""};for(const pp of node.parts){if(pp.type==="redpacket"&&!pp.kv.giver)pp.kv.giver=node.name}const avatarHtml=user.avatar?'<img class="chat-avatar-img" src="'+escapeHtml(__cmSafeImgSrc(user.avatar))+'" alt="" loading="lazy">':'<span class="chat-avatar-fallback" style="background:'+escapeHtml(user.color||autoColor(node.name))+'">'+escapeHtml(node.name.charAt(0))+"</span>";const bubbleParts=renderChatParts(node.parts,ctx);const bare=isBareChatParts(node.parts)?" chat-bubble-bare":"";const side=node.side==="right"?"right":"left";const statusHtml=node.status?'<div class="chat-status">'+renderInlineText(node.status,ctx)+"</div>":"";return'<div class="chat-msg chat-msg-'+side+'" id="'+escapeHtml(node.id)+'" data-author="'+escapeHtml(node.name)+'"><div class="chat-avatar">'+avatarHtml+'</div><div class="chat-content"><div class="chat-meta"><span class="chat-name">'+escapeHtml(node.name)+"</span>"+(node.time?'<span class="chat-time">'+escapeHtml(node.time)+"</span>":"")+'</div><div class="chat-bubble-wrap"><div class="chat-bubble'+bare+'">'+bubbleParts+"</div>"+statusHtml+"</div></div></div>"},chatSys(node,ctx){const cfg=SYS_TYPES[node.sysType]||SYS_TYPES.default;const color=node.colorOverride||cfg.color;const effectClass=cfg.effect?" chat-sys-effect-"+cfg.effect:"";const textHtml=renderInlineText(node.text.trim().replace(/\n+/g," "),ctx);const iconHtml=node.noIcon?"":'<i class="fas '+escapeHtml(node.iconOverride||cfg.icon)+' sys-icon"></i>';return'<div class="chat-sys'+effectClass+'" style="color:'+escapeHtml(color)+'">'+iconHtml+'<span class="sys-text">'+textHtml+"</span></div>"},chatQuote(node,ctx){let preview="";for(const p of node.parts){if(p.type==="text")preview+=(preview?" ":"")+p.text.replace(/\n+/g," ").trim();else if(p.type==="chatQuote")preview+=(preview?" ":"")+__i18nT(ctx,"chat.quote",{name:p.name});else if(p.type==="image")preview+=(preview?" ":"")+__i18nT(ctx,"chat.img");else if(p.type==="redpacket")preview+=(preview?" ":"")+__i18nT(ctx,"chat.rp");else if(p.type==="transfer")preview+=(preview?" ":"")+__i18nT(ctx,"chat.transfer");else if(p.type==="card")preview+=(preview?" ":"")+__i18nT(ctx,"chat.cardTag")}preview=preview.trim();if(!preview&&node.autoPreview)preview=node.autoPreview;preview=preview.slice(0,60);const targetAttr=node.targetId?' data-quote-target="'+escapeHtml(node.targetId)+'"':"";const isSimple=node.parts.length===0||node.parts.length===1&&node.parts[0].type==="text";if(isSimple&&preview){return'<div class="chat-quote"'+targetAttr+'><i class="fas fa-reply chat-quote-arrow"></i><span class="chat-quote-name">'+escapeHtml(node.name)+'</span><span class="chat-quote-text">'+renderInlineText(preview,ctx)+"</span></div>"}return'<div class="chat-quote chat-quote-nested"'+targetAttr+'><div class="chat-quote-head"><i class="fas fa-reply chat-quote-arrow"></i><span class="chat-quote-name">'+escapeHtml(node.name)+'</span></div><div class="chat-quote-inner">'+renderChatParts(node.parts,ctx)+"</div></div>"},circle(node,ctx){return'<span class="md-circle">'+renderNodes(node.children,ctx)+"</span>"},cross(node,ctx){return'<span class="md-cross"><svg viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M8,12 Q35,42 52,52 T94,88" stroke="currentColor" stroke-width="1.6"/><path d="M93,10 Q60,45 45,55 T5,90" stroke="currentColor" stroke-width="1.5"/></svg>'+renderNodes(node.children,ctx)+"</span>"},stamp(node){let c="";if(node.color){const r=resolveColor(node.color);if(r)c=r;else if(/^[a-zA-Z]+$/.test(node.color))c=escapeHtml(node.color)}const s=c?' style="color:'+c+'"':"";return'<span class="md-stamp"'+s+">"+escapeHtml(node.text)+"</span>"},score(node){const v=Math.max(0,Math.min(5,node.value||0)),full=Math.floor(v),half=v-full>=.5;let h='<span class="md-score"><span class="md-score-stars">';for(let i=0;i<full;i++)h+='<i class="fas fa-star"></i>';if(half)h+='<i class="fas fa-star-half-stroke"></i>';for(let j=full+(half?1:0);j<5;j++)h+='<i class="far fa-star"></i>';h+="</span>";if(node.showNum)h+='<span class="md-score-num">'+(v%1===0?v:v.toFixed(1))+"</span>";return h+"</span>"},wave(node,ctx){return'<span class="md-wave">'+renderNodes(node.children,ctx)+"</span>"},echo(node){return'<span class="md-echo" data-text="'+escapeHtml(node.text)+'">'+escapeHtml(node.text)+"</span>"},neon(node){let c="";if(node.color){const r=resolveColor(node.color);if(r)c=r;else if(/^[a-zA-Z]+$/.test(node.color))c=escapeHtml(node.color)}const s=c?' style="color:'+c+'"':"";return'<span class="md-neon"'+s+">"+escapeHtml(node.text)+"</span>"},marker(node,ctx){let c="";if(node.color){const r=resolveColor(node.color);if(r)c=hexToRgba(r,.55);else if(/^[a-zA-Z]+$/.test(node.color))c="color-mix(in srgb, "+escapeHtml(node.color)+" 55%, transparent)"}const s=c?' style="--marker-c:'+c+'"':"";return'<span class="md-marker"'+s+">"+renderNodes(node.children,ctx)+"</span>"},vert(node,ctx){return'<span class="md-vert">'+renderNodes(node.children,ctx)+"</span>"},cursor(node){return'<span class="md-typewriter" data-text="'+escapeHtml(node.text)+'"></span>'},shadow(node,ctx){return'<span class="md-shadow">'+renderNodes(node.children,ctx)+"</span>"},blur(node,ctx){return'<span class="md-blur">'+renderNodes(node.children,ctx)+"</span>"},anchor(node){return'<span class="md-anchor" id="'+escapeHtml(node.target)+'"></span>'},goto(node,ctx){return'<a class="md-goto" href="#'+escapeHtml(node.target)+'" data-goto-target="'+escapeHtml(node.target)+'">'+renderNodes(parseInline(node.label,ctx),ctx)+"</a>"},path(node){let h='<span class="md-path">';for(let i=0;i<node.items.length;i++)h+='<span class="md-path-item">'+escapeHtml(node.items[i])+"</span>";return h+"</span>"},shake(node,ctx){return'<span class="md-shake"'+(node.args?' data-args="'+escapeHtml(node.args)+'"':"")+">"+renderNodes(node.children,ctx)+"</span>"},blurBlock(node,ctx){return'<div class="md-blur">'+renderNodes(node.children,ctx)+"</div>"},dl(node,ctx){const im={zip:"fa-file-zipper",rar:"fa-file-zipper","7z":"fa-file-zipper",pdf:"fa-file-pdf",exe:"fa-microchip",msi:"fa-microchip",doc:"fa-file-word",docx:"fa-file-word",xls:"fa-file-excel",xlsx:"fa-file-excel",ppt:"fa-file-powerpoint",pptx:"fa-file-powerpoint",txt:"fa-file-lines",md:"fa-file-lines",png:"fa-file-image",jpg:"fa-file-image",jpeg:"fa-file-image",gif:"fa-file-image",svg:"fa-bezier-curve",webp:"fa-file-image",mp3:"fa-music",wav:"fa-music",flac:"fa-music",mp4:"fa-video",avi:"fa-video",mov:"fa-video",mkv:"fa-video"};const dot=node.filename.lastIndexOf(".");const ext=dot>0?node.filename.slice(dot+1).toLowerCase():"";const icon=dlIconHtml(node.icon,im[ext]||"fa-file");let meta="";if(node.size)meta+="<span>"+escapeHtml(node.size)+"</span>";if(node.date)meta+="<span>"+escapeHtml(node.date)+"</span>";let __sums="";if(node.checksums&&node.checksums.length){const __lbl={sha256:"SHA-256",sha512:"SHA-512",sha384:"SHA-384",sha1:"SHA-1",md5:"MD5",crc32:"CRC32",xxh3:"XXH3",blake3:"BLAKE3",blake2b:"BLAKE2b"};let __rows="";for(let __i=0;__i<node.checksums.length;__i++){const __s=node.checksums[__i];const __lb=__lbl[__s.algo]||__s.algo.toUpperCase();const __v=__s.value;__rows+='<div class="dl-checksum"><span class="dl-checksum-label">'+escapeHtml(__lb)+'</span><span class="md-copy dl-checksum-value" data-copy="'+escapeHtml(__v)+'" title="'+escapeHtml(__v)+'"><span class="dl-hash"><span class="md-copy-text">'+escapeHtml(__v)+'</span></span><i class="fas fa-copy md-copy-icon"></i></span></div>'}__sums='<div class="dl-checksums">'+__rows+"</div>"}const __dlUrl=__cmSafeHrefAttr(node.url),__dlVerify=__cmSafeHrefAttr(node.verify);const btn=__dlUrl?'<a href="'+escapeHtml(__dlUrl)+'" class="dl-btn" download><i class="fas fa-download"></i> '+escapeHtml(__i18nT(ctx,"dl.download"))+"</a>":"";const __vf=__dlVerify?'<a class="dl-verify" href="'+escapeHtml(__dlVerify)+'" target="_blank" rel="noopener"><i class="fas fa-shield-halved"></i> '+escapeHtml(__i18nT(ctx,"dl.verify"))+"</a>":"";let __actions="";if(btn||__vf){__actions='<div class="dl-actions">'+btn+__vf+"</div>"}return'<div class="dl-card"><div class="dl-header"><div class="dl-icon">'+icon+'</div><div class="dl-info"><div class="dl-name">'+escapeHtml(node.filename)+'</div><div class="dl-meta">'+meta+"</div></div></div>"+__sums+__actions+"</div>"},chartbar(node,ctx){if(!node.items.length)return"";const __FU=CHART_UNITS[ctx.langKey]||CHART_UNITS["zh-CN"];function fmtY(v){if(v===0)return"0";if(v>=1e100)return v.toExponential(1);for(let f=0;f<__FU.length;f++){if(v>=__FU[f].v){const n=v/__FU[f].v;return(n%1===0?n:n.toFixed(1).replace(/\.0$/,""))+__FU[f].s}}return v.toString()}if(node.stacked){const __names=[],__cm={};node.items.forEach(it=>{it.segments.forEach(s=>{if(__names.indexOf(s.name)<0){__names.push(s.name);__cm[s.name]=AUTO_COLORS[(__names.length-1)%AUTO_COLORS.length]}})});let __sv=0;node.items.forEach(it=>{let t=0;it.segments.forEach(s=>{t+=s.value});if(t>__sv)__sv=t});if(__sv===0)__sv=10;const __sm=Math.pow(10,Math.floor(Math.log10(__sv)));let __maxA=Math.ceil(__sv/__sm)*__sm;if(__maxA===__sv)__maxA+=__sm;let __yA="",__g="";for(let __i=0;__i<=4;__i++){const __p=__i*25,__yv=__maxA*(__i/4);__yA+='<div class="chart-y-axis-label" style="bottom:'+__p+'%;">'+fmtY(__yv)+"</div>";__g+='<div class="chart-grid-line" style="bottom:'+__p+'%;"></div>'}const __bars=node.items.map(d=>{let __tot=0;d.segments.forEach(s=>{__tot+=s.value});const __h=(__tot/__maxA*100).toFixed(2);let __seg="";for(let __si=d.segments.length-1;__si>=0;__si--){const s=d.segments[__si];const __sh=(s.value/__maxA*100).toFixed(2);__seg+='<div class="bar-seg" style="height:'+__sh+"%;background:"+escapeHtml(__cm[s.name])+'" title="'+escapeHtml(s.name)+": "+s.value+'"></div>'}return'<div class="bar-item"><div class="bar-fill bar-stacked" style="height:'+__h+'%"><div class="bar-value">'+escapeHtml(String(__tot))+"</div>"+__seg+'</div><div class="bar-label">'+escapeHtml(d.label)+"</div></div>"}).join("");let __leg="";if(__names.length>1){__leg='<div class="chart-legend">';__names.forEach(n=>{__leg+='<div class="chart-legend-item"><span class="chart-legend-swatch" style="background:'+escapeHtml(__cm[n])+'"></span><span>'+escapeHtml(n)+"</span></div>"});__leg+="</div>"}return'<div class="md-chartbar"><div class="chart-title">'+escapeHtml(node.title)+"</div>"+__leg+'<div class="chart-wrapper"><div class="chart-y-axis-wrap"><div class="chart-y-axis">'+__yA+'</div></div><div class="bar-scroll-wrap"><div class="bar-chart"><div class="chart-grid-wrap"><div class="chart-grid">'+__g+"</div></div>"+__bars+"</div></div></div></div>"}let maxV=Math.max(...node.items.map(d=>d.value));if(maxV===0)maxV=10;const mag=Math.pow(10,Math.floor(Math.log10(maxV)));let maxAxis=Math.ceil(maxV/mag)*mag;if(maxAxis===maxV)maxAxis+=mag;let yAxisHtml="",gridHtml="";for(let i=0;i<=4;i++){const pct=i*25;const yv=maxAxis*(i/4);yAxisHtml+='<div class="chart-y-axis-label" style="bottom:'+pct+'%;">'+fmtY(yv)+"</div>";gridHtml+='<div class="chart-grid-line" style="bottom:'+pct+'%;"></div>'}const bars=node.items.map(d=>{const h=(d.value/maxAxis*100).toFixed(2);return'<div class="bar-item"><div class="bar-fill" style="height:'+h+'%"><div class="bar-value">'+escapeHtml(d.raw!==undefined?d.raw:d.value)+'</div></div><div class="bar-label">'+escapeHtml(d.label)+"</div></div>"}).join("");return'<div class="md-chartbar"><div class="chart-title">'+escapeHtml(node.title)+'</div><div class="chart-wrapper"><div class="chart-y-axis-wrap"><div class="chart-y-axis">'+yAxisHtml+'</div></div><div class="bar-scroll-wrap"><div class="bar-chart"><div class="chart-grid-wrap"><div class="chart-grid">'+gridHtml+"</div></div>"+bars+"</div></div></div></div>"},chartline(node,ctx){const W=500,H=200,pL=60,pR=20,pT=10,pB=30,cw=W-pL-pR,ch=H-pT-pB;let mv=0;node.series.forEach(s=>{s.data.forEach(v=>{if(v>mv)mv=v})});mv=mv===0?10:Math.ceil(mv*1.1);let g="";for(let i=0;i<=5;i++){const yv=mv*(i/5);const yp=pT+ch-ch*(i/5);g+='<line x1="'+pL+'" y1="'+yp+'" x2="'+(W-pR)+'" y2="'+yp+'" style="stroke:var(--clc-grid);stroke-width:1.5;stroke-dasharray:3 3"/>';g+='<text x="'+(pL-12)+'" y="'+(yp+6)+'" font-size="18" font-family="monospace" font-weight="600" text-anchor="end" style="fill:var(--clc-text)">'+Math.round(yv)+"</text>"}let xl="";const xS=cw/(node.labels.length-1||1);node.labels.forEach((lbl,i)=>{const xp=pL+xS*i;xl+='<text x="'+xp+'" y="'+(H-5)+'" font-size="18" font-family="monospace" font-weight="600" text-anchor="middle" style="fill:var(--clc-text)">'+escapeHtml(lbl)+"</text>"});let ln="";node.series.forEach((s,si)=>{const ci=si%8+1;const col="var(--clc-"+ci+")";const pts=s.data.map((val,i)=>{const xp=pL+xS*i;const yp=pT+ch-ch*(val/mv);return{x:xp,y:yp,v:val}});const ps=pts.map(p=>p.x+","+p.y).join(" ");const dash=s.type==="dashed"?"stroke-dasharray:6 6;":"";ln+='<polyline points="'+ps+'" style="fill:none;stroke:'+col+";stroke-width:3;stroke-linecap:round;stroke-linejoin:round;"+dash+'"/>';pts.forEach(p=>{ln+='<circle cx="'+p.x+'" cy="'+p.y+'" r="4.5" style="stroke:'+col+';stroke-width:3;fill:var(--clc-bg)"><title>'+escapeHtml(s.name)+": "+p.v+"</title></circle>"})});let lg="";node.series.forEach((s,si)=>{const ci=si%8+1;const col="var(--clc-"+ci+")";const sw=s.type==="dashed"?'<svg class="chart-legend-swatch" width="24" height="6" viewBox="0 0 24 6"><rect x="0" y="1" width="6" height="4" rx="2" style="fill:'+col+'"/><rect x="9" y="1" width="6" height="4" rx="2" style="fill:'+col+'"/><rect x="18" y="1" width="6" height="4" rx="2" style="fill:'+col+'"/></svg>':'<span class="chart-legend-swatch" style="background:'+col+'"></span>';lg+='<div class="chart-legend-item">'+sw+"<span>"+escapeHtml(s.name)+"</span></div>"});return'<div class="md-chartline"><div class="chart-title">'+escapeHtml(node.title)+'</div><div class="chart-legend">'+lg+'</div><div class="chart-body"><svg viewBox="0 0 '+W+" "+H+'" class="chart-svg">'+g+xl+ln+"</svg></div></div>"},ghr(node,ctx){const footerHtml=node.footer?'<div class="ghr-footer"><span class="custom">'+escapeHtml(node.footer)+"</span></div>":"";return'<a class="md-ghr md-ghr-static" href="https://github.com/'+escapeHtml(node.repo)+'" target="_blank" rel="noopener"><div class="ghr-header"><div class="ghr-avatar"><i class="fab fa-github"></i></div><div class="ghr-name">'+escapeHtml(node.repo)+'</div></div><div class="ghr-desc">'+escapeHtml(__i18nT(ctx,"ghr.repository"))+"</div>"+footerHtml+"</a>\n"},collage(node,ctx){const lay=node.layout;let out='<div class="md-collage md-collage--'+lay+'">';for(let i=0;i<node.items.length;i++){const it=node.items[i];let itemStyle="",imgInline="";if(lay==="1"){let W=0,H=0;if(it.width&&/^\d+$/.test(it.width))W=parseInt(it.width,10);if(it.height&&/^\d+$/.test(it.height))H=parseInt(it.height,10);if(W||H){let st="";let mw=0;if(W&&H){st="width:100%;max-width:"+W+"px;height:auto;max-height:"+H+"px;object-fit:contain;display:block;margin:0 auto;position:static;";mw=W}else if(W){st="width:100%;max-width:"+W+"px;height:auto;object-fit:contain;display:block;margin:0 auto;position:static;";mw=W}else{st="width:auto;max-width:100%;height:auto;max-height:"+H+"px;object-fit:contain;display:block;margin:0 auto;position:static;";mw=Math.round(H*1.6)}itemStyle=' style="max-width:'+mw+'px"';imgInline=' style="'+st+'"'}}const __cs=__cmSafeImgSrc(it.src),__ch=__cmSafeHrefAttr(it.src)||"#";out+='<a class="md-collage-item" href="'+escapeHtml(__ch)+'" data-index="'+i+'"'+itemStyle+'><span class="md-collage-loading"><i class="fas fa-spinner fa-spin"></i></span><img src="'+escapeHtml(__cs)+'" alt="'+escapeHtml(it.alt)+'" loading="lazy"'+imgInline+(it.title?' title="'+escapeHtml(it.title)+'"':"")+"></a>"}return out+"</div>"},scrBlock(node,ctx){let p=node.params||"";let c="gold",t="",r=.65;const rm=p.match(/(?:^|\s)ratio=([\d.]+)(?=\s|$)/);if(rm){r=parseFloat(rm[1])||.65;if(r<=0||r>1)r=.65;p=p.replace(rm[0]," ")}const tm=p.match(/"((?:\\.|[^"\\])*)"/);if(tm){t=tm[1].replace(/\\(.)/g,"$1");p=p.replace(tm[0]," ")}const ps=p.trim().split(/\s+/).filter(Boolean);if(ps.length>0)c=ps[0];return'<div class="md-scratch" data-color="'+escapeHtml(c)+'" data-tip="'+escapeHtml(t)+'" data-ratio="'+r+'"><div class="md-scratch-content">'+renderNodes(node.children,ctx)+"</div></div>"},criticAdd(node,ctx){return'<ins class="md-critic-add">'+renderNodes(node.children,ctx)+"</ins>"},criticDel(node,ctx){return'<del class="md-critic-del">'+renderNodes(node.children,ctx)+"</del>"},criticReplace(node,ctx){return'<del class="md-critic-del">'+renderNodes(node.oldContent,ctx)+'</del><ins class="md-critic-add">'+renderNodes(node.newContent,ctx)+"</ins>"},criticHighlight(node,ctx){return'<mark class="md-critic-highlight">'+renderNodes(node.children,ctx)+"</mark>"},criticComment(node,ctx){const t=ctx.config&&ctx.config.tip!==false?' data-tip="'+escapeHtml(node.text)+'"':"";return'<span class="md-critic-comment"'+t+'><i class="far fa-comment-dots"></i></span>'},figure(node,ctx){const id="fig-"+node.num;const cap=node.title?" · "+renderNodes(parseInline(node.title,ctx),ctx):"";const lbl=__i18nT(ctx,"fig.label",{n:node.num});return'<figure class="md-figure" id="'+escapeHtml(id)+'">'+renderNodes(node.children,ctx)+'<figcaption class="md-figure-caption">'+escapeHtml(lbl)+cap+"</figcaption></figure>"},tblBlock(node,ctx){const id="tbl-"+node.num;const cap=node.title?" · "+renderNodes(parseInline(node.title,ctx),ctx):"";const lbl=__i18nT(ctx,"tbl.label",{n:node.num});return'<div class="md-tbl-block" id="'+escapeHtml(id)+'"><div class="md-tbl-caption">'+escapeHtml(lbl)+cap+"</div>"+renderNodes(node.children,ctx)+"</div>"},eqBlock(node,ctx){const id="eq-"+node.key;let body;if(katexLib){try{body=katexLib.renderToString(node.text,{displayMode:true,throwOnError:false})}catch(e){body='<span class="math-block" data-tex="'+escapeHtml(node.text)+'">'+escapeHtml("$$"+node.text+"$$")+"</span>"}}else{body='<span class="math-block" data-tex="'+escapeHtml(node.text)+'">'+escapeHtml("$$"+node.text+"$$")+"</span>"}const lbl=__i18nT(ctx,"eq.label",{n:node.num});return'<div class="md-eq-block" id="'+escapeHtml(id)+'"><span class="md-eq-body">'+body+'</span><span class="md-eq-num">'+escapeHtml(lbl)+"</span></div>"},figRef(node,ctx){const key=node.key;const idx=ctx.figIndex||{};const __ne=n=>{for(const k in idx){if(idx[k]===n)return true}return false};if(idx[key]!==undefined){const __n0=idx[key];return'<a class="md-figref" href="#fig-'+__n0+'">'+escapeHtml(__i18nT(ctx,"fig.label",{n:__n0}))+"</a>"}if(/^\d+(?:-\d+)?(?:,\d+(?:-\d+)?)*$/.test(key)){const parts=key.split(",");let ok=true;for(let pi=0;pi<parts.length;pi++){const p=parts[pi];if(p.indexOf("-")>=0){const r=p.split("-");const a=parseInt(r[0],10),b=parseInt(r[1],10);for(let i=a;i<=b;i++){if(!__ne(i)){ok=false;break}}if(!ok)break}else if(!__ne(parseInt(p,10))){ok=false;break}}if(ok){const __ln=[];for(let pj=0;pj<parts.length;pj++){const p2=parts[pj];if(p2.indexOf("-")>=0){const r2=p2.split("-");const a2=parseInt(r2[0],10),b2=parseInt(r2[1],10);for(let k2=a2;k2<=b2;k2++)__ln.push(k2)}else __ln.push(parseInt(p2,10))}const __html=__ln.map(n=>'<a class="md-figref" href="#fig-'+n+'">'+escapeHtml(__i18nT(ctx,"fig.label",{n:n}))+"</a>").join("、");return'<span class="md-figref">'+__html+"</span>"}if(ctx.__warnings)ctx.__warnings.push({type:"ref-missing",kind:"fig",key:key});return'<span class="md-figref md-figref-missing">'+escapeHtml(__i18nT(ctx,"fig.refMissing",{key:key}))+"</span>"}if(ctx.__warnings)ctx.__warnings.push({type:"ref-missing",kind:"fig",key:key});return'<span class="md-figref md-figref-missing">'+escapeHtml(__i18nT(ctx,"fig.refMissing",{key:key}))+"</span>"},tblRef(node,ctx){const key=node.key;const idx=ctx.tblIndex||{};const __ne=n=>{for(const k in idx){if(idx[k]===n)return true}return false};if(idx[key]!==undefined){const __n0=idx[key];return'<a class="md-tblref" href="#tbl-'+__n0+'">'+escapeHtml(__i18nT(ctx,"tbl.label",{n:__n0}))+"</a>"}if(/^\d+(?:-\d+)?(?:,\d+(?:-\d+)?)*$/.test(key)){const parts=key.split(",");let ok=true;for(let pi=0;pi<parts.length;pi++){const p=parts[pi];if(p.indexOf("-")>=0){const r=p.split("-");const a=parseInt(r[0],10),b=parseInt(r[1],10);for(let i=a;i<=b;i++){if(!__ne(i)){ok=false;break}}if(!ok)break}else if(!__ne(parseInt(p,10))){ok=false;break}}if(ok){const __ln=[];for(let pj=0;pj<parts.length;pj++){const p2=parts[pj];if(p2.indexOf("-")>=0){const r2=p2.split("-");const a2=parseInt(r2[0],10),b2=parseInt(r2[1],10);for(let k2=a2;k2<=b2;k2++)__ln.push(k2)}else __ln.push(parseInt(p2,10))}const __html=__ln.map(n=>'<a class="md-tblref" href="#tbl-'+n+'">'+escapeHtml(__i18nT(ctx,"tbl.label",{n:n}))+"</a>").join("、");return'<span class="md-tblref">'+__html+"</span>"}if(ctx.__warnings)ctx.__warnings.push({type:"ref-missing",kind:"tbl",key:key});return'<span class="md-tblref md-tblref-missing">'+escapeHtml(__i18nT(ctx,"tbl.refMissing",{key:key}))+"</span>"}if(ctx.__warnings)ctx.__warnings.push({type:"ref-missing",kind:"tbl",key:key});return'<span class="md-tblref md-tblref-missing">'+escapeHtml(__i18nT(ctx,"tbl.refMissing",{key:key}))+"</span>"},eqRef(node,ctx){const key=node.key;const idx=ctx.eqIndex||{};const __ne=n=>{for(const k in idx){if(idx[k]===n)return true}return false};if(idx[key]!==undefined){const __n0=idx[key];return'<a class="md-eqref" href="#eq-'+__n0+'">'+escapeHtml(__i18nT(ctx,"eq.label",{n:__n0}))+"</a>"}if(/^\d+(?:-\d+)?(?:,\d+(?:-\d+)?)*$/.test(key)){const parts=key.split(",");let ok=true;for(let pi=0;pi<parts.length;pi++){const p=parts[pi];if(p.indexOf("-")>=0){const r=p.split("-");const a=parseInt(r[0],10),b=parseInt(r[1],10);for(let i=a;i<=b;i++){if(!__ne(i)){ok=false;break}}if(!ok)break}else if(!__ne(parseInt(p,10))){ok=false;break}}if(ok){const __ln=[];for(let pj=0;pj<parts.length;pj++){const p2=parts[pj];if(p2.indexOf("-")>=0){const r2=p2.split("-");const a2=parseInt(r2[0],10),b2=parseInt(r2[1],10);for(let k2=a2;k2<=b2;k2++)__ln.push(k2)}else __ln.push(parseInt(p2,10))}const __html=__ln.map(n=>'<a class="md-eqref" href="#eq-'+n+'">'+escapeHtml(__i18nT(ctx,"eq.label",{n:n}))+"</a>").join("、");return'<span class="md-eqref">'+__html+"</span>"}if(ctx.__warnings)ctx.__warnings.push({type:"ref-missing",kind:"eq",key:key});return'<span class="md-eqref md-eqref-missing">'+escapeHtml(__i18nT(ctx,"eq.refMissing",{key:key}))+"</span>"}if(ctx.__warnings)ctx.__warnings.push({type:"ref-missing",kind:"eq",key:key});return'<span class="md-eqref md-eqref-missing">'+escapeHtml(__i18nT(ctx,"eq.refMissing",{key:key}))+"</span>"}};function renderNode(node,ctx){if(!node)return"";if(node.type==="cfg"){const __c=node.config;applyArticleConfig(ctx,__c);return ctx.config.keepmd&&node._md?'<div style="display:none" data-md="'+escapeHtml(node._md)+'"></div>':""}const fn=RENDERERS[node.type];if(!fn)return"";let html=fn(node,ctx);if(node.unclosed&&html&&html.charAt(0)==="<")html=html.replace(/^<([a-z]+)/,'<$1 data-unclosed="true"');if(ctx.config.keepmd&&node._md&&html&&html.charAt(0)==="<")html=html.replace(/^<([a-z0-9-]+)/,'<$1 data-md="'+escapeHtml(node._md)+'"');return html}function renderBlockChildren(nodes,ctx){const parts=[];for(const n of nodes)parts.push(renderNode(n,ctx));return parts.join("\n")}function renderNodes(nodes,ctx){if(!nodes||!nodes.length)return"";let out="";for(let i=0;i<nodes.length;i++)out+=renderNode(nodes[i],ctx);return out}function applyArticleConfig(ctx,cfg){if(cfg.__reset){ctx.config=Object.assign({},DEFAULT_CONFIG);if(ctx.hostConfig){for(var hk in ctx.hostConfig){if(hk!=="locked"&&hk!=="env")ctx.config[hk.toLowerCase()]=ctx.hostConfig[hk]}}ctx.i18n=__resolveI18n(ctx.hostConfig&&ctx.hostConfig.lang,ctx.hostConfig&&ctx.hostConfig.i18n);ctx.langKey=__normLang(ctx.hostConfig&&ctx.hostConfig.lang)||"zh-CN"}for(var k in cfg){if(k==="__reset"||k==="locked")continue;if(ctx.locked&&ctx.locked.indexOf(k)!==-1){if(!ctx.__warnings)ctx.__warnings=[];ctx.__warnings.push({type:"locked",key:k});continue}if(k==="lang"){var __normed=__normLang(cfg.lang);if(__normed&&I18N_DICT[__normed]){ctx.i18n=__resolveI18n(__normed,ctx.hostConfig&&ctx.hostConfig.i18n);ctx.langKey=__normed}continue}ctx.config[k]=cfg[k];if(k==="dropcap")ctx.dropcapDone=false}if(cfg.gfm!==undefined){if(!ctx.locked||ctx.locked.indexOf("table")===-1)ctx.config.table=cfg.gfm;if(!ctx.locked||ctx.locked.indexOf("tasklist")===-1)ctx.config.tasklist=cfg.gfm;if(!ctx.locked||ctx.locked.indexOf("strike")===-1)ctx.config.strike=cfg.gfm;if(!ctx.locked||ctx.locked.indexOf("autolink")===-1)ctx.config.autolink=cfg.gfm}}function renderMarkdown(md,userConfig){if(!md)return"";md=__normDoc(String(md).replace(/\r\n?/g,"\n"));const ctx=createContext(userConfig);ctx.stamp=userConfig&&userConfig.seed!==undefined?String(userConfig.seed):__cmHash(md);if(ctx.config.gfm===false){if(ctx.locked.indexOf("table")===-1)ctx.config.table=false;if(ctx.locked.indexOf("tasklist")===-1)ctx.config.tasklist=false;if(ctx.locked.indexOf("strike")===-1)ctx.config.strike=false;if(ctx.locked.indexOf("autolink")===-1)ctx.config.autolink=false}md=__cmRefJoinLabel(md.split("\n"),ctx).join("\n");preScanRefLinks(md,ctx);const ast=parseBlocks(md,ctx);ctx.config=Object.assign({},DEFAULT_CONFIG);if(userConfig&&userConfig.preset&&SPEC_PRESETS[userConfig.preset])Object.assign(ctx.config,SPEC_PRESETS[userConfig.preset]);ctx.i18n=__resolveI18n(userConfig&&userConfig.lang,userConfig&&userConfig.i18n);ctx.langKey=__normLang(userConfig&&userConfig.lang)||"zh-CN";if(userConfig){for(const ck in userConfig){if(ck!=="locked"&&ck!=="env")ctx.config[ck.toLowerCase()]=userConfig[ck]}}let html=renderNode(ast,ctx);if(ctx.footnoteCount>0){const __fnN=ctx.footnoteCount;let fh='<div class="footnotes">';for(let i=1;i<=__fnN;i++){const def=ctx.footnoteDefs[i];if(!def)continue;fh+='<div class="footnote-def" id="footnote-def-'+i+'"><a class="footnote-back" data-footnote-back="'+i+'">↩</a> <span class="footnote-number">['+i+"]</span> "+renderNodes(parseInline(def.content.replace(/\n/g,"<br>"),ctx),ctx)+"</div>"}fh+="</div>";html+=fh}try{if(html.indexOf('data-unclosed="true"')!==-1){const __uc=(html.match(/data-unclosed="true"/g)||[]).length;console.warn(__i18nT(ctx,"warn.unclosed",{n:__uc}))}}catch(e){}__lastMeta=ctx.meta||null;if(ctx.config.copy===false)html=html.replace(/<button class="copy-btn"[\s\S]*?<\/button>/g,"");html=__pluginBefore(html,ctx);html=__pluginAfter(html,ctx);return html.replace(/\n{3,}/g,"\n\n")}function parseFcFields(b){var L=b.split("\n"),F=[],C=null;for(var i=0;i<L.length;i++){var m=L[i].match(/^([^\s::]{1,12})[::]\s*(.*)$/);if(m){if(C)F.push(C);C={label:m[1],content:[m[2]]}}else if(C)C.content.push(L[i])}if(C)F.push(C);return F.map(function(f){return{label:f.label,content:f.content.join("\n")}})}function parseKanbanCols(raw){var L=raw.split("\n"),out=[],cur=null;for(var i=0;i<L.length;i++){var m=L[i].match(/^:::col(?:\s+(.*))?\s*$/);if(m){if(cur)out.push(cur);cur={header:(m[1]||"").trim(),body:[]}}else if(cur)cur.body.push(L[i])}if(cur)out.push(cur);return out.map(function(c){return{header:c.header,body:c.body.join("\n")}})}function parseKanbanCards(b){var L=b.split("\n"),cs=[],i=0;while(i<L.length){var ln=L[i],sm=ln.match(/^\s*[-*+]\s+(.+)$/);if(sm){cs.push({type:"simple",raw:sm[1]});i++;continue}var cm=ln.match(/^:::task(?:\s+(.*))?\s*$/);if(cm){var t=(cm[1]||"").trim(),bod=[],d=1,j=i+1;while(j<L.length){var l=L[j];if(/^:::\/[a-z]/i.test(l)||/^:::\s*$/.test(l)){d--;if(d===0)break}else if(/^:::[a-z]/i.test(l))d++;bod.push(l);j++}cs.push({type:"task",title:t,body:bod.join("\n")});i=j+1;continue}i++}return cs}function parseKbColH(s){var c=null,m=s.match(/(?:^|\s)color=(\S+)(?:\s|$)/);if(m)c=m[1];return{title:s.replace(/\s*color=\S+\s*/g," ").trim(),color:c}}function isDoneCol(t,c){if(c){var x=c.toLowerCase();if(x==="green"||x==="#10b981"||x==="#22c55e")return true}return/完成|done|finished/i.test(t||"")}function tryBuildNew(type,plus,title,raw,ctx){if(type==="vote"){var allRaw=null,am=title.match(/all=(\S+)/);if(am)allRaw=am[1];var t=title.replace(/all=\S+\s*/g," ").trim(),L=raw.split("\n"),o=[];for(var i=0;i<L.length;i++){var line=L[i].trim();if(!line)continue;var mm=line.match(/^[-*+]\s+(.+)$/),content=mm?mm[1]:line;var p=content.split("|").map(function(x){return x.trim()}),mk=false;if(p.length>=2&&p[p.length-1].toLowerCase()==="mark"){mk=true;p.pop()}var n=p[0]||"",v=null;if(p.length>=2&&/^\d+$/.test(p[1]))v=parseInt(p[1],10);o.push({name:n,votes:v,mark:mk})}return{type:"vote",title:t,all:allRaw,plus:plus,opts:o}}if(type==="flashcard")return{type:"flashcard",flip:/\bflip=y\b/i.test(title)?"y":"x",fields:parseFcFields(raw)};if(type==="flashcards"){var ch=raw.split(/\n\s*\n/).map(function(s){return s.trim()}).filter(Boolean),it=[];for(var k=0;k<ch.length;k++){var f=parseFcFields(ch[k]);if(f.length)it.push(f)}return{type:"flashcards",flip:/\bflip=y\b/i.test(title)?"y":"x",shuffleOff:/\bshuffle=0\b/i.test(title),items:it}}if(type==="kanban"){var cm=title.match(/(?:^|\s)cols=(\d+)(?:\s|$)/);return{type:"kanban",title:title.replace(/\s*cols=\d+\s*/g," ").trim(),cols:cm?parseInt(cm[1],10):0,colData:parseKanbanCols(raw)}}return null}function renderVoteNode(n,ctx){var A=false,S=0,o=n.opts;for(var i=0;i<o.length;i++)if(o[i].votes!=null){A=true;S+=o[i].votes}var D=S,h='<div class="md-vote">';if(n.title)h+='<div class="md-vote-title"><i class="fas fa-square-poll-vertical"></i>'+escapeHtml(n.title)+"</div>";h+='<div class="md-vote-opts">';for(var k=0;k<o.length;k++){var q=o[k],sb=A&&q.votes!=null&&D>0,pc=sb?q.votes/D*100:0;h+='<div class="md-vote-opt'+(q.mark?" mark":"")+'">';if(sb)h+='<span class="md-vote-bar" style="width:'+pc.toFixed(2)+'%"></span>';h+='<span class="md-vote-label">'+escapeHtml(q.name)+"</span>";if(sb)h+='<span class="md-vote-pct">'+pc.toFixed(1).replace(/\.0$/,"")+'%</span><span class="md-vote-count">('+q.votes+")</span>";h+="</div>"}h+="</div>";if(n.all!=null){h+='<div class="md-vote-meta">'+escapeHtml(String(n.all))+"</div>"}else if(n.plus){h+='<div class="md-vote-meta">'+escapeHtml(String(S))+"</div>"}return h+"</div>"}function renderFcCardNode(F,fl,ctx){var f=F[0]||{label:"",content:""},b=F[1]||{label:"",content:""};return'<div class="md-fc" data-flip="'+(fl||"x")+'"><div class="md-fc-inner"><div class="md-fc-face md-fc-front"><div class="md-fc-label"><i class="fas fa-circle-question"></i>'+escapeHtml(f.label||"")+'</div><div class="md-fc-body">'+renderNodes(parseBlocks(f.content,ctx).children,ctx)+'</div><div class="md-fc-hint"><i class="fas fa-rotate"></i>'+escapeHtml(__i18nT(ctx,"fc.hint"))+'</div></div><div class="md-fc-face md-fc-back"><div class="md-fc-label"><i class="fas fa-circle-check"></i>'+escapeHtml(b.label||"")+'</div><div class="md-fc-body">'+renderNodes(parseBlocks(b.content,ctx).children,ctx)+"</div></div></div></div>"}function renderFlashcardNode(n,ctx){return'<div class="md-fc-list">'+renderFcCardNode(n.fields,n.flip,ctx)+"</div>"}function renderFlashcardsNode(n,ctx){var N=n.items.length;if(!N)return"";var h='<div class="md-fcs" data-cur="0" data-flip="'+n.flip+'"><div class="md-fcs-stage">';for(var i=0;i<N;i++)h+=renderFcCardNode(n.items[i],n.flip,ctx);h+='</div><div class="md-fcs-controls"><button class="md-fcs-btn md-fcs-prev"><i class="fas fa-chevron-left"></i></button><span class="md-fcs-counter">1 / '+N+'</span><button class="md-fcs-btn md-fcs-next"><i class="fas fa-chevron-right"></i></button>';if(!n.shuffleOff)h+='<button class="md-fcs-btn md-fcs-shuffle"><i class="fas fa-shuffle"></i>'+escapeHtml(__i18nT(ctx,"fcs.shuffle"))+"</button>";h+='</div><div class="md-fcs-dots">';for(var k=0;k<N;k++)h+='<span class="md-fcs-dot'+(k===0?" active":"")+'" data-i="'+k+'"></span>';return h+"</div></div>"}function renderKanbanCardNode(c,ctx){var TC={high:"#e74c6f",mid:"#f59e0b",low:"#10b981",bug:"#e74c6f",feat:"#10b981",doc:"#4a90d9",fix:"#f59e0b"};if(c.type==="simple"){var r=c.raw,tg=[],mt=[];r=r.replace(/(?:^|\s)#([\w\u4e00-\u9fa5-]+)/g,function(_,t){tg.push(t);return""});r=r.replace(/(?:^|\s)@([\w\u4e00-\u9fa5-]+)/g,function(_,u){mt.push(u);return""});var h='<div class="md-kanban-card"><div class="md-kanban-card-title">'+escapeHtml(r.trim())+"</div>";if(tg.length||mt.length){h+='<div class="md-kanban-tags">';for(var i=0;i<tg.length;i++){var x=TC[tg[i].toLowerCase()]||"#6b5acf";h+='<span class="md-kanban-tag" style="background:'+x+"22;color:"+x+'">#'+escapeHtml(tg[i])+"</span>"}for(var j=0;j<mt.length;j++)h+='<span class="md-kanban-mention"><i class="fas fa-user"></i>'+escapeHtml(mt[j])+"</span>";h+="</div>"}return h+"</div>"}var h2='<div class="md-kanban-card">';if(c.title)h2+='<div class="md-kanban-card-title">'+escapeHtml(c.title)+"</div>";if(c.body&&c.body.trim())h2+='<div class="md-kanban-card-body">'+renderNodes(parseBlocks(c.body,ctx).children,ctx)+"</div>";return h2+"</div>"}function renderKanbanNode(n,ctx){var h='<div class="md-kanban"'+(n.cols?' data-cols="'+n.cols+'"':"")+">";if(n.title)h+='<div class="md-kanban-title"><i class="fas fa-table-columns"></i>'+escapeHtml(n.title)+"</div>";for(var i=0;i<n.colData.length;i++){var col=n.colData[i],ph=parseKbColH(col.header),dn=isDoneCol(ph.title,ph.color),cs=parseKanbanCards(col.body),st=ph.color?' style="--col-color:'+escapeHtml(ph.color)+'"':"";h+='<div class="md-kanban-col"'+st+(dn?' data-done="1"':"")+'><div class="md-kanban-head"><span>'+escapeHtml(ph.title||"")+'</span><span class="md-kanban-count">'+cs.length+"</span></div>";for(var k=0;k<cs.length;k++)h+=renderKanbanCardNode(cs[k],ctx);h+="</div>"}return h+"</div>"}RENDERERS.vote=function(n,c){return renderVoteNode(n,c)};RENDERERS.flashcard=function(n,c){return renderFlashcardNode(n,c)};RENDERERS.flashcards=function(n,c){return renderFlashcardsNode(n,c)};RENDERERS.kanban=function(n,c){return renderKanbanNode(n,c)};RENDERERS.btnimg=function(node,ctx){const attrs=node.attrs||{};let imgStyle="";if(attrs.height)imgStyle+="height:"+parseInt(attrs.height,10)+"px;width:auto;";if(attrs.width)imgStyle+="width:"+parseInt(attrs.width,10)+"px;height:auto;";const img='<img src="'+escapeHtml(__cmSafeImgSrc(node.src))+'" alt="'+escapeHtml(node.alt)+'"'+(imgStyle?' style="'+imgStyle+'"':"")+">";if(attrs.dis===true)return'<span class="md-btn-img md-dis" aria-disabled="true">'+img+"</span>";const safeHref=isSafeHref(node.href)?node.href:"#";const target=attrs.target==="_self"?"":' target="_blank" rel="noopener"';return'<a class="md-btn-img" href="'+escapeHtml(safeHref)+'"'+target+">"+img+"</a>"};RENDERERS.style=function(node,ctx){return'<span style="'+buildStyle(node.attrs||{})+'">'+renderNodes(node.children,ctx)+"</span>"};RENDERERS.styleBlock=function(node,ctx){return'<div class="md-style-block" style="'+buildStyle(node.attrs||{})+'">'+renderNodes(node.children,ctx)+"</div>"};RENDERERS.btnImgBlock=function(node,ctx){const attrs=node.attrs||{};const align=attrs.align||"left";const gap=attrs.gap?parseInt(attrs.gap,10):12;const stack=attrs.stack===true;const items=[];for(let i=0;i<node.lines.length;i++){const parts=node.lines[i].split("|").map(s=>s.trim());const alt=parts[0]||"",imgSrc=parts[1]||"",href=parts[2]||"",h=parts[3]?parseInt(parts[3],10):0;if(!imgSrc)continue;const imgStyle=h?"height:"+h+"px;width:auto;":"";const img='<img src="'+escapeHtml(__cmSafeImgSrc(imgSrc))+'" alt="'+escapeHtml(alt)+'"'+(imgStyle?' style="'+imgStyle+'"':"")+">";const safeHref=__cmSafeHrefAttr(href)||"#";items.push('<a href="'+escapeHtml(safeHref)+'" target="_blank" rel="noopener">'+img+"</a>")}const justify=align==="center"?"center":align==="right"?"flex-end":"flex-start";const dir=stack?"column":"row";const alignItems=stack?"center":"flex-start";return'<div class="md-btnimg-block" style="flex-direction:'+dir+";justify-content:"+justify+";gap:"+gap+"px;align-items:"+alignItems+'">'+items.join("")+"</div>"};RENDERERS.game=function(node,ctx){var f=node.fields||{},ti=node.title||"",co=f.cover||"",de=f.desc||"",tm=f.time||"",ra=f.rate||"",ur=f.url||"";var inner="";if(co)inner+='<div class="md-game-cover"><img src="'+esc(__cmSafeImgSrc(co))+'" alt="'+esc(ti)+'" loading="lazy"></div>';var body="";if(ti)body+='<h3 class="md-game-title">'+esc(ti)+"</h3>";if(de)body+='<p class="md-game-desc">'+renderNodes(parseInline(de,ctx),ctx)+"</p>";if(tm||ra){var meta="";if(tm)meta+='<span class="md-game-meta-tag"><i class="fas fa-clock"></i>'+esc(tm)+"</span>";if(ra){var rc="rate-def",rn=parseFloat(ra);if(!isNaN(rn)){if(rn>=90)rc="rate-pos";else if(rn>=70)rc="rate-mid";else if(rn>=40)rc="rate-warn";else rc="rate-neg"}meta+='<span class="md-game-rate '+rc+'"><i class="fas fa-thumbs-up"></i>'+esc(ra)+"</span>"}body+='<div class="md-game-meta">'+meta+"</div>"}inner+='<div class="md-game-body">'+body+"</div>";if(ur&&isSafeHref(ur))return'<a class="md-game" href="'+esc(ur)+'" target="_blank" rel="noopener">'+inner+"</a>";return'<div class="md-game">'+inner+"</div>"};RENDERERS.row=function(node,ctx){var attrs="";if(node.split)attrs+=' data-split="'+esc(node.split)+'"';if(node.reverse)attrs+=' data-reverse="1"';var left=node.left?renderNodes(parseBlocks(node.left,ctx).children,ctx):"";var right=node.right?renderNodes(parseBlocks(node.right,ctx).children,ctx):"";return'<div class="md-row"'+attrs+'><div class="md-row-left">'+left+'</div><div class="md-row-right">'+right+"</div></div>"};RENDERERS.box=function(node,ctx){var shape=node.shape?' data-shape="'+esc(node.shape)+'"':"";let c="";node.tl&&(c+='<span class="md-box-corner tl">'+esc(node.tl)+"</span>");node.tr&&(c+='<span class="md-box-corner tr">'+esc(node.tr)+"</span>");node.bl&&(c+='<span class="md-box-corner bl">'+esc(node.bl)+"</span>");node.br&&(c+='<span class="md-box-corner br">'+esc(node.br)+"</span>");return'<div class="md-box"'+shape+">"+c+renderNodes(node.children,ctx)+"</div>"};function safeSize(v){if(v===undefined||v===null)return"";v=String(v).trim();if(/^\d+(\.\d+)?$/.test(v))return v+"px";if(/^\d+(\.\d+)?(px|em|rem|%|pt|vh|vw)$/.test(v))return v;return""}function safeNum(v){if(v===undefined||v===null)return"";v=String(v).trim();if(/^\d+(\.\d+)?$/.test(v))return v;return""}function safeColor(v){if(!v)return"";v=String(v).trim();const c=resolveColor(v);if(c)return c;if(/^#[0-9a-fA-F]{3,8}$/.test(v))return v;return""}function stripBraces(s){return String(s||"").replace(/^\s*\{/,"").replace(/\}\s*$/,"").trim()}function buildStyle(attrs){let s="";if(attrs.size){const x=safeSize(attrs.size);if(x)s+="font-size:"+x+";"}if(attrs.color){const c=safeColor(attrs.color);if(c)s+="color:"+c+";"}if(attrs.bg){const c2=safeColor(attrs.bg);if(c2)s+="background-color:"+c2+";"}if(attrs.weight){const w=String(attrs.weight);if(/^(bold|normal|bolder|lighter)$/.test(w)||/^[1-9]00$/.test(w))s+="font-weight:"+w+";"}if(attrs.italic===true)s+="font-style:italic;";if(attrs.align){const a=String(attrs.align);if(/^(left|center|right|justify)$/.test(a))s+="text-align:"+a+";"}if(attrs.padding){const p=safeSize(attrs.padding);if(p)s+="padding:"+p+";"}if(attrs.margin){const mg=safeSize(attrs.margin);if(mg)s+="margin:"+mg+";"}if(attrs.radius){const r=safeSize(attrs.radius);if(r)s+="border-radius:"+r+";"}if(attrs.opacity){const o=String(attrs.opacity);if(/^(0(\.\d+)?|1(\.0+)?|\.\d+)$/.test(o)||/^(100|\d{1,2})%$/.test(o))s+="opacity:"+o+";"}if(attrs.width){const ww=safeSize(attrs.width);if(ww)s+="width:"+ww+";"}if(attrs.height){const hh=safeSize(attrs.height);if(hh)s+="height:"+hh+";"}if(attrs.line){const ln=safeNum(attrs.line);if(ln)s+="line-height:"+ln+";"}if(attrs.spacing){const sp=safeSize(attrs.spacing);if(sp)s+="letter-spacing:"+sp+";"}if(attrs.border){const b=String(attrs.border).trim();if(/^[\d.]+\s*(px|em|rem)?\s+(solid|dashed|dotted|double)\s+[#\w(),. %]+$/.test(b))s+="border:"+b+";"}return s}function collectText(node,out,ctx){if(!node)return;if(typeof node==="string"){out.push(node);return}if(Object.prototype.toString.call(node)==="[object Array]"){for(let i=0;i<node.length;i++)collectText(node[i],out,ctx);return}const t=node.type;if(t==="text"||t==="code"||t==="inlineCode"||t==="key"||t==="keyBlock"||t==="copy"||t==="copyBlock"){if(node.value)out.push(node.value);return}if(t==="abbr"){if(node.text)out.push(node.text);return}if(t==="badge"||t==="term"){if(node.label)out.push(node.label);return}if(t==="lang"){if(node.name)out.push(node.name);return}if(t==="ruby"){if(node.base)out.push(node.base);return}if(t==="date"){if(node.raw)out.push(node.raw);return}if(t==="mathInline"||t==="mathBlock"){if(node.value)out.push(node.value);return}if(t==="video"||t==="audio"||t==="codeBlock"||t==="qr"||t==="footnoteRef"||t==="toc"||t==="swipe"||t==="tree"||t==="pbar")return;if(t==="image"){if(node.alt)out.push(node.alt);return}if(t==="html"||t==="htmlBlock"){const h=node.value||node.raw||"";out.push(h.replace(/<[^>]+>/g,""));return}if(t==="break"||t==="hardBreak"){out.push(" ");return}if(t==="paragraph"||t==="heading"||t==="blockquote"||t==="alignBlock"||t==="alignBlockInline"||t==="hei"||t==="callout"||t==="detail"||t==="say"||t==="style"||t==="styleBlock"||t==="criticAdd"||t==="criticDel"||t==="criticHighlight"){collectText(node.children,out,ctx);out.push("\n\n");return}if(t==="strong"||t==="emphasis"||t==="delete"||t==="mark"||t==="sup"||t==="sub"||t==="link"||t==="colorSpan"||t==="root"||t==="fragment"){collectText(node.children,out,ctx);return}if(t==="criticReplace"){collectText(node.oldContent,out,ctx);collectText(node.newContent,out,ctx);return}if(t==="criticComment"){out.push(node.text);return}if(t==="list"){collectText(node.items,out,ctx);return}if(t==="listItem"){if(node.inline)collectText(node.inline,out,ctx);else collectText(node.children,out,ctx);if(node.list)collectText(node.list,out,ctx);out.push("\n");return}if(t==="table"){for(let i=0;i<node.headers.length;i++)collectText(node.headers[i].children,out,ctx);for(let r=0;r<node.rows.length;r++)for(let c=0;c<node.rows[r].length;c++)collectText(node.rows[r][c].children,out,ctx);return}if(t==="definitionList"){collectText(node.term,out,ctx);collectText(node.defs,out,ctx);return}if(t==="linkCard"){const f=node.fields||{};if(f.content)out.push(f.content);if(f.website)out.push(f.website);if(f.author)out.push(f.author);return}if(t==="chat"){collectText(node.messages,out,ctx);return}if(t==="chatMsg"){collectText(node.parts,out,ctx);return}if(t==="chatSys"){if(node.text)out.push(node.text);return}if(t==="chatQuote"){collectText(node.parts,out,ctx);return}if(t==="mcq"){if(node.title)out.push(node.title);for(let i=0;i<node.options.length;i++)if(node.options[i].text)out.push(node.options[i].text);if(node.explanation)out.push(node.explanation);if(node.hint)out.push(node.hint);return}if(t==="vote"){if(node.title)out.push(node.title);for(let i=0;i<node.opts.length;i++)if(node.opts[i].name)out.push(node.opts[i].name);return}if(t==="flashcard"){for(let i=0;i<node.fields.length;i++)if(node.fields[i].content)out.push(node.fields[i].content);return}if(t==="flashcards"){for(let i=0;i<node.items.length;i++)for(let j=0;j<node.items[i].length;j++)if(node.items[i][j].content)out.push(node.items[i][j].content);return}if(t==="timeline"){for(let i=0;i<node.items.length;i++){const it=node.items[i];if(it.date)out.push(it.date);if(it.title)out.push(it.title);if(it.desc)out.push(it.desc)}return}if(t==="tabs"){for(let i=0;i<node.tabs.length;i++){if(node.tabs[i].body)collectText(parseBlocks(node.tabs[i].body,ctx),out,ctx)}return}if(t==="grid"){for(let i=0;i<node.cells.length;i++){if(node.cells[i])collectText(parseBlocks(node.cells[i],ctx),out,ctx)}return}if(t==="compare"){for(let i=0;i<node.panels.length;i++){if(node.panels[i].body)collectText(parseBlocks(node.panels[i].body,ctx),out,ctx)}return}if(t==="kanban"){for(let i=0;i<node.colData.length;i++){if(node.colData[i].body)collectText(parseBlocks(node.colData[i].body,ctx),out,ctx)}return}}let __lastMeta=null;let __mdPlainKey=null,__mdPlainVal=null;function mdPlain(md){if(!md)return"";if(md===__mdPlainKey)return __mdPlainVal;const ctx=createContext();ctx.stamp=__cmHash(md);preScanRefLinks(md,ctx);const ast=parseBlocks(md,ctx);const buf=[];collectText(ast,buf,ctx);__mdPlainKey=md;__mdPlainVal=buf.join("").replace(/[ \t]+/g," ").replace(/\n{3,}/g,"\n\n").trim();return __mdPlainVal}function cnt(md){const text=mdPlain(md);const cn=text.match(/[\u4e00-\u9fa5]/g)||[];const en=text.match(/[a-zA-Z0-9_]+/g)||[];return cn.length+en.length}function __fmYamlLike(b){var L=b.split("\n"),k=false;for(var i=0;i<L.length;i++){var s=L[i];if(!s.trim())continue;if(/^\s*#/.test(s))continue;if(/^\s*[^\s#][^:]*:(\s|$)/.test(s)){k=true;continue}if(/^\s*-\s+/.test(s)){k=true;continue}if(/^\s/.test(s))continue;if(/^\s*[\[{]/.test(s)){k=true;continue}return false}return b.trim()===""||k}function __normDoc(s){s=s.replace(/\u0000/g,"�").replace(/^\uFEFF/,"");var m=/^(?:[ \t]*\n)*---[ \t]*\n(?:([\s\S]*?)\n)?---[ \t]*(?:\n|$)/.exec(s);if(!m)return s;if(!(m[1]||"").trim()&&!s.slice(m[0].length).trim())return s;if(!__fmYamlLike(m[1]||""))return s;return s.slice(m[0].length)}function validate(markdown,userConfig){if(!markdown)return[];let md=__normDoc(String(markdown).replace(/\r\n?/g,"\n"));const ctx=createContext(userConfig);ctx.stamp=userConfig&&userConfig.seed!==undefined?String(userConfig.seed):__cmHash(md);try{md=__cmRefJoinLabel(md.split("\n"),ctx).join("\n");preScanRefLinks(md,ctx);const __ast=parseBlocks(md,ctx);try{renderNode(__ast,ctx)}catch(__e){}}catch(e){return[{type:"parse-error",message:e.message}]}const __w=ctx.__warnings||[];const __seen={};return __w.filter(function(w){const k=w.type+"|"+(w.key||w.kind||w.value||w.container||"");if(__seen[k])return false;__seen[k]=true;return true})}function __securityWalk(n,out,seen){if(!n||typeof n!=="object"||seen.indexOf(n)>=0)return;seen.push(n);if(Array.isArray(n)){for(let i=0;i<n.length;i++)__securityWalk(n[i],out,seen);return}const keys=["href","url","verify","src"];for(let k=0;k<keys.length;k++){const v=n[keys[k]];if(typeof v!=="string"||!v)continue;const raw=__cmDecodeEntities(v).replace(/[\u0000-\u001F\u007F]/g,"").trim();if(!raw)continue;const safe=keys[k]==="src"?!!__cmSafeImgSrc(raw):isSafeHref(raw);if(!safe)out.push({type:"unsafe-url",attribute:keys[k],value:v})}for(const p in n){if(p==="config"||p==="i18n"||p==="__warnings")continue;__securityWalk(n[p],out,seen)}}function validateSecurity(markdown,userConfig){if(!markdown)return[];let md=__normDoc(String(markdown).replace(/\r\n?/g,"\n"));const cfg=Object.assign({},userConfig||{},{html:false});const ctx=createContext(cfg);ctx.stamp=userConfig&&userConfig.seed!==undefined?String(userConfig.seed):__cmHash(md);try{md=__cmRefJoinLabel(md.split("\n"),ctx).join("\n");preScanRefLinks(md,ctx);const ast=parseBlocks(md,ctx);const findings=[];try{renderNode(ast,ctx)}catch(__e){}__securityWalk(ast,findings,[]);const ws=ctx.__warnings||[];for(let i=0;i<ws.length;i++){if(ws[i].type==="qr-sensitive-url")findings.push(ws[i])}return findings}catch(e){return[{type:"parse-error",message:e.message}]}}function renderMarkdownWithMeta(markdown,userConfig){const prev=__lastMeta;__lastMeta=null;let html,meta={};try{html=renderMarkdown(markdown,userConfig);meta=__lastMeta||{}}finally{__lastMeta=prev}return{html:html,meta:meta}}function initScrollFade(root){if(typeof document==="undefined")return;const box=root&&root.querySelectorAll?root:document;const els=box.querySelectorAll(".dl-hash");for(const el of els){if(el.dataset.dlFadeInit==="1")continue;el.dataset.dlFadeInit="1";const update=()=>{const max=el.scrollWidth-el.clientWidth;if(max<=1){el.classList.remove("is-overflowing","fade-l","fade-r");return}el.classList.add("is-overflowing");el.classList.toggle("fade-l",el.scrollLeft>1);el.classList.toggle("fade-r",el.scrollLeft<max-1)};el.addEventListener("scroll",update,{passive:true});if(typeof window!=="undefined"&&window.ResizeObserver){const ro=new window.ResizeObserver(update);ro.observe(el);const tx=el.querySelector(".md-copy-text");if(tx)ro.observe(tx)}update()}}var __AST_DROP={_pos:1,suffix:1,cls:1,langKey:1,num:1,foldInit:1,sub:1,__looseSelf:1,inline:1,stamp:1,hostConfig:1,locked:1,config:1,env:1,i18n:1,_md:1,__reset:1,__resetConfig:1,_list:1,__cmDepth:1,noSmart:1};function __posAt(src,off){var ln=1,col=1;for(var i=0;i<off&&i<src.length;i++){if(src.charCodeAt(i)===10){ln++;col=1}else col++}return{line:ln,column:col,offset:off}}function __lineStart(src,off){var p=src.lastIndexOf("\n",Math.max(0,off-1))+1;return p}function __lineEnd(src,off){var p=src.indexOf("\n",off);return p<0?src.length:p}function __span(start,end){return{start:{line:start.line,column:start.column,offset:start.offset},end:{line:end.line,column:end.column,offset:end.offset}}}function __refineSpan(src,node,base){if(!node||typeof node!=="object")return;var t=node.type;if(t==="root"){node.position=__span(__posAt(src,0),__posAt(src,src.length));return}var p=node.position;var st=p?p.start.offset:0,en=p?p.end.offset:0,ls,le,line,c,oi,ci,nx,cl;if(t==="thematicBreak"){var re=/^ {0,3}(?:(?:\*[ \t]*){3,}|(?:-[ \t]*){3,}|(?:_[ \t]*){3,})$/,lines=src.split("\n"),off=0;for(var i=0;i<lines.length;i++){if(re.test(lines[i])){node.position=__span(__posAt(src,off),__posAt(src,off+lines[i].length));return}off+=lines[i].length+1}return}if(t==="table"){var hs=node.headers&&node.headers[0],rs=node.rows&&node.rows[node.rows.length-1];var hp=hs&&hs.children&&hs.children[0]&&hs.children[0].position,rp=rs&&rs.length&&rs[0].children&&rs[0].children[0]&&rs[0].children[0].position;if(hp){ls=__lineStart(src,hp.start.offset);le=__lineEnd(src,hp.start.offset);if(/^ {0,3}\|/.test(src.slice(ls,le)))st=ls}if(rp){var re=__lineEnd(src,rp.start.offset);en=re}if(st<0)st=0;if(en<st)en=st;node.position=__span(__posAt(src,st),__posAt(src,en));return}if(t==="heading"){ls=__lineStart(src,st);le=__lineEnd(src,st);line=src.slice(ls,le);if(/^ {0,3}#{1,6}[ \t]/.test(line)){st=ls;en=le}else if(le<src.length){var ne=__lineEnd(src,le+1),ul=src.slice(le+1,ne);if(/^ {0,3}(?:===+|---+)[ \t]*$/.test(ul)){st=ls;en=ne}}}else if(t==="strong"){c=src.slice(st-2,st);if(c==="**"||c==="__")st-=2;c=src.slice(en,en+2);if(c==="**"||c==="__")en+=2}else if(t==="emphasis"){c=src.charAt(st-1);if(c==="*"||c==="_")st--;c=src.charAt(en);if(c==="*"||c==="_")en++}else if(t==="delete"){if(src.slice(st-2,st)==="~~")st-=2;else if(src.charAt(st-1)==="~")st--;if(src.slice(en,en+2)==="~~")en+=2;else if(src.charAt(en)==="~")en++}else if(t==="mark"){if(src.slice(st-2,st)==="==")st-=2;if(src.slice(en,en+2)==="==")en+=2}else if(t==="code"){var q=st;while(q>0&&src.charAt(q-1)==="`")q--;st=q;var r=en;while(r<src.length&&src.charAt(r)==="`")r++;en=r}else if(t==="wikiLink"){if(src.slice(st-2,st)==="[[")st-=2;if(src.slice(en,en+2)==="]]")en+=2}else if(t==="link"){if(!node.position||st===0){var hp=src.indexOf(String(node.href||""),0);if(hp>0){st=hp;en=hp+String(node.href).length}}oi=src.lastIndexOf("[",st);if(oi>=0&&st-oi<=500)st=oi;ci=src.indexOf("]",en);if(ci>=0&&ci-en<=500){en=ci+1;nx=src.charAt(en);if(nx==="("||nx==="["){cl=src.indexOf(nx==="("?")":"]",en+1);if(cl>=0)en=cl+1}}}else if(t==="image"){oi=src.lastIndexOf("![",st);if(oi>=0&&st-oi<=500)st=oi;ci=src.indexOf(")",en);if(ci>=0&&ci-en<=500)en=ci+1}else if(t==="blockquote"){ls=__lineStart(src,st);line=src.slice(ls,__lineEnd(src,st));if(/^ {0,3}>/.test(line))st=ls}else if(t==="list"||t==="listItem"){ls=__lineStart(src,st);line=src.slice(ls,__lineEnd(src,st));if(/^ {0,6}(?:[-*+]|\d+[.)])[ \t]/.test(line))st=ls}else if(t==="codeBlock"||t==="htmlBlock"){ls=__lineStart(src,st);line=src.slice(ls,__lineEnd(src,st));if(t==="codeBlock"&&/^ {0,3}(`{3,}|~{3,})/.test(line)){st=ls;var f=line.match(/^ {0,3}(`{3,}|~{3,})/)[1],fc=f.charAt(0),fl=f.length,lines=src.split("\n"),cursor=src.indexOf("\n",ls)+1;for(var j=0;j<lines.length&&cursor<=src.length;j++){var le2=__lineEnd(src,cursor),seg=src.slice(cursor,le2);if(new RegExp("^ {0,3}"+(fc==="`"?"`":"~")+"{"+fl+",}[ \\t]*$").test(seg)){en=le2;break}cursor=le2+1;if(cursor>src.length)break}}else if(t==="htmlBlock"){st=ls}}if(st<0)st=0;if(en<st)en=st;node.position=__span(__posAt(src,st),__posAt(src,en))}function __astClean(v,withPos,src,cur){if(v==null||typeof v!=="object")return v;if(Object.prototype.toString.call(v)==="[object Date]")return v.getTime();if(Array.isArray(v)){var a=[];for(var i=0;i<v.length;i++)a.push(__astClean(v[i],withPos,src,cur));return a}var out={},keys=Object.keys(v);for(var k=0;k<keys.length;k++){var key=keys[k];if(__AST_DROP[key])continue;if(key.charAt(0)==="_")continue;out[key]=__astClean(v[key],withPos,src,cur)}if(withPos&&src&&cur){var tv=v.value!=null?String(v.value):v.text!=null?String(v.text):v.code!=null?String(v.code):v.raw!=null?String(v.raw):v.src!=null?String(v.src):v.target!=null?String(v.target):v.options&&v.options.length?String(v.options[0]):null;if(tv&&tv.length){var p=src.indexOf(tv,cur.p);if(p<0)p=src.indexOf(tv);if(p>=0){cur.p=p+tv.length;var s0=__posAt(src,p),s1=__posAt(src,p+tv.length);out.position={start:s0,end:s1}}}}if(withPos&&out.position===undefined&&Array.isArray(out.items)&&out.items.length){var f1=out.items[0],z1=out.items[out.items.length-1];if(f1&&f1.position&&z1&&z1.position){out.position=__span(f1.position.start,z1.position.end)}}if(withPos&&out.position===undefined&&Array.isArray(out.children)&&out.children.length){var f0=out.children[0],lz=out.children[out.children.length-1];if(f0&&f0.position&&lz&&lz.position){out.position=__span(f0.position.start,lz.position.end)}}if(out.type==="listItem"&&out.children===undefined&&out.value===undefined){var alt=v.inline!==undefined?v.inline:v._inline!==undefined?v._inline:undefined;if(alt!==undefined)out.children=__astClean(alt,withPos,src,cur)}if(withPos&&out.position===undefined&&out.type==="listItem"&&Array.isArray(out.children)&&out.children.length){var f2=out.children[0],z2=out.children[out.children.length-1];if(f2&&f2.position&&z2&&z2.position){out.position=__span(f2.position.start,z2.position.end)}}if(withPos&&out.type)__refineSpan(src,out,cur);return out}function __astFreeze(o){if(o&&typeof o==="object"&&!Object.isFrozen(o)){Object.keys(o).forEach(function(k){__astFreeze(o[k])});try{Object.freeze(o)}catch(e){}}return o}function __astContext(userConfig){var ctx=createContext(userConfig);ctx.stamp=userConfig&&userConfig.seed!==undefined?String(userConfig.seed):"ast";return ctx}function parseToAst(markdown,userConfig){var src=String(markdown==null?"":markdown).replace(/\r\n?/g,"\n");src=__normDoc(src);var ctx=__astContext(userConfig);if(ctx.config.gfm===false&&ctx.locked.indexOf("table")===-1)ctx.config.table=false;try{src=__cmRefJoinLabel(src.split("\n"),ctx).join("\n");preScanRefLinks(src,ctx);var ast=parseBlocks(src,ctx);return __astFreeze(__astClean(ast,true,src,{p:0}))}catch(e){return __astFreeze({type:"root",children:[],error:{message:String(e&&e.message||e)}})}}function tokenizeInline(text,userConfig,options){var src=String(text==null?"":text).replace(/\u0000/g,"�");var ctx=__astContext(userConfig);if(options&&options.noAbbr)ctx.config.abbr=false;try{var tokens=parseInline(src,ctx,!!(options&&options.noAbbr));return __astFreeze(__astClean(tokens,true,src,{p:0}))}catch(e){return __astFreeze([])}}var LINT_RULES={headingOrder:{severity:"warning",message:"标题层级跳跃:h{depth} 前一级是 h{prev}"},duplicateHeadingId:{severity:"error",message:"重复的标题 id:{id}"},duplicateHeadingText:{severity:"warning",message:"重复的标题文本:{text}"},imageAlt:{severity:"warning",message:"图片缺少 alt 文本"},externalLinkRel:{severity:"warning",message:'外链缺少 rel="noopener"'},emptyLinkText:{severity:"warning",message:"链接文本为空:{href}"},brokenReference:{severity:"error",message:"引用缺少定义:{label}"},duplicateDefinition:{severity:"warning",message:"重复的引用定义:{label}"},emptyHeading:{severity:"warning",message:"标题为空"},inlineHtml:{severity:"info",message:"包含原始 HTML"},trailingSpace:{severity:"info",message:"行尾有多余空格"}};function lintMarkdown(markdown,userConfig,options){var src=String(markdown==null?"":markdown).replace(/\r\n?/g,"\n");var cfg=userConfig||{},opts=options||{};var enabled=opts.rules||null,sevOverride=opts.severity||{};var diags=[];function add(rule,pos,data,extra){if(enabled&&enabled.indexOf(rule)<0)return;var meta=LINT_RULES[rule]||{severity:"warning",message:rule};var msg=meta.message.replace(/\{(\w+)\}/g,function(_,k){return data&&data[k]!=null?String(data[k]):""});var d={rule:rule,severity:sevOverride[rule]||meta.severity,message:msg};if(pos)d.position=pos;if(extra)for(var ek in extra)d[ek]=extra[ek];diags.push(d)}function posOf(off,len){return{start:__posAt(src,off),end:__posAt(src,off+Math.max(1,len||1))}}var ast=parseToAst(src,cfg);var lineTexts=src.split("\n");var seenIds=Object.create(null),prevDepth=0,seenTexts=Object.create(null);function walk(n){if(!n||typeof n!=="object")return;if(n.type==="heading"){var d=n.depth||0;if(prevDepth&&d>prevDepth+1)add("headingOrder",n.position,{depth:d,prev:prevDepth});prevDepth=d;var txt=plainOf(n);if(n.id){if(seenIds[n.id])add("duplicateHeadingId",n.position,{id:n.id},{firstLine:seenIds[n.id]});else seenIds[n.id]=n.position&&n.position.start.line||0}if(txt.trim()){var key=txt.trim().toLowerCase();if(seenTexts[key])add("duplicateHeadingText",n.position,{text:txt.trim()},{firstLine:seenTexts[key]});else seenTexts[key]=n.position&&n.position.start.line||0}if(!txt.trim())add("emptyHeading",n.position)}if(n.type==="image"&&(!n.alt||!String(n.alt).trim()))add("imageAlt",n.position,{src:n.src});if(n.type==="link"){if(/^https?:\/\//i.test(String(n.href||""))){var rel=String(n.rel||"").toLowerCase();if(rel.indexOf("noopener")<0)add("externalLinkRel",n.position,{href:n.href})}var lt=plainOf(n);if(!lt.trim())add("emptyLinkText",n.position,{href:n.href||""})}if(n.type==="html"||n.type==="htmlBlock")add("inlineHtml",n.position);var kids=n.children||n.items||[];for(var i=0;i<kids.length;i++)walk(kids[i])}walk(ast);var defs=Object.create(null),defLines=Object.create(null),defRe=/^ {0,3}\[([^\]]+)\]:[ \t]*\S/,df,lineOff=0;for(var li2=0;li2<lineTexts.length;li2++){var line=lineTexts[li2];if(df=defRe.exec(line)){var key=df[1].replace(/\s+/g," ").trim().toLowerCase();if(defs[key])add("duplicateDefinition",posOf(lineOff+df.index,df[0].length),{label:df[1]},{firstLine:defLines[key]});else{defs[key]=true;defLines[key]=li2+1}}lineOff+=line.length+1}var refRe=/!?\[([^\]]*)\]\[([^\]]*)\]/g,rm;function scanRefs(n){if(!n||typeof n!=="object")return;if(n.type==="text"&&typeof n.value==="string"){var v=n.value,base=n.position&&n.position.start.offset||0;refRe.lastIndex=0;while(rm=refRe.exec(v)){var label=(rm[2]||rm[1]).replace(/\s+/g," ").trim().toLowerCase();if(label&&!defs[label])add("brokenReference",posOf(base+rm.index,rm[0].length),{label:rm[2]||rm[1]})}}var kids=n.children||n.items||[];for(var i=0;i<kids.length;i++)scanRefs(kids[i])}scanRefs(ast);if(!enabled||enabled.indexOf("trailingSpace")>=0){for(var li3=0;li3<lineTexts.length;li3++){var l=lineTexts[li3];if(/[ \t]+$/.test(l)&&l.trim())add("trailingSpace",{start:{line:li3+1,column:l.replace(/[ \t]+$/,"").length+1,offset:0},end:{line:li3+1,column:l.length+1,offset:0}},{line:li3+1})}}diags.sort(function(a,b){var la=a.position&&a.position.start.line||0,lb=b.position&&b.position.start.line||0;return la-lb});return diags}function plainOf(n){if(!n)return"";if(typeof n.value==="string")return n.value;if(n.type==="image")return n.alt||"";var parts=[];var kids=n.children||n.items||[];for(var i=0;i<kids.length;i++)parts.push(plainOf(kids[i]));return parts.join("")}var __plugins=[];function usePlugin(plugin){if(!plugin||typeof plugin!=="object")return function(){};var entry={name:String(plugin.name||"plugin"),renderers:plugin.renderers||null,before:plugin.before||null,after:plugin.after||null,config:plugin.config||null};__plugins.push(entry);__syncPluginRenderers();return function(){var i=__plugins.indexOf(entry);if(i>=0){__plugins.splice(i,1);__syncPluginRenderers()}}}var __origRenderers=Object.create(null);function __syncPluginRenderers(){for(var t in __origRenderers){if(Object.prototype.hasOwnProperty.call(__origRenderers,t))RENDERERS[t]=__origRenderers[t]}for(var i=0;i<__plugins.length;i++){var rs=__plugins[i].renderers;if(!rs)continue;for(var k in rs){if(typeof rs[k]!=="function")continue;if(!__origRenderers[k])__origRenderers[k]=RENDERERS[k];var fn=rs[k];RENDERERS[k]=fn}}}function __pluginBefore(html,ctx){for(var i=0;i<__plugins.length;i++){var f=__plugins[i].before;if(typeof f==="function"){var r=f(html,ctx);if(typeof r==="string")html=r}}return html}function __pluginAfter(html,ctx){for(var i=0;i<__plugins.length;i++){var f=__plugins[i].after;if(typeof f==="function"){var r=f(html,ctx);if(typeof r==="string")html=r}}return html}function listPlugins(){return __plugins.map(function(p){return p.name})}const __ksApi={usePlugin:usePlugin,listPlugins:listPlugins,lintMarkdown:lintMarkdown,lintRules:Object.assign({},LINT_RULES),parseToAst:parseToAst,tokenizeInline:tokenizeInline,renderMarkdown:renderMarkdown,markdownToPlainText:mdPlain,countWords:cnt,validate:validate,validateSecurity:validateSecurity,renderMarkdownWithMeta:renderMarkdownWithMeta,initScrollFade:initScrollFade};if(typeof module!=="undefined"&&module.exports){module.exports=__ksApi}if(typeof window!=="undefined"){window.KSMarkdown=__ksApi;window.renderMarkdown=renderMarkdown}})();
1
+ (function(){const VERSION="1.0.7";const ESCAPABLE_CHARS="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";const AUTO_COLORS=["#6b5acf","#e74c6f","#4a90d9","#f59e0b","#10b981","#8b5cf6","#ec4899","#06b6d4","#d97706","#059669"];const COLOR_ALIASES={red:"#e74c6f",green:"#10b981",orange:"#d97706",yellow:"#f59e0b",blue:"#4a90d9",purple:"#6b5acf",pink:"#ec4899",cyan:"#06b6d4",gray:"#8a8ab5",grey:"#8a8ab5"};const RAINBOW=["#e74c6f","#f59e0b","#10b981","#06b6d4","#4a90d9","#6b5acf","#8b5cf6","#ec4899"];const BLOCK_HTML_TAGS=/^<(div|details|summary|section|article|aside|nav|header|footer|main|figure|figcaption|table|thead|tbody|tfoot|tr|td|th|ul|ol|li|dl|dt|dd|pre|blockquote|iframe|video|audio|canvas|svg|form|fieldset|legend|style|script|noscript|template|hr)(?:\s[^>]*)?\/?>/i;const BLOCK_TAGS_SET={address:1,article:1,aside:1,audio:1,base:1,basefont:1,blockquote:1,body:1,canvas:1,caption:1,center:1,col:1,colgroup:1,dd:1,details:1,dialog:1,dir:1,div:1,dl:1,dt:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,frame:1,frameset:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,head:1,header:1,hgroup:1,hr:1,html:1,iframe:1,legend:1,li:1,link:1,main:1,math:1,menu:1,menuitem:1,nav:1,noframes:1,noscript:1,object:1,ol:1,optgroup:1,option:1,p:1,param:1,pre:1,search:1,section:1,style:1,script:1,summary:1,svg:1,table:1,tbody:1,td:1,template:1,tfoot:1,th:1,thead:1,title:1,tr:1,track:1,ul:1,video:1};let katexLib=null;try{if(typeof require==="function")katexLib=require("katex")}catch(e){}let nodeEmojiLib=null;try{if(typeof require==="function")nodeEmojiLib=require("emoji-js")}catch(e){}let __emojiConv=null;function getEmojiConv(){if(!nodeEmojiLib)return null;if(__emojiConv)return __emojiConv;__emojiConv=new nodeEmojiLib;__emojiConv.replace_mode="unified";__emojiConv.allow_native=true;__emojiConv.colons_mode=false;return __emojiConv}function escapeHtml(text){if(text===null||text===undefined)return"";return String(text).replace(/\uE002/g,"&amp;").replace(/&(?!(?:#\d{1,7}|#[xX][0-9a-fA-F]{1,6}|(?:CounterClockwiseContourIntegral|ClockwiseContourIntegral|DoubleLongLeftRightArrow|NotNestedGreaterGreater|DiacriticalDoubleAcute|NotSquareSupersetEqual|CloseCurlyDoubleQuote|DoubleContourIntegral|FilledVerySmallSquare|NegativeVeryThinSpace|NotPrecedesSlantEqual|NotRightTriangleEqual|NotSucceedsSlantEqual|CapitalDifferentialD|DoubleLeftRightArrow|DoubleLongRightArrow|EmptyVerySmallSquare|NestedGreaterGreater|NotDoubleVerticalBar|NotGreaterSlantEqual|NotLeftTriangleEqual|NotSquareSubsetEqual|OpenCurlyDoubleQuote|ReverseUpEquilibrium|DoubleLongLeftArrow|DownLeftRightVector|LeftArrowRightArrow|leftrightsquigarrow|NegativeMediumSpace|NotGreaterFullEqual|NotRightTriangleBar|RightArrowLeftArrow|SquareSupersetEqual|blacktriangleright|DownRightTeeVector|DownRightVectorBar|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|NegativeThickSpace|NotLeftTriangleBar|PrecedesSlantEqual|ReverseEquilibrium|RightDoubleBracket|RightDownTeeVector|RightDownVectorBar|RightTriangleEqual|SquareIntersection|SucceedsSlantEqual|blacktriangledown|blacktriangleleft|DoubleUpDownArrow|DoubleVerticalBar|DownLeftTeeVector|DownLeftVectorBar|FilledSmallSquare|GreaterSlantEqual|LeftDoubleBracket|LeftDownTeeVector|LeftDownVectorBar|leftrightharpoons|LeftTriangleEqual|NegativeThinSpace|NotGreaterGreater|NotLessSlantEqual|NotNestedLessLess|NotReverseElement|NotSquareSuperset|NotTildeFullEqual|RightAngleBracket|rightleftharpoons|RightUpDownVector|SquareSubsetEqual|twoheadrightarrow|VerticalSeparator|circlearrowright|DiacriticalAcute|DiacriticalGrave|DiacriticalTilde|DoubleRightArrow|DownArrowUpArrow|downharpoonright|EmptySmallSquare|GreaterEqualLess|GreaterFullEqual|LeftAngleBracket|LeftUpDownVector|LessEqualGreater|NonBreakingSpace|NotPrecedesEqual|NotRightTriangle|NotSucceedsEqual|NotSucceedsTilde|NotSupersetEqual|ntrianglerighteq|rightharpoondown|rightrightarrows|RightTriangleBar|RightUpTeeVector|RightUpVectorBar|twoheadleftarrow|UnderParenthesis|UpArrowDownArrow|vartriangleright|bigtriangledown|circlearrowleft|CloseCurlyQuote|ContourIntegral|curvearrowright|DoubleDownArrow|DoubleLeftArrow|downharpoonleft|DownRightVector|leftharpoondown|leftrightarrows|LeftRightVector|LeftTriangleBar|LeftUpTeeVector|LeftUpVectorBar|LowerRightArrow|nleftrightarrow|nLeftrightarrow|NotGreaterEqual|NotGreaterTilde|NotHumpDownHump|NotLeftTriangle|NotSquareSubset|ntrianglelefteq|OverParenthesis|RightDownVector|rightleftarrows|rightsquigarrow|rightthreetimes|ShortRightArrow|straightepsilon|trianglerighteq|UpperRightArrow|vartriangleleft|curvearrowleft|DiacriticalDot|doublebarwedge|DoubleRightTee|downdownarrows|DownLeftVector|GreaterGreater|hookrightarrow|HorizontalLine|InvisibleComma|InvisibleTimes|LeftDownVector|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|leftthreetimes|LessSlantEqual|longrightarrow|Longrightarrow|LongRightArrow|looparrowright|LowerLeftArrow|NestedLessLess|NotGreaterLess|NotLessGreater|NotSubsetEqual|NotVerticalBar|nshortparallel|ntriangleright|OpenCurlyQuote|ReverseElement|rightarrowtail|rightharpoonup|RightTeeVector|RightVectorBar|ShortDownArrow|ShortLeftArrow|SquareSuperset|TildeFullEqual|trianglelefteq|upharpoonright|UpperLeftArrow|ZeroWidthSpace|ApplyFunction|bigtriangleup|blacktriangle|DifferentialD|divideontimes|DoubleLeftTee|DoubleUpArrow|fallingdotseq|hookleftarrow|leftarrowtail|leftharpoonup|LeftTeeVector|LeftVectorBar|LessFullEqual|longleftarrow|Longleftarrow|LongLeftArrow|looparrowleft|measuredangle|NotEqualTilde|NotTildeEqual|NotTildeTilde|ntriangleleft|Poincareplane|PrecedesEqual|PrecedesTilde|RightArrowBar|RightTeeArrow|RightTriangle|RightUpVector|shortparallel|smallsetminus|SucceedsEqual|SucceedsTilde|SupersetEqual|triangleright|UpEquilibrium|upharpoonleft|varsubsetneqq|varsupsetneqq|VerticalTilde|VeryThinSpace|blacklozenge|DownArrowBar|DownTeeArrow|exponentiale|ExponentialE|GreaterEqual|GreaterTilde|HilbertSpace|HumpDownHump|Intersection|LeftArrowBar|LeftTeeArrow|LeftTriangle|LeftUpVector|NotCongruent|NotHumpEqual|NotLessEqual|NotLessTilde|Proportional|RightCeiling|risingdotseq|RoundImplies|ShortUpArrow|SquareSubset|triangledown|triangleleft|UnderBracket|varsubsetneq|varsupsetneq|VerticalLine|backepsilon|blacksquare|circledcirc|circleddash|CircleMinus|CircleTimes|curlyeqprec|curlyeqsucc|diamondsuit|eqslantless|Equilibrium|expectation|GreaterLess|LeftCeiling|LessGreater|MediumSpace|NotLessLess|NotPrecedes|NotSucceeds|NotSuperset|nrightarrow|nRightarrow|OverBracket|preccurlyeq|precnapprox|quaternions|RightVector|Rrightarrow|RuleDelayed|SmallCircle|SquareUnion|straightphi|SubsetEqual|succcurlyeq|succnapprox|thickapprox|updownarrow|Updownarrow|UpDownArrow|VerticalBar|Bernoullis|circledast|CirclePlus|complement|curlywedge|eqslantgtr|EqualTilde|Fouriertrf|gtreqqless|ImaginaryI|Laplacetrf|LeftVector|lessapprox|lesseqqgtr|Lleftarrow|lmoustache|longmapsto|mapstodown|mapstoleft|nleftarrow|nLeftarrow|NotElement|NotGreater|nsubseteqq|nsupseteqq|precapprox|Proportion|rightarrow|Rightarrow|RightArrow|RightFloor|rmoustache|sqsubseteq|sqsupseteq|subsetneqq|succapprox|supsetneqq|ThickSpace|TildeEqual|TildeTilde|UnderBrace|UpArrowBar|UpTeeArrow|upuparrows|varepsilon|varnothing|backprime|backsimeq|Backslash|bigotimes|centerdot|CenterDot|checkmark|CircleDot|complexes|Congruent|Coproduct|dotsquare|DoubleDot|downarrow|Downarrow|DownArrow|DownBreve|gtrapprox|gtreqless|gvertneqq|heartsuit|HumpEqual|leftarrow|Leftarrow|LeftArrow|LeftFloor|lesseqgtr|LessTilde|lvertneqq|Mellintrf|MinusPlus|ngeqslant|nleqslant|NotCupCap|NotExists|NotSubset|nparallel|nshortmid|nsubseteq|nsupseteq|OverBrace|pitchfork|PlusMinus|rationals|spadesuit|subseteqq|subsetneq|supseteqq|supsetneq|therefore|Therefore|ThinSpace|triangleq|TripleDot|UnionPlus|varpropto|andslope|angmsdaa|angmsdab|angmsdac|angmsdad|angmsdae|angmsdaf|angmsdag|angmsdah|angrtvbd|approxeq|awconint|backcong|barwedge|bbrktbrk|bigoplus|bigsqcup|biguplus|bigwedge|boxminus|boxtimes|bsolhsub|capbrcup|circledR|circledS|cirfnint|clubsuit|cupbrcap|curlyvee|cwconint|DDotrahd|doteqdot|DotEqual|dotminus|drbkarow|dzigrarr|elinters|emptyset|eqvparsl|fpartint|geqslant|gesdotol|gnapprox|hksearow|hkswarow|imagline|imagpart|infintie|integers|Integral|intercal|intlarhk|laemptyv|ldrushar|leqslant|lesdotor|LessLess|llcorner|lnapprox|lrcorner|lurdshar|mapstoup|multimap|naturals|ncongdot|NotEqual|notindot|NotTilde|otimesas|parallel|PartialD|plusacir|pointint|Precedes|precneqq|precnsim|profalar|profline|profsurf|raemptyv|realpart|RightTee|rppolint|rtriltri|scpolint|setminus|shortmid|smeparsl|sqsubset|sqsupset|subseteq|Succeeds|succneqq|succnsim|SuchThat|Superset|supseteq|thetasym|thicksim|timesbar|triangle|triminus|trpezium|Uarrocir|ulcorner|UnderBar|urcorner|varkappa|varsigma|vartheta|alefsym|angrtvb|angzarr|asympeq|backsim|because|Because|bemptyv|between|bigcirc|bigodot|bigstar|bnequiv|boxplus|Cayleys|Cconint|ccupssm|Cedilla|cemptyv|cirscir|coloneq|congdot|cudarrl|cudarrr|cularrp|curarrm|dbkarow|ddagger|ddotseq|demptyv|diamond|Diamond|digamma|dotplus|DownTee|dwangle|Element|epsilon|Epsilon|eqcolon|equivDD|gesdoto|gtquest|gtrless|harrcir|Implies|intprod|isindot|larrbfs|larrsim|lbrksld|lbrkslu|ldrdhar|LeftTee|lesdoto|lessdot|lessgtr|lesssim|lotimes|lozenge|ltquest|luruhar|maltese|minusdu|napprox|natural|nearrow|NewLine|nexists|NoBreak|notinva|notinvb|notinvc|NotLess|notniva|notnivb|notnivc|npolint|npreceq|nsqsube|nsqsupe|nsubset|nsucceq|nsupset|nvinfin|nvltrie|nvrtrie|nwarrow|olcross|omicron|Omicron|orderof|orslope|OverBar|pertenk|planckh|pluscir|plussim|plustwo|precsim|Product|quatint|questeq|rarrbfs|rarrsim|rbrksld|rbrkslu|rdldhar|realine|rotimes|ruluhar|searrow|simplus|simrarr|subedot|submult|subplus|subrarr|succsim|supdsub|supedot|suphsol|suphsub|suplarr|supmult|supplus|swarrow|topfork|triplus|tritime|uparrow|Uparrow|UpArrow|upsilon|Upsilon|uwangle|vzigzag|zigrarr|aacute|Aacute|abreve|Abreve|agrave|Agrave|andand|angmsd|angsph|apacir|approx|Assign|atilde|Atilde|barvee|barwed|Barwed|becaus|bernou|bigcap|bigcup|bigvee|bkarow|bottom|bowtie|boxbox|bprime|brvbar|bullet|bumpeq|Bumpeq|cacute|Cacute|capand|capcap|capcup|capdot|ccaron|Ccaron|ccedil|Ccedil|circeq|cirmid|colone|Colone|commat|compfn|conint|Conint|coprod|copysr|cularr|cupcap|CupCap|cupcup|cupdot|curarr|curren|cylcty|dagger|Dagger|daleth|dcaron|Dcaron|dfisht|divide|divonx|dlcorn|dlcrop|dollar|DotDot|drcorn|drcrop|dstrok|Dstrok|eacute|Eacute|easter|ecaron|Ecaron|ecolon|egrave|Egrave|egsdot|elsdot|emptyv|emsp13|emsp14|eparsl|eqcirc|equals|equest|Exists|female|ffilig|ffllig|forall|ForAll|frac12|frac13|frac14|frac15|frac16|frac18|frac23|frac25|frac34|frac35|frac38|frac45|frac56|frac58|frac78|gacute|gammad|Gammad|gbreve|Gbreve|Gcedil|gesdot|gesles|gtlPar|gtrarr|gtrdot|gtrsim|hairsp|hamilt|hardcy|HARDcy|hearts|hellip|hercon|homtht|horbar|hslash|hstrok|Hstrok|hybull|hyphen|iacute|Iacute|igrave|Igrave|iiiint|iinfin|incare|inodot|intcal|iquest|isinsv|itilde|Itilde|jsercy|Jsercy|kappav|kcedil|Kcedil|kgreen|lacute|Lacute|lagran|lambda|Lambda|langle|larrfs|larrhk|larrlp|larrpl|larrtl|latail|lAtail|lbrace|lbrack|lcaron|Lcaron|lcedil|Lcedil|ldquor|lesdot|lesges|lfisht|lfloor|lharul|llhard|lmidot|Lmidot|lmoust|loplus|lowast|lowbar|lparlt|lrhard|lsaquo|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|ltrPar|mapsto|marker|mcomma|midast|midcir|middot|minusb|minusd|mnplus|models|mstpos|nacute|Nacute|nbumpe|ncaron|Ncaron|ncedil|Ncedil|nearhk|nequiv|nesear|nexist|nltrie|notinE|nparsl|nprcue|nrarrc|nrarrw|nrtrie|nsccue|nsimeq|ntilde|Ntilde|numero|nvdash|nvDash|nVdash|nVDash|nvHarr|nvlArr|nvrArr|nwarhk|nwnear|oacute|Oacute|odblac|Odblac|odsold|ograve|Ograve|ominus|origof|oslash|Oslash|otilde|Otilde|otimes|Otimes|parsim|percnt|period|permil|phmmat|planck|plankv|plusdo|plusdu|plusmn|preceq|primes|prnsim|propto|prurel|puncsp|qprime|racute|Racute|rangle|rarrap|rarrfs|rarrhk|rarrlp|rarrpl|rarrtl|Rarrtl|ratail|rAtail|rbrace|rbrack|rcaron|Rcaron|rcedil|Rcedil|rdquor|rfisht|rfloor|rharul|rmoust|roplus|rpargt|rsaquo|rsquor|rthree|rtimes|sacute|Sacute|scaron|Scaron|scedil|Scedil|scnsim|searhk|seswar|sfrown|shchcy|SHCHcy|sigmaf|sigmav|simdot|smashp|softcy|SOFTcy|solbar|spades|sqcaps|sqcups|sqsube|sqsupe|square|Square|squarf|ssetmn|ssmile|sstarf|subdot|subset|Subset|subsim|subsub|subsup|succeq|supdot|supset|Supset|supsim|supsub|supsup|swarhk|swnwar|target|tcaron|Tcaron|tcedil|Tcedil|telrec|there4|thetav|thinsp|thksim|timesb|timesd|topbot|topcir|tprime|tridot|tstrok|Tstrok|uacute|Uacute|ubreve|Ubreve|udblac|Udblac|ufisht|ugrave|Ugrave|ulcorn|ulcrop|urcorn|urcrop|utilde|Utilde|vangrt|varphi|varrho|Vdashl|veebar|vellip|verbar|Verbar|vsubne|vsubnE|vsupne|vsupnE|Vvdash|wedbar|wedgeq|weierp|wreath|xoplus|xotime|xsqcup|xuplus|xwedge|yacute|Yacute|zacute|Zacute|zcaron|Zcaron|zeetrf|acirc|Acirc|acute|aelig|AElig|aleph|alpha|Alpha|amacr|Amacr|amalg|angle|angrt|angst|aogon|Aogon|aring|Aring|asymp|awint|bcong|bdquo|bepsi|blank|blk12|blk14|blk34|block|boxdl|boxdL|boxDl|boxDL|boxdr|boxdR|boxDr|boxDR|boxhd|boxhD|boxHd|boxHD|boxhu|boxhU|boxHu|boxHU|boxul|boxuL|boxUl|boxUL|boxur|boxuR|boxUr|boxUR|boxvh|boxvH|boxVh|boxVH|boxvl|boxvL|boxVl|boxVL|boxvr|boxvR|boxVr|boxVR|breve|Breve|bsemi|bsime|bsolb|bumpe|bumpE|caret|caron|ccaps|ccirc|Ccirc|ccups|cedil|check|clubs|colon|Colon|comma|crarr|cross|Cross|csube|csupe|ctdot|cuepr|cuesc|cupor|cuvee|cuwed|cwint|dashv|Dashv|dblac|ddarr|delta|Delta|dharl|dharr|diams|disin|doteq|dtdot|dtrif|duarr|duhar|ecirc|Ecirc|eDDot|efDot|emacr|Emacr|empty|eogon|Eogon|eplus|epsiv|eqsim|Equal|equiv|erarr|erDot|esdot|exist|fflig|filig|fjlig|fllig|fltns|forkv|frasl|frown|gamma|Gamma|gcirc|Gcirc|gescc|gimel|gneqq|gnsim|grave|gsime|gsiml|gtcir|gtdot|Hacek|harrw|hcirc|Hcirc|hoarr|icirc|Icirc|iexcl|iiint|iiota|ijlig|IJlig|imacr|Imacr|image|imath|imped|infin|iogon|Iogon|iprod|isinE|isins|isinv|iukcy|Iukcy|jcirc|Jcirc|jmath|jukcy|Jukcy|kappa|Kappa|lAarr|langd|laquo|larrb|lates|lbarr|lBarr|lbbrk|lbrke|lceil|ldquo|lescc|lhard|lharu|lhblk|llarr|lltri|lneqq|lnsim|loang|loarr|lobrk|lopar|lrarr|lrhar|lrtri|lsime|lsimg|lsquo|ltcir|ltdot|ltrie|ltrif|mdash|mDDot|micro|minus|mumap|nabla|napid|napos|natur|nbump|ncong|ndash|nearr|neArr|nedot|nesim|ngeqq|ngsim|nharr|nhArr|nhpar|nlarr|nlArr|nleqq|nless|nlsim|nltri|notin|notni|npart|nprec|nrarr|nrArr|nrtri|nsime|nsmid|nspar|nsube|nsubE|nsucc|nsupe|nsupE|numsp|nvsim|nwarr|nwArr|ocirc|Ocirc|odash|oelig|OElig|ofcir|ohbar|olarr|olcir|oline|omacr|Omacr|omega|Omega|operp|oplus|orarr|order|ovbar|parsl|phone|plusb|pluse|pound|prcue|prime|Prime|prnap|prsim|quest|rAarr|radic|rangd|range|raquo|rarrb|rarrc|rarrw|ratio|rbarr|rBarr|RBarr|rbbrk|rbrke|rceil|rdquo|reals|rhard|rharu|rlarr|rlhar|rnmid|roang|roarr|robrk|ropar|rrarr|rsquo|rtrie|rtrif|sbquo|sccue|scirc|Scirc|scnap|scsim|sdotb|sdote|searr|seArr|setmn|sharp|sigma|Sigma|simeq|simgE|simlE|simne|slarr|smile|smtes|sqcap|sqcup|sqsub|sqsup|srarr|starf|strns|subne|subnE|supne|supnE|swarr|swArr|szlig|theta|Theta|thkap|thorn|THORN|tilde|Tilde|times|trade|TRADE|trisb|tshcy|TSHcy|twixt|ubrcy|Ubrcy|ucirc|Ucirc|udarr|udhar|uharl|uharr|uhblk|ultri|umacr|Umacr|Union|uogon|Uogon|uplus|upsih|UpTee|uring|Uring|urtri|utdot|utrif|uuarr|varpi|vBarv|vdash|vDash|Vdash|VDash|veeeq|vltri|vnsub|vnsup|vprop|vrtri|wcirc|Wcirc|wedge|Wedge|xcirc|xdtri|xharr|xhArr|xlarr|xlArr|xodot|xrarr|xrArr|xutri|ycirc|Ycirc|andd|andv|ange|aopf|Aopf|apid|apos|ascr|Ascr|auml|Auml|Barv|bbrk|beta|Beta|beth|bnot|bNot|bopf|Bopf|boxh|boxH|boxv|boxV|bscr|Bscr|bsim|bsol|bull|bump|caps|cdot|Cdot|cent|chcy|CHcy|circ|cire|cirE|comp|cong|copf|Copf|copy|COPY|cscr|Cscr|csub|csup|cups|darr|dArr|Darr|dash|dHar|diam|djcy|DJcy|dopf|Dopf|dscr|Dscr|dscy|DScy|dsol|dtri|dzcy|DZcy|ecir|edot|eDot|Edot|emsp|ensp|eopf|Eopf|epar|epsi|escr|Escr|esim|Esim|euml|Euml|euro|excl|flat|fnof|fopf|Fopf|fork|fscr|Fscr|gdot|Gdot|geqq|gesl|gjcy|GJcy|gnap|gneq|gopf|Gopf|gscr|Gscr|gsim|gtcc|gvnE|half|harr|hArr|hbar|hopf|Hopf|hscr|Hscr|Idot|iecy|IEcy|imof|iocy|IOcy|iopf|Iopf|iota|Iota|iscr|Iscr|isin|iuml|Iuml|jopf|Jopf|jscr|Jscr|khcy|KHcy|kjcy|KJcy|kopf|Kopf|kscr|Kscr|lang|Lang|larr|lArr|Larr|late|lcub|ldca|ldsh|leqq|lesg|lHar|ljcy|LJcy|lnap|lneq|lopf|Lopf|lozf|lpar|lscr|Lscr|lsim|lsqb|ltcc|ltri|lvnE|macr|male|malt|mlcp|mldr|mopf|Mopf|mscr|Mscr|nang|napE|nbsp|ncap|ncup|ngeq|nges|ngtr|nGtv|nisd|njcy|NJcy|nldr|nleq|nles|nLtv|nmid|nopf|Nopf|npar|npre|nsce|nscr|Nscr|nsim|nsub|nsup|ntgl|ntlg|nvap|nvge|nvgt|nvle|nvlt|oast|ocir|odiv|odot|ogon|oint|omid|oopf|Oopf|opar|ordf|ordm|oror|oscr|Oscr|osol|ouml|Ouml|para|part|perp|phiv|plus|popf|Popf|prap|prec|prnE|prod|prop|pscr|Pscr|qint|qopf|Qopf|qscr|Qscr|quot|QUOT|race|rang|Rang|rarr|rArr|Rarr|rcub|rdca|rdsh|real|rect|rHar|rhov|ring|ropf|Ropf|rpar|rscr|Rscr|rsqb|rtri|scap|scnE|sdot|sect|semi|sext|shcy|SHcy|sime|simg|siml|smid|smte|solb|sopf|Sopf|spar|Sqrt|squf|sscr|Sscr|star|Star|sube|subE|succ|sung|sup1|sup2|sup3|supe|supE|tbrk|tdot|tint|toea|topf|Topf|tosa|trie|tscr|Tscr|tscy|TScy|uarr|uArr|Uarr|uHar|uopf|Uopf|upsi|Upsi|uscr|Uscr|utri|uuml|Uuml|varr|vArr|vBar|Vbar|vert|Vert|vopf|Vopf|vscr|Vscr|wopf|Wopf|wscr|Wscr|xcap|xcup|xmap|xnis|xopf|Xopf|xscr|Xscr|xvee|yacy|YAcy|yicy|YIcy|yopf|Yopf|yscr|Yscr|yucy|YUcy|yuml|Yuml|zdot|Zdot|zeta|Zeta|zhcy|ZHcy|zopf|Zopf|zscr|Zscr|zwnj|acd|acE|acy|Acy|afr|Afr|amp|AMP|and|And|ang|ape|apE|ast|bcy|Bcy|bfr|Bfr|bne|bot|cap|Cap|cfr|Cfr|chi|Chi|cir|cup|Cup|dcy|Dcy|deg|Del|dfr|Dfr|die|div|dot|Dot|ecy|Ecy|efr|Efr|egs|ell|els|eng|ENG|eta|Eta|eth|ETH|fcy|Fcy|ffr|Ffr|gap|gcy|Gcy|gel|gEl|geq|ges|gfr|Gfr|ggg|gla|glE|glj|gne|gnE|Hat|hfr|Hfr|icy|Icy|iff|ifr|Ifr|int|Int|jcy|Jcy|jfr|Jfr|kcy|Kcy|kfr|Kfr|lap|lat|lcy|Lcy|leg|lEg|leq|les|lfr|Lfr|lgE|lne|lnE|loz|lrm|lsh|Lsh|map|Map|mcy|Mcy|mfr|Mfr|mho|mid|nap|ncy|Ncy|nfr|Nfr|nge|ngE|nGg|ngt|nGt|nis|niv|nle|nlE|nLl|nlt|nLt|not|Not|npr|nsc|num|ocy|Ocy|ofr|Ofr|ogt|ohm|olt|ord|orv|par|pcy|Pcy|pfr|Pfr|phi|Phi|piv|pre|prE|psi|Psi|qfr|Qfr|rcy|Rcy|reg|REG|rfr|Rfr|rho|Rho|rlm|rsh|Rsh|sce|scE|scy|Scy|sfr|Sfr|shy|sim|smt|sol|squ|sub|Sub|sum|Sum|sup|Sup|Tab|tau|Tau|tcy|Tcy|tfr|Tfr|top|ucy|Ucy|ufr|Ufr|uml|vcy|Vcy|vee|Vee|vfr|Vfr|wfr|Wfr|xfr|Xfr|ycy|Ycy|yen|yfr|Yfr|zcy|Zcy|zfr|Zfr|zwj|ac|af|ap|dd|DD|ee|eg|el|ge|gE|gg|Gg|gl|gt|Gt|GT|ic|ii|Im|in|it|le|lE|lg|ll|Ll|lt|Lt|LT|mp|mu|Mu|ne|ni|nu|Nu|or|Or|oS|pi|Pi|pm|pr|Pr|Re|rx|sc|Sc|wp|wr|xi|Xi));)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function escapeHtmlStrict(text){if(text===null||text===undefined)return"";return String(text).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}const esc=escapeHtml;function isSafeHref(h){h=String(h===null||h===undefined?"":h).trim();if(h==="")return true;var p=h.replace(/[\u0000-\u001F\u007F]/g,"");if(/^[a-z][a-z0-9+.-]*:/i.test(p)){return/^(https?|ftp|ftps|mailto|tel|sms|irc|ircs|git|ssh|news|nntp):/i.test(p)}return true}function escapeRe(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function isThematicBreak(line){const s=String(line);let c=0,n=0;for(let i=0;i<s.length;i++){const k=s.charCodeAt(i);if(k===32||k===9)continue;if(c===0){if(k!==42&&k!==45&&k!==95)return false;c=k;n=1}else if(k!==c)return false;else n++}return n>=3}function splitAttrs(raw){const m=String(raw).match(/\s+\{([^}]+)\}\s*$/);if(!m)return{text:raw,attrs:null};const inner=m[1];const attrs={id:"",cls:[],no:null,fold:false,nofold:false};const tokens=inner.split(/\s+/);for(const t of tokens){if(!t)continue;if(t.charAt(0)==="#"){attrs.id=t.slice(1)}else if(t.charAt(0)==="."){attrs.cls.push(t.slice(1))}else{const eq=t.indexOf("=");if(eq>0){const k=t.slice(0,eq),v=t.slice(eq+1);if(k==="no")attrs.no=v}else if(t==="fold"){attrs.fold=true}else if(t==="nofold"){attrs.nofold=true}}}return{text:raw.slice(0,m.index),attrs:attrs}}function normalizeRefLabel(s){return String(s).replace(/\uE004/g," ").replace(/ẞ/g,"ss").toUpperCase().toLowerCase().trim().replace(/\s+/g," ")}function extractTextFromNodes(nodes){let s="";for(const c of nodes){if(!c)continue;const t=c.type;if(t==="text"||t==="code"||t==="inlineCode")s+=(c.value||"").replace(/\uE004/g," ");else if(t==="abbr")s+=c.text||"";else if(t==="badge"||t==="term")s+=c.label||"";else if(t==="key")s+=c.value||"";else if(t==="lang")s+=c.name||"";else if(t==="date")s+=c.raw||"";else if(t==="ruby")s+=c.base||"";else if(t==="mathInline"||t==="mathBlock")s+=c.value||"";else if(t==="copy"||t==="copyBlock")s+=c.value||"";else if(t==="image")s+=c.alt||"";else if(t==="alt")s+=c.options&&c.options.length?c.options[0]:"";else if(t==="ref")s+=c.target||"";else if(t==="dot"||t==="pn"||t==="upper"||t==="lower"||t==="cap"||t==="cmd"||t==="flag")s+=c.text||"";else if(t==="note")s+=c.label||"";else if(c.children)s+=extractTextFromNodes(c.children)}return s}function slugify(text){let s=String(text).toLowerCase().trim();s=s.replace(/[\s,。、!?;:""''《》【】·—…,.!?;:'"()\[\]{}<>|\\\/]+/g,"-");s=s.replace(/[^\p{L}\p{N}\p{M}_-]/gu,"");s=s.replace(/-+/g,"-");s=s.replace(/^-|-$/g,"");if(!s)s="section";return s}function autoColor(name){let h=0;for(let i=0;i<name.length;i++)h=h*31+name.charCodeAt(i)>>>0;return AUTO_COLORS[h%AUTO_COLORS.length]}function isSafeAutolink(h){h=String(h===null||h===undefined?"":h).trim();var p=h.replace(/[\u0000-\u001F\u007F]/g,"");var m=/^([a-z][a-z0-9+.-]*):/i.exec(p);if(!m)return true;return!/^(javascript|vbscript|data|file)$/i.test(m[1])}function __cmSafeHrefAttr(v){var raw=__cmDecodeEntities(String(v===null||v===undefined?"":v)).trim();return isSafeHref(raw)?raw:""}function __cmSafeMediaSrc(v){var raw=__cmDecodeEntities(String(v===null||v===undefined?"":v)).trim().replace(/[\u0000-\u001F\u007F]/g,"");if(!raw)return raw;var m=/^([a-z][a-z0-9+.-]*):/i.exec(raw);if(m){var s=m[1].toLowerCase();if(s==="javascript"||s==="vbscript"||s==="file")return"";if(s==="data"&&/^data:text\/html/i.test(raw))return""}return raw}var __CM_ENT={colon:":",Tab:"\t",NewLine:"\n",sol:"/",bsol:"\\",amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ",copy:"©",reg:"®",trade:"™",hellip:"…",mdash:"—",ndash:"–",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",middot:"·",bull:"•",dagger:"†",Dagger:"‡",permil:"‰",prime:"′",Prime:"″",euro:"€",pound:"£",yen:"¥",cent:"¢",sect:"§",para:"¶",deg:"°",plusmn:"±",times:"×",divide:"÷",micro:"µ",laquo:"«",raquo:"»",lsaquo:"‹",rsaquo:"›",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ"};function __cmDecodeEntities(s){return String(s===null||s===undefined?"":s).replace(/&(?:#(\d{1,7})|#[xX]([0-9a-fA-F]{1,6})|([a-zA-Z][a-zA-Z0-9]{1,31}));/g,function(_,d,h,n){if(d!==undefined){var cp=parseInt(d,10);if(cp===0||cp>=55296&&cp<=57343||cp>1114111)return"�";if(cp>=0){try{return String.fromCodePoint(cp)}catch(e){}}return _}if(h!==undefined){var cp2=parseInt(h,16);if(cp2===0||cp2>=55296&&cp2<=57343||cp2>1114111)return"�";if(cp2>=0){try{return String.fromCodePoint(cp2)}catch(e){}}return _}var v=__CM_ENT[n];return v!==undefined?v:_})}function resolveColor(token){if(!token)return null;token=String(token).trim();if(/^#[0-9a-fA-F]{3,8}$/.test(token))return token;const lower=token.toLowerCase();if(COLOR_ALIASES[lower])return COLOR_ALIASES[lower];return null}function hexToRgba(hex,alpha){hex=String(hex).replace("#","");if(hex.length===3)hex=hex.split("").map(c=>c+c).join("");if(hex.length===8)hex=hex.slice(0,6);if(hex.length!==6)return"rgba(107,90,207,"+alpha+")";const r=parseInt(hex.slice(0,2),16),g=parseInt(hex.slice(2,4),16),b=parseInt(hex.slice(4,6),16);if(isNaN(r)||isNaN(g)||isNaN(b))return"rgba(107,90,207,"+alpha+")";return"rgba("+r+","+g+","+b+","+alpha+")"}function pad2(n){return String(n).padStart(2,"0")}function fmtD(ts){const d=new Date(ts);return d.getFullYear()+"-"+pad2(d.getMonth()+1)+"-"+pad2(d.getDate())}function fmtDT(ts){const d=new Date(ts);return fmtD(ts)+" "+pad2(d.getHours())+":"+pad2(d.getMinutes())}function parseDateStr(str){str=String(str).trim();const hasTime=/[T ]\d{1,2}:\d{2}/.test(str);const norm=str.replace(/\//g,"-").replace(" ","T");const d=new Date(norm);if(isNaN(d.getTime()))return{ts:null,text:str};const ts=d.getTime();return{ts:ts,text:hasTime?fmtDT(ts):fmtD(ts)}}function relTime(ts,raw,lang){const dict=I18N_DICT[lang]||I18N_DICT["zh-CN"];const T=function(k,p){return __cmI18nPick(dict,k,p,lang)};const diff=Date.now()-ts,abs=Math.abs(diff),future=diff<0;if(abs<2*864e5)return abs<1e3?T("date.justNow"):abs<6e4?T(future?"date.secLater":"date.secAgo",{n:Math.floor(abs/1e3)}):abs<36e5?T(future?"date.minLater":"date.minAgo",{n:Math.floor(abs/6e4)}):abs<864e5?T(future?"date.hourLater":"date.hourAgo",{n:Math.floor(abs/36e5)}):future?T("date.tomorrow"):T("date.yesterday");raw=String(raw||"");const hM=/[-/]\d{1,2}([-/]|$)/.test(raw),hD=/[-/]\d{1,2}[-/]\d{1,2}/.test(raw);let d1=new Date(ts),d2=new Date;if(future){const tmp=d1;d1=d2;d2=tmp}let yD=d2.getFullYear()-d1.getFullYear(),mD=d2.getMonth()-d1.getMonth(),dD=d2.getDate()-d1.getDate();if(dD<0){mD--;dD+=new Date(d2.getFullYear(),d2.getMonth(),0).getDate()}if(mD<0){yD--;mD+=12}const parts=[];if(yD>0)parts.push(yD+T("date.yearUnit"));if((hM||hD)&&mD>0)parts.push(mD+T("date.monthUnit"));if(hD&&dD>0)parts.push(dD+T("date.dayUnit"));const res=parts.join("")||T("date.justNow");return res+(future?T("date.laterUnit"):T("date.agoUnit"))}function parseBadge(raw){const parts=String(raw).trim().split(/\s+/).filter(Boolean);let url="";for(let i=parts.length-1;i>=0;i--){const um=parts[i].match(/^url=(.+)$/);if(um){url=um[1];parts.splice(i,1);break}}if(!parts.length)return{label:"",color:"#6b5acf",url:url};if(parts.length===1)return{label:parts[0],color:"#6b5acf",url:url};const lp=parts[parts.length-1];if(lp.charAt(0)==="\\"){parts[parts.length-1]=lp.slice(1);return{label:parts.join(" "),color:"#6b5acf",url:url}}const c=resolveColor(lp);if(c)return{label:parts.slice(0,-1).join(" "),color:c,url:url};return{label:parts.join(" "),color:"#6b5acf",url:url}}function parseCol(raw){const parts=String(raw||"").trim().split(/\s+/).filter(Boolean);if(!parts.length)return{title:"",color:""};if(parts.length===1)return{title:parts[0],color:""};const c=resolveColor(parts[parts.length-1]);if(c)return{title:parts.slice(0,-1).join(" "),color:c};return{title:parts.join(" "),color:""}}function parseTimelineHeader(raw){const t=String(raw||"").trim().toLowerCase();if(!t)return"";if(t==="rainbow")return"rainbow";const c=resolveColor(raw);return c||""}const RE_OPEN=/^:::(tip|hint|important|info|warn|warning|caution|attention|danger|error|ask|question|help|faq|ok|success|check|done|note|abstract|summary|tldr|todo|failure|fail|missing|bug|example|quote|cite|detail|link|pbar|tree|chat|users|tabs|tab|timeline|grid|cell|compare|col|msg|sys|mcq|saq|key|copy|hei|center|right|left|say|swipe|vote|flashcard|flashcards|kanban|task|style|btnimg|game|row|box|blur|scr|collage|ghr|cfg|dl|chartbar|chartline|bg|when|if|print|screen|ssr|client|let|macro|use|fig|tbl|eq|meta)(?:[+\-_~]*)(?:\s|$)/;const RE_CLOSE_X=/^:::\/([a-z][a-z0-9]*)[ \t]*$/;const RE_CLOSE=/^:::[ \t]*$/;function scanContainer(lines,start,selfName,breakOnSameName){const body=[];let j=start;const stack=[selfName||"_"];let fenceChar="",fenceLen=0;while(j<lines.length){const l=lines[j];if(fenceChar){const fc=l.match(/^ {0,3}(`{3,}|~{3,})[ \t]*$/);if(fc&&fc[1].charAt(0)===fenceChar&&fc[1].length>=fenceLen){fenceChar="";fenceLen=0}body.push(l);j++;continue}const fo=l.match(/^ {0,3}(`{3,}|~{3,})/);if(fo){fenceChar=fo[1].charAt(0);fenceLen=fo[1].length;body.push(l);j++;continue}const xm=l.match(RE_CLOSE_X);if(xm){if(stack[stack.length-1]===xm[1]){stack.pop();if(stack.length===0)return{body:body.join("\n"),next:j+1,closed:true};body.push(l);j++;continue}body.push(l);j++;continue}if(RE_CLOSE.test(l)){if(j>start&&/^:::(redpacket|transfer|card|img)(?:\s|$)/.test(lines[j-1])){body.push(l);j++;continue}stack.pop();if(stack.length===0)return{body:body.join("\n"),next:j+1,closed:true};body.push(l);j++;continue}const om=l.match(RE_OPEN);if(om){const nm=om[1];if(breakOnSameName&&stack.length===1&&nm===stack[0])return{body:body.join("\n"),next:j,closed:true};stack.push(nm);body.push(l);j++;continue}body.push(l);j++}return{body:body.join("\n"),next:j,closed:false}}function collectContainer(lines,start,selfName,breakOnSameName){return scanContainer(lines,start,selfName,breakOnSameName)}function renderToc(headings,ctx){if(!headings.length)return"";const root={children:[]};const stack=[root];for(const h of headings){while(stack.length>1&&stack[stack.length-1].depth>=h.depth){stack.pop()}const node={heading:h,children:[],depth:h.depth};stack[stack.length-1].children.push(node);stack.push(node)}function sortCh(n){n.children.sort((a,b)=>{const ap=a.heading.suffix&&a.heading.suffix.indexOf("!")>=0?0:1;const bp=b.heading.suffix&&b.heading.suffix.indexOf("!")>=0?0:1;return ap-bp});for(const c of n.children)sortCh(c)}sortCh(root);function r(n){if(!n.children.length)return"";let html="<ul>";for(const ch of n.children){const hasCh=ch.children&&ch.children.length>0;html+="<li"+(ch.heading.suffix?' data-hd="'+escapeHtml(ch.heading.suffix)+'"':"")+">";html+='<div class="md-toc-item">';if(hasCh)html+='<span class="md-toc-toggle"></span>';else html+='<span class="md-toc-toggle empty"></span>';html+='<span class="md-toc-marker"></span><a href="#'+escapeHtml(ch.heading.id)+'">'+escapeHtml(ch.heading.text)+"</a></div>";html+=r(ch)+"</li>"}return html+"</ul>"}return'<nav class="md-toc"><div class="md-toc-header"><span class="md-toc-title">'+escapeHtml(__i18nT(ctx,"toc.title"))+'</span><button class="md-toc-global-btn"><i class="fas fa-chevron-up"></i> <span>'+escapeHtml(__i18nT(ctx,"toc.collapse"))+'</span></button></div><div class="md-toc-content">'+r(root)+"</div></nav>"}function __listLoose(list){if(!list)return false;for(let i=0;i<list.items.length;i++){if(list.items[i].__looseSelf)return true}return false}function __nodesHaveLoose(nodes){if(!nodes)return false;for(let i=0;i<nodes.length;i++){const n=nodes[i];if(n&&n.type==="list"&&__listLoose(n))return true}return false}function __cmSubLoose(subLines,itemText){var inFence=false,fChar="",fLen=0,nestedMarker=false;var fm=itemText.match(/^ {0,3}(`{3,}|~{3,})/);if(fm){inFence=true;fChar=fm[1].charAt(0);fLen=fm[1].length}for(var k=0;k<subLines.length;k++){var sl=subLines[k];var ind=(sl.match(/^ */)||[""])[0].length;if(inFence){var fc=sl.match(/^ {0,3}(`{3,}|~{3,})/);if(fc&&fc[1].charAt(0)===fChar&&fc[1].length>=fLen){inFence=false}continue}var fo=sl.match(/^ {0,3}(`{3,}|~{3,})/);if(fo){inFence=true;fChar=fo[1].charAt(0);fLen=fo[1].length;continue}if(!sl.trim()){var nx=k+1;while(nx<subLines.length&&!subLines[nx].trim())nx++;if(nx>=subLines.length)continue;var nl=subLines[nx];var nind=(nl.match(/^ */)||[""])[0].length;var prev=k>0?subLines[k-1]:itemText.split("\n").pop();var pind=prev?(prev.match(/^ */)||[""])[0].length:0;var prevMarker=!!(prev&&/^ {0,3}(?:[-*+]|\d{1,9}[.)])\s/.test(prev));var nextMarker=/^ {0,3}(?:[-*+]|\d{1,9}[.)])\s/.test(nl);if(nestedMarker&&(nind>0||nextMarker)||prevMarker&&(nind>pind||nextMarker))continue;return true}if(/^ {0,3}(?:[-*+]|\d{1,9}[.)])\s/.test(sl))nestedMarker=true}return false}const DEFAULT_CONFIG={hljs:true,katex:true,mermaid:true,tip:true,copy:true,zoom:true,anchor:true,gfm:true,table:true,tasklist:true,strike:true,autolink:true,math:true,emoji:true,html:true,footnote:true,abbr:true,toc:true,decorations:true,containers:true,chat:true,scr:true,links:true,keepmd:false,autocollage:false,headingline:false,dropcap:false,breaks:true,lazycontinuation:false,tableexport:true,smartypants:true,headnum:false,headnumsep:".",headnumsuffix:" ",blanklines:true,blankmin:2,langattr:false,codeblocktrim:true,gfmsingletilde:false};const DECORATION_TYPES={circle:1,cross:1,stamp:1,score:1,wave:1,echo:1,neon:1,marker:1,vert:1,cursor:1,shadow:1,blur:1,path:1,shake:1};function parseCfg(raw){const cfg=Object.create(null);raw.split("\n").forEach(line=>{line=line.trim();if(!line||line.charAt(0)==="#")return;let idx=line.indexOf(":");if(idx<0)idx=line.indexOf(":");if(idx<0)return;const k=line.slice(0,idx).trim().toLowerCase();const vRaw=line.slice(idx+1).trim();const v=vRaw.toLowerCase();if(!k)return;if(k==="reset"){if(v==="on"||v==="true"||v==="1")cfg.__reset=true;return}if(k==="lang"){if(vRaw)cfg.lang=vRaw;return}if(k==="headnumsep"||k==="headnumsuffix"){cfg[k]=vRaw;return}if(k==="blankmin"){const __bn=parseInt(vRaw,10);if(isFinite(__bn)&&__bn>=1)cfg[k]=__bn;return}if(v==="on"||v==="true"||v==="1")cfg[k]=true;else if(v==="off"||v==="false"||v==="0")cfg[k]=false});return cfg}function isNodeAllowed(type,node,ctx){const c=ctx.config;if(type==="html")return c.html;if(type==="mathInline"||type==="mathBlock")return c.math;if(type==="delete")return c.gfm&&c.strike;if(type==="footnoteRef")return c.footnote;if(type==="emoji")return c.emoji;if(DECORATION_TYPES[type])return c.decorations;return true}var CHART_UNITS={"zh-CN":[{v:1e100,s:"古戈尔"},{v:1e68,s:"无量大数"},{v:1e64,s:"不可思议"},{v:1e60,s:"那由他"},{v:1e56,s:"阿僧祇"},{v:1e52,s:"恒河沙"},{v:1e48,s:"极"},{v:1e44,s:"载"},{v:1e40,s:"正"},{v:1e36,s:"涧"},{v:1e32,s:"沟"},{v:1e28,s:"穰"},{v:1e24,s:"秭"},{v:1e20,s:"垓"},{v:1e16,s:"京"},{v:1e12,s:"兆"},{v:1e8,s:"亿"},{v:1e4,s:"万"},{v:1e3,s:"k"}],"zh-TW":[{v:1e100,s:"古戈爾"},{v:1e68,s:"無量大數"},{v:1e64,s:"不可思議"},{v:1e60,s:"那由他"},{v:1e56,s:"阿僧祇"},{v:1e52,s:"恆河沙"},{v:1e48,s:"極"},{v:1e44,s:"載"},{v:1e40,s:"正"},{v:1e36,s:"澗"},{v:1e32,s:"溝"},{v:1e28,s:"穰"},{v:1e24,s:"秭"},{v:1e20,s:"垓"},{v:1e16,s:"京"},{v:1e12,s:"兆"},{v:1e8,s:"億"},{v:1e4,s:"萬"},{v:1e3,s:"k"}],ja:[{v:1e100,s:"古戈尔"},{v:1e68,s:"無量大数"},{v:1e64,s:"不可思議"},{v:1e60,s:"那由他"},{v:1e56,s:"阿僧祇"},{v:1e52,s:"恒河沙"},{v:1e48,s:"極"},{v:1e44,s:"載"},{v:1e40,s:"正"},{v:1e36,s:"澗"},{v:1e32,s:"溝"},{v:1e28,s:"穣"},{v:1e24,s:"秭"},{v:1e20,s:"垓"},{v:1e16,s:"京"},{v:1e12,s:"兆"},{v:1e8,s:"億"},{v:1e4,s:"万"},{v:1e3,s:"k"}],ko:[{v:1e48,s:"극"},{v:1e44,s:"재"},{v:1e40,s:"정"},{v:1e36,s:"간"},{v:1e32,s:"구"},{v:1e28,s:"양"},{v:1e24,s:"자"},{v:1e20,s:"해"},{v:1e16,s:"경"},{v:1e12,s:"조"},{v:1e8,s:"억"},{v:1e4,s:"만"},{v:1e3,s:"k"}],en:[{v:1e33,s:"Dc"},{v:1e30,s:"No"},{v:1e27,s:"Oc"},{v:1e24,s:"Sp"},{v:1e21,s:"Sx"},{v:1e18,s:"Qi"},{v:1e15,s:"Qa"},{v:1e12,s:"T"},{v:1e9,s:"B"},{v:1e6,s:"M"},{v:1e3,s:"k"}]};var I18N_DICT={"zh-CN":{"toc.title":"目录","toc.collapse":"收起","toc.expand":"展开","code.copy":"复制代码","code.lines":"行","code.cols":"列","code.chars":"字符","dl.download":"下载","mcq.selected":"已选·","mcq.single":"单选","mcq.multi":"多选","mcq.submit":"提交答案","mcq.hintClick":"点击选项作答","mcq.hintMulti":"可选多个选项","mcq.toggleView":"我也要选","mcq.togglePlay":"查看答案","mcq.reset":"重新作答","mcq.explain":"解析","mcq.ok":"回答正确","mcq.partial":"回答不完整","mcq.wrong":"回答错误","mcq.authorNone":"未作答","mcq.authorPick":"选择了","mcq.authorOk":"答对了","mcq.authorPartial":"回答不完整","mcq.authorWrong":"答错了","fc.hint":"点击翻转","fcs.shuffle":"洗牌","chat.card":"个人名片","chat.rpDefault":"恭喜发财,大吉大利","vote.total":"共 {n} 人参与","ghr.loading":"加载中...","audio.subsToggle":"展开/收起字幕","audio.noSubs":"无字幕","audio.subsErr":"字幕解析错误","audio.unknownTitle":"未知标题","audio.unknownSource":"未知来源","audio.fieldTitle":"标题","audio.fieldSource":"来源","audio.fieldCover":"封面","audio.fieldAudio":"音频","audio.copy":"复制","audio.copied":"已复制","mermaid.loading":"Mermaid loading","mermaid.copy":"复制源码","mermaid.zoom":"放大","table.export":"导出 CSV","table.filename":"table_export.csv","heading.copyLink":"复制标题链接","rp.from":"来自 {name} 的红包","rp.opened":"红包已被领完","rp.summary":"共 {n} 人领取,已全部领完","warn.unclosed":"[UpKram] 有 {n} 个容器未闭合,请检查源文档","code.wrap":"换行/滚动切换","mcq.selectFirst":"请至少选择一个选项","rp.someone":"某人","rp.giverName":"{name} 的红包","rp.openAria":"拆红包","ghr.justNow":"刚刚","ghr.minAgo":"{n} 分钟前","ghr.hourAgo":"{n} 小时前","ghr.dayAgo":"{n} 天前","ghr.monthAgo":"{n} 个月前","ghr.yearAgo":"{n} 年前","ghr.updated":"{time}更新","ghr.archived":"已归档","ghr.noDesc":"暂无描述","ghr.invalidRepo":"无效的仓库格式(应写为 owner/repo)","ghr.unknownLang":"未知","warn.unclosedBadge":"未闭合"},en:{"toc.title":"Contents","toc.collapse":"Collapse","toc.expand":"Expand","code.copy":"Copy code","code.lines":"lines","code.cols":"cols","code.chars":"chars","dl.download":"Download","mcq.selected":"Selected·","mcq.single":"Single","mcq.multi":"Multiple","mcq.submit":"Submit","mcq.hintClick":"Click an option","mcq.hintMulti":"Multiple answers allowed","mcq.toggleView":"Try it","mcq.togglePlay":"View answer","mcq.reset":"Reset","mcq.explain":"Explanation","mcq.ok":"Correct","mcq.partial":"Incomplete","mcq.wrong":"Incorrect","mcq.authorNone":"No answer","mcq.authorPick":"Selected","mcq.authorOk":"Correct","mcq.authorPartial":"Incomplete","mcq.authorWrong":"Incorrect","fc.hint":"Click to flip","fcs.shuffle":"Shuffle","chat.card":"Contact card","chat.rpDefault":"Best wishes","vote.total":"{n} votes","ghr.loading":"Loading...","audio.subsToggle":"Toggle subtitles","audio.noSubs":"No subtitles","audio.subsErr":"Subtitle error","audio.unknownTitle":"Unknown title","audio.unknownSource":"Unknown source","audio.fieldTitle":"Title","audio.fieldSource":"Source","audio.fieldCover":"Cover","audio.fieldAudio":"Audio","audio.copy":"Copy","audio.copied":"Copied","mermaid.loading":"Mermaid loading","mermaid.copy":"Copy source","mermaid.zoom":"Zoom","table.export":"Export CSV","table.filename":"table_export.csv","heading.copyLink":"Copy link to heading","rp.from":"Red packet from {name}","rp.opened":"All packets claimed","rp.summary":"{n} claimed · all gone","warn.unclosed":"[UpKram] {n} unclosed container(s) detected","code.wrap":"Toggle wrap","mcq.selectFirst":"Please select at least one option","rp.someone":"Someone","rp.giverName":"{name}'s red packet","rp.openAria":"Open red packet","ghr.justNow":"just now","ghr.minAgo":"{n} min ago","ghr.hourAgo":"{n} hr ago","ghr.dayAgo":"{n} d ago","ghr.monthAgo":"{n} mo ago","ghr.yearAgo":"{n} yr ago","ghr.updated":"updated {time}","ghr.archived":"Archived","ghr.noDesc":"No description","ghr.invalidRepo":"Invalid repository format (should be owner/repo)","ghr.unknownLang":"Unknown","warn.unclosedBadge":"Unclosed"}};I18N_DICT["zh-TW"]={"toc.title":"目錄","toc.collapse":"收合","toc.expand":"展開","code.copy":"複製程式碼","code.lines":"行","code.cols":"欄","code.chars":"字元","dl.download":"下載","mcq.selected":"已選·","mcq.single":"單選","mcq.multi":"多選","mcq.submit":"提交答案","mcq.hintClick":"點選選項作答","mcq.hintMulti":"可選多個選項","mcq.toggleView":"我也要選","mcq.togglePlay":"查看答案","mcq.reset":"重新作答","mcq.explain":"解析","mcq.ok":"回答正確","mcq.partial":"回答不完整","mcq.wrong":"回答錯誤","mcq.authorNone":"未作答","mcq.authorPick":"選擇了","mcq.authorOk":"答對了","mcq.authorPartial":"回答不完整","mcq.authorWrong":"答錯了","fc.hint":"點擊翻轉","fcs.shuffle":"洗牌","chat.card":"個人名片","chat.rpDefault":"恭喜發財,大吉大利","vote.total":"共 {n} 人參與","ghr.loading":"載入中...","audio.subsToggle":"展開/收合字幕","audio.noSubs":"無字幕","audio.subsErr":"字幕解析錯誤","audio.unknownTitle":"未知標題","audio.unknownSource":"未知來源","audio.fieldTitle":"標題","audio.fieldSource":"來源","audio.fieldCover":"封面","audio.fieldAudio":"音訊","audio.copy":"複製","audio.copied":"已複製","mermaid.loading":"Mermaid 載入中","mermaid.copy":"複製原始碼","mermaid.zoom":"放大","table.export":"匯出 CSV","table.filename":"table_export.csv","heading.copyLink":"複製標題連結","rp.from":"來自 {name} 的紅包","rp.opened":"紅包已被領完","rp.summary":"共 {n} 人領取,已全部領完","warn.unclosed":"[UpKram] 有 {n} 個容器未閉合,請檢查原始文件","code.wrap":"換行/滾動切換","mcq.selectFirst":"請至少選擇一個選項","rp.someone":"某人","rp.giverName":"{name} 的紅包","rp.openAria":"拆紅包","ghr.justNow":"剛剛","ghr.minAgo":"{n} 分鐘前","ghr.hourAgo":"{n} 小時前","ghr.dayAgo":"{n} 天前","ghr.monthAgo":"{n} 個月前","ghr.yearAgo":"{n} 年前","ghr.updated":"{time}更新","ghr.archived":"已封存","ghr.noDesc":"暫無描述","ghr.invalidRepo":"無效的倉庫格式(應寫為 owner/repo)","ghr.unknownLang":"未知","warn.unclosedBadge":"未閉合"};I18N_DICT["ja"]={"toc.title":"目次","toc.collapse":"折りたたむ","toc.expand":"展開","code.copy":"コードをコピー","code.lines":"行","code.cols":"列","code.chars":"文字","dl.download":"ダウンロード","mcq.selected":"選択済み·","mcq.single":"単一選択","mcq.multi":"複数選択","mcq.submit":"回答を送信","mcq.hintClick":"選択肢をクリック","mcq.hintMulti":"複数選択可能","mcq.toggleView":"自分も選ぶ","mcq.togglePlay":"回答を見る","mcq.reset":"やり直す","mcq.explain":"解説","mcq.ok":"正解","mcq.partial":"不完全","mcq.wrong":"不正解","mcq.authorNone":"未回答","mcq.authorPick":"選択","mcq.authorOk":"正解","mcq.authorPartial":"不完全","mcq.authorWrong":"不正解","fc.hint":"クリックでめくる","fcs.shuffle":"シャッフル","chat.card":"プロフィールカード","chat.rpDefault":"おめでとうございます","vote.total":"{n} 人が参加","ghr.loading":"読み込み中...","audio.subsToggle":"字幕の表示切替","audio.noSubs":"字幕なし","audio.subsErr":"字幕解析エラー","audio.unknownTitle":"不明なタイトル","audio.unknownSource":"不明なソース","audio.fieldTitle":"タイトル","audio.fieldSource":"ソース","audio.fieldCover":"カバー","audio.fieldAudio":"音声","audio.copy":"コピー","audio.copied":"コピー済み","mermaid.loading":"Mermaid 読み込み中","mermaid.copy":"ソースをコピー","mermaid.zoom":"拡大","table.export":"CSV エクスポート","table.filename":"table_export.csv","heading.copyLink":"見出しリンクをコピー","rp.from":"{name} からの紅包","rp.opened":"紅包は配布済み","rp.summary":"{n} 人が受取済み","warn.unclosed":"[UpKram] 閉じられていないコンテナが {n} 個あります","code.wrap":"折り返し/スクロール切替","mcq.selectFirst":"少なくとも 1 つ選択してください","rp.someone":"誰か","rp.giverName":"{name} の紅包","rp.openAria":"紅包を開く","ghr.justNow":"たった今","ghr.minAgo":"{n} 分前","ghr.hourAgo":"{n} 時間前","ghr.dayAgo":"{n} 日前","ghr.monthAgo":"{n} か月前","ghr.yearAgo":"{n} 年前","ghr.updated":"{time}更新","ghr.archived":"アーカイブ済み","ghr.noDesc":"説明なし","ghr.invalidRepo":"無効なリポジトリ形式(owner/repo で指定してください)","ghr.unknownLang":"不明","warn.unclosedBadge":"未閉合"};I18N_DICT["ko"]={"toc.title":"목차","toc.collapse":"접기","toc.expand":"펼치기","code.copy":"코드 복사","code.lines":"행","code.cols":"열","code.chars":"자","dl.download":"다운로드","mcq.selected":"선택됨·","mcq.single":"단일 선택","mcq.multi":"다중 선택","mcq.submit":"답안 제출","mcq.hintClick":"선택지를 클릭하세요","mcq.hintMulti":"여러 개 선택 가능","mcq.toggleView":"나도 선택하기","mcq.togglePlay":"답 보기","mcq.reset":"다시 풀기","mcq.explain":"해설","mcq.ok":"정답","mcq.partial":"불완전","mcq.wrong":"오답","mcq.authorNone":"답하지 않음","mcq.authorPick":"선택","mcq.authorOk":"정답","mcq.authorPartial":"불완전","mcq.authorWrong":"오답","fc.hint":"클릭하여 뒤집기","fcs.shuffle":"섞기","chat.card":"프로필 카드","chat.rpDefault":"축하합니다","vote.total":"{n}명 참여","ghr.loading":"불러오는 중...","audio.subsToggle":"자막 표시 전환","audio.noSubs":"자막 없음","audio.subsErr":"자막 파싱 오류","audio.unknownTitle":"알 수 없는 제목","audio.unknownSource":"알 수 없는 출처","audio.fieldTitle":"제목","audio.fieldSource":"출처","audio.fieldCover":"커버","audio.fieldAudio":"오디오","audio.copy":"복사","audio.copied":"복사됨","mermaid.loading":"Mermaid 불러오는 중","mermaid.copy":"소스 복사","mermaid.zoom":"확대","table.export":"CSV 내보내기","table.filename":"table_export.csv","heading.copyLink":"제목 링크 복사","rp.from":"{name}님의 홍바오","rp.opened":"홍바오가 모두 소진됨","rp.summary":"{n}명이 수령 완료","warn.unclosed":"[UpKram] 닫히지 않은 컨테이너 {n}개","code.wrap":"줄바꿈/스크롤 전환","mcq.selectFirst":"최소 하나를 선택하세요","rp.someone":"누군가","rp.giverName":"{name}님의 홍바오","rp.openAria":"홍바오 열기","ghr.justNow":"방금","ghr.minAgo":"{n}분 전","ghr.hourAgo":"{n}시간 전","ghr.dayAgo":"{n}일 전","ghr.monthAgo":"{n}개월 전","ghr.yearAgo":"{n}년 전","ghr.updated":"{time} 업데이트","ghr.archived":"보관됨","ghr.noDesc":"설명 없음","ghr.invalidRepo":"잘못된 저장소 형식(owner/repo 형식이어야 함)","ghr.unknownLang":"알 수 없음","warn.unclosedBadge":"닫히지 않음"};I18N_DICT["zh-CN"]["ghr.repository"]="GitHub 仓库";I18N_DICT["zh-CN"]["chat.unknownName"]="未知";I18N_DICT["zh-CN"]["ghr.noData"]="无法获取实时数据,可能不存在或被限流。";I18N_DICT["en"]["ghr.repository"]="GitHub repository";I18N_DICT["en"]["chat.unknownName"]="Unknown";I18N_DICT["en"]["ghr.noData"]="Failed to fetch live data. The repo may not exist or is rate limited.";I18N_DICT["zh-TW"]["ghr.repository"]="GitHub 儲存庫";I18N_DICT["zh-TW"]["chat.unknownName"]="未知";I18N_DICT["zh-TW"]["ghr.noData"]="無法取得即時資料,可能不存在或被限流。";I18N_DICT["ja"]["ghr.repository"]="GitHub リポジトリ";I18N_DICT["ja"]["chat.unknownName"]="不明";I18N_DICT["ja"]["ghr.noData"]="リアルタイムデータを取得できませんでした。リポジトリが存在しないか、レート制限の可能性があります。";I18N_DICT["ko"]["ghr.repository"]="GitHub 저장소";I18N_DICT["ko"]["chat.unknownName"]="알 수 없음";I18N_DICT["ko"]["ghr.noData"]="실시간 데이터를 가져올 수 없습니다. 저장소가 없거나 요청 제한일 수 있습니다.";I18N_DICT["zh-CN"]["saq.tag"]="主观题";I18N_DICT["zh-CN"]["saq.answer"]="参考答案";I18N_DICT["zh-CN"]["saq.explain"]="解析";I18N_DICT["zh-CN"]["saq.reveal"]="点击查看";I18N_DICT["en"]["saq.tag"]="Short answer";I18N_DICT["en"]["saq.answer"]="Reference answer";I18N_DICT["en"]["saq.explain"]="Explanation";I18N_DICT["en"]["saq.reveal"]="Click to reveal";I18N_DICT["zh-TW"]["saq.tag"]="簡答題";I18N_DICT["zh-TW"]["saq.answer"]="參考答案";I18N_DICT["zh-TW"]["saq.explain"]="解析";I18N_DICT["zh-TW"]["saq.reveal"]="點擊查看";I18N_DICT["ja"]["saq.tag"]="記述式";I18N_DICT["ja"]["saq.answer"]="模範解答";I18N_DICT["ja"]["saq.explain"]="解説";I18N_DICT["ja"]["saq.reveal"]="クリックで表示";I18N_DICT["ko"]["saq.tag"]="주관식";I18N_DICT["ko"]["saq.answer"]="모범답안";I18N_DICT["ko"]["saq.explain"]="해설";I18N_DICT["ko"]["saq.reveal"]="클릭하여 보기";I18N_DICT["zh-CN"]["date.justNow"]="刚刚";I18N_DICT["zh-CN"]["date.secAgo"]="{n}秒前";I18N_DICT["zh-CN"]["date.secLater"]="{n}秒后";I18N_DICT["zh-CN"]["date.minAgo"]="{n}分钟前";I18N_DICT["zh-CN"]["date.minLater"]="{n}分钟后";I18N_DICT["zh-CN"]["date.hourAgo"]="{n}小时前";I18N_DICT["zh-CN"]["date.hourLater"]="{n}小时后";I18N_DICT["zh-CN"]["date.yesterday"]="昨天";I18N_DICT["zh-CN"]["date.tomorrow"]="明天";I18N_DICT["zh-CN"]["date.yearUnit"]="年";I18N_DICT["zh-CN"]["date.monthUnit"]="个月";I18N_DICT["zh-CN"]["date.dayUnit"]="天";I18N_DICT["zh-CN"]["date.agoUnit"]="前";I18N_DICT["zh-CN"]["date.laterUnit"]="后";I18N_DICT["en"]["date.justNow"]="just now";I18N_DICT["en"]["date.secAgo"]="{n}s ago";I18N_DICT["en"]["date.secLater"]="{n}s later";I18N_DICT["en"]["date.minAgo"]="{n}m ago";I18N_DICT["en"]["date.minLater"]="{n}m later";I18N_DICT["en"]["date.hourAgo"]="{n}h ago";I18N_DICT["en"]["date.hourLater"]="{n}h later";I18N_DICT["en"]["date.yesterday"]="yesterday";I18N_DICT["en"]["date.tomorrow"]="tomorrow";I18N_DICT["en"]["date.yearUnit"]="y";I18N_DICT["en"]["date.monthUnit"]="mo";I18N_DICT["en"]["date.dayUnit"]="d";I18N_DICT["en"]["date.agoUnit"]=" ago";I18N_DICT["en"]["date.laterUnit"]=" later";I18N_DICT["zh-TW"]["date.justNow"]="剛剛";I18N_DICT["zh-TW"]["date.secAgo"]="{n}秒前";I18N_DICT["zh-TW"]["date.secLater"]="{n}秒後";I18N_DICT["zh-TW"]["date.minAgo"]="{n}分鐘前";I18N_DICT["zh-TW"]["date.minLater"]="{n}分鐘後";I18N_DICT["zh-TW"]["date.hourAgo"]="{n}小時前";I18N_DICT["zh-TW"]["date.hourLater"]="{n}小時後";I18N_DICT["zh-TW"]["date.yesterday"]="昨天";I18N_DICT["zh-TW"]["date.tomorrow"]="明天";I18N_DICT["zh-TW"]["date.yearUnit"]="年";I18N_DICT["zh-TW"]["date.monthUnit"]="個月";I18N_DICT["zh-TW"]["date.dayUnit"]="天";I18N_DICT["zh-TW"]["date.agoUnit"]="前";I18N_DICT["zh-TW"]["date.laterUnit"]="後";I18N_DICT["ja"]["date.justNow"]="たった今";I18N_DICT["ja"]["date.secAgo"]="{n}秒前";I18N_DICT["ja"]["date.secLater"]="{n}秒後";I18N_DICT["ja"]["date.minAgo"]="{n}分前";I18N_DICT["ja"]["date.minLater"]="{n}分後";I18N_DICT["ja"]["date.hourAgo"]="{n}時間前";I18N_DICT["ja"]["date.hourLater"]="{n}時間後";I18N_DICT["ja"]["date.yesterday"]="昨日";I18N_DICT["ja"]["date.tomorrow"]="明日";I18N_DICT["ja"]["date.yearUnit"]="年";I18N_DICT["ja"]["date.monthUnit"]="か月";I18N_DICT["ja"]["date.dayUnit"]="日";I18N_DICT["ja"]["date.agoUnit"]="前";I18N_DICT["ja"]["date.laterUnit"]="後";I18N_DICT["ko"]["date.justNow"]="방금";I18N_DICT["ko"]["date.secAgo"]="{n}초 전";I18N_DICT["ko"]["date.secLater"]="{n}초 후";I18N_DICT["ko"]["date.minAgo"]="{n}분 전";I18N_DICT["ko"]["date.minLater"]="{n}분 후";I18N_DICT["ko"]["date.hourAgo"]="{n}시간 전";I18N_DICT["ko"]["date.hourLater"]="{n}시간 후";I18N_DICT["ko"]["date.yesterday"]="어제";I18N_DICT["ko"]["date.tomorrow"]="내일";I18N_DICT["ko"]["date.yearUnit"]="년";I18N_DICT["ko"]["date.monthUnit"]="개월";I18N_DICT["ko"]["date.dayUnit"]="일";I18N_DICT["ko"]["date.agoUnit"]=" 전";I18N_DICT["ko"]["date.laterUnit"]=" 후";I18N_DICT["zh-CN"]["chat.quote"]="[引用 {name}]";I18N_DICT["zh-CN"]["chat.img"]="[图片]";I18N_DICT["zh-CN"]["chat.rp"]="[红包]";I18N_DICT["zh-CN"]["chat.transfer"]="[转账]";I18N_DICT["zh-CN"]["chat.cardTag"]="[名片]";I18N_DICT["en"]["chat.quote"]="[Quote {name}]";I18N_DICT["en"]["chat.img"]="[Image]";I18N_DICT["en"]["chat.rp"]="[Red packet]";I18N_DICT["en"]["chat.transfer"]="[Transfer]";I18N_DICT["en"]["chat.cardTag"]="[Card]";I18N_DICT["zh-TW"]["chat.quote"]="[引用 {name}]";I18N_DICT["zh-TW"]["chat.img"]="[圖片]";I18N_DICT["zh-TW"]["chat.rp"]="[紅包]";I18N_DICT["zh-TW"]["chat.transfer"]="[轉帳]";I18N_DICT["zh-TW"]["chat.cardTag"]="[名片]";I18N_DICT["ja"]["chat.quote"]="[引用 {name}]";I18N_DICT["ja"]["chat.img"]="[画像]";I18N_DICT["ja"]["chat.rp"]="[紅包]";I18N_DICT["ja"]["chat.transfer"]="[送金]";I18N_DICT["ja"]["chat.cardTag"]="[名刺]";I18N_DICT["ko"]["chat.quote"]="[인용 {name}]";I18N_DICT["ko"]["chat.img"]="[이미지]";I18N_DICT["ko"]["chat.rp"]="[홍바오]";I18N_DICT["ko"]["chat.transfer"]="[송금]";I18N_DICT["ko"]["chat.cardTag"]="[명함]";I18N_DICT["zh-CN"]["fig.label"]="图 {n}";I18N_DICT["zh-CN"]["tbl.label"]="表 {n}";I18N_DICT["zh-CN"]["eq.label"]="式 ({n})";I18N_DICT["zh-CN"]["fig.refMissing"]="[图 {key} 未找到]";I18N_DICT["zh-CN"]["tbl.refMissing"]="[表 {key} 未找到]";I18N_DICT["zh-CN"]["eq.refMissing"]="[式 {key} 未找到]";I18N_DICT["en"]["fig.label"]="Fig. {n}";I18N_DICT["en"]["tbl.label"]="Table {n}";I18N_DICT["en"]["eq.label"]="Eq. ({n})";I18N_DICT["en"]["fig.refMissing"]="[Fig. {key} not found]";I18N_DICT["en"]["tbl.refMissing"]="[Table {key} not found]";I18N_DICT["en"]["eq.refMissing"]="[Eq. {key} not found]";I18N_DICT["zh-TW"]["fig.label"]="圖 {n}";I18N_DICT["zh-TW"]["tbl.label"]="表 {n}";I18N_DICT["zh-TW"]["eq.label"]="式 ({n})";I18N_DICT["zh-TW"]["fig.refMissing"]="[圖 {key} 未找到]";I18N_DICT["zh-TW"]["tbl.refMissing"]="[表 {key} 未找到]";I18N_DICT["zh-TW"]["eq.refMissing"]="[式 {key} 未找到]";I18N_DICT["ja"]["fig.label"]="図 {n}";I18N_DICT["ja"]["tbl.label"]="表 {n}";I18N_DICT["ja"]["eq.label"]="式 ({n})";I18N_DICT["ja"]["fig.refMissing"]="[図 {key} が見つかりません]";I18N_DICT["ja"]["tbl.refMissing"]="[表 {key} が見つかりません]";I18N_DICT["ja"]["eq.refMissing"]="[式 {key} が見つかりません]";I18N_DICT["ko"]["fig.label"]="그림 {n}";I18N_DICT["ko"]["tbl.label"]="표 {n}";I18N_DICT["ko"]["eq.label"]="식 ({n})";I18N_DICT["ko"]["fig.refMissing"]="[그림 {key} 찾을 수 없음]";I18N_DICT["ko"]["tbl.refMissing"]="[표 {key} 찾을 수 없음]";I18N_DICT["ko"]["eq.refMissing"]="[식 {key} 찾을 수 없음]";I18N_DICT["zh-CN"]["dl.verify"]="查看签名";I18N_DICT["en"]["dl.verify"]="Verify signature";I18N_DICT["zh-TW"]["dl.verify"]="查看簽名";I18N_DICT["ja"]["dl.verify"]="署名を確認";I18N_DICT["ko"]["dl.verify"]="서명 확인";I18N_DICT["de"]={"toc.title":"Inhalt","toc.collapse":"Einklappen","toc.expand":"Ausklappen","code.copy":"Code kopieren","mcq.wrong":"Falsch","mcq.authorNone":"Keine Antwort","mcq.authorPick":"Ausgewählt","mcq.authorOk":"Richtig","mcq.authorPartial":"Unvollständig","mcq.authorWrong":"Falsch","fc.hint":"Zum Umdrehen klicken","fcs.shuffle":"Mischen","chat.card":"Kontaktkarte","chat.rpDefault":"Alles Gute","vote.total":"{n} Stimmen","ghr.loading":"Lädt...","audio.subsToggle":"Untertitel ein-/ausblenden","audio.noSubs":"Keine Untertitel","audio.subsErr":"Fehler beim Parsen der Untertitel","audio.unknownTitle":"Unbekannter Titel","audio.unknownSource":"Unbekannte Quelle","audio.fieldTitle":"Titel","audio.fieldSource":"Quelle","audio.fieldCover":"Titelbild","audio.fieldAudio":"Audio","audio.copy":"Kopieren","audio.copied":"Kopiert","mermaid.loading":"Mermaid wird geladen","mermaid.copy":"Quelltext kopieren","mermaid.zoom":"Vergrößern","table.export":"CSV exportieren","table.filename":"table_export.csv","heading.copyLink":"Link zur Überschrift kopieren","rp.from":"Geldgeschenk von {name}","rp.opened":"Alle Geschenke verteilt","rp.summary":"{n} verteilt · alle weg","warn.unclosed":"[UpKram] {n} nicht geschlossene Container erkannt","code.wrap":"Umbruch umschalten","code.lines":"Zeilen","code.cols":"Spalten","code.chars":"Zeichen","dl.download":"Herunterladen","mcq.selected":"Ausgewählt·","mcq.single":"Einfachauswahl","mcq.multi":"Mehrfachauswahl","mcq.submit":"Antwort absenden","mcq.hintClick":"Option anklicken","mcq.hintMulti":"Mehrere Antworten möglich","mcq.toggleView":"Selbst ausprobieren","mcq.togglePlay":"Antwort anzeigen","mcq.reset":"Zurücksetzen","mcq.explain":"Erklärung","mcq.ok":"Richtig","mcq.partial":"Unvollständig"};I18N_DICT["de"]["ghr.repository"]="GitHub-Repository";I18N_DICT["de"]["chat.unknownName"]="Unbekannt";I18N_DICT["de"]["ghr.noData"]="Live-Daten konnten nicht geladen werden. Das Repository existiert möglicherweise nicht oder die Rate-Limitierung greift.";I18N_DICT["de"]["saq.tag"]="Kurzantwort";I18N_DICT["de"]["saq.answer"]="Musterantwort";I18N_DICT["de"]["saq.explain"]="Erklärung";I18N_DICT["de"]["saq.reveal"]="Zum Anzeigen klicken";I18N_DICT["de"]["mcq.selectFirst"]="Bitte mindestens eine Option auswählen";I18N_DICT["de"]["rp.someone"]="Jemand";I18N_DICT["de"]["rp.giverName"]="{name}s Geldgeschenk";I18N_DICT["de"]["rp.openAria"]="Geldgeschenk öffnen";I18N_DICT["de"]["ghr.justNow"]="gerade eben";I18N_DICT["de"]["ghr.minAgo"]="vor {n} Min.";I18N_DICT["de"]["ghr.hourAgo"]="vor {n} Std.";I18N_DICT["de"]["ghr.dayAgo"]="vor {n} T.";I18N_DICT["de"]["ghr.monthAgo"]="vor {n} Mon.";I18N_DICT["de"]["ghr.yearAgo"]="vor {n} J.";I18N_DICT["de"]["ghr.updated"]="aktualisiert {time}";I18N_DICT["de"]["ghr.archived"]="Archiviert";I18N_DICT["de"]["ghr.noDesc"]="Keine Beschreibung";I18N_DICT["de"]["ghr.invalidRepo"]="Ungültiges Repository-Format (owner/repo erwartet)";I18N_DICT["de"]["date.justNow"]="gerade eben";I18N_DICT["de"]["date.secAgo"]="vor {n} Sek.";I18N_DICT["de"]["date.secLater"]="in {n} Sek.";I18N_DICT["de"]["date.minAgo"]="vor {n} Min.";I18N_DICT["de"]["date.minLater"]="in {n} Min.";I18N_DICT["de"]["date.hourAgo"]="vor {n} Std.";I18N_DICT["de"]["date.hourLater"]="in {n} Std.";I18N_DICT["de"]["date.yesterday"]="gestern";I18N_DICT["de"]["date.tomorrow"]="morgen";I18N_DICT["de"]["date.yearUnit"]="J.";I18N_DICT["de"]["date.monthUnit"]="Mon.";I18N_DICT["de"]["date.dayUnit"]="T.";I18N_DICT["de"]["date.agoUnit"]=" zuvor";I18N_DICT["de"]["date.laterUnit"]=" später";I18N_DICT["de"]["chat.quote"]="[Zitat {name}]";I18N_DICT["de"]["chat.img"]="[Bild]";I18N_DICT["de"]["chat.rp"]="[Geldgeschenk]";I18N_DICT["de"]["chat.transfer"]="[Überweisung]";I18N_DICT["de"]["chat.cardTag"]="[Karte]";I18N_DICT["de"]["ghr.unknownLang"]="Unbekannt";I18N_DICT["de"]["warn.unclosedBadge"]="Nicht geschlossen";I18N_DICT["de"]["fig.label"]="Abb. {n}";I18N_DICT["de"]["tbl.label"]="Tabelle {n}";I18N_DICT["de"]["eq.label"]="Gl. ({n})";I18N_DICT["de"]["fig.refMissing"]="[Abb. {key} nicht gefunden]";I18N_DICT["de"]["tbl.refMissing"]="[Tabelle {key} nicht gefunden]";I18N_DICT["de"]["eq.refMissing"]="[Gl. {key} nicht gefunden]";I18N_DICT["de"]["dl.verify"]="Signatur prüfen";I18N_DICT["fr"]={"toc.title":"Sommaire","toc.collapse":"Réduire","toc.expand":"Développer","code.copy":"Copier le code","mcq.wrong":"Incorrect","mcq.authorNone":"Aucune réponse","mcq.authorPick":"Sélectionné","mcq.authorOk":"Correct","mcq.authorPartial":"Incomplet","mcq.authorWrong":"Incorrect","fc.hint":"Cliquez pour retourner","fcs.shuffle":"Mélanger","chat.card":"Carte de contact","chat.rpDefault":"Meilleures salutations","vote.total":"{n} votes","ghr.loading":"Chargement...","audio.subsToggle":"Afficher/masquer les sous-titres","audio.noSubs":"Aucun sous-titre","audio.subsErr":"Erreur de sous-titres","audio.unknownTitle":"Titre inconnu","audio.unknownSource":"Source inconnue","audio.fieldTitle":"Titre","audio.fieldSource":"Source","audio.fieldCover":"Couverture","audio.fieldAudio":"Audio","audio.copy":"Copier","audio.copied":"Copié","mermaid.loading":"Chargement de Mermaid","mermaid.copy":"Copier le code source","mermaid.zoom":"Zoom","table.export":"Exporter en CSV","table.filename":"table_export.csv","heading.copyLink":"Copier le lien vers le titre","rp.from":"Cadeau de {name}","rp.opened":"Tous les cadeaux distribués","rp.summary":"{n} distribués · plus rien","warn.unclosed":"[UpKram] {n} conteneurs non fermés détectés","code.wrap":"Basculer le retour à la ligne","code.lines":"lignes","code.cols":"colonnes","code.chars":"caractères","dl.download":"Télécharger","mcq.selected":"Sélectionné·","mcq.single":"Choix unique","mcq.multi":"Choix multiple","mcq.submit":"Envoyer","mcq.hintClick":"Cliquez sur une option","mcq.hintMulti":"Plusieurs réponses possibles","mcq.toggleView":"Essayer","mcq.togglePlay":"Voir la réponse","mcq.reset":"Réinitialiser","mcq.explain":"Explication","mcq.ok":"Correct","mcq.partial":"Incomplet"};I18N_DICT["fr"]["ghr.repository"]="Dépôt GitHub";I18N_DICT["fr"]["chat.unknownName"]="Inconnu";I18N_DICT["fr"]["ghr.noData"]="Impossible de récupérer les données en direct. Le dépôt n’existe peut-être pas ou la limite de requêtes est atteinte.";I18N_DICT["fr"]["saq.tag"]="Réponse courte";I18N_DICT["fr"]["saq.answer"]="Réponse de référence";I18N_DICT["fr"]["saq.explain"]="Explication";I18N_DICT["fr"]["saq.reveal"]="Cliquez pour afficher";I18N_DICT["fr"]["mcq.selectFirst"]="Veuillez sélectionner au moins une option";I18N_DICT["fr"]["rp.someone"]="Quelqu’un";I18N_DICT["fr"]["rp.giverName"]="Cadeau de {name}";I18N_DICT["fr"]["rp.openAria"]="Ouvrir le cadeau";I18N_DICT["fr"]["ghr.justNow"]="à l’instant";I18N_DICT["fr"]["ghr.minAgo"]="il y a {n} min";I18N_DICT["fr"]["ghr.hourAgo"]="il y a {n} h";I18N_DICT["fr"]["ghr.dayAgo"]="il y a {n} j";I18N_DICT["fr"]["ghr.monthAgo"]="il y a {n} mois";I18N_DICT["fr"]["ghr.yearAgo"]="il y a {n} an";I18N_DICT["fr"]["ghr.updated"]="mis à jour {time}";I18N_DICT["fr"]["ghr.archived"]="Archivé";I18N_DICT["fr"]["ghr.noDesc"]="Aucune description";I18N_DICT["fr"]["ghr.invalidRepo"]="Format de dépôt invalide (owner/repo attendu)";I18N_DICT["fr"]["date.justNow"]="à l’instant";I18N_DICT["fr"]["date.secAgo"]="il y a {n} s";I18N_DICT["fr"]["date.secLater"]="dans {n} s";I18N_DICT["fr"]["date.minAgo"]="il y a {n} min";I18N_DICT["fr"]["date.minLater"]="dans {n} min";I18N_DICT["fr"]["date.hourAgo"]="il y a {n} h";I18N_DICT["fr"]["date.hourLater"]="dans {n} h";I18N_DICT["fr"]["date.yesterday"]="hier";I18N_DICT["fr"]["date.tomorrow"]="demain";I18N_DICT["fr"]["date.yearUnit"]="a";I18N_DICT["fr"]["date.monthUnit"]="mois";I18N_DICT["fr"]["date.dayUnit"]="j";I18N_DICT["fr"]["date.agoUnit"]=" auparavant";I18N_DICT["fr"]["date.laterUnit"]=" plus tard";I18N_DICT["fr"]["chat.quote"]="[Citation {name}]";I18N_DICT["fr"]["chat.img"]="[Image]";I18N_DICT["fr"]["chat.rp"]="[Cadeau]";I18N_DICT["fr"]["chat.transfer"]="[Transfert]";I18N_DICT["fr"]["chat.cardTag"]="[Carte]";I18N_DICT["fr"]["ghr.unknownLang"]="Inconnu";I18N_DICT["fr"]["warn.unclosedBadge"]="Non fermé";I18N_DICT["fr"]["fig.label"]="Fig. {n}";I18N_DICT["fr"]["tbl.label"]="Tableau {n}";I18N_DICT["fr"]["eq.label"]="Éq. ({n})";I18N_DICT["fr"]["fig.refMissing"]="[Fig. {key} introuvable]";I18N_DICT["fr"]["tbl.refMissing"]="[Tableau {key} introuvable]";I18N_DICT["fr"]["eq.refMissing"]="[Éq. {key} introuvable]";I18N_DICT["fr"]["dl.verify"]="Vérifier la signature";I18N_DICT["es"]={"toc.title":"Contenidos","toc.collapse":"Contraer","toc.expand":"Expandir","code.copy":"Copiar código","mcq.wrong":"Incorrecto","mcq.authorNone":"Sin respuesta","mcq.authorPick":"Seleccionado","mcq.authorOk":"Correcto","mcq.authorPartial":"Incompleto","mcq.authorWrong":"Incorrecto","fc.hint":"Haz clic para girar","fcs.shuffle":"Mezclar","chat.card":"Tarjeta de contacto","chat.rpDefault":"Saludos","vote.total":"{n} votos","ghr.loading":"Cargando...","audio.subsToggle":"Mostrar/ocultar subtítulos","audio.noSubs":"Sin subtítulos","audio.subsErr":"Error de subtítulos","audio.unknownTitle":"Título desconocido","audio.unknownSource":"Fuente desconocida","audio.fieldTitle":"Título","audio.fieldSource":"Fuente","audio.fieldCover":"Portada","audio.fieldAudio":"Audio","audio.copy":"Copiar","audio.copied":"Copiado","mermaid.loading":"Cargando Mermaid","mermaid.copy":"Copiar código fuente","mermaid.zoom":"Zoom","table.export":"Exportar CSV","table.filename":"table_export.csv","heading.copyLink":"Copiar enlace al encabezado","rp.from":"Regalo de {name}","rp.opened":"Todos los regalos repartidos","rp.summary":"{n} repartidos · ya no quedan","warn.unclosed":"[UpKram] {n} contenedores sin cerrar detectados","code.wrap":"Alternar ajuste de línea","code.lines":"líneas","code.cols":"columnas","code.chars":"caracteres","dl.download":"Descargar","mcq.selected":"Seleccionado·","mcq.single":"Opción única","mcq.multi":"Múltiple","mcq.submit":"Enviar","mcq.hintClick":"Haz clic en una opción","mcq.hintMulti":"Se permiten varias respuestas","mcq.toggleView":"Probarlo","mcq.togglePlay":"Ver respuesta","mcq.reset":"Reiniciar","mcq.explain":"Explicación","mcq.ok":"Correcto","mcq.partial":"Incompleto"};I18N_DICT["es"]["ghr.repository"]="Repositorio de GitHub";I18N_DICT["es"]["chat.unknownName"]="Desconocido";I18N_DICT["es"]["ghr.noData"]="No se pudieron obtener datos en vivo. Es posible que el repositorio no exista o que se haya alcanzado el límite de solicitudes.";I18N_DICT["es"]["saq.tag"]="Respuesta corta";I18N_DICT["es"]["saq.answer"]="Respuesta de referencia";I18N_DICT["es"]["saq.explain"]="Explicación";I18N_DICT["es"]["saq.reveal"]="Haz clic para mostrar";I18N_DICT["es"]["mcq.selectFirst"]="Selecciona al menos una opción";I18N_DICT["es"]["rp.someone"]="Alguien";I18N_DICT["es"]["rp.giverName"]="Regalo de {name}";I18N_DICT["es"]["rp.openAria"]="Abrir regalo";I18N_DICT["es"]["ghr.justNow"]="ahora mismo";I18N_DICT["es"]["ghr.minAgo"]="hace {n} min";I18N_DICT["es"]["ghr.hourAgo"]="hace {n} h";I18N_DICT["es"]["ghr.dayAgo"]="hace {n} d";I18N_DICT["es"]["ghr.monthAgo"]="hace {n} mes";I18N_DICT["es"]["ghr.yearAgo"]="hace {n} a";I18N_DICT["es"]["ghr.updated"]="actualizado {time}";I18N_DICT["es"]["ghr.archived"]="Archivado";I18N_DICT["es"]["ghr.noDesc"]="Sin descripción";I18N_DICT["es"]["ghr.invalidRepo"]="Formato de repositorio no válido (se espera owner/repo)";I18N_DICT["es"]["date.justNow"]="ahora mismo";I18N_DICT["es"]["date.secAgo"]="hace {n} s";I18N_DICT["es"]["date.secLater"]="en {n} s";I18N_DICT["es"]["date.minAgo"]="hace {n} min";I18N_DICT["es"]["date.minLater"]="en {n} min";I18N_DICT["es"]["date.hourAgo"]="hace {n} h";I18N_DICT["es"]["date.hourLater"]="en {n} h";I18N_DICT["es"]["date.yesterday"]="ayer";I18N_DICT["es"]["date.tomorrow"]="mañana";I18N_DICT["es"]["date.yearUnit"]="a";I18N_DICT["es"]["date.monthUnit"]="mes";I18N_DICT["es"]["date.dayUnit"]="d";I18N_DICT["es"]["date.agoUnit"]=" antes";I18N_DICT["es"]["date.laterUnit"]=" después";I18N_DICT["es"]["chat.quote"]="[Cita {name}]";I18N_DICT["es"]["chat.img"]="[Imagen]";I18N_DICT["es"]["chat.rp"]="[Regalo]";I18N_DICT["es"]["chat.transfer"]="[Transferencia]";I18N_DICT["es"]["chat.cardTag"]="[Tarjeta]";I18N_DICT["es"]["ghr.unknownLang"]="Desconocido";I18N_DICT["es"]["warn.unclosedBadge"]="Sin cerrar";I18N_DICT["es"]["fig.label"]="Fig. {n}";I18N_DICT["es"]["tbl.label"]="Tabla {n}";I18N_DICT["es"]["eq.label"]="Ec. ({n})";I18N_DICT["es"]["fig.refMissing"]="[Fig. {key} no encontrada]";I18N_DICT["es"]["tbl.refMissing"]="[Tabla {key} no encontrada]";I18N_DICT["es"]["eq.refMissing"]="[Ec. {key} no encontrada]";I18N_DICT["es"]["dl.verify"]="Verificar firma";I18N_DICT["pt-BR"]={"toc.title":"Índice","toc.collapse":"Recolher","toc.expand":"Expandir","code.copy":"Copiar código","mcq.wrong":"Incorreto","mcq.authorNone":"Sem resposta","mcq.authorPick":"Selecionado","mcq.authorOk":"Correto","mcq.authorPartial":"Incompleto","mcq.authorWrong":"Incorreto","fc.hint":"Clique para virar","fcs.shuffle":"Embaralhar","chat.card":"Cartão de contato","chat.rpDefault":"Boas festas","vote.total":"{n} votos","ghr.loading":"Carregando...","audio.subsToggle":"Mostrar/ocultar legendas","audio.noSubs":"Sem legendas","audio.subsErr":"Erro nas legendas","audio.unknownTitle":"Título desconhecido","audio.unknownSource":"Fonte desconhecida","audio.fieldTitle":"Título","audio.fieldSource":"Fonte","audio.fieldCover":"Capa","audio.fieldAudio":"Áudio","audio.copy":"Copiar","audio.copied":"Copiado","mermaid.loading":"Carregando Mermaid","mermaid.copy":"Copiar código-fonte","mermaid.zoom":"Zoom","table.export":"Exportar CSV","table.filename":"table_export.csv","heading.copyLink":"Copiar link do título","rp.from":"Presente de {name}","rp.opened":"Todos os presentes distribuídos","rp.summary":"{n} distribuídos · esgotados","warn.unclosed":"[UpKram] {n} contêineres não fechados detectados","code.wrap":"Alternar quebra de linha","code.lines":"linhas","code.cols":"colunas","code.chars":"caracteres","dl.download":"Baixar","mcq.selected":"Selecionado·","mcq.single":"Escolha única","mcq.multi":"Múltipla","mcq.submit":"Enviar","mcq.hintClick":"Clique em uma opção","mcq.hintMulti":"Várias respostas permitidas","mcq.toggleView":"Testar","mcq.togglePlay":"Ver resposta","mcq.reset":"Reiniciar","mcq.explain":"Explicação","mcq.ok":"Correto","mcq.partial":"Incompleto"};I18N_DICT["pt-BR"]["ghr.repository"]="Repositório do GitHub";I18N_DICT["pt-BR"]["chat.unknownName"]="Desconhecido";I18N_DICT["pt-BR"]["ghr.noData"]="Não foi possível carregar dados ao vivo. O repositório pode não existir ou o limite de requisições foi atingido.";I18N_DICT["pt-BR"]["saq.tag"]="Resposta curta";I18N_DICT["pt-BR"]["saq.answer"]="Resposta de referência";I18N_DICT["pt-BR"]["saq.explain"]="Explicação";I18N_DICT["pt-BR"]["saq.reveal"]="Clique para revelar";I18N_DICT["pt-BR"]["mcq.selectFirst"]="Selecione pelo menos uma opção";I18N_DICT["pt-BR"]["rp.someone"]="Alguém";I18N_DICT["pt-BR"]["rp.giverName"]="Presente de {name}";I18N_DICT["pt-BR"]["rp.openAria"]="Abrir presente";I18N_DICT["pt-BR"]["ghr.justNow"]="agora mesmo";I18N_DICT["pt-BR"]["ghr.minAgo"]="há {n} min";I18N_DICT["pt-BR"]["ghr.hourAgo"]="há {n} h";I18N_DICT["pt-BR"]["ghr.dayAgo"]="há {n} d";I18N_DICT["pt-BR"]["ghr.monthAgo"]="há {n} meses";I18N_DICT["pt-BR"]["ghr.yearAgo"]="há {n} anos";I18N_DICT["pt-BR"]["ghr.updated"]="atualizado {time}";I18N_DICT["pt-BR"]["ghr.archived"]="Arquivado";I18N_DICT["pt-BR"]["ghr.noDesc"]="Sem descrição";I18N_DICT["pt-BR"]["ghr.invalidRepo"]="Formato de repositório inválido (esperado owner/repo)";I18N_DICT["pt-BR"]["date.justNow"]="agora mesmo";I18N_DICT["pt-BR"]["date.secAgo"]="há {n} s";I18N_DICT["pt-BR"]["date.secLater"]="em {n} s";I18N_DICT["pt-BR"]["date.minAgo"]="há {n} min";I18N_DICT["pt-BR"]["date.minLater"]="em {n} min";I18N_DICT["pt-BR"]["date.hourAgo"]="há {n} h";I18N_DICT["pt-BR"]["date.hourLater"]="em {n} h";I18N_DICT["pt-BR"]["date.yesterday"]="ontem";I18N_DICT["pt-BR"]["date.tomorrow"]="amanhã";I18N_DICT["pt-BR"]["date.yearUnit"]="a";I18N_DICT["pt-BR"]["date.monthUnit"]="meses";I18N_DICT["pt-BR"]["date.dayUnit"]="d";I18N_DICT["pt-BR"]["date.agoUnit"]=" atrás";I18N_DICT["pt-BR"]["date.laterUnit"]=" à frente";I18N_DICT["pt-BR"]["chat.quote"]="[Citação {name}]";I18N_DICT["pt-BR"]["chat.img"]="[Imagem]";I18N_DICT["pt-BR"]["chat.rp"]="[Presente]";I18N_DICT["pt-BR"]["chat.transfer"]="[Transferência]";I18N_DICT["pt-BR"]["chat.cardTag"]="[Cartão]";I18N_DICT["pt-BR"]["ghr.unknownLang"]="Desconhecido";I18N_DICT["pt-BR"]["warn.unclosedBadge"]="Não fechado";I18N_DICT["pt-BR"]["fig.label"]="Fig. {n}";I18N_DICT["pt-BR"]["tbl.label"]="Tabela {n}";I18N_DICT["pt-BR"]["eq.label"]="Eq. ({n})";I18N_DICT["pt-BR"]["fig.refMissing"]="[Fig. {key} não encontrada]";I18N_DICT["pt-BR"]["tbl.refMissing"]="[Tabela {key} não encontrada]";I18N_DICT["pt-BR"]["eq.refMissing"]="[Eq. {key} não encontrada]";I18N_DICT["pt-BR"]["dl.verify"]="Verificar assinatura";I18N_DICT["ru"]={"toc.title":"Содержание","toc.collapse":"Свернуть","toc.expand":"Развернуть","code.copy":"Копировать код","mcq.wrong":"Неверно","mcq.authorNone":"Нет ответа","mcq.authorPick":"Выбрано","mcq.authorOk":"Верно","mcq.authorPartial":"Неполный ответ","mcq.authorWrong":"Неверно","fc.hint":"Нажмите, чтобы перевернуть","fcs.shuffle":"Перемешать","chat.card":"Контактная карточка","chat.rpDefault":"Всего хорошего","vote.total":{one:"{n} голос",few:"{n} голоса",many:"{n} голосов",other:"{n} голосов"},"ghr.loading":"Загрузка...","audio.subsToggle":"Показать/скрыть субтитры","audio.noSubs":"Без субтитров","audio.subsErr":"Ошибка субтитров","audio.unknownTitle":"Неизвестный заголовок","audio.unknownSource":"Неизвестный источник","audio.fieldTitle":"Заголовок","audio.fieldSource":"Источник","audio.fieldCover":"Обложка","audio.fieldAudio":"Аудио","audio.copy":"Копировать","audio.copied":"Скопировано","mermaid.loading":"Загрузка Mermaid","mermaid.copy":"Копировать исходный код","mermaid.zoom":"Масштаб","table.export":"Экспорт CSV","table.filename":"table_export.csv","heading.copyLink":"Копировать ссылку на заголовок","rp.from":"Подарок от {name}","rp.opened":"Все подарки розданы","rp.summary":"{n} получено · все разобраны","warn.unclosed":{one:"[UpKram] обнаружен {n} незакрытый контейнер",few:"[UpKram] обнаружено {n} незакрытых контейнера",many:"[UpKram] обнаружено {n} незакрытых контейнеров",other:"[UpKram] обнаружено {n} незакрытых контейнеров"},"code.wrap":"Переключить перенос строк","code.lines":"строк","code.cols":"столбцов","code.chars":"символов","dl.download":"Скачать","mcq.selected":"Выбрано·","mcq.single":"Один выбор","mcq.multi":"Несколько","mcq.submit":"Отправить","mcq.hintClick":"Нажмите на вариант","mcq.hintMulti":"Разрешено несколько ответов","mcq.toggleView":"Попробовать","mcq.togglePlay":"Показать ответ","mcq.reset":"Сбросить","mcq.explain":"Объяснение","mcq.ok":"Верно","mcq.partial":"Неполный ответ"};I18N_DICT["ru"]["ghr.repository"]="Репозиторий GitHub";I18N_DICT["ru"]["chat.unknownName"]="Неизвестно";I18N_DICT["ru"]["ghr.noData"]="Не удалось загрузить данные в реальном времени. Репозиторий может не существовать или достигнут лимит запросов.";I18N_DICT["ru"]["saq.tag"]="Краткий ответ";I18N_DICT["ru"]["saq.answer"]="Эталонный ответ";I18N_DICT["ru"]["saq.explain"]="Объяснение";I18N_DICT["ru"]["saq.reveal"]="Нажмите, чтобы показать";I18N_DICT["ru"]["mcq.selectFirst"]="Выберите хотя бы один вариант";I18N_DICT["ru"]["rp.someone"]="Кто-то";I18N_DICT["ru"]["rp.giverName"]="Подарок от {name}";I18N_DICT["ru"]["rp.openAria"]="Открыть подарок";I18N_DICT["ru"]["ghr.justNow"]="только что";I18N_DICT["ru"]["ghr.minAgo"]={one:"{n} минуту назад",few:"{n} минуты назад",many:"{n} минут назад",other:"{n} минут назад"};I18N_DICT["ru"]["ghr.hourAgo"]={one:"{n} час назад",few:"{n} часа назад",many:"{n} часов назад",other:"{n} часов назад"};I18N_DICT["ru"]["ghr.dayAgo"]={one:"{n} день назад",few:"{n} дня назад",many:"{n} дней назад",other:"{n} дней назад"};I18N_DICT["ru"]["ghr.monthAgo"]={one:"{n} месяц назад",few:"{n} месяца назад",many:"{n} месяцев назад",other:"{n} месяцев назад"};I18N_DICT["ru"]["ghr.yearAgo"]={one:"{n} год назад",few:"{n} года назад",many:"{n} лет назад",other:"{n} лет назад"};I18N_DICT["ru"]["ghr.updated"]="обновлено {time}";I18N_DICT["ru"]["ghr.archived"]="Архивирован";I18N_DICT["ru"]["ghr.noDesc"]="Без описания";I18N_DICT["ru"]["ghr.invalidRepo"]="Неверный формат репозитория (ожидается owner/repo)";I18N_DICT["ru"]["date.justNow"]="только что";I18N_DICT["ru"]["date.secAgo"]={one:"{n} секунду назад",few:"{n} секунды назад",many:"{n} секунд назад",other:"{n} секунд назад"};I18N_DICT["ru"]["date.secLater"]={one:"через {n} секунду",few:"через {n} секунды",many:"через {n} секунд",other:"через {n} секунд"};I18N_DICT["ru"]["date.minAgo"]={one:"{n} минуту назад",few:"{n} минуты назад",many:"{n} минут назад",other:"{n} минут назад"};I18N_DICT["ru"]["date.minLater"]={one:"через {n} минуту",few:"через {n} минуты",many:"через {n} минут",other:"через {n} минут"};I18N_DICT["ru"]["date.hourAgo"]={one:"{n} час назад",few:"{n} часа назад",many:"{n} часов назад",other:"{n} часов назад"};I18N_DICT["ru"]["date.hourLater"]={one:"через {n} час",few:"через {n} часа",many:"через {n} часов",other:"через {n} часов"};I18N_DICT["ru"]["date.yesterday"]="вчера";I18N_DICT["ru"]["date.tomorrow"]="завтра";I18N_DICT["ru"]["date.yearUnit"]="г";I18N_DICT["ru"]["date.monthUnit"]="мес";I18N_DICT["ru"]["date.dayUnit"]="д";I18N_DICT["ru"]["date.agoUnit"]=" назад";I18N_DICT["ru"]["date.laterUnit"]=" через";I18N_DICT["ru"]["chat.quote"]="[Цитата {name}]";I18N_DICT["ru"]["chat.img"]="[Изображение]";I18N_DICT["ru"]["chat.rp"]="[Подарок]";I18N_DICT["ru"]["chat.transfer"]="[Перевод]";I18N_DICT["ru"]["chat.cardTag"]="[Карточка]";I18N_DICT["ru"]["ghr.unknownLang"]="Неизвестно";I18N_DICT["ru"]["warn.unclosedBadge"]="Незакрыто";I18N_DICT["ru"]["fig.label"]="Рис. {n}";I18N_DICT["ru"]["tbl.label"]="Таблица {n}";I18N_DICT["ru"]["eq.label"]="Ур. ({n})";I18N_DICT["ru"]["fig.refMissing"]="[Рис. {key} не найден]";I18N_DICT["ru"]["tbl.refMissing"]="[Таблица {key} не найдена]";I18N_DICT["ru"]["eq.refMissing"]="[Ур. {key} не найден]";I18N_DICT["ru"]["dl.verify"]="Проверить подпись";function __i18nT(ctx,key,params){return __cmI18nPick(ctx&&ctx.i18n?ctx.i18n:I18N_DICT["zh-CN"],key,params,ctx&&ctx.langKey)}function __normLang(s){s=String(s||"").trim();if(!s)return"";var lower=s.toLowerCase();for(var key in I18N_DICT){if(key.toLowerCase()===lower)return key}return""}function __resolveI18n(lang,i18nObj){var i18n=I18N_DICT["zh-CN"];var langKey=__normLang(lang);if(!langKey&&typeof i18nObj==="string")langKey=__normLang(i18nObj);if(langKey&&I18N_DICT[langKey])i18n=I18N_DICT[langKey];if(i18nObj&&typeof i18nObj==="object"){var __m=Object.assign({},i18n);for(var __lk in i18nObj)__m[__lk]=i18nObj[__lk];i18n=__m}return i18n}var SPEC_BASE={html:true,smartypants:false,breaks:false,zoom:false,emoji:false,decorations:false,anchor:false,links:false,toc:false,chat:false,scr:false,abbr:false,blanklines:false,autocollage:false,headingline:false,dropcap:false,lazycontinuation:true,tableexport:false,wikilink:false,containers:false,directives:false,tablewidget:false,taskwidget:false,headingid:false,linkattrs:false,imgwidget:false,codewidget:false,math:false,footnote:false,mark:false,subsup:false,hrtext:false,callout:false,deflist:false};var SPEC_PRESETS={commonmark:Object.assign({},SPEC_BASE,{gfm:false,autolink:false,strike:false,tasklist:false}),"gfm-core":Object.assign({},SPEC_BASE,{autolink:false,gfmsingletilde:true}),gfm:Object.assign({},SPEC_BASE,{autolink:true,gfmsingletilde:true,disallowedhtml:true})};function __cmHash(s){var h=2166136261;for(var i=0;i<s.length;i++){h^=s.charCodeAt(i);h=Math.imul(h,16777619)}return(h>>>0).toString(36)}function __cmPluralForm(lang,n){var l=String(lang||"").toLowerCase();n=Math.abs(Number(n)||0);if(l==="ru"||l==="ru-ru"){var m10=n%10,m100=n%100;if(m10===1&&m100!==11)return"one";if(m10>=2&&m10<=4&&(m100<12||m100>14))return"few";return"many"}return n===1?"one":"other"}function __cmI18nPick(dict,key,params,lang){var v=dict&&dict[key];if(v===undefined)v=I18N_DICT["zh-CN"]&&I18N_DICT["zh-CN"][key];if(v===undefined)return key;if(v&&typeof v==="object"&&params&&params.n!==undefined){var f=__cmPluralForm(lang,params.n);v=v[f]!==undefined?v[f]:v.other!==undefined?v.other:v.many!==undefined?v.many:v.few!==undefined?v.few:v.one}var out=String(v);if(params){for(var pk in params)out=out.split("{"+pk+"}").join(String(params[pk]))}return out}function __cmSafeImgSrc(src){var v=__cmDecodeEntities(String(src==null?"":src)).trim();v=v.replace(/[\u0000-\u001F\u007F]/g,"");if(!v)return v;if(/^data:text\//i.test(v))return"";if(/^data:image\/(?:png|jpe?g|gif|webp|avif|bmp);/i.test(v))return v;if(/^[a-z][a-z0-9+.-]*:/i.test(v)&&!/^(?:https?|ftps?):/i.test(v))return"";return v}function __cmRestoreSaves(nodes,saves){for(var i=0;i<nodes.length;i++){var n=nodes[i];if(n&&n.type==="text"&&typeof n.value==="string")n.value=n.value.replace(/\uE000([\uE100-\uE11F])/g,function(m,c){var k=c.charCodeAt(0)-57600;if(k<0||k>=ESCAPABLE_CHARS.length)return m;var ch=ESCAPABLE_CHARS.charAt(k);return ch==="&"?"":ch});if(n&&n.children)__cmRestoreSaves(n.children,saves)}}function __cmEmRescue(nodes,full){var has=false;for(var q=0;q<nodes.length;q++){var nd=nodes[q];if(nd&&nd.type==="text"&&/[*_]/.test(nd.value||"")){has=true;break}}if(!has)return nodes;var items=[],cursor=0;for(var q=0;q<nodes.length;q++){var nd=nodes[q];if(!nd||nd.type!=="text"){items.push({v:nd});continue}var v=nd.value||"",base=typeof nd._pos==="number"&&full?nd._pos:full?full.indexOf(v,cursor):cursor;var exact=base>=0;if(base<0)base=cursor;else cursor=base+v.length;var i=0;while(i<v.length){var c=v.charAt(i);if(c==="*"||c==="_"){var j=i+1;while(j<v.length&&v.charAt(j)===c)j++;var len=j-i;var b=exact&&base+i>0?full.charAt(base+i-1):i>0?v.charAt(i-1):"\n";var a=exact&&base+j<full.length?full.charAt(base+j):j<v.length?v.charAt(j):"\n";var lf=!__cmWs(a)&&(!__cmPunct(a)||__cmWs(b)||__cmPunct(b)),rf=!__cmWs(b)&&(!__cmPunct(b)||__cmWs(a)||__cmPunct(a));var co=c==="_"?lf&&(!rf||__cmPunct(b)):lf,cc=c==="_"?rf&&(!lf||__cmPunct(a)):rf;var ent=full&&/&(?:#\d+|#x[0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]{1,31});/.test(full.slice(Math.max(0,base-16),base+1))&&(exact&&base+i>0&&full.charAt(base+i-1)==="&");items.push({d:1,ch:c,len:len,orig:len,co:co,cc:cc,active:true,ent:ent});i=j;continue}var j2=i+1;while(j2<v.length&&v.charAt(j2)!=="*"&&v.charAt(j2)!=="_")j2++;items.push({v:{type:"text",value:v.slice(i,j2)}});i=j2}}if(!items.length)return nodes;for(var k=0;k<items.length;k++){items[k].p=k>0?items[k-1]:null;items[k].n=k+1<items.length?items[k+1]:null}var stack=[],head=items[0],cur=head,guard=0;while(cur&&guard++<2e5){var nx=cur.n;if(cur.d&&cur.active&&!cur.ent&&cur.co)stack.push(cur);if(cur.d&&cur.active&&!cur.ent&&cur.cc){var op=null,si=-1;for(var s=stack.length-1;s>=0;s--){var o=stack[s];if(o===cur||!o.active||!o.co||o.ch!==cur.ch)continue;if((cur.co||o.cc)&&cur.orig%3!==0&&(o.orig+cur.orig)%3===0)continue;op=o;si=s;break}if(op){var inner=[],x=op.n;while(x&&x!==cur){inner.push(x.d?{type:"text",value:new Array(x.len+1).join(x.ch)}:x.v);x=x.n}var it="";for(var z=0;z<inner.length;z++)it+=inner[z]&&inner[z].type==="text"?inner[z].value:"X";if(!it.trim()){cur.active=false}else{var use=op.len<2||cur.len<2?1:2;op.len-=use;cur.len-=use;stack.length=si;var wrap={type:use===2?"strong":"emphasis",children:inner};var frag=[];if(op.len>0)frag.push(op);frag.push({v:wrap});if(cur.len>0)frag.push(cur);var before=op.p,after=cur.n;for(var f=0;f<frag.length;f++){frag[f].p=f>0?frag[f-1]:before;frag[f].n=f+1<frag.length?frag[f+1]:after}if(before)before.n=frag[0];else head=frag[0];if(after)after.p=frag[frag.length-1];nx=op.len>0?op:cur.len>0?cur:after}}}cur=nx}var res=[],h=head;while(h){res.push(h.d?{type:"text",value:new Array(h.len+1).join(h.ch)}:h.v);h=h.n}return res}function __cmWs(c){return c===undefined||c===""||/\s/.test(c)}var __cmPunctUni=null;try{__cmPunctUni=new RegExp("[\\p{P}]","u")}catch(e){}function __cmPunct(c){if(!c)return false;var __cp=c.charCodeAt(0);if(__cp>=57344&&__cp<=57375||__cp>=57600&&__cp<=57631)return true;if(__cp<128)return/[!-\/:-@\[-`{-~]/.test(c);if(__cmPunctUni)return __cmPunctUni.test(c);return/[!-\/:-@\[-`{-~\u00a1\u00a7\u00ab\u00b6\u00b7\u00bb\u00bf\u2000-\u206f\u2e00-\u2e7f]/.test(c)}function __cmFlags(input,pos,len,ch){var b=pos>0?input.charAt(pos-1):"\n",a=pos+len<input.length?input.charAt(pos+len):"\n";var lf=!__cmWs(a)&&(!__cmPunct(a)||__cmWs(b)||__cmPunct(b));var rf=!__cmWs(b)&&(!__cmPunct(b)||__cmWs(a)||__cmPunct(a));return{co:ch==="_"?lf&&(!rf||__cmPunct(b)):lf,cc:ch==="_"?rf&&(!lf||__cmPunct(a)):rf}}function __cmEmOk(m,ch,openLen,closeLen){var input=m.input||"",p=m.index||0;if(p>0&&input.charAt(p-1)===ch)return false;var cp=p+m[0].length-closeLen;if(cp+closeLen<input.length&&input.charAt(cp+closeLen)===ch)return false;if(!__cmFlags(input,p,openLen,ch).co)return false;return __cmFlags(input,cp,closeLen,ch).cc}function __cmHasHardBreak(s){return typeof s==="string"&&/(?: {2,}|\\)$/.test(s)}function __cmOpenHtmlAtEnd(s){var i=0,len=s.length;while(i<len){var lt=s.indexOf("<",i);if(lt<0)break;if(lt+1>=len)return true;var c=s.charAt(lt+1);if(s.substr(lt,4)==="\x3c!--"){var e=s.indexOf("--\x3e",lt+4);if(e<0)return true;i=e+3;continue}if(c==="!"||c==="?"||/[a-zA-Z\/]/.test(c)){var j=lt+1,q="";while(j<len){var ch=s.charAt(j);if(q){if(ch===q)q=""}else if(ch==='"'||ch==="'"){q=ch}else if(ch===">")break;j++}if(j>=len)return true;i=j+1;continue}i=lt+1}return __cmOpenLinkAtEnd(s)}function __cmOpenLinkAtEnd(s){var i=s.lastIndexOf("](");if(i<0)return false;var depth=0,q="";for(var j=i+2;j<s.length;j++){var c=s[j];if(q){if(c===q)q="";continue}if(c==='"'||c==="'"){q=c;continue}if(c==="("){depth++;continue}if(c===")"){if(depth===0)return false;depth--}}return true}function __cmValidCrossLineLink(s){if(s.indexOf("\n")<0)return false;if(!/\]\([^)]*\n/.test(s))return false;return!!s.match(/\]\([ \t]*(?:<[^>]*>|[^"')]+)(?:[ \t\n]+["'][^"']*["'])?[ \t]*\)/)||!!s.match(/\]\([ \t]*[^)]*\)/)}function __cmValidCrossLineHtml(s){if(s.indexOf("\n")<0)return false;var re=/<!--(?!>|->)(?:(?!--)[\s\S])*?(?<!-)-->|<\/?[a-zA-Z][a-zA-Z0-9-]*(?:\s+[a-zA-Z_:][a-zA-Z0-9_.:-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*\s*\/?>/g,m;while(m=re.exec(s)){if(m[0].indexOf("\n")>=0)return true}return __cmValidCrossLineLink(s)}function __cmMergeParaLines(lines){var out=[],joined=[],i=0;while(i<lines.length){var buf=lines[i],j=i+1,mode="";var runMatch=buf.match(/(`+)/);var run=runMatch?runMatch[1].length:0;var closeRe=run?new RegExp("(^|[^`])`{"+run+",}(?!`)"):null;if(run&&closeRe&&!closeRe.test(buf.slice(run)))mode="code";else if(__cmOpenHtmlAtEnd(buf))mode="html";if(mode==="code"){while(j<lines.length){buf+="\n"+lines[j];var hit=closeRe.test(lines[j]);j++;if(hit)break}out.push(buf);for(var k=i;k<j;k++)joined.push(k>i);i=j}else if(mode==="html"){var hb=buf,he=j;while(he<lines.length&&__cmOpenHtmlAtEnd(hb)){hb+="\n"+lines[he];he++}if(__cmValidCrossLineHtml(hb)){buf=hb;j=he;out.push(buf);for(var k2=i;k2<j;k2++)joined.push(k2>i);i=j}else{out.push(buf);joined.push(false);i++}}else{out.push(buf);joined.push(false);i++}}return{lines:out,joined:joined}}function createContext(userConfig){var config=Object.assign({},DEFAULT_CONFIG);if(userConfig&&userConfig.preset&&SPEC_PRESETS[userConfig.preset])Object.assign(config,SPEC_PRESETS[userConfig.preset]);var locked=[];if(userConfig){if(userConfig.locked)locked=userConfig.locked.map(function(x){return String(x).toLowerCase()});for(var k in userConfig){if(k!=="locked"&&k!=="env")config[k.toLowerCase()]=userConfig[k]}}var i18n=__resolveI18n(userConfig&&userConfig.lang,userConfig&&userConfig.i18n);var env=userConfig&&userConfig.env&&typeof userConfig.env==="object"?userConfig.env:{};return{stamp:__cmHash("upkram"),config:config,locked:locked,hostConfig:userConfig,i18n:i18n,langKey:__normLang(userConfig&&userConfig.lang)||"zh-CN",isSSR:true,env:env,vars:Object.create(null),macros:Object.create(null),meta:null,__warnings:[],codeIndex:0,chatIndex:0,footnoteMap:Object.create(null),footnoteCount:0,footnoteDefs:Object.create(null),globalUsers:Object.create(null),refLinks:Object.create(null),__refDefSpan:Object.create(null),abbrs:Object.create(null),hasAbbr:false,headings:[],usedSlugs:Object.create(null),headnumCounter:[0,0,0,0,0]}}function footnoteIndex(ctx,key){if(!ctx.footnoteMap[key]){ctx.footnoteCount++;ctx.footnoteMap[key]=ctx.footnoteCount}return ctx.footnoteMap[key]}function __cmRefJoinLabel(lines,ctx){var out=lines.slice();for(var i=0;i<out.length;i++){var m=out[i].match(/^ {0,3}\[((?:\\.|[^\]\\])*)$/);if(!m)continue;var j=i+1,buf=out[i],found=false;while(j<out.length&&out[j].trim()!==""){buf+=" "+out[j].trim();if(/\]:[ \t]*/.test(out[j])){found=true;j++;break}j++}if(!found)continue;if(!buf.slice(1,buf.indexOf("]")).trim())continue;out[i]=buf;for(var k=i+1;k<j;k++)out[k]="";if(!ctx.__refJoinSpan)ctx.__refJoinSpan=Object.create(null);ctx.__refJoinSpan[i]=j-1;i=j-1}return out}function __cmRefJoin(lines,ctx){var out=lines.slice();for(var i=0;i<out.length;i++){var m=out[i].match(/^ {0,3}\[((?:\\.|[^\]\[\\])+)\]:[ \t]*(?:<([^>]*)>|(\S+))[ \t]+(["'])(.*)$/);if(!m)continue;var q=m[4];if(m[5].indexOf(q)>=0)continue;var buf=m[5],j=i+1;while(j<out.length){if(out[j].trim()==="")break;buf+="\n"+out[j];if(out[j].indexOf(q)>=0){j++;break}j++}var pre=out[i].slice(0,out[i].length-m[5].length);out[i]=pre+buf;for(var k=i+1;k<j;k++)out[k]="";if(!ctx.__refJoinSpan)ctx.__refJoinSpan=Object.create(null);ctx.__refJoinSpan[i]=j-1;i=j-1}return out}function __cmRefTokens(s){var t=[],r=s;for(;;){var m=r.match(/^ {0,3}(>(?:[ \t]?)|[-*+]\s|\d{1,9}[.)]\s)/);if(!m)break;t.push(m[1].replace(/[ \t]/g,""));r=r.slice(m[0].length)}return t}function __cmRefTokPrefix(pp,cp){if(cp.length>pp.length)return false;for(var k=0;k<cp.length;k++)if(pp[k]!==cp[k])return false;return true}function __cmRefParaContinue(lines,i,__d){__d=__d||0;if(__d>40)return false;var cur=lines[i];if(/^ {0,3}(?:[-*+]|\d{1,9}[.)])[ \t]/.test(cur))return false;var cp=__cmRefTokens(cur);var __sawPara=false;for(var j=i-1;j>=0;j--){var pv=lines[j];if(pv.trim()==="")return false;var pp=__cmRefTokens(pv);var body=pv.slice(pv.match(/^ {0,3}(?:(?:>[ \t]?)|(?:[-*+]|\d{1,9}[.)])[ \t]+)*/)[0].length);if(!body.trim())return false;var __bt=body.replace(/^[ \t]+/,"");if(/^\[(?:\\.|[^\[\]\\])+\]:/.test(__bt)){if(pp.length>0){if(pp.length>cp.length)return false;if(__sawPara&&cp.length>=pp.length&&__cmRefTokPrefix(cp,pp))return true;return __cmRefParaContinue(lines,j,__d+1)}continue}if(/^ {4,}|\t/.test(body))return false;if(/^(?:#{1,6}\s|`{3,}|~{3,}|(?:-{3,}|_{3,}|\*{3,})[ \t]*$)/.test(body))return false;if(pp.length===0){__sawPara=true;continue}if(cp.length===0)return true;if(__cmRefTokPrefix(pp,cp))return true;if(__cmRefTokPrefix(cp,pp)){for(var __h=0;__h<j;__h++){var __ht=__cmRefTokens(lines[__h]);if(__ht.length>=cp.length&&__cmRefTokPrefix(__ht,cp))return true}return false}return false}return false}function preScanRefLinks(source,ctx){const __srcLines=source.split("\n");const lines=__cmRefJoinLabel(__cmRefJoin(source.split("\n"),ctx),ctx);let fenceChar="",fenceLen=0,contDepth=0;let __paraOpen=false;for(let i=0;i<lines.length;i++){const l=lines[i];if(fenceChar){const fc=l.match(/^ {0,3}(`{3,}|~{3,})[ \t]*$/);if(fc&&fc[1].charAt(0)===fenceChar&&fc[1].length>=fenceLen){fenceChar="";fenceLen=0}continue}const fo=l.match(/^ {0,3}(`{3,}|~{3,})([\w.+#-]*)(?:[ \t]+(.+?))?[ \t]*$/);if(fo){fenceChar=fo[1].charAt(0);fenceLen=fo[1].length;continue}if(/^:::[a-z]/.test(l)){contDepth++;continue}if(/^:::\/[a-z]/.test(l)){if(contDepth>0)contDepth--;continue}if(/^:::[ \t]*$/.test(l)){if(contDepth>0)contDepth--;continue}if(l.trim()==="")__paraOpen=false;if(/^ {0,3}(?:>|[-*+]|\d{1,9}[.)])/.test(l))__paraOpen=false;if(contDepth>0)continue;const __refLine=l.replace(/^(?: {0,3}(?:>[ \t]?|(?:[-*+]|\d{1,9}[.)])[ \t]+)+)/,"");let m=__refLine.match(/^ {0,3}\[((?:\\.|[^\]\[\\])+)\]:[ \t]*(?:<([^>]*)>|(\S+))?(?:[ \t]+(?:"((?:\\.|[^"\\])*)"|'((?:\\.|[^'\\])*)'|\(([^)]*)\)))?[ \t]*$/);if(m){if(__paraOpen||__cmRefParaContinue(lines,i))continue;if(m[1].length>999)continue;if(m[1].charAt(0)==="^")continue;let __urlRaw=m[2]!==undefined?m[2]:m[3];if(__urlRaw&&__urlRaw.charAt(0)==="<"&&m[2]===undefined)continue;let __titleRaw=m[4]||m[5]||m[6]||"";let __extra=0;if(__urlRaw===undefined){const __nl=lines[i+1];if(__nl===undefined||!/^\s*\S/.test(__nl))continue;if(/^ {0,3}(?:>|[-*+]|\d{1,9}[.)])/.test(__nl))continue;const __nm=__nl.match(/^\s*(?:<([^>]*)>|(\S+))(?:[ \t]+(?:"((?:\\.|[^"\\])*)"|'((?:\\.|[^'\\])*)'|\(([^)]*)\)))?[ \t]*$/);if(!__nm)continue;__urlRaw=__nm[1]!==undefined?__nm[1]:__nm[2];if(__urlRaw.charAt(0)==="<"&&__nm[1]===undefined)continue;__titleRaw=__nm[3]||__nm[4]||__nm[5]||"";__extra=1;if(!__titleRaw){const __tl=lines[i+2];if(__tl!==undefined&&/^\s*(?:"[^"]*"|'[^']*'|\([^)]*\))[ \t]*$/.test(__tl)){const __tm=__tl.match(/^\s*(?:"((?:\\.|[^"\\])*)"|'((?:\\.|[^'\\])*)'|\(([^)]*)\))[ \t]*$/);if(__tm){__titleRaw=__tm[1]||__tm[2]||__tm[3]||"";__extra=2}}}}if(!__titleRaw){const __t2=lines[i+1+__extra];if(__t2!==undefined&&/^\s*(?:"[^"]*"|'[^']*'|\([^)]*\))[ \t]*$/.test(__t2)){const __t2m=__t2.match(/^\s*(?:"((?:\\.|[^"\\])*)"|'((?:\\.|[^'\\])*)'|\(([^)]*)\))[ \t]*$/);if(__t2m){__titleRaw=__t2m[1]||__t2m[2]||__t2m[3]||"";__extra++}}}if(!/[^ \t\r\n]/.test(m[1].replace(/\\./g,"x")))continue;const label=normalizeRefLabel(m[1].replace(/\\([\[\]\\])/g,"$1"));if(!ctx.refLinks[label]){const __refUrl=String(__urlRaw).replace(/ /g,"%20").replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_\x60{|}~])/g,"$1");ctx.refLinks[label]={url:__refUrl,title:String(__titleRaw).replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_\x60{|}~])/g,"$1")};if(ctx.__refJoinSpan&&ctx.__refJoinSpan[i]!==undefined)__extra=ctx.__refJoinSpan[i];ctx.__refDefSpan[label]={start:i,end:i+__extra,text:__srcLines[i],endText:__srcLines[i+__extra]}}i+=__extra;continue}if(l.trim()!==""&&!/^(?: {0,3}(?:#{1,6}\s|>|`{3,}|~{3,}|[-*+]\s|\d+[.)]\s|(-{3,}|_{3,}|\*{3,})[ \t]*$)| {4,}|\t)/.test(l))__paraOpen=true;let ma=l.match(/^ {0,3}\*\[([^\]]+)\]:[ \t]*(.+?)[ \t]*$/);if(ma){ctx.abbrs[normalizeRefLabel(ma[1])]=ma[2];ctx.hasAbbr=true}}}var LANG_DATA={js:{icon:"fab fa-js",name:"JavaScript",color:"#f7df1e",tree:1,meta:1},mjs:{icon:"fab fa-js",color:"#f7df1e",tree:1},ts:{icon:"fab fa-js",color:"#3178c6",tree:1},jsx:{icon:"fab fa-react",name:"JSX",color:"#61dafb",tree:1,meta:1},tsx:{icon:"fab fa-react",color:"#61dafb",tree:1},vue:{icon:"fab fa-vuejs",name:"Vue",color:"#42b883",tree:1,meta:1,ghrColor:"#41b883"},html:{icon:"fab fa-html5",name:"HTML",color:"#e34c26",tree:1,meta:1,ghrColor:"#e34c26"},htm:{icon:"fab fa-html5",color:"#e34c26",tree:1},css:{icon:"fab fa-css3-alt",name:"CSS",color:"#264de4",tree:1,meta:1,ghrColor:"#563d7c"},scss:{icon:"fab fa-sass",color:"#cd6799",tree:1},sass:{icon:"fab fa-sass",name:"Sass",color:"#cd6799",tree:1,meta:1},less:{icon:"fab fa-less",name:"Less",color:"#1d365d",tree:1,meta:1},py:{icon:"fab fa-python",name:"Python",color:"#3776ab",tree:1,meta:1},java:{icon:"fab fa-java",name:"Java",color:"#f89820",tree:1,meta:1,ghrColor:"#b07219"},go:{icon:"fab fa-golang",name:"Go",color:"#00acd7",tree:1,meta:1,ghrColor:"#00ADD8"},golang:{icon:"fab fa-golang",name:"Go",color:"#00acd7",tree:1,meta:1},rs:{icon:"fab fa-rust",name:"Rust",color:"#dea584",tree:1,meta:1},rust:{icon:"fab fa-rust",name:"Rust",color:"#dea584",tree:1,meta:1,ghrColor:"#dea584"},php:{icon:"fab fa-php",name:"PHP",color:"#777bb4",tree:1,meta:1,ghrColor:"#4F5D95"},rb:{icon:"fas fa-gem",name:"Ruby",color:"#cc342d",tree:1,meta:1},ruby:{icon:"fas fa-gem",name:"Ruby",color:"#cc342d",tree:1,meta:1,ghrColor:"#701516"},swift:{icon:"fab fa-swift",name:"Swift",color:"#fa7343",tree:1,meta:1,ghrColor:"#F05138"},sh:{icon:"fas fa-terminal",color:"#89e051",tree:1},bash:{icon:"fas fa-terminal",color:"#89e051",tree:1},json:{icon:"fas fa-code",color:"#f7df1e",tree:1},yml:{icon:"fas fa-gear",color:"#cb171e",tree:1},yaml:{icon:"fas fa-gear",color:"#cb171e",tree:1},toml:{icon:"fas fa-gear",color:"#9c4221",tree:1},md:{icon:"fab fa-markdown",name:"Markdown",color:"#888888",tree:1,meta:1},markdown:{icon:"fab fa-markdown",name:"Markdown",color:"#888888",tree:1,meta:1},txt:{icon:"fas fa-file-lines",color:"#888888",tree:1},png:{icon:"fas fa-image",color:"#10b981",tree:1},jpg:{icon:"fas fa-image",color:"#10b981",tree:1},jpeg:{icon:"fas fa-image",color:"#10b981",tree:1},gif:{icon:"fas fa-image",color:"#10b981",tree:1},svg:{icon:"fas fa-bezier-curve",color:"#f59e0b",tree:1},webp:{icon:"fas fa-image",color:"#10b981",tree:1},ico:{icon:"fas fa-image",color:"#10b981",tree:1},zip:{icon:"fas fa-file-zipper",color:"#f59e0b",tree:1},rar:{icon:"fas fa-file-zipper",color:"#f59e0b",tree:1},"7z":{icon:"fas fa-file-zipper",color:"#f59e0b",tree:1},pdf:{icon:"fas fa-file-pdf",color:"#e74c6f",tree:1},doc:{icon:"fas fa-file-word",color:"#2b579a",tree:1},docx:{icon:"fas fa-file-word",color:"#2b579a",tree:1},xls:{icon:"fas fa-file-excel",color:"#217346",tree:1},xlsx:{icon:"fas fa-file-excel",color:"#217346",tree:1},ppt:{icon:"fas fa-file-powerpoint",color:"#d24726",tree:1},pptx:{icon:"fas fa-file-powerpoint",color:"#d24726",tree:1},exe:{icon:"fas fa-microchip",color:"#8a8ab5",tree:1},dll:{icon:"fas fa-microchip",color:"#8a8ab5",tree:1},lock:{icon:"fas fa-lock",color:"#8a8ab5",tree:1},env:{icon:"fas fa-key",color:"#f59e0b",tree:1},db:{icon:"fas fa-database",color:"#8b5cf6",tree:1},sql:{icon:"fas fa-database",color:"#8b5cf6",tree:1},sqlite:{icon:"fas fa-database",color:"#8b5cf6",tree:1},log:{icon:"fas fa-file-lines",color:"#8a8ab5",tree:1},wasm:{icon:"fas fa-microchip",color:"#8b5cf6",tree:1},map:{icon:"fas fa-map",color:"#10b981",tree:1},csv:{icon:"fas fa-file-csv",color:"#10b981",tree:1},xml:{icon:"fas fa-code",color:"#f1662a",tree:1},mp3:{icon:"fas fa-music",color:"#8b5cf6",tree:1},wav:{icon:"fas fa-music",color:"#8b5cf6",tree:1},flac:{icon:"fas fa-music",color:"#8b5cf6",tree:1},mp4:{icon:"fas fa-video",color:"#8b5cf6",tree:1},avi:{icon:"fas fa-video",color:"#8b5cf6",tree:1},mov:{icon:"fas fa-video",color:"#8b5cf6",tree:1},mkv:{icon:"fas fa-video",color:"#8b5cf6",tree:1},javascript:{icon:"fab fa-js",name:"JavaScript",meta:1,ghrColor:"#f1e05a"},node:{icon:"fab fa-node-js",name:"Node.js",meta:1},nodejs:{icon:"fab fa-node-js",name:"Node.js",meta:1},"node.js":{icon:"fab fa-node-js",name:"Node.js",meta:1},python:{icon:"fab fa-python",name:"Python",meta:1,ghrColor:"#3572A5"},html5:{icon:"fab fa-html5",name:"HTML",meta:1},css3:{icon:"fab fa-css3-alt",name:"CSS",meta:1},vuejs:{icon:"fab fa-vuejs",name:"Vue",meta:1},react:{icon:"fab fa-react",name:"React",meta:1},angular:{icon:"fab fa-angular",name:"Angular",meta:1},docker:{icon:"fab fa-docker",name:"Docker",meta:1},git:{icon:"fab fa-git-alt",name:"Git",meta:1},npm:{icon:"fab fa-npm",name:"NPM",meta:1},JavaScript:{ghrAlias:"javascript"},typescript:{ghrColor:"#3178c6"},TypeScript:{ghrAlias:"typescript"},HTML:{ghrAlias:"html"},CSS:{ghrAlias:"css"},Python:{ghrAlias:"python"},Java:{ghrAlias:"java"},Go:{ghrAlias:"go"},Rust:{ghrAlias:"rust"},c:{ghrColor:"#555555"},C:{ghrAlias:"c"},"c++":{ghrColor:"#f34b7d"},"C++":{ghrAlias:"c++"},shell:{ghrColor:"#89e051"},Shell:{ghrAlias:"shell"},PHP:{ghrAlias:"php"},Ruby:{ghrAlias:"ruby"},Swift:{ghrAlias:"swift"},kotlin:{ghrColor:"#A97BFF"},Kotlin:{ghrAlias:"kotlin"},dart:{ghrColor:"#00B4AB"},Dart:{ghrAlias:"dart"},Vue:{ghrAlias:"vue"}};function __langMeta(k){var d=LANG_DATA[k];return d&&d.meta?d:null}function __treeIcon(k){var d=LANG_DATA[k];return d&&d.tree?[d.icon,d.color]:null}function __ghrColor(k){var d=LANG_DATA[k];if(d&&d.ghrAlias)d=LANG_DATA[d.ghrAlias];return d&&d.ghrColor||"#8a8ab5"}function getTreeFileIcon(name){const idx=name.lastIndexOf(".");const ext=idx>0?name.slice(idx+1).toLowerCase():"";const icon=__treeIcon(ext);return icon?'<i class="'+icon[0]+'" style="color:'+icon[1]+'"></i>':'<i class="fas fa-file" style="color:#8a8ab5"></i>'}function sortTree(node){node.children.sort((a,b)=>{const aIsFolder=a.children.length>0;const bIsFolder=b.children.length>0;if(aIsFolder!==bIsFolder)return aIsFolder?1:-1;return a.name.localeCompare(b.name)});for(const child of node.children)sortTree(child)}function parseTree(raw){const root={name:"",path:"",children:[]};const map=new Map([["",root]]);for(const line of raw.split("\n")){const trimmed=line.trim();if(!trimmed||trimmed.startsWith("//"))continue;const parts=trimmed.split("|").map(s=>s.trim());const path=parts[0];const size=parts[1]||"";const date=parts[2]||"";const url=parts[3]||"";if(!path)continue;const segs=path.split("/").filter(Boolean);let currentPath="";let parent=root;for(let i=0;i<segs.length;i++){const seg=segs[i];const isLast=i===segs.length-1;currentPath=currentPath?currentPath+"/"+seg:seg;let node=map.get(currentPath);if(!node){node={name:seg,path:currentPath,children:[],size:"",date:"",url:""};parent.children.push(node);map.set(currentPath,node)}if(isLast){node.size=size;node.date=date;node.url=url}parent=node}}sortTree(root);return root}function renderTreeNode(node){if(node.children.length===0){let nameHtml=escapeHtml(node.name);var __treeHref=__cmSafeHrefAttr(node.url);if(__treeHref){nameHtml='<a href="'+escapeHtml(__treeHref)+'" target="_blank" rel="noopener" class="tree-link">'+escapeHtml(node.name)+"</a>"}let metaHtml="";if(node.date)metaHtml+='<span class="meta-date">'+escapeHtml(node.date)+"</span>";if(node.size)metaHtml+='<span class="meta-size">'+escapeHtml(node.size)+"</span>";return'<li class="tree-file"><div class="tree-row"><span class="tree-left"><i class="tree-spacer"></i>'+getTreeFileIcon(node.name)+'<span class="tree-name">'+nameHtml+'</span></span><span class="tree-meta">'+metaHtml+"</span></div></li>"}const childrenHtml=node.children.map(c=>renderTreeNode(c)).join("");return'<li class="tree-folder"><div class="tree-row"><span class="tree-left"><i class="fas fa-chevron-down tree-arrow"></i><i class="fas fa-folder"></i><span class="tree-name">'+escapeHtml(node.name)+'</span></span></div><ul class="tree-children">'+childrenHtml+"</ul></li>"}function renderTree(root){return'<div class="tree-wrapper"><div class="md-tree"><ul>'+root.children.map(c=>renderTreeNode(c)).join("")+"</ul></div></div>"}function parseUserTable(lines,out){for(let li=0;li<lines.length;li++){const t=lines[li].trim();if(!t)continue;const idx=t.indexOf(":");if(idx<0){if(!out[t])out[t]={name:t,avatar:"",color:""};continue}const name=t.slice(0,idx).trim();const rest=t.slice(idx+1).trim();if(!name)continue;let avatar="",color="";const ps=rest.split(/\s+/);for(const p of ps){if(!p)continue;const cm=p.match(/^color=(.+)$/);if(cm){color=cm[1];continue}const am=p.match(/^avatar=(.+)$/);if(am){avatar=am[1];continue}if(!avatar&&/^(https?:|\/\/|\/\/|\/|\.\/)/.test(p))avatar=p}out[name]={name:name,avatar:avatar,color:color}}}function lookupUser(name,localUsers,globalUsers){return localUsers&&localUsers[name]||globalUsers&&globalUsers[name]||{name:name,avatar:"",color:""}}function parseKV(str){const result=Object.create(null);const re=/(\w+)=(?:"([^"]*)"|(\S+))/g;let m;while((m=re.exec(str))!==null){result[m[1]]=m[2]!==undefined?m[2]:m[3]}const rest=str.replace(/(\w+)=(?:"[^"]*"|\S+)/g," ");const flags=rest.split(/\s+/).filter(Boolean);for(const fl of flags){if(/^\w+$/.test(fl))result[fl]=true}return result}function parseMsgArgs(rest){const tokens=[];const re=/"((?:\\.|[^"\\])*)"|'((?:\\.|[^'\\])*)'|(\S+)/g;let m;while((m=re.exec(rest))!==null){if(m[1]!==undefined)tokens.push({v:m[1].replace(/\\(.)/g,"$1"),q:true});else if(m[2]!==undefined)tokens.push({v:m[2].replace(/\\(.)/g,"$1"),q:true});else tokens.push({v:m[3],q:false})}const name=tokens.length?tokens.shift().v:"";const opts={side:"left",time:"",id:"",status:""};for(const tk of tokens){const t=tk.v;if(!tk.q&&(t==="left"||t==="right"))opts.side=t;else if(/^\d{1,2}:\d{2}(?::\d{2})?$/.test(t))opts.time=t;else if(/^\d{4}[-/]\d{1,2}[-/]\d{1,2}(?:[T ]\d{1,2}:\d{2}(?::\d{2})?)?$/.test(t))opts.time=t;else if(!tk.q&&(m=t.match(/^id=(\S+)$/)))opts.id=m[1];else if(tk.q)opts.status=opts.status?opts.status+" "+t:t}return{name:name,opts:opts}}function parseMsgBody(text,ctx,localUsers,globalUsers){const lines=text.split("\n");const parts=[];let buf=[];let i=0;function flush(){const j=buf.join("\n");if(j.replace(/\s/g,"")!=="")parts.push({type:"text",text:j});buf=[]}while(i<lines.length){const line=lines[i];let m=line.match(/^:::quote\s+(.+)$/);if(m){flush();const qTokens=m[1].trim().split(/\s+/);const qName=qTokens[0]||"";let refId="";for(let qi=1;qi<qTokens.length;qi++){const qm=qTokens[qi].match(/^id=(\S+)$/);if(qm)refId=qm[1]}const qRes=scanContainer(lines,i+1,"quote",false);parts.push({type:"chatQuote",name:qName,refId:refId,user:lookupUser(qName,localUsers,globalUsers),targetId:"",parts:parseMsgBody(qRes.body,ctx,localUsers,globalUsers)});i=qRes.next;continue}if(/^:::\s*$/.test(line)){flush();i++;continue}m=line.match(/^:::img\s+(.+)$/);if(m){flush();parts.push({type:"image",kv:parseKV(m[1])});i++;continue}m=line.match(/^:::redpacket(?:\s+(.+))?$/);if(m){flush();parts.push({type:"redpacket",kv:parseKV(m[1]||"")});i++;continue}m=line.match(/^:::transfer(?:\s+(.+))?$/);if(m){flush();parts.push({type:"transfer",kv:parseKV(m[1]||"")});i++;continue}m=line.match(/^:::card(?:\s+(.+))?$/);if(m){flush();parts.push({type:"card",kv:parseKV(m[1]||"")});i++;continue}buf.push(line);i++}flush();return parts}function parseChat(raw,ctx,chatTitle){const lines=raw.split("\n");const localUsers=Object.create(null);const messages=[];let i=0;const chatId="chat-"+ctx.stamp+"-"+ctx.chatIndex++;let msgIndex=0;while(i<lines.length){const line=lines[i];if(line.trim()===""){i++;continue}if(/^:::users\s*$/.test(line)){const ub=[];let uj=i+1,ud=1;while(uj<lines.length){if(/^:::users\s*$/.test(lines[uj]))ud++;else if(/^:::\s*$/.test(lines[uj])){ud--;if(ud===0)break}ub.push(lines[uj]);uj++}parseUserTable(ub,localUsers);i=uj+1;continue}let m=line.match(/^:::msg\s+(.+)$/);if(m){const parsed=parseMsgArgs(m[1]);const mbRes=scanContainer(lines,i+1,"msg",false);const msgId=chatId+"-msg-"+msgIndex++;messages.push({type:"chatMsg",id:msgId,userId:parsed.opts.id,name:parsed.name,user:lookupUser(parsed.name,localUsers,ctx.globalUsers),side:parsed.opts.side,time:parsed.opts.time,status:parsed.opts.status,parts:parseMsgBody(mbRes.body,ctx,localUsers,ctx.globalUsers)});i=mbRes.next;continue}m=line.match(/^:::sys(?:\s+(.+))?$/);if(m){const tokens=(m[1]||"").trim().split(/\s+/).filter(Boolean);let sysType="default",iconOverride="",colorOverride="";const inlineText=[];for(const tk of tokens){const im=tk.match(/^icon=(.+)$/),cm=tk.match(/^color=(.+)$/);if(im){iconOverride=im[1];continue}if(cm){colorOverride=cm[1];continue}if(sysType==="default"&&tk!=="default"&&SYS_TYPES[tk]){sysType=tk;continue}inlineText.push(tk)}const sb=[];let sj=i+1,sd=1;while(sj<lines.length){if(/^:::sys\b/.test(lines[sj]))sd++;else if(/^:::\s*$/.test(lines[sj])){sd--;if(sd===0)break}sb.push(lines[sj]);sj++}let bodyText=inlineText.join(" ");if(sb.length)bodyText=bodyText?bodyText+"\n"+sb.join("\n"):sb.join("\n");const noIcon=!iconOverride&&sysType==="default";messages.push({type:"chatSys",sysType:sysType,iconOverride:iconOverride,colorOverride:colorOverride,noIcon:noIcon,text:bodyText});i=sj+1;continue}i++}const idMap=Object.create(null);for(const msg of messages){if(msg.type==="chatMsg"&&msg.userId)idMap[msg.userId]=msg.id}function resolveTargets(parts,lastMsgByUser){for(const p of parts){if(p.type==="chatQuote"){if(p.refId&&idMap[p.refId])p.targetId=idMap[p.refId];else p.targetId=lastMsgByUser[p.name]||"";resolveTargets(p.parts,lastMsgByUser)}}}const lastMsgByUser=Object.create(null);for(const msg of messages){if(msg.type==="chatMsg"){resolveTargets(msg.parts,lastMsgByUser);lastMsgByUser[msg.name]=msg.id}}function summarizeParts(parts,ctx){let s="";for(const sp of parts){if(sp.type==="text")s+=(s?" ":"")+sp.text.replace(/\n+/g," ").trim();else if(sp.type==="chatQuote")s+=(s?" ":"")+__i18nT(ctx,"chat.quote",{name:sp.name});else if(sp.type==="image")s+=(s?" ":"")+__i18nT(ctx,"chat.img");else if(sp.type==="redpacket")s+=(s?" ":"")+__i18nT(ctx,"chat.rp");else if(sp.type==="transfer")s+=(s?" ":"")+__i18nT(ctx,"chat.transfer");else if(sp.type==="card")s+=(s?" ":"")+__i18nT(ctx,"chat.cardTag")}return s.slice(0,80)}const refPreviewMap=Object.create(null);for(const m4 of messages){if(m4.type==="chatMsg"&&m4.userId){refPreviewMap[m4.userId]=summarizeParts(m4.parts,ctx)}}function fillAutoPreview(parts){for(const p of parts){if(p.type==="chatQuote"){if(p.refId&&refPreviewMap[p.refId]){p.autoPreview=refPreviewMap[p.refId]}fillAutoPreview(p.parts)}}}for(const m5 of messages){if(m5.type==="chatMsg")fillAutoPreview(m5.parts)}return{type:"chat",messages:messages,users:localUsers,title:chatTitle||""}}const INLINE_RULES=[{re:/\[!\[([^\]]*)\]\(([^)]*?)(?:\s+"([^"]*)")?\)\]\(([^)]*?)(?:\s+"([^"]*)")?\)/y,build:(m,ctx)=>({type:"link",href:m[4],autolink:false,title:m[5]||"",children:[{type:"image",alt:m[1],src:m[2],title:m[3]||"",width:"",height:""}]})},{re:/<([a-zA-Z][a-zA-Z0-9+.-]{1,31}:[^\s<>]*)>/y,build:m=>({type:"link",href:m[1],autolink:true,title:"",children:[{type:"text",value:m[1]}]})},{re:/<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/y,build:m=>({type:"link",href:"mailto:"+m[1],autolink:true,title:"",children:[{type:"text",value:m[1]}]})},{re:/(?:<[a-zA-Z][a-zA-Z0-9-]*(?:\s+[a-zA-Z_:][a-zA-Z0-9_.:-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>`]+))?)*\s*\/?>|<\/[a-zA-Z][a-zA-Z0-9-]*\s*>)/y,build:(m,ctx)=>{var __dt=m[0].match(/^<\/?([a-zA-Z][a-zA-Z0-9-]*)/);if(ctx&&ctx.config&&ctx.config.disallowedhtml&&__dt&&/^(?:title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)$/i.test(__dt[1]))return null;return{type:"html",value:m[0]}}},{re:/!\[((?:\\.|[^\]\\])*)\]\[((?:\\.|[^\]\\])*)\]/y,build:(m,ctx)=>{const t1=m[1].replace(/\\(.)/g,"$1");const t2=m[2].replace(/\\(.)/g,"$1");const label=normalizeRefLabel(t2===""?t1:t2);const def=ctx.refLinks[label];if(!def)return null;return{type:"image",alt:extractTextFromNodes(parseInline(t1,ctx,true)),src:def.url,title:def.title||"",width:"",height:""}}},{re:/!\[((?:\\.|[^\]\\])*)\]\(([^)]*?)(?:\s+"([^"]*)")?(?:\s+=\s*([^x\s)]*)(?:x([^\s)]+))?)?(?:\s+(flip(?:-[xy]{1,2}|-both)?))?\)/y,build:(m,ctx)=>{let __flip="";if(m[6]){const __f=m[6].toLowerCase();if(__f==="flip-y")__flip="y";else if(__f==="flip-xy"||__f==="flip-yx"||__f==="flip-both")__flip="xy";else __flip="x"}return{type:"image",alt:extractTextFromNodes(parseInline(m[1].replace(/\\(.)/g,"$1"),ctx,true)),src:m[2],title:m[3]||"",width:m[4]||"",height:m[5]||"",flip:__flip}}},{re:/!video\[((?:\\.|[^\]\\])*)\]\(([^)]*?)(?:\s+"([^"]*)")?(?:\s+=\s*([^x\s)]+)(?:x([^\s)]+))?)?\)/y,build:(m,ctx)=>({type:"video",alt:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx),src:m[2],title:m[3]||"",width:m[4]||"",height:m[5]||""})},{re:/!audio\[((?:\\.|[^\]\\])*)\]\(([^)]*)\)/y,build:m=>{const __sp=m[2].replace(/\s+"[^"]*"/g,"");const __as=[];let __ac="";for(let __i=0;__i<__sp.length;__i++){const __ch=__sp.charAt(__i);if(__ch==="="){const __l=__i>0?__sp.charAt(__i-1):"";const __r=__i+1<__sp.length?__sp.charAt(__i+1):"";if(!__l||!__r||/\s/.test(__l)||/\s/.test(__r)){__as.push(__ac);__ac="";continue}}__ac+=__ch}__as.push(__ac);const parts=__as.length===1&&/\S=\S/.test(__sp)&&!/[?&]/.test(__sp)?__sp.split("="):__as;return{type:"audio",title:m[1].replace(/\\(.)/g,"$1"),src:(parts[0]||"").trim(),cover:(parts[1]||"").trim(),subtitle:(parts[2]||"").trim()}}},{re:/(`+)(?!`)([\s\S]*?)(?<!`)\1(?!`)/y,build:m=>{if(m.index>0&&m.input.charAt(m.index-1)==="`")return null;var v=m[2].replace(/\n/g," ");if(v.length>2&&v.charAt(0)===" "&&v.charAt(v.length-1)===" "){v=v.slice(1,-1)}return{type:"code",value:v}}},{re:/:([a-zA-Z0-9_+\-]+):/y,build:m=>{const ec=getEmojiConv();if(!ec)return null;const probe=ec.replace_colons(m[0]);if(probe===m[0])return null;return{type:"emoji",value:probe}}},{re:/\$((?:\\.|[^\$\n])+?)\$/y,build:m=>({type:"mathInline",value:m[1].trim()})},{re:/\*\*\*(?!\s)(.*?)(?<!\s)\*\*\*|\*\*(?!\s)(.*?)(?<!\s)\*\*/y,build:(m,ctx)=>{var __k=m[1]!==undefined?3:2;if(!__cmEmOk(m,"*",__k,__k))return{type:"text",value:m[0]};if(m[1]!==undefined)return{type:"emphasis",children:[{type:"strong",children:parseInline(m[1],ctx)}]};if(m[2].trim()==="")return null;return{type:"strong",children:parseInline(m[2],ctx)}}},{re:/(?<!\w)__(?!\s)((?:[^_]|_[^_]+?_)+?)(?<!\s)__(?!\w)/y,build:(m,ctx)=>{if(!__cmEmOk(m,"_",2,2))return{type:"text",value:m[0]};return{type:"strong",children:parseInline(m[1],ctx)}}},{re:/\*(?!\*)(?!\s)((?:[^*]|\*\*[^*]+?\*\*|\*[^*]+?\*)+?)(?<!\s)\*(?!\*)/y,build:(m,ctx)=>{if(!__cmEmOk(m,"*",1,1))return{type:"text",value:m[0]};return{type:"emphasis",children:parseInline(m[1],ctx)}}},{re:/(?<![\w\u4e00-\u9fa5])_(?!\s)((?:[^_]|__[^_]+?__|_[^_]+?_)+?)(?<!\s)_(?![\w\u4e00-\u9fa5])/y,build:(m,ctx)=>{if(!__cmEmOk(m,"_",1,1))return{type:"text",value:m[0]};return{type:"emphasis",children:parseInline(m[1],ctx)}}},{re:/~~(.*?)~~/y,build:(m,ctx)=>{if(m.index>0&&m.input.charAt(m.index-1)==="~"||m.input.charAt(m.index+m[0].length)==="~")return null;return{type:"delete",children:parseInline(m[1],ctx)}}},{re:/==([^=]+)==/y,build:(m,ctx)=>{if(ctx.config.mark===false)return null;return{type:"mark",children:parseInline(m[1],ctx)}}},{re:/\^([^\^]+)\^/y,build:(m,ctx)=>{if(ctx.config.subsup===false)return null;return{type:"sup",children:parseInline(m[1],ctx)}}},{re:/~([^~]+)~/y,build:(m,ctx)=>{if(m.index>0&&m.input.charAt(m.index-1)==="~"||m.input.charAt(m.index+m[0].length)==="~")return null;if(ctx.config.gfmsingletilde)return{type:"delete",children:parseInline(m[1],ctx)};if(ctx.config.subsup===false)return null;return{type:"sub",children:parseInline(m[1],ctx)}}},{re:/\[((?:\\.|\[[^\]]*\]|[^\[\]\\])*)\]\[((?:\\.|\[[^\]]*\]|[^\[\]\\])*)\]/y,build:(m,ctx)=>{const t1=m[1].replace(/\\(.)/g,"$1");const t2=m[2].replace(/\\(.)/g,"$1");const label=normalizeRefLabel(t2===""?t1:t2);const def=ctx.refLinks[label];if(/\]\(/.test(m[1]))return null;if(!def)return null;return{type:"link",href:def.url,autolink:false,title:def.title||"",children:parseInline(t1,ctx,true)}}},{re:/\[((?:\\.|[^\]\\])*)\]\(<((?:\\.|[^>\\\n])*)>(?:\s+(?:"([^"]*)"|'([^']*)'|\(([^()]*)\)))?\)/y,build:(m,ctx)=>({type:"link",href:m[2],autolink:false,title:m[3]||m[4]||m[5]||"",children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx,true)})},{re:/\[((?:\\.|\[[^\]]*\]|[^\[\]\\])*)\]\((?!<)([^()\s]*(?:\([^()\s]*(?:\([^()\s]*(?:\([^()]*\)[^()\s]*)*\)[^()\s]*)*\)[^()\s]*)*)(?:\s+(?:"((?:\\.|[^"\\])*)"|'((?:\\.|[^'\\])*)'|\(([^()]*)\)))?\)/y,build:(m,ctx)=>{if((m[1].match(/`/g)||[]).length%2)return null;let __t=m[3]||m[4]||m[5]||"";__t=__t.replace(/\\(.)/g,"$1");let __h=m[2].replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_\x60{|}~])/g,"$1");return{type:"link",href:__h,autolink:false,title:__t,children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx,true)}}},{re:/::lang(\+)?[ \t]+([\s\S]*?)[ \t]*::(?!:)/y,build:m=>({type:"lang",showText:!!m[1],name:m[2].trim()})},{re:/::(center|right)[ \t]+([\s\S]*?)[ \t]*::(?!:)/y,build:(m,ctx)=>({type:"alignBlockInline",align:m[1],children:parseInline(m[2],ctx)})},{re:/%%([\s\S]*?)%%/y,build:m=>({type:"mdComment",text:m[1]})},{re:/::hei[ \t]+([\s\S]*?)[ \t]*::(?!:)/y,build:(m,ctx)=>({type:"hei",children:parseInline(m[1],ctx)})},{re:/::key[ \t]+([\s\S]*?)[ \t]*::(?!:)/y,build:m=>({type:"key",value:m[1].trim()})},{re:/::copy[ \t]+([\s\S]*?)[ \t]*::(?!:)/y,build:m=>({type:"copy",value:m[1]})},{re:/::term\[((?:\\.|[^\]\\])+)\]\{((?:\\.|[^}\\])+)\}::/y,build:(m,ctx)=>{let tp=m[2].replace(/\\(.)/g,"$1");if(tp.indexOf("::")>=0)tp=extractTextFromNodes(parseInline(tp,ctx)).replace(/::[a-z]+\[([^\]]*)\]::/g,"$1");return{type:"term",label:m[1].replace(/\\(.)/g,"$1"),tip:tp}}},{re:/::ruby[ \t]+([^\s((]+)[((]([^))]+)[))](?:[ \t]*\{([^}]+)\})?::/y,build:(m,ctx)=>{const PUNCT=/[\s,。、!?;:""''()《》【】·—…,.!?;:'"()\[\]{}<>]/;const attrs=m[3]?parseKV(m[3]):{};let pos=(attrs.pos||"").toLowerCase();if(pos!=="under"){if(pos!=="over"&&attrs.pos){if(ctx&&!ctx.__warnings)ctx.__warnings=[];if(ctx&&ctx.__warnings)ctx.__warnings.push({type:"ruby-pos-invalid",value:attrs.pos})}pos=""}const chars=Array.from(m[1]),pys=m[2].trim().split(/\s+/).filter(Boolean),idxs=[];for(let i=0;i<chars.length;i++){if(!PUNCT.test(chars[i]))idxs.push(i)}if(idxs.length>1&&pys.length===idxs.length){const parts=[];let pi=0;for(let j=0;j<chars.length;j++){if(PUNCT.test(chars[j]))parts.push({punct:chars[j]});else parts.push({base:chars[j],rt:pys[pi++]})}return{type:"ruby",parts:parts,pos:pos}}return{type:"ruby",base:m[1],rt:m[2],pos:pos}}},{re:/::qr(?:\[((?:\\.|[^\]\\])+)\]|\(((?:\\.|[^)\\])+)\))::/y,build:(m,ctx)=>{const qu=(m[1]||m[2]).replace(/\\(.)/g,"$1");if(/\b(?:token|api[_-]?key|secret|password|passwd|pwd|session|auth|access[_-]?key|signature|sig)\b/i.test(qu)){if(!ctx.__warnings)ctx.__warnings=[];ctx.__warnings.push({type:"qr-sensitive-url",value:qu})}return{type:"qr",url:qu}}},{re:/::date\[((?:\\.|[^\]\\])+)\]((?:\([^)]*\))*)::/y,build:m=>{let raw=m[1].replace(/\\(.)/g,"$1");const brackets=m[2]||"";const contents=[];const re=/\(([^)]*)\)/g;let bm;while((bm=re.exec(brackets))!==null){contents.push(bm[1].replace(/\\([\[\]\\])/g,"$1"))}const joined=contents.join(" ");if(/\b(before|after)\s*=/.test(joined)){const __rest=joined.replace(/\b(before|after)\s*=\s*("([^"]*)"|'([^']*)'|(\S+))/g,"").trim();if(__rest===""){const kv={};joined.replace(/\b(before|after)\s*=\s*("([^"]*)"|'([^']*)'|(\S+))/g,function(_,k,_v,d,s,u){kv[k]=d!==undefined?d:s!==undefined?s:u});return{type:"date",raw:raw,before:kv.before||"",after:kv.after||""}}}let fixed=contents[0]||"";const p1=parseDateStr(raw);if(p1.ts===null&&fixed){const p2=parseDateStr(fixed);if(p2.ts!==null){raw=fixed;fixed=m[1].replace(/\\(.)/g,"$1")}}return{type:"date",raw:raw,fixed:fixed}}},{re:/::btnimg\[((?:\\.|[^\]\\])*)\]\(((?:\\.|[^)\\])*)\)\(((?:\\.|[^)\\])*)\)(?:\{((?:\\.|[^}\\])+)\})?::/y,build:m=>({type:"btnimg",alt:m[1].replace(/\\(.)/g,"$1"),src:m[2].replace(/\\(.)/g,"$1"),href:m[3].replace(/\\(.)/g,"$1"),attrs:m[4]?parseKV(m[4].replace(/\\([\[\]\\])/g,"$1")):{}})},{re:/::style\[((?:[^\[\]\\]|\\.|\[[^\[\]]*\])*)\](?:\{((?:\\.|[^}\\])+)\})?::/y,build:(m,ctx)=>({type:"style",attrs:m[2]?parseKV(m[2].replace(/\\([\[\]\\])/g,"$1")):{},children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx)})},{re:/::alt\[((?:\\.|[^\]\\])+)\]((?:\((?:\\.|[^)\\])*\))+)::/y,build:m=>{const opts=[m[1].replace(/\\(.)/g,"$1")];const pr=/\(((?:\\.|[^)\\])*)\)/g;let pm;while((pm=pr.exec(m[2]))!==null)opts.push(pm[1].replace(/\\([\[\]\\])/g,"$1"));return{type:"alt",options:opts}}},{re:/::ref\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>{const __rt=m[1].replace(/\\(.)/g,"$1");if(/^fig:/.test(__rt)){const __fk=__rt.slice(4).trim();if(__fk.indexOf(",")>=0){if(!ctx.__warnings)ctx.__warnings=[];ctx.__warnings.push({type:"ref-invalid-list",kind:"fig",key:__fk});return{type:"text",value:m[0]}}return{type:"figRef",key:slugify(__fk)}}if(/^tbl:/.test(__rt))return{type:"tblRef",key:slugify(__rt.slice(4))};if(/^eq:/.test(__rt))return{type:"eqRef",key:__rt.slice(3).trim()};return{type:"ref",target:__rt}}},{re:/::dot\[((?:\\.|[^\]\\])+)\](?:\(((?:\\.|[^)\\])+)\))?::/y,build:(m,ctx)=>{const raw=m[2]?m[2].replace(/\\(.)/g,"$1"):"";let shape="",color="";if(raw){const parts=raw.split(/\s+/).filter(Boolean);const sMap={sq:"'■'","sq-o":"'□'",tri:"'▲'","tri-o":"'△'",dot:"'•'","dot-o":"'◦'",circle:"'●'","circle-o":"'○'",double:"'◎'","double-o":"'◉'",sesame:"'﹅'","sesame-o":"'﹆'"};for(const p of parts){if(sMap[p])shape=sMap[p];else color=p}}return{type:"dot",children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx),shape:shape,color:color}}},{re:/::pn\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>{const raw=m[1].replace(/\\(.)/g,"$1");const node={type:"pn",text:raw};if(raw.indexOf("::")>=0)node.children=parseInline(raw,ctx);return node}},{re:/::upper\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>{const raw=m[1].replace(/\\(.)/g,"$1");const node={type:"upper",text:raw};if(raw.indexOf("::")>=0)node.children=parseInline(raw,ctx);return node}},{re:/::lower\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>{const raw=m[1].replace(/\\(.)/g,"$1");const node={type:"lower",text:raw};if(raw.indexOf("::")>=0)node.children=parseInline(raw,ctx);return node}},{re:/::cap\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>{const raw=m[1].replace(/\\(.)/g,"$1");const node={type:"cap",text:raw};if(raw.indexOf("::")>=0)node.children=parseInline(raw,ctx);return node}},{re:/::note\[((?:\\.|[^\]\\])+)\](?:\{((?:\\.|[^}\\])*)\})?::/y,build:(m,ctx)=>{let tp=(m[2]||"").replace(/\\(.)/g,"$1");if(tp.indexOf("::")>=0)tp=extractTextFromNodes(parseInline(tp,ctx)).replace(/::[a-z]+\[([^\]]*)\]::/g,"$1");return{type:"note",label:m[1].replace(/\\(.)/g,"$1"),tip:tp}}},{re:/::cmd\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>{const raw=m[1].replace(/\\(.)/g,"$1");const node={type:"cmd",text:raw};if(raw.indexOf("::")>=0)node.children=parseInline(raw,ctx);return node}},{re:/::flag\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>{const raw=m[1].replace(/\\(.)/g,"$1");const node={type:"flag",text:raw};if(raw.indexOf("::")>=0)node.children=parseInline(raw,ctx);return node}},{re:/::sup\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>({type:"sup",children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx)})},{re:/::sub\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>({type:"sub",children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx)})},{re:/@@([^@\n]+)@@/y,build:(m,ctx)=>({type:"md-u",children:parseInline(m[1],ctx)})},{re:/\+\+([^+\n]+)\+\+/y,build:(m,ctx)=>({type:"md-ins",children:parseInline(m[1],ctx)})},{re:/::circle\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>({type:"circle",children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx)})},{re:/::cross\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>({type:"cross",children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx)})},{re:/::stamp\[((?:\\.|[^\]\\])+)\](?:\(((?:\\.|[^)\\])+)\))?::/y,build:m=>({type:"stamp",text:m[1].replace(/\\(.)/g,"$1"),color:m[2]?m[2].replace(/\\(.)/g,"$1"):""})},{re:/::score\[([\d.]+)\]([+])?::/y,build:m=>({type:"score",value:parseFloat(m[1])||0,showNum:!!m[2]})},{re:/::wave\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>({type:"wave",children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx)})},{re:/::echo\[((?:\\.|[^\]\[\\])+)\]::/y,build:m=>({type:"echo",text:m[1].replace(/\\(.)/g,"$1")})},{re:/::neon\[((?:\\.|[^\]\\])+)\](?:\(((?:\\.|[^)\\])+)\))?::/y,build:m=>({type:"neon",text:m[1].replace(/\\(.)/g,"$1"),color:m[2]?m[2].replace(/\\(.)/g,"$1"):""})},{re:/::marker\[((?:\\.|[^\]\\])+)\](?:\(((?:\\.|[^)\\])+)\))?::/y,build:(m,ctx)=>({type:"marker",children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx),color:m[2]?m[2].replace(/\\(.)/g,"$1"):""})},{re:/::vert\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>({type:"vert",children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx)})},{re:/::cursor\[((?:\\.|[^\]\[\\])+)\]::/y,build:m=>({type:"cursor",text:m[1].replace(/\\(.)/g,"$1")})},{re:/::shadow\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>({type:"shadow",children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx)})},{re:/::blur\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>({type:"blur",children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx)})},{re:/::path\[((?:\\.|[^\]\[\\])+)\]::/y,build:m=>{const raw=m[1];const phGt="";const phPipe="";const safe=raw.replace(/\\>/g,phGt).replace(/\\\|/g,phPipe);return{type:"path",items:safe.split(">").map(s=>s.replace(new RegExp(phGt,"g"),">").replace(new RegExp(phPipe,"g"),"|").replace(/\\(.)/g,"$1").trim())}}},{re:/::shake\[((?:\\.|[^\]\\])+)\](?:\(((?:\\.|[^)\\])*)\))?::/y,build:(m,ctx)=>({type:"shake",children:parseInline(m[1].replace(/\\(.)/g,"$1"),ctx),args:m[2]!==undefined?m[2].replace(/\\(.)/g,"$1"):""})},{re:/::ap\[((?:\\.|[^\]\[\\])+)\]::/y,build:m=>({type:"anchor",target:m[1].replace(/\\(.)/g,"$1")})},{re:/::goto\[((?:\\.|[^\]\\])*)\]\(((?:\\.|[^)\\])+)\)::/y,build:m=>({type:"goto",label:m[1].replace(/\\(.)/g,"$1"),target:m[2].replace(/\\(.)/g,"$1")})},{re:/\^\[((?:\\.|[^\]\\])+)\]/y,build:(m,ctx)=>{const content=m[1].replace(/\\(.)/g,"$1");const key="__inline_note_"+(ctx.footnoteCount+1);const idx=footnoteIndex(ctx,key);ctx.footnoteDefs[idx]={key:key,content:content};return{type:"footnoteRef",index:idx}}},{re:/&(?:#(\d{1,7})|#[xX]([0-9a-fA-F]{1,6})|([a-zA-Z][a-zA-Z0-9]{1,31}));/y,build:m=>{const MAP={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ",copy:"©",reg:"®",trade:"™",hellip:"…",mdash:"—",ndash:"–",lsquo:"‘",rsquo:"’",ldquo:"“",rdquo:"”",middot:"·",bull:"•",dagger:"†",Dagger:"‡",permil:"‰",prime:"′",Prime:"″",euro:"€",pound:"£",yen:"¥",cent:"¢",sect:"§",para:"¶",deg:"°",plusmn:"±",times:"×",divide:"÷",micro:"µ",laquo:"«",raquo:"»",lsaquo:"‹",rsaquo:"›",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ"};if(m[1]!==undefined){const cp=parseInt(m[1],10);if(cp===0||cp>=55296&&cp<=57343||cp>1114111)return{type:"text",value:"�"};if(cp>=0){try{return{type:"text",value:String.fromCodePoint(cp)}}catch(e){}}return{type:"text",value:m[0]}}if(m[2]!==undefined){const cp2=parseInt(m[2],16);if(cp2===0||cp2>=55296&&cp2<=57343||cp2>1114111)return{type:"text",value:"�"};if(cp2>=0){try{return{type:"text",value:String.fromCodePoint(cp2)}}catch(e){}}return{type:"text",value:m[0]}}if(m[3]&&MAP[m[3]])return{type:"text",value:MAP[m[3]]};return{type:"text",value:m[0]}}},{re:/(`+)(?!`)((?:(?!\1)[\s\S])*?)(?<!`)\1(?!`)\{([^{}\n]+)\}/y,build:m=>{const tokens=String(m[3]||"").trim().split(/\s+/).filter(Boolean);const RES={highlight:1,"no-highlight":1,hljs:1};let lang="",i,t,mm;for(i=0;i<tokens.length;i++){t=tokens[i];mm=t.match(/^(?:language|lang)=([\w+#.-]+)$/);if(mm){lang=mm[1];break}}if(!lang)for(i=0;i<tokens.length;i++){mm=tokens[i].match(/^:?\.language-([\w+#.-]+)$/);if(mm){lang=mm[1];break}}if(!lang)for(i=0;i<tokens.length;i++){mm=tokens[i].match(/^:?\.([\w+#.-]+)$/);if(mm&&!RES[mm[1]]){lang=mm[1];break}}if(!lang)for(i=0;i<tokens.length;i++){t=tokens[i];if(/^[\w+#.-]+$/.test(t)&&!RES[t]){lang=t;break}}if(!lang)return null;let v=m[2].replace(/\n/g," ");if(v.length>2&&v.charAt(0)===" "&&v.charAt(v.length-1)===" "){v=v.slice(1,-1)}return{type:"inlineCode",lang:lang.toLowerCase(),value:v}}},{re:/::badge\[((?:\\.|[^\]\\])*)\](?:\(((?:\\.|[^)\\])+)\))?(?:\{((?:\\.|[^}\\])+)\})?::/y,build:m=>{const attrs=m[3]?parseKV(m[3].replace(/\\([\[\]\\])/g,"$1")):{};if(m[2]){const cv=m[2].replace(/\\(.)/g,"$1");const c=resolveColor(cv)||cv.trim()||"#6b5acf";return{type:"badge",label:m[1].replace(/\\(.)/g,"$1"),color:c,url:attrs.url||"",attrs:attrs}}const b=parseBadge(m[1].replace(/\\([\[\]\\])/g,"$1"));return{type:"badge",label:b.label,color:b.color,url:b.url,attrs:attrs}}},{re:/::color\[((?:\\.|[^\]\\])+)\](?:\(((?:\\.|[^)\\])+)\))?[ \t]*([\s\S]*?)[ \t]*::(?!:)/y,build:(m,ctx)=>{if(m[2]){const cv=m[2].replace(/\\(.)/g,"$1");const c=resolveColor(cv)||cv.trim();return{type:"colorSpan",color:c,children:parseInline(m[1].replace(/\\(.)/g,"$1")+(m[3]||""),ctx)}}const cv=m[1].replace(/\\(.)/g,"$1");const c=resolveColor(cv)||cv.trim();return{type:"colorSpan",color:c,children:parseInline(m[3]||"",ctx)}}},{re:/::var\[((?:\\.|[^\]\[\\])+)\]::/y,build:(m,ctx)=>{const key=m[1].replace(/\\(.)/g,"$1");if(ctx.vars&&key in ctx.vars)return{type:"text",value:String(ctx.vars[key])};return{type:"text",value:m[0]}}},{re:/::use\[((?:\\.|[^\]\\])+)\](?:\(((?:\\.|[^)\\])*)\))?::/y,build:(m,ctx)=>{const __uname=m[1].replace(/\\(.)/g,"$1");if(!__uname||!ctx.macros||!ctx.macros[__uname])return{type:"text",value:m[0]};if((ctx.__macroDepth||0)>=8){if(!ctx.__warnings)ctx.__warnings=[];ctx.__warnings.push({type:"macro-depth",name:__uname});return{type:"text",value:m[0]}}const __mp={};if(m[2]){const __kv=parseKV(m[2].replace(/\\([\[\]\\])/g,"$1"));for(const __k in __kv){if(typeof __kv[__k]==="string")__mp[__k]=__kv[__k]}}const __sv=ctx.vars,__sm=ctx.macros,__st=ctx.meta;ctx.vars=Object.assign({},__sv,__mp);ctx.macros=Object.assign(Object.create(null),__sm);ctx.meta=__st?Object.assign(Object.create(null),__st):null;ctx.__macroDepth=(ctx.__macroDepth||0)+1;const __body=__sm[__uname].body;const __children=parseInline(__body,ctx);ctx.__macroDepth--;ctx.vars=__sv;ctx.macros=__sm;ctx.meta=__st;return __children}}];const DC_INLINE_NAMES={color:1,center:1,right:1,hei:1,key:1,copy:1,lang:1,term:1,ruby:1,qr:1,badge:1,style:1,btnimg:1,alt:1,ref:1,dot:1,pn:1,upper:1,lower:1,cap:1,note:1,cmd:1,flag:1,sup:1,sub:1,circle:1,cross:1,stamp:1,score:1,wave:1,echo:1,neon:1,marker:1,vert:1,cursor:1,shadow:1,blur:1,path:1,shake:1,goto:1,ap:1,date:1,var:1,use:1};const DC_INLINE_SPECIAL={date:/^::date\[[^\]]+\](?:\([^)]*\))?::/};const DC_INLINE_RULE_MAP=function(){const map={};for(let i=0;i<INLINE_RULES.length;i++){const src=INLINE_RULES[i].re.source;const m=/^::([a-z]+)/.exec(src);if(!m){const g=/^::\(([a-z|]+)\)/.exec(src);if(g){const names=g[1].split("|");for(let ni=0;ni<names.length;ni++){if(DC_INLINE_NAMES[names[ni]])map[names[ni]]={rule:INLINE_RULES[i],greedy:new RegExp("^"+src+"$")}}}}else if(DC_INLINE_NAMES[m[1]]){map[m[1]]={rule:INLINE_RULES[i],greedy:new RegExp("^"+src+"$")}}}return map}();function scanInlineDoubleColon(text,start){if(text.charAt(start)!==":"||text.charAt(start+1)!==":")return null;const len=text.length;const nm=/^::([a-z]+)/.exec(text.substring(start,Math.min(start+20,len)));if(!nm)return null;const name=nm[1];if(!DC_INLINE_NAMES[name])return null;let pos=start+2+name.length;const __cs=pos;while(pos<len){const idx=text.indexOf("::",pos);if(idx<0)return null;const after=idx+2;if(after>=len)return{name:name,contentStart:__cs,contentEnd:idx,endPos:after};const ch=text.charAt(after);if(ch===":"){pos=after+1;continue}if(!(ch>="a"&&ch<="z"))return{name:name,contentStart:__cs,contentEnd:idx,endPos:after};const nm2=/^([a-z]+)/.exec(text.substring(after,Math.min(after+20,len)));if(!nm2)return{name:name,contentStart:__cs,contentEnd:idx,endPos:after};const nestedName=nm2[1];if(DC_INLINE_SPECIAL[nestedName]){const spm=DC_INLINE_SPECIAL[nestedName].exec(text.substring(idx,Math.min(idx+500,len)));if(spm){pos=idx+spm[0].length;continue}return{name:name,contentStart:__cs,contentEnd:idx,endPos:after}}if(DC_INLINE_NAMES[nestedName]){const nested=scanInlineDoubleColon(text,idx);if(!nested)return null;pos=nested.endPos;continue}const __unk=/^[a-z]+\[[^\]]*\]::/.exec(text.substring(idx,Math.min(idx+500,len)));var __pf=text.substring(start,idx),__op=__pf.split("[").length-__pf.split("]").length+(__pf.split("{").length-__pf.split("}").length);if(__unk&&__op>0){pos=idx+__unk[0].length;continue}return{name:name,contentStart:__cs,contentEnd:idx,endPos:after}}return null}function __cmSkipCodeRun(text,i){var m=/^(`+)/.exec(text.slice(i));if(!m)return i+1;var run=m[1],e=text.indexOf(run,i+run.length);return e<0?text.length:e+run.length}function __cmBuildLabelCloses(text){const map=Object.create(null),stack=[];const len=text.length;let i=0;while(i<len){const c=text[i];if(c==="\\"){i+=2;continue}if(c==="`"){i=__cmSkipCodeRun(text,i);continue}if(c==="<"){const gt=text.indexOf(">",i+1);if(gt>=0){i=gt+1;continue}}if(c==="["){stack.push(i);i++;continue}if(c==="]"){if(stack.length){const p=stack.pop();if(map[p]===undefined)map[p]=i}i++;continue}if(c==="\n"&&text.charAt(i-1)==="\n")break;i++}return map}function __cmLabelClose(text,start){var out=[],depth=0,i=start+1;if(text.indexOf("]",start+1)<0)return out;while(i<text.length){var c=text[i];if(c==="\\"){i+=2;continue}if(c==="`"){i=__cmSkipCodeRun(text,i);continue}if(c==="<"){var gt=text.indexOf(">",i+1);if(gt>=0){i=gt+1;continue}}if(c==="["){depth++;i++;continue}if(c==="]"){if(depth===0)out.push(i);else depth--;i++;continue}if(c==="\n"&&text.charAt(i-1)==="\n")break;i++}return out}function __cmLabelBalanced(label){var depth=0,i=0;while(i<label.length){var c=label[i];if(c==="\\"){i+=2;continue}if(c==="`"){i=__cmSkipCodeRun(label,i);continue}if(c==="<"){var gt=label.indexOf(">",i+1);if(gt>=0){i=gt+1;continue}}if(c==="[")depth++;else if(c==="]"){if(depth===0)return false;depth--}i++}return depth===0}function __cmInlineDest(text,pos){var i=pos+1,len=text.length;while(i<len&&/[ \t\n]/.test(text[i]))i++;if(i>=len)return null;var href="";if(text[i]==="<"){i++;while(i<len&&text[i]!==">"){if(text[i]==="\\"&&i+1<len&&ESCAPABLE_CHARS.indexOf(text[i+1])>=0){href+=text[i+1];i+=2;continue}if(text[i]==="\n"||text[i]==="<")return null;href+=text[i];i++}if(i>=len)return null;i++}else{var dep=0;while(i<len){var c=text[i];if(c==="\\"&&i+1<len&&ESCAPABLE_CHARS.indexOf(text[i+1])>=0){href+=text[i+1];i+=2;continue}if(c==="("){dep++;href+=c;i++;continue}if(c===")"){if(dep===0)break;dep--;href+=c;i++;continue}if(/[ \t\n]/.test(c))break;href+=c;i++}}while(i<len&&/[ \t\n]/.test(text[i]))i++;var title="",hasTitle=false,closed=false;if(i<len&&(text[i]==='"'||text[i]==="'"||text[i]==="(")){var q=text[i]==="("?")":text[i];hasTitle=true;i++;var tdep=1;while(i<len){if(text[i]==="\\"&&i+1<len){title+=text[i+1];i+=2;continue}if(q===")"&&text[i]==="(")return null;if(text[i]===q){tdep--;i++;if(tdep===0){closed=true;break}title+=q;continue}title+=text[i];i++}if(!closed)return null;while(i<len&&/[ \t\n]/.test(text[i]))i++}if(text[i]!==")")return null;return{end:i+1,href:href.replace(/\n/g," "),title:title.replace(/\n/g," "),hasTitle:hasTitle}}function __cmHasLinkNode(nodes){for(var i=0;i<nodes.length;i++){var n=nodes[i];if(!n||n.nodeName!=="#text"&&!n.type)continue;var t=n.type||n.nodeName;if(t==="link"||t==="wikiLink"||t==="footnoteRef"||t==="autolink")return true;if(n.children&&__cmHasLinkNode(n.children))return true}return false}function __cmLinkLikeAt(text,start,ctx,isImage,closeMap){var p=isImage?start+1:start;if(text.charAt(p)!=="[")return null;if(text.indexOf("](",p+1)<0&&text.indexOf("][",p+1)<0&&(!ctx.refLinks||!Object.keys(ctx.refLinks).length))return null;var closes=closeMap&&closeMap[p]!==undefined?[closeMap[p]]:__cmLabelClose(text,p);for(var k=0;k<closes.length;k++){var close=closes[k],label=text.slice(p+1,close),after=close+1;if(!__cmLabelBalanced(label))continue;var href,title="",end,def=null;if(text.charAt(after)==="("){var d=__cmInlineDest(text,after);if(!d){if(text.charAt(after+1)==="[")continue;var __sd=ctx.refLinks[normalizeRefLabel(label.replace(/\\([\[\]\\])/g,"$1"))];if(!__sd)continue;href=__sd.url;title=__sd.title||"";end=after}else{href=d.href;title=d.title;end=d.end}}else if(text.charAt(after)==="["){var j=after+1,dep=0,refEnd=-1;while(j<text.length){var c=text[j];if(c==="\\"){j+=2;continue}if(c==="["){dep++;j++;continue}if(c==="]"){if(dep===0){refEnd=j;break}dep--;j++;continue}j++}if(refEnd<0)continue;var ref=text.slice(after+1,refEnd);if(!__cmLabelBalanced(ref))continue;def=ctx.refLinks[normalizeRefLabel((ref===""?label:ref).replace(/\\([\[\]\\])/g,"$1"))];if(!def)continue;href=def.url;title=def.title||"";end=refEnd+1}else{if(text.charAt(after)===":"&&p===0&&/^ {0,3}\[((?:\\.|[^\]\[\\])+)\]:[ \t]*(?:<([^>]*)>|(\S+))/.test(text))continue;def=ctx.refLinks[normalizeRefLabel(label.replace(/\\([\[\]\\])/g,"$1"))];if(!def)continue;href=def.url;title=def.title||"";end=after}if(isImage){var alt=extractTextFromNodes(parseInline(label,ctx,true));return{len:end-start,node:{type:"image",alt:alt,src:href,title:title||"",width:"",height:""}}}var kids=parseInline(label,ctx,true);if(__cmHasLinkNode(kids))continue;return{len:end-start,node:{type:"link",href:href,autolink:false,title:title||"",children:kids}}}return null}var __RE_GFM_MAILTO=/(mailto|xmpp):([A-Za-z0-9.!#$%&'*+\/=?^_`{|}~-]+@[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*)(\/[^\s\/<>"']*)?/iy;var __RE_GFM_EMAIL=/[A-Za-z0-9.!#$%&'*+\/=?^_`{|}~-]+@[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/y;function __cmGfmAutoAt(text,i,ctx){if(ctx.config.autolink===false)return null;if(i>0&&/[A-Za-z0-9._%+\-]/.test(text.charAt(i-1)))return null;if(!/[A-Za-z0-9.!#$%&'*+\/=?^_`{|}~-]/.test(text.charAt(i)))return null;__RE_GFM_MAILTO.lastIndex=i;var m=__RE_GFM_MAILTO.exec(text);if(m&&m.index===i){var after=text.charAt(i+m[0].length);if(after==="-"||after==="_")return null;var scheme=m[1].toLowerCase();var path=scheme==="mailto"?"":m[3]||"";var len=scheme.length+1+m[2].length+path.length;var shown=m[0].slice(0,len);var full=scheme+":"+m[2]+path;return{len:len,node:{type:"link",href:full,autolink:true,title:"",children:[{type:"text",value:shown}]}}}__RE_GFM_EMAIL.lastIndex=i;var e=__RE_GFM_EMAIL.exec(text);if(e&&e.index===i){var a2=text.charAt(i+e[0].length);if(a2==="-"||a2==="_"||a2==="@"||a2==="+")return null;return{len:e[0].length,node:{type:"link",href:"mailto:"+e[0],autolink:true,title:"",children:[{type:"text",value:e[0]}]}}}return null}var AUTOLINK_RULE={re:/(?<![A-Za-z0-9_\/.\-])(?<!<)(?<!\[)(?<!\]\()(?<!["'])(?<![A-Za-z0-9_-]=)((?:https?:\/\/|www\.)[^\s<>"'\u3000-\u303F\uFF01-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\u200B-\u200D\uFEFF\u2260`|{}^]+)/iy,build:function(m,ctx){if(ctx.config.autolink===false)return null;var raw=m[1],cand=raw,changed=true;while(changed&&cand.length>0){changed=false;var ch=cand.charAt(cand.length-1);if(/[\u4e00-\u9fa5]/.test(ch)){var __pe=cand.indexOf("://");var __h0=__pe!==-1?__pe+3:0;var __sl=cand.indexOf("/",__h0);var __he=__sl===-1?cand.length:__sl;var __ps=cand.length-1;if(__ps>=__he)break;var __qh=Math.max(cand.indexOf("?"),cand.indexOf("#"));var __rs=__ps;while(__rs>__h0&&/[\u4e00-\u9fa5]/.test(cand.charAt(__rs-1)))__rs--;if(__qh!==-1&&__rs>__qh)break;if(/[\u4e00-\u9fa5]/.test(cand.slice(__h0,__rs)))break;cand=cand.slice(0,-1);changed=true;continue}if(ch==="#"){cand=cand.slice(0,-1);changed=true;continue}if(ch===";"&&/&[A-Za-z][A-Za-z0-9]{1,31};$/.test(cand)){cand=cand.replace(/&[A-Za-z][A-Za-z0-9]{1,31};$/,"");changed=true;continue}if(/[!"'*,.:?_~`|]/.test(ch)){cand=cand.slice(0,-1);changed=true;continue}if(ch===")"){var o=0,c=0;for(var i=0;i<cand.length;i++){if(cand.charAt(i)==="(")o++;else if(cand.charAt(i)===")")c++}if(c>o){cand=cand.slice(0,-1);changed=true;continue}}if(ch==="]"){cand=cand.slice(0,-1);changed=true;continue}}if(m.index>0&&m.input.charAt(m.index-1)==="<"&&/^\s*>/.test(m.input.slice(m.index+m[0].length)))return{type:"text",value:m[0]};if(!cand||!/^(?:https?:\/\/|www\.).+/i.test(cand)){return{type:"text",value:m[0]}}var tail=raw.slice(cand.length),href=cand,isHttp=/^https?:\/\//i.test(cand);if(!isHttp)href="http://"+cand;var res=[{type:"link",href:href,autolink:isHttp,title:"",children:[{type:"text",value:cand}]}];if(tail)res.push({type:"text",value:tail});return res}};var CRITIC_RULES=[{re:/\{\+\+([\s\S]+?)\+\+\}/y,build:function(m,ctx){return{type:"criticAdd",children:parseInline(m[1],ctx)}}},{re:/\{--([\s\S]+?)--\}/y,build:function(m,ctx){return{type:"criticDel",children:parseInline(m[1],ctx)}}},{re:/\{~~([\s\S]+?)~>([\s\S]+?)~~\}/y,build:function(m,ctx){return{type:"criticReplace",oldContent:parseInline(m[1],ctx),newContent:parseInline(m[2],ctx)}}},{re:/\{==([\s\S]+?)==\}/y,build:function(m,ctx){return{type:"criticHighlight",children:parseInline(m[1],ctx)}}},{re:/\{>>([\s\S]+?)<<\}/y,build:function(m){return{type:"criticComment",text:m[1].trim()}}}];var RULES_BY_CHAR={"[":[{re:/\[\[([^\[\]\n]+?)\]\]/y,build:(m,ctx)=>{if(ctx.config.wikilink===false)return null;const raw=m[1];if(m.index>0&&m.input.charAt(m.index-1)==="[")return null;if(m.input.charAt(m.index+m[0].length)==="]")return null;if(ctx.refLinks&&ctx.refLinks[normalizeRefLabel(raw)])return null;const pipe=raw.indexOf("|");let target,label;if(pipe>=0){target=raw.slice(0,pipe).trim();label=raw.slice(pipe+1).trim()}else{target=raw.trim();label=raw.trim()}if(!target||target.toLowerCase()==="toc")return null;return{type:"wikiLink",target:target,label:label}}},{re:/\[\^((?:\\.|[^\]\\])+)\]/y,build:(m,ctx)=>{if(!ctx.config.footnote)return null;const key=m[1].replace(/\\(.)/g,"$1");const idx=footnoteIndex(ctx,key);return{type:"footnoteRef",index:idx}}},INLINE_RULES[0]],"<":[{re:/<!--(?!>|->)(?:(?!--)[\s\S])*?(?<!-)-->/y,build:function(m){return{type:"html",value:m[0]}}},{re:/<\?[\s\S]*?\?>/y,build:function(m){return{type:"html",value:m[0]}}},{re:/<!\[CDATA\[[\s\S]*?\]\]>/y,build:function(m){return{type:"html",value:m[0]}}},{re:/<![A-Z][^>]*>/y,build:function(m){return{type:"html",value:m[0]}}},INLINE_RULES[1],INLINE_RULES[2],INLINE_RULES[3]],"!":[{re:/!\[((?:\\.|[^\[\]])+)\](?!\[|\(|:)/y,build:(m,ctx)=>{const label=normalizeRefLabel(m[1].replace(/\\([\[\]\\])/g,"$1"));const def=ctx.refLinks[label];if(!def)return null;return{type:"image",alt:m[1].replace(/\\(.)/g,"$1"),src:def.url,title:def.title||"",width:"",height:""}}},INLINE_RULES[4],INLINE_RULES[5],INLINE_RULES[6],INLINE_RULES[7]],"`":[INLINE_RULES[66],INLINE_RULES[8]],":":[INLINE_RULES[9]],$:[INLINE_RULES[10]],"*":[INLINE_RULES[11],INLINE_RULES[13]],_:[INLINE_RULES[12],INLINE_RULES[14]],"~":[INLINE_RULES[15],INLINE_RULES[18]],"=":[INLINE_RULES[16]],"^":[INLINE_RULES[64],INLINE_RULES[17]],"%":[INLINE_RULES[24]],"@":[INLINE_RULES[46]],"+":[INLINE_RULES[47]],"&":[INLINE_RULES[65]],"{":CRITIC_RULES,h:[AUTOLINK_RULE],H:[AUTOLINK_RULE],w:[AUTOLINK_RULE],W:[AUTOLINK_RULE]};function splitAbbr(text,abbrs){const keys=Object.keys(abbrs).sort((a,b)=>b.length-a.length);const result=[];let i=0;const isWordChar=c=>c!==""&&/[A-Za-z0-9_+#]/.test(c);while(i<text.length){if(text.charAt(i)==="\\"&&i+1<text.length){result.push({type:"text",value:text.charAt(i+1)});i+=2;continue}let matched=null;for(let k=0;k<keys.length;k++){const key=keys[k];if(text.substr(i,key.length).toLowerCase()===key){const bd=i===0?true:!isWordChar(text.charAt(i-1));const ad=i+key.length>=text.length?true:!isWordChar(text.charAt(i+key.length));if(bd&&ad){matched=key;break}}}if(matched){result.push({type:"abbr",text:text.substr(i,matched.length),title:abbrs[matched]});i+=matched.length}else{const start=i;i++;while(i<text.length){if(text.charAt(i)==="\\"&&i+1<text.length){i+=2;continue}let found=false;for(let k2=0;k2<keys.length;k2++){const key2=keys[k2];if(text.substr(i,key2.length).toLowerCase()===key2){const bd2=!isWordChar(text.charAt(i-1));const ad2=i+key2.length>=text.length?true:!isWordChar(text.charAt(i+key2.length));if(bd2&&ad2){found=true;break}}}if(found)break;i++}result.push({type:"text",value:text.slice(start,i)})}}return result}function __cmDcGreedyMatch(text,start,dc,entry){const fullText=text.substring(start,dc.endPos);const ph="";let store=[],out=fullText.substring(0,dc.contentStart-start),p=dc.contentStart;while(p<dc.endPos-2){if(text.charAt(p)===":"&&text.charAt(p+1)===":"){const nd=scanInlineDoubleColon(text,p);if(nd&&nd.endPos<=dc.endPos-2){store.push(text.slice(p,nd.endPos));out+=ph;p=nd.endPos;continue}}out+=text.charAt(p);p++}out+=fullText.substring(dc.endPos-2-start);let m=entry.greedy.exec(out);if(!m)return null;m=Array.prototype.slice.call(m);m[0]=fullText;for(let k=1;k<m.length;k++){if(typeof m[k]==="string"&&m[k].indexOf(ph)>=0)m[k]=m[k].replace(new RegExp(ph,"g"),()=>store.shift()||"")}return m}function parseInline(text,ctx,noAbbr){ctx.__cmDepth=(ctx.__cmDepth||0)+1;if(ctx.__cmDepth>32){ctx.__cmDepth--;return[{type:"text",value:String(text)}]}try{let __emSaves=null;const nodes=[];let buf="";let i=0;const len=text.length;let __lastGt=-2,__validStarClose=null,__validStarCloseIdx=0;const __labelCloses=len>1e3?__cmBuildLabelCloses(text):null;if(len>1e3){__lastGt=text.lastIndexOf(">");if(text.indexOf("*")!==-1){__validStarClose=[];for(let __si=1;__si<len;__si++){if(text.charCodeAt(__si)===42){const __sp=text.charCodeAt(__si-1);if(__sp!==32&&__sp!==9&&__sp!==10&&__sp!==13){const __sn=__si+1<len?text.charCodeAt(__si+1):0;if(__sn!==42)__validStarClose.push(__si)}}}}}const flush=()=>{if(buf){const __pos=i-buf.length;const __tn={type:"text",value:buf,_pos:__pos};if(ctx.hasAbbr&&!noAbbr&&ctx.config.abbr){const pa=splitAbbr(buf,ctx.abbrs);for(let pi=0;pi<pa.length;pi++){pa[pi]._pos=__pos;nodes.push(pa[pi])}}else{nodes.push(__tn)}buf=""}};while(i<len){const ch=text[i];const __ga=__cmGfmAutoAt(text,i,ctx);if(__ga){flush();nodes.push(__ga.node);i+=__ga.len;continue}if(ch==="["||ch==="!"){const __lk=__cmLinkLikeAt(text,i,ctx,ch==="!",__labelCloses);if(__lk){flush();nodes.push(__lk.node);i+=__lk.len;continue}}if(ch==="\\"&&i+1<len&&ESCAPABLE_CHARS.indexOf(text[i+1])>=0){const __nc=text[i+1];buf+=""+String.fromCharCode(57600+ESCAPABLE_CHARS.indexOf(__nc));i+=2;continue}if(ch===":"&&text[i+1]===":"){const dc=scanInlineDoubleColon(text,i);if(dc&&ctx.config.directives!==false){const dcEntry=DC_INLINE_RULE_MAP[dc.name];if(dcEntry){const fullText=text.substring(i,dc.endPos);const dm=__cmDcGreedyMatch(text,i,dc,dcEntry);if(dm){const dcNode=dcEntry.rule.build(dm,ctx);if(dcNode!==null){if(Array.isArray(dcNode)){flush();for(let __dj=0;__dj<dcNode.length;__dj++){dcNode[__dj]._md=fullText;nodes.push(dcNode[__dj])}i=dc.endPos;continue}if(isNodeAllowed(dcNode.type,dcNode,ctx)){flush();dcNode._md=fullText;nodes.push(dcNode);i=dc.endPos;continue}else{flush();buf+=text.slice(i,dc.endPos);i=dc.endPos;continue}}}}}}if(ch==="<"&&__lastGt>=-1&&i>__lastGt){buf+="<";i++;continue}let __skipStar13=false;if(ch==="*"&&__validStarClose){while(__validStarCloseIdx<__validStarClose.length&&__validStarClose[__validStarCloseIdx]<=i){__validStarCloseIdx++}if(__validStarCloseIdx>=__validStarClose.length)__skipStar13=true}let rules=RULES_BY_CHAR[ch];if(ch==="*"||ch==="_")rules=null;if(!rules){const start=i;i++;while(i<len){const c=text[i];if(c==="\\"||RULES_BY_CHAR[c])break;i++}buf+=text.slice(start,i);continue}let matched=false;for(let r=0;r<rules.length;r++){const rule=rules[r];if(!rule)continue;if(__skipStar13&&rule===INLINE_RULES[13])continue;rule.re.lastIndex=i;const m=rule.re.exec(text);if(m&&m.index===i){const node=rule.build(m,ctx);if(node===null)continue;if(!Array.isArray(node)&&!isNodeAllowed(node.type,node,ctx)){if(node.type==="html"&&m[0]){flush();nodes.push({type:"text",value:m[0],noSmart:true});i+=m[0].length;matched=true;break}continue}flush();if(Array.isArray(node)){for(let ni=0;ni<node.length;ni++)nodes.push(node[ni])}else{nodes.push(node)}i+=m[0].length;matched=true;break}}if(matched)continue;buf+=text[i];i++}flush();var __res=__cmEmRescue(nodes,text);__cmRestoreSaves(__res,__emSaves);return __res}finally{ctx.__cmDepth--}}function splitSuffix(raw){const m=raw.match(/\s+(\\?)([\^!~?*]+)$/);if(!m)return{text:raw,suffix:""};const prefix=raw.slice(0,m.index);if(m[1]==="\\")return{text:prefix+" "+m[2],suffix:""};return{text:prefix,suffix:m[2]}}function extractHeadingParts(raw){let cur=raw,suffix="",attrs=null,sub="";for(let k=0;k<5;k++){let changed=false;if(!attrs){const a=splitAttrs(cur);if(a.attrs){attrs=a.attrs;cur=a.text;changed=true}}if(!suffix){const s=splitSuffix(cur);if(s.suffix){suffix=s.suffix;cur=s.text;changed=true}}if(!sub){const sepIdx=cur.indexOf("-=>");if(sepIdx!==-1){sub=cur.slice(sepIdx+3).trim();cur=cur.slice(0,sepIdx).trim();changed=true}}if(!changed)break}return{text:cur,suffix:suffix,attrs:attrs,sub:sub}}function pushHeading(ctx,nodes,hDepth,hChildren,suffix,attrs,sub){const hText=extractTextFromNodes(hChildren);let hId=attrs&&attrs.id?attrs.id:slugify(hText);if(!hId||!/[\p{L}\p{N}\p{M}_]/u.test(hId))hId="h"+hDepth+"-"+(ctx.headings.length+1);if(ctx.usedSlugs[hId]){ctx.usedSlugs[hId]++;hId=hId+"-"+ctx.usedSlugs[hId]}else{ctx.usedSlugs[hId]=1}suffix=suffix||"";if(suffix.indexOf("^")===-1&&!ctx.inContainer)ctx.headings.push({depth:hDepth,id:hId,text:hText,suffix:suffix});let num="";let foldInit=null;if(attrs&&attrs.fold)foldInit=true;else if(attrs&&attrs.nofold)foldInit=false;const shouldNum=ctx.config.headnum||attrs&&typeof attrs.no==="string";if(shouldNum&&hDepth>=2&&hDepth<=6){const slot=hDepth-2;const no=attrs?attrs.no:null;if(no===""){ctx.headnumCounter[slot]++;for(let r=slot+1;r<5;r++)ctx.headnumCounter[r]=0;num=""}else if(typeof no==="string"&&no){const noParts=no.split(".");for(let nk=0;nk<5;nk++)ctx.headnumCounter[nk]=0;for(let nk1=0;nk1<noParts.length&&nk1<5;nk1++)ctx.headnumCounter[nk1]=parseInt(noParts[nk1],10)||0;num=no}else{ctx.headnumCounter[slot]++;for(let r2=slot+1;r2<5;r2++)ctx.headnumCounter[r2]=0;const segs=[];for(let s2=0;s2<=slot;s2++)segs.push(ctx.headnumCounter[s2]);num=segs.join(ctx.config.headnumsep!==undefined?ctx.config.headnumsep:".")}}nodes.push({type:"heading",depth:hDepth,id:hId,children:hChildren,suffix:suffix,cls:attrs&&attrs.cls?attrs.cls:[],num:num,foldInit:foldInit,sub:sub||""})}function __cmBqCanLazy(quoted){if(!quoted.length)return true;var last=quoted[quoted.length-1];if(!last||!last.trim())return false;var s=last;var depth=0;while(depth<32&&/^ {0,3}>/.test(s)){s=s.replace(/^ {0,3}>[ \t]?/,"");depth++}if(!s||!s.trim())return false;if(/^(?: {4,}|\t)/.test(s))return false;if(/^ {0,3}(`{3,}|~{3,})/.test(s))return false;return true}function __cmPipeStart(s,gfm){return gfm!==false&&/^\s*\|/.test(s)}function __cmLazyBlockStart(s,gfm){if(isThematicBreak(s))return true;return/^(?: {0,3}(?:#{1,6}\s|>|`{3,}|~{3,}|:::[a-z]|[-*+]\s|\d+[.)]\s|(?=[ivxlcdm])m{0,4}(?:cm|cd|d?c{0,3})(?:xc|xl|l?x{0,3})(?:ix|iv|v?i{0,3})[.)]\s|(-{3,}|_{3,}|\*{3,})[ \t]*$|\$\$)| {0,3}(?:<!--|<\?|<!\[CDATA\[|<![A-Z])| {0,3}<\/?(?: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|h[1-6]|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)(?:\s|\/?>))/i.test(s)||__cmPipeStart(s,gfm)}function __cmLazyLeafStart(s){if(isThematicBreak(s)||/^ {0,3}(=+|-+)[ \t]*$/.test(s))return true;return/^(?: {0,3}(?:#{1,6}\s|`{3,}|~{3,}|(-{3,}|_{3,}|\*{3,})[ \t]*$|\$\$)| {4,}|\t| {0,3}(?:<!--|<\?|<!\[CDATA\[|<![A-Z])| {0,3}<\/?(?: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|h[1-6]|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)(?:\s|\/?>))/i.test(s)}function __cmRefContLine(prev,cur){if(typeof prev!=="string"||typeof cur!=="string")return false;let p=prev;for(let z=0;z<8;z++){const np=p.replace(/^(?: {0,3}>[ \t]?| {0,3}(?:[-*+]|\d{1,9}[.)])[ \t]+)+/,"");if(np===p)break;p=np}const m=p.match(/^ {0,3}\[((?:\\.|[^\]\[\\])+)\]:[ \t]*(.*)$/);if(!m)return false;const rest=m[2].trim();if(!rest)return cur.trim()!==""&&/^[ \t]*(?:<[^>]*>|\S+)(?:[ \t]+(?:"[^"]*"|'[^']*'|\([^)]*\)))?[ \t]*$/.test(cur);if(/^(?:<[^>]*>|\S+)$/.test(rest))return/^[ \t]*(?:"[^"]*"|'[^']*'|\([^)]*\))[ \t]*$/.test(cur);return false}function __cmApplySoftBreaks(nodes,brk){var out=[];for(var i=0;i<nodes.length;i++){var n=nodes[i];if(n&&n.type==="text"&&typeof n.value==="string"&&/[\n\uE010]/.test(n.value)){var ps=n.value.split(/(\n|\uE010)/);for(var j=0;j<ps.length;j++){var seg=ps[j];if(seg==="\n")out.push(brk?{type:"break"}:{type:"text",value:" "});else if(seg==="\uE010")out.push({type:"break"});else if(seg){var c={};for(var kk in n)c[kk]=n[kk];c.value=seg;out.push(c)}}}else{if(n&&n.children)n.children=__cmApplySoftBreaks(n.children,brk);if(n&&typeof n.value==="string"&&/[\n\uE010]/.test(n.value))n.value=n.value.replace(/[\n\uE010]/g," ");out.push(n)}}return out}function parseBlocks(source,ctx){ctx.__blockDepth=(ctx.__blockDepth||0)+1;if(ctx.__blockDepth>100){ctx.__blockDepth--;return{type:"root",children:[{type:"paragraph",children:parseInline(source,ctx)}]}}try{const lines=source.split("\n").map(function(l){if(l.indexOf("\t")===-1)return l;let out="",col=0;for(let k=0;k<l.length;k++){if(l[k]==="\t"){const n=4-col%4;out+=" ".repeat(n);col+=n}else{out+=l[k];col++}}return out});const nodes=[];let para=[];let listStack=[];let i=0;const flushPara=()=>{if(!para.length)return;const children=[];let __ph=false;const __cmPara=__cmMergeParaLines(para);var __xem=false;if(__cmPara.lines.length===2){var __l0=__cmPara.lines[0],__l1=__cmPara.lines[1];var __m0=__l0.match(/^(\*\*?|__?)(?!\s)/),__m1=__l1.match(/(\*\*?|__?)$/);if(__m0&&__m1&&__m0[1]===__m1[1])__xem=true}if(__xem){var __x0=__cmPara.lines[0];var __xhard=/(?: {2,}|\\)$/.test(__x0);var __j=__x0.replace(/(?: {2,}|\\)$/,"").replace(/ +$/,"")+(__xhard?"\uE010":" ")+__cmPara.lines[1].replace(/^[ \t]+/,"");var __jn=__cmApplySoftBreaks(parseInline(__j,ctx),ctx.config.breaks);for(var __z=0;__z<__jn.length;__z++)children.push(__jn[__z]);__cmPara.lines=[]}const __groups=[];let __cur=null,pendingSep="";for(let k=0;k<__cmPara.lines.length;k++){let __p=__cmPara.lines[k];if(__cur)__cur.text+=pendingSep;let __sep="\n";if(k<__cmPara.lines.length-1&&__p.charCodeAt(__p.length-1)===92){__sep="\uE010";__p=__p.slice(0,-1)}else if(k<__cmPara.lines.length-1&&__p.length>=2&&__p.charCodeAt(__p.length-1)===32&&__p.charCodeAt(__p.length-2)===32){__sep="\uE010";__p=__p.replace(/ +$/,"")}__p=__p.replace(/^[ \t]+/,"").replace(/\uE003/g,"");if(!__cur){__cur={text:__p};__groups.push(__cur)}else{__cur.text+=__p}pendingSep=__sep}for(let g=0;g<__groups.length;g++){const inl=parseInline(__groups[g].text,ctx);const __ad=__cmApplySoftBreaks(inl,ctx.config.breaks);for(const n of __ad)children.push(n)}if(ctx.config.autocollage&&children.length>0){let __ok=true;const __imgs=[];for(let __i=0;__i<children.length;__i++){const __ch=children[__i];if(__ch.type==="image"){if(__ch.width||__ch.height){__ok=false;break}__imgs.push(__ch)}else if(__ch.type==="text"&&/^\s*$/.test(__ch.value||"")){}else if(__ch.type==="break"){}else{__ok=false;break}}if(__ok&&__imgs.length>=2){const __lay=__imgs.length<=4?String(__imgs.length):"multi";nodes.push({type:"collage",layout:__lay,items:__imgs.map(im=>({alt:im.alt||"",src:im.src,title:im.title||"",width:"",height:""}))});para=[];return}}let __blankPara=true;for(let __bpi=0;__bpi<children.length;__bpi++){const __bpn=children[__bpi];if(!__bpn)continue;const __bpt=__bpn.type;if(__bpt==="mdComment")continue;if(__bpt==="break")continue;if(__bpt==="text"&&(!__bpn.value||!__bpn.value.trim()))continue;__blankPara=false;break}if(!__blankPara){nodes.push({type:"paragraph",children:children})}para=[]};const endList=()=>{listStack=[]};const endAll=()=>{endList();flushPara()};while(i<lines.length){const line=lines[i];if(line===""||(line.charCodeAt(0)===32||line.charCodeAt(0)===9)&&line.trim()===""){if(ctx.config.blanklines&&!listStack.length){let __bl=0;while(i<lines.length&&(lines[i]===""||(lines[i].charCodeAt(0)===32||lines[i].charCodeAt(0)===9)&&lines[i].trim()==="")){__bl++;i++}endAll();if(__bl>0){const __bmin=ctx.config.blankmin||1;if(__bl>=__bmin)nodes.push({type:"blankLines",count:__bl})}continue}let __nla=i+1;while(__nla<lines.length&&(lines[__nla]===""||(lines[__nla].charCodeAt(0)===32||lines[__nla].charCodeAt(0)===9)&&lines[__nla].trim()===""))__nla++;if(listStack.length&&__nla<lines.length){const __nl=lines[__nla];const __lm=__nl.match(/^(\s*)([-*+]|\d+[.)]|(?=[ivxlcdm])m{0,4}(?:cm|cd|d?c{0,3})(?:xc|xl|l?x{0,3})(?:ix|iv|v?i{0,3})[.)])\s+/i);if(__lm){const __nInd=__lm[1].length;const __top=listStack[listStack.length-1];const __mk=__lm[2];const __mb2=__mk.replace(/[.)]$/,"");const __rm2=/^(?=[ivxlcdm])m{0,4}(?:cm|cd|d?c{0,3})(?:xc|xl|l?x{0,3})(?:ix|iv|v?i{0,3})$/i.test(__mb2);const __ord2=__rm2||/^\d+[.)]$/.test(__mk);const __mt2=__rm2?__mb2===__mb2.toUpperCase()?"I":"i":__ord2?__mk.charAt(__mk.length-1):__mk;if(__nInd<__top.contentCol&&__ord2===__top.node.ordered&&__mt2===__top.node.mtype){__top.node.loose=true;i=__nla;continue}}}endAll();i++;continue}if(/^ {0,3}%%/.test(line)){const __cOpen=line.indexOf("%%"),__cClose=line.indexOf("%%",__cOpen+2);if(__cClose===-1){endAll();let __cbj=i+1,__cfound=false;while(__cbj<lines.length){const __cidx=lines[__cbj].indexOf("%%");if(__cidx!==-1){__cfound=true;lines[__cbj]=lines[__cbj].slice(__cidx+2);i=__cbj;break}__cbj++}if(!__cfound)i=__cbj;continue}}const __c0=line.charCodeAt(0);if((__c0>=65&&__c0<=90||__c0>=97&&__c0<=122||__c0>=128)&&!/^(\s*)(?=[ivxlcdm])m{0,4}(?:cm|cd|d?c{0,3})(?:xc|xl|l?x{0,3})(?:ix|iv|v?i{0,3})[.)]\s/i.test(line)){const __nx=lines[i+1];const __setext=__nx&&/^ {0,3}(=+|-+)[ \t]*$/.test(__nx);const __def=__nx&&/^:\s+/.test(__nx);const __tbl=__nx&&line.indexOf("|")!==-1&&/^[\s:|-]*\|[\s:|-]*$/.test(__nx.trim())&&/-/.test(__nx);if(!__setext&&!__def&&!__tbl){if(listStack.length)endList();para.push(line);i++;continue}}if(!listStack.length&&i+1<lines.length&&/^ {0,3}(=+|-+)[ \t]*$/.test(lines[i+1])&&!isThematicBreak(line)&&!/^( |\t)/.test(line)&&!/^ {0,3}([-*+]|\d+[.)])\s/.test(line)&&!/^ {0,3}#{1,6}\s/.test(line)&&line.charCodeAt(0)!==62&&!/^:::/.test(line)&&!/^\|/.test(line)&&!/^ {0,3}(`{3,}|~{3,})/.test(line)&&!/^ {0,3}\[(?:\\.|[^\]\\])+\]:/.test(line)){const setextDepth=lines[i+1].trim().charAt(0)==="="?1:2;const __setextText=para.length?para.concat([line]).join("\n"):line;para=[];endAll();const __hp2=extractHeadingParts(__setextText);pushHeading(ctx,nodes,setextDepth,parseInline(__hp2.text,ctx),__hp2.suffix,__hp2.attrs,__hp2.sub);i+=2;continue}if(ctx.config.html){const __hb1=line.match(/^ {0,3}<(script|pre|style|textarea)(?:\s|>|$)/i),__hb2=line.match(/^ {0,3}<!--/),__hb3=line.match(/^ {0,3}<\?/),__hb4=line.match(/^ {0,3}<![A-Z]/),__hb5=line.match(/^ {0,3}<!\[CDATA\[/),__hb6=line.match(/^ {0,3}<\/?([a-z][a-z0-9-]*)(?:\s|\/?>|$)/),__hb7=line.match(/^ {0,3}(<[a-zA-Z][a-zA-Z0-9-]*(?:\s+[a-zA-Z_:][a-zA-Z0-9_.:-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'=<>\x60]+))?)*\s*\/?>|<\/[a-zA-Z][a-zA-Z0-9-]*\s*>)\s*$/);if(__hb1||__hb2||__hb3||__hb4||__hb5){endAll();let __endPat=null;if(__hb1)__endPat=new RegExp("</"+__hb1[1].toLowerCase()+">","i");else if(__hb2)__endPat=/-->/;else if(__hb3)__endPat=/\?>/;else if(__hb5)__endPat=/\]\]>/;else __endPat=/>/;const __bL=[line];if(!__endPat.test(line)){let __bj=i+1;while(__bj<lines.length){__bL.push(lines[__bj]);if(__endPat.test(lines[__bj])){__bj++;break}__bj++;if(__bj-i>500)break}i=__bj}else{i++}nodes.push({type:"htmlBlock",raw:__bL.join("\n")});continue}if(__hb6&&BLOCK_TAGS_SET[__hb6[1]]&&!listStack.length&&!/^ {0,3}<\/(?:pre|script|style|textarea)(?:[ \t]|\/?>|$)/i.test(line)){endAll();const __bL2=[line];let __bj2=i+1;while(__bj2<lines.length){if(lines[__bj2].trim()==="")break;__bL2.push(lines[__bj2]);__bj2++;if(__bj2-i>500)break}i=__bj2;nodes.push({type:"htmlBlock",raw:__bL2.join("\n")});continue}if(__hb7&&!para.length&&!listStack.length){const __tg=__hb7[1].match(/<\/?([a-zA-Z][a-zA-Z0-9-]*)/)[1];if(!BLOCK_TAGS_SET[__tg]){endAll();const __bL3=[line];let __bj3=i+1;while(__bj3<lines.length){if(lines[__bj3].trim()==="")break;__bL3.push(lines[__bj3]);__bj3++;if(__bj3-i>500)break}i=__bj3;nodes.push({type:"htmlBlock",raw:__bL3.join("\n")});continue}}}if(!listStack.length&&para.length&&__cmHasHardBreak(para[para.length-1])&&!__cmLazyBlockStart(line,ctx.config.gfm)&&!isThematicBreak(line)){para.push(line.replace(/^[ \t]+/,""));i++;continue}if(!para.length&&/^( |\t)/.test(line)){if(listStack.length)endList();endAll();const codeLines=[];let cj=i;while(cj<lines.length){const cl=lines[cj];if(cl.trim()===""){let ck=cj+1;while(ck<lines.length&&lines[ck].trim()==="")ck++;if(ck<lines.length&&/^( |\t)/.test(lines[ck])){for(let cm=cj;cm<ck;cm++)codeLines.push("");cj=ck;continue}else break}else if(/^( |\t)/.test(cl)){codeLines.push(cl.replace(/^( |\t)/,""));cj++}else break}if(ctx.config.codeblocktrim!==false)while(codeLines.length&&codeLines[codeLines.length-1]==="")codeLines.pop();if(codeLines.length)nodes.push({type:"codeBlock",lang:"",code:codeLines.join("\n")});i=cj;continue}let m;m=line.match(/^(\s*)(`{3,}|~{3,})([^\s]*)(?:\s+(.+?))?\s*$/);if(m&&(m[2].charAt(0)!=="`"||((m[3]||"")+(m[4]||"")).indexOf("`")<0)){const indent=m[1];const fenceChar=m[2].charAt(0);const fenceLen=m[2].length;const lang=m[3];const fenceMeta=m[4]||"";const closeRe=new RegExp("^[ \t]{0,"+Math.max(3,indent.length)+"}"+escapeRe(fenceChar)+"{"+fenceLen+",}[ \t]*$");let j=i+1;while(j<lines.length&&!closeRe.test(lines[j]))j++;if(true){j=Math.min(j,lines.length);endAll();let __rawLines=lines.slice(i+1,j);if(indent){const __fenceStrip=new RegExp("^ {1,"+indent.length+"}");__rawLines=__rawLines.map(__rl=>__rl.replace(__fenceStrip,""))}let __rawCode=__rawLines.join("\n");if(ctx.config.codeblocktrim!==false)__rawCode=__rawCode.replace(/^\n+|\n+$/g,"");const __marks={},__cleanLines=[];const __cl=__rawCode.split("\n");for(let __ci=0;__ci<__cl.length;__ci++){const __cm=__cl[__ci].match(/\s*(?:\/\/|#|--|<!--)\s*\[!code\s+([^\]]+)\]\s*(?:-->)?\s*$/);if(__cm){__marks[__ci+1]={type:"_codeMark",mark:__cm[1].trim()};__cleanLines.push(__cl[__ci].replace(/\s*(?:\/\/|#|--|<!--)\s*\[!code\s+[^\]]+\]\s*(?:-->)?\s*$/,""))}else{__cleanLines.push(__cl[__ci])}}nodes.push({type:"codeBlock",lang:lang,meta:fenceMeta,marks:Object.keys(__marks).length?__marks:null,code:__cleanLines.join("\n")});i=j+1;continue}}m=line.match(/^:::([a-z]+)([+\-_~]*)[ \t]*([^\n]*)$/);if(m&&ctx.config.containers!==false&&RE_OPEN.test(line)){const cType=m[1].toLowerCase();const cMod=m[2]||"";const cPlus=cMod.indexOf("+")>=0;const cSilent=cMod.indexOf("~")>=0;const cTitle=m[3].trim();const cRes=scanContainer(lines,i+1,cType,false);endAll();const __savedIC=ctx.inContainer;ctx.inContainer=cType==="meta"?false:true;const __cn=buildContainer(cType,cPlus,cTitle,cRes.body,ctx,cMod);ctx.inContainer=__savedIC;if(__cn.type==="cfg"){const __c=__cn.config;applyArticleConfig(ctx,__c);nodes.push(__cn);i=cRes.next;continue}if(cRes.closed===false&&!cSilent){__cn.unclosed=true;if(!ctx.__warnings)ctx.__warnings=[];ctx.__warnings.push({type:"unclosed",line:i+1,container:cType})}nodes.push(__cn);i=cRes.next;continue}if(ctx.config.math&&/^\$\$[ \t]*$/.test(line.trim())){endAll();const mlines=[];let mjj=i+1;while(mjj<lines.length&&!/^\$\$[ \t]*$/.test(lines[mjj].trim())){mlines.push(lines[mjj]);mjj++}if(mjj<lines.length){nodes.push({type:"mathBlock",value:mlines.join("\n")});i=mjj+1;continue}}m=ctx.config.math?line.match(/^\$\$([^\n]+?)\$\$[ \t]*$/):null;if(m){endAll();nodes.push({type:"mathBlock",value:m[1].trim()});i++;continue}if(ctx.config.toc&&/^\[\[toc\]\]$/i.test(line.trim())){endAll();nodes.push({type:"toc"});i++;continue}m=ctx.config.footnote?line.match(/^\[\^([^\]]+)\]:\s*(.*)/):null;if(m){endAll();const idx=footnoteIndex(ctx,m[1]);let fContent=m[2];let fj=i+1;while(fj<lines.length&&/^( {2,}|\t)/.test(lines[fj])){fContent+="\n"+lines[fj].replace(/^( {1,4}|\t)/,"");fj++}ctx.footnoteDefs[idx]={key:m[1],content:fContent};i=fj;continue}const __rmk=line.match(/^ {0,3}(\*?)\[((?:\\.|[^\]\[\\])+)\]:/);if(__rmk&&(__rmk[1]==="*"||!para.length)){const __rk=normalizeRefLabel(__rmk[2].replace(/\\([\[\]\\])/g,"$1"));const __span=ctx.__refDefSpan&&ctx.__refDefSpan[__rk];const __nxDef=lines[i+1];const __rdRest=line.slice(__rmk[0].length).trim();const __rdOK=!!__rdRest||__nxDef!==undefined&&!/^ {0,3}(?:>|[-*+]|\d{1,9}[.)])/.test(__nxDef)&&/^\s*(?:<[^>]*>|\S+)(?:[ \t]+(?:"[^"]*"|'[^']*'|\([^)]*\)))?[ \t]*$/.test(__nxDef);if((__rmk[1]==="*"||ctx.refLinks[__rk])&&__rdOK){endAll();if(__span&&__span.start===i&&__span.text===line&&__span.endText===lines[__span.end]){i=__span.end+1;var __dt0=0;while(i<lines.length&&__dt0<3&&/^\s+(?:<?[^\s>]+>?(?:[ \t]+(?:"[^"]*"|'[^']*'|\([^)]*\)))?|(?:"[^"]*"|'[^']*'|\([^)]*\)))[ \t]*$/.test(lines[i])){i++;__dt0++}}else{i++;var __dt=0;while(i<lines.length&&__dt<3&&/^\s+(?:<?[^\s>]+>?(?:[ \t]+(?:"[^"]*"|'[^']*'|\([^)]*\)))?|(?:"[^"]*"|'[^']*'|\([^)]*\)))[ \t]*$/.test(lines[i])){i++;__dt++}}continue}}if(/^ {0,3}>/.test(line)){endAll();const quoted=[];quoted.push(line.replace(/^ {0,3}>[ \t]?/,""));i++;while(i<lines.length){const ql=lines[i];if(/^ {0,3}>/.test(ql)){quoted.push(ql.replace(/^ {0,3}>[ \t]?/,""));i++;continue}if(ctx.config.lazycontinuation&&__cmBqCanLazy(quoted)&&ql.trim()!==""&&quoted.length&&quoted[quoted.length-1].trim()!==""&&!/^(?: {0,3}(?:#{1,6}\s|>|`{3,}|~{3,}|:::[a-z]|[-*+]\s|\d+[.)]\s|(?=[ivxlcdm])m{0,4}(?:cm|cd|d?c{0,3})(?:xc|xl|l?x{0,3})(?:ix|iv|v?i{0,3})[.)]\s|(-{3,}|_{3,}|\*{3,})[ \t]*$|\$\$)| {0,3}(?:<!--|<\?|<!\[CDATA\[|<![A-Z])| {0,3}<\/?(?: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|h[1-6]|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)(?:\s|\/?>))/i.test(ql)&&!__cmPipeStart(ql,ctx.config.gfm)&&!isThematicBreak(ql)){if(/^ {0,3}(=+|-+)[ \t]*$/.test(ql))quoted.push(""+ql);else quoted.push(ql);i++;continue}break}const __qm=quoted[0]&&quoted[0].match(/^\[!([a-zA-Z][a-zA-Z0-9_-]*)\]([+\-])?[ \t]*(.*)$/);if(__qm&&ctx.config.callout!==false){const __ct=__qm[1].toLowerCase();if(CALLOUT_MAP[__ct]){const __cmod=__qm[2]||"";const __ctitle=__qm[3]||"";const __cbody=quoted.slice(1).join("\n");nodes.push({type:"callout",variant:__ct,title:__ctitle,icon:"",color:"",children:parseBlocks(__cbody,ctx).children,open:__cmod==="+"?true:__cmod==="-"?false:undefined});continue}}nodes.push({type:"blockquote",children:parseBlocks(quoted.join("\n"),ctx).children});continue}m=line.match(/^ {0,3}(#{1,6})(?!#)(?:[ \t]+(.*)|[ \t]*$)/);if(m){endAll();var __atx=(m[2]||"").replace(/^#+$/,"").replace(/[ \t]+#+[ \t]*$/,"");var __hp=extractHeadingParts(__atx);pushHeading(ctx,nodes,m[1].length,parseInline(__hp.text,ctx),__hp.suffix,__hp.attrs,__hp.sub);i++;continue}m=line.match(/^ {0,3}---[ \t]+(.+?)[ \t]+---(?:[ \t]+\{([^}]+)\})?[ \t]*$/);if(m&&ctx.config.hrtext!==false){let __t=m[1],__a={};if(m[2]){m[2].replace(/(\w+)=(\w+)/g,(_,k,v)=>{__a[k]=v})}endAll();nodes.push({type:"hrText",style:"solid",text:__t,attrs:__a});i++;continue}m=line.match(/^ {0,3}\*\*\*[ \t]+(.+?)[ \t]+\*\*\*(?:[ \t]+\{([^}]+)\})?[ \t]*$/);if(m&&ctx.config.hrtext!==false){let __t2=m[1],__a2={};if(m[2]){m[2].replace(/(\w+)=(\w+)/g,(_,k,v)=>{__a2[k]=v})}endAll();nodes.push({type:"hrText",style:"dashed",text:__t2,attrs:__a2});i++;continue}if(/^ {0,3}[*_-]/.test(line)&&isThematicBreak(line)){endAll();nodes.push({type:"thematicBreak"});i++;continue}if(ctx.config.gfm&&ctx.config.table&&line.indexOf("|")!==-1&&i+1<lines.length&&/^[\s:|-]*\|[\s:|-]*$/.test(lines[i+1].trim())&&/-/.test(lines[i+1])&&__cmTableDelimOK(line,lines[i+1])){let __cap="";if(para.length===1){const __tm=para[0].match(/^Table:\s*(.*)$/i);if(__tm){__cap=__tm[1].trim();para=[]}}else if(para.length===0&&nodes.length>0){const __last=nodes[nodes.length-1];if(__last.type==="paragraph"&&__last.children.length===1&&__last.children[0].type==="text"){const __tm2=__last.children[0].value.match(/^Table:\s*(.*)$/i);if(__tm2){__cap=__tm2[1].trim();nodes.pop()}}}endAll();const tRows=[];let tj=i;while(tj<lines.length){const tl=lines[tj].trim();if(tl.indexOf("|")===-1){if(tl===""||/^ {0,3}(?:#{1,6}\s|>|[*`~]|\[|-{3,}|_{3,}|\*{3,})/.test(tl))break}let row=tl;if(row.charAt(0)==="|")row=row.slice(1);if(row.charAt(row.length-1)==="|")row=row.slice(0,-1);tRows.push(row);tj++}if(tRows.length>=2){const __tbl=buildTable(tRows,ctx);__tbl.caption=__cap.replace(/\s*\{sort\}\s*$/i,"");__tbl.sortable=/\{sort\}/i.test(__cap);nodes.push(__tbl)}i=tj;continue}m=line.match(/^( {0,3})([-*+]|\d{1,9}[.)]|(?=[ivxlcdm])m{0,4}(?:cm|cd|d?c{0,3})(?:xc|xl|l?x{0,3})(?:ix|iv|v?i{0,3})[.)])(?:[ \t]+(.*)|[ \t]*$)/i);if(m){if(para.length&&/^\d{1,9}[.)]$/.test(m[2])&&parseInt(m[2],10)!==1){para.push(line);i++;continue}if(!m[3]&&para.length){para.push(line);i++;continue}flushPara();const lIndent=m[1].length;const marker=m[2];let lContent=m[3]||"";const __spm=line.slice(m[1].length+marker.length).match(/^[ \t]*/);const __sp=__spm?__spm[0].length:0;const __mw=marker.length+(m[3]===undefined||m[3]===""?1:__sp>4?1:__sp||1);if(__sp>4)lContent=new Array(__sp).join(" ")+lContent;const taskMatch=ctx.config.tasklist?lContent.match(/^\[([ xX])\]\s+(.*)/):null;const checked=taskMatch?taskMatch[1].toLowerCase()==="x":null;const itemText=taskMatch?taskMatch[2]:lContent;const __mb=marker.replace(/[.)]$/,"");const roman=/^(?=[ivxlcdm])m{0,4}(?:cm|cd|d?c{0,3})(?:xc|xl|l?x{0,3})(?:ix|iv|v?i{0,3})$/i.test(__mb)?__mb===__mb.toUpperCase()?"I":"i":"";const ordered=roman?true:/^\d+[.)]$/.test(marker);const mtype=roman||(ordered?marker.charAt(marker.length-1):marker);const contentCol=lIndent+__mw;const subLines=[];let jj=i+1;while(jj<lines.length){const nl=lines[jj];const nm=nl.match(/^(\s*)/);const nIndent=nm?nm[1].length:0;if(nl.trim()===""){if(itemText.replace(/\s/g,"")==="")break;let __kk=jj;while(__kk<lines.length&&lines[__kk].trim()==="")__kk++;if(__kk<lines.length){const afm=lines[__kk].match(/^(\s*)/);const afIndent=afm?afm[1].length:0;if(afIndent>=lIndent+__mw){while(jj<__kk){subLines.push("");jj++}continue}}break}if(/^ {0,3}(?:[-*+]|\d{1,9}[.)])[ \t]*$/.test(nl))break;if(nIndent>=lIndent+__mw){var __sl=nl.slice(lIndent+__mw);if(__cmRefContLine(subLines.length?subLines[subLines.length-1]:itemText,__sl))__sl=nl;subLines.push(__sl);jj++;continue}if(ctx.config.lazycontinuation&&itemText.replace(/\s/g,"")!==""&&!__cmLazyBlockStart(nl,ctx.config.gfm)&&!__cmLazyLeafStart(subLines.length?subLines[subLines.length-1]:itemText)){var __lzn=nl.trim();if(__cmHasHardBreak(nl))__lzn=__lzn.replace(/\\$/,"")+(/(?: {2,})$/.test(nl)?"\uE010":"\uE011");if(/^(?:[-*+]|\d+[.)])\s/.test(__lzn))__lzn="\\"+__lzn;if(__cmRefContLine(subLines.length?subLines[subLines.length-1]:itemText,__lzn))__lzn=nl;if(/^ {0,3}(=+|-+)[ \t]*$/.test(__lzn))__lzn=""+__lzn;subLines.push(__lzn);jj++;continue}break}let item;if(subLines.length===0){const __subAst=parseBlocks(itemText,ctx);if(__subAst.children.length===1&&__subAst.children[0].type==="paragraph"){item={type:"listItem",checked:checked,inline:__subAst.children[0].children,list:null}}else{item={type:"listItem",checked:checked,children:__subAst.children,list:null}}}else{for(var __hi=0;__hi<subLines.length;__hi++){var __last=__hi===subLines.length-1;var __nextBlk=!__last&&(/^\s*$/.test(subLines[__hi+1])||/^ {0,3}(?:#{1,6}\s|`{3,}|~{3,}|[-*+]\s|\d{1,9}[.)]\s|>|\[(?:\\.|[^\[\]\\])+\]:)/.test(subLines[__hi+1]));subLines[__hi]=subLines[__hi].replace(/\uE011/g,(__last||__nextBlk)?"\\":"\uE010");if(__last||__nextBlk)subLines[__hi]=subLines[__hi].replace(/\uE010$/,"")}const subAst=parseBlocks(itemText+"\n"+subLines.join("\n"),ctx);item={type:"listItem",checked:checked,children:subAst.children,list:null};if(__cmSubLoose(subLines,itemText))item.__looseSelf=true}if(!listStack.length){const rootList={type:"list",ordered:ordered,mtype:mtype,start:roman?null:ordered?parseInt(marker,10):null,roman:roman,task:checked!==null,items:[item]};listStack.push({node:rootList,contentCol:contentCol,listIndent:lIndent});nodes.push(rootList)}else{while(listStack.length>1&&lIndent<listStack[listStack.length-1].listIndent){listStack.pop()}const top=listStack[listStack.length-1];if(!top){const newList={type:"list",ordered:ordered,mtype:mtype,start:roman?null:ordered?parseInt(marker,10):null,roman:roman,task:checked!==null,items:[item]};listStack.push({node:newList,contentCol:contentCol,listIndent:lIndent});nodes.push(newList)}else if(lIndent>=top.contentCol){const newList={type:"list",ordered:ordered,mtype:mtype,start:roman?null:ordered?parseInt(marker,10):null,roman:roman,task:checked!==null,items:[item]};listStack.push({node:newList,contentCol:contentCol,listIndent:lIndent});const parentItem=top.node.items[top.node.items.length-1];if(parentItem)parentItem.list=newList;else nodes.push(newList)}else if(top.node.ordered!==ordered||top.node.mtype!==mtype){listStack.pop();var parent=listStack[listStack.length-1];var newList={type:"list",ordered:ordered,mtype:mtype,start:roman?null:ordered?parseInt(marker,10):null,roman:roman,task:checked!==null,items:[item]};listStack.push({node:newList,contentCol:contentCol,listIndent:lIndent});if(parent){var pItem=parent.node.items[parent.node.items.length-1];if(pItem)pItem.list=newList;else nodes.push(newList)}else{nodes.push(newList)}}else{top.node.items.push(item);top.contentCol=contentCol}}i=jj;continue}if(!listStack.length&&i+1<lines.length&&/^:\s+/.test(lines[i+1])&&ctx.config.deflist!==false&&line.trim()&&!/^[ \t]/.test(line)&&!/^::/.test(line)){endAll();const term=parseInline(line.trim(),ctx);const defs=[];i++;while(i<lines.length&&/^:\s+/.test(lines[i])){let __d=lines[i].replace(/^:\s+/,"");i++;while(i<lines.length&&/^( {2,}|\t)/.test(lines[i])&&!/^:\s+/.test(lines[i])){__d+="\n"+lines[i].replace(/^( {1,4}|\t)/,"");i++}defs.push(parseInline(__d.replace(/\n/g,"<br>"),ctx))}while(i<lines.length&&lines[i].trim()==="")i++;nodes.push({type:"definitionList",term:term,defs:defs});continue}if(listStack.length)endList();para.push(line);i++}endAll();return{type:"root",children:nodes}}finally{ctx.__blockDepth--}}function parseCalloutHeader(arg){const opts={title:"",icon:"",color:""};if(!arg)return opts;const prot=[];const s=String(arg).replace(/"([^"]*)"/g,(_,inner)=>{prot.push(inner);return"\0"+(prot.length-1)+"\0"});const toks=s.split(/\s+/).filter(Boolean);const titleToks=[];for(const t of toks){const pm=t.match(/^\u0000(\d+)\u0000$/);if(pm){titleToks.push(prot[parseInt(pm[1],10)]);continue}const im=t.match(/^icon=(\S+)$/);if(im){opts.icon=im[1];continue}const cm=t.match(/^color=(\S+)$/);if(cm){opts.color=cm[1];continue}titleToks.push(t)}opts.title=titleToks.join(" ").trim();return opts}function parseBgHeader(raw){const result={text:"",opacity:null,scale:null,blur:null,rotate:null,color:"",repeat:false};if(!raw)return result;const prot=[];const s=String(raw).replace(/"((?:\\.|[^"\\])*)"/g,(_,inner)=>{prot.push(inner.replace(/\\([\[\]\\])/g,"$1"));return"\0"+(prot.length-1)+"\0"});const toks=s.split(/\s+/).filter(Boolean);const PARAM_KEYS={opacity:1,scale:1,blur:1,rotate:1,color:1,repeat:1};const rest=[];let textFound=false;for(const t of toks){const pm=t.match(/^\u0000(\d+)\u0000$/);if(pm){if(!textFound){result.text=prot[parseInt(pm[1],10)];textFound=true}continue}const kv=t.match(/^([a-zA-Z]+)=(.*)$/);if(kv&&PARAM_KEYS[kv[1].toLowerCase()]){rest.push(t);continue}if(t.toLowerCase()==="repeat"&&!textFound){rest.push(t);continue}if(!textFound&&t.indexOf("=")===-1){result.text=t;textFound=true;continue}rest.push(t)}for(const r of rest){const m=r.match(/^([a-zA-Z]+)=(.*)$/);if(m){const k=m[1].toLowerCase(),v=m[2];if(k==="opacity"){const ov=parseFloat(v);if(isFinite(ov))result.opacity=Math.max(0,Math.min(1,ov))}else if(k==="scale"){const sv=parseFloat(v);if(isFinite(sv))result.scale=Math.max(.1,Math.min(20,sv))}else if(k==="blur"){const bv=parseFloat(v);if(isFinite(bv))result.blur=Math.max(0,Math.min(40,bv))}else if(k==="rotate"){const rv=parseFloat(v);if(isFinite(rv))result.rotate=Math.max(-360,Math.min(360,rv))}else if(k==="color"){const cv=resolveColor(v);if(cv)result.color=cv}}else if(r.toLowerCase()==="repeat"){result.repeat=true}}if(result.text.length>200)result.text=result.text.slice(0,200);return result}function __matchEnv(conds,ctx){const env=ctx.env||{};let any=false;for(const k in conds){any=true;const want=String(conds[k]).toLowerCase();if(k==="mode"){if(want==="ssr"&&!ctx.isSSR)return false;if(want==="client"&&ctx.isSSR)return false;if(want==="print"&&env.mode!=="print")return false;if(want==="screen"&&env.mode==="print")return false;continue}if(k==="lang"){const el=String(env.lang||ctx.langKey||"").toLowerCase();if(el!==want&&el.indexOf(want+"-")!==0)return false;continue}if(k==="role"){const roles=env.roles||(env.role?[env.role]:[]);let ok=false;for(let i=0;i<roles.length;i++){if(String(roles[i]).toLowerCase()===want){ok=true;break}}if(!ok)return false;continue}const ev=String(env[k]===undefined?"":env[k]).toLowerCase();if(ev!==want)return false}return any}function buildContainer(type,plus,title,raw,ctx,mod){if(type==="cfg"){const cMd=":::cfg"+(plus?"+":"")+(title?" "+title:"")+"\n"+raw+"\n:::";return{type:"cfg",config:parseCfg(raw),_md:cMd}}if(type==="when"||type==="if"){const __w=parseKV(title||"");const __wk=Object.keys(__w);if(!__wk.length){if(!ctx.__warnings)ctx.__warnings=[];ctx.__warnings.push({type:"when-empty"});return{type:"fragment",children:parseBlocks(raw,ctx).children}}if(__matchEnv(__w,ctx)){return{type:"fragment",children:parseBlocks(raw,ctx).children}}return{type:"fragment",children:[]}}if(type==="print"){if(__matchEnv({mode:"print"},ctx)){return{type:"fragment",children:parseBlocks(raw,ctx).children}}return{type:"fragment",children:[]}}if(type==="screen"){if(__matchEnv({mode:"screen"},ctx)){return{type:"fragment",children:parseBlocks(raw,ctx).children}}return{type:"fragment",children:[]}}if(type==="ssr"){if(__matchEnv({mode:"ssr"},ctx)){return{type:"fragment",children:parseBlocks(raw,ctx).children}}return{type:"fragment",children:[]}}if(type==="client"){if(__matchEnv({mode:"client"},ctx)){return{type:"fragment",children:parseBlocks(raw,ctx).children}}return{type:"fragment",children:[]}}if(type==="let"){if(!ctx.vars)ctx.vars=Object.create(null);const __seen=Object.create(null);raw.split("\n").forEach(l=>{l=l.trim();if(!l||l.charAt(0)==="#")return;const mm=l.match(/^([\w\u4e00-\u9fa5.$-]+)\s*[=:]\s*(.*)$/);if(mm){if(__seen[mm[1]]&&ctx.__warnings)ctx.__warnings.push({type:"let-override",key:mm[1]});__seen[mm[1]]=true;ctx.vars[mm[1]]=mm[2].trim()}});return{type:"fragment",children:[]}}if(type==="macro"){const __mk=parseKV(title||"");let __mname=__mk.name||"";if(!__mname){const __mtk=(title||"").trim();if(__mtk&&!/=/.test(__mtk))__mname=__mtk}if(!__mname)return{type:"fragment",children:[]};if(!ctx.macros)ctx.macros=Object.create(null);ctx.macros[__mname]={body:raw};return{type:"fragment",children:[]}}if(type==="use"){const __uk=parseKV(title||"");if(!(title||"").trim()&&raw){raw.split("\n").forEach(function(__ul){__ul=__ul.trim();const __um=__ul.match(/^([A-Za-z_][\w-]*)\s*[:=]\s*(.*)$/);if(__um)__uk[__um[1]]=__um[2].trim()})}let __uname=__uk.name||"";if(!__uname){const __utk=(title||"").trim();if(__utk&&!/=/.test(__utk))__uname=__utk}if(!__uname||!ctx.macros||!ctx.macros[__uname])return{type:"fragment",children:[]};if((ctx.__macroDepth||0)>=8){if(!ctx.__warnings)ctx.__warnings=[];ctx.__warnings.push({type:"macro-depth",name:__uname});return{type:"fragment",children:[]}}const __mp={};for(const __uk2 in __uk){if(__uk2!=="name"&&typeof __uk[__uk2]==="string")__mp[__uk2]=__uk[__uk2]}const __sv=ctx.vars,__sm=ctx.macros,__st=ctx.meta;ctx.vars=Object.assign({},__sv,__mp);ctx.macros=Object.assign(Object.create(null),__sm);ctx.meta=__st?Object.assign(Object.create(null),__st):null;ctx.__macroDepth=(ctx.__macroDepth||0)+1;const __useFrag={type:"fragment",children:parseBlocks(__sm[__uname].body,ctx).children};ctx.__macroDepth--;ctx.vars=__sv;ctx.macros=__sm;ctx.meta=__st;return __useFrag}if(type==="meta"){if(ctx.inContainer){if(!ctx.__warnings)ctx.__warnings=[];ctx.__warnings.push({type:"meta-in-container"});return{type:"fragment",children:[]}}if(!ctx.meta)ctx.meta=Object.create(null);if(!ctx.vars)ctx.vars=Object.create(null);raw.split("\n").forEach(l=>{l=l.trim();if(!l||l.charAt(0)==="#")return;let idx=l.indexOf(":");if(idx<0)idx=l.indexOf(":");if(idx<0)return;const k=l.slice(0,idx).trim();const v=l.slice(idx+1).trim();if(!k)return;ctx.meta[k]=v;ctx.vars["meta."+k]=v});return{type:"fragment",children:[]}}if(type==="fig"){if(!ctx.figIndex)ctx.figIndex=Object.create(null);ctx.figCount=(ctx.figCount||0)+1;const __fs=slugify(title||"fig-"+ctx.figCount);if(ctx.figIndex[__fs]===undefined)ctx.figIndex[__fs]=ctx.figCount;return{type:"figure",num:ctx.figCount,slug:__fs,title:title||"",children:parseBlocks(raw,ctx).children}}if(type==="tbl"){if(!ctx.tblIndex)ctx.tblIndex=Object.create(null);ctx.tblCount=(ctx.tblCount||0)+1;const __ts=slugify(title||"tbl-"+ctx.tblCount);if(ctx.tblIndex[__ts]===undefined)ctx.tblIndex[__ts]=ctx.tblCount;return{type:"tblBlock",num:ctx.tblCount,slug:__ts,title:title||"",children:parseBlocks(raw,ctx).children}}if(type==="eq"){if(!ctx.eqIndex)ctx.eqIndex=Object.create(null);ctx.eqCount=(ctx.eqCount||0)+1;const __ekey=String(ctx.eqCount);ctx.eqIndex[__ekey]=ctx.eqCount;return{type:"eqBlock",num:ctx.eqCount,key:__ekey,title:title||"",text:raw.trim()}}if(type==="dl"){const dlF={};let dlFn=title||"";const dlSums=[];const __SUMS={sha256:64,sha512:128,sha384:96,sha1:40,md5:32,crc32:8,xxh3:16,blake3:64,blake2b:128};raw.split("\n").forEach(l=>{const t=l.trim();if(!t)return;const idx=t.indexOf(":");if(idx>0){const k=t.slice(0,idx).trim().toLowerCase();const v=t.slice(idx+1).trim();if(!v)return;const __nk=k.replace(/[-_]/g,"");if(__SUMS[__nk]){dlSums.push({algo:__nk,expected:__SUMS[__nk],value:v})}else{dlF[k]=v}}else if(!dlFn){dlFn=t}});for(const __s of dlSums){const __hc=__s.value.replace(/[\s:-]/g,"").toLowerCase();if(!/^[0-9a-f]+$/.test(__hc)){if(!ctx.__warnings)ctx.__warnings=[];ctx.__warnings.push({type:"dl-hash-invalid",algo:__s.algo,value:__s.value.slice(0,16)})}else if(__hc.length!==__s.expected){if(!ctx.__warnings)ctx.__warnings=[];ctx.__warnings.push({type:"dl-hash-length",algo:__s.algo,expected:__s.expected,actual:__hc.length})}}return{type:"dl",filename:dlFn,url:dlF.url||"",size:dlF.size||"",date:dlF.date||"",verify:dlF.verify||"",icon:dlF.icon||"",checksums:dlSums}}if(type==="chartbar"){const __isStack=/^\s*stack=yes\b/i.test(title);const __cleanTitle=__isStack?title.replace(/^\s*stack=yes\s*/i,"").trim():title;if(__isStack){const cbStack=[];raw.split("\n").forEach(l=>{const t=l.trim();if(!t)return;const idx=t.indexOf(":");if(idx<0)return;const lbl=t.slice(0,idx).trim();const rest=t.slice(idx+1).trim();const segs=[];rest.split(/\s+/).forEach(function(p){const eq=p.indexOf("=");if(eq>0){const name=p.slice(0,eq).trim();const val=parseFloat(p.slice(eq+1));if(name&&isFinite(val)&&val>=0)segs.push({name:name,value:val})}});if(lbl&&segs.length)cbStack.push({label:lbl,segments:segs})});return{type:"chartbar",title:__cleanTitle,items:cbStack,stacked:true}}const cbItems=[];raw.split("\n").forEach(l=>{const t=l.trim();if(!t)return;const idx=t.indexOf(":");if(idx<0)return;const lbl=t.slice(0,idx).trim();const vStr=t.slice(idx+1).trim(),cleanStr=vStr.replace(/[元人民币美元欧元英镑日元港币块钱整钱$¥€£¥]/g,"").trim(),vm=cleanStr.match(/^([+-]?\d+(?:\.\d+)?(?:e[+-]?\d+)?)\s*(.*)$/i);if(lbl&&vm){const num=parseFloat(vm[1]),unit=(vm[2]||"").toLowerCase().trim();const U={"千":1e3,"万":1e4,"十万":1e5,"百万":1e6,"千万":1e7,"亿":1e8,"十亿":1e9,"百亿":1e10,"千亿":1e11,"万亿":1e12,"兆":1e12,"京":1e16,"垓":1e20,"秭":1e24,"穰":1e28,"沟":1e32,"涧":1e36,"正":1e40,"载":1e44,"极":1e48,"恒河沙":1e52,"阿僧祇":1e56,"那由他":1e60,"不可思议":1e64,"无量大数":1e68,"古戈尔":1e100,k:1e3,m:1e6,b:1e9,t:1e12,q:1e15,qi:1e18,s:1e21,sp:1e24,o:1e27,n:1e30,d:1e33,g:1e9,p:1e15,e:1e18,z:1e21,y:1e24};const m=U[unit]||1;cbItems.push({label:lbl,value:num*m,raw:vStr})}});return{type:"chartbar",title:title||"",items:cbItems}}if(type==="chartline"){const clLines=raw.split("\n");const clRows=[];let clLT=[];for(let cli=0;cli<clLines.length;cli++){const cl=clLines[cli].trim();if(!cl)continue;const lm=cl.match(/^lines\s*[::]\s*(.+)$/i);if(lm){clLT=lm[1].split(",").map(s=>s.trim().toLowerCase());continue}if(cl.indexOf("|")!==-1){let clean=cl;if(clean.charAt(0)==="|")clean=clean.slice(1);if(clean.charAt(clean.length-1)==="|")clean=clean.slice(0,-1);clRows.push(clean)}}if(clRows.length<2)return{type:"fragment",children:[]};const clHeaders=splitRow(clRows[0]);const clAlignCells=splitRow(clRows[1]);const clHasAlign=clAlignCells.every(c=>/^:?-+:?$/.test(c.c));const clStart=clHasAlign?2:1;const clLabels=[];const clSeries=[];for(let clci=0;clci<clHeaders.length-1;clci++)clSeries.push({name:clHeaders[clci+1].c,data:[]});for(let clri=clStart;clri<clRows.length;clri++){const cells=splitRow(clRows[clri]);if(!cells.length)continue;clLabels.push(cells[0].c||"");for(let clsi=0;clsi<clSeries.length;clsi++){clSeries[clsi].data.push(parseFloat(cells[clsi+1]?cells[clsi+1].c:"")||0)}}for(let clti=0;clti<clSeries.length;clti++){clSeries[clti].type=clLT[clti]==="dashed"?"dashed":"solid"}return{type:"chartline",title:title||"",labels:clLabels,series:clSeries}}if(type==="bg"){const bgCfg=parseBgHeader(title);return{type:"bg",text:bgCfg.text,opacity:bgCfg.opacity,scale:bgCfg.scale,blur:bgCfg.blur,rotate:bgCfg.rotate,color:bgCfg.color,repeat:bgCfg.repeat,children:parseBlocks(raw,ctx).children}}if(!ctx.config.containers){if(type==="collage"||ctx.config.stripcontainerchrome)return{type:"fragment",children:parseBlocks(raw,ctx).children};return{type:"fragment",children:[]}}if(type==="chat"&&!ctx.config.chat)return{type:"fragment",children:[]};if(type==="scr"&&!ctx.config.scr)return{type:"fragment",children:[]};if(CALLOUT_MAP[type]){const co=parseCalloutHeader(title);const __co_open=mod.indexOf("+")>=0?true:mod.indexOf("-")>=0?false:undefined;return{type:"callout",variant:type,title:co.title,icon:co.icon,color:co.color,children:parseBlocks(raw,ctx).children,open:__co_open}}if(type==="say"){return{type:"say",author:(title||"").trim(),children:parseBlocks(raw,ctx).children}}if(type==="swipe"){const imgs=[];for(const line of raw.split("\n")){const m=line.match(/!\[([^\]]*)\]\(([^)]+)\)/);if(m)imgs.push({alt:m[1],src:m[2]})}return{type:"swipe",imgs:imgs}}if(type==="detail"){return{type:"detail",open:plus,collapsed:mod.indexOf("-")>=0,hover:mod.indexOf("_")>=0,title:title||"",children:parseBlocks(raw,ctx).children}}if(type==="link"){const fields=Object.create(null);raw.split("\n").forEach(l=>{const idx=l.indexOf(":");if(idx>0){const k=l.slice(0,idx).trim().toLowerCase();const v=l.slice(idx+1).trim();if(k&&v)fields[k]=v}});if(!fields.url){return{type:"fragment",children:parseBlocks(raw,ctx).children}}return{type:"linkCard",big:title.toLowerCase()==="big",fields:fields}}if(type==="pbar"){const pf=Object.create(null);raw.split("\n").forEach(l=>{const idx=l.indexOf(":");if(idx>0){const k=l.slice(0,idx).trim().toLowerCase();const v=l.slice(idx+1).trim();if(k&&v)pf[k]=v}});if(pf.segments){const segs=[];pf.segments.split(",").forEach(function(s){const parts=s.trim().split("=");const pct=parseFloat(parts[0]);const rawC=(parts[1]||"").trim();const color=rawC?safeColor(rawC)||"#6b5acf":"#6b5acf";if(isFinite(pct)&&pct>0)segs.push({pct:pct,color:color})});if(!segs.length)return{type:"fragment",children:[]};let __tot=0;for(let __si=0;__si<segs.length;__si++)__tot+=segs[__si].pct;if(__tot>0){for(let __si2=0;__si2<segs.length;__si2++)segs[__si2].pct=segs[__si2].pct/__tot*100}return{type:"pbar",segments:segs,title:title}}const empty={type:"fragment",children:[]};if(pf.pct===undefined)return empty;const pct=Number(pf.pct);if(!isFinite(pct)||pct<0)return empty;let max=100,maxProvided=false;if(pf.max!==undefined){max=Number(pf.max);if(!isFinite(max)||max<0)return empty;maxProvided=true}if(max<=0)return empty;if(pct>max)return empty;let color=pf.color||"";if(color&&!/^(#[0-9a-fA-F]{3,8}|[a-zA-Z]{3,20})$/.test(color))color="";if(!color)color="#6b5acf";return{type:"pbar",pct:pct,max:max,maxProvided:maxProvided,color:color,showText:plus,title:title}}if(type==="tree"){return{type:"tree",data:parseTree(raw)}}if(type==="chat"){return parseChat(raw,ctx,title)}if(type==="users"){parseUserTable(raw.split("\n"),ctx.globalUsers);return{type:"fragment",children:[]}}if(type==="tabs"){const tabs=[];const tlines=raw.split("\n");let ti=0;while(ti<tlines.length){const tm=tlines[ti].match(/^:::tab[ \t]*(.*)$/);if(tm){const tTitle=tm[1].trim();const tRes=collectContainer(tlines,ti+1,"tab",true);tabs.push({title:tTitle,body:tRes.body});ti=tRes.next}else{ti++}}return{type:"tabs",tabs:tabs,plus:plus}}if(type==="timeline"){const globalColor=parseTimelineHeader(title);const items=[];const tls=raw.split("\n");for(let li=0;li<tls.length;li++){const rt=tls[li].trim();if(!rt)continue;const ps=rt.split("|").map(s=>s.trim());if(ps.length<2)continue;const date=ps[0],t=ps[1];let rest=ps.slice(2);let itemColor="";if(rest.length>=1){const last=rest[rest.length-1];const rc=resolveColor(last);if(rc){itemColor=rc;rest=rest.slice(0,-1)}}const desc=rest.join(" | ");items.push({date:date,title:t,desc:desc,color:itemColor})}return{type:"timeline",items:items,globalColor:globalColor,numbered:plus}}if(type==="grid"){const cols=title||"2";const cells=[];const glines=raw.split("\n");let gi=0;while(gi<glines.length){if(/^:::cell[ \t]*$/.test(glines[gi])){const cRes=collectContainer(glines,gi+1,"cell",true);cells.push(cRes.body);gi=cRes.next}else{gi++}}return{type:"grid",cols:cols,cells:cells}}if(type==="compare"){const panels=[];const plines=raw.split("\n");let pi=0;while(pi<plines.length){const pm=plines[pi].match(/^:::col(?:[ \t]+(.*))?$/);if(pm){const pc=parseCol(pm[1]||"");const pRes=collectContainer(plines,pi+1,"col",true);panels.push({title:pc.title,color:pc.color,body:pRes.body});pi=pRes.next}else{pi++}}return{type:"compare",panels:panels}}if(type==="mcq"){const mls=raw.split("\n");let mTitle="",mHint="",mOpen=null,mSel=[],mExpl="";const mOpts=[];const mExpls={specific:{},correct:"",wrong:"",fallback:""};const strip=s=>String(s).replace(/[.。.、))\]】]$/,"");for(const ml of mls){const mt=ml.trim();if(!mt)continue;let mm;mm=mt.match(/^\*\^\s*[::]\s*([\s\S]*)$/);if(mm){mExpls.correct=mm[1].trim();continue}mm=mt.match(/^-\^\s*[::]\s*([\s\S]*)$/);if(mm){mExpls.wrong=mm[1].trim();continue}mm=mt.match(/^\^([^\s::]+)\s*[::]\s*([\s\S]*)$/);if(mm){mExpls.specific[strip(mm[1])]=mm[2].trim();continue}mm=mt.match(/^\^\s*[::]\s*([\s\S]*)$/);if(mm){mExpl=mm[1].trim();continue}mm=mt.match(/^title\s*[::]\s*(.*)$/);if(mm){mTitle=mm[1].trim();continue}mm=mt.match(/^hint\s*[::]\s*([\s\S]*)$/);if(mm){mHint=mm[1].trim();continue}mm=mt.match(/^open\s*[::]?\s*(.*)$/);if(mm){const ov=mm[1].trim().toLowerCase();mOpen=ov===""||ov==="true"||ov==="yes"||ov==="1"||ov==="on";continue}mm=mt.match(/^sel\s*[::]\s*(.*)$/);if(mm){mSel=mm[1].trim().split(/[,\s,、]+/).map(strip).filter(Boolean);continue}mm=mt.match(/^([-*])\s+(.+)$/);if(mm){const cOK=mm[1]==="*";const cR=mm[2];const cSp=cR.indexOf(" ");let cM,cT;if(cSp>0){cM=cR.slice(0,cSp);cT=cR.slice(cSp+1).trim()}else{cM=cR;cT=""}cM=strip(cM);mOpts.push({marker:cM,text:cT,correct:cOK,expl:""})}}for(const mo of mOpts){if(mExpls.specific[mo.marker])mo.expl=mExpls.specific[mo.marker];else if(mo.correct&&mExpls.correct)mo.expl=mExpls.correct;else if(!mo.correct&&mExpls.wrong)mo.expl=mExpls.wrong;else if(mExpls.fallback)mo.expl=mExpls.fallback}const mCC=mOpts.filter(o=>o.correct).length;return{type:"mcq",title:mTitle,subtitle:title||"",options:mOpts,explanation:mExpl,hint:mHint,open:mOpen===null?!!plus:mOpen,sel:mSel,isMulti:mCC>1,display:plus}}if(type==="saq"){const sls=raw.split("\n");let sTitle="",sHint="",sAnswer="",sExplain="",sCur=null,sBuf=[];for(const st of sls){const sm=st.match(/^\s*(title|hint|answer|explain)\s*[::]\s*([\s\S]*)$/i);if(sm){if(sCur==="answer")sAnswer=sBuf.join("\n").trim();else if(sCur==="explain")sExplain=sBuf.join("\n").trim();sBuf=[];const sk=sm[1].toLowerCase(),sv=sm[2];if(sk==="title"){sTitle=sv.trim();sCur=null}else if(sk==="hint"){sHint=sv.trim();sCur=null}else if(sk==="answer"){sCur="answer";sBuf=[sv]}else{sCur="explain";sBuf=[sv]}continue}if(sCur)sBuf.push(st)}if(sCur==="answer")sAnswer=sBuf.join("\n").trim();else if(sCur==="explain")sExplain=sBuf.join("\n").trim();return{type:"saq",title:sTitle,subtitle:(title||"").trim(),hint:sHint,answer:sAnswer,explain:sExplain}}if(type==="key"){return{type:"keyBlock",value:raw.replace(/\n+/g," ").trim()}}if(type==="copy"){return{type:"copyBlock",value:raw.replace(/^\n+|\n+$/g,"")}}if(type==="hei"){return{type:"hei",children:parseInline(raw.replace(/\n+/g," ").trim(),ctx)}}if(type==="center"||type==="right"){return{type:"alignBlock",align:type,children:parseBlocks(raw,ctx).children}}if(type==="style"){return{type:"styleBlock",attrs:parseKV(stripBraces(title)),children:parseBlocks(raw,ctx).children}}if(type==="btnimg"){return{type:"btnImgBlock",attrs:parseKV(stripBraces(title)),lines:raw.split("\n").map(s=>s.trim()).filter(Boolean)}}if(type==="game"){var gf={};raw.split("\n").forEach(function(l){var m=l.match(/^([a-zA-Z_]\w*)\s*:\s*(.*)$/);if(m)gf[m[1].toLowerCase()]=m[2].trim()});return{type:"game",title:title,fields:gf}}if(type==="row"){var rl=raw.split("\n"),lb="",rb="",cur=null,dp=0;for(var ri=0;ri<rl.length;ri++){var ln=rl[ri];if(/^:::left\s*$/.test(ln)){cur="left";dp=1;continue}if(/^:::right\s*$/.test(ln)){cur="right";dp=1;continue}if(dp>0&&/^:::[a-z]/.test(ln))dp++;else if(dp>0&&/^:::\s*$/.test(ln)){dp--;if(dp===0){cur=null;continue}}if(cur==="left")lb+=ln+"\n";else if(cur==="right")rb+=ln+"\n"}var rs="",rv=false;var sm=(title||"").match(/^(\d+):(\d+)(?:\s+(reverse|right))?$/);if(sm){rs=sm[1]+"-"+sm[2];if(sm[3]==="reverse"||sm[3]==="right")rv=true}return{type:"row",split:rs,reverse:rv,left:lb.trim(),right:rb.trim()}}if(type==="box"){var kv=parseKV(title);var bs=kv.square||title.trim().toLowerCase()==="square"?"square":kv.round||title.trim().toLowerCase()==="round"?"round":"";return{type:"box",shape:bs,tl:kv.tl||"",tr:kv.tr||"",bl:kv.bl||"",br:kv.br||"",children:parseBlocks(raw,ctx).children}}if(type==="blur"){return{type:"blurBlock",children:parseBlocks(raw,ctx).children}}if(type==="scr"){return{type:"scrBlock",params:title,children:parseBlocks(raw,ctx).children}}if(type==="ghr"){const lines=raw.split("\n").map(l=>l.trim()).filter(Boolean);if(!lines.length)return{type:"fragment",children:[]};const repo=lines[0];const footer=lines.slice(1).join(" ").trim();if(!/^[\w.-]+\/[\w.-]+$/.test(repo))return{type:"fragment",children:[]};return{type:"ghr",repo:repo,footer:footer}}if(type==="collage"){const imgs=[];const clines=raw.split("\n");for(let ci=0;ci<clines.length;ci++){const cm=clines[ci].match(/^!\[((?:\\.|[^\]\\])*)\]\(([^)]*?)(?:\s+"([^"]*)")?(?:\s+=\s*([^x\s)]*)(?:x([^\s)]+))?)?\)\s*$/);if(cm)imgs.push({alt:cm[1].replace(/\\(.)/g,"$1"),src:cm[2],title:cm[3]||"",width:cm[4]||"",height:cm[5]||""})}if(!imgs.length)return{type:"fragment",children:[]};const lay=imgs.length<=4?String(imgs.length):"multi";return{type:"collage",layout:lay,items:imgs}}var __nc=tryBuildNew(type,plus,title,raw,ctx);if(__nc)return __nc;return{type:"fragment",children:parseBlocks(raw,ctx).children}}function splitRow(row){return row.replace(/\\\|/g,"\0").split("|").map(c=>{c=c.replace(/\u0000/g,"|").trim();const span={colspan:1,rowspan:1};const m=c.match(/^(.*?)\s*\{((?:c=\d+|r=\d+)(?:,(?:c=\d+|r=\d+))*)\}\s*$/);if(m&&m[1].trim()!==""){const tokens=m[2].split(",");for(let i=0;i<tokens.length;i++){const tk=tokens[i].split("=");if(tk[0]==="c")span.colspan=Math.max(1,parseInt(tk[1],10)||1);else if(tk[0]==="r")span.rowspan=Math.max(1,parseInt(tk[1],10)||1)}return{c:m[1].trim(),span:span}}return{c:c,span:span}})}function __cmTableDelimOK(headerLine,delimLine){var hc=splitRow(String(headerLine).trim().replace(/^\|/,"").replace(/\|$/,"")).length;var dc=splitRow(String(delimLine).trim().replace(/^\|/,"").replace(/\|$/,"")).length;return hc===dc}function buildTable(rows,ctx){const headers=splitRow(rows[0]);const alignRow=splitRow(rows[1]);const hasAlign=alignRow.every(c=>/^:?-+:?$/.test(c.c));const dataStart=hasAlign?2:1;const aligns=hasAlign?alignRow.map(c=>/^:-+:$/.test(c.c)?"center":/^-+:$/.test(c.c)?"right":"left"):headers.map(()=>"left");while(aligns.length<headers.length)aligns.push("left");const headerCells=headers.map((c,idx)=>({align:aligns[idx],children:parseInline(c.c,ctx),colspan:c.span.colspan,rowspan:c.span.rowspan}));const bodyRows=[];for(let r=dataStart;r<rows.length;r++){const cells=splitRow(rows[r]);const row=[];for(let ci=0;ci<headers.length;ci++){const cc=cells[ci]||{c:"",span:{}};row.push({align:aligns[ci]||"left",children:parseInline(cc.c,ctx),colspan:cc.span.colspan,rowspan:cc.span.rowspan})}bodyRows.push(row)}return{type:"table",headers:headerCells,rows:bodyRows}}const CALLOUT_MAP={tip:{icon:"fa-lightbulb",cls:"md-callout-tip",label:"TIP"},hint:{icon:"fa-lightbulb",cls:"md-callout-tip",label:"HINT"},important:{icon:"fa-lightbulb",cls:"md-callout-tip",label:"IMPORTANT"},info:{icon:"fa-circle-info",cls:"md-callout-info",label:"INFO"},warn:{icon:"fa-triangle-exclamation",cls:"md-callout-warn",label:"WARNING"},warning:{icon:"fa-triangle-exclamation",cls:"md-callout-warn",label:"WARNING"},caution:{icon:"fa-triangle-exclamation",cls:"md-callout-warn",label:"CAUTION"},attention:{icon:"fa-triangle-exclamation",cls:"md-callout-warn",label:"ATTENTION"},danger:{icon:"fa-circle-exclamation",cls:"md-callout-danger",label:"DANGER"},error:{icon:"fa-circle-exclamation",cls:"md-callout-danger",label:"ERROR"},ask:{icon:"fa-circle-question",cls:"md-callout-ask",label:"QUESTION"},question:{icon:"fa-circle-question",cls:"md-callout-ask",label:"QUESTION"},help:{icon:"fa-circle-question",cls:"md-callout-ask",label:"HELP"},faq:{icon:"fa-circle-question",cls:"md-callout-ask",label:"FAQ"},ok:{icon:"fa-circle-check",cls:"md-callout-ok",label:"OK"},success:{icon:"fa-circle-check",cls:"md-callout-ok",label:"SUCCESS"},check:{icon:"fa-circle-check",cls:"md-callout-ok",label:"CHECK"},done:{icon:"fa-circle-check",cls:"md-callout-ok",label:"DONE"},note:{icon:"fa-pencil",cls:"md-callout-note",label:"NOTE"},abstract:{icon:"fa-clipboard-list",cls:"md-callout-abstract",label:"ABSTRACT"},summary:{icon:"fa-clipboard-list",cls:"md-callout-abstract",label:"SUMMARY"},tldr:{icon:"fa-clipboard-list",cls:"md-callout-abstract",label:"TL;DR"},todo:{icon:"fa-square-check",cls:"md-callout-todo",label:"TODO"},failure:{icon:"fa-xmark",cls:"md-callout-failure",label:"FAILURE"},fail:{icon:"fa-xmark",cls:"md-callout-failure",label:"FAIL"},missing:{icon:"fa-xmark",cls:"md-callout-failure",label:"MISSING"},bug:{icon:"fa-bug",cls:"md-callout-bug",label:"BUG"},example:{icon:"fa-list",cls:"md-callout-example",label:"EXAMPLE"},quote:{icon:"fa-quote-left",cls:"md-callout-quote",label:"QUOTE"},cite:{icon:"fa-quote-left",cls:"md-callout-quote",label:"CITE"}};const SYS_TYPES={default:{icon:"fa-circle-info",color:"#8a8ab5",effect:""},join:{icon:"fa-arrow-right-to-bracket",color:"#10b981",effect:""},leave:{icon:"fa-arrow-right-from-bracket",color:"#8a8ab5",effect:""},kick:{icon:"fa-user-xmark",color:"#e74c6f",effect:""},warn:{icon:"fa-triangle-exclamation",color:"#f59e0b",effect:""},poke:{icon:"fa-hand-point-right",color:"#ec4899",effect:"shake"},gift:{icon:"fa-gift",color:"#f59e0b",effect:""},ban:{icon:"fa-ban",color:"#e74c6f",effect:""},mute:{icon:"fa-microphone-slash",color:"#8a8ab5",effect:""},top:{icon:"fa-thumbtack",color:"#6b5acf",effect:""},music:{icon:"fa-music",color:"#8b5cf6",effect:""},like:{icon:"fa-heart",color:"#ec4899",effect:""},fire:{icon:"fa-fire",color:"#f59e0b",effect:""},time:{icon:"fa-clock",color:"#8a8ab5",effect:""},notify:{icon:"fa-bell",color:"#6b5acf",effect:""}};function imageStyle(node){let w=node.width||"",h=node.height||"";if(w&&!/^\d+(?:px|em|rem|%)?$/.test(w))w="";if(h&&!/^\d+(?:px|em|rem|%)?$/.test(h))h="";if(w&&/^\d+$/.test(w))w+="px";if(h&&/^\d+$/.test(h))h+="px";if(!w&&!h)return"";let s="";if(w&&h)s="width:"+w+"; height:"+h+";";else if(w)s="width:"+w+"; height:auto;";else s="height:"+h+"; width:auto;";s+=" max-width:100%;";return' style="'+s+'"'}function renderInlineText(text,ctx){return renderNodes(parseInline(text,ctx),ctx)}function renderChatParts(parts,ctx){let html="";for(const p of parts){if(p.type==="chatQuote"){html+=renderNode(p,ctx);continue}if(p.type==="text"){const lines=p.text.split("\n");for(const l of lines){if(l.trim()==="")continue;html+='<div class="chat-line">'+renderInlineText(l,ctx)+"</div>"}continue}if(p.type==="image"){if(p.kv.url)html+='<img class="chat-image" src="'+escapeHtml(__cmSafeImgSrc(p.kv.url))+'" alt="'+escapeHtml(p.kv.alt||"")+'" loading="lazy">';continue}if(p.type==="redpacket"){const rpBlessing=p.kv.blessing||__i18nT(ctx,"chat.rpDefault");const rpAmount=p.kv.amount||"";const rpWinners=p.kv.winners||"";const rpGiver=p.kv.giver||"";const rpClickable=rpWinners?" clickable":"";let rpAttrs=' data-blessing="'+escapeHtml(rpBlessing)+'"';if(rpAmount)rpAttrs+=' data-amount="'+escapeHtml(rpAmount)+'"';if(rpGiver)rpAttrs+=' data-giver="'+escapeHtml(rpGiver)+'"';if(rpWinners)rpAttrs+=' data-winners="'+escapeHtml(rpWinners)+'"';html+='<div class="chat-redpacket'+rpClickable+'"'+rpAttrs+'><div class="rp-icon"><i class="fas fa-envelope-open-text"></i></div><div class="rp-body"><div class="rp-blessing">'+escapeHtml(rpBlessing)+"</div></div></div>";continue}if(p.type==="transfer"){html+='<div class="chat-transfer"><div class="tf-icon"><i class="fas fa-yen-sign"></i></div><div class="tf-body"><div class="tf-amount">¥ '+escapeHtml(p.kv.amount||"0")+'</div><div class="tf-note">'+escapeHtml(p.kv.note||"")+"</div></div></div>";continue}if(p.type==="card"){const cname=p.kv.name||__i18nT(ctx,"chat.unknownName");const cav=p.kv.avatar||"";const cAvatar=cav?'<img class="card-avatar-img" src="'+escapeHtml(__cmSafeImgSrc(cav))+'" alt="">':'<span class="card-avatar-fallback" style="background:'+escapeHtml(autoColor(cname))+'">'+escapeHtml(cname.charAt(0))+"</span>";html+='<div class="chat-card"><div class="card-avatar">'+cAvatar+'</div><div class="card-body"><div class="card-name">'+escapeHtml(cname)+'</div><div class="card-desc">'+escapeHtml(p.kv.desc||"")+'</div></div><div class="card-tag"><i class="fas fa-address-card"></i> '+escapeHtml(__i18nT(ctx,"chat.card"))+"</div></div>";continue}}return html}function isBareChatParts(parts){if(!parts.length)return false;for(const p of parts){const t=p.type;if(t!=="image"&&t!=="redpacket"&&t!=="transfer"&&t!=="card")return false}return true}const DL_ICON_STYLE_RE=/(^|\s)(fa[srbdl]|fa-(solid|regular|brands|light|duotone|thin|sharp|kit))\b/i;function dlIconHtml(raw,fallback){const v=raw===null||raw===undefined?"":String(raw).trim();if(!v)return'<i class="fas '+fallback+'"></i>';const __iv=__cmSafeImgSrc(v);if(__iv&&(/^(?:https?:)?\/\//i.test(v)||/^data:image\//i.test(v)||/^\.{0,2}\//.test(v)||/^[\w.-]+\.(png|jpe?g|gif|svg|webp|ico|avif)$/i.test(v)))return'<img class="dl-icon-img" src="'+escapeHtml(__iv)+'" alt="">';if(/fa-/i.test(v)||/(^|\s)fa[srbdl]\b/i.test(v)){const cls=DL_ICON_STYLE_RE.test(v)?v:"fas "+v;return'<i class="'+escapeHtml(cls)+'"></i>'}if(/^[A-Za-z0-9_-]+$/.test(v))return'<i class="fas fa-'+escapeHtml(v)+'"></i>';return'<span class="dl-icon-emoji">'+escapeHtml(v)+"</span>"}const RENDERERS={root(node,ctx){return renderBlockChildren(node.children,ctx)},fragment(node,ctx){return renderBlockChildren(node.children,ctx)},dropcap(node){return'<span class="md-dropcap-letter">'+escapeHtml(node.char)+"</span>"},paragraph(node,ctx){var isDrop=!ctx.dropcapDone&&ctx.config.dropcap;var hasDrop=false;if(isDrop&&node.children&&node.children.length>0){var first=node.children[0];if(first.type==="text"&&first.value){var t=first.value.replace(/^\s+/,"");if(t){var m=t.match(/^[^,。、!?;:""''()《》【】·—…,.!?;:'"()\[\]{}<>\s]+/);if(m){var c=m[0].charAt(0);var idx=t.indexOf(c);first.value=t.slice(0,idx)+t.slice(idx+1);node.children.unshift({type:"dropcap",char:c});ctx.dropcapDone=true;hasDrop=true}}}}return"<p"+(hasDrop?' class="md-dropcap-para"':"")+">"+renderNodes(node.children,ctx)+"</p>\n"},blankLines(node){return'<div class="md-blank-line" style="height:'+(node.count*1.9).toFixed(2)+'em"></div>\n'},break(){return"<br>"},heading(node,ctx){const tag="h"+node.depth;const idAttr=(node.id&&ctx.config.headingid!==false)?' id="'+escapeHtml(node.id)+'"':"";const hdAttr=node.suffix?' data-hd="'+escapeHtml(node.suffix)+'"':"";const clsArr=node.cls?node.cls.slice():[];if(ctx.config.headingline)clsArr.push("md-heading-line");const clsAttr=clsArr.length?' class="'+escapeHtml(clsArr.join(" "))+'"':"";var __foldAttr=node.foldInit===true?' data-fold="1"':node.foldInit===false?' data-fold="0"':"";var __numHtml="";if(node.num){var __sfx=ctx.config.headnumsuffix!==undefined?ctx.config.headnumsuffix:" ";__numHtml='<span class="md-h-num">'+escapeHtml(node.num)+"</span>"+escapeHtml(__sfx)}var __out="<"+tag+idAttr+hdAttr+clsAttr+__foldAttr+">"+__numHtml+renderNodes(node.children,ctx)+"</"+tag+">\n";if(node.sub){__out+='<div class="md-h-sub">'+escapeHtml(node.sub)+"</div>\n"}return __out},toc(node,ctx){return renderToc(ctx.headings,ctx)},thematicBreak(){return"<hr />\n"},hrText(node,ctx){const a=node.attrs||{};const V={solid:1,dashed:1,dotted:1,double:1};let st="";if(V[a.l]||a.l==="none")st+="--l:"+a.l+";";if(V[a.lt]||a.lt==="none")st+="--lt:"+a.lt+";";if(V[a.lb]||a.lb==="none")st+="--lb:"+a.lb+";";if(V[a.r]||a.r==="none")st+="--r:"+a.r+";";if(V[a.rt]||a.rt==="none")st+="--rt:"+a.rt+";";if(V[a.rb]||a.rb==="none")st+="--rb:"+a.rb+";";if(a.l==="none"||a.t||a.b)st+="--hide-l:1;";if(a.r==="none"||a.t||a.b)st+="--hide-r:1;";let iSt="";let tb="";if(V[a.t])tb+="border-top:1px "+a.t+" currentColor;";if(V[a.b])tb+="border-bottom:1px "+a.b+" currentColor;";if(tb)iSt=' style="'+tb+'"';return'<div class="md-hr-text md-hr-'+node.style+'"'+(st?' style="'+st+'"':"")+'><span class="md-hr-text-inner"'+iSt+">"+renderNodes(parseInline(node.text,ctx),ctx)+"</span></div>\n"},blockquote(node,ctx){return"<blockquote>"+renderBlockChildren(node.children,ctx)+"</blockquote>\n"},htmlBlock(node,ctx){let r=node.raw;if(ctx&&ctx.config&&ctx.config.disallowedhtml)r=r.replace(/<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)\b/gi,(_,s1,t)=>"&lt;"+s1+t);return r},codeBlock(node,ctx){if(ctx.config&&ctx.config.codewidget===false)return'<pre><code'+(node.lang?' class="language-'+escapeHtml(node.lang)+'"':"")+">"+escapeHtmlStrict(node.code)+"\n"+"</code></pre>";if(node.lang==="mermaid"){if(ctx.config&&ctx.config.mermaid===false)return'<pre><code class="language-mermaid">'+escapeHtmlStrict(node.code)+"</code></pre>\n";return'<div class="mermaid" data-src="'+escapeHtmlStrict(node.code)+'">'+escapeHtmlStrict(node.code)+"</div>\n"}if(node.lang==="diff"){const cid="code-"+ctx.stamp+"-"+(ctx.codeIndex=(ctx.codeIndex||0)+1);let body="";const lines=node.code.split("\n");lines.forEach((line,j)=>{let cls="";if(line.charAt(0)==="+")cls=" md-diff-add";else if(line.charAt(0)==="-")cls=" md-diff-del";else if(line.slice(0,2)==="@@")cls=" md-diff-hunk";body+='<span class="code-line'+cls+'"><span class="line-number">'+(j+1)+'</span><span class="hljs">'+escapeHtmlStrict(line)+"</span></span>"});return'<div class="code-block-wrapper" id="cbw-'+cid+'" data-lang="diff"><div class="code-block-header"><span class="lang-label"><i class="fas fa-file-code"></i>DIFF</span><span class="code-stats"><span title="'+lines.length+" "+escapeHtml(__i18nT(ctx,"code.lines"))+'"><i class="fas fa-bars"></i>'+lines.length+'</span></span><span class="header-actions"><button class="copy-btn" data-copy="'+cid+'" title="'+escapeHtml(__i18nT(ctx,"code.copy"))+'"><i class="fas fa-copy"></i></button></span></div><div class="code-block-body-wrapper"><div class="code-block-body" id="code-body-'+cid+'">'+body+"</div></div></div>\n"}var hlAttr="";if(node.meta){var hm=node.meta.match(/(?:^|\s)hl=([\d,\-\s]+?)(?=\s+[a-z]+=|$|\})/)||node.meta.match(/(?:^|\s)hl=([^\s}]+)/)||node.meta.match(/\{([\d,\-]+)\}/);if(hm)hlAttr=' data-hl-lines="'+escapeHtml(hm[1].replace(/\s/g,""))+'"'}var __mk=Object.assign({},node.marks||{});if(!node.marks){if(!hlAttr)return"<pre"+(node.meta?' data-meta="'+escapeHtml(node.meta)+'"':"")+'><code class="language-'+escapeHtml(node.lang||"text")+'">'+escapeHtmlStrict(node.code)+"</code></pre>\n";var __hmap={};hm[1].replace(/\s/g,"").split(",").forEach(function(__hx){var __hr=__hx.match(/^(\d+)(?:-(\d+))?$/);if(!__hr)return;var __ha=parseInt(__hr[1],10),__hb=__hr[2]?parseInt(__hr[2],10):__ha;if(__hb<__ha)return;for(var __hq=__ha;__hq<=__hb&&__hq-__ha<5e3;__hq++)__hmap[__hq]={type:"_codeMark",mark:"highlight"}});Object.assign(__mk,__hmap)}var __words=[];for(var __wk in __mk){var __wv=__mk[__wk];if(__wv&&__wv.type&&__wv.type.indexOf("word:")===0){var __w=__wv.type.slice(5);if(__w&&__words.indexOf(__w)===-1)__words.push(__w)}}var __wpat=null;if(__words.length){__wpat=new RegExp("("+__words.map(function(x){return escapeHtml(x).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}).join("|")+")","g")}var __body="";var __lines=node.code.split("\n");for(var __i=0;__i<__lines.length;__i++){var __m=__mk[__i+1],__extra="";if(__m){var __t=__m.type==="_codeMark"?__m.mark:__m.type;if(__t==="highlight")__extra=' data-hl="1"';else if(__t.indexOf("highlight:")===0){__extra=' data-hl="1"';var __n=parseInt(__t.split(":")[1],10)||0;for(var __h=1;__h<=__n;__h++){__mk[__i+1+__h]={type:"_codeMark",mark:"highlight"}}}else if(__t==="focus")__extra=' data-focus="1"';else if(__t.indexOf("focus:")===0){__extra=' data-focus="1"';var __fn=parseInt(__t.split(":")[1],10)||0;for(var __f=1;__f<=__fn;__f++){__mk[__i+1+__f]={type:"_codeMark",mark:"focus"}}}else if(__t==="++")__extra=' data-diff="add"';else if(__t==="--")__extra=' data-diff="del"';else if(__t==="error")__extra=' data-status="error"';else if(__t==="warning")__extra=' data-status="warning"';else if(__t.indexOf("word:")===0)__extra=' data-word="'+escapeHtml(__t.slice(5))+'"'}var __escLine=escapeHtmlStrict(__lines[__i]);if(__wpat){__wpat.lastIndex=0;__escLine=__escLine.replace(__wpat,function(m){return'<span class="code-word">'+m+"</span>"})}__body+='<span class="code-line"'+__extra+'><span class="line-number">'+(__i+1)+'</span><span class="hljs">'+__escLine+"</span></span>"}var __cid="code-"+ctx.stamp+"-"+(ctx.codeIndex=(ctx.codeIndex||0)+1);var __lk=String(node.lang||"").toLowerCase().trim();var __meta=__langMeta(__lk)||{icon:"",name:__lk.toUpperCase()};return'<div class="code-block-wrapper" id="cbw-'+__cid+'" data-lang="'+escapeHtml(node.lang||"")+'"><div class="code-block-header"><span class="lang-label">'+(__meta.icon?'<i class="'+__meta.icon+'"></i>':"")+escapeHtml(__meta.name)+'</span><span class="header-actions"><button class="copy-btn" data-copy="'+__cid+'" title="'+escapeHtml(__i18nT(ctx,"code.copy"))+'"><i class="fas fa-copy"></i></button></span></div><div class="code-block-body-wrapper"><div class="code-block-body" id="code-body-'+__cid+'">'+__body+"</div></div></div>\n"},list(node,ctx){const tag=node.ordered?"ol":"ul";const cls=node.task&&ctx.config.taskwidget!==false?' class="task-list"':"";const start=node.ordered&&node.start!==null&&node.start!==1?' start="'+node.start+'"':"";const typeAttr=node.roman?' type="'+node.roman+'"':"";const __loose=!!node.loose||__listLoose(node);const items=[];for(let i=0;i<node.items.length;i++){node.items[i].__loose=__loose;items.push(renderNode(node.items[i],ctx))}return"<"+tag+cls+start+typeAttr+">\n"+items.join("\n")+"\n</"+tag+">\n"},listItem(node,ctx){const __tw=ctx.config.taskwidget===false;const attr=node.checked!==null&&!__tw?' data-checked="'+(node.checked?"true":"false")+'"':"";let html="<li"+attr+">"+(node.checked!==null&&__tw?'<input'+(node.checked?' checked=""':"")+' disabled="" type="checkbox"> ':"");const __loose=node.__loose;let __body="";let __lists="";if(node.children&&node.children.length){const __parts=[];for(let __i=0;__i<node.children.length;__i++){const __ch=node.children[__i];if(!__loose&&__ch.type==="paragraph"){__parts.push(renderNodes(__ch.children,ctx))}else{__parts.push(renderNode(__ch,ctx))}}__body=__parts.join("\n")}else if(node.inline){if(__loose){__body="<p>"+renderNodes(node.inline,ctx)+"</p>"}else{__body=renderNodes(node.inline,ctx)}}if(__body&&node.checked===true&&!__tw)__body='<span class="md-task-text">'+__body+"</span>";html+=__body;if(__lists)html+="\n"+__lists;if(node.list)html+="\n"+renderNode(node.list,ctx);html+="</li>";return html},table(node,ctx){let __tp=ctx.config.tablewidget===false;let html="<table"+(node.sortable?' data-sortable="1"':"")+">"+(node.caption?"<caption>"+renderNodes(parseInline(node.caption,ctx),ctx)+"</caption>":"")+"<thead><tr>";for(let i=0;i<node.headers.length;i++){const hc=node.headers[i];const hsa=(hc.colspan>1?' colspan="'+hc.colspan+'"':"")+(hc.rowspan>1?' rowspan="'+hc.rowspan+'"':"");html+=(__tp?'<th'+(hc.align&&hc.align!=="left"?' align="'+hc.align+'"':""):'<th style="text-align:'+hc.align+';"')+hsa+">"+renderNodes(hc.children,ctx)+"</th>"}html+="</tr></thead>";if(node.rows.length)html+="<tbody>";for(let r=0;r<node.rows.length;r++){html+="<tr>";for(let c=0;c<node.rows[r].length;c++){const cc=node.rows[r][c];const csa=(cc.colspan>1?' colspan="'+cc.colspan+'"':"")+(cc.rowspan>1?' rowspan="'+cc.rowspan+'"':"");html+=(__tp?'<td'+(cc.align&&cc.align!=="left"?' align="'+cc.align+'"':""):'<td style="text-align:'+cc.align+';"')+csa+">"+renderNodes(cc.children,ctx)+"</td>"}html+="</tr>"}if(node.rows.length)html+="</tbody>";html+="</table>\n";return html},definitionList(node,ctx){let html="<dl><dt>"+renderNodes(node.term,ctx)+"</dt>";for(let i=0;i<node.defs.length;i++){html+="<dd>"+renderNodes(node.defs[i],ctx)+"</dd>"}html+="</dl>\n";return html},callout(node,ctx){const cfg=CALLOUT_MAP[node.variant]||CALLOUT_MAP.info;const title=node.title||cfg.label;const icon=node.icon||cfg.icon;const color=node.color?resolveColor(node.color):null;let sty="",hsty="";if(color){sty=' style="border-color:'+color+";background:"+hexToRgba(color,.08)+'"';hsty=' style="color:'+color+'"'}const __bodyHtml=renderBlockChildren(node.children,ctx);const __dataAttr=' data-callout="'+escapeHtml(node.variant)+'"';if(node.open===true||node.open===false){const __openAttr=node.open?" open":"";return'<details class="md-callout '+cfg.cls+'"'+sty+__dataAttr+__openAttr+'><summary class="md-callout-head"'+hsty+'><i class="fas '+icon+'"></i>'+escapeHtml(title)+'<i class="fas fa-chevron-right callout-caret"></i></summary><div class="md-callout-body">'+__bodyHtml+"</div></details>"}return'<div class="md-callout '+cfg.cls+'"'+sty+__dataAttr+'><div class="md-callout-head"'+hsty+'><i class="fas '+icon+'"></i>'+escapeHtml(title)+'</div><div class="md-callout-body">'+__bodyHtml+"</div></div>"},bg(node,ctx){const v=[];if(node.opacity!==null)v.push("--bg-op:"+node.opacity);if(node.scale!==null)v.push("--bg-scale:"+node.scale);if(node.blur!==null)v.push("--bg-blur:"+node.blur+"px");if(node.rotate!==null)v.push("--bg-rot:"+node.rotate+"deg");if(node.color)v.push("--bg-c:"+node.color);const bgStyle=v.length?' style="'+v.join(";")+'"':"";const dataAttr=node.text?' data-bg="'+escapeHtml(node.text)+'"':"";const layer=node.text?'<div class="md-bg-layer" aria-hidden="true"><span class="md-bg-text">'+escapeHtml(node.text)+"</span></div>":"";const content='<div class="md-bg-content">'+renderNodes(node.children,ctx)+"</div>";return'<div class="md-bg"'+bgStyle+dataAttr+">"+layer+content+"</div>\n"},say(node,ctx){const author=node.author||"";return'<div class="md-say"><div class="md-say-text">'+renderNodes(node.children,ctx)+"</div>"+(author?'<div class="md-say-author">'+renderNodes(parseInline(author,ctx),ctx)+"</div>":"")+"</div>\n"},swipe(node){const imgs=node.imgs||[];if(!imgs.length)return"";const N=imgs.length;let cards="",dots="";for(let i=0;i<N;i++){cards+='<div class="swipe-card" data-i="'+i+'"><img src="'+escapeHtml(__cmSafeImgSrc(imgs[i].src))+'" alt="'+escapeHtml(imgs[i].alt)+'" loading="lazy" draggable="false"></div>';dots+='<span class="swipe-dot" data-idx="'+i+'"><i></i></span>'}const badge=N>1?'<span class="swipe-badge">1/'+N+"</span>":"";return'<div class="md-swipe" data-total="'+N+'"><div class="swipe-stage">'+cards+badge+'</div><div class="swipe-dots" data-total="'+N+'">'+dots+"</div></div>\n"},alt(node){const opts=node.options.map(s=>escapeHtml(s)).join("|");return'<span class="md-alt" data-options="'+opts+'"><span class="md-alt-text">'+escapeHtml(node.options[0])+'</span><svg class="md-alt-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"/><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"/></svg></span>'},ref(node){return'<span class="md-ref" data-ref-target="'+escapeHtml(node.target)+'">'+escapeHtml(node.target)+"</span>"},wikiLink(node,ctx){const slug=slugify(node.target);return'<a class="md-ref md-wikilink" href="#'+escapeHtml(slug)+'" data-ref-target="'+escapeHtml(node.target)+'">'+renderInlineText(node.label,ctx)+"</a>"},dot(node,ctx){const sh=node.shape||"'•'";let c="";if(node.color){const r=resolveColor(node.color);if(r)c=r;else if(/^[a-zA-Z]+$/.test(node.color))c=escapeHtml(node.color)}let st="--dot-shape:"+sh+";";if(c)st+="--dot-color:"+c+";";return'<span class="md-dot" style="'+st+'">'+renderNodes(node.children,ctx)+"</span>"},pn(node,ctx){return'<span class="md-pn">'+(node.children?renderNodes(node.children,ctx):escapeHtml(node.text))+"</span>"},upper(node,ctx){return'<span class="md-upper">'+(node.children?renderNodes(node.children,ctx):escapeHtml(node.text.toUpperCase()))+"</span>"},lower(node,ctx){return'<span class="md-lower">'+(node.children?renderNodes(node.children,ctx):escapeHtml(node.text.toLowerCase()))+"</span>"},cap(node,ctx){if(node.children)return'<span class="md-cap">'+renderNodes(node.children,ctx)+"</span>";const t=node.text;return'<span class="md-cap">'+escapeHtml(t.charAt(0).toUpperCase()+t.slice(1))+"</span>"},note(node){const tip=node.tip?' data-tip="'+escapeHtml(node.tip)+'"':"";return'<span class="md-note"'+tip+">"+escapeHtml(node.label)+"</span>"},cmd(node,ctx){return'<span class="md-cmd"><i class="fas fa-terminal"></i>'+(node.children?renderNodes(node.children,ctx):escapeHtml(node.text))+"</span>"},flag(node,ctx){return'<span class="md-flag"><i class="fas fa-flag"></i>'+(node.children?renderNodes(node.children,ctx):escapeHtml(node.text))+"</span>"},"md-u"(node,ctx){return'<span class="md-u">'+renderNodes(node.children,ctx)+"</span>"},"md-ins"(node,ctx){return'<ins class="md-ins">'+renderNodes(node.children,ctx)+"</ins>"},term(node){return'<span class="md-term" data-tip="'+escapeHtml(node.tip)+'">'+escapeHtml(node.label)+'<i class="fa-regular fa-circle-question md-term-icon"></i></span>'},abbr(node){return'<span class="md-term" data-tip="'+escapeHtml(node.title)+'">'+escapeHtml(node.text)+"</span>"},ruby(node){const st=node.pos==="under"?' style="ruby-position:under"':"";if(node.parts){let s="";for(const p of node.parts){if(p.punct)s+=escapeHtml(p.punct);else s+="<ruby"+st+">"+escapeHtml(p.base)+"<rt>"+escapeHtml(p.rt)+"</rt></ruby>"}return s}return"<ruby"+st+">"+escapeHtml(node.base)+"<rt>"+escapeHtml(node.rt)+"</rt></ruby>"},qr(node){return'<span class="md-qr"><img src="https://api.qrserver.com/v1/create-qr-code/?size=168x168&margin=0&data='+encodeURIComponent(node.url)+'" alt="QR"></span>'},date(node,ctx){const p=parseDateStr(node.raw);if(p.ts===null)return'<span class="md-date">'+escapeHtml(p.text)+"</span>";let txt;if(node.before!==undefined||node.after!==undefined){const now=Date.now();txt=now<p.ts?node.before||relTime(p.ts,node.raw,ctx.langKey||"zh-CN"):node.after||relTime(p.ts,node.raw,ctx.langKey||"zh-CN")}else{const fixed=node.fixed||"";txt=fixed||relTime(p.ts,node.raw,ctx.langKey||"zh-CN")}const fx=node.fixed?' data-fixed="true"':"";return'<span class="md-date" data-ts="'+p.ts+'" data-raw="'+escapeHtml(node.raw)+'" data-tip="'+escapeHtml(p.text)+'" data-lang="'+escapeHtml(ctx.langKey||"zh-CN")+'"'+fx+">"+escapeHtml(txt)+'<i class="fa-regular fa-clock md-date-icon"></i></span>'},detail(node,ctx){return'<details class="md-detail'+(node.hover?" md-detail-hover":"")+'"'+(node.open?" open":"")+(node.collapsed?' data-collapsed="true"':"")+(node.hover?' data-hover="1"':"")+'><summary><i class="fas fa-chevron-right"></i>'+renderNodes(parseInline(node.title,ctx),ctx)+'</summary><div class="md-detail-body">'+renderNodes(node.children,ctx)+"</div></details>\n"},linkCard(node){const f=node.fields;const __u=__cmSafeHrefAttr(f.url);const url=__u?escapeHtml(__u):"";const tag=__u?"a":"div";const href=__u?' href="'+url+'" target="_blank" rel="noopener"':"";const website=f.website||"";const content=f.content||"";const author=f.author||"";const img=__cmSafeImgSrc(f.img||"");if(node.big){return"<"+tag+' class="md-link big"'+href+">"+(img?'<img class="md-link-cover" src="'+escapeHtml(img)+'" alt="" loading="lazy">':"")+'<div class="md-link-inner">'+(website?'<div class="md-link-website">'+escapeHtml(website)+"</div>":"")+(content?'<div class="md-link-content">'+escapeHtml(content)+"</div>":"")+(author?'<div class="md-link-author"><i class="fas fa-user"></i>'+escapeHtml(author)+"</div>":"")+"</div></"+tag+">\n"}return"<"+tag+' class="md-link"'+href+">"+(img?'<img class="md-link-thumb" src="'+escapeHtml(img)+'" alt="" loading="lazy">':"")+'<div class="md-link-body">'+(website?'<div class="md-link-website">'+escapeHtml(website)+"</div>":"")+'<div class="md-link-content">'+escapeHtml(content||f.url)+"</div>"+(author?'<div class="md-link-author"><i class="fas fa-user"></i>'+escapeHtml(author)+"</div>":"")+"</div></"+tag+">\n"},pbar(node,ctx){if(node.segments){const __tH=node.title?'<div class="md-pbar-title">'+renderNodes(parseInline(node.title,ctx),ctx)+"</div>":"";let __sH="";for(let __si=0;__si<node.segments.length;__si++){const __sg=node.segments[__si];__sH+='<div class="md-pbar-seg" style="width:'+__sg.pct+"%;background:"+escapeHtml(__sg.color)+'"></div>'}return'<div class="md-pbar">'+__tH+'<div class="md-pbar-track md-pbar-stacked">'+__sH+"</div></div>"}const pct=node.pct,max=node.max;const ratio=max>0?pct/max*100:0;const width=Math.max(0,Math.min(100,ratio));const color=node.color||"#6b5acf";const titleHtml=node.title?'<div class="md-pbar-title">'+renderNodes(parseInline(node.title,ctx),ctx)+"</div>":"";let textHtml="";if(node.showText){const ratioStr=ratio.toFixed(1).replace(/\.0$/,"");let label;if(node.maxProvided){const pctStr=String(pct).replace(/\.0+$/,"");const maxStr=String(max).replace(/\.0+$/,"");label=pctStr+"/"+maxStr+"("+ratioStr+"%)"}else{label=ratioStr+"%"}textHtml='<div class="md-pbar-text">'+escapeHtml(label)+"</div>"}return'<div class="md-pbar">'+titleHtml+'<div class="md-pbar-track"><div class="md-pbar-fill" style="width:'+width+"%;background:"+escapeHtml(color)+'"></div></div>'+textHtml+"</div>\n"},tree(node,ctx){return renderTree(node.data)},badge(node,ctx){const attrs=node.attrs||{};const dis=attrs.dis===true;const outline=attrs.style==="outline";const cls="md-badge"+(outline?" md-badge-outline":"")+(dis?" md-dis":"");let st=outline?"color:"+escapeHtml(node.color)+";border-color:"+escapeHtml(node.color)+";":"background:"+escapeHtml(node.color)+";color:#fff;";const sz=safeSize(attrs.size);if(sz)st+="font-size:"+sz+";";let inner=renderNodes(parseInline(node.label,ctx),ctx);const url=attrs.url||node.url;const hasLink=url&&isSafeHref(url);if(hasLink)inner+='<i class="fas fa-arrow-up-right-from-square md-ext-icon"></i>';if(dis)return'<span class="'+cls+'" style="'+st+'" aria-disabled="true">'+inner+"</span>";if(hasLink)return'<a class="'+cls+'" href="'+escapeHtml(url)+'" target="_blank" rel="noopener" style="'+st+'">'+inner+"</a>";return'<span class="'+cls+'" style="'+st+'">'+inner+"</span>"},colorSpan(node,ctx){return'<span class="md-color" style="color:'+escapeHtml(node.color)+'">'+renderNodes(node.children,ctx)+"</span>"},tabs(node,ctx){let isJelly=!!node.plus;let cls="md-tabs"+(isJelly?" jelly-tabs":"");let navHtml="",panelHtml="";for(let t=0;t<node.tabs.length;t++){let title=escapeHtml(node.tabs[t].title||"");let innerHtml=isJelly?'<span class="t-normal">'+title+'</span><span class="t-bold">'+title+"</span>":title;navHtml+='<button class="'+(t===0?"active":"")+'" data-tab="'+t+'">'+innerHtml+"</button>";panelHtml+='<div class="md-tabs-panel'+(t===0?" active":"")+'" data-panel="'+t+'">'+renderNodes(parseBlocks(node.tabs[t].body,ctx).children,ctx)+"</div>"}let indicator=isJelly?'<span class="md-tabs-indicator"></span>':"";return'<div class="'+cls+'"><div class="md-tabs-nav">'+navHtml+indicator+"</div>"+panelHtml+"</div>"},timeline(node,ctx){let out='<div class="md-timeline'+(node.numbered?" numbered":"")+'">';for(let k=0;k<node.items.length;k++){const it=node.items[k];let dotColor;if(it.color)dotColor=it.color;else if(node.globalColor==="rainbow")dotColor=RAINBOW[k%RAINBOW.length];else if(node.globalColor)dotColor=node.globalColor;else dotColor="#6b5acf";const segColor=dotColor;const halo=hexToRgba(dotColor,.18);out+='<div class="md-timeline-item" style="--dot-c:'+escapeHtml(dotColor)+";--dot-halo:"+halo+";--line-c-seg:"+escapeHtml(segColor)+'">'+'<div class="md-timeline-date">'+renderInlineText(it.date,ctx)+"</div>"+'<div class="md-timeline-title">'+renderInlineText(it.title,ctx)+"</div>"+(it.desc?'<div class="md-timeline-desc">'+renderInlineText(it.desc,ctx)+"</div>":"")+"</div>"}return out+"</div>"},grid(node,ctx){let out='<div class="md-grid" data-cols="'+escapeHtml(node.cols)+'">';for(let c=0;c<node.cells.length;c++){out+='<div class="md-grid-cell">'+renderNodes(parseBlocks(node.cells[c],ctx).children,ctx)+"</div>"}return out+"</div>"},compare(node,ctx){let out='<div class="md-compare">';for(let p=0;p<node.panels.length;p++){const panel=node.panels[p];const style=panel.color?' style="background:'+hexToRgba(panel.color,.06)+";--c:"+escapeHtml(panel.color)+'"':"";out+='<div class="md-compare-panel"'+style+">";if(panel.title){out+='<div class="md-compare-title">'+escapeHtml(panel.title)+"</div>"}out+='<div class="md-compare-body">'+renderNodes(parseBlocks(panel.body,ctx).children,ctx)+"</div>";out+="</div>"}return out+"</div>"},mcq(node,ctx){const T=k=>escapeHtml(__i18nT(ctx,k));let h='<div class="md-mcq'+(node.display?" display":"")+'" data-multi="'+(node.isMulti?1:0)+'" data-display="'+(node.display?1:0)+'" data-open="'+(node.open?1:0)+'" data-sel="'+escapeHtml(node.sel.join(","))+'">';h+='<div class="md-mcq-head'+(node.subtitle?" has-sub":"")+'">';h+='<span class="md-mcq-tag'+(node.isMulti?" multi":"")+'"><i class="fas '+(node.isMulti?"fa-list-check":"fa-circle-dot")+'"></i>'+(node.sel&&node.sel.length?T("mcq.selected"):"")+(node.isMulti?T("mcq.multi"):T("mcq.single"))+"</span>";if(node.subtitle){h+='<span class="md-mcq-meta">'+renderNodes(parseInline(node.subtitle,ctx),ctx)+"</span>";h+="</div>";if(node.title)h+='<div class="md-mcq-title-row"><span class="md-mcq-title">'+renderNodes(parseInline(node.title,ctx),ctx)+"</span></div>"}else{if(node.title)h+='<span class="md-mcq-title">'+renderNodes(parseInline(node.title,ctx),ctx)+"</span>";h+="</div>"}if(node.hint){h+='<div class="md-mcq-hint-bar"><i class="fas fa-circle-info"></i><span>'+renderNodes(parseInline(node.hint,ctx),ctx)+"</span></div>"}h+='<div class="md-mcq-options">';for(let i=0;i<node.options.length;i++){const o=node.options[i];h+='<div class="md-mcq-opt" data-idx="'+i+'" data-marker="'+escapeHtml(o.marker)+'" data-correct="'+(o.correct?1:0)+'">';h+='<span class="md-mcq-marker">'+escapeHtml(o.marker)+"</span>";h+='<span class="md-mcq-text">'+renderNodes(parseInline(o.text,ctx),ctx)+"</span>";if(o.expl){h+='<div class="md-mcq-opt-expl">'+renderNodes(parseInline(o.expl,ctx),ctx)+"</div>"}h+="</div>"}h+="</div>";h+='<div class="md-mcq-actions">';if(node.isMulti){h+='<button class="md-mcq-submit"><i class="fas fa-paper-plane"></i>'+T("mcq.submit")+'</button><span class="md-mcq-hint"><i class="fas fa-circle-info"></i>'+T("mcq.hintMulti")+"</span>"}else{h+='<span class="md-mcq-hint"><i class="fas fa-hand-pointer"></i>'+T("mcq.hintClick")+"</span>"}h+='<div class="md-mcq-result"></div>';h+='<button class="md-mcq-toggle"><span class="toggle-view"><i class="fas fa-pen-to-square"></i>'+T("mcq.toggleView")+'</span><span class="toggle-play"><i class="fas fa-eye"></i>'+T("mcq.togglePlay")+"</span></button>";h+='<button class="md-mcq-reset" title="'+T("mcq.reset")+'"><i class="fas fa-rotate-right"></i></button>';h+="</div>";if(node.explanation){h+='<div class="md-mcq-explain"><div class="md-mcq-explain-label"><i class="fas fa-lightbulb"></i>'+T("mcq.explain")+"</div><div>"+renderNodes(parseInline(node.explanation,ctx),ctx)+"</div></div>"}h+="</div>";return h},saq(node,ctx){const T=k=>escapeHtml(__i18nT(ctx,k));let h='<div class="md-saq">';h+='<div class="md-saq-head">';h+='<span class="md-saq-tag"><i class="fas fa-pen-fancy"></i>'+T("saq.tag")+"</span>";if(node.subtitle)h+='<span class="md-saq-meta">'+renderNodes(parseInline(node.subtitle,ctx),ctx)+"</span>";h+="</div>";if(node.title)h+='<div class="md-saq-title">'+renderNodes(parseInline(node.title,ctx),ctx)+"</div>";if(node.hint)h+='<div class="md-saq-hint"><i class="fas fa-circle-info"></i><span>'+renderNodes(parseInline(node.hint,ctx),ctx)+"</span></div>";if(node.answer){h+='<div class="md-saq-section"><div class="md-saq-label"><i class="fas fa-check-circle"></i>'+T("saq.answer")+'</div><div class="md-saq-content">'+renderNodes(parseBlocks(node.answer,ctx).children,ctx)+'</div><div class="md-saq-veil"><i class="fas fa-eye"></i>'+T("saq.reveal")+"</div></div>"}if(node.explain){h+='<div class="md-saq-section explain"><div class="md-saq-label"><i class="fas fa-lightbulb"></i>'+T("saq.explain")+'</div><div class="md-saq-content">'+renderNodes(parseBlocks(node.explain,ctx).children,ctx)+'</div><div class="md-saq-veil"><i class="fas fa-eye"></i>'+T("saq.reveal")+"</div></div>"}return h+"</div>"},text(node,ctx){let v=node.value;if(ctx&&ctx.config&&ctx.config.smartypants&&!node.noSmart){v=v.replace(/---/g,"—").replace(/--/g,"–").replace(/\.{3}/g,"…").replace(/(^|[-—/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-—/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”")}return escapeHtml(v)},mdComment(){return""},emoji(node){return escapeHtml(node.value)},html(node){return node.value},code(node){return"<code>"+escapeHtmlStrict(node.value)+"</code>"},inlineCode(node,ctx){if(!node.lang)return"<code>"+escapeHtmlStrict(node.value)+"</code>";var H=ctx&&ctx.config&&ctx.config.highlighter;if(typeof H!=="function")return"<code>"+escapeHtmlStrict(node.value)+"</code>";try{var h=H(node.value,node.lang);if(typeof h!=="string"||!h)return"<code>"+escapeHtmlStrict(node.value)+"</code>";return'<code class="hljs language-'+escapeHtml(node.lang)+'">'+h+"</code>"}catch(e){return"<code>"+escapeHtmlStrict(node.value)+"</code>"}},mathInline(node,ctx){if(ctx.config&&ctx.config.katex===false)return'<span class="math-raw">'+escapeHtml("$"+node.value+"$")+"</span>";if(katexLib){try{return katexLib.renderToString(node.value,{displayMode:false,throwOnError:false})}catch(e){}}return'<span class="math-inline" data-tex="'+escapeHtml(node.value)+'">'+escapeHtml("$"+node.value+"$")+"</span>"},mathBlock(node,ctx){if(ctx.config&&ctx.config.katex===false)return'<div class="math-raw">'+escapeHtml("$$"+node.value+"$$")+"</div>";let __mv=node.value;if(__mv.indexOf("\\\\")===-1&&__mv.indexOf("\n")!==-1)__mv=__mv.replace(/\n/g,"\\\\\n");if(katexLib){try{return katexLib.renderToString(__mv,{displayMode:true,throwOnError:false})}catch(e){}}return'<div class="math-block" data-tex="'+escapeHtml(node.value)+'">'+escapeHtml("$$"+node.value+"$$")+"</div>"},strong(node,ctx){return"<strong>"+renderNodes(node.children,ctx)+"</strong>"},emphasis(node,ctx){return"<em>"+renderNodes(node.children,ctx)+"</em>"},delete(node,ctx){return"<del>"+renderNodes(node.children,ctx)+"</del>"},mark(node,ctx){return"<mark>"+renderNodes(node.children,ctx)+"</mark>"},sup(node,ctx){return"<sup>"+renderNodes(node.children,ctx)+"</sup>"},sub(node,ctx){return"<sub>"+renderNodes(node.children,ctx)+"</sub>"},link(node,ctx){const __hrefRaw=__cmDecodeEntities(node.href);if(!(node.autolink?isSafeAutolink(__hrefRaw):isSafeHref(__hrefRaw)))return renderNodes(node.children,ctx);if(ctx.__inA)return renderNodes(node.children,ctx);const __inthref=String(__hrefRaw).charAt(0)==="#";const attrs=(__inthref||ctx.config.linkattrs===false)?"":' target="_blank" rel="noopener"';const title=node.title?' title="'+escapeHtml(__cmDecodeEntities(node.title))+'"':"";const href=String(__hrefRaw).replace(/%(?![0-9A-Fa-f]{2})|[\\\x20\t\n\r\f\v"`\[\]<>^{}|]/g,function(c){const h=c.charCodeAt(0).toString(16).toUpperCase();return"%"+(h.length<2?"0"+h:h)}).replace(/[^\x00-\x7F]/g,function(c){return encodeURIComponent(c)});const isExt=/^https?:\/\//i.test(node.href)&&ctx.config.links!==false;const extIcon=isExt?'<i class="fas fa-arrow-up-right-from-square md-ext-link-icon"></i>':"";let __lo;ctx.__inA=true;try{__lo='<a href="'+href+'"'+attrs+title+">"+renderNodes(node.children,ctx)+extIcon+"</a>"}finally{ctx.__inA=false}return __lo},image(node,ctx){var isInline=!!(node.width||node.height);var st=imageStyle(node);var __isrc=__cmSafeImgSrc(node.src);if(__isrc!==node.src)node=Object.assign({},node,{src:__isrc});var flipStyle="";if(node.flip)flipStyle=node.flip==="x"?"transform:scaleX(-1);":node.flip==="y"?"transform:scaleY(-1);":"transform:scale(-1,-1);";if(isInline){if(st){st=st.replace('style="','style="display:inline-block;vertical-align:middle;border-radius:12px;object-fit:cover;box-shadow:none;'+flipStyle)}else{st=' style="display:inline-block;vertical-align:middle;border-radius:12px;object-fit:cover;box-shadow:none;'+flipStyle+'"'}return'<img class="img-inline" src="'+escapeHtml(node.src)+'" alt="'+escapeHtml(node.alt)+'" loading="lazy"'+st+(node.title?' title="'+escapeHtml(node.title)+'"':"")+" />"}if(flipStyle){var rStyle="border-radius:12px;";if(st){st=st.replace('style="','style="'+flipStyle+rStyle)}else{st=' style="'+flipStyle+rStyle+'"'}}if(ctx.config.imgwidget===false)return'<img src="'+escapeHtml(node.src)+'" alt="'+escapeHtml(node.alt)+'"'+(node.title?' title="'+escapeHtml(node.title)+'"':"")+" />";return'<img src="'+escapeHtml(node.src)+'" alt="'+escapeHtml(node.alt)+'" loading="lazy"'+st+(node.title?' title="'+escapeHtml(node.title)+'"':"")+" />"},video(node,ctx){const style=imageStyle(node);const altHtml=node.alt&&node.alt.length?'<div class="video-alt-text">'+renderNodes(node.alt,ctx)+"</div>":"";let m=node.src.match(/(?:youtube(?:-nocookie)?\.com\/(?:watch\?v=|embed\/)|youtu\.be\/)([a-zA-Z0-9_-]{11})/);if(m){const __ytHost=node.src.indexOf("youtube-nocookie.com")!==-1?"https://www.youtube-nocookie.com/embed/":"https://www.youtube.com/embed/";return'<div class="video-placeholder"><iframe src="'+__ytHost+m[1]+'" frameborder="0" allowfullscreen'+style+"></iframe>"+altHtml+"</div>"}m=node.src.match(/(?:bilibili\.com\/video\/)(BV[a-zA-Z0-9]+|av\d+)/i);if(m){let __bvid=m[1],__bsrc=__bvid.toLowerCase().startsWith("av")?"https://player.bilibili.com/player.html?aid="+__bvid.slice(2):"https://player.bilibili.com/player.html?bvid="+__bvid;return'<div class="video-placeholder"><iframe src="'+__bsrc+'" frameborder="0" allowfullscreen'+style+"></iframe>"+altHtml+"</div>"}m=node.src.match(/(?:vimeo\.com\/(?:video\/)?)(\d{6,})(?:\/([a-zA-Z0-9]+))?/);if(m){const __vh=m[2]?"?h="+m[2]:"";return'<div class="video-placeholder"><iframe src="https://player.vimeo.com/video/'+m[1]+__vh+'" frameborder="0" allowfullscreen'+style+"></iframe>"+altHtml+"</div>"}return'<div class="video-placeholder"><video src="'+escapeHtml(__cmSafeMediaSrc(node.src))+'" controls'+style+"></video>"+altHtml+"</div>"},audio(node){const __src=__cmSafeMediaSrc(node.src),__cover=__cmSafeImgSrc(node.cover||"");const t=node.title?' title="'+escapeHtml(node.title)+'"':"";const c=__cover?' data-cover="'+escapeHtml(__cover)+'"':"";const s=node.subtitle?' data-subs="'+escapeHtml(node.subtitle)+'"':"";return'<audio controls src="'+escapeHtml(__src)+'"'+t+c+s+' preload="metadata"></audio>'},footnoteRef(node){return'<sup class="footnote-ref"><a href="#footnote-def-'+node.index+'" data-footnote-ref="'+node.index+'">'+node.index+"</a></sup>"},alignBlockInline(node,ctx){return'<span class="md-align-'+node.align+'">'+renderNodes(node.children,ctx)+"</span>"},alignBlock(node,ctx){return'<div class="md-align-'+node.align+'">'+renderNodes(node.children,ctx)+"</div>"},hei(node,ctx){return'<span class="md-hei is-hidden">'+renderNodes(node.children,ctx)+"</span>"},lang(node){const key=node.name.toLowerCase().replace(/\s+/g,"");const meta=__langMeta(key);const cls="md-lang"+(node.showText?"":" no-text");let html='<span class="'+cls+'" data-lang="'+escapeHtml(key)+'" title="'+escapeHtml(node.name)+'">';if(meta)html+='<i class="'+meta.icon+'"></i>';if(node.showText||!meta)html+='<span class="md-lang-text">'+escapeHtml(node.name)+"</span>";return html+"</span>"},key(node){const parts=String(node.value).split(/\s*\+\s*/).filter(Boolean);const out=[];for(let i=0;i<parts.length;i++){if(i>0)out.push('<span class="md-key-sep">+</span>');out.push('<span class="md-key">'+escapeHtml(parts[i])+"</span>")}return out.join("")},keyBlock(node){const parts=String(node.value).split(/\s*\+\s*/).filter(Boolean);const out=[];for(let i=0;i<parts.length;i++){if(i>0)out.push('<span class="md-key-sep">+</span>');out.push('<span class="md-key big">'+escapeHtml(parts[i])+"</span>")}return'<div class="md-key-block">'+out.join("")+"</div>"},copy(node){const v=String(node.value);return'<span class="md-copy" data-copy="'+escapeHtml(v)+'"><span class="md-copy-text">'+escapeHtml(v)+'</span><i class="fas fa-copy md-copy-icon"></i></span>'},copyBlock(node){const v=String(node.value);return'<div class="md-copy-block" data-copy="'+escapeHtml(v)+'">'+escapeHtml(v)+'<i class="fas fa-copy md-copy-icon"></i></div>'},chat(node,ctx){let html='<div class="chat-wrapper">';if(node.title)html+='<div class="chat-title">'+renderInlineText(node.title,ctx)+"</div>";for(const m of node.messages)html+=renderNode(m,ctx);return html+"</div>"},chatMsg(node,ctx){const user=node.user||{name:node.name,avatar:"",color:""};for(const pp of node.parts){if(pp.type==="redpacket"&&!pp.kv.giver)pp.kv.giver=node.name}const avatarHtml=user.avatar?'<img class="chat-avatar-img" src="'+escapeHtml(__cmSafeImgSrc(user.avatar))+'" alt="" loading="lazy">':'<span class="chat-avatar-fallback" style="background:'+escapeHtml(user.color||autoColor(node.name))+'">'+escapeHtml(node.name.charAt(0))+"</span>";const bubbleParts=renderChatParts(node.parts,ctx);const bare=isBareChatParts(node.parts)?" chat-bubble-bare":"";const side=node.side==="right"?"right":"left";const statusHtml=node.status?'<div class="chat-status">'+renderInlineText(node.status,ctx)+"</div>":"";return'<div class="chat-msg chat-msg-'+side+'" id="'+escapeHtml(node.id)+'" data-author="'+escapeHtml(node.name)+'"><div class="chat-avatar">'+avatarHtml+'</div><div class="chat-content"><div class="chat-meta"><span class="chat-name">'+escapeHtml(node.name)+"</span>"+(node.time?'<span class="chat-time">'+escapeHtml(node.time)+"</span>":"")+'</div><div class="chat-bubble-wrap"><div class="chat-bubble'+bare+'">'+bubbleParts+"</div>"+statusHtml+"</div></div></div>"},chatSys(node,ctx){const cfg=SYS_TYPES[node.sysType]||SYS_TYPES.default;const color=node.colorOverride||cfg.color;const effectClass=cfg.effect?" chat-sys-effect-"+cfg.effect:"";const textHtml=renderInlineText(node.text.trim().replace(/\n+/g," "),ctx);const iconHtml=node.noIcon?"":'<i class="fas '+escapeHtml(node.iconOverride||cfg.icon)+' sys-icon"></i>';return'<div class="chat-sys'+effectClass+'" style="color:'+escapeHtml(color)+'">'+iconHtml+'<span class="sys-text">'+textHtml+"</span></div>"},chatQuote(node,ctx){let preview="";for(const p of node.parts){if(p.type==="text")preview+=(preview?" ":"")+p.text.replace(/\n+/g," ").trim();else if(p.type==="chatQuote")preview+=(preview?" ":"")+__i18nT(ctx,"chat.quote",{name:p.name});else if(p.type==="image")preview+=(preview?" ":"")+__i18nT(ctx,"chat.img");else if(p.type==="redpacket")preview+=(preview?" ":"")+__i18nT(ctx,"chat.rp");else if(p.type==="transfer")preview+=(preview?" ":"")+__i18nT(ctx,"chat.transfer");else if(p.type==="card")preview+=(preview?" ":"")+__i18nT(ctx,"chat.cardTag")}preview=preview.trim();if(!preview&&node.autoPreview)preview=node.autoPreview;preview=preview.slice(0,60);const targetAttr=node.targetId?' data-quote-target="'+escapeHtml(node.targetId)+'"':"";const isSimple=node.parts.length===0||node.parts.length===1&&node.parts[0].type==="text";if(isSimple&&preview){return'<div class="chat-quote"'+targetAttr+'><i class="fas fa-reply chat-quote-arrow"></i><span class="chat-quote-name">'+escapeHtml(node.name)+'</span><span class="chat-quote-text">'+renderInlineText(preview,ctx)+"</span></div>"}return'<div class="chat-quote chat-quote-nested"'+targetAttr+'><div class="chat-quote-head"><i class="fas fa-reply chat-quote-arrow"></i><span class="chat-quote-name">'+escapeHtml(node.name)+'</span></div><div class="chat-quote-inner">'+renderChatParts(node.parts,ctx)+"</div></div>"},circle(node,ctx){return'<span class="md-circle">'+renderNodes(node.children,ctx)+"</span>"},cross(node,ctx){return'<span class="md-cross"><svg viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M8,12 Q35,42 52,52 T94,88" stroke="currentColor" stroke-width="1.6"/><path d="M93,10 Q60,45 45,55 T5,90" stroke="currentColor" stroke-width="1.5"/></svg>'+renderNodes(node.children,ctx)+"</span>"},stamp(node){let c="";if(node.color){const r=resolveColor(node.color);if(r)c=r;else if(/^[a-zA-Z]+$/.test(node.color))c=escapeHtml(node.color)}const s=c?' style="color:'+c+'"':"";return'<span class="md-stamp"'+s+">"+escapeHtml(node.text)+"</span>"},score(node){const v=Math.max(0,Math.min(5,node.value||0)),full=Math.floor(v),half=v-full>=.5;let h='<span class="md-score"><span class="md-score-stars">';for(let i=0;i<full;i++)h+='<i class="fas fa-star"></i>';if(half)h+='<i class="fas fa-star-half-stroke"></i>';for(let j=full+(half?1:0);j<5;j++)h+='<i class="far fa-star"></i>';h+="</span>";if(node.showNum)h+='<span class="md-score-num">'+(v%1===0?v:v.toFixed(1))+"</span>";return h+"</span>"},wave(node,ctx){return'<span class="md-wave">'+renderNodes(node.children,ctx)+"</span>"},echo(node){return'<span class="md-echo" data-text="'+escapeHtml(node.text)+'">'+escapeHtml(node.text)+"</span>"},neon(node){let c="";if(node.color){const r=resolveColor(node.color);if(r)c=r;else if(/^[a-zA-Z]+$/.test(node.color))c=escapeHtml(node.color)}const s=c?' style="color:'+c+'"':"";return'<span class="md-neon"'+s+">"+escapeHtml(node.text)+"</span>"},marker(node,ctx){let c="";if(node.color){const r=resolveColor(node.color);if(r)c=hexToRgba(r,.55);else if(/^[a-zA-Z]+$/.test(node.color))c="color-mix(in srgb, "+escapeHtml(node.color)+" 55%, transparent)"}const s=c?' style="--marker-c:'+c+'"':"";return'<span class="md-marker"'+s+">"+renderNodes(node.children,ctx)+"</span>"},vert(node,ctx){return'<span class="md-vert">'+renderNodes(node.children,ctx)+"</span>"},cursor(node){return'<span class="md-typewriter" data-text="'+escapeHtml(node.text)+'"></span>'},shadow(node,ctx){return'<span class="md-shadow">'+renderNodes(node.children,ctx)+"</span>"},blur(node,ctx){return'<span class="md-blur">'+renderNodes(node.children,ctx)+"</span>"},anchor(node){return'<span class="md-anchor" id="'+escapeHtml(node.target)+'"></span>'},goto(node,ctx){return'<a class="md-goto" href="#'+escapeHtml(node.target)+'" data-goto-target="'+escapeHtml(node.target)+'">'+renderNodes(parseInline(node.label,ctx),ctx)+"</a>"},path(node){let h='<span class="md-path">';for(let i=0;i<node.items.length;i++)h+='<span class="md-path-item">'+escapeHtml(node.items[i])+"</span>";return h+"</span>"},shake(node,ctx){return'<span class="md-shake"'+(node.args?' data-args="'+escapeHtml(node.args)+'"':"")+">"+renderNodes(node.children,ctx)+"</span>"},blurBlock(node,ctx){return'<div class="md-blur">'+renderNodes(node.children,ctx)+"</div>"},dl(node,ctx){const im={zip:"fa-file-zipper",rar:"fa-file-zipper","7z":"fa-file-zipper",pdf:"fa-file-pdf",exe:"fa-microchip",msi:"fa-microchip",doc:"fa-file-word",docx:"fa-file-word",xls:"fa-file-excel",xlsx:"fa-file-excel",ppt:"fa-file-powerpoint",pptx:"fa-file-powerpoint",txt:"fa-file-lines",md:"fa-file-lines",png:"fa-file-image",jpg:"fa-file-image",jpeg:"fa-file-image",gif:"fa-file-image",svg:"fa-bezier-curve",webp:"fa-file-image",mp3:"fa-music",wav:"fa-music",flac:"fa-music",mp4:"fa-video",avi:"fa-video",mov:"fa-video",mkv:"fa-video"};const dot=node.filename.lastIndexOf(".");const ext=dot>0?node.filename.slice(dot+1).toLowerCase():"";const icon=dlIconHtml(node.icon,im[ext]||"fa-file");let meta="";if(node.size)meta+="<span>"+escapeHtml(node.size)+"</span>";if(node.date)meta+="<span>"+escapeHtml(node.date)+"</span>";let __sums="";if(node.checksums&&node.checksums.length){const __lbl={sha256:"SHA-256",sha512:"SHA-512",sha384:"SHA-384",sha1:"SHA-1",md5:"MD5",crc32:"CRC32",xxh3:"XXH3",blake3:"BLAKE3",blake2b:"BLAKE2b"};let __rows="";for(let __i=0;__i<node.checksums.length;__i++){const __s=node.checksums[__i];const __lb=__lbl[__s.algo]||__s.algo.toUpperCase();const __v=__s.value;__rows+='<div class="dl-checksum"><span class="dl-checksum-label">'+escapeHtml(__lb)+'</span><span class="md-copy dl-checksum-value" data-copy="'+escapeHtml(__v)+'" title="'+escapeHtml(__v)+'"><span class="dl-hash"><span class="md-copy-text">'+escapeHtml(__v)+'</span></span><i class="fas fa-copy md-copy-icon"></i></span></div>'}__sums='<div class="dl-checksums">'+__rows+"</div>"}const __dlUrl=__cmSafeHrefAttr(node.url),__dlVerify=__cmSafeHrefAttr(node.verify);const btn=__dlUrl?'<a href="'+escapeHtml(__dlUrl)+'" class="dl-btn" download><i class="fas fa-download"></i> '+escapeHtml(__i18nT(ctx,"dl.download"))+"</a>":"";const __vf=__dlVerify?'<a class="dl-verify" href="'+escapeHtml(__dlVerify)+'" target="_blank" rel="noopener"><i class="fas fa-shield-halved"></i> '+escapeHtml(__i18nT(ctx,"dl.verify"))+"</a>":"";let __actions="";if(btn||__vf){__actions='<div class="dl-actions">'+btn+__vf+"</div>"}return'<div class="dl-card"><div class="dl-header"><div class="dl-icon">'+icon+'</div><div class="dl-info"><div class="dl-name">'+escapeHtml(node.filename)+'</div><div class="dl-meta">'+meta+"</div></div></div>"+__sums+__actions+"</div>"},chartbar(node,ctx){if(!node.items.length)return"";const __FU=CHART_UNITS[ctx.langKey]||CHART_UNITS["zh-CN"];function fmtY(v){if(v===0)return"0";if(v>=1e100)return v.toExponential(1);for(let f=0;f<__FU.length;f++){if(v>=__FU[f].v){const n=v/__FU[f].v;return(n%1===0?n:n.toFixed(1).replace(/\.0$/,""))+__FU[f].s}}return v.toString()}if(node.stacked){const __names=[],__cm={};node.items.forEach(it=>{it.segments.forEach(s=>{if(__names.indexOf(s.name)<0){__names.push(s.name);__cm[s.name]=AUTO_COLORS[(__names.length-1)%AUTO_COLORS.length]}})});let __sv=0;node.items.forEach(it=>{let t=0;it.segments.forEach(s=>{t+=s.value});if(t>__sv)__sv=t});if(__sv===0)__sv=10;const __sm=Math.pow(10,Math.floor(Math.log10(__sv)));let __maxA=Math.ceil(__sv/__sm)*__sm;if(__maxA===__sv)__maxA+=__sm;let __yA="",__g="";for(let __i=0;__i<=4;__i++){const __p=__i*25,__yv=__maxA*(__i/4);__yA+='<div class="chart-y-axis-label" style="bottom:'+__p+'%;">'+fmtY(__yv)+"</div>";__g+='<div class="chart-grid-line" style="bottom:'+__p+'%;"></div>'}const __bars=node.items.map(d=>{let __tot=0;d.segments.forEach(s=>{__tot+=s.value});const __h=(__tot/__maxA*100).toFixed(2);let __seg="";for(let __si=d.segments.length-1;__si>=0;__si--){const s=d.segments[__si];const __sh=(s.value/__maxA*100).toFixed(2);__seg+='<div class="bar-seg" style="height:'+__sh+"%;background:"+escapeHtml(__cm[s.name])+'" title="'+escapeHtml(s.name)+": "+s.value+'"></div>'}return'<div class="bar-item"><div class="bar-fill bar-stacked" style="height:'+__h+'%"><div class="bar-value">'+escapeHtml(String(__tot))+"</div>"+__seg+'</div><div class="bar-label">'+escapeHtml(d.label)+"</div></div>"}).join("");let __leg="";if(__names.length>1){__leg='<div class="chart-legend">';__names.forEach(n=>{__leg+='<div class="chart-legend-item"><span class="chart-legend-swatch" style="background:'+escapeHtml(__cm[n])+'"></span><span>'+escapeHtml(n)+"</span></div>"});__leg+="</div>"}return'<div class="md-chartbar"><div class="chart-title">'+escapeHtml(node.title)+"</div>"+__leg+'<div class="chart-wrapper"><div class="chart-y-axis-wrap"><div class="chart-y-axis">'+__yA+'</div></div><div class="bar-scroll-wrap"><div class="bar-chart"><div class="chart-grid-wrap"><div class="chart-grid">'+__g+"</div></div>"+__bars+"</div></div></div></div>"}let maxV=Math.max(...node.items.map(d=>d.value));if(maxV===0)maxV=10;const mag=Math.pow(10,Math.floor(Math.log10(maxV)));let maxAxis=Math.ceil(maxV/mag)*mag;if(maxAxis===maxV)maxAxis+=mag;let yAxisHtml="",gridHtml="";for(let i=0;i<=4;i++){const pct=i*25;const yv=maxAxis*(i/4);yAxisHtml+='<div class="chart-y-axis-label" style="bottom:'+pct+'%;">'+fmtY(yv)+"</div>";gridHtml+='<div class="chart-grid-line" style="bottom:'+pct+'%;"></div>'}const bars=node.items.map(d=>{const h=(d.value/maxAxis*100).toFixed(2);return'<div class="bar-item"><div class="bar-fill" style="height:'+h+'%"><div class="bar-value">'+escapeHtml(d.raw!==undefined?d.raw:d.value)+'</div></div><div class="bar-label">'+escapeHtml(d.label)+"</div></div>"}).join("");return'<div class="md-chartbar"><div class="chart-title">'+escapeHtml(node.title)+'</div><div class="chart-wrapper"><div class="chart-y-axis-wrap"><div class="chart-y-axis">'+yAxisHtml+'</div></div><div class="bar-scroll-wrap"><div class="bar-chart"><div class="chart-grid-wrap"><div class="chart-grid">'+gridHtml+"</div></div>"+bars+"</div></div></div></div>"},chartline(node,ctx){const W=500,H=200,pL=60,pR=20,pT=10,pB=30,cw=W-pL-pR,ch=H-pT-pB;let mv=0;node.series.forEach(s=>{s.data.forEach(v=>{if(v>mv)mv=v})});mv=mv===0?10:Math.ceil(mv*1.1);let g="";for(let i=0;i<=5;i++){const yv=mv*(i/5);const yp=pT+ch-ch*(i/5);g+='<line x1="'+pL+'" y1="'+yp+'" x2="'+(W-pR)+'" y2="'+yp+'" style="stroke:var(--clc-grid);stroke-width:1.5;stroke-dasharray:3 3"/>';g+='<text x="'+(pL-12)+'" y="'+(yp+6)+'" font-size="18" font-family="monospace" font-weight="600" text-anchor="end" style="fill:var(--clc-text)">'+Math.round(yv)+"</text>"}let xl="";const xS=cw/(node.labels.length-1||1);node.labels.forEach((lbl,i)=>{const xp=pL+xS*i;xl+='<text x="'+xp+'" y="'+(H-5)+'" font-size="18" font-family="monospace" font-weight="600" text-anchor="middle" style="fill:var(--clc-text)">'+escapeHtml(lbl)+"</text>"});let ln="";node.series.forEach((s,si)=>{const ci=si%8+1;const col="var(--clc-"+ci+")";const pts=s.data.map((val,i)=>{const xp=pL+xS*i;const yp=pT+ch-ch*(val/mv);return{x:xp,y:yp,v:val}});const ps=pts.map(p=>p.x+","+p.y).join(" ");const dash=s.type==="dashed"?"stroke-dasharray:6 6;":"";ln+='<polyline points="'+ps+'" style="fill:none;stroke:'+col+";stroke-width:3;stroke-linecap:round;stroke-linejoin:round;"+dash+'"/>';pts.forEach(p=>{ln+='<circle cx="'+p.x+'" cy="'+p.y+'" r="4.5" style="stroke:'+col+';stroke-width:3;fill:var(--clc-bg)"><title>'+escapeHtml(s.name)+": "+p.v+"</title></circle>"})});let lg="";node.series.forEach((s,si)=>{const ci=si%8+1;const col="var(--clc-"+ci+")";const sw=s.type==="dashed"?'<svg class="chart-legend-swatch" width="24" height="6" viewBox="0 0 24 6"><rect x="0" y="1" width="6" height="4" rx="2" style="fill:'+col+'"/><rect x="9" y="1" width="6" height="4" rx="2" style="fill:'+col+'"/><rect x="18" y="1" width="6" height="4" rx="2" style="fill:'+col+'"/></svg>':'<span class="chart-legend-swatch" style="background:'+col+'"></span>';lg+='<div class="chart-legend-item">'+sw+"<span>"+escapeHtml(s.name)+"</span></div>"});return'<div class="md-chartline"><div class="chart-title">'+escapeHtml(node.title)+'</div><div class="chart-legend">'+lg+'</div><div class="chart-body"><svg viewBox="0 0 '+W+" "+H+'" class="chart-svg">'+g+xl+ln+"</svg></div></div>"},ghr(node,ctx){const footerHtml=node.footer?'<div class="ghr-footer"><span class="custom">'+escapeHtml(node.footer)+"</span></div>":"";return'<a class="md-ghr md-ghr-static" href="https://github.com/'+escapeHtml(node.repo)+'" target="_blank" rel="noopener"><div class="ghr-header"><div class="ghr-avatar"><i class="fab fa-github"></i></div><div class="ghr-name">'+escapeHtml(node.repo)+'</div></div><div class="ghr-desc">'+escapeHtml(__i18nT(ctx,"ghr.repository"))+"</div>"+footerHtml+"</a>\n"},collage(node,ctx){const lay=node.layout;let out='<div class="md-collage md-collage--'+lay+'">';for(let i=0;i<node.items.length;i++){const it=node.items[i];let itemStyle="",imgInline="";if(lay==="1"){let W=0,H=0;if(it.width&&/^\d+$/.test(it.width))W=parseInt(it.width,10);if(it.height&&/^\d+$/.test(it.height))H=parseInt(it.height,10);if(W||H){let st="";let mw=0;if(W&&H){st="width:100%;max-width:"+W+"px;height:auto;max-height:"+H+"px;object-fit:contain;display:block;margin:0 auto;position:static;";mw=W}else if(W){st="width:100%;max-width:"+W+"px;height:auto;object-fit:contain;display:block;margin:0 auto;position:static;";mw=W}else{st="width:auto;max-width:100%;height:auto;max-height:"+H+"px;object-fit:contain;display:block;margin:0 auto;position:static;";mw=Math.round(H*1.6)}itemStyle=' style="max-width:'+mw+'px"';imgInline=' style="'+st+'"'}}const __cs=__cmSafeImgSrc(it.src),__ch=__cmSafeHrefAttr(it.src)||"#";out+='<a class="md-collage-item" href="'+escapeHtml(__ch)+'" data-index="'+i+'"'+itemStyle+'><span class="md-collage-loading"><i class="fas fa-spinner fa-spin"></i></span><img src="'+escapeHtml(__cs)+'" alt="'+escapeHtml(it.alt)+'" loading="lazy"'+imgInline+(it.title?' title="'+escapeHtml(it.title)+'"':"")+"></a>"}return out+"</div>"},scrBlock(node,ctx){let p=node.params||"";let c="gold",t="",r=.65;const rm=p.match(/(?:^|\s)ratio=([\d.]+)(?=\s|$)/);if(rm){r=parseFloat(rm[1])||.65;if(r<=0||r>1)r=.65;p=p.replace(rm[0]," ")}const tm=p.match(/"((?:\\.|[^"\\])*)"/);if(tm){t=tm[1].replace(/\\(.)/g,"$1");p=p.replace(tm[0]," ")}const ps=p.trim().split(/\s+/).filter(Boolean);if(ps.length>0)c=ps[0];return'<div class="md-scratch" data-color="'+escapeHtml(c)+'" data-tip="'+escapeHtml(t)+'" data-ratio="'+r+'"><div class="md-scratch-content">'+renderNodes(node.children,ctx)+"</div></div>"},criticAdd(node,ctx){return'<ins class="md-critic-add">'+renderNodes(node.children,ctx)+"</ins>"},criticDel(node,ctx){return'<del class="md-critic-del">'+renderNodes(node.children,ctx)+"</del>"},criticReplace(node,ctx){return'<del class="md-critic-del">'+renderNodes(node.oldContent,ctx)+'</del><ins class="md-critic-add">'+renderNodes(node.newContent,ctx)+"</ins>"},criticHighlight(node,ctx){return'<mark class="md-critic-highlight">'+renderNodes(node.children,ctx)+"</mark>"},criticComment(node,ctx){const t=ctx.config&&ctx.config.tip!==false?' data-tip="'+escapeHtml(node.text)+'"':"";return'<span class="md-critic-comment"'+t+'><i class="far fa-comment-dots"></i></span>'},figure(node,ctx){const id="fig-"+node.num;const cap=node.title?" · "+renderNodes(parseInline(node.title,ctx),ctx):"";const lbl=__i18nT(ctx,"fig.label",{n:node.num});return'<figure class="md-figure" id="'+escapeHtml(id)+'">'+renderNodes(node.children,ctx)+'<figcaption class="md-figure-caption">'+escapeHtml(lbl)+cap+"</figcaption></figure>"},tblBlock(node,ctx){const id="tbl-"+node.num;const cap=node.title?" · "+renderNodes(parseInline(node.title,ctx),ctx):"";const lbl=__i18nT(ctx,"tbl.label",{n:node.num});return'<div class="md-tbl-block" id="'+escapeHtml(id)+'"><div class="md-tbl-caption">'+escapeHtml(lbl)+cap+"</div>"+renderNodes(node.children,ctx)+"</div>"},eqBlock(node,ctx){const id="eq-"+node.key;let body;if(katexLib){try{body=katexLib.renderToString(node.text,{displayMode:true,throwOnError:false})}catch(e){body='<span class="math-block" data-tex="'+escapeHtml(node.text)+'">'+escapeHtml("$$"+node.text+"$$")+"</span>"}}else{body='<span class="math-block" data-tex="'+escapeHtml(node.text)+'">'+escapeHtml("$$"+node.text+"$$")+"</span>"}const lbl=__i18nT(ctx,"eq.label",{n:node.num});return'<div class="md-eq-block" id="'+escapeHtml(id)+'"><span class="md-eq-body">'+body+'</span><span class="md-eq-num">'+escapeHtml(lbl)+"</span></div>"},figRef(node,ctx){const key=node.key;const idx=ctx.figIndex||{};const __ne=n=>{for(const k in idx){if(idx[k]===n)return true}return false};if(idx[key]!==undefined){const __n0=idx[key];return'<a class="md-figref" href="#fig-'+__n0+'">'+escapeHtml(__i18nT(ctx,"fig.label",{n:__n0}))+"</a>"}if(/^\d+(?:-\d+)?(?:,\d+(?:-\d+)?)*$/.test(key)){const parts=key.split(",");let ok=true;for(let pi=0;pi<parts.length;pi++){const p=parts[pi];if(p.indexOf("-")>=0){const r=p.split("-");const a=parseInt(r[0],10),b=parseInt(r[1],10);for(let i=a;i<=b;i++){if(!__ne(i)){ok=false;break}}if(!ok)break}else if(!__ne(parseInt(p,10))){ok=false;break}}if(ok){const __ln=[];for(let pj=0;pj<parts.length;pj++){const p2=parts[pj];if(p2.indexOf("-")>=0){const r2=p2.split("-");const a2=parseInt(r2[0],10),b2=parseInt(r2[1],10);for(let k2=a2;k2<=b2;k2++)__ln.push(k2)}else __ln.push(parseInt(p2,10))}const __html=__ln.map(n=>'<a class="md-figref" href="#fig-'+n+'">'+escapeHtml(__i18nT(ctx,"fig.label",{n:n}))+"</a>").join("、");return'<span class="md-figref">'+__html+"</span>"}if(ctx.__warnings)ctx.__warnings.push({type:"ref-missing",kind:"fig",key:key});return'<span class="md-figref md-figref-missing">'+escapeHtml(__i18nT(ctx,"fig.refMissing",{key:key}))+"</span>"}if(ctx.__warnings)ctx.__warnings.push({type:"ref-missing",kind:"fig",key:key});return'<span class="md-figref md-figref-missing">'+escapeHtml(__i18nT(ctx,"fig.refMissing",{key:key}))+"</span>"},tblRef(node,ctx){const key=node.key;const idx=ctx.tblIndex||{};const __ne=n=>{for(const k in idx){if(idx[k]===n)return true}return false};if(idx[key]!==undefined){const __n0=idx[key];return'<a class="md-tblref" href="#tbl-'+__n0+'">'+escapeHtml(__i18nT(ctx,"tbl.label",{n:__n0}))+"</a>"}if(/^\d+(?:-\d+)?(?:,\d+(?:-\d+)?)*$/.test(key)){const parts=key.split(",");let ok=true;for(let pi=0;pi<parts.length;pi++){const p=parts[pi];if(p.indexOf("-")>=0){const r=p.split("-");const a=parseInt(r[0],10),b=parseInt(r[1],10);for(let i=a;i<=b;i++){if(!__ne(i)){ok=false;break}}if(!ok)break}else if(!__ne(parseInt(p,10))){ok=false;break}}if(ok){const __ln=[];for(let pj=0;pj<parts.length;pj++){const p2=parts[pj];if(p2.indexOf("-")>=0){const r2=p2.split("-");const a2=parseInt(r2[0],10),b2=parseInt(r2[1],10);for(let k2=a2;k2<=b2;k2++)__ln.push(k2)}else __ln.push(parseInt(p2,10))}const __html=__ln.map(n=>'<a class="md-tblref" href="#tbl-'+n+'">'+escapeHtml(__i18nT(ctx,"tbl.label",{n:n}))+"</a>").join("、");return'<span class="md-tblref">'+__html+"</span>"}if(ctx.__warnings)ctx.__warnings.push({type:"ref-missing",kind:"tbl",key:key});return'<span class="md-tblref md-tblref-missing">'+escapeHtml(__i18nT(ctx,"tbl.refMissing",{key:key}))+"</span>"}if(ctx.__warnings)ctx.__warnings.push({type:"ref-missing",kind:"tbl",key:key});return'<span class="md-tblref md-tblref-missing">'+escapeHtml(__i18nT(ctx,"tbl.refMissing",{key:key}))+"</span>"},eqRef(node,ctx){const key=node.key;const idx=ctx.eqIndex||{};const __ne=n=>{for(const k in idx){if(idx[k]===n)return true}return false};if(idx[key]!==undefined){const __n0=idx[key];return'<a class="md-eqref" href="#eq-'+__n0+'">'+escapeHtml(__i18nT(ctx,"eq.label",{n:__n0}))+"</a>"}if(/^\d+(?:-\d+)?(?:,\d+(?:-\d+)?)*$/.test(key)){const parts=key.split(",");let ok=true;for(let pi=0;pi<parts.length;pi++){const p=parts[pi];if(p.indexOf("-")>=0){const r=p.split("-");const a=parseInt(r[0],10),b=parseInt(r[1],10);for(let i=a;i<=b;i++){if(!__ne(i)){ok=false;break}}if(!ok)break}else if(!__ne(parseInt(p,10))){ok=false;break}}if(ok){const __ln=[];for(let pj=0;pj<parts.length;pj++){const p2=parts[pj];if(p2.indexOf("-")>=0){const r2=p2.split("-");const a2=parseInt(r2[0],10),b2=parseInt(r2[1],10);for(let k2=a2;k2<=b2;k2++)__ln.push(k2)}else __ln.push(parseInt(p2,10))}const __html=__ln.map(n=>'<a class="md-eqref" href="#eq-'+n+'">'+escapeHtml(__i18nT(ctx,"eq.label",{n:n}))+"</a>").join("、");return'<span class="md-eqref">'+__html+"</span>"}if(ctx.__warnings)ctx.__warnings.push({type:"ref-missing",kind:"eq",key:key});return'<span class="md-eqref md-eqref-missing">'+escapeHtml(__i18nT(ctx,"eq.refMissing",{key:key}))+"</span>"}if(ctx.__warnings)ctx.__warnings.push({type:"ref-missing",kind:"eq",key:key});return'<span class="md-eqref md-eqref-missing">'+escapeHtml(__i18nT(ctx,"eq.refMissing",{key:key}))+"</span>"}};function renderNode(node,ctx){if(!node)return"";if(node.type==="cfg"){const __c=node.config;applyArticleConfig(ctx,__c);return ctx.config.keepmd&&node._md?'<div style="display:none" data-md="'+escapeHtml(node._md)+'"></div>':""}const fn=RENDERERS[node.type];if(!fn)return"";let html=fn(node,ctx);if(node.unclosed&&html&&html.charAt(0)==="<")html=html.replace(/^<([a-z]+)/,'<$1 data-unclosed="true"');if(ctx.config.keepmd&&node._md&&html&&html.charAt(0)==="<")html=html.replace(/^<([a-z0-9-]+)/,'<$1 data-md="'+escapeHtml(node._md)+'"');return html}function renderBlockChildren(nodes,ctx){const parts=[];for(const n of nodes)parts.push(renderNode(n,ctx));return parts.join("\n")}function renderNodes(nodes,ctx){if(!nodes||!nodes.length)return"";let out="";for(let i=0;i<nodes.length;i++)out+=renderNode(nodes[i],ctx);return out}function applyArticleConfig(ctx,cfg){if(cfg.__reset){ctx.config=Object.assign({},DEFAULT_CONFIG);if(ctx.hostConfig){for(var hk in ctx.hostConfig){if(hk!=="locked"&&hk!=="env")ctx.config[hk.toLowerCase()]=ctx.hostConfig[hk]}}ctx.i18n=__resolveI18n(ctx.hostConfig&&ctx.hostConfig.lang,ctx.hostConfig&&ctx.hostConfig.i18n);ctx.langKey=__normLang(ctx.hostConfig&&ctx.hostConfig.lang)||"zh-CN"}for(var k in cfg){if(k==="__reset"||k==="locked")continue;if(ctx.locked&&ctx.locked.indexOf(k)!==-1){if(!ctx.__warnings)ctx.__warnings=[];ctx.__warnings.push({type:"locked",key:k});continue}if(k==="lang"){var __normed=__normLang(cfg.lang);if(__normed&&I18N_DICT[__normed]){ctx.i18n=__resolveI18n(__normed,ctx.hostConfig&&ctx.hostConfig.i18n);ctx.langKey=__normed}continue}ctx.config[k]=cfg[k];if(k==="dropcap")ctx.dropcapDone=false}if(cfg.gfm!==undefined){if(!ctx.locked||ctx.locked.indexOf("table")===-1)ctx.config.table=cfg.gfm;if(!ctx.locked||ctx.locked.indexOf("tasklist")===-1)ctx.config.tasklist=cfg.gfm;if(!ctx.locked||ctx.locked.indexOf("strike")===-1)ctx.config.strike=cfg.gfm;if(!ctx.locked||ctx.locked.indexOf("autolink")===-1)ctx.config.autolink=cfg.gfm}}function renderMarkdown(md,userConfig){if(!md)return"";md=__normDoc(String(md).replace(/\r\n?/g,"\n"));const ctx=createContext(userConfig);ctx.stamp=userConfig&&userConfig.seed!==undefined?String(userConfig.seed):__cmHash(md);if(ctx.config.gfm===false){if(ctx.locked.indexOf("table")===-1)ctx.config.table=false;if(ctx.locked.indexOf("tasklist")===-1)ctx.config.tasklist=false;if(ctx.locked.indexOf("strike")===-1)ctx.config.strike=false;if(ctx.locked.indexOf("autolink")===-1)ctx.config.autolink=false}md=__cmRefJoinLabel(md.split("\n"),ctx).join("\n");preScanRefLinks(md,ctx);const ast=parseBlocks(md,ctx);ctx.config=Object.assign({},DEFAULT_CONFIG);if(userConfig&&userConfig.preset&&SPEC_PRESETS[userConfig.preset])Object.assign(ctx.config,SPEC_PRESETS[userConfig.preset]);ctx.i18n=__resolveI18n(userConfig&&userConfig.lang,userConfig&&userConfig.i18n);ctx.langKey=__normLang(userConfig&&userConfig.lang)||"zh-CN";if(userConfig){for(const ck in userConfig){if(ck!=="locked"&&ck!=="env")ctx.config[ck.toLowerCase()]=userConfig[ck]}}let html=renderNode(ast,ctx);if(ctx.footnoteCount>0){const __fnN=ctx.footnoteCount;let fh='<div class="footnotes">';for(let i=1;i<=__fnN;i++){const def=ctx.footnoteDefs[i];if(!def)continue;fh+='<div class="footnote-def" id="footnote-def-'+i+'"><a class="footnote-back" data-footnote-back="'+i+'">↩</a> <span class="footnote-number">['+i+"]</span> "+renderNodes(parseInline(def.content.replace(/\n/g,"<br>"),ctx),ctx)+"</div>"}fh+="</div>";html+=fh}try{if(html.indexOf('data-unclosed="true"')!==-1){const __uc=(html.match(/data-unclosed="true"/g)||[]).length;console.warn(__i18nT(ctx,"warn.unclosed",{n:__uc}))}}catch(e){}__lastMeta=ctx.meta||null;if(ctx.config.copy===false)html=html.replace(/<button class="copy-btn"[\s\S]*?<\/button>/g,"");html=__pluginBefore(html,ctx);html=__pluginAfter(html,ctx);return html.replace(/\n{3,}/g,"\n\n")}function parseFcFields(b){var L=b.split("\n"),F=[],C=null;for(var i=0;i<L.length;i++){var m=L[i].match(/^([^\s::]{1,12})[::]\s*(.*)$/);if(m){if(C)F.push(C);C={label:m[1],content:[m[2]]}}else if(C)C.content.push(L[i])}if(C)F.push(C);return F.map(function(f){return{label:f.label,content:f.content.join("\n")}})}function parseKanbanCols(raw){var L=raw.split("\n"),out=[],cur=null;for(var i=0;i<L.length;i++){var m=L[i].match(/^:::col(?:\s+(.*))?\s*$/);if(m){if(cur)out.push(cur);cur={header:(m[1]||"").trim(),body:[]}}else if(cur)cur.body.push(L[i])}if(cur)out.push(cur);return out.map(function(c){return{header:c.header,body:c.body.join("\n")}})}function parseKanbanCards(b){var L=b.split("\n"),cs=[],i=0;while(i<L.length){var ln=L[i],sm=ln.match(/^\s*[-*+]\s+(.+)$/);if(sm){cs.push({type:"simple",raw:sm[1]});i++;continue}var cm=ln.match(/^:::task(?:\s+(.*))?\s*$/);if(cm){var t=(cm[1]||"").trim(),bod=[],d=1,j=i+1;while(j<L.length){var l=L[j];if(/^:::\/[a-z]/i.test(l)||/^:::\s*$/.test(l)){d--;if(d===0)break}else if(/^:::[a-z]/i.test(l))d++;bod.push(l);j++}cs.push({type:"task",title:t,body:bod.join("\n")});i=j+1;continue}i++}return cs}function parseKbColH(s){var c=null,m=s.match(/(?:^|\s)color=(\S+)(?:\s|$)/);if(m)c=m[1];return{title:s.replace(/\s*color=\S+\s*/g," ").trim(),color:c}}function isDoneCol(t,c){if(c){var x=c.toLowerCase();if(x==="green"||x==="#10b981"||x==="#22c55e")return true}return/完成|done|finished/i.test(t||"")}function tryBuildNew(type,plus,title,raw,ctx){if(type==="vote"){var allRaw=null,am=title.match(/all=(\S+)/);if(am)allRaw=am[1];var t=title.replace(/all=\S+\s*/g," ").trim(),L=raw.split("\n"),o=[];for(var i=0;i<L.length;i++){var line=L[i].trim();if(!line)continue;var mm=line.match(/^[-*+]\s+(.+)$/),content=mm?mm[1]:line;var p=content.split("|").map(function(x){return x.trim()}),mk=false;if(p.length>=2&&p[p.length-1].toLowerCase()==="mark"){mk=true;p.pop()}var n=p[0]||"",v=null;if(p.length>=2&&/^\d+$/.test(p[1]))v=parseInt(p[1],10);o.push({name:n,votes:v,mark:mk})}return{type:"vote",title:t,all:allRaw,plus:plus,opts:o}}if(type==="flashcard")return{type:"flashcard",flip:/\bflip=y\b/i.test(title)?"y":"x",fields:parseFcFields(raw)};if(type==="flashcards"){var ch=raw.split(/\n\s*\n/).map(function(s){return s.trim()}).filter(Boolean),it=[];for(var k=0;k<ch.length;k++){var f=parseFcFields(ch[k]);if(f.length)it.push(f)}return{type:"flashcards",flip:/\bflip=y\b/i.test(title)?"y":"x",shuffleOff:/\bshuffle=0\b/i.test(title),items:it}}if(type==="kanban"){var cm=title.match(/(?:^|\s)cols=(\d+)(?:\s|$)/);return{type:"kanban",title:title.replace(/\s*cols=\d+\s*/g," ").trim(),cols:cm?parseInt(cm[1],10):0,colData:parseKanbanCols(raw)}}return null}function renderVoteNode(n,ctx){var A=false,S=0,o=n.opts;for(var i=0;i<o.length;i++)if(o[i].votes!=null){A=true;S+=o[i].votes}var D=S,h='<div class="md-vote">';if(n.title)h+='<div class="md-vote-title"><i class="fas fa-square-poll-vertical"></i>'+escapeHtml(n.title)+"</div>";h+='<div class="md-vote-opts">';for(var k=0;k<o.length;k++){var q=o[k],sb=A&&q.votes!=null&&D>0,pc=sb?q.votes/D*100:0;h+='<div class="md-vote-opt'+(q.mark?" mark":"")+'">';if(sb)h+='<span class="md-vote-bar" style="width:'+pc.toFixed(2)+'%"></span>';h+='<span class="md-vote-label">'+escapeHtml(q.name)+"</span>";if(sb)h+='<span class="md-vote-pct">'+pc.toFixed(1).replace(/\.0$/,"")+'%</span><span class="md-vote-count">('+q.votes+")</span>";h+="</div>"}h+="</div>";if(n.all!=null){h+='<div class="md-vote-meta">'+escapeHtml(String(n.all))+"</div>"}else if(n.plus){h+='<div class="md-vote-meta">'+escapeHtml(String(S))+"</div>"}return h+"</div>"}function renderFcCardNode(F,fl,ctx){var f=F[0]||{label:"",content:""},b=F[1]||{label:"",content:""};return'<div class="md-fc" data-flip="'+(fl||"x")+'"><div class="md-fc-inner"><div class="md-fc-face md-fc-front"><div class="md-fc-label"><i class="fas fa-circle-question"></i>'+escapeHtml(f.label||"")+'</div><div class="md-fc-body">'+renderNodes(parseBlocks(f.content,ctx).children,ctx)+'</div><div class="md-fc-hint"><i class="fas fa-rotate"></i>'+escapeHtml(__i18nT(ctx,"fc.hint"))+'</div></div><div class="md-fc-face md-fc-back"><div class="md-fc-label"><i class="fas fa-circle-check"></i>'+escapeHtml(b.label||"")+'</div><div class="md-fc-body">'+renderNodes(parseBlocks(b.content,ctx).children,ctx)+"</div></div></div></div>"}function renderFlashcardNode(n,ctx){return'<div class="md-fc-list">'+renderFcCardNode(n.fields,n.flip,ctx)+"</div>"}function renderFlashcardsNode(n,ctx){var N=n.items.length;if(!N)return"";var h='<div class="md-fcs" data-cur="0" data-flip="'+n.flip+'"><div class="md-fcs-stage">';for(var i=0;i<N;i++)h+=renderFcCardNode(n.items[i],n.flip,ctx);h+='</div><div class="md-fcs-controls"><button class="md-fcs-btn md-fcs-prev"><i class="fas fa-chevron-left"></i></button><span class="md-fcs-counter">1 / '+N+'</span><button class="md-fcs-btn md-fcs-next"><i class="fas fa-chevron-right"></i></button>';if(!n.shuffleOff)h+='<button class="md-fcs-btn md-fcs-shuffle"><i class="fas fa-shuffle"></i>'+escapeHtml(__i18nT(ctx,"fcs.shuffle"))+"</button>";h+='</div><div class="md-fcs-dots">';for(var k=0;k<N;k++)h+='<span class="md-fcs-dot'+(k===0?" active":"")+'" data-i="'+k+'"></span>';return h+"</div></div>"}function renderKanbanCardNode(c,ctx){var TC={high:"#e74c6f",mid:"#f59e0b",low:"#10b981",bug:"#e74c6f",feat:"#10b981",doc:"#4a90d9",fix:"#f59e0b"};if(c.type==="simple"){var r=c.raw,tg=[],mt=[];r=r.replace(/(?:^|\s)#([\w\u4e00-\u9fa5-]+)/g,function(_,t){tg.push(t);return""});r=r.replace(/(?:^|\s)@([\w\u4e00-\u9fa5-]+)/g,function(_,u){mt.push(u);return""});var h='<div class="md-kanban-card"><div class="md-kanban-card-title">'+escapeHtml(r.trim())+"</div>";if(tg.length||mt.length){h+='<div class="md-kanban-tags">';for(var i=0;i<tg.length;i++){var x=TC[tg[i].toLowerCase()]||"#6b5acf";h+='<span class="md-kanban-tag" style="background:'+x+"22;color:"+x+'">#'+escapeHtml(tg[i])+"</span>"}for(var j=0;j<mt.length;j++)h+='<span class="md-kanban-mention"><i class="fas fa-user"></i>'+escapeHtml(mt[j])+"</span>";h+="</div>"}return h+"</div>"}var h2='<div class="md-kanban-card">';if(c.title)h2+='<div class="md-kanban-card-title">'+escapeHtml(c.title)+"</div>";if(c.body&&c.body.trim())h2+='<div class="md-kanban-card-body">'+renderNodes(parseBlocks(c.body,ctx).children,ctx)+"</div>";return h2+"</div>"}function renderKanbanNode(n,ctx){var h='<div class="md-kanban"'+(n.cols?' data-cols="'+n.cols+'"':"")+">";if(n.title)h+='<div class="md-kanban-title"><i class="fas fa-table-columns"></i>'+escapeHtml(n.title)+"</div>";for(var i=0;i<n.colData.length;i++){var col=n.colData[i],ph=parseKbColH(col.header),dn=isDoneCol(ph.title,ph.color),cs=parseKanbanCards(col.body),st=ph.color?' style="--col-color:'+escapeHtml(ph.color)+'"':"";h+='<div class="md-kanban-col"'+st+(dn?' data-done="1"':"")+'><div class="md-kanban-head"><span>'+escapeHtml(ph.title||"")+'</span><span class="md-kanban-count">'+cs.length+"</span></div>";for(var k=0;k<cs.length;k++)h+=renderKanbanCardNode(cs[k],ctx);h+="</div>"}return h+"</div>"}RENDERERS.vote=function(n,c){return renderVoteNode(n,c)};RENDERERS.flashcard=function(n,c){return renderFlashcardNode(n,c)};RENDERERS.flashcards=function(n,c){return renderFlashcardsNode(n,c)};RENDERERS.kanban=function(n,c){return renderKanbanNode(n,c)};RENDERERS.btnimg=function(node,ctx){const attrs=node.attrs||{};let imgStyle="";if(attrs.height)imgStyle+="height:"+parseInt(attrs.height,10)+"px;width:auto;";if(attrs.width)imgStyle+="width:"+parseInt(attrs.width,10)+"px;height:auto;";const img='<img src="'+escapeHtml(__cmSafeImgSrc(node.src))+'" alt="'+escapeHtml(node.alt)+'"'+(imgStyle?' style="'+imgStyle+'"':"")+">";if(attrs.dis===true)return'<span class="md-btn-img md-dis" aria-disabled="true">'+img+"</span>";const safeHref=isSafeHref(node.href)?node.href:"#";const target=attrs.target==="_self"?"":' target="_blank" rel="noopener"';return'<a class="md-btn-img" href="'+escapeHtml(safeHref)+'"'+target+">"+img+"</a>"};RENDERERS.style=function(node,ctx){return'<span style="'+buildStyle(node.attrs||{})+'">'+renderNodes(node.children,ctx)+"</span>"};RENDERERS.styleBlock=function(node,ctx){return'<div class="md-style-block" style="'+buildStyle(node.attrs||{})+'">'+renderNodes(node.children,ctx)+"</div>"};RENDERERS.btnImgBlock=function(node,ctx){const attrs=node.attrs||{};const align=attrs.align||"left";const gap=attrs.gap?parseInt(attrs.gap,10):12;const stack=attrs.stack===true;const items=[];for(let i=0;i<node.lines.length;i++){const parts=node.lines[i].split("|").map(s=>s.trim());const alt=parts[0]||"",imgSrc=parts[1]||"",href=parts[2]||"",h=parts[3]?parseInt(parts[3],10):0;if(!imgSrc)continue;const imgStyle=h?"height:"+h+"px;width:auto;":"";const img='<img src="'+escapeHtml(__cmSafeImgSrc(imgSrc))+'" alt="'+escapeHtml(alt)+'"'+(imgStyle?' style="'+imgStyle+'"':"")+">";const safeHref=__cmSafeHrefAttr(href)||"#";items.push('<a href="'+escapeHtml(safeHref)+'" target="_blank" rel="noopener">'+img+"</a>")}const justify=align==="center"?"center":align==="right"?"flex-end":"flex-start";const dir=stack?"column":"row";const alignItems=stack?"center":"flex-start";return'<div class="md-btnimg-block" style="flex-direction:'+dir+";justify-content:"+justify+";gap:"+gap+"px;align-items:"+alignItems+'">'+items.join("")+"</div>"};RENDERERS.game=function(node,ctx){var f=node.fields||{},ti=node.title||"",co=f.cover||"",de=f.desc||"",tm=f.time||"",ra=f.rate||"",ur=f.url||"";var inner="";if(co)inner+='<div class="md-game-cover"><img src="'+esc(__cmSafeImgSrc(co))+'" alt="'+esc(ti)+'" loading="lazy"></div>';var body="";if(ti)body+='<h3 class="md-game-title">'+esc(ti)+"</h3>";if(de)body+='<p class="md-game-desc">'+renderNodes(parseInline(de,ctx),ctx)+"</p>";if(tm||ra){var meta="";if(tm)meta+='<span class="md-game-meta-tag"><i class="fas fa-clock"></i>'+esc(tm)+"</span>";if(ra){var rc="rate-def",rn=parseFloat(ra);if(!isNaN(rn)){if(rn>=90)rc="rate-pos";else if(rn>=70)rc="rate-mid";else if(rn>=40)rc="rate-warn";else rc="rate-neg"}meta+='<span class="md-game-rate '+rc+'"><i class="fas fa-thumbs-up"></i>'+esc(ra)+"</span>"}body+='<div class="md-game-meta">'+meta+"</div>"}inner+='<div class="md-game-body">'+body+"</div>";if(ur&&isSafeHref(ur))return'<a class="md-game" href="'+esc(ur)+'" target="_blank" rel="noopener">'+inner+"</a>";return'<div class="md-game">'+inner+"</div>"};RENDERERS.row=function(node,ctx){var attrs="";if(node.split)attrs+=' data-split="'+esc(node.split)+'"';if(node.reverse)attrs+=' data-reverse="1"';var left=node.left?renderNodes(parseBlocks(node.left,ctx).children,ctx):"";var right=node.right?renderNodes(parseBlocks(node.right,ctx).children,ctx):"";return'<div class="md-row"'+attrs+'><div class="md-row-left">'+left+'</div><div class="md-row-right">'+right+"</div></div>"};RENDERERS.box=function(node,ctx){var shape=node.shape?' data-shape="'+esc(node.shape)+'"':"";let c="";node.tl&&(c+='<span class="md-box-corner tl">'+esc(node.tl)+"</span>");node.tr&&(c+='<span class="md-box-corner tr">'+esc(node.tr)+"</span>");node.bl&&(c+='<span class="md-box-corner bl">'+esc(node.bl)+"</span>");node.br&&(c+='<span class="md-box-corner br">'+esc(node.br)+"</span>");return'<div class="md-box"'+shape+">"+c+renderNodes(node.children,ctx)+"</div>"};function safeSize(v){if(v===undefined||v===null)return"";v=String(v).trim();if(/^\d+(\.\d+)?$/.test(v))return v+"px";if(/^\d+(\.\d+)?(px|em|rem|%|pt|vh|vw)$/.test(v))return v;return""}function safeNum(v){if(v===undefined||v===null)return"";v=String(v).trim();if(/^\d+(\.\d+)?$/.test(v))return v;return""}function safeColor(v){if(!v)return"";v=String(v).trim();const c=resolveColor(v);if(c)return c;if(/^#[0-9a-fA-F]{3,8}$/.test(v))return v;return""}function stripBraces(s){return String(s||"").replace(/^\s*\{/,"").replace(/\}\s*$/,"").trim()}function buildStyle(attrs){let s="";if(attrs.size){const x=safeSize(attrs.size);if(x)s+="font-size:"+x+";"}if(attrs.color){const c=safeColor(attrs.color);if(c)s+="color:"+c+";"}if(attrs.bg){const c2=safeColor(attrs.bg);if(c2)s+="background-color:"+c2+";"}if(attrs.weight){const w=String(attrs.weight);if(/^(bold|normal|bolder|lighter)$/.test(w)||/^[1-9]00$/.test(w))s+="font-weight:"+w+";"}if(attrs.italic===true)s+="font-style:italic;";if(attrs.align){const a=String(attrs.align);if(/^(left|center|right|justify)$/.test(a))s+="text-align:"+a+";"}if(attrs.padding){const p=safeSize(attrs.padding);if(p)s+="padding:"+p+";"}if(attrs.margin){const mg=safeSize(attrs.margin);if(mg)s+="margin:"+mg+";"}if(attrs.radius){const r=safeSize(attrs.radius);if(r)s+="border-radius:"+r+";"}if(attrs.opacity){const o=String(attrs.opacity);if(/^(0(\.\d+)?|1(\.0+)?|\.\d+)$/.test(o)||/^(100|\d{1,2})%$/.test(o))s+="opacity:"+o+";"}if(attrs.width){const ww=safeSize(attrs.width);if(ww)s+="width:"+ww+";"}if(attrs.height){const hh=safeSize(attrs.height);if(hh)s+="height:"+hh+";"}if(attrs.line){const ln=safeNum(attrs.line);if(ln)s+="line-height:"+ln+";"}if(attrs.spacing){const sp=safeSize(attrs.spacing);if(sp)s+="letter-spacing:"+sp+";"}if(attrs.border){const b=String(attrs.border).trim();if(/^[\d.]+\s*(px|em|rem)?\s+(solid|dashed|dotted|double)\s+[#\w(),. %]+$/.test(b))s+="border:"+b+";"}return s}function collectText(node,out,ctx){if(!node)return;if(typeof node==="string"){out.push(node);return}if(Object.prototype.toString.call(node)==="[object Array]"){for(let i=0;i<node.length;i++)collectText(node[i],out,ctx);return}const t=node.type;if(t==="text"||t==="code"||t==="inlineCode"||t==="key"||t==="keyBlock"||t==="copy"||t==="copyBlock"){if(node.value)out.push(node.value);return}if(t==="abbr"){if(node.text)out.push(node.text);return}if(t==="badge"||t==="term"){if(node.label)out.push(node.label);return}if(t==="lang"){if(node.name)out.push(node.name);return}if(t==="ruby"){if(node.base)out.push(node.base);return}if(t==="date"){if(node.raw)out.push(node.raw);return}if(t==="mathInline"||t==="mathBlock"){if(node.value)out.push(node.value);return}if(t==="video"||t==="audio"||t==="codeBlock"||t==="qr"||t==="footnoteRef"||t==="toc"||t==="swipe"||t==="tree"||t==="pbar")return;if(t==="image"){if(node.alt)out.push(node.alt);return}if(t==="html"||t==="htmlBlock"){const h=node.value||node.raw||"";out.push(h.replace(/<[^>]+>/g,""));return}if(t==="break"||t==="hardBreak"){out.push(" ");return}if(t==="paragraph"||t==="heading"||t==="blockquote"||t==="alignBlock"||t==="alignBlockInline"||t==="hei"||t==="callout"||t==="detail"||t==="say"||t==="style"||t==="styleBlock"||t==="criticAdd"||t==="criticDel"||t==="criticHighlight"){collectText(node.children,out,ctx);out.push("\n\n");return}if(t==="strong"||t==="emphasis"||t==="delete"||t==="mark"||t==="sup"||t==="sub"||t==="link"||t==="colorSpan"||t==="root"||t==="fragment"){collectText(node.children,out,ctx);return}if(t==="criticReplace"){collectText(node.oldContent,out,ctx);collectText(node.newContent,out,ctx);return}if(t==="criticComment"){out.push(node.text);return}if(t==="list"){collectText(node.items,out,ctx);return}if(t==="listItem"){if(node.inline)collectText(node.inline,out,ctx);else collectText(node.children,out,ctx);if(node.list)collectText(node.list,out,ctx);out.push("\n");return}if(t==="table"){for(let i=0;i<node.headers.length;i++)collectText(node.headers[i].children,out,ctx);for(let r=0;r<node.rows.length;r++)for(let c=0;c<node.rows[r].length;c++)collectText(node.rows[r][c].children,out,ctx);return}if(t==="definitionList"){collectText(node.term,out,ctx);collectText(node.defs,out,ctx);return}if(t==="linkCard"){const f=node.fields||{};if(f.content)out.push(f.content);if(f.website)out.push(f.website);if(f.author)out.push(f.author);return}if(t==="chat"){collectText(node.messages,out,ctx);return}if(t==="chatMsg"){collectText(node.parts,out,ctx);return}if(t==="chatSys"){if(node.text)out.push(node.text);return}if(t==="chatQuote"){collectText(node.parts,out,ctx);return}if(t==="mcq"){if(node.title)out.push(node.title);for(let i=0;i<node.options.length;i++)if(node.options[i].text)out.push(node.options[i].text);if(node.explanation)out.push(node.explanation);if(node.hint)out.push(node.hint);return}if(t==="vote"){if(node.title)out.push(node.title);for(let i=0;i<node.opts.length;i++)if(node.opts[i].name)out.push(node.opts[i].name);return}if(t==="flashcard"){for(let i=0;i<node.fields.length;i++)if(node.fields[i].content)out.push(node.fields[i].content);return}if(t==="flashcards"){for(let i=0;i<node.items.length;i++)for(let j=0;j<node.items[i].length;j++)if(node.items[i][j].content)out.push(node.items[i][j].content);return}if(t==="timeline"){for(let i=0;i<node.items.length;i++){const it=node.items[i];if(it.date)out.push(it.date);if(it.title)out.push(it.title);if(it.desc)out.push(it.desc)}return}if(t==="tabs"){for(let i=0;i<node.tabs.length;i++){if(node.tabs[i].body)collectText(parseBlocks(node.tabs[i].body,ctx),out,ctx)}return}if(t==="grid"){for(let i=0;i<node.cells.length;i++){if(node.cells[i])collectText(parseBlocks(node.cells[i],ctx),out,ctx)}return}if(t==="compare"){for(let i=0;i<node.panels.length;i++){if(node.panels[i].body)collectText(parseBlocks(node.panels[i].body,ctx),out,ctx)}return}if(t==="kanban"){for(let i=0;i<node.colData.length;i++){if(node.colData[i].body)collectText(parseBlocks(node.colData[i].body,ctx),out,ctx)}return}}let __lastMeta=null;let __mdPlainKey=null,__mdPlainVal=null;function mdPlain(md){if(!md)return"";if(md===__mdPlainKey)return __mdPlainVal;const ctx=createContext();ctx.stamp=__cmHash(md);preScanRefLinks(md,ctx);const ast=parseBlocks(md,ctx);const buf=[];collectText(ast,buf,ctx);__mdPlainKey=md;__mdPlainVal=buf.join("").replace(/[ \t]+/g," ").replace(/\n{3,}/g,"\n\n").trim();return __mdPlainVal}function cnt(md){const text=mdPlain(md);const cn=text.match(/[\u4e00-\u9fa5]/g)||[];const en=text.match(/[a-zA-Z0-9_]+/g)||[];return cn.length+en.length}function __fmYamlLike(b){var L=b.split("\n"),k=false;for(var i=0;i<L.length;i++){var s=L[i];if(!s.trim())continue;if(/^\s*#/.test(s))continue;if(/^\s*[^\s#][^:]*:(\s|$)/.test(s)){k=true;continue}if(/^\s*-\s+/.test(s)){k=true;continue}if(/^\s/.test(s))continue;if(/^\s*[\[{]/.test(s)){k=true;continue}return false}return b.trim()===""||k}function __normDoc(s){s=s.replace(/\u0000/g,"�").replace(/^\uFEFF/,"");var m=/^(?:[ \t]*\n)*---[ \t]*\n(?:([\s\S]*?)\n)?---[ \t]*(?:\n|$)/.exec(s);if(!m)return s;if(!(m[1]||"").trim()&&!s.slice(m[0].length).trim())return s;if(!__fmYamlLike(m[1]||""))return s;return s.slice(m[0].length)}function validate(markdown,userConfig){if(!markdown)return[];let md=__normDoc(String(markdown).replace(/\r\n?/g,"\n"));const ctx=createContext(userConfig);ctx.stamp=userConfig&&userConfig.seed!==undefined?String(userConfig.seed):__cmHash(md);try{md=__cmRefJoinLabel(md.split("\n"),ctx).join("\n");preScanRefLinks(md,ctx);const __ast=parseBlocks(md,ctx);try{renderNode(__ast,ctx)}catch(__e){}}catch(e){return[{type:"parse-error",message:e.message}]}const __w=ctx.__warnings||[];const __seen={};return __w.filter(function(w){const k=w.type+"|"+(w.key||w.kind||w.value||w.container||"");if(__seen[k])return false;__seen[k]=true;return true})}function __securityWalk(n,out,seen){if(!n||typeof n!=="object"||seen.indexOf(n)>=0)return;seen.push(n);if(Array.isArray(n)){for(let i=0;i<n.length;i++)__securityWalk(n[i],out,seen);return}const keys=["href","url","verify","src"];for(let k=0;k<keys.length;k++){const v=n[keys[k]];if(typeof v!=="string"||!v)continue;const raw=__cmDecodeEntities(v).replace(/[\u0000-\u001F\u007F]/g,"").trim();if(!raw)continue;const safe=keys[k]==="src"?!!__cmSafeImgSrc(raw):isSafeHref(raw);if(!safe)out.push({type:"unsafe-url",attribute:keys[k],value:v})}for(const p in n){if(p==="config"||p==="i18n"||p==="__warnings")continue;__securityWalk(n[p],out,seen)}}function validateSecurity(markdown,userConfig){if(!markdown)return[];let md=__normDoc(String(markdown).replace(/\r\n?/g,"\n"));const cfg=Object.assign({},userConfig||{},{html:false});const ctx=createContext(cfg);ctx.stamp=userConfig&&userConfig.seed!==undefined?String(userConfig.seed):__cmHash(md);try{md=__cmRefJoinLabel(md.split("\n"),ctx).join("\n");preScanRefLinks(md,ctx);const ast=parseBlocks(md,ctx);const findings=[];try{renderNode(ast,ctx)}catch(__e){}__securityWalk(ast,findings,[]);const ws=ctx.__warnings||[];for(let i=0;i<ws.length;i++){if(ws[i].type==="qr-sensitive-url")findings.push(ws[i])}return findings}catch(e){return[{type:"parse-error",message:e.message}]}}function renderMarkdownWithMeta(markdown,userConfig){const prev=__lastMeta;__lastMeta=null;let html,meta={};try{html=renderMarkdown(markdown,userConfig);meta=__lastMeta||{}}finally{__lastMeta=prev}return{html:html,meta:meta}}function initScrollFade(root){if(typeof document==="undefined")return;const box=root&&root.querySelectorAll?root:document;const els=box.querySelectorAll(".dl-hash");for(const el of els){if(el.dataset.dlFadeInit==="1")continue;el.dataset.dlFadeInit="1";const update=()=>{const max=el.scrollWidth-el.clientWidth;if(max<=1){el.classList.remove("is-overflowing","fade-l","fade-r");return}el.classList.add("is-overflowing");el.classList.toggle("fade-l",el.scrollLeft>1);el.classList.toggle("fade-r",el.scrollLeft<max-1)};el.addEventListener("scroll",update,{passive:true});if(typeof window!=="undefined"&&window.ResizeObserver){const ro=new window.ResizeObserver(update);ro.observe(el);const tx=el.querySelector(".md-copy-text");if(tx)ro.observe(tx)}update()}}var __AST_DROP={_pos:1,suffix:1,cls:1,langKey:1,num:1,foldInit:1,sub:1,__looseSelf:1,inline:1,stamp:1,hostConfig:1,locked:1,config:1,env:1,i18n:1,_md:1,__reset:1,__resetConfig:1,_list:1,__cmDepth:1,noSmart:1};function __posAt(src,off){var ln=1,col=1;for(var i=0;i<off&&i<src.length;i++){if(src.charCodeAt(i)===10){ln++;col=1}else col++}return{line:ln,column:col,offset:off}}function __lineStart(src,off){var p=src.lastIndexOf("\n",Math.max(0,off-1))+1;return p}function __lineEnd(src,off){var p=src.indexOf("\n",off);return p<0?src.length:p}function __span(start,end){return{start:{line:start.line,column:start.column,offset:start.offset},end:{line:end.line,column:end.column,offset:end.offset}}}function __refineSpan(src,node,base){if(!node||typeof node!=="object")return;var t=node.type;if(t==="root"){node.position=__span(__posAt(src,0),__posAt(src,src.length));return}var p=node.position;var st=p?p.start.offset:0,en=p?p.end.offset:0,ls,le,line,c,oi,ci,nx,cl;if(t==="thematicBreak"){var re=/^ {0,3}(?:(?:\*[ \t]*){3,}|(?:-[ \t]*){3,}|(?:_[ \t]*){3,})$/,lines=src.split("\n"),off=0;for(var i=0;i<lines.length;i++){if(re.test(lines[i])){node.position=__span(__posAt(src,off),__posAt(src,off+lines[i].length));return}off+=lines[i].length+1}return}if(t==="table"){var hs=node.headers&&node.headers[0],rs=node.rows&&node.rows[node.rows.length-1];var hp=hs&&hs.children&&hs.children[0]&&hs.children[0].position,rp=rs&&rs.length&&rs[0].children&&rs[0].children[0]&&rs[0].children[0].position;if(hp){ls=__lineStart(src,hp.start.offset);le=__lineEnd(src,hp.start.offset);if(/^ {0,3}\|/.test(src.slice(ls,le)))st=ls}if(rp){var re=__lineEnd(src,rp.start.offset);en=re}if(st<0)st=0;if(en<st)en=st;node.position=__span(__posAt(src,st),__posAt(src,en));return}if(t==="heading"){ls=__lineStart(src,st);le=__lineEnd(src,st);line=src.slice(ls,le);if(/^ {0,3}#{1,6}[ \t]/.test(line)){st=ls;en=le}else if(le<src.length){var ne=__lineEnd(src,le+1),ul=src.slice(le+1,ne);if(/^ {0,3}(?:===+|---+)[ \t]*$/.test(ul)){st=ls;en=ne}}}else if(t==="strong"){c=src.slice(st-2,st);if(c==="**"||c==="__")st-=2;c=src.slice(en,en+2);if(c==="**"||c==="__")en+=2}else if(t==="emphasis"){c=src.charAt(st-1);if(c==="*"||c==="_")st--;c=src.charAt(en);if(c==="*"||c==="_")en++}else if(t==="delete"){if(src.slice(st-2,st)==="~~")st-=2;else if(src.charAt(st-1)==="~")st--;if(src.slice(en,en+2)==="~~")en+=2;else if(src.charAt(en)==="~")en++}else if(t==="mark"){if(src.slice(st-2,st)==="==")st-=2;if(src.slice(en,en+2)==="==")en+=2}else if(t==="code"){var q=st;while(q>0&&src.charAt(q-1)==="`")q--;st=q;var r=en;while(r<src.length&&src.charAt(r)==="`")r++;en=r}else if(t==="wikiLink"){if(src.slice(st-2,st)==="[[")st-=2;if(src.slice(en,en+2)==="]]")en+=2}else if(t==="link"){if(!node.position||st===0){var hp=src.indexOf(String(node.href||""),0);if(hp>0){st=hp;en=hp+String(node.href).length}}oi=src.lastIndexOf("[",st);if(oi>=0&&st-oi<=500)st=oi;ci=src.indexOf("]",en);if(ci>=0&&ci-en<=500){en=ci+1;nx=src.charAt(en);if(nx==="("||nx==="["){cl=src.indexOf(nx==="("?")":"]",en+1);if(cl>=0)en=cl+1}}}else if(t==="image"){oi=src.lastIndexOf("![",st);if(oi>=0&&st-oi<=500)st=oi;ci=src.indexOf(")",en);if(ci>=0&&ci-en<=500)en=ci+1}else if(t==="blockquote"){ls=__lineStart(src,st);line=src.slice(ls,__lineEnd(src,st));if(/^ {0,3}>/.test(line))st=ls}else if(t==="list"||t==="listItem"){ls=__lineStart(src,st);line=src.slice(ls,__lineEnd(src,st));if(/^ {0,6}(?:[-*+]|\d+[.)])[ \t]/.test(line))st=ls}else if(t==="codeBlock"||t==="htmlBlock"){ls=__lineStart(src,st);line=src.slice(ls,__lineEnd(src,st));if(t==="codeBlock"&&/^ {0,3}(`{3,}|~{3,})/.test(line)){st=ls;var f=line.match(/^ {0,3}(`{3,}|~{3,})/)[1],fc=f.charAt(0),fl=f.length,lines=src.split("\n"),cursor=src.indexOf("\n",ls)+1;for(var j=0;j<lines.length&&cursor<=src.length;j++){var le2=__lineEnd(src,cursor),seg=src.slice(cursor,le2);if(new RegExp("^ {0,3}"+(fc==="`"?"`":"~")+"{"+fl+",}[ \\t]*$").test(seg)){en=le2;break}cursor=le2+1;if(cursor>src.length)break}}else if(t==="htmlBlock"){st=ls}}if(st<0)st=0;if(en<st)en=st;node.position=__span(__posAt(src,st),__posAt(src,en))}function __astClean(v,withPos,src,cur){if(v==null||typeof v!=="object")return v;if(Object.prototype.toString.call(v)==="[object Date]")return v.getTime();if(Array.isArray(v)){var a=[];for(var i=0;i<v.length;i++)a.push(__astClean(v[i],withPos,src,cur));return a}var out={},keys=Object.keys(v);for(var k=0;k<keys.length;k++){var key=keys[k];if(__AST_DROP[key])continue;if(key.charAt(0)==="_")continue;out[key]=__astClean(v[key],withPos,src,cur)}if(withPos&&src&&cur){var tv=v.value!=null?String(v.value):v.text!=null?String(v.text):v.code!=null?String(v.code):v.raw!=null?String(v.raw):v.src!=null?String(v.src):v.target!=null?String(v.target):v.options&&v.options.length?String(v.options[0]):null;if(tv&&tv.length){var p=src.indexOf(tv,cur.p);if(p<0)p=src.indexOf(tv);if(p>=0){cur.p=p+tv.length;var s0=__posAt(src,p),s1=__posAt(src,p+tv.length);out.position={start:s0,end:s1}}}}if(withPos&&out.position===undefined&&Array.isArray(out.items)&&out.items.length){var f1=out.items[0],z1=out.items[out.items.length-1];if(f1&&f1.position&&z1&&z1.position){out.position=__span(f1.position.start,z1.position.end)}}if(withPos&&out.position===undefined&&Array.isArray(out.children)&&out.children.length){var f0=out.children[0],lz=out.children[out.children.length-1];if(f0&&f0.position&&lz&&lz.position){out.position=__span(f0.position.start,lz.position.end)}}if(out.type==="listItem"&&out.children===undefined&&out.value===undefined){var alt=v.inline!==undefined?v.inline:v._inline!==undefined?v._inline:undefined;if(alt!==undefined)out.children=__astClean(alt,withPos,src,cur)}if(withPos&&out.position===undefined&&out.type==="listItem"&&Array.isArray(out.children)&&out.children.length){var f2=out.children[0],z2=out.children[out.children.length-1];if(f2&&f2.position&&z2&&z2.position){out.position=__span(f2.position.start,z2.position.end)}}if(withPos&&out.type)__refineSpan(src,out,cur);return out}function __astFreeze(o){if(o&&typeof o==="object"&&!Object.isFrozen(o)){Object.keys(o).forEach(function(k){__astFreeze(o[k])});try{Object.freeze(o)}catch(e){}}return o}function __astContext(userConfig){var ctx=createContext(userConfig);ctx.stamp=userConfig&&userConfig.seed!==undefined?String(userConfig.seed):"ast";return ctx}function parseToAst(markdown,userConfig){var src=String(markdown==null?"":markdown).replace(/\r\n?/g,"\n");src=__normDoc(src);var ctx=__astContext(userConfig);if(ctx.config.gfm===false&&ctx.locked.indexOf("table")===-1)ctx.config.table=false;try{src=__cmRefJoinLabel(src.split("\n"),ctx).join("\n");preScanRefLinks(src,ctx);var ast=parseBlocks(src,ctx);return __astFreeze(__astClean(ast,true,src,{p:0}))}catch(e){return __astFreeze({type:"root",children:[],error:{message:String(e&&e.message||e)}})}}function tokenizeInline(text,userConfig,options){var src=String(text==null?"":text).replace(/\u0000/g,"�");var ctx=__astContext(userConfig);if(options&&options.noAbbr)ctx.config.abbr=false;try{var tokens=parseInline(src,ctx,!!(options&&options.noAbbr));return __astFreeze(__astClean(tokens,true,src,{p:0}))}catch(e){return __astFreeze([])}}var __customLintRules=Object.create(null);var LINT_RULES={headingOrder:{severity:"warning",message:"标题层级跳跃:h{depth} 前一级是 h{prev}"},duplicateHeadingId:{severity:"error",message:"重复的标题 id:{id}"},duplicateHeadingText:{severity:"warning",message:"重复的标题文本:{text}"},imageAlt:{severity:"warning",message:"图片缺少 alt 文本"},externalLinkRel:{severity:"warning",message:'外链缺少 rel="noopener"'},emptyLinkText:{severity:"warning",message:"链接文本为空:{href}"},brokenReference:{severity:"error",message:"引用缺少定义:{label}"},duplicateDefinition:{severity:"warning",message:"重复的引用定义:{label}"},emptyHeading:{severity:"warning",message:"标题为空"},inlineHtml:{severity:"info",message:"包含原始 HTML"},trailingSpace:{severity:"info",message:"行尾有多余空格"}};var LINT_DESC={headingOrder:"标题层级一次跳跃多级(如 h1 直接到 h3),会破坏文档大纲;建议补齐中间层级。",duplicateHeadingId:"两个标题生成了相同 id,锚点链接会指向第一个;建议用 {#id} 显式区分。",duplicateHeadingText:"多个标题文本完全相同,目录与检索难以区分;建议改写或补充限定词。",imageAlt:"图片缺少 alt,屏幕阅读器无法描述内容;建议补 ![描述](src)。",externalLinkRel:"外链缺少 rel=\"noopener\",新版浏览器虽默认隔离,仍建议显式声明。",emptyLinkText:"链接文本为空,读屏与 SEO 都无法识别目标;建议补可见文字。",brokenReference:"使用了 [label] 引用但全文没有对应定义,会原样输出方括号;建议补定义或改成行内链接。",duplicateDefinition:"同一 label 定义了多次,只有第一个生效;建议合并或删除冗余。",emptyHeading:"标题没有任何文本,会生成空锚点;建议补内容或删除。",inlineHtml:"正文含原始 HTML,html:false 时会整体转义;确认是否必要。",trailingSpace:"行尾有空格,多数情况无意义(两空格是硬换行);建议清理。"};for(var __dk in LINT_DESC)if(LINT_RULES[__dk])LINT_RULES[__dk].description=LINT_DESC[__dk];function registerLintRule(id,meta,check){if(!id||typeof id!=="string")throw new TypeError("registerLintRule: id must be a non-empty string");if(typeof check!=="function")throw new TypeError("registerLintRule: check must be a function");var m=meta||{};LINT_RULES[id]={severity:m.severity||"warning",message:m.message||id,description:m.description||"",fixable:!!m.fixable,custom:true};__customLintRules[id]=check;return function(){delete LINT_RULES[id];delete __customLintRules[id]}}function unregisterLintRule(id){if(!id)return false;var had=!!__customLintRules[id];delete __customLintRules[id];if(LINT_RULES[id]&&LINT_RULES[id].custom)delete LINT_RULES[id];return had}function listLintRules(){var out={};for(var k in LINT_RULES)if(Object.prototype.hasOwnProperty.call(LINT_RULES,k))out[k]=Object.assign({},LINT_RULES[k],{id:k});return out}function lintMarkdown(markdown,userConfig,options){var src=String(markdown==null?"":markdown).replace(/\r\n?/g,"\n");var cfg=userConfig||{},opts=options||{};var enabled=opts.rules||null,sevOverride=opts.severity||{};var diags=[];function add(rule,pos,data,extra){if(enabled&&enabled.indexOf(rule)<0)return;var meta=LINT_RULES[rule]||{severity:"warning",message:rule};var msg=meta.message.replace(/\{(\w+)\}/g,function(_,k){return data&&data[k]!=null?String(data[k]):""});var d={rule:rule,severity:sevOverride[rule]||meta.severity,message:msg};if(pos)d.position=pos;if(extra)for(var ek in extra)d[ek]=extra[ek];diags.push(d)}function posOf(off,len){return{start:__posAt(src,off),end:__posAt(src,off+Math.max(1,len||1))}}var ast=parseToAst(src,cfg);var lineTexts=src.split("\n");var seenIds=Object.create(null),prevDepth=0,seenTexts=Object.create(null);function walk(n){if(!n||typeof n!=="object")return;if(n.type==="heading"){var d=n.depth||0;if(prevDepth&&d>prevDepth+1)add("headingOrder",n.position,{depth:d,prev:prevDepth});prevDepth=d;var txt=plainOf(n);if(n.id){if(seenIds[n.id])add("duplicateHeadingId",n.position,{id:n.id},{firstLine:seenIds[n.id]});else seenIds[n.id]=n.position&&n.position.start.line||0}if(txt.trim()){var key=txt.trim().toLowerCase();if(seenTexts[key])add("duplicateHeadingText",n.position,{text:txt.trim()},{firstLine:seenTexts[key]});else seenTexts[key]=n.position&&n.position.start.line||0}if(!txt.trim())add("emptyHeading",n.position)}if(n.type==="image"&&(!n.alt||!String(n.alt).trim()))add("imageAlt",n.position,{src:n.src});if(n.type==="link"){if(/^https?:\/\//i.test(String(n.href||""))){var rel=String(n.rel||"").toLowerCase();if(rel.indexOf("noopener")<0)add("externalLinkRel",n.position,{href:n.href})}var lt=plainOf(n);if(!lt.trim())add("emptyLinkText",n.position,{href:n.href||""})}if(n.type==="html"||n.type==="htmlBlock")add("inlineHtml",n.position);var kids=n.children||n.items||[];for(var i=0;i<kids.length;i++)walk(kids[i])}walk(ast);var defs=Object.create(null),defLines=Object.create(null),defRe=/^ {0,3}\[([^\]]+)\]:[ \t]*\S/,df,lineOff=0;for(var li2=0;li2<lineTexts.length;li2++){var line=lineTexts[li2];if(df=defRe.exec(line)){var key=df[1].replace(/\s+/g," ").trim().toLowerCase();if(defs[key])add("duplicateDefinition",posOf(lineOff+df.index,df[0].length),{label:df[1]},{firstLine:defLines[key]});else{defs[key]=true;defLines[key]=li2+1}}lineOff+=line.length+1}var refRe=/!?\[([^\]]*)\]\[([^\]]*)\]/g,rm;function scanRefs(n){if(!n||typeof n!=="object")return;if(n.type==="text"&&typeof n.value==="string"){var v=n.value,base=n.position&&n.position.start.offset||0;refRe.lastIndex=0;while(rm=refRe.exec(v)){var label=(rm[2]||rm[1]).replace(/\s+/g," ").trim().toLowerCase();if(label&&!defs[label])add("brokenReference",posOf(base+rm.index,rm[0].length),{label:rm[2]||rm[1]})}}var kids=n.children||n.items||[];for(var i=0;i<kids.length;i++)scanRefs(kids[i])}scanRefs(ast);if(!enabled||enabled.indexOf("trailingSpace")>=0){for(var li3=0;li3<lineTexts.length;li3++){var l=lineTexts[li3];if(/[ \t]+$/.test(l)&&l.trim())add("trailingSpace",{start:{line:li3+1,column:l.replace(/[ \t]+$/,"").length+1,offset:0},end:{line:li3+1,column:l.length+1,offset:0}},{line:li3+1})}}for(var __cr in __customLintRules){if(enabled&&enabled.indexOf(__cr)<0)continue;try{(function(rid,fn){fn(ast,src,function(pos,data,extra){add(rid,pos,data,extra)})})(__cr,__customLintRules[__cr])}catch(e){add(__cr,null,{error:String(e&&e.message||e)},{internal:true})}}diags.sort(function(a,b){var la=a.position&&a.position.start.line||0,lb=b.position&&b.position.start.line||0;return la-lb});return diags}function plainOf(n){if(!n)return"";if(typeof n.value==="string")return n.value;if(n.type==="image")return n.alt||"";var parts=[];var kids=n.children||n.items||[];for(var i=0;i<kids.length;i++)parts.push(plainOf(kids[i]));return parts.join("")}var __plugins=[];var __pluginErrors=[];function usePlugin(plugin){if(!plugin||typeof plugin!=="object")return function(){};var entry={name:String(plugin.name||"plugin"),renderers:plugin.renderers||null,before:plugin.before||null,after:plugin.after||null,config:plugin.config||null};__plugins.push(entry);__syncPluginRenderers();return function(){var i=__plugins.indexOf(entry);if(i>=0){__plugins.splice(i,1);__syncPluginRenderers()}}}var __origRenderers=Object.create(null);function __wrapRenderer(fn,type,pname){return function(){try{return fn.apply(null,arguments)}catch(e){__pluginErrors.push({plugin:pname,hook:"renderer:"+type,error:String(e&&e.message||e)});var o=__origRenderers[type];return o?o.apply(null,arguments):""}}}function __syncPluginRenderers(){for(var t in __origRenderers){if(Object.prototype.hasOwnProperty.call(__origRenderers,t))RENDERERS[t]=__origRenderers[t]}for(var i=0;i<__plugins.length;i++){var rs=__plugins[i].renderers;if(!rs)continue;for(var k in rs){if(typeof rs[k]!=="function")continue;if(!__origRenderers[k])__origRenderers[k]=RENDERERS[k];var fn=rs[k];RENDERERS[k]=__wrapRenderer(fn,k,__plugins[i].name)}}}function __pluginBefore(html,ctx){for(var i=0;i<__plugins.length;i++){var f=__plugins[i].before;if(typeof f==="function"){try{var r=f(html,ctx);if(typeof r==="string")html=r}catch(e){__pluginErrors.push({plugin:__plugins[i].name,hook:"before",error:String(e&&e.message||e)})}}}return html}function __pluginAfter(html,ctx){for(var i=0;i<__plugins.length;i++){var f=__plugins[i].after;if(typeof f==="function"){try{var r=f(html,ctx);if(typeof r==="string")html=r}catch(e){__pluginErrors.push({plugin:__plugins[i].name,hook:"after",error:String(e&&e.message||e)})}}}return html}function listPlugins(details){if(details)return __plugins.map(function(p){return{name:p.name,renderers:p.renderers?Object.keys(p.renderers):[],before:!!p.before,after:!!p.after,config:p.config||null}});return __plugins.map(function(p){return p.name})}function pluginErrors(){return __pluginErrors.slice()}function clearPluginErrors(){__pluginErrors.length=0}const __ksApi={VERSION:VERSION,usePlugin:usePlugin,listPlugins:listPlugins,pluginErrors:pluginErrors,clearPluginErrors:clearPluginErrors,registerLintRule:registerLintRule,unregisterLintRule:unregisterLintRule,listLintRules:listLintRules,lintMarkdown:lintMarkdown,lintRules:Object.assign({},LINT_RULES),parseToAst:parseToAst,tokenizeInline:tokenizeInline,renderMarkdown:renderMarkdown,markdownToPlainText:mdPlain,countWords:cnt,validate:validate,validateSecurity:validateSecurity,renderMarkdownWithMeta:renderMarkdownWithMeta,initScrollFade:initScrollFade};if(typeof module!=="undefined"&&module.exports){module.exports=__ksApi}if(typeof window!=="undefined"){window.KSMarkdown=__ksApi;window.renderMarkdown=renderMarkdown}})();