PageSourceSearch

https://showcase-agno-production.up.railway.app/_next/static/chunks/2098.d2b427663b26f69e.js

js showcase-agno-production.up.railway.app collected 2026-10-03 12:16:55 UTC 225,208 bytes, 138 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2098],{51746:(e,t)=>{"use strict";t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return(n+r)*3/4-r},t.toByteArray=function(e){var t,n,a=l(e),o=a[0],s=a[1],u=new i((o+s)*3/4-s),c=0,h=s>0?o-4:o;for(n=0;n<h;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===s&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[c++]=255&t),1===s&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],o=0,s=r-i;o<s;o+=16383)a.push(function(e,t,r){for(var i,a=[],o=t;o<r;o+=3)i=(e[o]<<16&0xff0000)+(e[o+1]<<8&65280)+(255&e[o+2]),a.push(n[i>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}(e,o,o+16383>s?s:o+16383));return 1===i?a.push(n[(t=e[r-1])>>2]+n[t<<4&63]+"=="):2===i&&a.push(n[(t=(e[r-2]<<8)+e[r-1])>>10]+n[t>>4&63]+n[t<<2&63]+"="),a.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,s=a.length;o<s;++o)n[o]=a[o],r[a.charCodeAt(o)]=o;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");-1===n&&(n=t);var r=n===t?0:4-n%4;return[n,r]}r[45]=62,r[95]=63},55459:(e,t)=>{t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,l=(1<<s)-1,u=l>>1,c=-7,h=n?i-1:0,p=n?-1:1,d=e[t+h];for(h+=p,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=256*a+e[t+h],h+=p,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+e[t+h],h+=p,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,r),a-=u}return(d?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,l,u=8*a-i-1,c=(1<<u)-1,h=c>>1,p=5960464477539062e-23*(23===i),d=r?0:a-1,f=r?1:-1,g=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(s=+!!isNaN(t),o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+h>=1?t+=p/l:t+=p*Math.pow(2,1-h),t*l>=2&&(o++,l/=2),o+h>=c?(s=0,o=c):o+h>=1?(s=(t*l-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[n+d]=255&s,d+=f,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;e[n+d]=255&o,d+=f,o/=256,u-=8);e[n+d-f]|=128*g}},81029:(e,t,n)=>{"use strict";let r=n(51746),i=n(55459),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function o(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,n){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return c(e)}return l(e,t,n)}function l(e,t,n){if("string"==typeof e){var r=e,i=t;if(("string"!=typeof i||""===i)&&(i="utf8"),!s.isEncoding(i))throw TypeError("Unknown encoding: "+i);let n=0|f(r,i),a=o(n),l=a.write(r,i);return l!==n&&(a=a.slice(0,l)),a}if(ArrayBuffer.isView(e)){var a=e;if(O(a,Uint8Array)){let e=new Uint8Array(a);return p(e.buffer,e.byteOffset,e.byteLength)}return h(a)}if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(O(e,ArrayBuffer)||e&&O(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(O(e,SharedArrayBuffer)||e&&O(e.buffer,SharedArrayBuffer)))return p(e,t,n);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let l=e.valueOf&&e.valueOf();if(null!=l&&l!==e)return s.from(l,t,n);let u=function(e){if(s.isBuffer(e)){let t=0|d(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?o(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(u)return u;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,n);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');
vendor: 19,237 bytes, line 1
1if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),o(e<0?0:0|d(e))}function h(e){let t=e.length<0?0:0|d(e.length),n=o(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function p(e,t,n){let r;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),s.prototype),r}function d(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function f(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||O(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return M(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return $(e).length;default:if(i)return r?-1:M(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,n){let i=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===n||n>this.length)&&(n=this.length),n<=0||(n>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,n){let r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=t;r<n;++r)i+=U[e[r]];return i}(this,t,n);case"utf8":case"utf-8":return w(this,t,n);case"ascii":return function(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}(this,t,n);case"latin1":case"binary":return function(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}(this,t,n);case"base64":var a,o,s;return a=this,o=t,s=n,0===o&&s===a.length?r.fromByteArray(a):r.fromByteArray(a.slice(o,s));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,n){let r=e.slice(t,n),i="";for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+256*r[e+1]);return i}(this,t,n);default:if(i)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function m(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){var a;if(0===e.length)return -1;if("string"==typeof n?(r=n,n=0):n>0x7fffffff?n=0x7fffffff:n<-0x80000000&&(n=-0x80000000),(a=n*=1)!=a&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length)if(i)return -1;else n=e.length-1;else if(n<0)if(!i)return -1;else n=0;if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(i)return Uint8Array.prototype.indexOf.call(e,t,n);else return Uint8Array.prototype.lastIndexOf.call(e,t,n);return b(e,[t],n,r,i)}throw TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){let a,o=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return -1;o=2,s/=2,l/=2,n/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let r=-1;for(a=n;a<s;a++)if(u(e,a)===u(t,-1===r?0:a-r)){if(-1===r&&(r=a),a-r+1===l)return r*o}else -1!==r&&(a-=a-r),r=-1}else for(n+l>s&&(n=s-l),a=n;a>=0;a--){let n=!0;for(let r=0;r<l;r++)if(u(e,a+r)!==u(t,r)){n=!1;break}if(n)return a}return -1}function w(e,t,n){n=Math.min(e.length,n);let r=[],i=t;for(;i<n;){let t=e[i],a=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=n){let n,r,s,l;switch(o){case 1:t<128&&(a=t);break;case 2:(192&(n=e[i+1]))==128&&(l=(31&t)<<6|63&n)>127&&(a=l);break;case 3:n=e[i+1],r=e[i+2],(192&n)==128&&(192&r)==128&&(l=(15&t)<<12|(63&n)<<6|63&r)>2047&&(l<55296||l>57343)&&(a=l);break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],(192&n)==128&&(192&r)==128&&(192&s)==128&&(l=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s)>65535&&l<1114112&&(a=l)}}null===a?(a=65533,o=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=o}var a=r;let o=a.length;if(o<=4096)return String.fromCharCode.apply(String,a);let s="",l=0;for(;l<o;)s+=String.fromCharCode.apply(String,a.slice(l,l+=4096));return s}function k(e,t,n){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>n)throw RangeError("Trying to access beyond buffer length")}function _(e,t,n,r,i,a){if(!s.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw RangeError('"value" argument is out of bounds');if(n+r>e.length)throw RangeError("Index out of range")}function C(e,t,n,r,i){I(t,r,i,e,n,7);let a=Number(t&BigInt(0xffffffff));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;let o=Number(t>>BigInt(32)&BigInt(0xffffffff));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function S(e,t,n,r,i){I(t,r,i,e,n,7);let a=Number(t&BigInt(0xffffffff));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;let o=Number(t>>BigInt(32)&BigInt(0xffffffff));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}function v(e,t,n,r,i,a){if(n+r>e.length||n<0)throw RangeError("Index out of range")}function x(e,t,n,r,a){return t*=1,n>>>=0,a||v(e,t,n,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,n,r,23,4),n+4}function A(e,t,n,r,a){return t*=1,n>>>=0,a||v(e,t,n,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,n,r,52,8),n+8}t.hp=s,t.IS=50,s.TYPED_ARRAY_SUPPORT=function(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,n){return l(e,t,n)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,n){return(u(e),e<=0)?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)},s.allocUnsafe=function(e){return c(e)},s.allocUnsafeSlow=function(e){return c(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(O(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),O(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:+(r<n)},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){let n;if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);if(void 0===t)for(n=0,t=0;n<e.length;++n)t+=e[n].length;let r=s.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){let t=e[n];if(O(t,Uint8Array))i+t.length>r.length?(s.isBuffer(t)||(t=s.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else if(s.isBuffer(t))t.copy(r,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=t.length}return r},s.byteLength=f,s.prototype._isBuffer=!0,s.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)m(this,t,t+1);return this},s.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},s.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},s.prototype.toString=function(){let e=this.length;return 0===e?"":0==arguments.length?w(this,0,e):g.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){let e="",n=t.IS;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},a&&(s.prototype[a]=s.prototype.inspect),s.prototype.compare=function(e,t,n,r,i){if(O(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return -1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;let a=i-r,o=n-t,l=Math.min(a,o),u=this.slice(r,i),c=e.slice(t,n);for(let e=0;e<l;++e)if(u[e]!==c[e]){a=u[e],o=c[e];break}return a<o?-1:+(o<a)},s.prototype.includes=function(e,t,n){return -1!==this.indexOf(e,t,n)},s.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},s.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},s.prototype.write=function(e,t,n,r){var i,a,o,s,l,u,c,h;if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let p=this.length-t;if((void 0===n||n>p)&&(n=p),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let d=!1;for(;;)switch(r){case"hex":return function(e,t,n,r){let i;n=Number(n)||0;let a=e.length-n;r?(r=Number(r))>a&&(r=a):r=a;let o=t.length;for(r>o/2&&(r=o/2),i=0;i<r;++i){var s;let r=parseInt(t.substr(2*i,2),16);if((s=r)!=s)break;e[n+i]=r}return i}(this,e,t,n);case"utf8":case"utf-8":return i=t,a=n,B(M(e,this.length-i),this,i,a);case"ascii":case"latin1":case"binary":return o=t,s=n,B(function(e){let t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(e),this,o,s);case"base64":return l=t,u=n,B($(e),this,l,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c=t,h=n,B(function(e,t){let n,r,i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=(n=e.charCodeAt(a))>>8,i.push(n%256),i.push(r);return i}(e,this.length-c),this,c,h);default:if(d)throw TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),d=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(e,t){let n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);let r=this.subarray(e,t);return Object.setPrototypeOf(r,s.prototype),r},s.prototype.readUintLE=s.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return r},s.prototype.readUintBE=s.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=D(function(e){L(e>>>=0,"offset");let t=this[e],n=this[e+7];(void 0===t||void 0===n)&&R(e,this.length-8);let r=t+256*this[++e]+65536*this[++e]+0x1000000*this[++e],i=this[++e]+256*this[++e]+65536*this[++e]+0x1000000*n;return BigInt(r)+(BigInt(i)<<BigInt(32))}),s.prototype.readBigUInt64BE=D(function(e){L(e>>>=0,"offset");let t=this[e],n=this[e+7];(void 0===t||void 0===n)&&R(e,this.length-8);let r=0x1000000*t+65536*this[++e]+256*this[++e]+this[++e],i=0x1000000*this[++e]+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),s.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);let r=t,i=1,a=this[e+--r];for(;r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},s.prototype.readInt8=function(e,t){return(e>>>=0,t||k(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||k(e,2,this.length);let n=this[e]|this[e+1]<<8;return 32768&n?0xffff0000|n:n},s.prototype.readInt16BE=function(e,t){e>>>=0,t||k(e,2,this.length);let n=this[e+1]|this[e]<<8;return 32768&n?0xffff0000|n:n},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=D(function(e){L(e>>>=0,"offset");let t=this[e],n=this[e+7];return(void 0===t||void 0===n)&&R(e,this.length-8),(BigInt(this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24))<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+0x1000000*this[++e])}),s.prototype.readBigInt64BE=D(function(e){L(e>>>=0,"offset");let t=this[e],n=this[e+7];return(void 0===t||void 0===n)&&R(e,this.length-8),(BigInt((t<<24)+65536*this[++e]+256*this[++e]+this[++e])<<BigInt(32))+BigInt(0x1000000*this[++e]+65536*this[++e]+256*this[++e]+n)}),s.prototype.readFloatLE=function(e,t){return e>>>=0,t||k(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||k(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||k(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||k(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,n,r){if(e*=1,t>>>=0,n>>>=0,!r){let r=Math.pow(2,8*n)-1;_(this,e,t,n,r,0)}let i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(e,t,n,r){if(e*=1,t>>>=0,n>>>=0,!r){let r=Math.pow(2,8*n)-1;_(this,e,t,n,r,0)}let i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,n){return e*=1,t>>>=0,n||_(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,n){return e*=1,t>>>=0,n||_(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,n){return e*=1,t>>>=0,n||_(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,n){return e*=1,t>>>=0,n||_(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,n){return e*=1,t>>>=0,n||_(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigUInt64LE=D(function(e,t=0){return C(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=D(function(e,t=0){return S(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(e,t,n,r){if(e*=1,t>>>=0,!r){let r=Math.pow(2,8*n-1);_(this,e,t,n,r-1,-r)}let i=0,a=1,o=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===o&&0!==this[t+i-1]&&(o=1),this[t+i]=(e/a|0)-o&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e*=1,t>>>=0,!r){let r=Math.pow(2,8*n-1);_(this,e,t,n,r-1,-r)}let i=n-1,a=1,o=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/a|0)-o&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e*=1,t>>>=0,n||_(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e*=1,t>>>=0,n||_(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,n){return e*=1,t>>>=0,n||_(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,n){return e*=1,t>>>=0,n||_(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,n){return e*=1,t>>>=0,n||_(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigInt64LE=D(function(e,t=0){return C(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=D(function(e,t=0){return S(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeFloatLE=function(e,t,n){return x(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return x(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return A(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return A(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(!s.isBuffer(e))throw TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw RangeError("Index out of range");if(r<0)throw RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);let i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},s.prototype.fill=function(e,t,n,r){let i;if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw TypeError("Unknown encoding: "+r);if(1===e.length){let t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw RangeError("Out of range index");if(n<=t)return this;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{let a=s.isBuffer(e)?e:s.from(e,r),o=a.length;
1if(0===o)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=a[i%o]}return this};let E={};function N(e,t,n){E[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function P(e){let t="",n=e.length,r=+("-"===e[0]);for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function I(e,t,n,r,i,a){if(e>n||e<t){let r,i="bigint"==typeof t?"n":"";throw r=a>3?0===t||t===BigInt(0)?`>= 0${i} and < 2${i} ** ${(a+1)*8}${i}`:`>= -(2${i} ** ${(a+1)*8-1}${i}) and < 2 ** ${(a+1)*8-1}${i}`:`>= ${t}${i} and <= ${n}${i}`,new E.ERR_OUT_OF_RANGE("value",r,e)}L(i,"offset"),(void 0===r[i]||void 0===r[i+a])&&R(i,r.length-(a+1))}function L(e,t){if("number"!=typeof e)throw new E.ERR_INVALID_ARG_TYPE(t,"number",e)}function R(e,t,n){if(Math.floor(e)!==e)throw L(e,n),new E.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new E.ERR_BUFFER_OUT_OF_BOUNDS;throw new E.ERR_OUT_OF_RANGE(n||"offset",`>= ${+!!n} and <= ${t}`,e)}N("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),N("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),N("ERR_OUT_OF_RANGE",function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>0x100000000?i=P(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=P(i)),i+="n"),r+=` It must be ${t}. Received ${i}`},RangeError);let T=/[^+/0-9A-Za-z-_]/g;function M(e,t){let n;t=t||1/0;let r=e.length,i=null,a=[];for(let o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319||o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}else throw Error("Invalid code point")}return a}function $(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(T,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length)&&!(i>=e.length);++i)t[i+n]=e[i];return i}function O(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}let U=function(){let e="0123456789abcdef",t=Array(256);for(let n=0;n<16;++n){let r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function D(e){return"undefined"==typeof BigInt?G:e}function G(){throw Error("BigInt not supported")}},82098:(e,t,n)=>{"use strict";let r,i;n.r(t),n.d(t,{CodeBlock:()=>iP});var a={};n.r(a),n.d(a,{boolean:()=>eR,booleanish:()=>eT,commaOrSpaceSeparated:()=>eU,commaSeparated:()=>eO,number:()=>e$,overloadedBoolean:()=>eM,spaceSeparated:()=>eB});var o=n(73431),s=n(12115),l=n(95155);let u=[{id:"abap",name:"ABAP",import:()=>n.e(5978).then(n.bind(n,65978))},{id:"actionscript-3",name:"ActionScript",import:()=>n.e(7039).then(n.bind(n,47039))},{id:"ada",name:"Ada",import:()=>n.e(8130).then(n.bind(n,48130))},{id:"angular-html",name:"Angular HTML",import:()=>Promise.all([n.e(2577),n.e(803),n.e(2179),n.e(4560)]).then(n.bind(n,24560))},{id:"angular-ts",name:"Angular TypeScript",import:()=>Promise.all([n.e(2577),n.e(1630),n.e(803),n.e(2179),n.e(4720),n.e(8110)]).then(n.bind(n,40040))},{id:"apache",name:"Apache Conf",import:()=>n.e(1994).then(n.bind(n,91994))},{id:"apex",name:"Apex",import:()=>n.e(6760).then(n.bind(n,26760))},{id:"apl",name:"APL",import:()=>Promise.all([n.e(2577),n.e(803),n.e(2179),n.e(3492),n.e(3355)]).then(n.bind(n,33355))},{id:"applescript",name:"AppleScript",import:()=>n.e(2347).then(n.bind(n,2347))},{id:"ara",name:"Ara",import:()=>n.e(7400).then(n.bind(n,7400))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>n.e(1846).then(n.bind(n,79465))},{id:"asm",name:"Assembly",import:()=>n.e(5475).then(n.bind(n,65475))},{id:"astro",name:"Astro",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(803),n.e(391)]).then(n.bind(n,60391))},{id:"awk",name:"AWK",import:()=>n.e(3865).then(n.bind(n,13865))},{id:"ballerina",name:"Ballerina",import:()=>n.e(7066).then(n.bind(n,87066))},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>n.e(7579).then(n.bind(n,37579))},{id:"beancount",name:"Beancount",import:()=>n.e(6377).then(n.bind(n,26377))},{id:"berry",name:"Berry",aliases:["be"],import:()=>n.e(1246).then(n.bind(n,41246))},{id:"bibtex",name:"BibTeX",import:()=>n.e(7718).then(n.bind(n,87718))},{id:"bicep",name:"Bicep",import:()=>n.e(1475).then(n.bind(n,71475))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:()=>n.e(4227).then(n.bind(n,64227))},{id:"blade",name:"Blade",import:()=>Promise.all([n.e(2577),n.e(803),n.e(2179),n.e(3492),n.e(7550),n.e(6907)]).then(n.bind(n,39288))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>n.e(8541).then(n.bind(n,78541))},{id:"c",name:"C",import:()=>n.e(661).then(n.bind(n,661))},{id:"c3",name:"C3",import:()=>n.e(7770).then(n.bind(n,7770))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>n.e(5559).then(n.bind(n,85559))},{id:"cairo",name:"Cairo",import:()=>Promise.all([n.e(6870),n.e(6242)]).then(n.bind(n,6242))},{id:"clarity",name:"Clarity",import:()=>
1n.e(4190).then(n.bind(n,54190))},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>n.e(8154).then(n.bind(n,48154))},{id:"cmake",name:"CMake",import:()=>n.e(6475).then(n.bind(n,66475))},{id:"cobol",name:"COBOL",import:()=>Promise.all([n.e(2577),n.e(803),n.e(2179),n.e(3492),n.e(7615)]).then(n.bind(n,97615))},{id:"codeowners",name:"CODEOWNERS",import:()=>n.e(7203).then(n.bind(n,7203))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>n.e(8320).then(n.bind(n,18320))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>Promise.all([n.e(2577),n.e(152)]).then(n.bind(n,70152))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>n.e(3390).then(n.bind(n,43390))},{id:"coq",name:"Coq",import:()=>n.e(4341).then(n.bind(n,34341))},{id:"cpp",name:"C++",aliases:["c++"],import:()=>Promise.all([n.e(6666),n.e(8835),n.e(7550),n.e(661),n.e(4174)]).then(n.bind(n,35365))},{id:"crystal",name:"Crystal",import:()=>Promise.all([n.e(2577),n.e(803),n.e(2179),n.e(7550),n.e(661),n.e(6694),n.e(3888)]).then(n.bind(n,43888))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>n.e(4533).then(n.bind(n,4533))},{id:"css",name:"CSS",import:()=>n.e(803).then(n.bind(n,40803))},{id:"csv",name:"CSV",import:()=>n.e(286).then(n.bind(n,10286))},{id:"cue",name:"CUE",import:()=>n.e(227).then(n.bind(n,80227))},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>n.e(829).then(n.bind(n,40829))},{id:"d",name:"D",import:()=>n.e(8874).then(n.bind(n,78874))},{id:"dart",name:"Dart",import:()=>n.e(6667).then(n.bind(n,26667))},{id:"dax",name:"DAX",import:()=>n.e(3053).then(n.bind(n,83053))},{id:"desktop",name:"Desktop",import:()=>n.e(8202).then(n.bind(n,78202))},{id:"diff",name:"Diff",import:()=>n.e(77).then(n.bind(n,50077))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>n.e(2140).then(n.bind(n,2140))},{id:"dotenv",name:"dotEnv",import:()=>n.e(9742).then(n.bind(n,19742))},{id:"dream-maker",name:"Dream Maker",import:()=>n.e(576).then(n.bind(n,60576))},{id:"edge",name:"Edge",import:()=>Promise.all([n.e(2577),n.e(535),n.e(803),n.e(2179),n.e(8999)]).then(n.bind(n,38999))},{id:"elixir",name:"Elixir",import:()=>Promise.all([n.e(2577),n.e(803),n.e(2179),n.e(9645)]).then(n.bind(n,9645))},{id:"elm",name:"Elm",import:()=>Promise.all([n.e(661),n.e(5362)]).then(n.bind(n,5362))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>n.e(3879).then(n.bind(n,57434))},{id:"erb",name:"ERB",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(803),n.e(2179),n.e(3492),n.e(7550),n.e(661),n.e(6694),n.e(1213),n.e(2351),n.e(7319)]).then(n.bind(n,7319))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>Promise.all([n.e(6983),n.e(6397)]).then(n.bind(n,16397))},{id:"fennel",name:"Fennel",import:()=>n.e(1600).then(n.bind(n,11600))},{id:"fish",name:"Fish",import:()=>n.e(9130).then(n.bind(n,89130))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>n.e(770).then(n.bind(n,20770))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>Promise.all([n.e(3914),n.e(7094)]).then(n.bind(n,7094))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>n.e(3914).then(n.bind(n,73914))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>Promise.all([n.e(6983),n.e(8714)]).then(n.bind(n,78714))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:()=>n.e(6713).then(n.bind(n,16713))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:()=>n.e(8932).then(n.bind(n,98932))},{id:"gdshader",name:"GDShader",import:()=>n.e(7662).then(n.bind(n,97662))},{id:"genie",name:"Genie",import:()=>n.e(8650).then(n.bind(n,28650))},{id:"gherkin",name:"Gherkin",import:()=>n.e(8508).then(n.bind(n,88508))},{id:"git-commit",name:"Git Commit Message",import:()=>n.e(2110).then(n.bind(n,42110))},{id:"git-rebase",name:"Git Rebase Message",import:()=>Promise.all([n.e(6694),n.e(1381)]).then(n.bind(n,41381))},{id:"gleam",name:"Gleam",import:()=>n.e(6134).then(n.bind(n,16134))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(803),n.e(2179),n.e(2899)]).then(n.bind(n,22899))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(803),n.e(2179),n.e(7053)]).then(n.bind(n,87053))},{id:"glsl",name:"GLSL",import:()=>Promise.all([n.e(661),n.e(7336)]).then(n.bind(n,7336))}
1,{id:"gn",name:"GN",import:()=>n.e(5803).then(n.bind(n,55803))},{id:"gnuplot",name:"Gnuplot",import:()=>n.e(4459).then(n.bind(n,24459))},{id:"go",name:"Go",import:()=>n.e(5106).then(n.bind(n,5106))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(1213)]).then(n.bind(n,91213))},{id:"groovy",name:"Groovy",import:()=>n.e(2558).then(n.bind(n,42558))},{id:"hack",name:"Hack",import:()=>Promise.all([n.e(2577),n.e(803),n.e(2179),n.e(7550),n.e(155)]).then(n.bind(n,90155))},{id:"haml",name:"Ruby Haml",import:()=>Promise.all([n.e(2577),n.e(803),n.e(6778)]).then(n.bind(n,96778))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>Promise.all([n.e(2577),n.e(803),n.e(2179),n.e(6188)]).then(n.bind(n,46188))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>n.e(2310).then(n.bind(n,92310))},{id:"haxe",name:"Haxe",import:()=>n.e(9544).then(n.bind(n,99544))},{id:"hcl",name:"HashiCorp HCL",import:()=>n.e(1043).then(n.bind(n,41043))},{id:"hjson",name:"Hjson",import:()=>n.e(3252).then(n.bind(n,23252))},{id:"hlsl",name:"HLSL",import:()=>n.e(6905).then(n.bind(n,26905))},{id:"html",name:"HTML",import:()=>Promise.all([n.e(2577),n.e(803),n.e(2179)]).then(n.bind(n,72179))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>Promise.all([n.e(2577),n.e(803),n.e(2179),n.e(7737)]).then(n.bind(n,57737))},{id:"http",name:"HTTP",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(3492),n.e(6694),n.e(1213),n.e(2212)]).then(n.bind(n,12212))},{id:"hurl",name:"Hurl",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(3492),n.e(1213),n.e(2595)]).then(n.bind(n,52595))},{id:"hxml",name:"HXML",import:()=>n.e(9263).then(n.bind(n,9263))},{id:"hy",name:"Hy",import:()=>n.e(8397).then(n.bind(n,28397))},{id:"imba",name:"Imba",import:()=>n.e(9369).then(n.bind(n,39369))},{id:"ini",name:"INI",aliases:["properties"],import:()=>n.e(244).then(n.bind(n,90244))},{id:"java",name:"Java",import:()=>n.e(3492).then(n.bind(n,33492))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:()=>n.e(2577).then(n.bind(n,877))},{id:"jinja",name:"Jinja",import:()=>Promise.all([n.e(2577),n.e(803),n.e(2179),n.e(9642)]).then(n.bind(n,19642))},{id:"jison",name:"Jison",import:()=>Promise.all([n.e(2577),n.e(1003)]).then(n.bind(n,1003))},{id:"json",name:"JSON",import:()=>n.e(2010).then(n.bind(n,12010))},{id:"json5",name:"JSON5",import:()=>n.e(6741).then(n.bind(n,16741))},{id:"jsonc",name:"JSON with Comments",import:()=>n.e(2787).then(n.bind(n,62787))},{id:"jsonl",name:"JSON Lines",import:()=>n.e(1564).then(n.bind(n,31564))},{id:"jsonnet",name:"Jsonnet",import:()=>n.e(8913).then(n.bind(n,8913))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>n.e(3205).then(n.bind(n,63205))},{id:"jsx",name:"JSX",import:()=>n.e(9312).then(n.bind(n,86433))},{id:"julia",name:"Julia",aliases:["jl"],import:()=>Promise.all([n.e(2577),n.e(6666),n.e(8835),n.e(7550),n.e(661),n.e(6870),n.e(4180)]).then(n.bind(n,21037))},{id:"just",name:"Just",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(803),n.e(2179),n.e(3492),n.e(7550),n.e(661),n.e(6694),n.e(1213),n.e(6870),n.e(2351),n.e(2363),n.e(4542)]).then(n.bind(n,34542))},{id:"kdl",name:"KDL",import:()=>n.e(6645).then(n.bind(n,26645))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>n.e(9911).then(n.bind(n,59911))},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>n.e(4142).then(n.bind(n,24142))},{id:"latex",name:"LaTeX",import:()=>n.e(3554).then(n.bind(n,43554))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>n.e(220).then(n.bind(n,20220))},{id:"less",name:"Less",import:()=>n.e(2987).then(n.bind(n,52987))},{id:"liquid",name:"Liquid",import:()=>Promise.all([n.e(2577),n.e(803),n.e(2179),n.e(8828)]).then(n.bind(n,38828))},{id:"llvm",name:"LLVM IR",import:()=>n.e(7255).then(n.bind(n,37255))},{id:"log",name:"Log file",import:()=>n.e(2168).then(n.bind(n,42168))},{id:"logo",name:"Logo",import:()=>n.e(1373).then(n.bind(n,81373))},{id:"lua",name:"Lua",import:()=>Promise.all([n.e(661),n.e(4904)]).then(n.bind(n,24904))}
1,{id:"luau",name:"Luau",import:()=>n.e(2727).then(n.bind(n,72727))},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>n.e(1950).then(n.bind(n,61950))},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>n.e(6983).then(n.bind(n,86983))},{id:"marko",name:"Marko",import:()=>Promise.all([n.e(535),n.e(803),n.e(4720),n.e(2987),n.e(9212)]).then(n.bind(n,59212))},{id:"matlab",name:"MATLAB",import:()=>n.e(6279).then(n.bind(n,86279))},{id:"mdc",name:"MDC",import:()=>Promise.all([n.e(2577),n.e(803),n.e(2179),n.e(6983),n.e(6612)]).then(n.bind(n,76612))},{id:"mdx",name:"MDX",import:()=>n.e(7231).then(n.bind(n,67231))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>n.e(131).then(n.bind(n,80131))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>n.e(3556).then(n.bind(n,33556))},{id:"mojo",name:"Mojo",import:()=>n.e(8097).then(n.bind(n,58097))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:()=>n.e(1298).then(n.bind(n,1298))},{id:"move",name:"Move",import:()=>n.e(623).then(n.bind(n,80623))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>n.e(5344).then(n.bind(n,95344))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>n.e(9235).then(n.bind(n,89235))},{id:"nextflow-groovy",name:"nextflow-groovy",import:()=>n.e(9460).then(n.bind(n,49460))},{id:"nginx",name:"Nginx",import:()=>Promise.all([n.e(661),n.e(6254)]).then(n.bind(n,56254))},{id:"nim",name:"Nim",import:()=>Promise.all([n.e(2577),n.e(803),n.e(2179),n.e(3492),n.e(661),n.e(6983),n.e(5486)]).then(n.bind(n,45486))},{id:"nix",name:"Nix",import:()=>n.e(4862).then(n.bind(n,24862))},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>n.e(9993).then(n.bind(n,9993))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>n.e(4575).then(n.bind(n,84575))},{id:"objective-cpp",name:"Objective-C++",import:()=>n.e(4763).then(n.bind(n,88095))},{id:"ocaml",name:"OCaml",import:()=>n.e(9981).then(n.bind(n,82362))},{id:"odin",name:"Odin",import:()=>n.e(8616).then(n.bind(n,98616))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:()=>n.e(789).then(n.bind(n,40789))},{id:"pascal",name:"Pascal",import:()=>n.e(3332).then(n.bind(n,13332))},{id:"perl",name:"Perl",import:()=>Promise.all([n.e(2577),n.e(803),n.e(2179),n.e(3492),n.e(7550),n.e(2363),n.e(5361)]).then(n.bind(n,22363))},{id:"php",name:"PHP",import:()=>Promise.all([n.e(2577),n.e(803),n.e(2179),n.e(3492),n.e(7550),n.e(1342),n.e(7742)]).then(n.bind(n,1342))},{id:"pkl",name:"Pkl",import:()=>n.e(4003).then(n.bind(n,4003))},{id:"plsql",name:"PL/SQL",import:()=>n.e(4730).then(n.bind(n,54730))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>n.e(7363).then(n.bind(n,67363))},{id:"polar",name:"Polar",import:()=>n.e(2102).then(n.bind(n,92102))},{id:"postcss",name:"PostCSS",import:()=>n.e(749).then(n.bind(n,70749))},{id:"powerquery",name:"PowerQuery",import:()=>n.e(365).then(n.bind(n,40365))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>n.e(6363).then(n.bind(n,86363))},{id:"prisma",name:"Prisma",import:()=>n.e(7104).then(n.bind(n,27104))},{id:"prolog",name:"Prolog",import:()=>n.e(9661).then(n.bind(n,79661))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>n.e(5576).then(n.bind(n,35576))},{id:"pug",name:"Pug",aliases:["jade"],import:()=>Promise.all([n.e(2577),n.e(803),n.e(2179),n.e(1250)]).then(n.bind(n,51250))},{id:"puppet",name:"Puppet",import:()=>n.e(7182).then(n.bind(n,17182))},{id:"purescript",name:"PureScript",import:()=>n.e(2239).then(n.bind(n,22239))},{id:"python",name:"Python",aliases:["py"],import:()=>n.e(6870).then(n.bind(n,76870))},{id:"qml",name:"QML",import:()=>Promise.all([n.e(2577),n.e(1788)]).then(n.bind(n,51788))},{id:"qmldir",name:"QML Directory",import:()=>n.e(3527).then(n.bind(n,3527))},{id:"qss",name:"Qt Style Sheets",import:()=>n.e(669).then(n.bind(n,70669))},{id:"r",name:"R",import:()=>n.e(628).then(n.bind(n,90628))},{id:"racket",name:"Racket",import:()=>n.e(5178).then(n.bind(n,85178))},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>n.e(6691).then(n.bind(n,66691))},{id:"razor",name:"ASP.NET Razor",import:()=>Promise.all([n.e(2577),n.e(803),n.e(2179),n.e(4533),n.e(8558)]).then(n.bind(n,98558))},{id:"reg",name:"Windows Registry Script",import:()=>
1n.e(6180).then(n.bind(n,46180))},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>n.e(9611).then(n.bind(n,99611))},{id:"rel",name:"Rel",import:()=>n.e(9420).then(n.bind(n,57039))},{id:"riscv",name:"RISC-V",import:()=>n.e(7783).then(n.bind(n,47783))},{id:"ron",name:"RON",import:()=>n.e(7923).then(n.bind(n,80304))},{id:"rosmsg",name:"ROS Interface",import:()=>n.e(6131).then(n.bind(n,86131))},{id:"rst",name:"reStructuredText",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(803),n.e(2179),n.e(3492),n.e(7550),n.e(661),n.e(6694),n.e(1213),n.e(6870),n.e(2351),n.e(773)]).then(n.bind(n,70773))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(803),n.e(2179),n.e(3492),n.e(7550),n.e(661),n.e(6694),n.e(1213),n.e(2351)]).then(n.bind(n,45308))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>n.e(8806).then(n.bind(n,78806))},{id:"sas",name:"SAS",import:()=>Promise.all([n.e(7550),n.e(8121)]).then(n.bind(n,18121))},{id:"sass",name:"Sass",import:()=>n.e(6358).then(n.bind(n,56358))},{id:"scala",name:"Scala",import:()=>n.e(6127).then(n.bind(n,98508))},{id:"scheme",name:"Scheme",import:()=>n.e(3173).then(n.bind(n,63173))},{id:"scss",name:"SCSS",import:()=>Promise.all([n.e(803),n.e(4720)]).then(n.bind(n,64720))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>n.e(1919).then(n.bind(n,11919))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>n.e(5710).then(n.bind(n,55710))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>n.e(6694).then(n.bind(n,24313))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>Promise.all([n.e(6694),n.e(5818)]).then(n.bind(n,35818))},{id:"smalltalk",name:"Smalltalk",import:()=>n.e(7213).then(n.bind(n,47213))},{id:"solidity",name:"Solidity",import:()=>n.e(6707).then(n.bind(n,86707))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>Promise.all([n.e(2577),n.e(803),n.e(2179),n.e(685)]).then(n.bind(n,685))},{id:"sparql",name:"SPARQL",import:()=>n.e(6147).then(n.bind(n,36147))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>n.e(9269).then(n.bind(n,19269))},{id:"sql",name:"SQL",import:()=>n.e(7550).then(n.bind(n,37550))},{id:"ssh-config",name:"SSH Config",import:()=>n.e(4690).then(n.bind(n,92309))},{id:"stata",name:"Stata",import:()=>Promise.all([n.e(7550),n.e(8933)]).then(n.bind(n,28933))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>n.e(5998).then(n.bind(n,75998))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:()=>Promise.all([n.e(2577),n.e(8603)]).then(n.bind(n,68603))},{id:"svelte",name:"Svelte",import:()=>Promise.all([n.e(2577),n.e(535),n.e(803),n.e(5733)]).then(n.bind(n,45733))},{id:"swift",name:"Swift",import:()=>n.e(4123).then(n.bind(n,4123))},{id:"system-verilog",name:"SystemVerilog",import:()=>n.e(4966).then(n.bind(n,4966))},{id:"systemd",name:"Systemd Units",import:()=>n.e(1675).then(n.bind(n,81675))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>n.e(2851).then(n.bind(n,12851))},{id:"tasl",name:"Tasl",import:()=>n.e(6256).then(n.bind(n,16256))},{id:"tcl",name:"Tcl",import:()=>n.e(3151).then(n.bind(n,53151))},{id:"templ",name:"Templ",import:()=>Promise.all([n.e(2577),n.e(803),n.e(5106),n.e(9528)]).then(n.bind(n,89528))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>n.e(1478).then(n.bind(n,61478))}
1,{id:"tex",name:"TeX",import:()=>n.e(5449).then(n.bind(n,85449))},{id:"toml",name:"TOML",import:()=>n.e(8010).then(n.bind(n,62772))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(803),n.e(2179),n.e(3492),n.e(7550),n.e(661),n.e(8129)]).then(n.bind(n,58129))},{id:"tsv",name:"TSV",import:()=>n.e(4053).then(n.bind(n,84053))},{id:"tsx",name:"TSX",import:()=>n.e(6814).then(n.bind(n,94651))},{id:"turtle",name:"Turtle",import:()=>n.e(3486).then(n.bind(n,93486))},{id:"twig",name:"Twig",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(803),n.e(2179),n.e(3492),n.e(7550),n.e(661),n.e(6694),n.e(1213),n.e(6870),n.e(2351),n.e(4720),n.e(1342),n.e(4827)]).then(n.bind(n,64827))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:()=>n.e(535).then(n.bind(n,63941))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>n.e(321).then(n.bind(n,10321))},{id:"typst",name:"Typst",aliases:["typ"],import:()=>n.e(3068).then(n.bind(n,83068))}
1,{id:"v",name:"V",import:()=>n.e(64).then(n.bind(n,10064))},{id:"vala",name:"Vala",import:()=>n.e(9126).then(n.bind(n,19126))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>n.e(8584).then(n.bind(n,38584))},{id:"verilog",name:"Verilog",import:()=>n.e(6572).then(n.bind(n,36572))},{id:"vhdl",name:"VHDL",import:()=>n.e(1730).then(n.bind(n,81730))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>n.e(9416).then(n.bind(n,89416))},{id:"vue",name:"Vue",import:()=>Promise.all([n.e(2577),n.e(535),n.e(803),n.e(2179),n.e(5095)]).then(n.bind(n,45095))},{id:"vue-html",name:"Vue HTML",import:()=>Promise.all([n.e(2577),n.e(8758)]).then(n.bind(n,78758))},{id:"vue-vine",name:"Vue Vine",import:()=>Promise.all([n.e(2577),n.e(1290),n.e(803),n.e(4720),n.e(2987),n.e(3794)]).then(n.bind(n,7693))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>n.e(6310).then(n.bind(n,26310))},{id:"wasm",name:"WebAssembly",import:()=>n.e(5052).then(n.bind(n,65052))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>n.e(9770).then(n.bind(n,59770))},{id:"wgsl",name:"WGSL",import:()=>n.e(7919).then(n.bind(n,67919))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>n.e(5781).then(n.bind(n,5781))},{id:"wit",name:"WebAssembly Interface Types",import:()=>n.e(9730).then(n.bind(n,49730))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>n.e(7442).then(n.bind(n,21030))},{id:"xml",name:"XML",import:()=>Promise.all([n.e(3492),n.e(123)]).then(n.bind(n,55361))},{id:"xsl",name:"XSL",import:()=>Promise.all([n.e(3492),n.e(4131)]).then(n.bind(n,14131))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>n.e(681).then(n.bind(n,20681))},{id:"zenscript",name:"ZenScript",import:()=>n.e(6400).then(n.bind(n,96400))},{id:"zig",name:"Zig",import:()=>n.e(8360).then(n.bind(n,78360))}],c=Object.fromEntries(u.map(e=>[e.id,e.import])),h=Object.fromEntries(u.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),p={...c,...h};class d extends Error{constructor(e){super(e),this.name="ShikiError"}}var f=n(87358);function g(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}var m=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,y=class{static hasCaptures(e){return null!==e&&(m.lastIndex=0,m.test(e))}static replaceCaptures(e,t,n){return e.replace(m,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(!o)return e;{let e=t.substring(o.start,o.end);for(;"."===e[0];)e=e.substring(1);switch(a){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}})}};function b(e,t){if(null===e&&null===t)return 0;if(!e)return -1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){var i,a;let n=(i=e[r],i<(a=t[r])?-1:+(i>a));if(0!==n)return n}return 0}return n-r}function w(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function k(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var _=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},C=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(function(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i,a=t[e];if(!a.settings)continue;if("string"==typeof a.scope){let e=a.scope;i=(e=(e=e.replace(/^[,]+/,"")).replace(/[,]+$/,"")).split(",")}else i=Array.isArray(a.scope)?a.scope:[""];let o=-1;if("string"==typeof a.settings.fontStyle){o=0;let e=a.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++)switch(e[t]){case"italic":o|=1;break;case"bold":o|=2;break;case"underline":o|=4;break;case"strikethrough":o|=8}}let s=null;"string"==typeof a.settings.foreground&&w(a.settings.foreground)&&(s=a.settings.foreground);let l=null;"string"==typeof a.settings.background&&w(a.settings.background)&&(l=a.settings.background);for(let t=0,a=i.length;t<a;t++){let a=i[t].trim().split(" "),u=a[a.length-1],c=null;a.length>1&&(c=a.slice(0,a.length-1)).reverse(),n[r++]=new x(u,c,e,o,s,l)}}return n}(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort((e,t)=>
1{var n,r;let i=(n=e.scope,n<(r=t.scope)?-1:+(n>r));return 0!==i||0!==(i=b(e.parentScopes,t.parentScopes))?i:e.index-t.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(r=t.foreground),null!==t.background&&(i=t.background)}let a=new E(t),o=new v(n,a.getId(r),a.getId(i)),s=new I(new P(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new C(a,o,s)}(e,t)}_cachedMatchRoot=new _(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>(function(e,t){if(0===t.length)return!0;for(let i=0;i<t.length;i++){var n,r;let a=t[i],o=!1;if(">"===a){if(i===t.length-1)return!1;a=t[++i],o=!0}for(;e&&(n=e.scopeName,!((r=a)===n||n.startsWith(r)&&"."===n[r.length]));){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0})(e.parent,t.parentScopes));return n?new v(n.fontStyle,n.foreground,n.background):null}},S=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e||null!==this.parent&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}},v=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}},x=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},A=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(A||{}),E=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},N=Object.freeze([]),P=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||N,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==r&&(this.background=r)}},I=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;">"===e.parentScopes[n]&&n++,">"===t.parentScopes[r]&&r++,!(n>=e.parentScopes.length)&&!(r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(0!==i)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(""!==t){let e,n,r=t.indexOf(".");if(-1===r?(e=t,n=""):(e=t.substring(0,r),n=t.substring(r+1)),this._children.hasOwnProperty(e))return this._children[e].match(n)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){let s,l,u;if(""===n)return void this._doInsertHere(t,r,i,a,o);let c=n.indexOf(".");-1===c?(s=n,l=""):(s=n.substring(0,c),l=n.substring(c+1)),this._children.hasOwnProperty(s)?u=this._children[s]:(u=new e(this._mainRule.clone(),P.cloneArr(this._rulesWithParentScopes)),this._children[s]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(null===t)return void this._mainRule.acceptOverwrite(e,n,r,i);for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(0===b(o.parentScopes,t))return void o.acceptOverwrite(e,n,r,i)}-1===n&&(n=this._mainRule.fontStyle),0===r&&(r=this._mainRule.foreground),0===i&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new P(e,t,n,r,i))}},L=class e{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}
1static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:e.getForeground(t),background:e.getBackground(t)})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return(1024&e)!=0}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(0xff8000&e)>>>15}static getBackground(e){return(0xff000000&e)>>>24}static set(t,n,r,i,a,o,s){let l=e.getLanguageId(t),u=e.getTokenType(t),c=+!!e.containsBalancedBrackets(t),h=e.getFontStyle(t),p=e.getForeground(t),d=e.getBackground(t);return 0!==n&&(l=n),8!==r&&(u=r),null!==i&&(c=+!!i),-1!==a&&(h=a),0!==o&&(p=o),0!==s&&(d=s),(0|l|u<<8|c<<10|h<<11|p<<15|d<<24)>>>0}};function R(e,t){var n;let r,i,a=[],o=(n=e,i=(r=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g).exec(n),{next:()=>{if(!i)return null;let e=i[0];return i=r.exec(n),e}}),s=o.next();for(;null!==s;){let e=0;if(2===s.length&&":"===s.charAt(1)){switch(s.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=o.next()}let t=u();if(a.push({matcher:t,priority:e}),","!==s)break;s=o.next()}return a;function l(){if("-"===s){s=o.next();let e=l();return t=>!!e&&!e(t)}if("("===s){s=o.next();let e=function(){let e=[],t=u();for(;t&&(e.push(t),"|"===s||","===s);){do s=o.next();while("|"===s||","===s);t=u()}return t=>e.some(e=>e(t))}();return")"===s&&(s=o.next()),e}if(T(s)){let e=[];do e.push(s),s=o.next();while(T(s));return n=>t(e,n)}return null}function u(){let e=[],t=l();for(;t;)e.push(t),t=l();return t=>e.every(e=>e(t))}}function T(e){return!!e&&!!e.match(/[\w\.:]+/)}var M=(e=>(e[e.None=0]="None",e[e.NotBeginString=1]="NotBeginString",e[e.NotEndString=2]="NotEndString",e[e.NotBeginPosition=4]="NotBeginPosition",e[e.DebugCall=8]="DebugCall",e))(M||{});function $(e){"function"==typeof e.dispose&&e.dispose()}var B=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},O=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},U=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},D=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new B(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new U;for(let n of e)!function(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof B?F({baseGrammar:a,selfGrammar:i},r):G(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new B(e))}(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof B){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function G(e,t,n){t.repository&&t.repository[e]&&j([t.repository[e]],t,n)}function F(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&j(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&j(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function j(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?g({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&j(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=X(i);switch(a.kind){case 0:F({...t,selfGrammar:t.baseGrammar},n);break;case 1:F(t,n);break;case 2:G(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let o=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(o){let r={baseGrammar:t.baseGrammar,selfGrammar:o,repository:e};4===a.kind?G(a.ruleName,r,n):F(r,n)}else 4===a.kind?n.add(new O(a.scopeName,a.ruleName)):n.add(new B(a.scopeName))}}}var W=class{kind=0},z=class{kind=1},H=class{constructor(e){this.ruleName=e}kind=2},q=class{constructor(e){this.scopeName=e}kind=3},V=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};
1function X(e){if("$base"===e)return new W;if("$self"===e)return new z;let t=e.indexOf("#");return -1===t?new q(e):0===t?new H(e.substring(1)):new V(e.substring(0,t),e.substring(t+1))}var Q=/\\(\d+)/,K=/\\(\d+)/g;Symbol("RuleId");var Y=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=y.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=y.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${function e(t){let n=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===n?t:~n==t.length-1?e(t.substring(0,t.length-1)):t.substr(~n+1)}(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?y.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?y.replaceCaptures(this._contentName,e,t):this._contentName}},Z=class extends Y{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error("Not supported!")}compile(e,t){throw Error("Not supported!")}compileAG(e,t,n,r){throw Error("Not supported!")}},J=class extends Y{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new ei(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ea,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ee=class extends Y{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ea,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},et=class extends Y{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,l,u){super(e,t,n,r),this._begin=new ei(i,this.id),this.beginCaptures=a,this._end=new ei(o||"ï¿¿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=l||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){for(let t of(this._cachedCompiledPatterns=new ea,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},en=class extends Y{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,l){super(e,t,n,r),this._begin=new ei(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=ne
1w ei(o,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns)for(let t of(this._cachedCompiledPatterns=new ea,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ea,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"ï¿¿"),this._cachedCompiledWhilePatterns}
1},er=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new Z(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new J(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(void 0===t.begin){t.repository&&(r=g({},r,t.repository));let i=t.patterns;return void 0===i&&t.include&&(i=[{include:t.include}]),new ee(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new en(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new et(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if("$vscodeTextmateLocation"===e)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if("$vscodeTextmateLocation"===a)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=X(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,l=4===t.kind?t.ruleName:null,u=n.getExternalGrammar(a,r);if(u)if(l){let t=u.repository[l];t&&(s=e.getCompiledRuleId(t,n,u.repository))}else s=e.getCompiledRuleId(u.repository.$self,n,u.repository)}}else s=e.getCompiledRuleId(o,n,r);if(-1!==s){let e=n.getRule(s),t=!1;if((e instanceof ee||e instanceof et||e instanceof en)&&e.hasMissingPatterns&&0===e.patterns.length&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},ei=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&"string"==typeof e){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if("\\"===e.charAt(a)&&a+1<t){let t=e.charAt(a+1);"z"===t?(r.push(e.substring(n,a)),r.push("$(?!\\n)(?<!\\n)"),n=a+2):("A"===t||"G"===t)&&(i=!0),a++}this.hasAnchor=i,0===n?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,"string"==typeof this.source?this.hasBackReferences=Q.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let n=t.map(t=>e.substring(t.start,t.end));return K.lastIndex=0,this.source.replace(K,(e,t)=>k(n[parseInt(t,10)]||""))}_buildAnchorCache(){let e,t,n,r;if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let i=[],a=[],o=[],s=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),i[e]=n,a[e]=n,o[e]=n,s[e]=n,"\\"===n&&e+1<t&&("A"===(r=this.source.charAt(e+1))?(i[e+1]="ï¿¿",a[e+1]="ï¿¿",o[e+1]="A",s[e+1]="A"):"G"===r?(i[e+1]="ï¿¿",a[e+1]="G",o[e+1]="ï¿¿",s[e+1]="G"):(i[e+1]=r,a[e+1]=r,o[e+1]=r,s[e+1]=r),e++);return{A0_G0:i.join(""),A0_G1:a.join(""),A1_G0:o.join(""),A1_G1:s.join("")}}resolveAnchors(e,t){if(!this.hasAnchor||!this._anchorCache||"string"!=typeof this.source)return this.source;if(e)if(t)return this._anchorCache.A1_G1;else return this._anchorCache.A1_G0;return t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ea=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}
1push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new eo(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){if(!this._hasAnchors)return this.compile(e);if(t)if(n)return this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1;else return this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0;return n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0)}_resolveAnchors(e,t,n){return new eo(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},eo=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push("   - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},es=class{constructor(e,t){this.languageId=e,this.tokenType=t}},el=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new es(e,8),this._embeddedLanguagesMatcher=new eu(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return null===t?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new es(0,0);_getBasicScopeAttributes=new _(e=>new es(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},eu=class{values;scopesRegExp;constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>k(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};void 0!==f&&f.env.VSCODE_TEXTMATE_DEBUG;var ec=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function eh(e,t,n,r,i,a,o,s){let l=t.content.length,u=!1,c=-1;if(o){let o=function(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof en&&s.push({rule:n,stack:t})}for(let d=s.pop();d;d=s.pop()){var l,u,c,h,p;let{ruleScanner:s,findOptions:f}=(l=d.rule,u=e,c=d.stack.endRule,h=n,p=r===o,{ruleScanner:l.compileWhileAG(u,c,h,p),findOptions:0}),g=s.findNextMatchSync(t,r,f);if(g){if(-2!==g.ruleId){i=d.stack.pop();break}g.captureIndices&&g.captureIndices.length&&(a.produce(d.stack,g.captureIndices[0].start),ed(e,t,n,d.stack,a,d.rule.whileCaptures,g.captureIndices),a.produce(d.stack,g.captureIndices[0].end),o=g.captureIndices[0].end,g.captureIndices[0].end>r&&(r=g.captureIndices[0].end,n=!1))}else{i=d.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,c=o.anchorPosition}let h=Date.now();for(;!u;){if(0!==s&&Date.now()-h>s)return new ec(i,!0);!function(){let o=function(e,t,n,r,i,a){let o=function(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=ep(i.getRule(e),e,i.endRule,n,r===a),l=o.findNextMatchSync(t,r,s);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}(e,t,n,r,i,a),s=e.getInjections();if(0===s.length)return o;let l=function(e,t,n,r,i,a,o){let s,l=Number.MAX_VALUE,u=null,c=0,h=a.contentNameScopesList.getScopeNames();for(let a=0,p=e.length;a<p;a++){let p=e[a];if(!p.matcher(h))continue;let{ruleScanner:d,findOptions:f}=ep(t.getRule(p.ruleId),t,null,r,i===o),g=d.findNextMatchSync(n,i,f);if(!g)continue;let m=g.captureIndices[0].start;if(!(m>=l)&&(l=m,u=g.captureIndices,s=g.ruleId,c=p.priority,l===i))break}return u?{priorityMatch:-1===c,captureIndices:u,matchedRuleId:s}:null}(s,e,t,n,r,i,a);if(!l)return o;if(!o)return l;let u=o.captureIndices[0].start,c=l.captureIndices[0].start;return c<u||l.priorityMatch&&c===u?l:o}(e,t,n,r,i,c);if(!o){a.produce(i,l),u=!0;return}let s=o.captureIndices,h=o.matchedRuleId,p=!!s&&s.length>0&&s[0].end>r;if(-1===h){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),ed(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let h=i;if(i=i.parent,c=h.getAnchorPos(),!p&&h.getEnterPos()===r){i=h,a.produce(i,l),u=!0;return}}else{let o=e.getRule(h);a.produce(i,s[0].start);let d=i,f=o.getName(t.content,s),g=i.contentNameScopesList.pushAttributed(f,e);if(i=i.push(h,r,c,s[0].end===l,null,g,g),o instanceof et){ed(e,t,n,i,a,o.beginCaptures,s),a.produce(i,s[0].end),c=s[0].end;let r=o.getContentName(t.content,s),h=g.pushAttributed(r,e);if(i=i.withContentNameScopesList(h),o.endHasBackReferences&&(i=i.withEndRule(o.getEndWithResolvedBackReferences(t.content,s))),!p&&d.hasSameRuleAs(i)){i=i.pop(),a.produce(i,l),u=!0;return}}else if(o instanceof en){ed(e,t,n,i,a,o.beginCaptures,s),a.produce(i,s[0].end),c=s[0].end;let r=o.getContentName(t.content,s),h=g.pushAttributed(r,e);if(i=i.withContentNameScopesList(h),o.whileHasBackReferences&&(i=i.withEndRule(o.getWhileWithRes
1olvedBackReferences(t.content,s))),!p&&d.hasSameRuleAs(i)){i=i.pop(),a.produce(i,l),u=!0;return}}else if(ed(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!p){i=i.safePop(),a.produce(i,l),u=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}()}return new ec(i,!1)}function ep(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function ed(e,t,n,r,i,a,o){if(0===a.length)return;let s=t.content,l=Math.min(a.length,o.length),u=[],c=o[0].end;for(let t=0;t<l;t++){let l=a[t];if(null===l)continue;let h=o[t];if(0===h.length)continue;if(h.start>c)break;for(;u.length>0&&u[u.length-1].endPos<=h.start;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?i.produceFromScopes(u[u.length-1].scopes,h.start):i.produce(r,h.start),l.retokenizeCapturedWithRuleId){let t=l.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),u=l.getContentName(s,o),c=a.pushAttributed(u,e),p=r.push(l.retokenizeCapturedWithRuleId,h.start,-1,!1,null,a,c),d=e.createOnigString(s.substring(0,h.end));eh(e,d,n&&0===h.start,h.start,p,i,!1,0),$(d);continue}let p=l.getName(s,o);if(null!==p){let t=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(p,e);u.push(new ef(t,h.end))}}for(;u.length>0;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var ef=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function eg(e,t,n,r,i){let a=R(t,em),o=er.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function em(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(function(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}(t[r],e))return n=r+1,!0;return!1})}var ey=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new el(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=eb(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i))for(let t of R(e,em))this._tokenTypeMatchers.push({matcher:t.matcher,type:i[e]})}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e=[],t=this._rootScopeName,n=({lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)}).lookup(t);if(n){let r=n.injections;if(r)for(let t in r)eg(e,t,r[t],this,n);let i=this._grammarRepository.injections(t);i&&i.forEach(t=>{let n=this.getExternalGrammar(t);if(n){let t=n.injectionSelector;t&&eg(e,t,n,this,n)}})}return e.sort((e,t)=>e.priority-t.priority),e}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=eb(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){let i;if(-1===this._rootId&&(this._rootId=er.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==ek.NULL)i=!1,t.reset();else{let e;i=!0;let n=this._basicScopeAttributesProvider.getDefaultAttributes(),r=this.themeProvider.getDefaults(),a=L.set(0,n.languageId,n.tokenType,null,r.fontStyle,r.foregroundId,r.backgroundId),o=this.getRule(this._rootId).getName(null,null);e=o?ew.createRootAndLookUpScopeName(o,a,this):ew.createRoot("unknown",a),t=new ek(null,this._rootId,-1,-1,!1,null,e,e)}e+="\n";let a=this.createOnigString(e),o=a.content.length,s=new eC(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=eh(this,a,i,0,t,s,!0,r);return $(a),{lineLength:o,lineTokens:s,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function eb(e,t){return(e=function e(t){return Array.isArray(t)?function(t){let n=[];for(let r=0,i=t.length;r<i;r++)n[r]=e(t[r]);return n}(t):t instanceof RegExp?t:"object"==typeof t?function(t){let n={};for(let r in t)n[r]=e(t[r]);return n}(t):t}(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName}
1,e.repository.$base=t||e.repository.$self,e}var ew=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)r=new e(r,i=S.push(i,t.scopeNames),t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new S(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new S(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return e.equals(this,t)}static equals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return null!==n&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),L.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(null===t)return this;if(-1===t.indexOf(" "))return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},ek=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return null!==t&&e._equals(this,t)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&ew.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=ew.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,ew.fromExtension(r,n.contentNameScopesList))}},e_=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>"*"===e?(this.allowAny=!0,[]):R(e,em).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>R(e,em).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},eC=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>
10||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=L.set(n,0,e.type,null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=L.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},eS=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,new ey(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},ev=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new eS(C.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(C.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new e_(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new D(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},ex=ek.NULL,eA=n(87325);class eE{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function eN(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new eE(n,r,t)}function eP(e){return e.toLowerCase()}eE.prototype.normal={},eE.prototype.property={},eE.prototype.space=void 0;class eI{constructor(e,t){this.attribute=t,this.property=e}}eI.prototype.attribute="",eI.prototype.booleanish=!1,eI.prototype.boolean=!1,eI.prototype.commaOrSpaceSeparated=!1,eI.prototype.commaSeparated=!1,eI.prototype.defined=!1,eI.prototype.mustUseProperty=!1,eI.prototype.number=!1,eI.prototype.overloadedBoolean=!1,eI.prototype.property="",eI.prototype.spaceSeparated=!1,eI.prototype.space=void 0;let eL=0,eR=eD(),eT=eD(),eM=eD(),e$=eD(),eB=eD(),eO=eD(),eU=eD();function eD(){return 2**++eL}let eG=Object.keys(a);class eF extends eI{constructor(e,t,n,r){let i=-1;
1if(super(e,t),function(e,t,n){n&&(e[t]=n)}(this,"space",r),"number"==typeof n)for(;++i<eG.length;){let e=eG[i];!function(e,t,n){n&&(e[t]=n)}(this,eG[i],(n&a[e])===a[e])}}}function ej(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new eF(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[eP(r)]=r,n[eP(a.attribute)]=r}return new eE(t,n,e.space)}eF.prototype.defined=!0;let eW=ej({properties:{ariaActiveDescendant:null,ariaAtomic:eT,ariaAutoComplete:null,ariaBusy:eT,ariaChecked:eT,ariaColCount:e$,ariaColIndex:e$,ariaColSpan:e$,ariaControls:eB,ariaCurrent:null,ariaDescribedBy:eB,ariaDetails:null,ariaDisabled:eT,ariaDropEffect:eB,ariaErrorMessage:null,ariaExpanded:eT,ariaFlowTo:eB,ariaGrabbed:eT,ariaHasPopup:null,ariaHidden:eT,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:eB,ariaLevel:e$,ariaLive:null,ariaModal:eT,ariaMultiLine:eT,ariaMultiSelectable:eT,ariaOrientation:null,ariaOwns:eB,ariaPlaceholder:null,ariaPosInSet:e$,ariaPressed:eT,ariaReadOnly:eT,ariaRelevant:null,ariaRequired:eT,ariaRoleDescription:eB,ariaRowCount:e$,ariaRowIndex:e$,ariaRowSpan:e$,ariaSelected:eT,ariaSetSize:e$,ariaSort:null,ariaValueMax:e$,ariaValueMin:e$,ariaValueNow:e$,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function ez(e,t){return t in e?e[t]:t}function eH(e,t){return ez(e,t.toLowerCase())}let eq=ej({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:eO,acceptCharset:eB,accessKey:eB,action:null,allow:null,allowFullScreen:eR,allowPaymentRequest:eR,allowUserMedia:eR,alt:null,as:null,async:eR,autoCapitalize:null,autoComplete:eB,autoFocus:eR,autoPlay:eR,blocking:eB,capture:null,charSet:null,checked:eR,cite:null,className:eB,cols:e$,colSpan:null,content:null,contentEditable:eT,controls:eR,controlsList:eB,coords:e$|eO,crossOrigin:null,data:null,dateTime:null,decoding:null,default:eR,defer:eR,dir:null,dirName:null,disabled:eR,download:eM,draggable:eT,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:eR,formTarget:null,headers:eB,height:e$,hidden:eM,high:e$,href:null,hrefLang:null,htmlFor:eB,httpEquiv:eB,id:null,imageSizes:null,imageSrcSet:null,inert:eR,inputMode:null,integrity:null,is:null,isMap:eR,itemId:null,itemProp:eB,itemRef:eB,itemScope:eR,itemType:eB,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:eR,low:e$,manifest:null,max:null,maxLength:e$,media:null,method:null,min:null,minLength:e$,multiple:eR,muted:eR,name:null,nonce:null,noModule:eR,noValidate:eR,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:eR,optimum:e$,pattern:null,ping:eB,placeholder:null,playsInl
1ine:eR,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:eR,referrerPolicy:null,rel:eB,required:eR,reversed:eR,rows:e$,rowSpan:e$,sandbox:eB,scope:null,scoped:eR,seamless:eR,selected:eR,shadowRootClonable:eR,shadowRootDelegatesFocus:eR,shadowRootMode:null,shape:null,size:e$,sizes:null,slot:null,span:e$,spellCheck:eT,src:null,srcDoc:null,srcLang:null,srcSet:null,start:e$,step:null,style:null,tabIndex:e$,target:null,title:null,translate:null,type:null,typeMustMatch:eR,useMap:null,value:eT,width:e$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:eB,axis:null,background:null,bgColor:null,border:e$,borderColor:null,bottomMargin:e$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:eR,declare:eR,event:null,face:null,frame:null,frameBorder:null,hSpace:e$,leftMargin:e$,link:null,longDesc:null,lowSrc:null,marginHeight:e$,marginWidth:e$,noResize:eR,noHref:eR,noShade:eR,noWrap:eR,object:null,profile:null,prompt:null,rev:null,rightMargin:e$,rules:null,scheme:null,scrolling:eT,standby:null,summary:null,text:null,topMargin:e$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:e$,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:eR,disableRemotePlayback:eR,prefix:null,property:null,results:e$,security:null,unselectable:null},space:"html",transform:eH}),eV=ej({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav
1-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:eU,accentHeight:e$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:e$,amplitude:e$,arabicForm:null,ascent:e$,attributeName:null,attributeType:null,azimuth:e$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:e$,by:null,calcMode:null,capHeight:e$,className:eB,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:e$,diffuseConstant:e$,direction:null,display:null,dur:null,divisor:e$,dominantBaseline:null,download:eR,dx:null,dy:null,edgeMode:null,editable:null,elevation:e$,enableBackground:null,end:null,event:null,exponent:e$,externalResourcesRequired:null,fill:null,fillOpacity:e$,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:eO,g2:eO,glyphName:eO,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:e$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:e$,horizOriginX:e$,horizOriginY:e$,id:null,ideographic:e$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:e$,k:e$,k1:e$,k2:e$,k3:e$,k4:e$,kernelMatrix:eU,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:e$,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:e$,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,on
1Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:e$,overlineThickness:e$,paintOrder:null,panose1:null,path:null,pathLength:e$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:eB,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:e$,pointsAtY:e$,pointsAtZ:e$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:eU,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:eU,rev:eU,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:eU,requiredFeatures:eU,requiredFonts:eU,requiredFormats:eU,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:e$,specularExponent:e$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:e$,strikethroughThickness:e$,string:null,stroke:null,strokeDashArray:eU,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:e$,strokeOpacity:e$,strokeWidth:null,style:null,surfaceScale:e$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:eU,tabIndex:e$,tableValues:null,target:null,targetX:e$,targetY:e$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:eU,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:e$,underlineThickness:e$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:e$,values:null,vAlphabetic:e$,vMathematical:e$,vectorEffect:null,vHanging:e$,vIdeographic:e$,version:null,vertAdvY:e$,vertOriginX:e$,vertOriginY:e$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:e$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ez}),eX=ej({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),eQ=ej({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:eH}),eK=ej({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),eY=eN([eW,eq,eX,eQ,eK],"html"),eZ=eN([eW,eV,eX,eQ,eK],"svg");var eJ=n(75164);let e0=/["&'<>`]/g,e1=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,e2=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,e5=/[|\\{}()[\]^$+*?.]/g,e6=new WeakMap,e3=/[\dA-Fa-f]/,e8=/\d/,e7=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","
1sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],e4={nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub
1:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},e9=["cent","copy","divide","gt","lt","not","para","times"],te={}.hasOwnProperty,tt={};for(r in e4)te.call(e4,r)&&(tt[e4[r]]=r);let tn=/[^\dA-Za-z]/;function tr(e,t,n){let r,i=function(e,t,n){let r="&#x"+e.toString(16).toUpperCase();return n&&t&&!e3.test(String.fromCharCode(t))?r:r+";"}(e,t,n.omitOptionalSemicolons);if((n.useNamedReferences||n.useShortestReferences)&&(r=function(e,t,n,r){let i=String.fromCharCode(e);if(te.call(tt,i)){let e=tt[i],a="&"+e;return n&&e7.includes(e)&&!e9.includes(e)&&(!r||t&&61!==t&&tn.test(String.fromCharCode(t)))?a:a+";"}return""}(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!r)&&n.useShortestReferences){let r=function(e,t,n){let r="&#"+String(e);return n&&t&&!e8.test(String.fromCharCode(t))?r:r+";"}(e,t,n.omitOptionalSemicolons);r.length<i.length&&(i=r)}return r&&(!n.useShortestReferences||r.length<i.length)?r:i}function ti(e,t){let n;var r,i=e,a=Object.assign({format:tr},t);if(i=i.replace(a.subset?(r=a.subset,(n=e6.get(r))||(n=function(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(e5,"\\$&"));return RegExp("(?:"+t.join("|")+")","g")}(r),e6.set(r,n)),n):e0,o),a.subset||a.escapeOnly)return i;return i.replace(e1,function(e,t,n){return a.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,n.charCodeAt(t+2),a)}).replace(e2,o);function o(e,t,n){return a.format(e.charCodeAt(0),n.charCodeAt(t+1),a)}}let ta=/^>|^->|<!--|-->|--!>|<!-$/g,to=[">"],ts=["<",">"];var tl=n(5009),tu=n(52371);let tc=/[A-Z]/g,th=/-[a-z]/g,tp=/^data[-\w.:]+$/i;function td(e){return"-"+e.toLowerCase()}function tf(e){return e.charAt(1).toUpperCase()}var tg=n(59292);let tm=/[ \t\n\f\r]/g;function ty(e){return"object"==typeof e?"text"===e.type&&tb(e.value):tb(e)}function tb(e){return""===e.replace(tm,"")}let tw=tC(1),tk=tC(-1),t_=[];function tC(e){return function(t,n,r){let i=t?t.children:t_,a=(n||0)+e,o=i[a];if(!r)for(;o&&ty(o);)a+=e,o=i[a];return o}}let tS={}.hasOwnProperty;function tv(e){return function(t,n,r){return tS.call(e,t.tagName)&&e[t.tagName](t,n,r)}}let tx=tv({body:function(e,t,n){let r=tw(n,t);return!r||"comment"!==r.type},caption:tA,colgroup:tA,dd:function(e,t,n){let r=tw(n,t);return!r||"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName)},dt:function(e,t,n){let r=tw(n,t);return!!(r&&"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName))},head:tA,html:function(e,t,n){let r=tw(n,t);return!r||"comment"!==r.type},li:function(e,t,n){let r=tw(n,t);return!r||"element"===r.type&&"li"===r.tagName},optgroup:function(e,t,n){let r=tw(n,t);return!r||"element"===r.type&&"optgroup"===r.tagName},option:function(e,t,n){let r=tw(n,t);return!r||"element"===r.type&&("option"===r.tagName||"optgroup"===r.tagName)},p:function(e,t,n){let r=tw(n,t);return r?"element"===r.type&&("address"===r.tagName||"article"===r.tagName||"aside"===r.tagName||"blockquote"===r.tagName||"details"===r.tagName||"div"===r.tagName||"dl"===r.tagName||"fieldset"===r.tagName||"figcaption"===r.tagName||"figure"===r.tagName||"footer"===r.tagName||"form"===r.tagName||"h1"===r.tagName||"h2"===r.tagName||"h3"===r.tagName||"h4"===r.tagName||"h5"===r.tagName||"h6"===r.tagName||"header"===r.tagName||"hgroup"===r.tagName||"hr"===r.tagName||"main"===r.tagName||"menu"===r.tagName||"nav"===r.tagName||"ol"===r.tagName||"p"===r.tagName||"pre"===r.tagName||"section"===r.tagName||"table"===r.tagName||"ul"===r.tagName):!n||"element"!==n.type||"a"!==n.tagName&&"audio"!==n.tagName&&"del"!==n.tagName&&"ins"!==n.tagName&&"map"!==n.tagName&&"noscript"!==n.tagName&&"video"!==n.tagName},rp:tE,rt:tE,tbody:function(e,t,n){let r=tw(n,t);return!r||"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName)},td:tN,tfoot:function(e,t,n){return!tw(n,t)},th:tN,thead:function(e,t,n){let r=tw(n,t);return!!(r&&"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName))},tr:function(e,t,n){let r=tw(n,t);return!r||"element"===r.type&&"tr"===r.tagName}});function tA(e,t,n){let r=tw(n,t,!0);return!r||"comment"!==r.type&&!("text"===r.type&&ty(r.value.charAt(0)))}function tE(e,t,n){let r=tw(n,t);return!r||"element"===r.type&&("rp"===r.tagName||"rt"===r.tagName)}function tN(e,t,n){let r=tw(n,t);return!r||"element"===r.type&&("td"===r.tagName||"th"===r.tagName)}let tP=tv({body:function(e){let t=tw(e,-1,!0);return!t||"comment"!==t.type&&!("text"===t.type&&ty(t.value.charAt(0)))&&("element"!==t.type||"meta"!==t.tagName&&"link"!==t.tagName&&"script"!==t.tagName&&"style"!==t.tagName&&"template"!==t.tagName)},colgroup:function(e,t,n){let r=tk(n,t),i=tw(e,-1,!0);return!(n&&r&&"element"===r.type&&"colgroup"===r.tagName&&tx(r,n.children.indexOf(r),n))&&!!(i&&"element"===i.type&&"col"===i.tagName)},head:function(e){let t=new Set;for(let n of e.children)if("element"===n.type&&("base"===n.tagName||"title"===n.tagName)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||"element"===n.type},html:function(e){let t=tw(e,-1);return!t||"comment"!==t.type},tbody:function(e,t,n){let r=tk(n,t),i=tw(e,-1);return!(n&&r&&"element"===r.type&&("thead"===r.tagName||"tbody"===r.tagName)&&tx(r,n.children.indexOf(r),n))&&!!(i&&"element"===i.type&&"tr"===i.tagName)}}),tI={name:[["	\n\f\r &/=>".split(""),"	\n\f\r \"&'/=>
1`".split("")],["\0	\n\f\r \"&'/<=>".split(""),"\0	\n\f\r \"&'/<=>`".split("")]],unquoted:[["	\n\f\r &>".split(""),"\0	\n\f\r \"&'<=>`".split("")],["\0	\n\f\r \"&'<=>`".split(""),"\0	\n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]},tL=["<","&"];function tR(e,t,n,r){return n&&"element"===n.type&&("script"===n.tagName||"style"===n.tagName)?e.value:ti(e.value,Object.assign({},r.settings.characterReferences,{subset:tL}))}let tT=(0,eJ.A)("type",{invalid:function(e){throw Error("Expected node, not `"+e+"`")},unknown:function(e){throw Error("Cannot compile unknown node `"+e.type+"`")},handlers:{comment:function(e,t,n,r){return r.settings.bogusComments?"<?"+ti(e.value,Object.assign({},r.settings.characterReferences,{subset:to}))+">":"\x3c!--"+e.value.replace(ta,function(e){return ti(e,Object.assign({},r.settings.characterReferences,{subset:ts}))})+"--\x3e"},doctype:function(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"},element:function(e,t,n,r){let i,a=r.schema,o="svg"!==a.space&&r.settings.omitOptionalTags,s="svg"===a.space?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),l=[];"html"===a.space&&"svg"===e.tagName&&(r.schema=eZ);let u=function(e,t){let n,r=[],i=-1;if(t){for(n in t)if(null!==t[n]&&void 0!==t[n]){let i=function(e,t,n){let r,i=function(e,t){let n=eP(t),r=t,i=eI;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&tp.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(th,tf);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!th.test(e)){let n=e.replace(tc,td);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=eF}return new i(r,t)}(e.schema,t),a=e.settings.allowParseErrors&&"html"===e.schema.space?0:1,o=+!e.settings.allowDangerousCharacters,s=e.quote;if(i.overloadedBoolean&&(n===i.attribute||""===n)?n=!0:(i.boolean||i.overloadedBoolean)&&("string"!=typeof n||n===i.attribute||""===n)&&(n=!!n),null==n||!1===n||"number"==typeof n&&Number.isNaN(n))return"";let l=ti(i.attribute,Object.assign({},e.settings.characterReferences,{subset:tI.name[a][o]}));return!0===n||(n=Array.isArray(n)?(i.commaSeparated?tu.A:tg.A)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?l:(e.settings.preferUnquoted&&(r=ti(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:tI.unquoted[a][o]}))),r!==n&&(e.settings.quoteSmart&&(0,tl.D)(n,s)>(0,tl.D)(n,e.alternative)&&(s=e.alternative),r=s+ti(n,Object.assign({},e.settings.characterReferences,{subset:("'"===s?tI.single:tI.double)[a][o],attribute:!0}))+s),l+(r?"="+r:r))}(e,n,t[n]);i&&r.push(i)}}for(;++i<r.length;){let t=e.settings.tightAttributes?r[i].charAt(r[i].length-1):void 0;i!==r.length-1&&'"'!==t&&"'"!==t&&(r[i]+=" ")}return r.join("")}(r,e.properties),c=r.all("html"===a.space&&"template"===e.tagName?e.content:e);return r.schema=a,c&&(s=!1),!u&&o&&tP(e,t,n)||(l.push("<",e.tagName,u?" "+u:""),s&&("svg"===a.space||r.settings.closeSelfClosing)&&(i=u.charAt(u.length-1),(!r.settings.tightSelfClosing||"/"===i||i&&'"'!==i&&"'"!==i)&&l.push(" "),l.push("/")),l.push(">")),l.push(c),s||o&&tx(e,t,n)||l.push("</"+e.tagName+">"),l.join("")},raw:function(e,t,n,r){return r.settings.allowDangerousHtml?e.value:tR(e,t,n,r)},root:function(e,t,n,r){return r.all(e)},text:tR}}),tM={},t$={},tB=[];function tO(e,t,n){return tT(e,t,n,this)}function tU(e){let t=[],n=e&&e.children||tB,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function tD(e,t){let n="string"==typeof e?{}:{...e.colorReplacements},r="string"==typeof e?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))"string"==typeof i?n[e]=i:e===r&&Object.assign(n,i);return n}function tG(e,t){return e&&t?.[e?.toLowerCase()]||e}async function tF(e){return Promise.resolve("function"==typeof e?e():e).then(e=>e.default||e)}function tj(e){return!e||["plaintext","txt","text","plain"].includes(e)}function tW(e){return"ansi"===e||tj(e)}function tz(e){return"none"===e}function tH(e,t){if(!t)return e;for(let n of(e.properties||={},e.properties.class||=[],"string"==typeof e.properties.class&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]),Array.isArray(t)?t:t.split(/\s+/g)))n&&!e.properties.class.includes(n)&&e.properties.class.push(n);return e}function tq(e,t=!1){if(0===e.length)return[["",0]];let n=e.split(/(\r?\n)/g),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||""):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}let tV="light-dark()",tX=["color","background-color"];function tQ(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&A.Italic&&(t["font-style"]="italic"),e.fontStyle&A.Bold&&(t["font-weight"]="bold");let n=[];e.fontStyle&A.Underline&&n.push("underline"),e.fontStyle&A.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function tK(e){return"string"==typeof e?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}let tY=new WeakMap;function tZ(e,t){tY.set(e,t)}function tJ(e){return tY.get(e)}class t0{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,t){return new t0(Object.fromEntries((Array.isArray(t)?t:[t]).map(e=>[e,ex])),e)}constructor(...e){if(2===e.length){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){var t=this._stacks[e];let n=[],r=new Set;return!function e(t){if(r.has(t))return;r.add(t);let i=t?.nameScopesList?.scopeName;i&&n.push(i),t.parent&&e(t.parent)}(t),n}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}let t1=[function(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=function(e){if("number"==typeof e){if(e<0||e>t.source.length)throw new d(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...r.indexToPos(e),offset:e}}{let t=r.lines[e.line];if(void 0===t)throw new d(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new d(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:r.posToIndex(e.line,n)}}},r=function(e){let t=tq(e,!0).map(([e])=>e);return{lines:t,indexToPos:function(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}},posToIndex:function(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+n}}}(t.source),i=(t.options.decorations||[]).map(e=>({...e,start:n(e.start),end:n(e.end)}));(function(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new d(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;
1if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new d(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}})(i),e.set(t.meta,{decorations:i,converter:r,source:t.source})}return e.get(t.meta)}return{name:"shiki:decorations",tokens(e){if(this.options.decorations?.length){var n=e,r=t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]);let i=Array.from(r instanceof Set?r:new Set(r)).sort((e,t)=>e-t);return i.length?n.map(e=>e.flatMap(e=>{let t=i.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);if(!t.length)return e;let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r})):n}},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>"element"===e.type&&"span"===e.tagName);if(r.length!==n.converter.lines.length)throw new d(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let o=r[e],s="",l=-1,u=-1;if(0===t&&(l=0),0===n&&(u=0),n===1/0&&(u=o.children.length),-1===l||-1===u)for(let e=0;e<o.children.length;e++)s+=function e(t){return"text"===t.type?t.value:"element"===t.type?t.children.map(e).join(""):""}(o.children[e]),-1===l&&s.length===t&&(l=e+1),-1===u&&s.length===n&&(u=e+1);if(-1===l)throw new d(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(-1===u)throw new d(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let c=o.children.slice(l,u);if(i.alwaysWrap||c.length!==o.children.length)if(i.alwaysWrap||1!==c.length||"element"!==c[0].type){let e={type:"element",tagName:"span",properties:{},children:c};a(e,i,"wrapper"),o.children.splice(l,c.length,e)}else a(c[0],i,"token");else a(o,i,"line")}function a(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||"span",e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&tH(e,t.properties.class),e=i(e,n)||e}let o=[];for(let e of n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset)){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let i=t.line+1;i<n.line;i++)o.unshift(()=>{var t;r[t=i]=a(r[t],e,"line")});i(n.line,0,n.character,e)}}o.forEach(e=>e())}}}()];function t2(e){let t=function(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case"pre":t.push(i);break;case"post":n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...t1]}var t5=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],t6={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function t3(e){let t=e.shift();if("2"===t){let t=e.splice(0,3).map(e=>Number.parseInt(e));if(3!==t.length||t.some(e=>Number.isNaN(e)))return;return{type:"rgb",rgb:t}}if("5"===t){let t=e.shift();if(t)return{type:"table",index:Number(t)}}}var t8={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};let t7={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function t4(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||"text");if(tj(i)||tz(r))return tq(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:a,colorMap:o}=e.setTheme(r);if("ansi"===i)return function(e,t,n){let r,i,a,o=tD(e,n),s=tq(t),l=function(e=t8){let t;function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0")).join("")}`}return{value:function(r){switch(r.type){case"named":return e[r.name];case"rgb":return n(r.rgb);case"table":var i;return i=r.index,function(){if(t)return t;t=[];for(let n=0;n<t5.length;n++)t.push(e[t5[n]]);
1let r=[0,95,135,175,215,255];for(let e=0;e<6;e++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)t.push(n([r[e],r[i],r[a]]));let i=8;for(let e=0;e<24;e++,i+=10)t.push(n([i,i,i]));return t}()[i]}}}}(Object.fromEntries(t5.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||t7[t]]}))),u=(r=null,i=null,a=new Set,{parse(e){let t=[],n=0;do{let o=function(e,t){let n=e.indexOf("\x1b",t);if(-1!==n&&"["===e[n+1]){let t=e.indexOf("m",n);if(-1!==t)return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}(e,n),s=o.sequence?e.substring(n,o.startPosition):e.substring(n);if(s.length>0&&t.push({value:s,foreground:r,background:i,decorations:new Set(a)}),o.sequence){let e=function(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(0===r)t.push({type:"resetAll"});else if(r<=9)t6[r]&&t.push({type:"setDecoration",value:t6[r]});else if(r<=29){let e=t6[r-20];e&&(t.push({type:"resetDecoration",value:e}),"dim"===e&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:t5[r-30]}});else if(38===r){let n=t3(e);n&&t.push({type:"setForegroundColor",value:n})}else if(39===r)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:t5[r-40]}});else if(48===r){let n=t3(e);n&&t.push({type:"setBackgroundColor",value:n})}else 49===r?t.push({type:"resetBackgroundColor"}):53===r?t.push({type:"setDecoration",value:"overline"}):55===r?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:t5[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:t5[r-100+8]}})}return t}(o.sequence);for(let t of e)"resetAll"===t.type?(r=null,i=null,a.clear()):"resetForegroundColor"===t.type?r=null:"resetBackgroundColor"===t.type?i=null:"resetDecoration"===t.type&&a.delete(t.value);for(let t of e)"setForegroundColor"===t.type?r=t.value:"setBackgroundColor"===t.type?i=t.value:"setDecoration"===t.type&&a.add(t.value)}n=o.position}while(n<e.length);return t}});return s.map(t=>u.parse(t[0]).map(n=>{let r,i;n.decorations.has("reverse")?(r=n.background?l.value(n.background):e.bg,i=n.foreground?l.value(n.foreground):e.fg):(r=n.foreground?l.value(n.foreground):e.fg,i=n.background?l.value(n.background):void 0),r=tG(r,o),i=tG(i,o),n.decorations.has("dim")&&(r=function(e){let t=e.match(/#([0-9a-f]{3,8})/i);if(t){let e=t[1];if(8===e.length){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${e.slice(0,6)}${t}`}if(6===e.length)return`#${e}80`;if(4===e.length){let t=e[0],n=e[1],r=e[2],i=e[3],a=Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,"0");return`#${t}${t}${n}${n}${r}${r}${a}`}else if(3===e.length){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}(r));let a=A.None;return n.decorations.has("bold")&&(a|=A.Bold),n.decorations.has("italic")&&(a|=A.Italic),n.decorations.has("underline")&&(a|=A.Underline),n.decorations.has("strikethrough")&&(a|=A.Strikethrough),{content:n.value,offset:t[1],color:r,bgColor:i,fontStyle:a}}))}(a,t,n);let s=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==s.name)throw new d(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(a.name))throw new d(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}var l=t,u=s,c=a,h=o,p=n;let f=t9(l,u,c,h,p),g=new t0(f.stateStack,u.name,c.name);return tZ(f.tokens,g),f.tokens}function t9(e,t,n,r,i){let a=tD(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}
1=i,l=tq(e),u=i.grammarState?function(e,t){if(!(e instanceof t0))throw new d("Invalid grammar state");return e.getInternalStack(t)}(i.grammarState,n.name)??ex:null!=i.grammarContextCode?t9(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:ex,c=[],h=[];for(let e=0,p=l.length;e<p;e++){let p,d,[f,g]=l[e];if(""===f){c=[],h.push([]);continue}if(o>0&&f.length>=o){c=[],h.push([{content:f,offset:g,color:"",fontStyle:0}]);continue}i.includeExplanation&&(p=t.tokenizeLine(f,u,s).tokens,d=0);let m=t.tokenizeLine2(f,u,s),y=m.tokens.length/2;for(let e=0;e<y;e++){let t=m.tokens[2*e],o=e+1<y?m.tokens[2*e+2]:f.length;if(t===o)continue;let s=m.tokens[2*e+1],l=tG(r[L.getForeground(s)],a),u=L.getFontStyle(s),h={content:f.substring(t,o),offset:g+t,color:l,fontStyle:u};if(i.includeExplanation){let e=[];if("scopeName"!==i.includeExplanation)for(let t of n.settings){let n;switch(typeof t.scope){case"string":n=t.scope.split(/,/).map(e=>e.trim());break;case"object":n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}h.explanation=[];let r=0;for(;t+r<o;){let t=p[d],n=f.substring(t.startIndex,t.endIndex);r+=n.length,h.explanation.push({content:n,scopes:"scopeName"===i.includeExplanation?t.scopes.map(e=>({scopeName:e})):function(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:function(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(function(e,t,n){if(!ne(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)ne(e[r],n[i])&&(r-=1),i-=1;return -1===r}(e,t,n)){r.push(a);break}return r}(e,i,t.slice(0,r))}}return n}(e,t.scopes)}),d+=1}}c.push(h)}h.push(c),c=[],u=m.ruleStack}return{tokens:h,stateStack:u}}function ne(e,t){return e===t||t.substring(0,e.length)===e&&"."===t[e.length]}function nt(e,t,n){let r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=r.map(r=>{let i=t4(e,t,{...n,theme:r.theme}),a=tJ(i);return{tokens:i,state:a,theme:"string"==typeof r.theme?r.theme:r.theme.name}}),a=function(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}(...i.map(e=>e.tokens)),o=a[0].map((e,t)=>e.map((e,i)=>{let o={content:e.content,variants:{},offset:e.offset};return"includeExplanation"in n&&n.includeExplanation&&(o.explanation=e.explanation),a.forEach((e,n)=>{let{content:a,explanation:s,offset:l,...u}=e[t][i];o.variants[r[n].color]=u}),o})),s=i[0].state?new t0(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return s&&tZ(o,s),o}function nn(e,t,n){let r,i,a,o,s,l;if("themes"in n){let{defaultColor:u="light",cssVariablePrefix:c="--shiki-",colorsRendering:h="css-vars"}=n,p=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===u?-1:+(t.color===u));if(0===p.length)throw new d("`themes` option must not be empty");let f=nt(e,t,n);if(l=tJ(f),u&&tV!==u&&!p.find(e=>e.color===u))throw new d(`\`themes\` option must contain the defaultColor key \`${u}\``);let g=p.map(t=>e.getTheme(t.theme)),m=p.map(e=>e.color);a=f.map(e=>e.map(e=>(function(e,t,n,r,i="css-vars"){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>tQ(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),l={},u=(e,r)=>{let i="color"===r?"":"background-color"===r?"-bg":`-${r}`;
1return n+t[e]+("color"===r?"":i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||"inherit";if(0===n&&r&&tX.includes(a))if(r===tV&&o.length>1){let e=t.findIndex(e=>"light"===e),r=t.findIndex(e=>"dark"===e);if(-1===e||-1===r)throw new d('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let c=o[e][a]||"inherit",h=o[r][a]||"inherit";l[a]=`light-dark(${c}, ${h})`,"css-vars"===i&&(l[u(n,a)]=s)}else l[a]=s;else"css-vars"===i&&(l[u(n,a)]=s)}}),a.htmlStyle=l,a})(e,m,c,u,h))),l&&tZ(a,l);let y=p.map(e=>tD(e.theme,n));i=nr(p,g,y,c,u,"fg",h),r=nr(p,g,y,c,u,"bg",h),o=`shiki-themes ${g.map(e=>e.name).join(" ")}`,s=u?void 0:[i,r].join(";")}else if("theme"in n){let s=tD(n.theme,n);a=t4(e,t,n);let u=e.getTheme(n.theme);r=tG(u.bg,s),i=tG(u.fg,s),o=u.name,l=tJ(a)}else throw new d("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:l}}function nr(e,t,n,r,i,a,o){return e.map((s,l)=>{let u=tG(t[l][a],n[l])||"inherit",c=`${r+s.color}${"bg"===a?"-bg":""}:${u}`;if(0===l&&i){if(i===tV&&e.length>1){let r=e.findIndex(e=>"light"===e.color),i=e.findIndex(e=>"dark"===e.color);if(-1===r||-1===i)throw new d('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let o=tG(t[r][a],n[r])||"inherit",s=tG(t[i][a],n[i])||"inherit";return`light-dark(${o}, ${s});${c}`}return u}return"css-vars"===o?c:null}).filter(e=>!!e).join(";")}function ni(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>ni(e,t,n),codeToTokens:(t,n)=>nn(e,t,n)}){let i=t;for(let e of t2(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:l,rootStyle:u,grammarState:c}=nn(e,i,n),{mergeWhitespaces:h=!0,mergeSameStyleTokens:p=!1}=n;!0===h?a=a.map(e=>{let t,n=[],r="";return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&A.Underline||i.fontStyle&A.Strikethrough));o&&i.content.match(/^\s+$/)&&e[a+1]?(void 0===t&&(t=i.offset),r+=i.content):r?(o?n.push({...i,offset:t,content:r+i.content}):n.push({content:r,offset:t},i),t=void 0,r=""):n.push(i)}),n}):"never"===h&&(a=a.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))),p&&(a=a.map(e=>{let t=[];for(let n of e){if(0===t.length){t.push({...n});continue}let e=t[t.length-1],r=tK(e.htmlStyle||tQ(e)),i=tK(n.htmlStyle||tQ(n)),a=e.fontStyle&&(e.fontStyle&A.Underline||e.fontStyle&A.Strikethrough),o=n.fontStyle&&(n.fontStyle&A.Underline||n.fontStyle&A.Strikethrough);a||o||r!==i?t.push({...n}):e.content+=n.content}return t}));let d={...r,get source(){return i}};for(let e of t2(n))a=e.tokens?.call(d,a)||a;return function(e,t,n,r=tJ(e)){let i=t2(t),a=[],o={type:"root",children:[]},{structure:s="classic",tabindex:l="0"}=t,u={class:`shiki ${t.themeName||""}`};for(let[e,n]of(!1!==t.rootStyle&&(null!=t.rootStyle?u.style=t.rootStyle:u.style=`background-color:${t.bg};color:${t.fg}`),!1!==l&&null!=l&&(u.tabindex=l.toString()),Object.entries(t.meta||{})))e.startsWith("_")||(u[e]=n);let c={type:"element",tagName:"pre",properties:u,children:[],data:t.data},h={type:"element",tagName:"code",properties:{},children:a},p=[],d={...n,structure:s,addClassToHast:tH,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return c},get code(){return h},get lines(){return p}};if(e.forEach((e,t)=>{t&&("inline"===s?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===s&&a.push({type:"text",value:"\n"}));let n={type:"element",tagName:"span",properties:{class:"line"},children:[]},r=0;for(let a of e){let e={type:"element",tagName:"span",properties:{...a.htmlAttrs},children:[{type:"text",value:a.content}]},l=tK(a.htmlStyle||tQ(a));for(let o of(l&&(e.properties.style=l),i))e=o?.span?.call(d,e,t+1,r,n,a)||e;"inline"===s?o.children.push(e):"classic"===s&&n.children.push(e),r+=a.content.length}if("classic"===s){for(let e of i)n=e?.line?.call(d,n,t+1)||n;p.push(n),a.push(n)}else"inline"===s&&p.push(n)}),"classic"===s){for(let e of i)h=e?.code?.call(d,h)||h;for(let e of(c.children.push(h),i))c=e?.pre?.call(d,c)||c;o.children.push(c)}else if("inline"===s){let e=[],t={type:"element",tagName:"span",properties:{class:"line"}
1,children:[]};for(let n of o.children)"element"===n.type&&"br"===n.tagName?(e.push(t),t={type:"element",tagName:"span",properties:{class:"line"},children:[]}):("element"===n.type||"text"===n.type)&&t.children.push(n);e.push(t);let n={type:"element",tagName:"code",properties:{},children:e};for(let e of i)n=e?.code?.call(d,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:"element",tagName:"br",properties:{},children:[]});let t=n.children[e];"element"===t.type&&o.children.push(...t.children)}}let f=o;for(let e of i)f=e?.root?.call(d,f)||f;return r&&tZ(f,r),f}(a,{...n,fg:o,bg:s,themeName:l,rootStyle:!1!==n.rootStyle&&(n.rootStyle??u)},d,c)}let na=function(e,t){let n=t||tM,r=n.quote||'"';if('"'!==r&&"'"!==r)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return({one:tO,all:tU,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||eA.b,characterReferences:n.characterReferences||t$,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:"svg"===n.space?eZ:eY,quote:r,alternative:'"'===r?"'":'"'}).one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)},no={light:"#333333",dark:"#bbbbbb"},ns={light:"#fffffe",dark:"#1e1e1e"},nl="__shiki_resolved";function nu(e){if(e?.[nl])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r="light"===t.type?no.light:no.dark),n||(n="light"===t.type?ns.light:ns.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}for(let e of(t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith("#"),r=e.settings?.background&&!e.settings.background.startsWith("#");if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i}),Object.keys(t.colors||{})))if(("editor.foreground"===e||"editor.background"===e||e.startsWith("terminal.ansi"))&&!t.colors[e]?.startsWith("#")){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,nl,{enumerable:!1,writable:!1,value:!0}),t}async function nc(e){return Array.from(new Set((await Promise.all(e.filter(e=>!tW(e)).map(async e=>await tF(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function nh(e){return(await Promise.all(e.map(async e=>tz(e)?null:nu(await tF(e))))).filter(e=>!!e)}class np extends Error{constructor(e){super(e),this.name="ShikiError"}}function nd(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new np(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class nf extends ev{constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return"string"==typeof e?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=nu(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=C.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=nd(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEac
1h(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>{if(!t)return!1;let r=t.embeddedLanguages||t.embeddedLangs;return r?.some(e=>n.map(([e])=>e).includes(e))}).filter(e=>!n.includes(e));throw new np(`Missing languages ${n.map(([e])=>`\`${e}\``).join(", ")}, required by ${e.map(([e])=>`\`${e}\``).join(", ")}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}}class ng{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split("."),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(".");n=[...n,...this._injections.get(r)||[]]}return n}}let nm=0;async function ny(e){e.engine||function(e,t=3){if(!(t>3))if(1)console.trace(`[SHIKI DEPRECATE]: ${e}`);else throw Error(`[SHIKI DEPRECATE]: ${e}`)}("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([nh(e.themes||[]),nc(e.langs||[]),e.engine]);return function(e){let t;nm+=1,!1!==e.warnings&&nm>=10&&nm%10==0&&console.warn(`[Shiki] ${nm} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let n=!1;if(!e.engine)throw new np("`engine` option is required for synchronous mode");let r=(e.langs||[]).flat(1),i=(e.themes||[]).flat(1).map(nu),a=new nf(new ng(e.engine,r),i,r,e.langAlias);function o(e){if("none"===e)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};u();let t=a.getTheme(e);if(!t)throw new np(`Theme \`${e}\` not found, you may need to load it first`);return t}function s(...e){u(),a.loadLanguages(e.flat(1))}function l(...e){for(let t of(u(),e.flat(1)))a.loadTheme(t)}function u(){if(n)throw new np("Shiki instance has been disposed")}function c(){n||(n=!0,a.dispose(),nm-=1)}return{setTheme:function(e){u();let n=o(e);return t!==e&&(a.setTheme(n),t=e),{theme:n,colorMap:a.getColorMap()}},getTheme:o,getLanguage:function(e){u();let t=a.getGrammar("string"==typeof e?e:e.name);if(!t)throw new np(`Language \`${e}\` not found, you may need to load it first`);return t},getLoadedThemes:function(){return u(),a.getLoadedThemes()},getLoadedLanguages:function(){return u(),a.getLoadedLanguages()},resolveLangAlias:function(t){return nd(t,e.langAlias)},loadLanguage:async function(...e){return s(await nc(e))},loadLanguageSync:s,loadTheme:async function(...e){return u(),l(await nh(e))},loadThemeSync:l,dispose:c,[Symbol.dispose]:c}}({...e,themes:t,langs:n,engine:r})}async function nb(e){let t=await ny(e);return{getLastGrammarState:(...e)=>(function(...e){if(2===e.length)return tJ(e[1]);let[t,n,r={}]=e,{lang:i="text",theme:a=t.getLoadedThemes()[0]}=r;if(tj(i)||tz(a))throw new d("Plain language does not have grammar state");if("ansi"===i)throw new d("ANSI language does not have grammar state");
1let{theme:o,colorMap:s}=t.setTheme(a),l=t.getLanguage(i);return new t0(t9(n,l,o,s,r).stateStack,l.name,o.name)})(t,...e),codeToTokensBase:(e,n)=>t4(t,e,n),codeToTokensWithThemes:(e,n)=>nt(t,e,n),codeToTokens:(e,n)=>nn(t,e,n),codeToHast:(e,n)=>ni(t,e,n),codeToHtml:(e,n)=>(function(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>ni(e,t,n),codeToTokens:(t,n)=>nn(e,t,n)},i=na(ni(e,t,n,r));for(let e of t2(n))i=e.postprocess?.call(r,i,n)||i;return i})(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}let nw=Object.fromEntries([{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>n.e(1969).then(n.bind(n,71969))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>n.e(7886).then(n.bind(n,27886))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>n.e(4117).then(n.bind(n,94117))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:()=>n.e(1093).then(n.bind(n,61093))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:()=>n.e(944).then(n.bind(n,40944))},{id:"catppuccin-frappe",displayName:"Catppuccin Frapp\xe9",type:"dark",import:()=>n.e(4556).then(n.bind(n,34556))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>n.e(1274).then(n.bind(n,61274))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>n.e(9461).then(n.bind(n,39461))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>n.e(4374).then(n.bind(n,84374))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>n.e(5432).then(n.bind(n,55432))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>n.e(5555).then(n.bind(n,45555))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>n.e(8418).then(n.bind(n,58418))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>n.e(5409).then(n.bind(n,55409))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>n.e(5017).then(n.bind(n,17398))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>n.e(971).then(n.bind(n,40971))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>n.e(3899).then(n.bind(n,73899))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>n.e(9830).then(n.bind(n,19830))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>n.e(4635).then(n.bind(n,44635))},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>n.e(9467).then(n.bind(n,59467))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>n.e(9035).then(n.bind(n,29035))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>n.e(4891).then(n.bind(n,64891))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>n.e(5101).then(n.bind(n,45101))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>n.e(51).then(n.bind(n,51))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>n.e(2506).then(n.bind(n,92506))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>n.e(6797).then(n.bind(n,86797))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>n.e(8819).then(n.bind(n,68819))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>n.e(554).then(n.bind(n,50554))},{id:"horizon",displayName:"Horizon",type:"dark",import:()=>n.e(1852).then(n.bind(n,31852))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:()=>n.e(103).then(n.bind(n,50103))},{id:"houston",displayName:"Houston",type:"dark",import:()=>n.e(9771).then(n.bind(n,9771))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>n.e(3972).then(n.bind(n,83972))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>n.e(8444).then(n.bind(n,18444))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>n.e(9002).then(n.bind(n,79002))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>n.e(7779).then(n.bind(n,77779))},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>n.e(8336).then(n.bind(n,28336))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>n.e(4222).then(n.bind(n,64222))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>n.e(5276).then(n.bind(n,85276))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>n.e(9372).then(n.bind(n,19372))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>n.e(3167).then(n.bind(n,33167))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>n.e(2307).then(n.bind(n,22307))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>n.e(1288).then(n.bind(n,91288))},{id:"min-light",displayName:"Min Light",type:"light",import:()=>n.e(2346).then(n.bind(n,2346))},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>
1n.e(7475).then(n.bind(n,67475))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>n.e(2750).then(n.bind(n,82750))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:()=>n.e(6509).then(n.bind(n,46509))},{id:"nord",displayName:"Nord",type:"dark",import:()=>n.e(6974).then(n.bind(n,36974))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>n.e(946).then(n.bind(n,946))},{id:"one-light",displayName:"One Light",type:"light",import:()=>n.e(6662).then(n.bind(n,96662))},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>n.e(8817).then(n.bind(n,48817))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>n.e(1087).then(n.bind(n,1087))},{id:"red",displayName:"Red",type:"dark",import:()=>n.e(5776).then(n.bind(n,15776))},{id:"rose-pine",displayName:"Ros\xe9 Pine",type:"dark",import:()=>n.e(1).then(n.bind(n,50001))},{id:"rose-pine-dawn",displayName:"Ros\xe9 Pine Dawn",type:"light",import:()=>n.e(1394).then(n.bind(n,61394))},{id:"rose-pine-moon",displayName:"Ros\xe9 Pine Moon",type:"dark",import:()=>n.e(2807).then(n.bind(n,72807))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>n.e(3916).then(n.bind(n,33916))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>n.e(1593).then(n.bind(n,11593))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>n.e(4135).then(n.bind(n,54135))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>n.e(791).then(n.bind(n,20791))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>n.e(8671).then(n.bind(n,58671))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>n.e(9407).then(n.bind(n,99407))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>n.e(8702).then(n.bind(n,8702))},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>n.e(614).then(n.bind(n,90614))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>n.e(8210).then(n.bind(n,38210))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>n.e(5503).then(n.bind(n,25503))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>n.e(6967).then(n.bind(n,36967))}].map(e=>[e.id,e.import]));var nk=n(81029).hp;class n_ extends Error{constructor(e){super(e),this.name="ShikiError"}}function nC(){return"undefined"!=typeof performance?performance.now():Date.now()}let nS=(e,t)=>e+(t-e%t)%t;async function nv(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}let a="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function o(e,t){return e?function(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&a)return a.decode(e.subarray(t,i));let o="";for(;t<i;){let n=e[t++];if(!(128&n)){o+=String.fromCharCode(n);continue}let r=63&e[t++];if((224&n)==192){o+=String.fromCharCode((31&n)<<6|r);continue}let i=63&e[t++];if((n=(240&n)==224?(15&n)<<12|r<<6|i:(7&n)<<18|r<<12|i<<6|63&e[t++])<65536)o+=String.fromCharCode(n);else{let e=n-65536;o+=String.fromCharCode(55296|e>>10,56320|1023&e)}}return o}(r.HEAPU8,e,t):""}let s={emscripten_get_now:nC,emscripten_memcpy_big:function(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)},emscripten_resize_heap:function(e){let a=r.HEAPU8.length;if((e>>>=0)>0x80000000)return!1;for(let r=1;r<=4;r*=2){let o=a*(1+.2/r);if(o=Math.min(o,e+0x6000000),function(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}(Math.min(0x80000000,nS(Math.max(e,o),65536))))return!0}return!1},fd_write:()=>0};async function l(){let n=await e({env:s,wasi_snapshot_preview1:s});i((t=n.memory).buffer),Object.assign(r,n),r.UTF8ToString=o}return await l(),r}var nx=Object.defineProperty,nA=(e,t,n)=>((e,t,n)=>t in e?nx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);let nE=null;class nN{constructor(e){nA(this,"utf16Length"),nA(this,"utf8Length"),nA(this,"utf16Value"),nA(this,"utf8Value"),nA(this,"utf16OffsetToUtf8"),nA(this,"utf8OffsetToUtf16");let t=e.length,n=nN._utf8ByteLength(e),r=n!==t,i=r?new Uint32Array(t+1):null;r&&(i[t]=n);let a=r?new Uint32Array(n+1):null;r&&(a[n]=t);let o=new Uint8Array(n),s=0;for(let n=0;n<t;n++){let l=e.charCodeAt(n),u=l,c=!1;if(l>=55296&&l<=56319&&n+1<t){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(u=(l-55296<<10)+65536|t-56320,c=!0)}r&&(i[n]=s,c&&(i[n+1]=s),u<=127?a[s+0]=n:u<=2047?(a[s+0]=n,a[s+1]=n):u<=65535?(a[s+0]=n,a[s+1]=n,a[s+2]=n):(a[s+0]=n,a[s+1]=n,a[s+2]=n,a[s+3]=n)),u<=127?o[s++]=u:(u<=2047?o[s++]=192|(1984&u)>>>6:(u<=65535?o[s++]=224|(61440&u)>>>12:(o[s++]=240|(1835008&u)>>>18,o[s++]=128|(258048&u)>>>12),o[s++]=128|(4032&u)>>>6),o[s++]=128|(63&u)>>>0),c&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=o,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=a}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}let nP=class e{constructor(t){if(nA(this,"id",++e.LAST_ID),nA(this,"_onigBinding"),nA(this,"content"),nA(this,"utf16Length"),nA(this,"utf8Length"),nA(this,"utf16OffsetToUtf8"),nA(this,"utf8Off
1setToUtf16"),nA(this,"ptr"),!nE)throw new n_("Must invoke loadWasm first.");this._onigBinding=nE,this.content=t;let n=new nN(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||(e._sharedPtr=nE.omalloc(1e4)),e._sharedPtrInUse=!0,nE.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(nE)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};nA(nP,"LAST_ID",0),nA(nP,"_sharedPtr",0),nA(nP,"_sharedPtrInUse",!1);class nI{constructor(e){if(nA(this,"_onigBinding"),nA(this,"_ptr"),!nE)throw new n_("Must invoke loadWasm first.");let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new nN(e[r]);t[r]=i.createString(nE),n[r]=i.utf8Length}let r=nE.omalloc(4*e.length);nE.HEAPU32.set(t,r/4);let i=nE.omalloc(4*e.length);nE.HEAPU32.set(n,i/4);let a=nE.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)nE.ofree(t[n]);nE.ofree(i),nE.ofree(r),0===a&&function(e){throw new n_(e.UTF8ToString(e.getLastO
1nigError()))}(nE),this._onigBinding=nE,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if("number"==typeof n&&(r=n),"string"==typeof e){e=new nP(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(0===a)return null;let o=i.HEAPU32,s=a/4,l=o[s++],u=o[s++],c=[];for(let t=0;t<u;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);c[t]={start:n,end:r,length:r-n}}return{index:l,captureIndices:c}}}function nL(e){return t=>WebAssembly.instantiate(e,t)}async function nR(e){return e&&await (i||(i=async function(){nE=await nv(async t=>{let n=e;if("function"==typeof(n=await n)&&(n=await n(t)),"function"==typeof n&&(n=await n(t)),"function"==typeof n.instantiator)n=await n.instantiator(t);else if("function"==typeof n.default)n=await n.default(t);else{var r,i,a,o;if(void 0!==n.data&&(n=n.data),r=n,"undefined"!=typeof Response&&r instanceof Response){n="function"==typeof WebAssembly.instantiateStreaming?await (a=n,e=>WebAssembly.instantiateStreaming(a,e))(t):await (o=n,async e=>{let t=await o.arrayBuffer();return WebAssembly.instantiate(t,e)})(t)}else(i=n,"undefined"!=typeof ArrayBuffer&&(i instanceof ArrayBuffer||ArrayBuffer.isView(i))||void 0!==nk&&nk.isBuffer?.(i)||"undefined"!=typeof SharedArrayBuffer&&i instanceof SharedArrayBuffer||"undefined"!=typeof Uint32Array&&i instanceof Uint32Array||n instanceof WebAssembly.Module)?n=await nL(n)(t):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await nL(n.default)(t))}return"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}())),{createScanner:e=>new nI(e.map(e=>"string"==typeof e?e:e.source)),createString:e=>new nP(e)}}let nT=function(e){let t=e.langs,n=e.themes,r=e.engine;return async function(e){function i(n){if("string"==typeof n){if(tW(n=e.langAlias?.[n]||n))return[];let r=t[n];if(!r)throw new d(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(tz(e))return"none";if("string"==typeof e){let t=n[e];if(!t)throw new d(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),l=await nb({engine:e.engine??r(),...e,themes:o,langs:s});return{...l,loadLanguage:(...e)=>l.loadLanguage(...e.map(i)),loadTheme:(...e)=>l.loadTheme(...e.map(a)),getBundledLanguages:()=>t,getBundledThemes:()=>n}}}({langs:p,themes:nw,engine:()=>nR(Promise.all([n.e(4814),n.e(4595)]).then(n.bind(n,54595)))});function nM(e){if(1!=[...e].length)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}let n$=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),nB=String.raw;function nO(e,t){if(null==e)throw Error(t??"Value expected");return e}let nU=nB`\[\^?`,nD=`c.? | C(?:-.?)?|${nB`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${nB`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${nB`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${nB`o\{[^\}]*\}?`}|${nB`\d{1,3}`}`,nG=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,nF=RegExp(nB`
2  \\ (?:
3    ${nD}
4    | [gk]<[^>]*>?
5    | [gk]'[^']*'?
6    | .
7  )
8  | \( (?:
9    \? (?:
10      [:=!>({]
11      | <[=!]
12      | <[^>]*>
13      | '[^']*'
14      | ~\|?
15      | #(?:[^)\\]|\\.?)*
16      | [^:)]*[:)]
17    )?
18    | \*[^\)]*\)?
19  )?
20  | (?:${nG.source})+
21  | ${nU}
22  | .
23`.replace(/\s+/g,""),"gsu"),nj=RegExp(nB`
24  \\ (?:
25    ${nD}
26    | .
27  )
28  | \[:(?:\^?\p{Alpha}+|\^):\]
29  | ${nU}
30  | &&
31  | .
32`.replace(/\s+/g,""),"gsu");function nW(e,{inCharClass:t}){let n=e[1];if("c"===n||"C"===n){var r=e;let t="c"===r[1]?r[2]:r[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${r}"`);return nq(nM(t.toUpperCase())-64,r)}if("dDhHsSwW".includes(n)){var i=e;let t=i[1].toLowerCase();return nX({d:"digit",h:"hex",s:"space",w:"word"}[t],i,{negate:i[1]!==t})}if(e.startsWith(nB`\o{`))throw Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);
32if(/^\\[pP]\{/.test(e)){if(3===e.length)throw Error(`Incomplete or invalid Unicode property "${e}"`);var a=e;let{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(a).groups;return nX("property",a,{value:r,negate:"P"===t&&!n||"p"===t&&!!n})}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let t=e.split(/\\x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(t)),r=new TextEncoder;return[...n].map(e=>{let t=[...r.encode(e)].map(e=>`\\x${e.toString(16)}`).join("");return nq(nM(e),t)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if("u"===n||"x"===n)return nq(function(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw Error(`Incomplete or invalid escape "${e}"`);return parseInt("{"===e[2]?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2),16)}(e),e);if(nZ.has(n))return nq(nZ.get(n),e);if(/\d/.test(n))return{type:"EscapedNumber",inCharClass:t,raw:e};if("\\"===e)throw Error(nB`Incomplete escape "\"`);if("M"===n)throw Error(`Unsupported meta "${e}"`);if(2==[...e].length)return nq(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function nz(e,t){return{type:"Assertion",kind:e,raw:t}}function nH(e){return{type:"Backreference",raw:e}}function nq(e,t){return{type:"Character",value:e,raw:t}}function nV(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function nX(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function nQ(e,t,n={}){return"keep"===e?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:nO(n.flags),raw:t}}function nK(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}let nY=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),nZ=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function nJ(e){let t=null,n,r;if("{"===e[0]){let{minStr:i,maxStr:a}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups;if(+i>1e5||a&&+a>1e5)throw Error("Quantifier value unsupported in Oniguruma");if((n=+i)>(r=void 0===a?+i:""===a?1/0:+a)&&(t="possessive",[n,r]=[r,n]),e.endsWith("?")){if("possessive"===t)throw Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=+("+"===e[0]),r="?"===e[0]?1:1/0,t="+"===e[1]?"possessive":"?"===e[1]?"lazy":"greedy";return{type:"Quantifier",kind:t,min:n,max:r,raw:e}}function n0(e){let t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function n1(e,t){if(!Array.isArray(e.body))throw Error("Expected node with body array");if(1!==e.body.length)return!1;let n=e.body[0];return!t||Object.keys(t).every(e=>t[e]===n[e])}let n2=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function n5(e,t={}){var n;let r={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},i=function(e,t={}){let n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if("string"!=typeof e)throw Error("String expected as pattern");let r=function(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){let r=e[n];if(!"imxDPSWy".includes(r))throw Error(`Invalid flag "${r}"`);if("y"===r){if(!/^y{[gw]}/.test(e.slice(n)))throw Error('Invalid or unspecified flag "y" mode');t.textSegmentMode="g"===e[n+2]?"grapheme":"word",n+=3;continue}t[({i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"})[r]]=!0}return t}(n.flags),i=[r.extended],a={captureGroup:n.rules.captureGroup,getCurrentModX:()=>i.at(-1),numOpenGroups:0,popModX(){i.pop()},pushModX(e){i.push(e)},replaceCurrentModX(e){i[i.length-1]=e},singleline:n.rules.singleline},o=[],s;for(nF.lastIndex=0;s=nF.exec(e);){let t=function(e,t,n,r){let[i,a]=n;if("["===n||"[^"===n){let e=function(e,t,n){let r=[nV("^"===t[1],t)],i=1,a;for(nj.lastIndex=n;a=nj.exec(e);){let e=a[0];if("["===e[0]&&":"!==e[1])i++,r.push(nV("^"===e[1],e));else if("]"===e){if("CharacterClassOpen"===r.at(-1).type)r.push(nq(93,e));else if(i--,r.push({type:"CharacterClassClose",raw:e}),!i)break}else{let t=function(e){if("\\"===e[0])return nW(e,{inCharClass:!0});if("["===e[0]){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!n$.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return nX("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return"-"===e?{type:"CharacterClassHyphen",raw:e}:"&&"===e?{type:"CharacterClassIntersector",raw:e}:nq(nM(e),e)}(e);Array.isArray(t)?r.push(...t):r.push(t)}}return{tokens:r,lastIndex:nj.lastIndex||e.length}}(t,n,r);return{tokens:e.tokens,lastIndex:e.lastIndex}}if("\\"===i){if("AbBGyYzZ".includes(a))return{token:nz(n,n)};
32if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:{type:"Subroutine",raw:n}}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:nH(n)}}if("K"===a)return{token:nQ("keep",n)};if("N"===a||"R"===a)return{token:nX("newline",n,{negate:"N"===a})};if("O"===a)return{token:nX("any",n)};if("X"===a)return{token:nX("text_segment",n)};let e=nW(n,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if("("===i){if("*"===a)return{token:function(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout "${e}"`);let{name:n,tag:r,args:i}=t.groups;if(!n)throw Error(`Invalid named callout "${e}"`);if(""===r)throw Error(`Named callout tag with empty value not allowed "${e}"`);let a=i?i.split(",").filter(e=>""!==e).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[o,s,l]=a,u=nY.has(n)?n.toLowerCase():"custom";switch(u){case"fail":case"mismatch":case"skip":if(a.length>0)throw Error(`Named callout arguments not allowed "${a}"`);break;case"error":if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if("string"==typeof o)throw Error(`Named callout argument must be a number "${o}"`);break;case"max":if(!a.length||a.length>2)throw Error(`Named callout must have one or two arguments "${a}"`);if("string"==typeof o&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(2===a.length&&("number"==typeof s||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${s}"`);break;case"count":case"total_count":if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(1===a.length&&("number"==typeof o||!/^[<>X]$/.test(o)))throw Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case"cmp":if(3!==a.length)throw Error(`Named callout must have three arguments "${a}"`);if("string"==typeof o&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if("number"==typeof s||!/^(?:[<>!=]=|[<>])$/.test(s))throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${s}"`);if("string"==typeof l&&!/^[A-Za-z_]\w*$/.test(l))throw Error(`Named callout argument three must be a tag or number "${l}"`);break;case"custom":throw Error(`Undefined callout name "${n}"`);default:throw Error(`Unexpected named callout kind "${u}"`)}return{type:"NamedCallout",kind:u,tag:r??null,arguments:i?.split(",")??null,raw:e}}(n)};if("(?{"===n)throw Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(")"!==t[r])throw Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:function(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??="";let i=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),a=n0(n),o=n0(r),s={};if(a&&(s.enable=a),o&&(s.disable=o),e.endsWith(")"))return t.replaceCurrentModX(i),nQ("flags",e,{flags:s});if(e.endsWith(":"))return t.pushModX(i),t.numOpenGroups++,nK("group",e,{...(a||o)&&{flags:s}});throw Error(`Unexpected flag modifier "${e}"`)}(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,"("===n&&!e.captureGroup||"(?:"===n)return{token:nK("group",n)};if("(?>"===n)return{token:nK("atomic",n)};if("(?="===n||"(?!"===n||"(?<="===n||"(?<!"===n)return{token:nK("<"===n[2]?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if("("===n&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:nK("capturing",n,{..."("!==n&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if("(?~|"===n)throw Error(`Unsupported absence function kind "${n}"`);return{token:nK("absence_repeater",n)}}throw"(?("===n?Error(`Unsupported conditional "${n}"`):Error(`Invalid or unsupported group option "${n}"`)}if(")"===n){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw Error('Unmatched ")"');return{token:{type:"GroupClose",raw:n}}}if(e.getCurrentModX()){if("#"===n){let e=t.indexOf(`
33`,r);return{lastIndex:-1===e?t.length:e}}if(/^\s$/.test(n)){let e=/\s+/y;return e.lastIndex=r,{lastIndex:e.exec(t)?e.lastIndex:r}}}return"."===n?{token:nX("dot",n)}:"^"===n||"$"===n?{token:nz(e.singleline?({"^":nB`\A`,$:nB`\Z`})[n]:n,n)}:"|"===n?{token:{type:"Alternator",raw:n}}:nG.test(n)?{tokens:function(e){let t,n=[],r=RegExp(nG,"gy");for(;t=r.exec(e);){let e=t[0];if("{"===e[0]){let t=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(t){let{min:i,max:a}=t.groups;if(+i>
33+a&&e.endsWith("?")){r.lastIndex--,n.push(nJ(e.slice(0,-1)));continue}}}n.push(nJ(e))}return n}(n)}:{token:nq(nM(n),n)}}(a,e,s[0],nF.lastIndex);t.tokens?o.push(...t.tokens):t.token&&o.push(t.token),void 0!==t.lastIndex&&(nF.lastIndex=t.lastIndex)}let l=[],u=0;o.filter(e=>"GroupOpen"===e.type).forEach(e=>{"capturing"===e.kind?e.number=++u:"("===e.raw&&l.push(e)}),u||l.forEach((e,t)=>{e.kind="capturing",e.number=t+1});let c=u||l.length;return{tokens:o.map(e=>"EscapedNumber"===e.type?function(e,t){let{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&("0"!==i&&1===i.length||"0"!==i[0]&&+i<=t))return[nH(n)];let a=[],o=i.match(/^[0-7]+|\d/g);for(let e=0;e<o.length;e++){let t,r=o[e];if(0===e&&"8"!==r&&"9"!==r){if((t=parseInt(r,8))>127)throw Error(nB`Octal encoded byte above 177 unsupported "${n}"`)}else t=nM(r);a.push(nq(t,(0===e?"\\":"")+r))}return a}(e,c):e).flat(),flags:r}}(e,{flags:r.flags,rules:{captureGroup:r.rules.captureGroup,singleline:r.rules.singleline}}),a=(e,t)=>{let n=i.tokens[o.nextIndex];switch(o.parent=e,o.nextIndex++,n.type){case"Alternator":return n6();case"Assertion":return function({kind:e}){return n3(nO({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===nB`\B`||e===nB`\Y`})}(n);case"Backreference":return function({raw:e},t){let n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(n,r=!1)=>{let i=t.capturingGroups.length,a=!1;if(n>i)if(t.skipBackrefValidation)a=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,n8(r?i+1-n:n,{orphan:a})};if(n){let n=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(n)return i(+n.groups.num,!!n.groups.sign);if(/[-+]/.test(r))throw Error(`Invalid backref name "${e}"`);
33if(!t.namedGroupsByName.has(r))throw Error(`Group name not defined to the left "${e}"`);return n8(r)}return i(+r)}(n,o);case"Character":return n4(n.value,{useLastValid:!!t.isCheckingRangeEnd});case"CharacterClassHyphen":return function(e,t,n){let{tokens:r,walk:i}=t,a=t.parent,o=a.body.at(-1),s=r[t.nextIndex];if(!n.isCheckingRangeEnd&&o&&"CharacterClass"!==o.type&&"CharacterClassRange"!==o.type&&s&&"CharacterClassOpen"!==s.type&&"CharacterClassClose"!==s.type&&"CharacterClassIntersector"!==s.type){let e=i(a,{...n,isCheckingRangeEnd:!0});if("Character"===o.type&&"Character"===e.type)return a.body.pop(),function(e,t){if(t.value<e.value)throw Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}(o,e);throw Error("Invalid character class range")}return n4(nM("-"))}(0,o,t);case"CharacterClassOpen":return function({negate:e},t,n){let{tokens:r,walk:i}=t,a=[n9()],o=r[t.nextIndex],s=rh(o);for(;"CharacterClassClose"!==s.type;){if("CharacterClassIntersector"===s.type)a.push(n9()),t.nextIndex++;else{let e=a.at(-1);e.body.push(i(e,n))}s=rh(r[t.nextIndex],o)}let l=n9({negate:e});return 1===a.length?l.body=a[0].body:(l.kind="intersection",l.body=a.map(e=>1===e.body.length?e.body[0]:e)),t.nextIndex++,l}(n,o,t);case"CharacterSet":return function({kind:e,negate:t,value:n},r){let{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o}=r;if("property"===e){let r=rc(n);if(!n$.has(r)||o?.has(r))return ra(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o});e="posix",n=r}return"posix"===e?function(e,t){let n=!!t?.negate;if(!n$.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}(n,{negate:t}):re(e,{negate:t})}(n,o);case"Directive":return function(e,t={}){if("keep"===e)return{type:"Directive",kind:e};if("flags"===e)return{type:"Directive",kind:e,flags:nO(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}(n.kind,{flags:n.flags});case"GroupOpen":return function(e,t,n){var r,i;let{tokens:a,capturingGroups:o,namedGroupsByName:s,skipLookbehindValidation:l,walk:u}=t,c=function({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case"absence_repeater":var a="repeater";!1;return{type:"AbsenceFunction",kind:a,body:ro(void 0)};case"atomic":return rt({atomic:!0});case"capturing":return n7(i,{name:n});case"group":return rt({flags:e});case"lookahead":case"lookbehind":return rn({behind:"lookbehind"===t,negate:r});default:throw Error(`Unexpected group kind "${t}"`)}}(e),h="AbsenceFunction"===c.type,p=ru(c),d=p&&c.negate;if("CapturingGroup"===c.type&&(o.push(c),c.name&&(r=c.name,i=[],s.has(r)||s.set(r,i),s.get(r)).push(c)),h&&n.isInAbsenceFunction)throw Error("Nested absence function not supported by Oniguruma");let f=rp(a[t.nextIndex]);for(;"GroupClose"!==f.type;){if("Alternator"===f.type)c.body.push(n6()),t.nextIndex++;else{let e=c.body.at(-1),t=u(e,{...n,isInAbsenceFunction:n.isInAbsenceFunction||h,isInLookbehind:n.isInLookbehind||p,isInNegLookbehind:n.isInNegLookbehind||d});if(e.body.push(t),(p||n.isInLookbehind)&&!l){let e="Lookbehind includes a pattern not allowed by Oniguruma";if(d||n.isInNegLookbehind){if(rl(t)||"CapturingGroup"===t.type)throw Error(e)}else if(rl(t)||ru(t)&&t.negate)throw Error(e)}}f=rp(a[t.nextIndex])}return t.nextIndex++,c}(n,o,t);case"NamedCallout":var r,a;return r=n.kind,a=n.tag,{type:"NamedCallout",kind:r,tag:a,arguments:n.arguments};case"Quantifier":return function({kind:e,min:t,max:n},r){let i=r.parent,a=i.body.at(-1);if(!a||!n2.has(a.type))throw Error("Quantifier requires a repeatable token");let o=rr(e,t,n,a);return i.body.pop(),o}(n,o);
33case"Subroutine":return function({raw:e},t){let{capturingGroups:n,subroutines:r}=t,i=e.slice(3,-1),a=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(a){let e=+a.groups.num,r=n.length;if(t.hasNumberedRef=!0,(i=({"":e,"+":r+e,"-":r+1-e})[a.groups.sign])<1)throw Error("Invalid subroutine number")}else"0"===i&&(i=0);let o=ri(i);return r.push(o),o}(n,o);default:throw Error(`Unexpected token type "${n.type}"`)}},o={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:r.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:r.skipBackrefValidation,skipLookbehindValidation:r.skipLookbehindValidation,skipPropertyNameValidation:r.skipPropertyNameValidation,subroutines:[],tokens:i.tokens,unicodePropertyMap:r.unicodePropertyMap,walk:a},s=(n={type:"Flags",...i.flags},{type:"Regex",body:ro(void 0),flags:n}),l=s.body[0];for(;o.nextIndex<i.tokens.length;){let e=a(l,{});"Alternative"===e.type?(s.body.push(e),l=e):l.body.push(e)}let{capturingGroups:u,hasNumberedRef:c,namedGroupsByName:h,subroutines:p}=o;if(c&&h.size&&!r.rules.captureGroup)throw Error("Numbered backref/subroutine not allowed when using named capture");for(let{ref:e}of p)if("number"==typeof e){if(e>u.length)throw Error("Subroutine uses a group number that's not defined");e&&(u[e-1].isSubroutined=!0)}else if(h.has(e)){if(h.get(e).length>1)throw Error(nB`Subroutine uses a duplicate group name "\g<${e}>"`);h.get(e)[0].isSubroutined=!0}else throw Error(nB`Subroutine uses a group name that's not defined "\g<${e}>"`);return s}function n6(e){return{type:"Alternative",body:rs(e?.body)}}function n3(e,t){let n={type:"Assertion",kind:e};return("word_boundary"===e||"text_segment_boundary"===e)&&(n.negate=!!t?.negate),n}function n8(e,t){let n=!!t?.orphan;return{type:"Backreference",ref:e,...n&&{orphan:n}}}function n7(e,t){var n;let r={name:void 0,isSubroutined:!1,...t};if(void 0!==r.name&&(n=r.name,!/^[\p{Alpha}\p{Pc}][^)]*$/u.test(n)))throw Error(`Group name "${r.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...r.name&&{name:r.name},...r.isSubroutined&&{isSubroutined:r.isSubroutined},body:ro(t?.body)}}function n4(e,t){let n={useLastValid:!1,...t};if(e>1114111){let t=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?Error(`Invalid code point out of range "\\x{${t}}"`):Error(`Invalid code point out of range in JS "\\x{${t}}"`)}return{type:"Character",value:e}}function n9(e){let t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:rs(e?.body)}}function re(e,t){let n=!!t?.negate,r={type:"CharacterSet",kind:e};return("digit"===e||"hex"===e||"newline"===e||"space"===e||"word"===e)&&(r.negate=n),"text_segment"!==e&&("newline"!==e||n)||(r.variableLength=!0),r}function rt(e){let t=e?.atomic,n=e?.flags;if(t&&n)throw Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:ro(e?.body)}}function rn(e){let t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:ro(e?.body)}}function rr(e,t,n,r){if(t>n)throw Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function ri(e){return{type:"Subroutine",ref:e}}function ra(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},r=n.unicodePropertyMap?.get(rc(e));if(!r){if(n.normalizeUnknownPropertyNames)r=e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase());else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw Error(nB`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function ro(e){if(void 0===e)e=[n6()];else if(!Array.isArray(e)||!e.length||!e.every(e=>"Alternative"===e.type))throw Error("Invalid body; expected array of one or more Alternative nodes");return e}function rs(e){if(void 0===e)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw Error("Invalid body; expected array of nodes");return e}function rl(e){return"LookaroundAssertion"===e.type&&"lookahead"===e.kind}function ru(e){return"LookaroundAssertion"===e.type&&"lookbehind"===e.kind}function rc(e){return e.replace(/[- _]+/g,"").toLowerCase()}function rh(e,t){return nO(e,`Unclosed character class${t?.type==="Character"&&93===t.value&&"]"===t.raw?' (started with "]")':""}`)}function rp(e){return nO(e,"Unclosed group")}function rd(e,t,n=null){function r(e,t){for(let n=0;n<e.length;n++){let r=i(e[n],t,n,e);n=Math.max(-1,n+r)}}function i(a,o=null,s=null,l=null){let u=0,c=!1,h={node:a,parent:o,key:s,container:l,root:e,remove(){rf(l).splice(Math.max(0,rg(s)+u),1),u--,c=!0},removeAllNextSiblings:()=>rf(l).splice(rg(s)+1),removeAllPrevSiblings(){let e=rg(s)+u;return u-=e,rf(l).splice(0,Math.max(0,e))},replaceWith(e,t={}){let n=!!t.traverse;l?l[Math.max(0,rg(s)+u)]=e:nO(o,"Can't replace root node")[s]=e,n&&i(e,o,s,l),c=!0},replaceWithMultiple(e,t={}){let n=!!t.traverse;if(rf(l).splice(Math.max(0,rg(s)+u),1,...e),u+=e.length-1,n){let t=0;for(let n=0;n<e.length;n++)t+=i(e[n],o,rg(s)+n+t,l)}c=!0},skip(){c=!0}},{type:p}=a,d=t["*"],f=t[p],g="function"==typeof d?d:d?.enter,m="function"==typeof f?f:f?.enter;if(g?.(h,n),m?.(h,n),!c)switch(p){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":r(a.body,a);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subrout
33ine":break;case"CharacterClassRange":i(a.min,a,"min"),i(a.max,a,"max");break;case"Quantifier":i(a.body,a,"body");break;case"Regex":r(a.body,a),i(a.flags,a,"flags");break;default:throw Error(`Unexpected node type "${p}"`)}return f?.exit?.(h,n),d?.exit?.(h,n),u}return i(e),e}function rf(e){if(!Array.isArray(e))throw Error("Container expected");return e}function rg(e){if("number"!=typeof e)throw Error("Numeric key expected");return e}let rm=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`,ry=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function rb(e,t,n,r){let i=RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),a=[!1],o=0,s="";for(let t of e.matchAll(i)){let{0:e,groups:{$skip:i}}=t;if(!i&&(!r||r===ry.DEFAULT==!o)){n instanceof Function?s+=n(t,{context:o?ry.CHAR_CLASS:ry.DEFAULT,negated:a[a.length-1]}):s+=n;continue}"["===e[0]?(o++,a.push("^"===e[1])):"]"===e&&o&&(o--,a.pop()),s+=e}return s}function rw(e,t,n){return!!function(e,t,n=0,r){let i;if(!RegExp(t,"su").test(e))return null;let a=RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");a.lastIndex=n;let o=0;for(;i=a.exec(e);){let{0:e,groups:{$skip:t}}=i;if(!t&&(!r||r===ry.DEFAULT==!o))return i;"["===e?o++:"]"===e&&o&&o--,a.lastIndex==i.index&&a.lastIndex++}return null}(e,t,0,n)}let rk=RegExp(String.raw`(?<noncapturingStart>${rm})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu"),r_=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,rC=RegExp(String.raw`
34\\(?: \d+
35  | c[A-Za-z]
36  | [gk]<[^>]+>
37  | [pPu]\{[^\}]+\}
38  | u[A-Fa-f\d]{4}
39  | x[A-Fa-f\d]{2}
40  )
41| \((?: \? (?: [:=!>]
42  | <(?:[=!]|[^>]+>)
43  | [A-Za-z\-]+:
44  | \(DEFINE\)
45  ))?
46| (?<qBase>${r_})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
47| \\?.
48`.replace(/\s+/g,""),"gsu"),rS=String.raw,rv=rS`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,rx=rS`\(\?R=(?<rDepth>[^\)]+)\)|${rv}`,rA=rS`\(\?<(?![=!])(?<captureName>[^>]+)>`,rE=rS`${rA}|(?<unnamed>\()(?!\?)`,rN=RegExp(rS`${rA}|${rx}|\(\?|\\?.`,"gsu"),rP="Cannot use multiple overlapping recursions";function rI(e){let t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e)||(e*=1)<2||e>100)throw Error(t)}function rL(e,t,n,r,i,a,o){let s=new Set;r&&rb(e+t,rA,({groups:{captureName:e}})=>{s.add(e)},ry.DEFAULT);let l=[n,r?s:null,i,a,o];return`${e}${rR(`(?:${e}`,"forward",...l)}(?:)${rR(`${t})`,"backward",...l)}${t}`}function rR(e,t,n,r,i,a,o){let s=e=>"forward"===t?e+2:n-e+2-1,l="";for(let t=0;t<n;t++){let n=s(t);l+=rb(e,rS`${rE}|\\k<(?<backref>[^>]+)>`,({0:e,groups:{captureName:t,unnamed:s,backref:l}})=>{if(l&&r&&!r.has(l))return e;let u=`_$${n}`;if(s||t){let n=o+a.length+1;return a.push(n),function(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}(i,n),s?e:`(?<${t}${u}>`}return rS`\k<${l}${u}>`},ry.DEFAULT)}return l}function rT(e,t,n,r,i,a){if(e.size&&r){let o=0;rb(t,rE,()=>o++,ry.DEFAULT);let s=a-o+i,l=new Map;return e.forEach((e,t)=>{let i=(r-o*n)/n,a=o*n,u=t>s+o?t+r:t,c=[];for(let t of e)if(t<=s)c.push(t);else if(t>s+o+i)c.push(t+r);else if(t<=s+o)for(let e=0;e<=n;e++)c.push(t+o*e);else for(let e=0;e<=n;e++)c.push(t+a+i*e);l.set(u,c)}),l}return e}var rM=String.fromCodePoint,r$=String.raw,rB={},rO=globalThis.RegExp;function rU(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function rD(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}rB.flagGroups=(()=>{try{new rO("(?i:)")}catch{return!1}return!0})(),rB.unicodeSets=(()=>{try{new rO("[[]]","v")}catch{return!1}return!0})(),rB.bugFlagVLiteralHyphenIsRange=!!rB.unicodeSets&&(()=>{try{new rO(r$`[\d\-a]`,"v")}catch{return!0}return!1})(),rB.bugNestedClassIgnoresNegation=rB.unicodeSets&&new rO("[[^a]]","v").test("a");var rG={ES2025:2025,ES2024:2024,ES2018:2018},rF={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function rj(e={}){if("[object Object]"!==({}).toString.call(e))throw Error("Unexpected options");
48if(void 0!==e.target&&!rF[e.target])throw Error(`Unexpected target "${e.target}"`);let t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return"auto"===t.target&&(t.target=rB.flagGroups?"ES2025":rB.unicodeSets?"ES2024":"ES2018"),t}var rW=new Set([rM(304),rM(305)]),rz=r$`[\p{L}\p{M}\p{N}\p{Pc}]`;function rH(e){if(rW.has(e))return[e];let t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=rQ.get(n),a=rV.get(n),o=rX.get(n);return 1==[...r].length&&t.add(r),o&&t.add(o),i&&t.add(i),t.add(n),a&&t.add(a),[...t]}var rq=new Map(`C Other
49Cc Control cntrl
50Cf Format
51Cn Unassigned
52Co Private_Use
53Cs Surrogate
54L Letter
55LC Cased_Letter
56Ll Lowercase_Letter
57Lm Modifier_Letter
58Lo Other_Letter
59Lt Titlecase_Letter
60Lu Uppercase_Letter
61M Mark Combining_Mark
62Mc Spacing_Mark
63Me Enclosing_Mark
64Mn Nonspacing_Mark
65N Number
66Nd Decimal_Number digit
67Nl Letter_Number
68No Other_Number
69P Punctuation punct
70Pc Connector_Punctuation
71Pd Dash_Punctuation
72Pe Close_Punctuation
73Pf Final_Punctuation
74Pi Initial_Punctuation
75Po Other_Punctuation
76Ps Open_Punctuation
77S Symbol
78Sc Currency_Symbol
79Sk Modifier_Symbol
80Sm Math_Symbol
81So Other_Symbol
82Z Separator
83Zl Line_Separator
84Zp Paragraph_Separator
85Zs Space_Separator
86ASCII
87ASCII_Hex_Digit AHex
88Alphabetic Alpha
89Any
90Assigned
91Bidi_Control Bidi_C
92Bidi_Mirrored Bidi_M
93Case_Ignorable CI
94Cased
95Changes_When_Casefolded CWCF
96Changes_When_Casemapped CWCM
97Changes_When_Lowercased CWL
98Changes_When_NFKC_Casefolded CWKCF
99Changes_When_Titlecased CWT
100Changes_When_Uppercased CWU
101Dash
102Default_Ignorable_Code_Point DI
103Deprecated Dep
104Diacritic Dia
105Emoji
106Emoji_Component EComp
107Emoji_Modifier EMod
108Emoji_Modifier_Base EBase
109Emoji_Presentation EPres
110Extended_Pictographic ExtPict
111Extender Ext
112Grapheme_Base Gr_Base
113Grapheme_Extend Gr_Ext
114Hex_Digit Hex
115IDS_Binary_Operator IDSB
116IDS_Trinary_Operator IDST
117ID_Continue IDC
118ID_Start IDS
119Ideographic Ideo
120Join_Control Join_C
121Logical_Order_Exception LOE
122Lowercase Lower
123Math
124Noncharacter_Code_Point NChar
125Pattern_Syntax Pat_Syn
126Pattern_White_Space Pat_WS
127Quotation_Mark QMark
128Radical
129Regional_Indicator RI
130Sentence_Terminal STerm
131Soft_Dotted SD
132Terminal_Punctuation Term
133Unified_Ideograph UIdeo
134Uppercase Upper
135Variation_Selector VS
136White_Space space
137XID_Continue XIDC
138XID_Start XIDS`.split(/\s/).map(e=>[rc(e),e])),rV=new Map([["s",rM(383)],[rM(383),"s"]]),rX=new Map([[rM(223),rM(7838)],[rM(107),rM(8490)],[rM(229),rM(8491)],[rM(969),rM(8486)]]),rQ=new Map([rY(453),rY(456),rY(459),rY(498),...rZ(8072,8079),...rZ(8088,8095),...rZ(8104,8111),rY(8124),rY(8140),rY(8188)]),rK=new Map([["alnum",r$`[\p{Alpha}\p{Nd}]`],["alpha",r$`\p{Alpha}`],["ascii",r$`\p{ASCII}`],["blank",r$`[\p{Zs}\t]`],["cntrl",r$`\p{Cc}`],["digit",r$`\p{Nd}`],["graph",r$`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",r$`\p{Lower}`],["print",r$`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",r$`[\p{P}\p{S}]`],["space",r$`\p{space}`],["upper",r$`\p{Upper}`],["word",r$`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",r$`\p{AHex}`]]);function rY(e){let t=rM(e);return[t.toLowerCase(),t]}function rZ(e,t){return(function(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n})(e,t).map(e=>rY(e))}var rJ=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]),r0={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:r,kind:i}=e;if("repeater"===i){let e=rt();e.body[0].body.push(rn({negate:!0,body:r}),ra("Any"));let i=rt();i.body[0].body.push(rr("greedy",0,1/0,e)),n(ir(i,t),{traverse:!0})}else throw Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){let i=e.body.filter(e=>"flags"===e.kind);for(let e=n+1;e<t.body.length;e++)rD(r,t.body[e],[]).push(...i)},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=r8(t.get(e));if(n){let t=rt({flags:n});t.body[0].body=e.body,e.body=[ir(t,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:a,replaceWith:o},s){let{kind:l,negate:u}=e,{asciiWordBoundaries:c,avoidSubclass:h,supportedGNodes:p,wordIsAscii:d}=s;if("text_segment_boundary"===l)throw Error(`Unsupported text segment boundary "\\${u?"Y":"y"}"`);if("line_end"===l)o(ir(rn({body:[n6({body:[n3("string_end")]}),n6({body:[n4(10)]})]}),t));else if("line_start"===l)o(ir(r9(r$`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if("search_start"===l)if(p.has(e))i.flags.sticky=!0,a();else{let e=r[n-1];if(e&&function(e){let t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||"Quantifier"===e.type&&e.min&&t.includes(e.body.type)}(e))o(ir(rn({negate:!0}),t));else if(h)throw Error(r$`Uses "\G" in a way that requires a subclass`);else o(it(n3("string_start"),t)),s.strategy="clip_search"}else if("string_end"===l||"string_start"===l);else if("string_end_newline"===l)o(ir(r9(r$`(?=\n?\z)`),t));else if("word_boundary"===l){if(!d&&!c){let e=`(?:(?<=${rz})(?!${rz})|(?<!${rz})(?=${rz}))`,n=`(?:(?<=${rz})(?=${rz})|(?<!${rz})(?!${rz}))`;o(ir(r9(u?n:e),t))}}else throw Error(`Unexpected assertion kind "${l}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;"string"!=typeof n||r4(n)||(e.ref=n=r3(n,t))},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!r4(r)&&(e.name=r=r3(r,t)),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){"intersection"===t.kind&&n(ir(n9({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:a,spaceIsAscii:o,wordIsAscii:s}){let{kind:l,negate:u,value:c}=e;if(a&&("digit"===l||"digit"===c))return void n(it(re("digit",{negate:u}),t));
138if(o&&("space"===l||"space"===c))return void n(ir(ie(r9("[	-\r ]"),u),t));if(s&&("word"===l||"word"===c))return void n(it(re("word",{negate:u}),t));if("any"===l)n(it(ra("Any"),t));else if("digit"===l)n(it(ra("Nd",{negate:u}),t));else if("dot"===l);else if("text_segment"===l){if("strict"===r)throw Error(r$`Use of "\X" requires non-strict accuracy`);let e="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",a=r$`\p{RI}{2}|${e}(?:\u200D${e})*`;n(ir(r9(r$`(?>\r\n|${i?r$`\p{RGI_Emoji}`:a}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if("hex"===l)n(it(ra("AHex",{negate:u}),t));else if("newline"===l)n(ir(r9(u?"[^\n]":"(?>\r\n?|[\n\v\f\x85\u2028\u2029])"),t));else if("posix"===l)if(i||"graph"!==c&&"print"!==c)n(ir(ie(r9(rK.get(c)),u),t));else{if("strict"===r)throw Error(`POSIX class "${c}" requires min target ES2024 or non-strict accuracy`);let e={graph:"!-~",print:" -~"}[c];u&&(e=`\0-${rM(e.codePointAt(0)-1)}${rM(e.codePointAt(2)+1)}-\u{10FFFF}`),n(ir(r9(`[${e}]`),t))}else if("property"===l)rq.has(rc(c))||(e.key="sc");else if("space"===l)n(it(ra("space",{negate:u}),t));else if("word"===l)n(ir(ie(r9(rz),u),t));else throw Error(`Unexpected character set kind "${l}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:a,removeAllNextSiblings:o}){let{kind:s,flags:l}=e;if("flags"===s)if(l.enable||l.disable){let e=rt({flags:l});e.body[0].body=o(),i(ir(e,t),{traverse:!0})}else r();else if("keep"===s){let e=n.body[0],r=1===n.body.length&&n1(e,{type:"Group"})&&1===e.body[0].body.length?e.body[0]:n;if(t.parent!==r||r.body.length>1)throw Error(r$`Uses "\K" in a way that's unsupported`);let o=rn({behind:!0});o.body[0].body=a(),i(ir(o,t))}else throw Error(`Unexpected directive kind "${s}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error('Unsupported flag "P"');if("word"===e.textSegmentMode)throw Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,e.flags.enable||e.flags.disable||delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;"lookbehind"===n&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:r}=e;if("fail"===r)n(ir(rn({negate:!0}),t));else throw Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if("Quantifier"===e.body.type){let t=rt();t.body[0].body.push(e.body),e.body=ir(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],r=!1,i=!1;for(let t of e.body)if(1===t.body.length&&"search_start"===t.body[0].kind)t.body.pop();else{let e=function e(t){let n=t.find(e=>"search_start"===e.kind||function(e,t){let n={negate:null,...t};return"LookaroundAssertion"===e.type&&(null===n.negate||e.negate===n.negate)&&1===e.body.length&&n1(e.body[0],{type:"Assertion",kind:"search_start"})}(e,{negate:!1})||!function({type:e}){return"Assertion"===e||"Directive"===e||"LookaroundAssertion"===e}(e));if(!n)return null;if("search_start"===n.kind)return n;if("LookaroundAssertion"===n.type)return n.body[0].body[0];if("CapturingGroup"===n.type||"Group"===n.type){let t=[];for(let r of n.body){let n=e(r.body);if(!n)return null;Array.isArray(n)?t.push(...n):t.push(n)}return t}return null}(t.body);e?(r=!0,Array.isArray(e)?n.push(...e):n.push(e)):i=!0}r&&!i&&n.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if("strict"===t&&n&&r)throw Error(r$`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;"string"!=typeof n||r4(n)||(e.ref=n=r3(n,t))}},r1={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:a,multiplexCapturesToLeftByRef:o,openRefs:s,reffedNodesByReferencer:l}){let u=i.get(e);if(u&&s.has(e.number)){let r=it(r6(e.number),t);l.set(r,s.get(e.number)),n(r);return}s.set(e.number,e),o.set(e.number,[]),e.name&&rD(o,e.name,[]);let c=o.get(e.name??e.number);for(let t=0;t<c.length;t++){let n=c[t];if(u===n.node||u&&u===n.origin||e===n.origin){c.splice(t,1);break}}if(o.get(e.number).push({node:e,origin:u}),e.name&&o.get(e.name).push({node:e,origin:u}),e.name){let t=rD(a,e.name,new Map),n=!1;if(u)n=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){n=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:n})}}
138,exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=rU(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){let{isRecursive:i,ref:a}=e;if(i){let n=t;for(;(n=n.parent)&&("CapturingGroup"!==n.type||n.name!==a&&n.number!==a););r.reffedNodesByReferencer.set(e,n);return}let o=r.subroutineRefMap.get(a),s=0===a,l=s?r6(0):function e(t,n,r,i){let a=Array.isArray(t)?[]:{};for(let[o,s]of Object.entries(t))"parent"===o?a.parent=Array.isArray(r)?i:r:s&&"object"==typeof s?a[o]=e(s,n,a,r):("type"===o&&"CapturingGroup"===s&&n.set(a,n.get(t)??t),a[o]=s);return a}(o,r.groupOriginByCopy,null),u=l;if(!s){var c,h;let e=r8(function(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}(o,e=>"Group"===e.type&&!!e.flags)),t=e?rU(r.globalFlags,e):r.globalFlags;c=t,h=r.currentFlags,(c.dotAll!==h.dotAll||c.ignoreCase!==h.ignoreCase)&&(u=rt({flags:function({dotAll:e,ignoreCase:t}){let n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),e&&t||(n.disable={},e||(n.disable.dotAll=!0),t||(n.disable.ignoreCase=!0)),n}(t)})).body[0].body.push(l)}n(ir(u,t),{traverse:!s})}},r2={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}let i=r.reffedNodesByReferencer.get(e).filter(t=>(function(e,t){let n=t;do{if("Regex"===n.type)return!1;if("Alternative"===n.type)continue;if(n===e)return!1;for(let t of r7(n.parent)){if(t===n)break;if(t===e||function e(t,n){for(let r of r7(t)??[])if(r===n||e(r,n))return!0;return!1}(t,e))return!0}}while(n=n.parent);throw Error("Unexpected path")})(t,e));i.length?i.length>1?n(ir(rt({atomic:!0,body:i.reverse().map(e=>n6({body:[n8(e.number)]}
138))}),t)):e.ref=i[0].number:n(ir(rn({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<n;t++){let t=n7();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){e.isRecursive&&0!==e.ref&&(e.ref=t.reffedNodesByReferencer.get(e).number)}};function r5(e){rd(e,{"*"({node:e,parent:t}){e.parent=t}})}function r6(e){let t=ri(e);return t.isRecursive=!0,t}function r3(e,t){if(t.has(e))return t.get(e);let n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function r8(e){let t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return(e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete n.disable[t],n.enable[t]=!0),e.disable?.[t]&&(n.disable[t]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable)?n:null}function r7(e){if(!e)throw Error("Node expected");let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function r4(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function r9(e,t){let n=n5(e,{...t,unicodePropertyMap:rq}).body;return n.length>1||n[0].body.length>1?rt({body:n}):n[0].body[0]}function ie(e,t){return e.negate=t,e}function it(e,t){return e.parent=t,e}function ir(e,t){return r5(e),e.parent=t,e}var ii={"*":{enter({node:e},t){if(ig(e)){let n=t.getCurrentModI();t.pushModI(e.flags?rU({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){ig(e)&&t.popModI()}}
138,Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){ih(rM(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),ip(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){"property"===e.kind&&rJ.has(e.value)&&t.setHasCasedChar()}},ia={Alternative:({body:e},t,n)=>e.map(n).join(""),Assertion({kind:e,negate:t}){if("string_end"===e)return"$";if("string_start"===e)return"^";if("word_boundary"===e)return t?r$`\B`:r$`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if("number"!=typeof e)throw Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&"strict"===t.accuracy&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){let{body:r,name:i,number:a}=e,o={ignoreCase:t.currentFlags.ignoreCase},s=t.originMap.get(e);return s&&(o.hidden=!0,a>s.number&&(o.transferTo=s.number)),t.captureMap.set(a,o),`(${i?`?<${i}>`:""}${r.map(n).join("|")})`},Character({value:e},t){let n=rM(e),r=id(e,{escDigit:"Backreference"===t.lastNode.type,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&ih(n)){let e=rH(n);return t.inCharClass?e.join(""):e.length>1?`[${e.join("")}]`:e[0]}return n},CharacterClass(e,t,n){let{kind:r,negate:i,parent:a}=e,{body:o}=e;if("intersection"===r&&!t.useFlagV)throw Error("Use of character class intersection requires min target ES2024");rB.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(im)&&(o=[n4(45),...o.filter(e=>!im(e))]);let s=()=>`[${i?"^":""}${o.map(n).join("intersection"===r?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||rB.bugNestedClassIgnoresNegation)&&!i){let t=o.filter(e=>"CharacterClass"===e.type&&"union"===e.kind&&e.negate);if(t.length){let r=rt(),i=r.body[0];return r.parent=a,i.parent=r,e.body=o=o.filter(e=>!t.includes(e)),o.length?(e.parent=i,i.body.push(e)):r.body.pop(),t.forEach(e=>{let t=n6({body:[e]});e.parent=t,t.parent=r,r.body.push(t)}),n(r)}}t.inCharClass=!0;let r=s();return t.inCharClass=!1,r}let l=o[0];if("union"===r&&!i&&l&&((!t.useFlagV||!t.verbose)&&"union"===a.kind&&!(rB.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&"intersection"===a.kind&&1===o.length&&"CharacterClassRange"!==l.type))return o.map(n).join("");if(!t.useFlagV&&"CharacterClass"===a.type)throw Error("Uses nested character class in a way that requires min target ES2024");return s()},CharacterClassRange(e,t){let n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},a=id(n,i),o=id(r,i),s=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&(function(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),n=[],r=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?r??=t[e]:null===r?n.push(t[e]):(n.push([r,t[e]]),r=null);return n})(ip(e)).forEach(e=>{s.add(Array.isArray(e)?`${id(e[0],i)}-${id(e[1],i)}`:id(e,i))}),`${a}-${o}${[...s].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if("dot"===e)return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":r$`[^\n]`;if("digit"===e)return t?r$`\D`:r$`\d`;if("property"===e){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&rJ.has(n))throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?r$`\P`:r$`\p`}{${r?`${r}=`:""}${n}}`}if("word"===e)return t?r$`\W`:r$`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags:(e,t)=>(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":""),Group({atomic:e,body:t,flags:n,parent:r},i,a){let o=i.currentFlags;n&&(i.currentFlags=rU(o,n));let s=t.map(a).join("|"),l=i.verbose||1!==t.length||"Quantifier"===r.type||e||i.useFlagMods&&n?`(?${function(e,t,n){if(e)return">";let r="";if(t&&n){let{enable:e,disable:n}=t;r=(e?.ignoreCase?"i":"")+(e?.dotAll?"s":"")+(n?"-":"")+(n?.ignoreCase?"i":"")+(n?.dotAll?"s":"")}return`${r}:`}(e,n,i.useFlagMods)}${s})`:s;return i.currentFlags=o,l},LookaroundAssertion({body:e,kind:t,negate:n},r,i){let a=`${"lookahead"===t?"":"<"}${n?"!":"="}`;return`(?${a}${e.map(i).join("|")})`},Quantifier:(e,t,n)=>n(e.body)+function({kind:e,max:t,min:n}){return(n||1!==t?n||t!==1/0?1===n&&t===1/0?"+":n===t?`{${n}}`:`{${n},${t===1/0?"":t}}`:"*":"?")+({greedy:"",lazy:"?",possessive:"+"})[e]}(e),Subroutine({isRecursive:e,ref:t},n){if(!e)throw Error("Unexpected non-recursive subroutine in transformed AST");let r=n.recursionLimit;return 0===t?`(?R=${r})`:r$`\g<${t}&R=${r}>`}},io=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),is=new Set(["-","\\","]","^","["]),il=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),iu=new Map([[9,r$`\t`],[10,r$`\n`],[11,r$`\v`],[12,r$`\f`],[13,r$`\r`],[8232,r$`\u2028`],[8233,r$`\u2029`],[65279,r$`\uFEFF`]]),ic=/^\p{Cased}$/u;function ih(e){return ic.test(e)}function ip(e,t){let n=!!t?.firstOnly,r=e.min.value,i=e.max.value,a=[];if(r<65&&(65535===i||i>=131071)||65536===r&&i>=131071)return a;for(let e=r;e<=i;e++){let t=rM(e);if(!ih(t))continue;let o=rH(t).filter(e=>{let t=e.codePointAt(0);return t<r||t>i});if(o.length&&(a.push(...o),n))break}return a}function id(e,{escDigit:t,inCharClass:n,useFlagV:r}){var i;if(iu.has(e))return iu.get(e);if(e<32||e>126&&e<160||e>262143||t&&(i=e)>47&&i<58)return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;let a=rM(e);return((n?r?il:is:io).has(a)?"\\":"")+a}function ig({type:e}){return"CapturingGroup"===e||"Group"===e||"LookaroundAssertion"===e}function im({type:e,value:t}){return"Character"===e&&45===t}var iy=class e extends RegExp{#e=new Map;#t=null;#n;#r=null;#i=null;rawOptions={};get source(){return this.#n||"(?:)"}constructor(t,n,r){let i=!!r?.lazyCompile;
138if(t instanceof RegExp){if(r)throw Error("Cannot provide options when copying a regexp");super(t,n),this.#n=t.source,t instanceof e&&(this.#e=t.#e,this.#r=t.#r,this.#i=t.#i,this.rawOptions=t.rawOptions)}else{let e={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?"":t,n),this.#n=t,this.#e=function(e,t){let n=new Map;for(let t of e)n.set(t,{hidden:!0});for(let[e,r]of t)for(let t of r)rD(n,t,{}).transferTo=e;return n}(e.hiddenCaptures,e.transfers),this.#i=e.strategy,this.rawOptions=r??{}}i||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...n}=this.rawOptions;this.#t=new e(this.#n,this.flags,n)}let n=this.global||this.sticky,r=this.lastIndex;if("clip_search"===this.#i&&n&&r){this.lastIndex=0;let e=this.#a(t.slice(r));return e&&(function(e,t,n,r){if(e.index+=t,e.input=n,r){let n=e.indices;for(let e=0;e<n.length;e++){let r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])}let r=n.groups;r&&Object.keys(r).forEach(e=>{let n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])})}}(e,r,t,this.hasIndices),this.lastIndex+=r),e}return this.#a(t)}#a(e){let t;this.#t.lastIndex=this.lastIndex;let n=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!n||!this.#e.size)return n;let r=[...n];n.length=1,this.hasIndices&&(t=[...n.indices],n.indices.length=1);let i=[0];for(let e=1;e<r.length;e++){let{hidden:a,transferTo:o}=this.#e.get(e)??{};if(a?i.push(null):(i.push(n.length),n.push(r[e]),this.hasIndices&&n.indices.push(t[e])),o&&void 0!==r[e]){let a=i[o];if(!a)throw Error(`Invalid capture transfer to "${a}"`);if(n[a]=r[e],this.hasIndices&&(n.indices[a]=t[e]),n.groups){this.#r||(this.#r=function(e){let t,n=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,r=new Map,i=0,a=0;for(;t=n.exec(e);){let{0:e,groups:{capture:n,name:o}}=t;"["===e?i++:i?"]"===e&&i--:n&&(a++,o&&r.set(a,o))}return r}(this.source));let i=this.#r.get(o);i&&(n.groups[i]=r[e],this.hasIndices&&(n.indices.groups[i]=t[e]))}}}return n}};class ib{constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if("string"!=typeof e)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}regexps;findNextMatchSync(e,t,n){let r="string"==typeof e?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>null==e?{start:0xffffffff,end:0xffffffff,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let o=n.exec(r);if(!o)continue;if(o.index===t)return a(e,o,0);i.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}}var iw=(0,o.a)("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-4","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),ik=(0,s.memo)(e=>{let{children:t,result:n,language:r,className:i,...a}=e,u=(0,s.useMemo)(()=>({backgroundColor:n.bg,color:n.fg}),[n.bg,n.fg]);return(0,l.jsx)("pre",{className:(0,o.a)(i,"p-4 text-sm dark:bg-(--shiki-dark-bg)!"),"data-language":r,"data-streamdown":"code-block-body",style:u,...a,children:(0,l.jsx)("code",{className:"[counter-increment:line_0] [counter-reset:line]",children:n.tokens.map((e,t)=>(0,l.jsx)("span",{className:iw,children:e.map((e,t)=>(0,l.jsx)("span",{className:"dark:bg-(--shiki-dark-bg)! dark:text-(--shiki-dark)!",style:{color:e.color,backgroundColor:e.bgColor,...e.htmlStyle},...e.htmlAttrs,children:e.content},t))},t))})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className),i_=e=>{let{className:t,language:n,style:r,...i}=e;return(0,l.jsx)("div",{className:(0,o.a)("my-4 w-full overflow-hidden rounded-xl border border-border",t),"data-language":n,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...r},...i})},iC=e=>{let{language:t,children:n}=e;return(0,l.jsxs)("div",{className:"flex items-center justify-between bg-muted/80 p-3 text-muted-foreground text-xs","data-language":t,"data-streamdown":"code-block-header",children:[(0,l.jsx)("span",{className:"ml-1 font-mono lowercase",children:t}),(0,l.jsx)("div",{className:"flex items-center gap-2",children:n})]})},iS=function(e={}){let t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=e=>(function(e,t){let n=function(e,t){let n=rj(t),r=function(e,t){let n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};r5(e);let r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:rG[n.bestEffortTarget]>
138=rG.ES2024,passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};rd(e,r0,r);let i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},a={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};return rd(e,r1,a),rd(e,r2,{groupsByName:a.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:a.reffedNodesByReferencer}),e._originMap=a.groupOriginByCopy,e._strategy=r.strategy,e}(n5(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:rq}),{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),i=function(e,t){let n=rj(t),r=rG[n.target]>=rG.ES2024,i=rG[n.target]>=rG.ES2025,a=n.rules.recursionLimit;if(!Number.isInteger(a)||a<2||a>20)throw Error("Invalid recursionLimit; use 2-20");let o=null,s=null;if(!i){let t=[e.flags.ignoreCase];rd(e,ii,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)}
138,setHasCasedChar(){t.at(-1)?o=!0:s=!0}})}let l={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!s)},u=e,c={accuracy:n.accuracy,appliedGlobalFlags:l,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:u,originMap:e._originMap,recursionLimit:a,useAppliedIgnoreCase:!!(!i&&o&&s),useFlagMods:i,useFlagV:r,verbose:n.verbose};function h(e){return c.lastNode=u,u=e,(function(e,t){if(null==e)throw Error(t??"Value expected");return e})(ia[e.type],`Unexpected node type "${e.type}"`)(e,c,h)}let p={pattern:e.body.map(h).join("|"),flags:h(e.flags),options:{...e.options}};return r||(delete p.options.force.v,p.options.disable.v=!0,p.options.unicodeSetsPlugin=null),p._captureTransfers=new Map,p._hiddenCaptures=[],c.captureMap.forEach((e,t)=>{e.hidden&&p._hiddenCaptures.push(t),e.transferTo&&rD(p._captureTransfers,e.transferTo,[]).push(t)}),p}(r,n),a=function(e,t){let n,{hiddenCaptures:r,mode:i}={hiddenCaptures:[],mode:"plugin",...t},a=t?.captureTransfers??new Map;if(!RegExp(rx,"su").test(e))return{pattern:e,captureTransfers:a,hiddenCaptures:r};if("plugin"===i&&rw(e,rS`\(\?\(DEFINE\)`,ry.DEFAULT))throw Error("DEFINE groups cannot be used with recursion");let o=[],s=rw(e,rS`\\[1-9]`,ry.DEFAULT),l=new Map,u=[],c=!1,h=0,p=0;for(rN.lastIndex=0;n=rN.exec(e);){let{0:t,groups:{captureName:d,rDepth:f,gRNameOrNum:g,gRDepth:m}}=n;if("["===t)h++;else if(h)"]"===t&&h--;else if(f){if(rI(f),c)throw Error(rP);if(s)throw Error(`${"external"===i?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);let t=e.slice(0,n.index),l=e.slice(rN.lastIndex);if(rw(l,rx,ry.DEFAULT))throw Error(rP);let u=f-1;e=rL(t,l,u,!1,r,o,p),a=rT(a,t,u,o.length,0,p);break}else if(g){rI(m);let h=!1;for(let e of u)if(e.name===g||e.num===+g){if(h=!0,e.hasRecursedWithin)throw Error(rP);break}if(!h)throw Error(rS`Recursive \g cannot be used outside the referenced group "${"external"===i?g:rS`\g<${g}&R=${m}>`}"`);let d=l.get(g),f=function(e,t){let n,r=/\\?./gsu;r.lastIndex=t;let i=e.length,a=0,o=1;for(;n=r.exec(e);){let[e]=n;if("["===e)a++;else if(a)"]"===e&&a--;else if("("===e)o++;else if(")"===e&&!--o){i=n.index;break}}return e.slice(t,i)}(e,d);if(s&&rw(f,rS`${rA}|\((?!\?)`,ry.DEFAULT))throw Error(`${"external"===i?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);let y=e.slice(d,n.index),b=f.slice(y.length+t.length),w=o.length,k=m-1,_=rL(y,b,k,!0,r,o,p);a=rT(a,y,k,o.length-w,w,p);let C=e.slice(0,d),S=e.slice(d+f.length);e=`${C}${_}${S}`,rN.lastIndex+=_.length-t.length-y.length-b.length,u.forEach(e=>e.hasRecursedWithin=!0),c=!0}else if(d)p++,l.set(String(p),rN.lastIndex),l.set(d,rN.lastIndex),u.push({num:p,name:d});else if("("===t[0]){let e="("===t;e&&(p++,l.set(String(p),rN.lastIndex)),u.push(e?{num:p}:{})}else")"===t&&u.pop()}return r.push(...o),{pattern:e,captureTransfers:a,hiddenCaptures:r}}(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:"external"}),o=function(e,t){let n,r=t?.hiddenCaptures??[],i=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:r};let a="(?:(?=(",o=[0],s=[],l=0,u=0,c=NaN;do{let t;n=!1;let h=0,p=0,d=!1;for(rk.lastIndex=Number.isNaN(c)?0:c+a.length;t=rk.exec(e);){let{0:f,index:g,groups:{capturingStart:m,noncapturingStart:y}}=t;if("["===f)h++;else if(h)"]"===f&&h--;else if("(?>"!==f||d){if(d&&y)p++;else if(m)d?p++:(l++,o.push(l+u));else if(")"===f&&d){if(!p){let t=l+ ++u;e=`${e.slice(0,c)}${a}${e.slice(c+3,g)}))<$$${t}>)${e.slice(g+1)}`,n=!0,s.push(t);for(let e=0;e<r.length;e++)r[e]>=t&&r[e]++;if(i.size){let e=new Map;i.forEach((n,r)=>{e.set(r>=t?r+1:r,n.map(e=>e>=t?e+1:e))}),i=e}break}p--}}else c=g,d=!0}}while(n);return r.push(...s),{pattern:e=rb(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:n}})=>{if(t){let n=+t;if(n>o.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${o[n]}`}return`\\${n}`},ry.DEFAULT),captureTransfers:i,hiddenCaptures:r}}(function(e){let t;if(!RegExp(`${r_}\\+`).test(e))return{pattern:e};let n=[],r=null,i=null,a="",o=0;for(rC.lastIndex=0;t=rC.exec(e);){let{0:u,index:c,groups:{qBase:h,qMod:p,invalidQ:d}}=t;if("["===u)o||(i=c),o++;else if("]"===u)o?o--:i=null;else if(!o)if("+"===p&&a&&!a.startsWith("(")){if(d)throw Error(`Invalid quantifier "${u}"`);let t=-1;
138if(/^\{\d+\}$/.test(h)){var s,l;s=e,l=c+h.length,e=s.slice(0,l)+""+s.slice(l+p.length)}else{if(")"===a||"]"===a){let t=")"===a?r:i;if(null===t)throw Error(`Invalid unmatched "${a}"`);e=`${e.slice(0,t)}(?>${e.slice(t,c)}${h})${e.slice(c+u.length)}`}else e=`${e.slice(0,c-a.length)}(?>${a}${h})${e.slice(c+u.length)}`;t+=4}rC.lastIndex+=t}else"("===u[0]?n.push(c):")"===u&&(r=n.length?n.pop():null);a=u}return{pattern:e}}(a.pattern).pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),s={pattern:o.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${i.flags}${i.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw Error("Lazy compilation requires subclass")}else{let e=o.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(o.captureTransfers),i=r._strategy,a=s.pattern.length>=n.lazyCompileLength;(e.length||t.length||i||a)&&(s.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...i&&{strategy:i},...a&&{lazyCompile:a}})}return s}(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t});return n.options?new iy(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)})(e,{target:t.target}),{createScanner:e=>new ib(e,t),createString:e=>({content:e})}}({forgiving:!0}),iv=new Map,ix=new Map,iA=new Map,iE=e=>Object.hasOwn(p,e),iN=(e,t,n,r)=>{let i=iE(t)?t:"text",a=((e,t,n)=>{let r=e.slice(0,100),i=e.length>100?e.slice(-100):"";return"".concat(t,":").concat(n[0],":").concat(n[1],":").concat(e.length,":").concat(r,":").concat(i)})(e,i,n);return ix.has(a)?ix.get(a):(r&&(iA.has(a)||iA.set(a,new Set),iA.get(a).add(r)),((e,t)=>{let n=iE(e)?e:"text",r=((e,t)=>"".concat(e,"-").concat(t[0],"-").concat(t[1]))(n,t);if(iv.has(r))return iv.get(r);let i=nT({themes:t,langs:[n],engine:iS});return iv.set(r,i),i})(i,n).then(t=>{let r=t.codeToTokens(e,{lang:i,themes:{light:n[0],dark:n[1]}});ix.set(a,r);let o=iA.get(a);if(o){for(let e of o)e(r);iA.delete(a)}}).catch(e=>{console.error("Failed to highlight code:",e),iA.delete(a)}),null)},iP=e=>{let{code:t,language:n,className:r,children:i,...a}=e,{shikiTheme:u}=(0,s.useContext)(o.g),c=(0,s.useMemo)(()=>({bg:"transparent",fg:"inherit",tokens:t.split("\n").map(e=>[{content:e,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}
138),[t]),[h,p]=(0,s.useState)(c);return(0,s.useEffect)(()=>{let e=iN(t,n,u);if(e)return void p(e);iN(t,n,u,e=>{p(e)})},[t,n,u]),(0,l.jsx)(o.b.Provider,{value:{code:t},children:(0,l.jsxs)(i_,{language:n,children:[(0,l.jsx)(iC,{language:n,children:i}),(0,l.jsx)(ik,{className:r,language:n,result:h,...a})]})})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.