diff --git a/gradle/validation/rat-config.xml b/gradle/validation/rat-config.xml index 3028823c7291..bb32dce1cc9b 100644 --- a/gradle/validation/rat-config.xml +++ b/gradle/validation/rat-config.xml @@ -37,7 +37,7 @@ - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS diff --git a/solr/webapp/web/css/angular/common.css b/solr/webapp/web/css/angular/common.css index df87254a803f..0d06795694fb 100644 --- a/solr/webapp/web/css/angular/common.css +++ b/solr/webapp/web/css/angular/common.css @@ -465,9 +465,11 @@ pre.syntax.language-json .number color: blue; } -pre.syntax.language-json .literal +pre.syntax.language-json .literal, +pre.syntax.language-json .literal .keyword { color: firebrick; + font-weight: normal; } pre.syntax .string, @@ -515,6 +517,7 @@ pre.syntax .django .tag .keyword } pre.syntax .attribute, +pre.syntax .attr, pre.syntax .variable, pre.syntax .instancevar, pre.syntax .lisp .body @@ -522,7 +525,8 @@ pre.syntax .lisp .body color: #008080; } -pre.syntax.language-json .attribute +pre.syntax.language-json .attribute, +pre.syntax.language-json .attr { color: black; font-weight: bold; diff --git a/solr/webapp/web/index.html b/solr/webapp/web/index.html index 46535d6b7427..6f63331ada2c 100644 --- a/solr/webapp/web/index.html +++ b/solr/webapp/web/index.html @@ -65,7 +65,7 @@ - + diff --git a/solr/webapp/web/js/angular/app.js b/solr/webapp/web/js/angular/app.js index aba910499752..20bd0078fc71 100644 --- a/solr/webapp/web/js/angular/app.js +++ b/solr/webapp/web/js/angular/app.js @@ -204,7 +204,7 @@ solrAdminApp.config([ }) .filter('highlight', function($sce) { return function(input, lang) { - if (lang && input && lang!="txt" && lang!="csv") return hljs.highlight(lang, input).value; + if (lang && input && hljs.getLanguage(lang)) return hljs.highlight(input, {language: lang}).value; return input; } }) diff --git a/solr/webapp/web/libs/highlight.js b/solr/webapp/web/libs/highlight.js deleted file mode 100644 index 527c3406719a..000000000000 --- a/solr/webapp/web/libs/highlight.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - -Copyright (c) 2006, Ivan Sagalaev -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of highlight.js nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -*/ - -var hljs=new function(){function l(o){return o.replace(/&/gm,"&").replace(//gm,">")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName=="CODE"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\n/g,""):q.nodeValue}if(q.nodeName=="BR"){return"\n"}return h(q,o)}).join("")}function a(q){var p=(q.className+" "+q.parentNode.className).split(/\s+/);p=p.map(function(r){return r.replace(/^language-/,"")});for(var o=0;o"}while(x.length||v.length){var u=t().splice(0,1)[0];y+=l(w.substr(p,u.offset-p));p=u.offset;if(u.event=="start"){y+=s(u.node);r.push(u.node)}else{if(u.event=="stop"){var o,q=r.length;do{q--;o=r[q];y+=("")}while(o!=u.node);r.splice(q,1);while(q'+L[0]+""}else{r+=L[0]}N=A.lR.lastIndex;L=A.lR.exec(K)}return r+K.substr(N)}function z(){if(A.sL&&!e[A.sL]){return l(w)}var r=A.sL?d(A.sL,w):g(w);if(A.r>0){v+=r.keyword_count;B+=r.r}return''+r.value+""}function J(){return A.sL!==undefined?z():G()}function I(L,r){var K=L.cN?'':"";if(L.rB){x+=K;w=""}else{if(L.eB){x+=l(r)+K;w=""}else{x+=K;w=r}}A=Object.create(L,{parent:{value:A}});B+=L.r}function C(K,r){w+=K;if(r===undefined){x+=J();return 0}var L=o(r,A);if(L){x+=J();I(L,r);return L.rB?0:r.length}var M=s(A,r);if(M){if(!(M.rE||M.eE)){w+=r}x+=J();do{if(A.cN){x+=""}A=A.parent}while(A!=M.parent);if(M.eE){x+=l(r)}w="";if(M.starts){I(M.starts,"")}return M.rE?0:r.length}if(t(r,A)){throw"Illegal"}w+=r;return r.length||1}var F=e[D];f(F);var A=F;var w="";var B=0;var v=0;var x="";try{var u,q,p=0;while(true){A.t.lastIndex=p;u=A.t.exec(E);if(!u){break}q=C(E.substr(p,u.index-p),u[0]);p=u.index+q}C(E.substr(p));return{r:B,keyword_count:v,value:x,language:D}}catch(H){if(H=="Illegal"){return{r:0,keyword_count:0,value:l(E)}}else{throw H}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\t)+)/gm,function(r,v,u,t){return v.replace(/\t/g,p)})}if(o){q=q.replace(/\n/g,"
")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t=="no-highlight"){return}var w=t?d(t,v):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match("(\\s|^)(language-)?"+t+"(\\s|$)")){s=s?(s+" "+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w.second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagName("pre"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.ruby=function(e){var a="[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?";var j="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?";var g={keyword:"and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include"};var c={cN:"yardoctag",b:"@[A-Za-z]+"};var k=[{cN:"comment",b:"#",e:"$",c:[c]},{cN:"comment",b:"^\\=begin",e:"^\\=end",c:[c],r:10},{cN:"comment",b:"^__END__",e:"\\n$"}];var d={cN:"subst",b:"#\\{",e:"}",l:a,k:g};var i=[e.BE,d];var b=[{cN:"string",b:"'",e:"'",c:i,r:0},{cN:"string",b:'"',e:'"',c:i,r:0},{cN:"string",b:"%[qw]?\\(",e:"\\)",c:i},{cN:"string",b:"%[qw]?\\[",e:"\\]",c:i},{cN:"string",b:"%[qw]?{",e:"}",c:i},{cN:"string",b:"%[qw]?<",e:">",c:i,r:10},{cN:"string",b:"%[qw]?/",e:"/",c:i,r:10},{cN:"string",b:"%[qw]?%",e:"%",c:i,r:10},{cN:"string",b:"%[qw]?-",e:"-",c:i,r:10},{cN:"string",b:"%[qw]?\\|",e:"\\|",c:i,r:10}];var h={cN:"function",bWK:true,e:" |$|;",k:"def",c:[{cN:"title",b:j,l:a,k:g},{cN:"params",b:"\\(",e:"\\)",l:a,k:g}].concat(k)};var f=k.concat(b.concat([{cN:"class",bWK:true,e:"$|;",k:"class module",c:[{cN:"title",b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?",r:0},{cN:"inheritance",b:"<\\s*",c:[{cN:"parent",b:"("+e.IR+"::)?"+e.IR}]}].concat(k)},h,{cN:"constant",b:"(::)?(\\b[A-Z]\\w*(::)?)+",r:0},{cN:"symbol",b:":",c:b.concat([{b:j}]),r:0},{cN:"symbol",b:a+":",r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"number",b:"\\?\\w"},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"("+e.RSR+")\\s*",c:k.concat([{cN:"regexp",b:"/",e:"/[a-z]*",i:"\\n",c:[e.BE,d]}]),r:0}]));d.c=f;h.c[1].c=f;return{l:a,k:g,c:f}}(hljs);hljs.LANGUAGES.diff=function(a){return{c:[{cN:"chunk",b:"^\\@\\@ +\\-\\d+,\\d+ +\\+\\d+,\\d+ +\\@\\@$",r:10},{cN:"chunk",b:"^\\*\\*\\* +\\d+,\\d+ +\\*\\*\\*\\*$",r:10},{cN:"chunk",b:"^\\-\\-\\- +\\d+,\\d+ +\\-\\-\\-\\-$",r:10},{cN:"header",b:"Index: ",e:"$"},{cN:"header",b:"=====",e:"=====$"},{cN:"header",b:"^\\-\\-\\-",e:"$"},{cN:"header",b:"^\\*{3} ",e:"$"},{cN:"header",b:"^\\+\\+\\+",e:"$"},{cN:"header",b:"\\*{5}",e:"\\*{5}$"},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"change",b:"^\\!",e:"$"}]}}(hljs);hljs.LANGUAGES.javascript=function(a){return{k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const",literal:"true false null undefined NaN Infinity"},c:[a.ASM,a.QSM,a.CLCM,a.CBLCLM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBLCLM,{cN:"regexp",b:"/",e:"/[gim]*",i:"\\n",c:[{b:"\\\\/"}]},{b:"<",e:">;",sL:"xml"}],r:0},{cN:"function",bWK:true,e:"{",k:"function",c:[{cN:"title",b:"[A-Za-z$_][0-9A-Za-z$_]*"},{cN:"params",b:"\\(",e:"\\)",c:[a.CLCM,a.CBLCLM],i:"[\"'\\(]"}],i:"\\[|%"}]}}(hljs);hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"|$)",e:">",k:{title:"style"},c:[b],starts:{e:"",rE:true,sL:"css"}},{cN:"tag",b:"|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"",c:[{cN:"title",b:"[^ />]+"},b]}]}}(hljs);hljs.LANGUAGES.php=function(a){var e={cN:"variable",b:"\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*"};var b=[a.inherit(a.ASM,{i:null}),a.inherit(a.QSM,{i:null}),{cN:"string",b:'b"',e:'"',c:[a.BE]},{cN:"string",b:"b'",e:"'",c:[a.BE]}];var c=[a.BNM,a.CNM];var d={cN:"title",b:a.UIR};return{cI:true,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return implements parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception php_user_filter default die require __FUNCTION__ enddeclare final try this switch continue endfor endif declare unset true false namespace trait goto instanceof insteadof __DIR__ __NAMESPACE__ __halt_compiler",c:[a.CLCM,a.HCM,{cN:"comment",b:"/\\*",e:"\\*/",c:[{cN:"phpdoc",b:"\\s@[A-Za-z]+"}]},{cN:"comment",eB:true,b:"__halt_compiler.+?;",eW:true},{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[a.BE]},{cN:"preprocessor",b:"<\\?php",r:10},{cN:"preprocessor",b:"\\?>"},e,{cN:"function",bWK:true,e:"{",k:"function",i:"\\$|\\[|%",c:[d,{cN:"params",b:"\\(",e:"\\)",c:["self",e,a.CBLCLM].concat(b).concat(c)}]},{cN:"class",bWK:true,e:"{",k:"class",i:"[:\\(\\$]",c:[{bWK:true,eW:true,k:"extends",c:[d]},d]},{b:"=>"}].concat(b).concat(c)}}(hljs);hljs.LANGUAGES.python=function(a){var f={cN:"prompt",b:"^(>>>|\\.\\.\\.) "};var c=[{cN:"string",b:"(u|b)?r?'''",e:"'''",c:[f],r:10},{cN:"string",b:'(u|b)?r?"""',e:'"""',c:[f],r:10},{cN:"string",b:"(u|r|ur)'",e:"'",c:[a.BE],r:10},{cN:"string",b:'(u|r|ur)"',e:'"',c:[a.BE],r:10},{cN:"string",b:"(b|br)'",e:"'",c:[a.BE]},{cN:"string",b:'(b|br)"',e:'"',c:[a.BE]}].concat([a.ASM,a.QSM]);var e={cN:"title",b:a.UIR};var d={cN:"params",b:"\\(",e:"\\)",c:["self",a.CNM,f].concat(c)};var b={bWK:true,e:":",i:"[${=;\\n]",c:[e,d],r:10};return{k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda nonlocal|10",built_in:"None True False Ellipsis NotImplemented"},i:"(|\\?)",c:c.concat([f,a.HCM,a.inherit(b,{cN:"function",k:"def"}),a.inherit(b,{cN:"class",k:"class"}),a.CNM,{cN:"decorator",b:"@",e:"$"},{b:"\\b(print|exec)\\("}])}}(hljs);hljs.LANGUAGES.json=function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}}(hljs); diff --git a/solr/webapp/web/libs/highlight.js-11.12.0.min.js b/solr/webapp/web/libs/highlight.js-11.12.0.min.js new file mode 100644 index 000000000000..5d86ac911d89 --- /dev/null +++ b/solr/webapp/web/libs/highlight.js-11.12.0.min.js @@ -0,0 +1,44 @@ +/* + * highlight.js 11.12.0 - https://github.com/highlightjs/highlight.js + * + * Custom minimal build: core + json, xml, javascript language modules only + * -- the languages the Solr Admin UI actually passes to the 'highlight' + * Angular filter. python/ruby/php were dropped after SOLR-17494 removed + * those response writers server-side, so the UI can no longer produce + * content in them. Built with: + * npm install highlight.js@11.12.0 esbuild + * npx esbuild entry.js --bundle --minify --format=iife + * + * BSD 3-Clause License + * + * Copyright (c) 2006, Ivan Sagalaev. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * * Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +(()=>{var fn=Object.create;var Ie=Object.defineProperty;var dn=Object.getOwnPropertyDescriptor;var hn=Object.getOwnPropertyNames;var En=Object.getPrototypeOf,pn=Object.prototype.hasOwnProperty;var bn=(e,n)=>()=>{try{return n||e((n={exports:{}}).exports,n),n.exports}catch(t){throw n=0,t}};var _n=(e,n,t,c)=>{if(n&&typeof n=="object"||typeof n=="function")for(let h of hn(n))!pn.call(e,h)&&h!==t&&Ie(e,h,{get:()=>n[h],enumerable:!(c=dn(n,h))||c.enumerable});return e};var Nn=(e,n,t)=>(t=e!=null?fn(En(e)):{},_n(n||!e||!e.__esModule?Ie(t,"default",{value:e,enumerable:!0}):t,e));var Ye=bn((pt,Ze)=>{function Be(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(n=>{let t=e[n],c=typeof t;(c==="object"||c==="function")&&!Object.isFrozen(t)&&Be(t)}),e}var ie=class{constructor(n){n.data===void 0&&(n.data={}),this.data=n.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function Pe(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function m(e,...n){let t=Object.create(null);for(let c in e)t[c]=e[c];return n.forEach(function(c){for(let h in c)t[h]=c[h]}),t}var Mn="",ve=e=>!!e.scope,Sn=(e,{prefix:n})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){let t=e.split(".");return[`${n}${t.shift()}`,...t.map((c,h)=>`${c}${"_".repeat(h+1)}`)].join(" ")}return`${n}${e}`},be=class{constructor(n,t){this.buffer="",this.classPrefix=t.classPrefix,n.walk(this)}addText(n){this.buffer+=Pe(n)}openNode(n){if(!ve(n))return;let t=Sn(n.scope,{prefix:this.classPrefix});this.span(t)}closeNode(n){ve(n)&&(this.buffer+=Mn)}value(){return this.buffer}span(n){this.buffer+=``}},Le=(e={})=>{let n={children:[]};return Object.assign(n,e),n},_e=class e{constructor(){this.rootNode=Le(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(n){this.top.children.push(n)}openNode(n){let t=Le({scope:n});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(n){return this.constructor._walk(n,this.rootNode)}static _walk(n,t){return typeof t=="string"?n.addText(t):t.children&&(n.openNode(t),t.children.forEach(c=>this._walk(n,c)),n.closeNode(t)),n}static _collapse(n){typeof n!="string"&&n.children&&(n.children.every(t=>typeof t=="string")?n.children=[n.children.join("")]:n.children.forEach(t=>{e._collapse(t)}))}},Ne=class extends _e{constructor(n){super(),this.options=n}addText(n){n!==""&&this.add(n)}startScope(n){this.openNode(n)}endScope(){this.closeNode()}__addSublanguage(n,t){let c=n.root;t&&(c.scope=`language:${t}`),this.add(c)}toHTML(){return new be(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function Y(e){return e?typeof e=="string"?e:e.source:null}function Ue(e){return $("(?=",e,")")}function An(e){return $("(?:",e,")*")}function On(e){return $("(?:",e,")?")}function $(...e){return e.map(t=>Y(t)).join("")}function Rn(e){let n=e[e.length-1];return typeof n=="object"&&n.constructor===Object?(e.splice(e.length-1,1),n):{}}function ae(...e){return"("+(Rn(e).capture?"":"?:")+e.map(c=>Y(c)).join("|")+")"}function $e(e){return new RegExp(e.toString()+"|").exec("").length-1}function xn(e,n){let t=e&&e.exec(n);return t&&t.index===0}var yn=new RegExp(ae(/\[(?:[^\\\]]|\\.)*\]/,/\(\?<(?![=!])[^>]+>/,/\(\?'[^']+'/,/\(\??/,/\\([1-9][0-9]*)/,/\\./));function Se(e,{joinWith:n}){let t=0;return e.map(c=>{t+=1;let h=t,b=Y(c),a="";for(;b.length>0;){let i=yn.exec(b);if(!i){a+=b;break}a+=b.substring(0,i.index),b=b.substring(i.index+i[0].length),i[0][0]==="\\"&&i[1]?a+="\\"+String(Number(i[1])+h):(a+=i[0],(i[0]==="("||/^\(\?[<']/.test(i[0]))&&t++)}return a}).map(c=>`(${c})`).join(n)}var Tn=/\b\B/,He="[a-zA-Z]\\w*",Ae="[a-zA-Z_]\\w*",Ge="\\b\\d+(\\.\\d+)?",ze="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Fe="\\b(0b[01]+)",wn="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",In=(e={})=>{let n=/^#![ ]*\//;return e.binary&&(e.begin=$(n,/.*\b/,e.binary,/\b.*/)),m({scope:"meta",begin:n,end:/$/,relevance:0,"on:begin":(t,c)=>{t.index!==0&&c.ignoreMatch()}},e)},J={begin:"\\\\[\\s\\S]",relevance:0},vn={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[J]},Ln={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[J]},Cn={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/},ce=function(e,n,t={}){let c=m({scope:"comment",begin:e,end:n,contains:[]},t);c.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let h=ae("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 c.contains.push({begin:$(/[ ]+/,"(",h,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),c},mn=ce("//","$"),kn=ce("/\\*","\\*/"),Dn=ce("#","$"),Bn={scope:"number",begin:Ge,relevance:0},Pn={scope:"number",begin:ze,relevance:0},Un={scope:"number",begin:Fe,relevance:0},$n={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[J,{begin:/\[/,end:/\]/,relevance:0,contains:[J]}]},Hn={scope:"title",begin:He,relevance:0},Gn={scope:"title",begin:Ae,relevance:0},zn={begin:"\\.\\s*"+Ae,relevance:0},Fn=function(e){return Object.assign(e,{"on:begin":(n,t)=>{t.data._beginMatch=n[1]},"on:end":(n,t)=>{t.data._beginMatch!==n[1]&&t.ignoreMatch()}})},se=Object.freeze({__proto__:null,APOS_STRING_MODE:vn,BACKSLASH_ESCAPE:J,BINARY_NUMBER_MODE:Un,BINARY_NUMBER_RE:Fe,COMMENT:ce,C_BLOCK_COMMENT_MODE:kn,C_LINE_COMMENT_MODE:mn,C_NUMBER_MODE:Pn,C_NUMBER_RE:ze,END_SAME_AS_BEGIN:Fn,HASH_COMMENT_MODE:Dn,IDENT_RE:He,MATCH_NOTHING_RE:Tn,METHOD_GUARD:zn,NUMBER_MODE:Bn,NUMBER_RE:Ge,PHRASAL_WORDS_MODE:Cn,QUOTE_STRING_MODE:Ln,REGEXP_MODE:$n,RE_STARTERS_RE:wn,SHEBANG:In,TITLE_MODE:Hn,UNDERSCORE_IDENT_RE:Ae,UNDERSCORE_TITLE_MODE:Gn});function jn(e,n){e.input[e.index-1]==="."&&n.ignoreMatch()}function Kn(e,n){e.className!==void 0&&(e.scope=e.className,delete e.className)}function Wn(e,n){n&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=jn,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function Xn(e,n){Array.isArray(e.illegal)&&(e.illegal=ae(...e.illegal))}function Zn(e,n){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function Yn(e,n){e.relevance===void 0&&(e.relevance=1)}var Jn=(e,n)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");let t=Object.assign({},e);Object.keys(e).forEach(c=>{delete e[c]}),e.keywords=t.keywords,e.begin=$(t.beforeMatch,Ue(t.begin)),e.starts={relevance:0,contains:[Object.assign(t,{endsParent:!0})]},e.relevance=0,delete t.beforeMatch},Qn=["of","and","for","in","not","or","if","then","parent","list","value"],Vn="keyword";function je(e,n,t=Vn){let c=Object.create(null);return typeof e=="string"?h(t,e.split(" ")):Array.isArray(e)?h(t,e):Object.keys(e).forEach(function(b){Object.assign(c,je(e[b],n,b))}),c;function h(b,a){n&&(a=a.map(i=>i.toLowerCase())),a.forEach(function(i){let u=i.split("|");c[u[0]]=[b,qn(u[0],u[1])]})}}function qn(e,n){return n?Number(n):et(e)?0:1}function et(e){return Qn.includes(e.toLowerCase())}var Ce={},U=e=>{console.error(e)},me=(e,...n)=>{console.log(`WARN: ${e}`,...n)},F=(e,n)=>{Ce[`${e}/${n}`]||(console.log(`Deprecated as of ${e}. ${n}`),Ce[`${e}/${n}`]=!0)},re=new Error;function Ke(e,n,{key:t}){let c=0,h=e[t],b={},a={};for(let i=1;i<=n.length;i++)a[i+c]=h[i],b[i+c]=!0,c+=$e(n[i-1]);e[t]=a,e[t]._emit=b,e[t]._multi=!0}function nt(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw U("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),re;if(typeof e.beginScope!="object"||e.beginScope===null)throw U("beginScope must be object"),re;Ke(e,e.begin,{key:"beginScope"}),e.begin=Se(e.begin,{joinWith:""})}}function tt(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw U("skip, excludeEnd, returnEnd not compatible with endScope: {}"),re;if(typeof e.endScope!="object"||e.endScope===null)throw U("endScope must be object"),re;Ke(e,e.end,{key:"endScope"}),e.end=Se(e.end,{joinWith:""})}}function st(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function it(e){st(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),nt(e),tt(e)}function rt(e){function n(a,i){return new RegExp(Y(a),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(i?"g":""))}class t{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(i,u){u.position=this.position++,this.matchIndexes[this.matchAt]=u,this.regexes.push([u,i]),this.matchAt+=$e(i)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let i=this.regexes.map(u=>u[1]);this.matcherRe=n(Se(i,{joinWith:"|"}),!0),this.lastIndex=0}exec(i){this.matcherRe.lastIndex=this.lastIndex;let u=this.matcherRe.exec(i);if(!u)return null;let _=u.findIndex((C,w)=>w>0&&C!==void 0),S=this.matchIndexes[_];return u.splice(0,_),Object.assign(u,S)}}class c{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(i){if(this.multiRegexes[i])return this.multiRegexes[i];let u=new t;return this.rules.slice(i).forEach(([_,S])=>u.addRule(_,S)),u.compile(),this.multiRegexes[i]=u,u}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(i,u){this.rules.push([i,u]),u.type==="begin"&&this.count++}exec(i){let u=this.getMatcher(this.regexIndex);u.lastIndex=this.lastIndex;let _=u.exec(i);if(this.resumingScanAtSamePosition()&&!(_&&_.index===this.lastIndex)){let S=this.getMatcher(0);S.lastIndex=this.lastIndex+1,_=S.exec(i)}return _&&(this.regexIndex+=_.position+1,this.regexIndex===this.count&&this.considerAll()),_}}function h(a){let i=new c;return a.contains.forEach(u=>i.addRule(u.begin,{rule:u,type:"begin"})),a.terminatorEnd&&i.addRule(a.terminatorEnd,{type:"end"}),a.illegal&&i.addRule(a.illegal,{type:"illegal"}),i}function b(a,i){let u=a;if(a.isCompiled)return u;[Kn,Zn,it,Jn].forEach(S=>S(a,i)),e.compilerExtensions.forEach(S=>S(a,i)),a.__beforeBegin=null,[Wn,Xn,Yn].forEach(S=>S(a,i)),a.isCompiled=!0;let _=null;return typeof a.keywords=="object"&&a.keywords.$pattern&&(a.keywords=Object.assign({},a.keywords),_=a.keywords.$pattern,delete a.keywords.$pattern),_=_||/\w+/,a.keywords&&(a.keywords=je(a.keywords,e.case_insensitive)),u.keywordPatternRe=n(_,!0),i&&(a.begin||(a.begin=/\B|\b/),u.beginRe=n(u.begin),!a.end&&!a.endsWithParent&&(a.end=/\B|\b/),a.end&&(u.endRe=n(u.end)),u.terminatorEnd=Y(u.end)||"",a.endsWithParent&&i.terminatorEnd&&(u.terminatorEnd+=(a.end?"|":"")+i.terminatorEnd)),a.illegal&&(u.illegalRe=n(a.illegal)),a.contains||(a.contains=[]),a.contains=[].concat(...a.contains.map(function(S){return at(S==="self"?a:S)})),a.contains.forEach(function(S){b(S,u)}),a.starts&&b(a.starts,i),u.matcher=h(u),u}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=m(e.classNameAliases||{}),b(e)}function We(e){return e?e.endsWithParent||We(e.starts):!1}function at(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(n){return m(e,{variants:null},n)})),e.cachedVariants?e.cachedVariants:We(e)?m(e,{starts:e.starts?m(e.starts):null}):Object.isFrozen(e)?m(e):e}var ct="11.12.0",Me=class extends Error{constructor(n,t){super(n),this.name="HTMLInjectionError",this.html=t}},pe=Pe,ke=m,De=Symbol("nomatch"),ot=7,Xe=function(e){let n=Object.create(null),t=Object.create(null),c=[],h=!0,b="Could not find the language '{}', did you forget to load/include a language module?",a={disableAutodetect:!0,name:"Plain text",contains:[]},i={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Ne};function u(s){return i.noHighlightRe.test(s)}function _(s){let l=s.className+" ";l+=s.parentNode?s.parentNode.className:"";let g=i.languageDetectRe.exec(l);if(g){let E=T(g[1]);return E||(me(b.replace("{}",g[1])),me("Falling back to no-highlight mode for this block.",s)),E?g[1]:"no-highlight"}return l.split(/\s+/).find(E=>u(E)||T(E))}function S(s,l,g){let E="",M="";typeof l=="object"?(E=s,g=l.ignoreIllegals,M=l.language):(F("10.7.0","highlight(lang, code, ...args) has been deprecated."),F("10.7.0",`Please use highlight(code, options) instead. +https://github.com/highlightjs/highlight.js/issues/2277`),M=s,E=l),g===void 0&&(g=!0);let O={code:E,language:M};z("before:highlight",O);let y=O.result?O.result:C(O.language,O.code,g);return y.code=O.code,z("after:highlight",y),y}function C(s,l,g,E){let M=Object.create(null);function O(r,o){return r.keywords[o]}function y(){if(!f.keywords){A.addText(N);return}let r=0;f.keywordPatternRe.lastIndex=0;let o=f.keywordPatternRe.exec(N),d="";for(;o;){d+=N.substring(r,o.index);let p=v.case_insensitive?o[0].toLowerCase():o[0],R=O(f,p);if(R){let[L,un]=R;if(A.addText(d),d="",M[p]=(M[p]||0)+1,M[p]<=ot&&(te+=un),L.startsWith("_"))d+=o[0];else{let gn=v.classNameAliases[L]||L;I(o[0],gn)}}else d+=o[0];r=f.keywordPatternRe.lastIndex,o=f.keywordPatternRe.exec(N)}d+=N.substring(r),A.addText(d)}function B(){if(N==="")return;let r=null;if(typeof f.subLanguage=="string"){if(!n[f.subLanguage]){A.addText(N);return}r=C(f.subLanguage,N,!0,we[f.subLanguage]),we[f.subLanguage]=r._top}else r=H(N,f.subLanguage.length?f.subLanguage:null);f.relevance>0&&(te+=r.relevance),A.__addSublanguage(r._emitter,r.language)}function x(){f.subLanguage!=null?B():y(),N=""}function I(r,o){r!==""&&(A.startScope(o),A.addText(r),A.endScope())}function Re(r,o){let d=1,p=o.length-1;for(;d<=p;){if(!r._emit[d]){d++;continue}let R=v.classNameAliases[r[d]]||r[d],L=o[d];R?I(L,R):(N=L,y(),N=""),d++}}function xe(r,o){return r.scope&&typeof r.scope=="string"&&A.openNode(v.classNameAliases[r.scope]||r.scope),r.beginScope&&(r.beginScope._wrap?(I(N,v.classNameAliases[r.beginScope._wrap]||r.beginScope._wrap),N=""):r.beginScope._multi&&(Re(r.beginScope,o),N="")),f=Object.create(r,{parent:{value:f}}),f}function ye(r,o,d){let p=xn(r.endRe,d);if(p){if(r["on:end"]){let R=new ie(r);r["on:end"](o,R),R.isMatchIgnored&&(p=!1)}if(p){for(;r.endsParent&&r.parent;)r=r.parent;return r}}if(r.endsWithParent)return ye(r.parent,o,d)}function rn(r){return f.matcher.regexIndex===0?(N+=r[0],1):(Ee=!0,0)}function an(r){let o=r[0],d=r.rule,p=new ie(d),R=[d.__beforeBegin,d["on:begin"]];for(let L of R)if(L&&(L(r,p),p.isMatchIgnored))return rn(o);return d.skip?N+=o:(d.excludeBegin&&(N+=o),x(),!d.returnBegin&&!d.excludeBegin&&(N=o)),xe(d,r),d.returnBegin?0:o.length}function cn(r){let o=r[0],d=l.substring(r.index),p=ye(f,r,d);if(!p)return De;let R=f;f.endScope&&f.endScope._wrap?(x(),I(o,f.endScope._wrap)):f.endScope&&f.endScope._multi?(x(),Re(f.endScope,r)):R.skip?N+=o:(R.returnEnd||R.excludeEnd||(N+=o),x(),R.excludeEnd&&(N=o));do f.scope&&A.closeNode(),!f.skip&&!f.subLanguage&&(te+=f.relevance),f=f.parent;while(f!==p.parent);return p.starts&&xe(p.starts,r),R.returnEnd?0:o.length}function on(){let r=[];for(let o=f;o!==v;o=o.parent)o.scope&&r.unshift(o.scope);r.forEach(o=>A.openNode(o))}let ne={};function Te(r,o){let d=o&&o[0];if(N+=r,d==null)return x(),0;if(ne.type==="begin"&&o.type==="end"&&ne.index===o.index&&d===""){if(N+=l.slice(o.index,o.index+1),!h){let p=new Error(`0 width match regex (${s})`);throw p.languageName=s,p.badRule=ne.rule,p}return 1}if(ne=o,o.type==="begin")return an(o);if(o.type==="illegal"&&!g){let p=new Error('Illegal lexeme "'+d+'" for mode "'+(f.scope||"")+'"');throw p.mode=f,p}else if(o.type==="end"){let p=cn(o);if(p!==De)return p}if(o.type==="illegal"&&d==="")return o.index===l.length||(N+=` +`),1;if(he>1e5&&he>o.index*3)throw new Error("potential infinite loop, way more iterations than matches");return N+=d,d.length}let v=T(s);if(!v)throw U(b.replace("{}",s)),new Error('Unknown language: "'+s+'"');let ln=rt(v),de="",f=E||ln,we={},A=new i.__emitter(i);on();let N="",te=0,P=0,he=0,Ee=!1;try{if(v.__emitTokens)v.__emitTokens(l,A);else{for(f.matcher.considerAll();;){he++,Ee?Ee=!1:f.matcher.considerAll(),f.matcher.lastIndex=P;let r=f.matcher.exec(l);if(!r)break;let o=l.substring(P,r.index),d=Te(o,r);P=r.index+d}Te(l.substring(P))}return A.finalize(),de=A.toHTML(),{language:s,value:de,relevance:te,illegal:!1,_emitter:A,_top:f}}catch(r){if(r.message&&r.message.includes("Illegal"))return{language:s,value:pe(l),illegal:!0,relevance:0,_illegalBy:{message:r.message,index:P,context:l.slice(P-100,P+100),mode:r.mode,resultSoFar:de},_emitter:A};if(h)return{language:s,value:pe(l),illegal:!1,relevance:0,errorRaised:r,_emitter:A,_top:f};throw r}}function w(s){let l={value:pe(s),illegal:!1,relevance:0,_top:a,_emitter:new i.__emitter(i)};return l._emitter.addText(s),l}function H(s,l){l=l||i.languages||Object.keys(n);let g=w(s),E=l.filter(T).filter(ee).map(x=>C(x,s,!1));E.unshift(g);let M=E.sort((x,I)=>{if(x.relevance!==I.relevance)return I.relevance-x.relevance;if(x.language&&I.language){if(T(x.language).supersetOf===I.language)return 1;if(T(I.language).supersetOf===x.language)return-1}return 0}),[O,y]=M,B=O;return B.secondBest=y,B}function Q(s,l,g){let E=l&&t[l]||g;s.classList.add("hljs"),s.classList.add(`language-${E}`)}function G(s){let l=null,g=_(s);if(u(g))return;if(z("before:highlightElement",{el:s,language:g}),s.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",s);return}if(s.children.length>0&&(i.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(s)),i.throwUnescapedHTML))throw new Me("One of your code blocks includes unescaped HTML.",s.innerHTML);l=s;let E=l.textContent,M=g?S(E,{language:g,ignoreIllegals:!0}):H(E);s.innerHTML=M.value,s.dataset.highlighted="yes",Q(s,g,M.language),s.result={language:M.language,re:M.relevance,relevance:M.relevance},M.secondBest&&(s.secondBest={language:M.secondBest.language,relevance:M.secondBest.relevance}),z("after:highlightElement",{el:s,result:M,text:E})}function V(s){i=ke(i,s)}let Oe=()=>{k(),F("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function W(){k(),F("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let X=!1;function k(){function s(){k()}if(document.readyState==="loading"){X||window.addEventListener("DOMContentLoaded",s,!1),X=!0;return}document.querySelectorAll(i.cssSelector).forEach(G)}function Z(s,l){let g=null;try{g=l(e)}catch(E){if(U("Language definition for '{}' could not be registered.".replace("{}",s)),h)U(E);else throw E;g=a}g.name||(g.name=s),n[s]=g,g.rawDefinition=l.bind(null,e),g.aliases&&q(g.aliases,{languageName:s})}function D(s){delete n[s];for(let l of Object.keys(t))t[l]===s&&delete t[l]}function oe(){return Object.keys(n)}function T(s){return s=(s||"").toLowerCase(),n[s]||n[t[s]]}function q(s,{languageName:l}){typeof s=="string"&&(s=[s]),s.forEach(g=>{t[g.toLowerCase()]=l})}function ee(s){let l=T(s);return l&&!l.disableAutodetect}function le(s){s["before:highlightBlock"]&&!s["before:highlightElement"]&&(s["before:highlightElement"]=l=>{s["before:highlightBlock"](Object.assign({block:l.el},l))}),s["after:highlightBlock"]&&!s["after:highlightElement"]&&(s["after:highlightElement"]=l=>{s["after:highlightBlock"](Object.assign({block:l.el},l))})}function ue(s){le(s),c.push(s)}function ge(s){let l=c.indexOf(s);l!==-1&&c.splice(l,1)}function z(s,l){let g=s;c.forEach(function(E){E[g]&&E[g](l)})}function fe(s){return F("10.7.0","highlightBlock will be removed entirely in v12.0"),F("10.7.0","Please use highlightElement now."),G(s)}Object.assign(e,{highlight:S,highlightAuto:H,highlightAll:k,highlightElement:G,highlightBlock:fe,configure:V,initHighlighting:Oe,initHighlightingOnLoad:W,registerLanguage:Z,unregisterLanguage:D,listLanguages:oe,getLanguage:T,registerAliases:q,autoDetection:ee,inherit:ke,addPlugin:ue,removePlugin:ge}),e.debugMode=function(){h=!1},e.safeMode=function(){h=!0},e.versionString=ct,e.regex={concat:$,lookahead:Ue,either:ae,optional:On,anyNumberOfTimes:An};for(let s in se)typeof se[s]=="object"&&Be(se[s]);return Object.assign(e,se),e},j=Xe({});j.newInstance=()=>Xe({});Ze.exports=j;j.HighlightJS=j;j.default=j});var Je=Nn(Ye(),1);var K=Je.default;var lt="([-+]?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)|NaN|[-+]?Infinity",ut={scope:"number",match:lt,relevance:0};function Qe(e){let n={className:"attr",begin:/(("(\\.|[^\\"\r\n])*")|('(\\.|[^\\'\r\n])*'))(?=\s*:)/,relevance:1.01},t={match:/[{}[\],:]/,className:"punctuation",relevance:0},c=["true","false","null"],h={scope:"literal",beginKeywords:c.join(" ")};return{name:"JSON",aliases:["jsonc","json5"],keywords:{literal:c},contains:[n,t,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,ut,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function Ve(e){let n=e.regex,t=n.concat(/[\p{L}_]/u,n.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),c=/[\p{L}0-9._:-]+/u,h={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},b={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},a=e.inherit(b,{begin:/\(/,end:/\)/}),i=e.inherit(e.APOS_STRING_MODE,{className:"string"}),u=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),_={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[b,u,i,a,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin://,contains:[b,a,u,i]}]}]},e.COMMENT(//,{relevance:10}),{begin://,relevance:10},h,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[u]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/)/,end:/>/,keywords:{name:"style"},contains:[_],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:"css"}},{className:"tag",begin:/)/,end:/>/,keywords:{name:"script"},contains:[_],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:"javascript"}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:n.concat(//,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:t,relevance:0,starts:_}]},{className:"tag",begin:n.concat(/<\//,n.lookahead(n.concat(t,/>/))),contains:[{className:"name",begin:t,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}var qe="[A-Za-z$_][0-9A-Za-z$_]*",gt=["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","using"],ft=["true","false","null","undefined","NaN","Infinity"],en=["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"],nn=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],tn=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],dt=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","self","global"],ht=[].concat(tn,en,nn);function sn(e){let n=e.regex,t=(g,{after:E})=>{let M="",end:""},b=/<[A-Za-z0-9\\._:-]+\s*\/>/,a={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(g,E)=>{let M=g[0].length+g.index,O=g.input[M];if(O==="<"||O===","){E.ignoreMatch();return}O===">"&&(t(g,{after:M})||E.ignoreMatch());let y,B=g.input.substring(M);if(y=B.match(/^\s*=/)){E.ignoreMatch();return}if((y=B.match(/^\s+extends\s+/))&&y.index===0){E.ignoreMatch();return}}},i={$pattern:qe,keyword:gt,literal:ft,built_in:ht,"variable.language":dt},u="[0-9](_?[0-9])*",_=`\\.(${u})`,S="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",C={className:"number",variants:[{begin:`(\\b(${S})((${_})|\\.)?|(${_}))[eE][+-]?(${u})\\b`},{begin:`\\b(${S})\\b((${_})\\b|\\.)?|(${_})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},w={className:"subst",begin:"\\$\\{",end:"\\}",keywords:i,contains:[]},H={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,w],subLanguage:"xml"}},Q={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,w],subLanguage:"css"}},G={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,w],subLanguage:"graphql"}},V={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,w]},W={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:c+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},X=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,H,Q,G,V,{match:/\$\d+/},C];w.contains=X.concat({begin:/\{/,end:/\}/,keywords:i,contains:["self"].concat(X)});let k=[].concat(W,w.contains),Z=k.concat([{begin:/(\s*)\(/,end:/\)/,keywords:i,contains:["self"].concat(k)}]),D={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:Z},oe={variants:[{match:[/class/,/\s+/,c,/\s+/,/extends/,/\s+/,n.concat(c,"(",n.concat(/\./,c),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,c],scope:{1:"keyword",3:"title.class"}}]},T={relevance:0,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]*)*/),className:"title.class",keywords:{_:[...en,...nn]}},q={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},ee={variants:[{match:[/function/,/\s+/,c,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[D],illegal:/%/},le={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function ue(g){return n.concat("(?!",g.join("|"),")")}let ge={match:n.concat(/\b/,ue([...tn,"super","import","await"].map(g=>`${g}\\s*\\(`)),c,n.lookahead(/\s*\(/)),className:"title.function",relevance:0},z={begin:n.concat(/\./,n.lookahead(n.concat(c,/(?![0-9A-Za-z$_(])/))),end:c,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},fe={match:[/get|set/,/\s+/,c,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},D]},s="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",l={match:[/const|var|let/,/\s+/,c,/\s*/,/=\s*/,/(async\s*)?/,n.lookahead(s)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[D]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:i,exports:{PARAMS_CONTAINS:Z,CLASS_REFERENCE:T},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),q,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,H,Q,G,V,W,{match:/\$\d+/},C,T,{scope:"attr",match:c+n.lookahead(":"),relevance:0},l,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[W,e.REGEXP_MODE,{className:"function",begin:s,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:Z}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:h.begin,end:h.end},{match:b},{begin:a.begin,"on:begin":a.isTrulyOpeningTag,end:a.end}],subLanguage:"xml",contains:[{begin:a.begin,end:a.end,skip:!0,contains:["self"]}]}]},ee,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[D,e.inherit(e.TITLE_MODE,{begin:c,className:"title.function"})]},{match:/\.\.\./,relevance:0},z,{match:"\\$"+c,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[D]},ge,le,oe,fe,{match:/\$[(.]/}]}}K.registerLanguage("json",Qe);K.registerLanguage("xml",Ve);K.registerLanguage("javascript",sn);K.configure({classPrefix:""});window.hljs=K;})(); diff --git a/solr/webapp/web/partials/query.html b/solr/webapp/web/partials/query.html index ccb9b990e9d1..1209acc10dfa 100644 --- a/solr/webapp/web/partials/query.html +++ b/solr/webapp/web/partials/query.html @@ -93,9 +93,6 @@ - - - diff --git a/solr/webapp/web/partials/stream.html b/solr/webapp/web/partials/stream.html index 683cf76d943c..9376c8597739 100644 --- a/solr/webapp/web/partials/stream.html +++ b/solr/webapp/web/partials/stream.html @@ -57,7 +57,7 @@
-
+