···
1
+
// built with node tools/build.js nix python python-repl rust javascript makefile ini bash shell
3
+
Highlight.js v11.9.0 (git: ca77d5b733)
4
+
(c) 2006-2024 undefined and other contributors
5
+
License: BSD-3-Clause
7
+
var hljs=function(){"use strict";function e(n){
8
+
return n instanceof Map?n.clear=n.delete=n.set=()=>{
9
+
throw Error("map is read-only")}:n instanceof Set&&(n.add=n.clear=n.delete=()=>{
10
+
throw Error("set is read-only")
11
+
}),Object.freeze(n),Object.getOwnPropertyNames(n).forEach((t=>{
12
+
const s=n[t],a=typeof s;"object"!==a&&"function"!==a||Object.isFrozen(s)||e(s)
13
+
})),n}class n{constructor(e){
14
+
void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}
15
+
ignoreMatch(){this.isMatchIgnored=!0}}function t(e){
16
+
return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")
17
+
}function s(e,...n){const t=Object.create(null);for(const n in e)t[n]=e[n]
18
+
;return n.forEach((e=>{for(const n in e)t[n]=e[n]})),t}const a=e=>!!e.scope
19
+
;class i{constructor(e,n){
20
+
this.buffer="",this.classPrefix=n.classPrefix,e.walk(this)}addText(e){
21
+
this.buffer+=t(e)}openNode(e){if(!a(e))return;const n=((e,{prefix:n})=>{
22
+
if(e.startsWith("language:"))return e.replace("language:","language-")
23
+
;if(e.includes(".")){const t=e.split(".")
24
+
;return[`${n}${t.shift()}`,...t.map(((e,n)=>`${e}${"_".repeat(n+1)}`))].join(" ")
25
+
}return`${n}${e}`})(e.scope,{prefix:this.classPrefix});this.span(n)}
26
+
closeNode(e){a(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){
27
+
this.buffer+=`<span class="${e}">`}}const r=(e={})=>{const n={children:[]}
28
+
;return Object.assign(n,e),n};class o{constructor(){
29
+
this.rootNode=r(),this.stack=[this.rootNode]}get top(){
30
+
return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){
31
+
this.top.children.push(e)}openNode(e){const n=r({scope:e})
32
+
;this.add(n),this.stack.push(n)}closeNode(){
33
+
if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){
34
+
for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}
35
+
walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,n){
36
+
return"string"==typeof n?e.addText(n):n.children&&(e.openNode(n),
37
+
n.children.forEach((n=>this._walk(e,n))),e.closeNode(n)),e}static _collapse(e){
38
+
"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{
39
+
o._collapse(e)})))}}class c extends o{constructor(e){super(),this.options=e}
40
+
addText(e){""!==e&&this.add(e)}startScope(e){this.openNode(e)}endScope(){
41
+
this.closeNode()}__addSublanguage(e,n){const t=e.root
42
+
;n&&(t.scope="language:"+n),this.add(t)}toHTML(){
43
+
return new i(this,this.options).value()}finalize(){
44
+
return this.closeAllNodes(),!0}}function l(e){
45
+
return e?"string"==typeof e?e:e.source:null}function d(e){return h("(?=",e,")")}
46
+
function g(e){return h("(?:",e,")*")}function u(e){return h("(?:",e,")?")}
47
+
function h(...e){return e.map((e=>l(e))).join("")}function b(...e){const n=(e=>{
48
+
const n=e[e.length-1]
49
+
;return"object"==typeof n&&n.constructor===Object?(e.splice(e.length-1,1),n):{}
50
+
})(e);return"("+(n.capture?"":"?:")+e.map((e=>l(e))).join("|")+")"}
51
+
function p(e){return RegExp(e.toString()+"|").exec("").length-1}
52
+
const f=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./
53
+
;function m(e,{joinWith:n}){let t=0;return e.map((e=>{t+=1;const n=t
54
+
;let s=l(e),a="";for(;s.length>0;){const e=f.exec(s);if(!e){a+=s;break}
55
+
a+=s.substring(0,e.index),
56
+
s=s.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?a+="\\"+(Number(e[1])+n):(a+=e[0],
57
+
"("===e[0]&&t++)}return a})).map((e=>`(${e})`)).join(n)}
58
+
const _="[a-zA-Z]\\w*",E="[a-zA-Z_]\\w*",y="\\b\\d+(\\.\\d+)?",w="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",N="\\b(0b[01]+)",S={
59
+
begin:"\\\\[\\s\\S]",relevance:0},v={scope:"string",begin:"'",end:"'",
60
+
illegal:"\\n",contains:[S]},x={scope:"string",begin:'"',end:'"',illegal:"\\n",
61
+
contains:[S]},A=(e,n,t={})=>{const a=s({scope:"comment",begin:e,end:n,
62
+
contains:[]},t);a.contains.push({scope:"doctag",
63
+
begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",
64
+
end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0})
65
+
;const i=b("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,}/)
66
+
;return a.contains.push({begin:h(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),a
67
+
},k=A("//","$"),O=A("/\\*","\\*/"),R=A("#","$");var M=Object.freeze({
68
+
__proto__:null,APOS_STRING_MODE:v,BACKSLASH_ESCAPE:S,BINARY_NUMBER_MODE:{
69
+
scope:"number",begin:N,relevance:0},BINARY_NUMBER_RE:N,COMMENT:A,
70
+
C_BLOCK_COMMENT_MODE:O,C_LINE_COMMENT_MODE:k,C_NUMBER_MODE:{scope:"number",
71
+
begin:w,relevance:0},C_NUMBER_RE:w,END_SAME_AS_BEGIN:e=>Object.assign(e,{
72
+
"on:begin":(e,n)=>{n.data._beginMatch=e[1]},"on:end":(e,n)=>{
73
+
n.data._beginMatch!==e[1]&&n.ignoreMatch()}}),HASH_COMMENT_MODE:R,IDENT_RE:_,
74
+
MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:{begin:"\\.\\s*"+E,relevance:0},
75
+
NUMBER_MODE:{scope:"number",begin:y,relevance:0},NUMBER_RE:y,
76
+
PHRASAL_WORDS_MODE:{
77
+
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/
78
+
},QUOTE_STRING_MODE:x,REGEXP_MODE:{scope:"regexp",begin:/\/(?=[^/\n]*\/)/,
79
+
end:/\/[gimuy]*/,contains:[S,{begin:/\[/,end:/\]/,relevance:0,contains:[S]}]},
80
+
RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",
81
+
SHEBANG:(e={})=>{const n=/^#![ ]*\//
82
+
;return e.binary&&(e.begin=h(n,/.*\b/,e.binary,/\b.*/)),s({scope:"meta",begin:n,
83
+
end:/$/,relevance:0,"on:begin":(e,n)=>{0!==e.index&&n.ignoreMatch()}},e)},
84
+
TITLE_MODE:{scope:"title",begin:_,relevance:0},UNDERSCORE_IDENT_RE:E,
85
+
UNDERSCORE_TITLE_MODE:{scope:"title",begin:E,relevance:0}});function T(e,n){
86
+
"."===e.input[e.index-1]&&n.ignoreMatch()}function I(e,n){
87
+
void 0!==e.className&&(e.scope=e.className,delete e.className)}function B(e,n){
88
+
n&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",
89
+
e.__beforeBegin=T,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,
90
+
void 0===e.relevance&&(e.relevance=0))}function C(e,n){
91
+
Array.isArray(e.illegal)&&(e.illegal=b(...e.illegal))}function $(e,n){
93
+
if(e.begin||e.end)throw Error("begin & end are not supported with match")
94
+
;e.begin=e.match,delete e.match}}function L(e,n){
95
+
void 0===e.relevance&&(e.relevance=1)}const j=(e,n)=>{if(!e.beforeMatch)return
96
+
;if(e.starts)throw Error("beforeMatch cannot be used with starts")
97
+
;const t=Object.assign({},e);Object.keys(e).forEach((n=>{delete e[n]
98
+
})),e.keywords=t.keywords,e.begin=h(t.beforeMatch,d(t.begin)),e.starts={
99
+
relevance:0,contains:[Object.assign(t,{endsParent:!0})]
100
+
},e.relevance=0,delete t.beforeMatch
101
+
},D=["of","and","for","in","not","or","if","then","parent","list","value"],z="keyword"
102
+
;function P(e,n,t=z){const s=Object.create(null)
103
+
;return"string"==typeof e?a(t,e.split(" ")):Array.isArray(e)?a(t,e):Object.keys(e).forEach((t=>{
104
+
Object.assign(s,P(e[t],n,t))})),s;function a(e,t){
105
+
n&&(t=t.map((e=>e.toLowerCase()))),t.forEach((n=>{const t=n.split("|")
106
+
;s[t[0]]=[e,H(t[0],t[1])]}))}}function H(e,n){
107
+
return n?Number(n):(e=>D.includes(e.toLowerCase()))(e)?0:1}const U={},F=e=>{
108
+
console.error(e)},Z=(e,...n)=>{console.log("WARN: "+e,...n)},K=(e,n)=>{
109
+
U[`${e}/${n}`]||(console.log(`Deprecated as of ${e}. ${n}`),U[`${e}/${n}`]=!0)
110
+
},G=Error();function W(e,n,{key:t}){let s=0;const a=e[t],i={},r={}
111
+
;for(let e=1;e<=n.length;e++)r[e+s]=a[e],i[e+s]=!0,s+=p(n[e-1])
112
+
;e[t]=r,e[t]._emit=i,e[t]._multi=!0}function q(e){(e=>{
113
+
e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,
114
+
delete e.scope)})(e),"string"==typeof e.beginScope&&(e.beginScope={
115
+
_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope
116
+
}),(e=>{if(Array.isArray(e.begin)){
117
+
if(e.skip||e.excludeBegin||e.returnBegin)throw F("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),
119
+
;if("object"!=typeof e.beginScope||null===e.beginScope)throw F("beginScope must be object"),
120
+
G;W(e,e.begin,{key:"beginScope"}),e.begin=m(e.begin,{joinWith:""})}})(e),(e=>{
121
+
if(Array.isArray(e.end)){
122
+
if(e.skip||e.excludeEnd||e.returnEnd)throw F("skip, excludeEnd, returnEnd not compatible with endScope: {}"),
124
+
;if("object"!=typeof e.endScope||null===e.endScope)throw F("endScope must be object"),
125
+
G;W(e,e.end,{key:"endScope"}),e.end=m(e.end,{joinWith:""})}})(e)}function X(e){
127
+
return RegExp(l(n),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(t?"g":""))
128
+
}class t{constructor(){
129
+
this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}
131
+
n.position=this.position++,this.matchIndexes[this.matchAt]=n,this.regexes.push([n,e]),
132
+
this.matchAt+=p(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null)
133
+
;const e=this.regexes.map((e=>e[1]));this.matcherRe=n(m(e,{joinWith:"|"
134
+
}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex
135
+
;const n=this.matcherRe.exec(e);if(!n)return null
136
+
;const t=n.findIndex(((e,n)=>n>0&&void 0!==e)),s=this.matchIndexes[t]
137
+
;return n.splice(0,t),Object.assign(n,s)}}class a{constructor(){
138
+
this.rules=[],this.multiRegexes=[],
139
+
this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){
140
+
if(this.multiRegexes[e])return this.multiRegexes[e];const n=new t
141
+
;return this.rules.slice(e).forEach((([e,t])=>n.addRule(e,t))),
142
+
n.compile(),this.multiRegexes[e]=n,n}resumingScanAtSamePosition(){
143
+
return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,n){
144
+
this.rules.push([e,n]),"begin"===n.type&&this.count++}exec(e){
145
+
const n=this.getMatcher(this.regexIndex);n.lastIndex=this.lastIndex
147
+
;if(this.resumingScanAtSamePosition())if(t&&t.index===this.lastIndex);else{
148
+
const n=this.getMatcher(0);n.lastIndex=this.lastIndex+1,t=n.exec(e)}
149
+
return t&&(this.regexIndex+=t.position+1,
150
+
this.regexIndex===this.count&&this.considerAll()),t}}
151
+
if(e.compilerExtensions||(e.compilerExtensions=[]),
152
+
e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.")
153
+
;return e.classNameAliases=s(e.classNameAliases||{}),function t(i,r){const o=i
154
+
;if(i.isCompiled)return o
155
+
;[I,$,q,j].forEach((e=>e(i,r))),e.compilerExtensions.forEach((e=>e(i,r))),
156
+
i.__beforeBegin=null,[B,C,L].forEach((e=>e(i,r))),i.isCompiled=!0;let c=null
157
+
;return"object"==typeof i.keywords&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),
158
+
c=i.keywords.$pattern,
159
+
delete i.keywords.$pattern),c=c||/\w+/,i.keywords&&(i.keywords=P(i.keywords,e.case_insensitive)),
160
+
o.keywordPatternRe=n(c,!0),
161
+
r&&(i.begin||(i.begin=/\B|\b/),o.beginRe=n(o.begin),i.end||i.endsWithParent||(i.end=/\B|\b/),
162
+
i.end&&(o.endRe=n(o.end)),
163
+
o.terminatorEnd=l(o.end)||"",i.endsWithParent&&r.terminatorEnd&&(o.terminatorEnd+=(i.end?"|":"")+r.terminatorEnd)),
164
+
i.illegal&&(o.illegalRe=n(i.illegal)),
165
+
i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map((e=>(e=>(e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((n=>s(e,{
166
+
variants:null},n)))),e.cachedVariants?e.cachedVariants:J(e)?s(e,{
167
+
starts:e.starts?s(e.starts):null
168
+
}):Object.isFrozen(e)?s(e):e))("self"===e?i:e)))),i.contains.forEach((e=>{t(e,o)
169
+
})),i.starts&&t(i.starts,r),o.matcher=(e=>{const n=new a
170
+
;return e.contains.forEach((e=>n.addRule(e.begin,{rule:e,type:"begin"
171
+
}))),e.terminatorEnd&&n.addRule(e.terminatorEnd,{type:"end"
172
+
}),e.illegal&&n.addRule(e.illegal,{type:"illegal"}),n})(o),o}(e)}function J(e){
173
+
return!!e&&(e.endsWithParent||J(e.starts))}class V extends Error{
174
+
constructor(e,n){super(e),this.name="HTMLInjectionError",this.html=n}}
175
+
const Q=t,Y=s,ee=Symbol("nomatch"),ne=t=>{
176
+
const s=Object.create(null),a=Object.create(null),i=[];let r=!0
177
+
;const o="Could not find the language '{}', did you forget to load/include a language module?",l={
178
+
disableAutodetect:!0,name:"Plain text",contains:[]};let p={
179
+
ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,
180
+
languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",
181
+
cssSelector:"pre code",languages:null,__emitter:c};function f(e){
182
+
return p.noHighlightRe.test(e)}function m(e,n,t){let s="",a=""
183
+
;"object"==typeof n?(s=e,
184
+
t=n.ignoreIllegals,a=n.language):(K("10.7.0","highlight(lang, code, ...args) has been deprecated."),
185
+
K("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),
186
+
a=e,s=n),void 0===t&&(t=!0);const i={code:s,language:a};A("before:highlight",i)
187
+
;const r=i.result?i.result:_(i.language,i.code,t)
188
+
;return r.code=i.code,A("after:highlight",r),r}function _(e,t,a,i){
189
+
const c=Object.create(null);function l(){if(!A.keywords)return void O.addText(R)
190
+
;let e=0;A.keywordPatternRe.lastIndex=0;let n=A.keywordPatternRe.exec(R),t=""
191
+
;for(;n;){t+=R.substring(e,n.index)
192
+
;const a=N.case_insensitive?n[0].toLowerCase():n[0],i=(s=a,A.keywords[s]);if(i){
194
+
;if(O.addText(t),t="",c[a]=(c[a]||0)+1,c[a]<=7&&(M+=s),e.startsWith("_"))t+=n[0];else{
195
+
const t=N.classNameAliases[e]||e;g(n[0],t)}}else t+=n[0]
196
+
;e=A.keywordPatternRe.lastIndex,n=A.keywordPatternRe.exec(R)}var s
197
+
;t+=R.substring(e),O.addText(t)}function d(){null!=A.subLanguage?(()=>{
198
+
if(""===R)return;let e=null;if("string"==typeof A.subLanguage){
199
+
if(!s[A.subLanguage])return void O.addText(R)
200
+
;e=_(A.subLanguage,R,!0,k[A.subLanguage]),k[A.subLanguage]=e._top
201
+
}else e=E(R,A.subLanguage.length?A.subLanguage:null)
202
+
;A.relevance>0&&(M+=e.relevance),O.__addSublanguage(e._emitter,e.language)
203
+
})():l(),R=""}function g(e,n){
204
+
""!==e&&(O.startScope(n),O.addText(e),O.endScope())}function u(e,n){let t=1
205
+
;const s=n.length-1;for(;t<=s;){if(!e._emit[t]){t++;continue}
206
+
const s=N.classNameAliases[e[t]]||e[t],a=n[t];s?g(a,s):(R=a,l(),R=""),t++}}
208
+
return e.scope&&"string"==typeof e.scope&&O.openNode(N.classNameAliases[e.scope]||e.scope),
209
+
e.beginScope&&(e.beginScope._wrap?(g(R,N.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),
210
+
R=""):e.beginScope._multi&&(u(e.beginScope,n),R="")),A=Object.create(e,{parent:{
211
+
value:A}}),A}function b(e,t,s){let a=((e,n)=>{const t=e&&e.exec(n)
212
+
;return t&&0===t.index})(e.endRe,s);if(a){if(e["on:end"]){const s=new n(e)
213
+
;e["on:end"](t,s),s.isMatchIgnored&&(a=!1)}if(a){
214
+
for(;e.endsParent&&e.parent;)e=e.parent;return e}}
215
+
if(e.endsWithParent)return b(e.parent,t,s)}function f(e){
216
+
return 0===A.matcher.regexIndex?(R+=e[0],1):(B=!0,0)}function m(e){
217
+
const n=e[0],s=t.substring(e.index),a=b(A,e,s);if(!a)return ee;const i=A
218
+
;A.endScope&&A.endScope._wrap?(d(),
219
+
g(n,A.endScope._wrap)):A.endScope&&A.endScope._multi?(d(),
220
+
u(A.endScope,e)):i.skip?R+=n:(i.returnEnd||i.excludeEnd||(R+=n),
221
+
d(),i.excludeEnd&&(R=n));do{
222
+
A.scope&&O.closeNode(),A.skip||A.subLanguage||(M+=A.relevance),A=A.parent
223
+
}while(A!==a.parent);return a.starts&&h(a.starts,e),i.returnEnd?0:n.length}
224
+
let y={};function w(s,i){const o=i&&i[0];if(R+=s,null==o)return d(),0
225
+
;if("begin"===y.type&&"end"===i.type&&y.index===i.index&&""===o){
226
+
if(R+=t.slice(i.index,i.index+1),!r){const n=Error(`0 width match regex (${e})`)
227
+
;throw n.languageName=e,n.badRule=y.rule,n}return 1}
228
+
if(y=i,"begin"===i.type)return(e=>{
229
+
const t=e[0],s=e.rule,a=new n(s),i=[s.__beforeBegin,s["on:begin"]]
230
+
;for(const n of i)if(n&&(n(e,a),a.isMatchIgnored))return f(t)
231
+
;return s.skip?R+=t:(s.excludeBegin&&(R+=t),
232
+
d(),s.returnBegin||s.excludeBegin||(R=t)),h(s,e),s.returnBegin?0:t.length})(i)
233
+
;if("illegal"===i.type&&!a){
234
+
const e=Error('Illegal lexeme "'+o+'" for mode "'+(A.scope||"<unnamed>")+'"')
235
+
;throw e.mode=A,e}if("end"===i.type){const e=m(i);if(e!==ee)return e}
236
+
if("illegal"===i.type&&""===o)return 1
237
+
;if(I>1e5&&I>3*i.index)throw Error("potential infinite loop, way more iterations than matches")
238
+
;return R+=o,o.length}const N=S(e)
239
+
;if(!N)throw F(o.replace("{}",e)),Error('Unknown language: "'+e+'"')
240
+
;const v=X(N);let x="",A=i||v;const k={},O=new p.__emitter(p);(()=>{const e=[]
241
+
;for(let n=A;n!==N;n=n.parent)n.scope&&e.unshift(n.scope)
242
+
;e.forEach((e=>O.openNode(e)))})();let R="",M=0,T=0,I=0,B=!1;try{
243
+
if(N.__emitTokens)N.__emitTokens(t,O);else{for(A.matcher.considerAll();;){
244
+
I++,B?B=!1:A.matcher.considerAll(),A.matcher.lastIndex=T
245
+
;const e=A.matcher.exec(t);if(!e)break;const n=w(t.substring(T,e.index),e)
246
+
;T=e.index+n}w(t.substring(T))}return O.finalize(),x=O.toHTML(),{language:e,
247
+
value:x,relevance:M,illegal:!1,_emitter:O,_top:A}}catch(n){
248
+
if(n.message&&n.message.includes("Illegal"))return{language:e,value:Q(t),
249
+
illegal:!0,relevance:0,_illegalBy:{message:n.message,index:T,
250
+
context:t.slice(T-100,T+100),mode:n.mode,resultSoFar:x},_emitter:O};if(r)return{
251
+
language:e,value:Q(t),illegal:!1,relevance:0,errorRaised:n,_emitter:O,_top:A}
252
+
;throw n}}function E(e,n){n=n||p.languages||Object.keys(s);const t=(e=>{
253
+
const n={value:Q(e),illegal:!1,relevance:0,_top:l,_emitter:new p.__emitter(p)}
254
+
;return n._emitter.addText(e),n})(e),a=n.filter(S).filter(x).map((n=>_(n,e,!1)))
255
+
;a.unshift(t);const i=a.sort(((e,n)=>{
256
+
if(e.relevance!==n.relevance)return n.relevance-e.relevance
257
+
;if(e.language&&n.language){if(S(e.language).supersetOf===n.language)return 1
258
+
;if(S(n.language).supersetOf===e.language)return-1}return 0})),[r,o]=i,c=r
259
+
;return c.secondBest=o,c}function y(e){let n=null;const t=(e=>{
260
+
let n=e.className+" ";n+=e.parentNode?e.parentNode.className:""
261
+
;const t=p.languageDetectRe.exec(n);if(t){const n=S(t[1])
262
+
;return n||(Z(o.replace("{}",t[1])),
263
+
Z("Falling back to no-highlight mode for this block.",e)),n?t[1]:"no-highlight"}
264
+
return n.split(/\s+/).find((e=>f(e)||S(e)))})(e);if(f(t))return
265
+
;if(A("before:highlightElement",{el:e,language:t
266
+
}),e.dataset.highlighted)return void console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e)
267
+
;if(e.children.length>0&&(p.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),
268
+
console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),
269
+
console.warn("The element with unescaped HTML:"),
270
+
console.warn(e)),p.throwUnescapedHTML))throw new V("One of your code blocks includes unescaped HTML.",e.innerHTML)
271
+
;n=e;const s=n.textContent,i=t?m(s,{language:t,ignoreIllegals:!0}):E(s)
272
+
;e.innerHTML=i.value,e.dataset.highlighted="yes",((e,n,t)=>{const s=n&&a[n]||t
273
+
;e.classList.add("hljs"),e.classList.add("language-"+s)
274
+
})(e,t,i.language),e.result={language:i.language,re:i.relevance,
275
+
relevance:i.relevance},i.secondBest&&(e.secondBest={
276
+
language:i.secondBest.language,relevance:i.secondBest.relevance
277
+
}),A("after:highlightElement",{el:e,result:i,text:s})}let w=!1;function N(){
278
+
"loading"!==document.readyState?document.querySelectorAll(p.cssSelector).forEach(y):w=!0
279
+
}function S(e){return e=(e||"").toLowerCase(),s[e]||s[a[e]]}
280
+
function v(e,{languageName:n}){"string"==typeof e&&(e=[e]),e.forEach((e=>{
281
+
a[e.toLowerCase()]=n}))}function x(e){const n=S(e)
282
+
;return n&&!n.disableAutodetect}function A(e,n){const t=e;i.forEach((e=>{
284
+
"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(()=>{
285
+
w&&N()}),!1),Object.assign(t,{highlight:m,highlightAuto:E,highlightAll:N,
286
+
highlightElement:y,
287
+
highlightBlock:e=>(K("10.7.0","highlightBlock will be removed entirely in v12.0"),
288
+
K("10.7.0","Please use highlightElement now."),y(e)),configure:e=>{p=Y(p,e)},
289
+
initHighlighting:()=>{
290
+
N(),K("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},
291
+
initHighlightingOnLoad:()=>{
292
+
N(),K("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")
293
+
},registerLanguage:(e,n)=>{let a=null;try{a=n(t)}catch(n){
294
+
if(F("Language definition for '{}' could not be registered.".replace("{}",e)),
295
+
!r)throw n;F(n),a=l}
296
+
a.name||(a.name=e),s[e]=a,a.rawDefinition=n.bind(null,t),a.aliases&&v(a.aliases,{
297
+
languageName:e})},unregisterLanguage:e=>{delete s[e]
298
+
;for(const n of Object.keys(a))a[n]===e&&delete a[n]},
299
+
listLanguages:()=>Object.keys(s),getLanguage:S,registerAliases:v,
300
+
autoDetection:x,inherit:Y,addPlugin:e=>{(e=>{
301
+
e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=n=>{
302
+
e["before:highlightBlock"](Object.assign({block:n.el},n))
303
+
}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=n=>{
304
+
e["after:highlightBlock"](Object.assign({block:n.el},n))})})(e),i.push(e)},
305
+
removePlugin:e=>{const n=i.indexOf(e);-1!==n&&i.splice(n,1)}}),t.debugMode=()=>{
306
+
r=!1},t.safeMode=()=>{r=!0},t.versionString="11.9.0",t.regex={concat:h,
307
+
lookahead:d,either:b,optional:u,anyNumberOfTimes:g}
308
+
;for(const n in M)"object"==typeof M[n]&&e(M[n]);return Object.assign(t,M),t
309
+
},te=ne({});te.newInstance=()=>ne({});var se=te
310
+
;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"],oe=["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"],ce=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],le=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],de=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],ge=[].concat(le,oe,ce)
311
+
;var ue=Object.freeze({__proto__:null,grmr_bash:e=>{const n=e.regex,t={},s={
312
+
begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[t]}]}
313
+
;Object.assign(t,{className:"variable",variants:[{
314
+
begin:n.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},s]});const a={
315
+
className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]
316
+
},i=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),r={
317
+
begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,
318
+
end:/(\w+)/,className:"string"})]}},o={className:"string",begin:/"/,end:/"/,
319
+
contains:[e.BACKSLASH_ESCAPE,t,a]};a.contains.push(o);const c={begin:/\$?\(\(/,
320
+
end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,t]
321
+
},l=e.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10
322
+
}),d={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,
323
+
contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{
324
+
name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,
325
+
keyword:["if","then","else","elif","fi","for","while","until","in","do","done","case","esac","function","select"],
326
+
literal:["true","false"],
327
+
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"]
328
+
},contains:[l,e.SHEBANG(),d,c,i,r,{match:/(\/[a-z._-]+)+/},o,{match:/\\"/},{
329
+
className:"string",begin:/'/,end:/'/},{match:/\\'/},t]}},grmr_ini:e=>{
330
+
const n=e.regex,t={className:"number",relevance:0,variants:[{
331
+
begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},s=e.COMMENT();s.variants=[{
332
+
begin:/;/,end:/$/},{begin:/#/,end:/$/}];const a={className:"variable",
333
+
variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},i={
334
+
className:"literal",begin:/\bon|off|true|false|yes|no\b/},r={className:"string",
335
+
contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{
336
+
begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]
337
+
},o={begin:/\[/,end:/\]/,contains:[s,i,a,r,t,"self"],relevance:0
338
+
},c=n.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{
339
+
name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,
340
+
contains:[s,{className:"section",begin:/\[+/,end:/\]+/},{
341
+
begin:n.concat(c,"(\\s*\\.\\s*",c,")*",n.lookahead(/\s*=\s*[^#\s]/)),
342
+
className:"attr",starts:{end:/$/,contains:[s,o,i,a,r,t]}}]}},
343
+
grmr_javascript:e=>{const n=e.regex,t=ae,s={begin:/<[A-Za-z0-9\\._:-]+/,
344
+
end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,n)=>{
345
+
const t=e[0].length+e.index,s=e.input[t]
346
+
;if("<"===s||","===s)return void n.ignoreMatch();let a
347
+
;">"===s&&(((e,{after:n})=>{const t="</"+e[0].slice(1)
348
+
;return-1!==e.input.indexOf(t,n)})(e,{after:t})||n.ignoreMatch())
349
+
;const i=e.input.substring(t)
350
+
;((a=i.match(/^\s*=/))||(a=i.match(/^\s+extends\s+/))&&0===a.index)&&n.ignoreMatch()
351
+
}},a={$pattern:ae,keyword:ie,literal:re,built_in:ge,"variable.language":de
352
+
},i="[0-9](_?[0-9])*",r=`\\.(${i})`,o="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",c={
353
+
className:"number",variants:[{
354
+
begin:`(\\b(${o})((${r})|\\.)?|(${r}))[eE][+-]?(${i})\\b`},{
355
+
begin:`\\b(${o})\\b((${r})\\b|\\.)?|(${r})\\b`},{
356
+
begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{
357
+
begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{
358
+
begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{
359
+
begin:"\\b0[0-7]+n?\\b"}],relevance:0},l={className:"subst",begin:"\\$\\{",
360
+
end:"\\}",keywords:a,contains:[]},d={begin:"html`",end:"",starts:{end:"`",
361
+
returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,l],subLanguage:"xml"}},g={
362
+
begin:"css`",end:"",starts:{end:"`",returnEnd:!1,
363
+
contains:[e.BACKSLASH_ESCAPE,l],subLanguage:"css"}},u={begin:"gql`",end:"",
364
+
starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,l],
365
+
subLanguage:"graphql"}},h={className:"string",begin:"`",end:"`",
366
+
contains:[e.BACKSLASH_ESCAPE,l]},b={className:"comment",
367
+
variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{
368
+
begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",
369
+
begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,
370
+
excludeBegin:!0,relevance:0},{className:"variable",begin:t+"(?=\\s*(-)|$)",
371
+
endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]
372
+
}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]
373
+
},p=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,g,u,h,{match:/\$\d+/},c]
374
+
;l.contains=p.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(p)
375
+
});const f=[].concat(b,l.contains),m=f.concat([{begin:/(\s*)\(/,end:/\)/,
376
+
keywords:a,contains:["self"].concat(f)}]),_={className:"params",begin:/(\s*)\(/,
377
+
end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:m},E={variants:[{
378
+
match:[/class/,/\s+/,t,/\s+/,/extends/,/\s+/,n.concat(t,"(",n.concat(/\./,t),")*")],
379
+
scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{
380
+
match:[/class/,/\s+/,t],scope:{1:"keyword",3:"title.class"}}]},y={relevance:0,
381
+
match:n.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),
382
+
className:"title.class",keywords:{_:[...oe,...ce]}},w={variants:[{
383
+
match:[/function/,/\s+/,t,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],
384
+
className:{1:"keyword",3:"title.function"},label:"func.def",contains:[_],
386
+
match:n.concat(/\b/,(S=[...le,"super","import"].map((e=>e+"\\s*\\(")),
387
+
n.concat("(?!",S.join("|"),")")),t,n.lookahead(/\s*\(/)),
388
+
className:"title.function",relevance:0};var S;const v={
389
+
begin:n.concat(/\./,n.lookahead(n.concat(t,/(?![0-9A-Za-z$_(])/))),end:t,
390
+
excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},x={
391
+
match:[/get|set/,/\s+/,t,/(?=\()/],className:{1:"keyword",3:"title.function"},
392
+
contains:[{begin:/\(\)/},_]
393
+
},A="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",k={
394
+
match:[/const|var|let/,/\s+/,t,/\s*/,/=\s*/,/(async\s*)?/,n.lookahead(A)],
395
+
keywords:"async",className:{1:"keyword",3:"title.function"},contains:[_]}
396
+
;return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{
397
+
PARAMS_CONTAINS:m,CLASS_REFERENCE:y},illegal:/#(?![$_A-z])/,
398
+
contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{
399
+
label:"use_strict",className:"meta",relevance:10,
400
+
begin:/^\s*['"]use (strict|asm)['"]/
401
+
},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,d,g,u,h,b,{match:/\$\d+/},c,y,{
402
+
className:"attr",begin:t+n.lookahead(":"),relevance:0},k,{
403
+
begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",
404
+
keywords:"return throw case",relevance:0,contains:[b,e.REGEXP_MODE,{
405
+
className:"function",begin:A,returnBegin:!0,end:"\\s*=>",contains:[{
406
+
className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{
407
+
className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,
408
+
excludeBegin:!0,excludeEnd:!0,keywords:a,contains:m}]}]},{begin:/,/,relevance:0
409
+
},{match:/\s+/,relevance:0},{variants:[{begin:"<>",end:"</>"},{
410
+
match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:s.begin,
411
+
"on:begin":s.isTrulyOpeningTag,end:s.end}],subLanguage:"xml",contains:[{
412
+
begin:s.begin,end:s.end,skip:!0,contains:["self"]}]}]},w,{
413
+
beginKeywords:"while if switch catch for"},{
414
+
begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",
415
+
returnBegin:!0,label:"func.def",contains:[_,e.inherit(e.TITLE_MODE,{begin:t,
416
+
className:"title.function"})]},{match:/\.\.\./,relevance:0},v,{match:"\\$"+t,
417
+
relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},
418
+
contains:[_]},N,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,
419
+
className:"variable.constant"},E,x,{match:/\$[(.]/}]}},grmr_makefile:e=>{
420
+
const n={className:"variable",variants:[{
421
+
begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{
422
+
begin:/\$[@%<?\^\+\*]/}]},t={className:"string",begin:/"/,end:/"/,
423
+
contains:[e.BACKSLASH_ESCAPE,n]},s={className:"variable",begin:/\$\([\w-]+\s/,
424
+
end:/\)/,keywords:{
425
+
built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"
426
+
},contains:[n]},a={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},i={
427
+
className:"section",begin:/^[^\s]+:/,end:/$/,contains:[n]};return{
428
+
name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,
429
+
keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"
430
+
},contains:[e.HASH_COMMENT_MODE,n,t,s,a,{className:"meta",begin:/^\.PHONY:/,
431
+
end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},i]}},grmr_nix:e=>{
433
+
keyword:["rec","with","let","in","inherit","assert","if","else","then"],
434
+
literal:["true","false","or","and","null"],
435
+
built_in:["import","abort","baseNameOf","dirOf","isNull","builtins","map","removeAttrs","throw","toString","derivation"]
436
+
},t={className:"subst",begin:/\$\{/,end:/\}/,keywords:n},s={className:"string",
437
+
contains:[{className:"char.escape",begin:/''\$/},t],variants:[{begin:"''",
438
+
end:"''"},{begin:'"',end:'"'}]
439
+
},a=[e.NUMBER_MODE,e.HASH_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,s,{
440
+
begin:/[a-zA-Z0-9-_]+(\s*=)/,returnBegin:!0,relevance:0,contains:[{
441
+
className:"attr",begin:/\S+/,relevance:.2}]}];return t.contains=a,{name:"Nix",
442
+
aliases:["nixos"],keywords:n,contains:a}},grmr_python:e=>{
443
+
const n=e.regex,t=/[\p{XID_Start}_]\p{XID_Continue}*/u,s=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],a={
444
+
$pattern:/[A-Za-z]\w+|__\w+__/,keyword:s,
445
+
built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],
446
+
literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],
447
+
type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]
448
+
},i={className:"meta",begin:/^(>>>|\.\.\.) /},r={className:"subst",begin:/\{/,
449
+
end:/\}/,keywords:a,illegal:/#/},o={begin:/\{\{/,relevance:0},c={
450
+
className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{
451
+
begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,
452
+
contains:[e.BACKSLASH_ESCAPE,i],relevance:10},{
453
+
begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,
454
+
contains:[e.BACKSLASH_ESCAPE,i],relevance:10},{
455
+
begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,
456
+
contains:[e.BACKSLASH_ESCAPE,i,o,r]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,
457
+
end:/"""/,contains:[e.BACKSLASH_ESCAPE,i,o,r]},{begin:/([uU]|[rR])'/,end:/'/,
458
+
relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{
459
+
begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,
460
+
end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,
461
+
contains:[e.BACKSLASH_ESCAPE,o,r]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,
462
+
contains:[e.BACKSLASH_ESCAPE,o,r]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]
463
+
},l="[0-9](_?[0-9])*",d=`(\\b(${l}))?\\.(${l})|\\b(${l})\\.`,g="\\b|"+s.join("|"),u={
464
+
className:"number",relevance:0,variants:[{
465
+
begin:`(\\b(${l})|(${d}))[eE][+-]?(${l})[jJ]?(?=${g})`},{begin:`(${d})[jJ]?`},{
466
+
begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${g})`},{
467
+
begin:`\\b0[bB](_?[01])+[lL]?(?=${g})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${g})`
468
+
},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${g})`},{begin:`\\b(${l})[jJ](?=${g})`
469
+
}]},h={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:a,
470
+
contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},b={
471
+
className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,
472
+
end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,
473
+
contains:["self",i,u,c,e.HASH_COMMENT_MODE]}]};return r.contains=[c,u,i],{
474
+
name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:a,
475
+
illegal:/(<\/|\?)|=>/,contains:[i,u,{begin:/\bself\b/},{beginKeywords:"if",
476
+
relevance:0},{match:/\bor\b/,scope:"keyword"},c,h,e.HASH_COMMENT_MODE,{
477
+
match:[/\bdef/,/\s+/,t],scope:{1:"keyword",3:"title.function"},contains:[b]},{
478
+
variants:[{match:[/\bclass/,/\s+/,t,/\s*/,/\(\s*/,t,/\s*\)/]},{
479
+
match:[/\bclass/,/\s+/,t]}],scope:{1:"keyword",3:"title.class",
480
+
6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,
481
+
contains:[u,b,c]}]}},grmr_python_repl:e=>({aliases:["pycon"],contains:[{
482
+
className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}
483
+
},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}),
485
+
const n=e.regex,t=/(r#)?/,s=n.concat(t,e.UNDERSCORE_IDENT_RE),a=n.concat(t,e.IDENT_RE),i={
486
+
className:"title.function.invoke",relevance:0,
487
+
begin:n.concat(/\b/,/(?!let|for|while|if|else|match\b)/,a,n.lookahead(/\s*\(/))
488
+
},r="([ui](8|16|32|64|128|size)|f(32|64))?",o=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],c=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"]
489
+
;return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:c,
490
+
keyword:["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],
491
+
literal:["true","false","Some","None","Ok","Err"],built_in:o},illegal:"</",
492
+
contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]
493
+
}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{
494
+
className:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{
495
+
begin:/b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/}]},{className:"symbol",
496
+
begin:/'[a-zA-Z_][a-zA-Z0-9_]*/},{className:"number",variants:[{
497
+
begin:"\\b0b([01_]+)"+r},{begin:"\\b0o([0-7_]+)"+r},{
498
+
begin:"\\b0x([A-Fa-f0-9_]+)"+r},{
499
+
begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+r}],relevance:0},{
500
+
begin:[/fn/,/\s+/,s],className:{1:"keyword",3:"title.function"}},{
501
+
className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",
502
+
begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{
503
+
begin:[/let/,/\s+/,/(?:mut\s+)?/,s],className:{1:"keyword",3:"keyword",
504
+
4:"variable"}},{begin:[/for/,/\s+/,s,/\s+/,/in/],className:{1:"keyword",
505
+
3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,s],className:{1:"keyword",
506
+
3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,s],
507
+
className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{
508
+
keyword:"Self",built_in:o,type:c}},{className:"punctuation",begin:"->"},i]}},
509
+
grmr_shell:e=>({name:"Shell Session",aliases:["console","shellsession"],
510
+
contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,
511
+
starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]})});const he=se
512
+
;for(const e of Object.keys(ue)){const n=e.replace("grmr_","").replace("_","-")
513
+
;he.registerLanguage(n,ue[e])}return he}()
514
+
;"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs);