1
0
hugo/static/bower_components/highlightjs/highlight.pack.min.js

2 lines
732 KiB
JavaScript
Raw Permalink Normal View History

2024-04-23 13:21:26 +00:00
/*! highlight.js v9.16.2 | BSD3 License | git.io/hljslicense */
!function(e){var t="object"==typeof window&&window||"object"==typeof self&&self;"undefined"==typeof exports||exports.nodeType?t&&(t.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return t.hljs})):e(exports)}(function(i){var d=[],n=Object.keys,R={},s={},t=/^(no-?highlight|plain|text)$/i,l=/\blang(?:uage)?-([\w-]+)\b/i,r=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,a={case_insensitive:"cI",lexemes:"l",contains:"c",keywords:"k",subLanguage:"sL",className:"cN",begin:"b",beginKeywords:"bK",end:"e",endsWithParent:"eW",illegal:"i",excludeBegin:"eB",excludeEnd:"eE",returnBegin:"rB",returnEnd:"rE",variants:"v",IDENT_RE:"IR",UNDERSCORE_IDENT_RE:"UIR",NUMBER_RE:"NR",C_NUMBER_RE:"CNR",BINARY_NUMBER_RE:"BNR",RE_STARTERS_RE:"RSR",BACKSLASH_ESCAPE:"BE",APOS_STRING_MODE:"ASM",QUOTE_STRING_MODE:"QSM",PHRASAL_WORDS_MODE:"PWM",C_LINE_COMMENT_MODE:"CLCM",C_BLOCK_COMMENT_MODE:"CBCM",HASH_COMMENT_MODE:"HCM",NUMBER_MODE:"NM",C_NUMBER_MODE:"CNM",BINARY_NUMBER_MODE:"BNM",CSS_NUMBER_MODE:"CSSNM",REGEXP_MODE:"RM",TITLE_MODE:"TM",UNDERSCORE_TITLE_MODE:"UTM",COMMENT:"C",beginRe:"bR",endRe:"eR",illegalRe:"iR",lexemesRe:"lR",terminators:"t",terminator_end:"tE"},N="</span>",f={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},o="of and for in not or if then".split(" ");function v(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function p(e){return e.nodeName.toLowerCase()}function c(e){return t.test(e)}function _(e){var t,r={},a=Array.prototype.slice.call(arguments,1);for(t in e)r[t]=e[t];return a.forEach(function(e){for(t in e)r[t]=e[t]}),r}function u(e){var i=[];return function e(t,r){for(var a=t.firstChild;a;a=a.nextSibling)3===a.nodeType?r+=a.nodeValue.length:1===a.nodeType&&(i.push({event:"start",offset:r,node:a}),r=e(a,r),p(a).match(/br|hr|img|input/)||i.push({event:"stop",offset:r,node:a}));return r}(e,0),i}function m(e,t,r){var a=0,i="",n=[];function o(){return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset<t[0].offset?e:t:"start"===t[0].event?e:t:e.length?e:t}function s(e){i+="<"+p(e)+d.map.call(e.attributes,function(e){return" "+e.nodeName+'="'+v(e.value).replace('"',"&quot;")+'"'}).join("")+">"}function l(e){i+="</"+p(e)+">"}function c(e){("start"===e.event?s:l)(e.node)}for(;e.length||t.length;){var _=o();if(i+=v(r.substring(a,_[0].offset)),a=_[0].offset,_===e){for(n.reverse().forEach(l);c(_.splice(0,1)[0]),(_=o())===e&&_.length&&_[0].offset===a;);n.reverse().forEach(s)}else"start"===_[0].event?n.push(_[0].node):n.pop(),c(_.splice(0,1)[0])}return i+v(r.substr(a))}function S(t){return t.v&&!t.cached_variants&&(t.cached_variants=t.v.map(function(e){return _(t,{v:null},e)})),t.cached_variants?t.cached_variants:function e(t){return!!t&&(t.eW||e(t.starts))}(t)?[_(t,{starts:t.starts?_(t.starts):null})]:[t]}function E(e){if(a&&!e.langApiRestored){for(var t in e.langApiRestored=!0,a)e[t]&&(e[a[t]]=e[t]);(e.c||[]).concat(e.v||[]).forEach(E)}}function g(t,a){var i={};return"string"==typeof t?r("keyword",t):n(t).forEach(function(e){r(e,t[e])}),i;function r(r,e){a&&(e=e.toLowerCase()),e.split(" ").forEach(function(e){var t=e.split("|");i[t[0]]=[r,function(e,t){return t?Number(t):function(e){return-1!=o.indexOf(e.toLowerCase())}(e)?0:1}(t[0],t[1])]})}}function I(a){function _(e){return e&&e.source||e}function d(e,t){return new RegExp(_(e),"m"+(a.cI?"i":"")+(t?"g":""))}function i(i){var n,e,o={},s=[],l={},r=1;function t(e,t){o[r]=e,s.push([e,t]),r+=function(e){return new RegExp(e.toString()+"|").exec("").length-1}(t)+1}for(var a=0;a<i.c.length;a++){t(e=i.c[a],e.bK?"\\.?(?:"+e.b+")\\.?":e.b)}i.tE&&t("end",i.tE),i.i&&t("illegal",i.i);var c=s.map(function(e){return e[1]});return n=d(function(e,t){for(var r=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,a=0,i="",n=0;n<e.length;n++){var o=a+=1,s=_(e[n]);for(0<n&&(i+=t),i+="(";0<s.length;){var l=r.exec(s);if(null==l){i+=s;break}i+=s.substring(0,l.index),s=s.substring(l.index+l[0].length),"\\"==l[0][0]&&l[1]?i+="\\"+String(Number(l[1])+o):(i+=l[0],"("==l[0]&&a++)}i+=")"}return i}(c,"|"),!0),l.lastIndex=0,l.exec=function(e){var t;if(0===s.length)retu