invidious.io/public/js/highlight.min.e13cfba4c5524e30386cb9ea71f0f191f39d15b25b222f4b67549689f7c076158f42a2282446044f5cdacc76a6d003efbfa252a84aea0116703803b6339ae35f.js

1 line
36 KiB
JavaScript
Raw Normal View History

2022-02-14 16:54:30 -05:00
(()=>{var r=Object.create,e=Object.defineProperty,U=Object.getOwnPropertyDescriptor,Q=Object.getOwnPropertyNames,J=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty,_=a=>e(a,"__esModule",{value:!0}),A=(b,a)=>function(){return a||(0,b[Object.keys(b)[0]])((a={exports:{}}).exports,a),a.exports},x=(b,a,c)=>{if(a&&typeof a=="object"||typeof a=="function")for(let d of Q(a))!H.call(b,d)&&d!=="default"&&e(b,d,{get:()=>a[d],enumerable:!(c=U(a,d))||c.enumerable});return b},w=a=>x(_(e(a!=null?r(J(a)):{},"default",a&&a.__esModule&&"default"in a?{get:()=>a.default,enumerable:!0}:{value:a,enumerable:!0})),a),u=A({"node_modules/highlight.js/lib/core.js"(aA,ax){var m={exports:{}},aw,E,av,w,ar,al,p,ak,ag,ad,y,n,A,B,C,V,J,e,G,H,I,i,K,L,M,N,O,P,Q,R,S,T,U,g,aa,ab,ac,v,b,r,c,h,au,j,z,u,ay,ah,az;function l(a){return a instanceof Map?a.clear=a.delete=a.set=function(){throw new Error("map is read-only")}:a instanceof Set&&(a.add=a.clear=a.delete=function(){throw new Error("set is read-only")}),Object.freeze(a),Object.getOwnPropertyNames(a).forEach(function(c){var b=a[c];typeof b=="object"&&!Object.isFrozen(b)&&l(b)}),a}m.exports=l,m.exports.default=l,aw=m.exports,E=class{constructor(a){a.data===void 0&&(a.data={}),this.data=a.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function D(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function a(b,...c){const a=Object.create(null);for(const c in b)a[c]=b[c];return c.forEach(function(b){for(const c in b)a[c]=b[c]}),a}av="</span>",w=a=>!!a.kind,ar=(a,{prefix:b})=>{if(a.includes(".")){const c=a.split(".");return[`${b}${c.shift()}`,...c.map((a,b)=>`${a}${"_".repeat(b+1)}`)].join(" ")}return`${b}${a}`},al=class{constructor(a,b){this.buffer="",this.classPrefix=b.classPrefix,a.walk(this)}addText(a){this.buffer+=D(a)}openNode(b){if(!w(b))return;let a=b.kind;b.sublanguage?a=`language-${a}`:a=ar(a,{prefix:this.classPrefix}),this.span(a)}closeNode(a){if(!w(a))return;this.buffer+=av}value(){return this.buffer}span(a){this.buffer+=`<span class="${a}">`}},p=class{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(a){this.top.children.push(a)}openNode(b){const a={kind:b,children:[]};this.add(a),this.stack.push(a)}closeNode(){return this.stack.length>1?this.stack.pop():void 0}closeAllNodes(){while(this.closeNode());}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(a){return this.constructor._walk(a,this.rootNode)}static _walk(b,a){return typeof a=="string"?b.addText(a):a.children&&(b.openNode(a),a.children.forEach(a=>this._walk(b,a)),b.closeNode(a)),b}static _collapse(a){if(typeof a=="string")return;if(!a.children)return;a.children.every(a=>typeof a=="string")?a.children=[a.children.join("")]:a.children.forEach(a=>{p._collapse(a)})}},ak=class extends p{constructor(a){super(),this.options=a}addKeyword(a,b){if(a==="")return;this.openNode(b),this.addText(a),this.closeNode()}addText(a){if(a==="")return;this.add(a)}addSublanguage(b,c){const a=b.root;a.kind=c,a.sublanguage=!0,this.add(a)}toHTML(){const a=new al(this,this.options);return a.value()}finalize(){return!0}};function d(a){return a?typeof a=="string"?a:a.source:null}function aj(a){return f("(?=",a,")")}function f(...a){const b=a.map(a=>d(a)).join("");return b}function ai(a){const b=a[a.length-1];return typeof b=="object"&&b.constructor===Object?(a.splice(a.length-1,1),b):{}}function o(...a){const b=ai(a),c="("+(b.capture?"":"?:")+a.map(a=>d(a)).join("|")+")";return c}function t(a){return new RegExp(a.toString()+"|").exec("").length-1}function F(a,c){const b=a&&a.exec(c);return b&&b.index===0}ag=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function k(b,{joinWith:c}){let a=0;return b.map(e=>{a+=1;const f=a;let b=d(e),c="";while(b.length>0){const d=ag.exec(b);if(!d){c+=b;break}c+=b.substring(0,d.index),b=b.substring(d.index+d[0].length),d[0][0]==="\\"&&d[1]?c+="\\"+String(Number(d[1])+f):(c+=d[0],d[0]==="("&&a++)}return c}).map(a=>`(${a})`).join(c)}ad=