UNPKG

ckeditor4

Version:

JavaScript WYSIWYG web text editor.

468 lines 97.6 kB
/*! Highlight.js v11.10.0 (git: 263980c628) (c) 2006-2025 Josh Goebel <hello@joshgoebel.com> and other contributors License: BSD-3-Clause */ var hljs=function(){"use strict";function e(n){ return n instanceof Map?n.clear=n.delete=n.set=()=>{ throw Error("map is read-only")}:n instanceof Set&&(n.add=n.clear=n.delete=()=>{ throw Error("set is read-only") }),Object.freeze(n),Object.getOwnPropertyNames(n).forEach((t=>{ const a=n[t],i=typeof a;"object"!==i&&"function"!==i||Object.isFrozen(a)||e(a) })),n}class n{constructor(e){ void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1} ignoreMatch(){this.isMatchIgnored=!0}}function t(e){ return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;") }function a(e,...n){const t=Object.create(null);for(const n in e)t[n]=e[n] ;return n.forEach((e=>{for(const n in e)t[n]=e[n]})),t}const i=e=>!!e.scope ;class r{constructor(e,n){ this.buffer="",this.classPrefix=n.classPrefix,e.walk(this)}addText(e){ this.buffer+=t(e)}openNode(e){if(!i(e))return;const n=((e,{prefix:n})=>{ if(e.startsWith("language:"))return e.replace("language:","language-") ;if(e.includes(".")){const t=e.split(".") ;return[`${n}${t.shift()}`,...t.map(((e,n)=>`${e}${"_".repeat(n+1)}`))].join(" ") }return`${n}${e}`})(e.scope,{prefix:this.classPrefix});this.span(n)} closeNode(e){i(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){ this.buffer+=`<span class="${e}">`}}const s=(e={})=>{const n={children:[]} ;return Object.assign(n,e),n};class o{constructor(){ this.rootNode=s(),this.stack=[this.rootNode]}get top(){ return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){ this.top.children.push(e)}openNode(e){const n=s({scope:e}) ;this.add(n),this.stack.push(n)}closeNode(){ if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){ for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)} walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,n){ return"string"==typeof n?e.addText(n):n.children&&(e.openNode(n), n.children.forEach((n=>this._walk(e,n))),e.closeNode(n)),e}static _collapse(e){ "string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{ o._collapse(e)})))}}class c extends o{constructor(e){super(),this.options=e} addText(e){""!==e&&this.add(e)}startScope(e){this.openNode(e)}endScope(){ this.closeNode()}__addSublanguage(e,n){const t=e.root ;n&&(t.scope="language:"+n),this.add(t)}toHTML(){ return new r(this,this.options).value()}finalize(){ return this.closeAllNodes(),!0}}function l(e){ return e?"string"==typeof e?e:e.source:null}function d(e){return u("(?=",e,")")} function g(e){return u("(?:",e,")*")}function b(e){return u("(?:",e,")?")} function u(...e){return e.map((e=>l(e))).join("")}function m(...e){const n=(e=>{ const n=e[e.length-1] ;return"object"==typeof n&&n.constructor===Object?(e.splice(e.length-1,1),n):{} })(e);return"("+(n.capture?"":"?:")+e.map((e=>l(e))).join("|")+")"} function p(e){return RegExp(e.toString()+"|").exec("").length-1} const h=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./ ;function _(e,{joinWith:n}){let t=0;return e.map((e=>{t+=1;const n=t ;let a=l(e),i="";for(;a.length>0;){const e=h.exec(a);if(!e){i+=a;break} i+=a.substring(0,e.index), a=a.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?i+="\\"+(Number(e[1])+n):(i+=e[0], "("===e[0]&&t++)}return i})).map((e=>`(${e})`)).join(n)} const f="[a-zA-Z]\\w*",E="[a-zA-Z_]\\w*",y="\\b\\d+(\\.\\d+)?",v="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",w="\\b(0b[01]+)",N={ begin:"\\\\[\\s\\S]",relevance:0},x={scope:"string",begin:"'",end:"'", illegal:"\\n",contains:[N]},k={scope:"string",begin:'"',end:'"',illegal:"\\n", contains:[N]},O=(e,n,t={})=>{const i=a({scope:"comment",begin:e,end:n, contains:[]},t);i.contains.push({scope:"doctag", begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)", end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0}) ;const r=m("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/) ;return i.contains.push({begin:u(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i },M=O("//","$"),S=O("/\\*","\\*/"),A=O("#","$");var C=Object.freeze({ __proto__:null,APOS_STRING_MODE:x,BACKSLASH_ESCAPE:N,BINARY_NUMBER_MODE:{ scope:"number",begin:w,relevance:0},BINARY_NUMBER_RE:w,COMMENT:O, C_BLOCK_COMMENT_MODE:S,C_LINE_COMMENT_MODE:M,C_NUMBER_MODE:{scope:"number", begin:v,relevance:0},C_NUMBER_RE:v,END_SAME_AS_BEGIN:e=>Object.assign(e,{ "on:begin":(e,n)=>{n.data._beginMatch=e[1]},"on:end":(e,n)=>{ n.data._beginMatch!==e[1]&&n.ignoreMatch()}}),HASH_COMMENT_MODE:A,IDENT_RE:f, MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:{begin:"\\.\\s*"+E,relevance:0}, NUMBER_MODE:{scope:"number",begin:y,relevance:0},NUMBER_RE:y, PHRASAL_WORDS_MODE:{ begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ },QUOTE_STRING_MODE:k,REGEXP_MODE:{scope:"regexp",begin:/\/(?=[^/\n]*\/)/, end:/\/[gimuy]*/,contains:[N,{begin:/\[/,end:/\]/,relevance:0,contains:[N]}]}, RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", SHEBANG:(e={})=>{const n=/^#![ ]*\// ;return e.binary&&(e.begin=u(n,/.*\b/,e.binary,/\b.*/)),a({scope:"meta",begin:n, end:/$/,relevance:0,"on:begin":(e,n)=>{0!==e.index&&n.ignoreMatch()}},e)}, TITLE_MODE:{scope:"title",begin:f,relevance:0},UNDERSCORE_IDENT_RE:E, UNDERSCORE_TITLE_MODE:{scope:"title",begin:E,relevance:0}});function T(e,n){ "."===e.input[e.index-1]&&n.ignoreMatch()}function R(e,n){ void 0!==e.className&&(e.scope=e.className,delete e.className)}function I(e,n){ n&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)", e.__beforeBegin=T,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords, void 0===e.relevance&&(e.relevance=0))}function D(e,n){ Array.isArray(e.illegal)&&(e.illegal=m(...e.illegal))}function B(e,n){ if(e.match){ if(e.begin||e.end)throw Error("begin & end are not supported with match") ;e.begin=e.match,delete e.match}}function L(e,n){ void 0===e.relevance&&(e.relevance=1)}const $=(e,n)=>{if(!e.beforeMatch)return ;if(e.starts)throw Error("beforeMatch cannot be used with starts") ;const t=Object.assign({},e);Object.keys(e).forEach((n=>{delete e[n] })),e.keywords=t.keywords,e.begin=u(t.beforeMatch,d(t.begin)),e.starts={ relevance:0,contains:[Object.assign(t,{endsParent:!0})] },e.relevance=0,delete t.beforeMatch },j=["of","and","for","in","not","or","if","then","parent","list","value"],z="keyword" ;function P(e,n,t=z){const a=Object.create(null) ;return"string"==typeof e?i(t,e.split(" ")):Array.isArray(e)?i(t,e):Object.keys(e).forEach((t=>{ Object.assign(a,P(e[t],n,t))})),a;function i(e,t){ n&&(t=t.map((e=>e.toLowerCase()))),t.forEach((n=>{const t=n.split("|") ;a[t[0]]=[e,U(t[0],t[1])]}))}}function U(e,n){ return n?Number(n):(e=>j.includes(e.toLowerCase()))(e)?0:1}const H={},K=e=>{ console.error(e)},F=(e,...n)=>{console.log("WARN: "+e,...n)},q=(e,n)=>{ H[`${e}/${n}`]||(console.log(`Deprecated as of ${e}. ${n}`),H[`${e}/${n}`]=!0) },Z=Error();function G(e,n,{key:t}){let a=0;const i=e[t],r={},s={} ;for(let e=1;e<=n.length;e++)s[e+a]=i[e],r[e+a]=!0,a+=p(n[e-1]) ;e[t]=s,e[t]._emit=r,e[t]._multi=!0}function W(e){(e=>{ e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope, delete e.scope)})(e),"string"==typeof e.beginScope&&(e.beginScope={ _wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope }),(e=>{if(Array.isArray(e.begin)){ if(e.skip||e.excludeBegin||e.returnBegin)throw K("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), Z ;if("object"!=typeof e.beginScope||null===e.beginScope)throw K("beginScope must be object"), Z;G(e,e.begin,{key:"beginScope"}),e.begin=_(e.begin,{joinWith:""})}})(e),(e=>{ if(Array.isArray(e.end)){ if(e.skip||e.excludeEnd||e.returnEnd)throw K("skip, excludeEnd, returnEnd not compatible with endScope: {}"), Z ;if("object"!=typeof e.endScope||null===e.endScope)throw K("endScope must be object"), Z;G(e,e.end,{key:"endScope"}),e.end=_(e.end,{joinWith:""})}})(e)}function Q(e){ function n(n,t){ return RegExp(l(n),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(t?"g":"")) }class t{constructor(){ this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0} addRule(e,n){ n.position=this.position++,this.matchIndexes[this.matchAt]=n,this.regexes.push([n,e]), this.matchAt+=p(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null) ;const e=this.regexes.map((e=>e[1]));this.matcherRe=n(_(e,{joinWith:"|" }),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex ;const n=this.matcherRe.exec(e);if(!n)return null ;const t=n.findIndex(((e,n)=>n>0&&void 0!==e)),a=this.matchIndexes[t] ;return n.splice(0,t),Object.assign(n,a)}}class i{constructor(){ this.rules=[],this.multiRegexes=[], this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){ if(this.multiRegexes[e])return this.multiRegexes[e];const n=new t ;return this.rules.slice(e).forEach((([e,t])=>n.addRule(e,t))), n.compile(),this.multiRegexes[e]=n,n}resumingScanAtSamePosition(){ return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,n){ this.rules.push([e,n]),"begin"===n.type&&this.count++}exec(e){ const n=this.getMatcher(this.regexIndex);n.lastIndex=this.lastIndex ;let t=n.exec(e) ;if(this.resumingScanAtSamePosition())if(t&&t.index===this.lastIndex);else{ const n=this.getMatcher(0);n.lastIndex=this.lastIndex+1,t=n.exec(e)} return t&&(this.regexIndex+=t.position+1, this.regexIndex===this.count&&this.considerAll()),t}} if(e.compilerExtensions||(e.compilerExtensions=[]), e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.") ;return e.classNameAliases=a(e.classNameAliases||{}),function t(r,s){const o=r ;if(r.isCompiled)return o ;[R,B,W,$].forEach((e=>e(r,s))),e.compilerExtensions.forEach((e=>e(r,s))), r.__beforeBegin=null,[I,D,L].forEach((e=>e(r,s))),r.isCompiled=!0;let c=null ;return"object"==typeof r.keywords&&r.keywords.$pattern&&(r.keywords=Object.assign({},r.keywords), c=r.keywords.$pattern, delete r.keywords.$pattern),c=c||/\w+/,r.keywords&&(r.keywords=P(r.keywords,e.case_insensitive)), o.keywordPatternRe=n(c,!0), s&&(r.begin||(r.begin=/\B|\b/),o.beginRe=n(o.begin),r.end||r.endsWithParent||(r.end=/\B|\b/), r.end&&(o.endRe=n(o.end)), o.terminatorEnd=l(o.end)||"",r.endsWithParent&&s.terminatorEnd&&(o.terminatorEnd+=(r.end?"|":"")+s.terminatorEnd)), r.illegal&&(o.illegalRe=n(r.illegal)), r.contains||(r.contains=[]),r.contains=[].concat(...r.contains.map((e=>(e=>(e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((n=>a(e,{ variants:null},n)))),e.cachedVariants?e.cachedVariants:X(e)?a(e,{ starts:e.starts?a(e.starts):null }):Object.isFrozen(e)?a(e):e))("self"===e?r:e)))),r.contains.forEach((e=>{t(e,o) })),r.starts&&t(r.starts,s),o.matcher=(e=>{const n=new i ;return e.contains.forEach((e=>n.addRule(e.begin,{rule:e,type:"begin" }))),e.terminatorEnd&&n.addRule(e.terminatorEnd,{type:"end" }),e.illegal&&n.addRule(e.illegal,{type:"illegal"}),n})(o),o}(e)}function X(e){ return!!e&&(e.endsWithParent||X(e.starts))}class V extends Error{ constructor(e,n){super(e),this.name="HTMLInjectionError",this.html=n}} const J=t,Y=a,ee=Symbol("nomatch"),ne=t=>{ const a=Object.create(null),i=Object.create(null),r=[];let s=!0 ;const o="Could not find the language '{}', did you forget to load/include a language module?",l={ disableAutodetect:!0,name:"Plain text",contains:[]};let p={ ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i, languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-", cssSelector:"pre code",languages:null,__emitter:c};function h(e){ return p.noHighlightRe.test(e)}function _(e,n,t){let a="",i="" ;"object"==typeof n?(a=e, t=n.ignoreIllegals,i=n.language):(q("10.7.0","highlight(lang, code, ...args) has been deprecated."), q("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), i=e,a=n),void 0===t&&(t=!0);const r={code:a,language:i};O("before:highlight",r) ;const s=r.result?r.result:f(r.language,r.code,t) ;return s.code=r.code,O("after:highlight",s),s}function f(e,t,i,r){ const c=Object.create(null);function l(){if(!O.keywords)return void S.addText(A) ;let e=0;O.keywordPatternRe.lastIndex=0;let n=O.keywordPatternRe.exec(A),t="" ;for(;n;){t+=A.substring(e,n.index) ;const i=w.case_insensitive?n[0].toLowerCase():n[0],r=(a=i,O.keywords[a]);if(r){ const[e,a]=r ;if(S.addText(t),t="",c[i]=(c[i]||0)+1,c[i]<=7&&(C+=a),e.startsWith("_"))t+=n[0];else{ const t=w.classNameAliases[e]||e;g(n[0],t)}}else t+=n[0] ;e=O.keywordPatternRe.lastIndex,n=O.keywordPatternRe.exec(A)}var a ;t+=A.substring(e),S.addText(t)}function d(){null!=O.subLanguage?(()=>{ if(""===A)return;let e=null;if("string"==typeof O.subLanguage){ if(!a[O.subLanguage])return void S.addText(A) ;e=f(O.subLanguage,A,!0,M[O.subLanguage]),M[O.subLanguage]=e._top }else e=E(A,O.subLanguage.length?O.subLanguage:null) ;O.relevance>0&&(C+=e.relevance),S.__addSublanguage(e._emitter,e.language) })():l(),A=""}function g(e,n){ ""!==e&&(S.startScope(n),S.addText(e),S.endScope())}function b(e,n){let t=1 ;const a=n.length-1;for(;t<=a;){if(!e._emit[t]){t++;continue} const a=w.classNameAliases[e[t]]||e[t],i=n[t];a?g(i,a):(A=i,l(),A=""),t++}} function u(e,n){ return e.scope&&"string"==typeof e.scope&&S.openNode(w.classNameAliases[e.scope]||e.scope), e.beginScope&&(e.beginScope._wrap?(g(A,w.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap), A=""):e.beginScope._multi&&(b(e.beginScope,n),A="")),O=Object.create(e,{parent:{ value:O}}),O}function m(e,t,a){let i=((e,n)=>{const t=e&&e.exec(n) ;return t&&0===t.index})(e.endRe,a);if(i){if(e["on:end"]){const a=new n(e) ;e["on:end"](t,a),a.isMatchIgnored&&(i=!1)}if(i){ for(;e.endsParent&&e.parent;)e=e.parent;return e}} if(e.endsWithParent)return m(e.parent,t,a)}function h(e){ return 0===O.matcher.regexIndex?(A+=e[0],1):(I=!0,0)}function _(e){ const n=e[0],a=t.substring(e.index),i=m(O,e,a);if(!i)return ee;const r=O ;O.endScope&&O.endScope._wrap?(d(), g(n,O.endScope._wrap)):O.endScope&&O.endScope._multi?(d(), b(O.endScope,e)):r.skip?A+=n:(r.returnEnd||r.excludeEnd||(A+=n), d(),r.excludeEnd&&(A=n));do{ O.scope&&S.closeNode(),O.skip||O.subLanguage||(C+=O.relevance),O=O.parent }while(O!==i.parent);return i.starts&&u(i.starts,e),r.returnEnd?0:n.length} let y={};function v(a,r){const o=r&&r[0];if(A+=a,null==o)return d(),0 ;if("begin"===y.type&&"end"===r.type&&y.index===r.index&&""===o){ if(A+=t.slice(r.index,r.index+1),!s){const n=Error(`0 width match regex (${e})`) ;throw n.languageName=e,n.badRule=y.rule,n}return 1} if(y=r,"begin"===r.type)return(e=>{ const t=e[0],a=e.rule,i=new n(a),r=[a.__beforeBegin,a["on:begin"]] ;for(const n of r)if(n&&(n(e,i),i.isMatchIgnored))return h(t) ;return a.skip?A+=t:(a.excludeBegin&&(A+=t), d(),a.returnBegin||a.excludeBegin||(A=t)),u(a,e),a.returnBegin?0:t.length})(r) ;if("illegal"===r.type&&!i){ const e=Error('Illegal lexeme "'+o+'" for mode "'+(O.scope||"<unnamed>")+'"') ;throw e.mode=O,e}if("end"===r.type){const e=_(r);if(e!==ee)return e} if("illegal"===r.type&&""===o)return 1 ;if(R>1e5&&R>3*r.index)throw Error("potential infinite loop, way more iterations than matches") ;return A+=o,o.length}const w=N(e) ;if(!w)throw K(o.replace("{}",e)),Error('Unknown language: "'+e+'"') ;const x=Q(w);let k="",O=r||x;const M={},S=new p.__emitter(p);(()=>{const e=[] ;for(let n=O;n!==w;n=n.parent)n.scope&&e.unshift(n.scope) ;e.forEach((e=>S.openNode(e)))})();let A="",C=0,T=0,R=0,I=!1;try{ if(w.__emitTokens)w.__emitTokens(t,S);else{for(O.matcher.considerAll();;){ R++,I?I=!1:O.matcher.considerAll(),O.matcher.lastIndex=T ;const e=O.matcher.exec(t);if(!e)break;const n=v(t.substring(T,e.index),e) ;T=e.index+n}v(t.substring(T))}return S.finalize(),k=S.toHTML(),{language:e, value:k,relevance:C,illegal:!1,_emitter:S,_top:O}}catch(n){ if(n.message&&n.message.includes("Illegal"))return{language:e,value:J(t), illegal:!0,relevance:0,_illegalBy:{message:n.message,index:T, context:t.slice(T-100,T+100),mode:n.mode,resultSoFar:k},_emitter:S};if(s)return{ language:e,value:J(t),illegal:!1,relevance:0,errorRaised:n,_emitter:S,_top:O} ;throw n}}function E(e,n){n=n||p.languages||Object.keys(a);const t=(e=>{ const n={value:J(e),illegal:!1,relevance:0,_top:l,_emitter:new p.__emitter(p)} ;return n._emitter.addText(e),n})(e),i=n.filter(N).filter(k).map((n=>f(n,e,!1))) ;i.unshift(t);const r=i.sort(((e,n)=>{ if(e.relevance!==n.relevance)return n.relevance-e.relevance ;if(e.language&&n.language){if(N(e.language).supersetOf===n.language)return 1 ;if(N(n.language).supersetOf===e.language)return-1}return 0})),[s,o]=r,c=s ;return c.secondBest=o,c}function y(e){let n=null;const t=(e=>{ let n=e.className+" ";n+=e.parentNode?e.parentNode.className:"" ;const t=p.languageDetectRe.exec(n);if(t){const n=N(t[1]) ;return n||(F(o.replace("{}",t[1])), F("Falling back to no-highlight mode for this block.",e)),n?t[1]:"no-highlight"} return n.split(/\s+/).find((e=>h(e)||N(e)))})(e);if(h(t))return ;if(O("before:highlightElement",{el:e,language:t }),e.dataset.highlighted)return void console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e) ;if(e.children.length>0&&(p.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(e)),p.throwUnescapedHTML))throw new V("One of your code blocks includes unescaped HTML.",e.innerHTML) ;n=e;const a=n.textContent,r=t?_(a,{language:t,ignoreIllegals:!0}):E(a) ;e.innerHTML=r.value,e.dataset.highlighted="yes",((e,n,t)=>{const a=n&&i[n]||t ;e.classList.add("hljs"),e.classList.add("language-"+a) })(e,t,r.language),e.result={language:r.language,re:r.relevance, relevance:r.relevance},r.secondBest&&(e.secondBest={ language:r.secondBest.language,relevance:r.secondBest.relevance }),O("after:highlightElement",{el:e,result:r,text:a})}let v=!1;function w(){ "loading"!==document.readyState?document.querySelectorAll(p.cssSelector).forEach(y):v=!0 }function N(e){return e=(e||"").toLowerCase(),a[e]||a[i[e]]} function x(e,{languageName:n}){"string"==typeof e&&(e=[e]),e.forEach((e=>{ i[e.toLowerCase()]=n}))}function k(e){const n=N(e) ;return n&&!n.disableAutodetect}function O(e,n){const t=e;r.forEach((e=>{ e[t]&&e[t](n)}))} "undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(()=>{ v&&w()}),!1),Object.assign(t,{highlight:_,highlightAuto:E,highlightAll:w, highlightElement:y, highlightBlock:e=>(q("10.7.0","highlightBlock will be removed entirely in v12.0"), q("10.7.0","Please use highlightElement now."),y(e)),configure:e=>{p=Y(p,e)}, initHighlighting:()=>{ w(),q("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")}, initHighlightingOnLoad:()=>{ w(),q("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.") },registerLanguage:(e,n)=>{let i=null;try{i=n(t)}catch(n){ if(K("Language definition for '{}' could not be registered.".replace("{}",e)), !s)throw n;K(n),i=l} i.name||(i.name=e),a[e]=i,i.rawDefinition=n.bind(null,t),i.aliases&&x(i.aliases,{ languageName:e})},unregisterLanguage:e=>{delete a[e] ;for(const n of Object.keys(i))i[n]===e&&delete i[n]}, listLanguages:()=>Object.keys(a),getLanguage:N,registerAliases:x, autoDetection:k,inherit:Y,addPlugin:e=>{(e=>{ e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=n=>{ e["before:highlightBlock"](Object.assign({block:n.el},n)) }),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=n=>{ e["after:highlightBlock"](Object.assign({block:n.el},n))})})(e),r.push(e)}, removePlugin:e=>{const n=r.indexOf(e);-1!==n&&r.splice(n,1)}}),t.debugMode=()=>{ s=!1},t.safeMode=()=>{s=!0},t.versionString="11.10.0",t.regex={concat:u, lookahead:d,either:m,optional:b,anyNumberOfTimes:g} ;for(const n in C)"object"==typeof C[n]&&e(C[n]);return Object.assign(t,C),t },te=ne({});te.newInstance=()=>ne({}) ;const ae="[A-Za-z$_][0-9A-Za-z$_]*",ie=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],re=["true","false","null","undefined","NaN","Infinity"],se=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],oe=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],ce=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],le=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],de=[].concat(ce,se,oe),ge=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video","defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],be=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),ue=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),me=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),pe=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse() ;var he="[0-9](_*[0-9])*",_e=`\\.(${he})`,fe="[0-9a-fA-F](_*[0-9a-fA-F])*",Ee={ className:"number",variants:[{ begin:`(\\b(${he})((${_e})|\\.)?|(${_e}))[eE][+-]?(${he})[fFdD]?\\b`},{ begin:`\\b(${he})((${_e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{ begin:`(${_e})[fFdD]?\\b`},{begin:`\\b(${he})[fFdD]\\b`},{ begin:`\\b0[xX]((${fe})\\.?|(${fe})?\\.(${fe}))[pP][+-]?(${he})[fFdD]?\\b`},{ begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${fe})[lL]?\\b`},{ begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}], relevance:0};function ye(e,n,t){return-1===t?"":e.replace(n,(a=>ye(e,n,t-1)))} var ve=Object.freeze({__proto__:null,grmr_apache:e=>{const n={ className:"number",begin:/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?/} ;return{name:"Apache config",aliases:["apacheconf"],case_insensitive:!0, contains:[e.HASH_COMMENT_MODE,{className:"section",begin:/<\/?/,end:/>/, contains:[n,{className:"number",begin:/:\d{1,5}/ },e.inherit(e.QUOTE_STRING_MODE,{relevance:0})]},{className:"attribute", begin:/\w+/,relevance:0,keywords:{ _:["order","deny","allow","setenv","rewriterule","rewriteengine","rewritecond","documentroot","sethandler","errordocument","loadmodule","options","header","listen","serverroot","servername"] },starts:{end:/$/,relevance:0,keywords:{literal:"on off all deny allow"}, contains:[{className:"meta",begin:/\s\[/,end:/\]$/},{className:"variable", begin:/[\$%]\{/,end:/\}/,contains:["self",{className:"number",begin:/[$%]\d+/}] },n,{className:"number",begin:/\b\d+/},e.QUOTE_STRING_MODE]}}],illegal:/\S/}}, grmr_bash:e=>{const n=e.regex,t={},a={begin:/\$\{/,end:/\}/,contains:["self",{ begin:/:-/,contains:[t]}]};Object.assign(t,{className:"variable",variants:[{ begin:n.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},a]});const i={ className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE] },r=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),s={ begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/, end:/(\w+)/,className:"string"})]}},o={className:"string",begin:/"/,end:/"/, contains:[e.BACKSLASH_ESCAPE,t,i]};i.contains.push(o);const c={begin:/\$?\(\(/, end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,t] },l=e.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10 }),d={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0, contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{ name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/, keyword:["if","then","else","elif","fi","for","while","until","in","do","done","case","esac","function","select"], literal:["true","false"], built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias","set","shopt","autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp","chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"] },contains:[l,e.SHEBANG(),d,c,r,s,{match:/(\/[a-z._-]+)+/},o,{match:/\\"/},{ className:"string",begin:/'/,end:/'/},{match:/\\'/},t]}},grmr_coffeescript:e=>{ const n={ keyword:ie.concat(["then","unless","until","loop","by","when","and","or","is","isnt","not"]).filter((t=["var","const","let","function","static"], e=>!t.includes(e))),literal:re.concat(["yes","no","on","off"]), built_in:de.concat(["npm","print"])};var t ;const a="[A-Za-z$_][0-9A-Za-z$_]*",i={className:"subst",begin:/#\{/,end:/\}/, keywords:n},r=[e.BINARY_NUMBER_MODE,e.inherit(e.C_NUMBER_MODE,{starts:{ end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/, end:/'''/,contains:[e.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/, contains:[e.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/, contains:[e.BACKSLASH_ESCAPE,i]},{begin:/"/,end:/"/, contains:[e.BACKSLASH_ESCAPE,i]}]},{className:"regexp",variants:[{begin:"///", end:"///",contains:[i,e.HASH_COMMENT_MODE]},{begin:"//[gim]{0,3}(?=\\W)", relevance:0},{begin:/\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/}]},{begin:"@"+a },{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{ begin:"```",end:"```"},{begin:"`",end:"`"}]}];i.contains=r ;const s=e.inherit(e.TITLE_MODE,{begin:a}),o="(\\(.*\\)\\s*)?\\B[-=]>",c={ className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/, end:/\)/,keywords:n,contains:["self"].concat(r)}]},l={variants:[{ match:[/class\s+/,a,/\s+extends\s+/,a]},{match:[/class\s+/,a]}],scope:{ 2:"title.class",4:"title.class.inherited"},keywords:n};return{ name:"CoffeeScript",aliases:["coffee","cson","iced"],keywords:n,illegal:/\/\*/, contains:[...r,e.COMMENT("###","###"),e.HASH_COMMENT_MODE,{className:"function", begin:"^\\s*"+a+"\\s*=\\s*"+o,end:"[-=]>",returnBegin:!0,contains:[s,c]},{ begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:o, end:"[-=]>",returnBegin:!0,contains:[c]}]},l,{begin:a+":",end:":", returnBegin:!0,returnEnd:!0,relevance:0}]}},grmr_cpp:e=>{ const n=e.regex,t=e.COMMENT("//","$",{contains:[{begin:/\\\n/}] }),a="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",r="(?!struct)("+a+"|"+n.optional(i)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",s={ className:"type",begin:"\\b[a-z\\d_]*_t\\b"},o={className:"string",variants:[{ begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{ begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", end:"'",illegal:"."},e.END_SAME_AS_BEGIN({ begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={ className:"number",variants:[{ begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)" },{ begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)" }],relevance:0},l={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{ keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" },contains:[{begin:/\\\n/,relevance:0},e.inherit(o,{className:"string"}),{ className:"string",begin:/<.*?>/},t,e.C_BLOCK_COMMENT_MODE]},d={ className:"title",begin:n.optional(i)+e.IDENT_RE,relevance:0 },g=n.optional(i)+e.IDENT_RE+"\\s*\\(",b={ type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"], keyword:["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"], literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"], _type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"] },u={className:"function.dispatch",relevance:0,keywords:{ _hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"] }, begin:n.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,n.lookahead(/(<[^<>]+>|)\s*\(/)) },m=[u,l,s,t,e.C_BLOCK_COMMENT_MODE,c,o],p={variants:[{begin:/=/,end:/;/},{ begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}], keywords:b,contains:m.concat([{begin:/\(/,end:/\)/,keywords:b, contains:m.concat(["self"]),relevance:0}]),relevance:0},h={className:"function", begin:"("+r+"[\\*&\\s]+)+"+g,returnBegin:!0,end:/[{;=]/,excludeEnd:!0, keywords:b,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:b,relevance:0},{ begin:g,returnBegin:!0,contains:[d],relevance:0},{begin:/::/,relevance:0},{ begin:/:/,endsWithParent:!0,contains:[o,c]},{relevance:0,match:/,/},{ className:"params",begin:/\(/,end:/\)/,keywords:b,relevance:0, contains:[t,e.C_BLOCK_COMMENT_MODE,o,c,s,{begin:/\(/,end:/\)/,keywords:b, relevance:0,contains:["self",t,e.C_BLOCK_COMMENT_MODE,o,c,s]}] },s,t,e.C_BLOCK_COMMENT_MODE,l]};return{name:"C++", aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:b,illegal:"</", classNameAliases:{"function.dispatch":"built_in"}, contains:[].concat(p,h,u,m,[l,{ begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)", end:">",keywords:b,contains:["self",s]},{begin:e.IDENT_RE+"::",keywords:b},{ match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/], className:{1:"keyword",3:"title.class"}}])}},grmr_csharp:e=>{const n={ keyword:["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value|0","var","when","where","with","yield"]), built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"], literal:["default","false","null","true"]},t=e.inherit(e.TITLE_MODE,{ begin:"[a-zA-Z](\\.?\\w)*"}),a={className:"number",variants:[{ begin:"\\b(0b[01']+)"},{ begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{ begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" }],relevance:0},i={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}] },r=e.inherit(i,{illegal:/\n/}),s={className:"subst",begin:/\{/,end:/\}/, keywords:n},o=e.inherit(s,{illegal:/\n/}),c={className:"string",begin:/\$"/, end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/ },e.BACKSLASH_ESCAPE,o]},l={className:"string",begin:/\$@"/,end:'"',contains:[{ begin:/\{\{/},{begin:/\}\}/},{begin:'""'},s]},d=e.inherit(l,{illegal:/\n/, contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},o]}) ;s.contains=[l,c,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_BLOCK_COMMENT_MODE], o.contains=[d,c,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.inherit(e.C_BLOCK_COMMENT_MODE,{ illegal:/\n/})];const g={variants:[{className:"string", begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1 },l,c,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},b={begin:"<",end:">", contains:[{beginKeywords:"in out"},t] },u=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",m={ begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"], keywords:n,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0, contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{ begin:"\x3c!--|--\x3e"},{begin:"</?",end:">"}]}] }),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#", end:"$",keywords:{ keyword:"if else elif endif define undef warning error line region endregion pragma checksum" }},g,a,{beginKeywords:"class interface",relevance:0,end:/[{;=]/, illegal:/[^\s:,]/,contains:[{beginKeywords:"where class" },t,b,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace", relevance:0,end:/[{;=]/,illegal:/[^\s:]/, contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{ beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/, contains:[t,b,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta", begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{ className:"string",begin:/"/,end:/"/}]},{ beginKeywords:"new return throw await else",relevance:0},{className:"function", begin:"("+u+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0, end:/\s*[{;=]/,excludeEnd:!0,keywords:n,contains:[{ beginKeywords:"public private protected static internal protected abstract async extern override unsafe virtual new sealed partial", relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0, contains:[e.TITLE_MODE,b],relevance:0},{match:/\(\)/},{className:"params", begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n,relevance:0, contains:[g,a,e.C_BLOCK_COMMENT_MODE] },e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},m]}},grmr_css:e=>{ const n=e.regex,t=(e=>({IMPORTANT:{scope:"meta",begin:"!important"}, BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number", begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{ className:"built_in",begin:/[\w-]+(?=\()/},AT