mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-22 06:50:53 +08:00
1 line
28 KiB
JavaScript
1 line
28 KiB
JavaScript
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3655],{15376:t=>{!function(){var e={675:function(t,e){"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return(r+n)*3/4-n},e.toByteArray=function(t){var e,r,f=u(t),o=f[0],s=f[1],a=new i((o+s)*3/4-s),h=0,c=s>0?o-4:o;for(r=0;r<c;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],a[h++]=e>>16&255,a[h++]=e>>8&255,a[h++]=255&e;return 2===s&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,a[h++]=255&e),1===s&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,a[h++]=e>>8&255,a[h++]=255&e),a},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,f=[],o=0,s=n-i;o<s;o+=16383)f.push(function(t,e,n){for(var i,f=[],o=e;o<n;o+=3)i=(t[o]<<16&0xff0000)+(t[o+1]<<8&65280)+(255&t[o+2]),f.push(r[i>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return f.join("")}(t,o,o+16383>s?s:o+16383));return 1===i?f.push(r[(e=t[n-1])>>2]+r[e<<4&63]+"=="):2===i&&f.push(r[(e=(t[n-2]<<8)+t[n-1])>>10]+r[e>>4&63]+r[e<<2&63]+"="),f.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,s=f.length;o<s;++o)r[o]=f[o],n[f.charCodeAt(o)]=o;function u(t){var e=t.length;if(e%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var n=r===e?0:4-r%4;return[r,n]}n[45]=62,n[95]=63},72:function(t,e,r){"use strict";var n=r(675),i=r(783),f="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function o(t){if(t>0x7fffffff)throw RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,s.prototype),e}function s(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return h(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t){var n=t,i=e;if(("string"!=typeof i||""===i)&&(i="utf8"),!s.isEncoding(i))throw TypeError("Unknown encoding: "+i);var f=0|p(n,i),u=o(f),a=u.write(n,i);return a!==f&&(u=u.slice(0,a)),u}if(ArrayBuffer.isView(t))return c(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(O(t,ArrayBuffer)||t&&O(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(O(t,SharedArrayBuffer)||t&&O(t.buffer,SharedArrayBuffer)))return function(t,e,r){var n;if(e<0||t.byteLength<e)throw RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),s.prototype),n}(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');var h=t.valueOf&&t.valueOf();if(null!=h&&h!==t)return s.from(h,e,r);var y=function(t){if(s.isBuffer(t)){var e=0|l(t.length),r=o(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||function(t){return t!=t}(t.length)?o(0):c(t):"Buffer"===t.type&&Array.isArray(t.data)?c(t.data):void 0}(t);if(y)return y;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return s.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function a(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return a(t),o(t<0?0:0|l(t))}function c(t){for(var e=t.length<0?0:0|l(t.length),r=o(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}e.Buffer=s,e.SlowBuffer=function(t){return+t!=t&&(t=0),s.alloc(+t)},e.INSPECT_MAX_BYTES=50,e.kMaxLength=0x7fffffff,s.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){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(t,e,r){return u(t,e,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(t,e,r){return(a(t),t<=0)?o(t):void 0!==e?"string"==typeof r?o(t).fill(e,r):o(t).fill(e):o(t)},s.allocUnsafe=function(t){return h(t)},s.allocUnsafeSlow=function(t){return h(t)};function l(t){if(t>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function p(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||O(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return T(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return S(t).length;default:if(i)return n?-1:T(t).length;e=(""+e).toLowerCase(),i=!0}}function y(t,e,r){var i,f,o,s=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",f=e;f<r;++f)i+=_[t[f]];return i}(this,e,r);case"utf8":case"utf-8":return v(this,e,r);case"ascii":return function(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}(this,e,r);case"latin1":case"binary":return function(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}(this,e,r);case"base64":return i=this,f=e,o=r,0===f&&o===i.length?n.fromByteArray(i):n.fromByteArray(i.slice(f,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(t,e,r){for(var n=t.slice(e,r),i="",f=0;f<n.length;f+=2)i+=String.fromCharCode(n[f]+256*n[f+1]);return i}(this,e,r);default:if(s)throw TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),s=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function d(t,e,r,n,i){var f;if(0===t.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(f=r*=1)!=f&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length)if(i)return -1;else r=t.length-1;else if(r<0)if(!i)return -1;else r=0;if("string"==typeof e&&(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,i);if("number"==typeof e){if(e&=255,"function"==typeof Uint8Array.prototype.indexOf)if(i)return Uint8Array.prototype.indexOf.call(t,e,r);else return Uint8Array.prototype.lastIndexOf.call(t,e,r);return w(t,[e],r,n,i)}throw TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){var f,o=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;o=2,s/=2,u/=2,r/=2}function a(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var h=-1;for(f=r;f<s;f++)if(a(t,f)===a(e,-1===h?0:f-h)){if(-1===h&&(h=f),f-h+1===u)return h*o}else -1!==h&&(f-=f-h),h=-1}else for(r+u>s&&(r=s-u),f=r;f>=0;f--){for(var c=!0,l=0;l<u;l++)if(a(t,f+l)!==a(e,l)){c=!1;break}if(c)return f}return -1}s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,e){if(O(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),O(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,f=Math.min(r,n);i<f;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:+(n<r)},s.isEncoding=function(t){switch(String(t).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(t,e){if(!Array.isArray(t))throw TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);if(void 0===e)for(r=0,e=0;r<t.length;++r)e+=t[r].length;var r,n=s.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var f=t[r];if(O(f,Uint8Array)&&(f=s.from(f)),!s.isBuffer(f))throw TypeError('"list" argument must be an Array of Buffers');f.copy(n,i),i+=f.length}return n},s.byteLength=p,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},s.prototype.toString=function(){var t=this.length;return 0===t?"":0==arguments.length?v(this,0,t):y.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},f&&(s.prototype[f]=s.prototype.inspect),s.prototype.compare=function(t,e,r,n,i){if(O(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var f=i-n,o=r-e,u=Math.min(f,o),a=this.slice(n,i),h=t.slice(e,r),c=0;c<u;++c)if(a[c]!==h[c]){f=a[c],o=h[c];break}return f<o?-1:+(o<f)},s.prototype.includes=function(t,e,r){return -1!==this.indexOf(t,e,r)},s.prototype.indexOf=function(t,e,r){return d(this,t,e,r,!0)},s.prototype.lastIndexOf=function(t,e,r){return d(this,t,e,r,!1)};function v(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var f,o,s,u,a=t[i],h=null,c=a>239?4:a>223?3:a>191?2:1;if(i+c<=r)switch(c){case 1:a<128&&(h=a);break;case 2:(192&(f=t[i+1]))==128&&(u=(31&a)<<6|63&f)>127&&(h=u);break;case 3:f=t[i+1],o=t[i+2],(192&f)==128&&(192&o)==128&&(u=(15&a)<<12|(63&f)<<6|63&o)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:f=t[i+1],o=t[i+2],s=t[i+3],(192&f)==128&&(192&o)==128&&(192&s)==128&&(u=(15&a)<<18|(63&f)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(h=u)}null===h?(h=65533,c=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=c}var l=n,p=l.length;if(p<=4096)return String.fromCharCode.apply(String,l);for(var y="",g=0;g<p;)y+=String.fromCharCode.apply(String,l.slice(g,g+=4096));return y}function b(t,e,r){if(t%1!=0||t<0)throw RangeError("offset is not uint");if(t+e>r)throw RangeError("Trying to access beyond buffer length")}function m(t,e,r,n,i,f){if(!s.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<f)throw RangeError('"value" argument is out of bounds');if(r+n>t.length)throw RangeError("Index out of range")}function A(t,e,r,n,i,f){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function E(t,e,r,n,f){return e*=1,r>>>=0,f||A(t,e,r,4,34028234663852886e22,-34028234663852886e22),i.write(t,e,r,n,23,4),r+4}function U(t,e,r,n,f){return e*=1,r>>>=0,f||A(t,e,r,8,17976931348623157e292,-17976931348623157e292),i.write(t,e,r,n,52,8),r+8}s.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,f,o,s,u,a,h,c,l=this.length-e;if((void 0===r||r>l)&&(r=l),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var p=!1;;)switch(n){case"hex":return function(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var f=e.length;n>f/2&&(n=f/2);for(var o=0;o<n;++o){var s,u=parseInt(e.substr(2*o,2),16);if((s=u)!=s)break;t[r+o]=u}return o}(this,t,e,r);case"utf8":case"utf-8":return i=e,f=r,L(T(t,this.length-i),this,i,f);case"ascii":return o=e,s=r,L(x(t),this,o,s);case"latin1":case"binary":return function(t,e,r,n){return L(x(e),t,r,n)}(this,t,e,r);case"base64":return u=e,a=r,L(S(t),this,u,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return h=e,c=r,L(function(t,e){for(var r,n,i=[],f=0;f<t.length&&!((e-=2)<0);++f)n=(r=t.charCodeAt(f))>>8,i.push(r%256),i.push(n);return i}(t,this.length-h),this,h,c);default:if(p)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),p=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return Object.setPrototypeOf(n,s.prototype),n},s.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||b(t,e,this.length);for(var n=this[t],i=1,f=0;++f<e&&(i*=256);)n+=this[t+f]*i;return n},s.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||b(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},s.prototype.readUInt8=function(t,e){return t>>>=0,e||b(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||b(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||b(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||b(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+0x1000000*this[t+3]},s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||b(t,4,this.length),0x1000000*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||b(t,e,this.length);for(var n=this[t],i=1,f=0;++f<e&&(i*=256);)n+=this[t+f]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},s.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||b(t,e,this.length);for(var n=e,i=1,f=this[t+--n];n>0&&(i*=256);)f+=this[t+--n]*i;return f>=(i*=128)&&(f-=Math.pow(2,8*e)),f},s.prototype.readInt8=function(t,e){return(t>>>=0,e||b(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||b(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt16BE=function(t,e){t>>>=0,e||b(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||b(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||b(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return t>>>=0,e||b(t,4,this.length),i.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||b(t,4,this.length),i.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||b(t,8,this.length),i.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||b(t,8,this.length),i.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,r,n){if(t*=1,e>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;m(this,t,e,r,i,0)}var f=1,o=0;for(this[e]=255&t;++o<r&&(f*=256);)this[e+o]=t/f&255;return e+r},s.prototype.writeUIntBE=function(t,e,r,n){if(t*=1,e>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;m(this,t,e,r,i,0)}var f=r-1,o=1;for(this[e+f]=255&t;--f>=0&&(o*=256);)this[e+f]=t/o&255;return e+r},s.prototype.writeUInt8=function(t,e,r){return t*=1,e>>>=0,r||m(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,r){return t*=1,e>>>=0,r||m(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUInt16BE=function(t,e,r){return t*=1,e>>>=0,r||m(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUInt32LE=function(t,e,r){return t*=1,e>>>=0,r||m(this,t,e,4,0xffffffff,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUInt32BE=function(t,e,r){return t*=1,e>>>=0,r||m(this,t,e,4,0xffffffff,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeIntLE=function(t,e,r,n){if(t*=1,e>>>=0,!n){var i=Math.pow(2,8*r-1);m(this,t,e,r,i-1,-i)}var f=0,o=1,s=0;for(this[e]=255&t;++f<r&&(o*=256);)t<0&&0===s&&0!==this[e+f-1]&&(s=1),this[e+f]=(t/o|0)-s&255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t*=1,e>>>=0,!n){var i=Math.pow(2,8*r-1);m(this,t,e,r,i-1,-i)}var f=r-1,o=1,s=0;for(this[e+f]=255&t;--f>=0&&(o*=256);)t<0&&0===s&&0!==this[e+f+1]&&(s=1),this[e+f]=(t/o|0)-s&255;return e+r},s.prototype.writeInt8=function(t,e,r){return t*=1,e>>>=0,r||m(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t*=1,e>>>=0,r||m(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,r){return t*=1,e>>>=0,r||m(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,r){return t*=1,e>>>=0,r||m(this,t,e,4,0x7fffffff,-0x80000000),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,r){return t*=1,e>>>=0,r||m(this,t,e,4,0x7fffffff,-0x80000000),t<0&&(t=0xffffffff+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeFloatLE=function(t,e,r){return E(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return E(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return U(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return U(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(!s.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r||0===t.length||0===this.length)return 0;if(e<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,n);else if(this===t&&r<e&&e<n)for(var f=i-1;f>=0;--f)t[f+e]=this[f+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},s.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===t.length){var i,f=t.charCodeAt(0);("utf8"===n&&f<128||"latin1"===n)&&(t=f)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw RangeError("Out of range index");if(r<=e)return this;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var o=s.isBuffer(t)?t:s.from(t,n),u=o.length;if(0===u)throw TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%u]}return this};var B=/[^+/0-9A-Za-z-_]/g;function T(t,e){e=e||1/0;for(var r,n=t.length,i=null,f=[],o=0;o<n;++o){if((r=t.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319||o+1===n){(e-=3)>-1&&f.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&f.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&f.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;f.push(r)}else if(r<2048){if((e-=2)<0)break;f.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;f.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;f.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return f}function x(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function S(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(B,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function L(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length)&&!(i>=t.length);++i)e[i+r]=t[i];return i}function O(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}var _=function(){for(var t="0123456789abcdef",e=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}()},783:function(t,e){e.read=function(t,e,r,n,i){var f,o,s=8*i-n-1,u=(1<<s)-1,a=u>>1,h=-7,c=r?i-1:0,l=r?-1:1,p=t[e+c];for(c+=l,f=p&(1<<-h)-1,p>>=-h,h+=s;h>0;f=256*f+t[e+c],c+=l,h-=8);for(o=f&(1<<-h)-1,f>>=-h,h+=n;h>0;o=256*o+t[e+c],c+=l,h-=8);if(0===f)f=1-a;else{if(f===u)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),f-=a}return(p?-1:1)*o*Math.pow(2,f-n)},e.write=function(t,e,r,n,i,f){var o,s,u,a=8*f-i-1,h=(1<<a)-1,c=h>>1,l=5960464477539062e-23*(23===i),p=n?0:f-1,y=n?1:-1,g=+(e<0||0===e&&1/e<0);for(isNaN(e=Math.abs(e))||e===1/0?(s=+!!isNaN(e),o=h):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),o+c>=1?e+=l/u:e+=l*Math.pow(2,1-c),e*u>=2&&(o++,u/=2),o+c>=h?(s=0,o=h):o+c>=1?(s=(e*u-1)*Math.pow(2,i),o+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&s,p+=y,s/=256,i-=8);for(o=o<<i|s,a+=i;a>0;t[r+p]=255&o,p+=y,o/=256,a-=8);t[r+p-y]|=128*g}}},r={};function n(t){var i=r[t];if(void 0!==i)return i.exports;var f=r[t]={exports:{}},o=!0;try{e[t](f,f.exports,n),o=!1}finally{o&&delete r[t]}return f.exports}n.ab="//",t.exports=n(72)}()},83655:(t,e,r)=>{"use strict";let n,i;r.d(e,{Mk:()=>m,X:()=>b,ti:()=>d,xz:()=>v});var f=r(15376).Buffer;class o extends Error{constructor(t){super(t),this.name="ShikiError"}}function s(){return"undefined"!=typeof performance?performance.now():Date.now()}let u=(t,e)=>t+(e-t%e)%e;async function a(t){let e,r,n={};function i(t){r=t,n.HEAPU8=new Uint8Array(t),n.HEAPU32=new Uint32Array(t)}let f="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function o(t,e){return t?function(t,e,r=1024){let n=e+r,i=e;for(;t[i]&&!(i>=n);)++i;if(i-e>16&&t.buffer&&f)return f.decode(t.subarray(e,i));let o="";for(;e<i;){let r=t[e++];if(!(128&r)){o+=String.fromCharCode(r);continue}let n=63&t[e++];if((224&r)==192){o+=String.fromCharCode((31&r)<<6|n);continue}let i=63&t[e++];if((r=(240&r)==224?(15&r)<<12|n<<6|i:(7&r)<<18|n<<12|i<<6|63&t[e++])<65536)o+=String.fromCharCode(r);else{let t=r-65536;o+=String.fromCharCode(55296|t>>10,56320|1023&t)}}return o}(n.HEAPU8,t,e):""}let a={emscripten_get_now:s,emscripten_memcpy_big:function(t,e,r){n.HEAPU8.copyWithin(t,e,e+r)},emscripten_resize_heap:function(t){let f=n.HEAPU8.length;if((t>>>=0)>0x80000000)return!1;for(let n=1;n<=4;n*=2){let o=f*(1+.2/n);if(o=Math.min(o,t+0x6000000),function(t){try{return e.grow(t-r.byteLength+65535>>>16),i(e.buffer),1}catch{}}(Math.min(0x80000000,u(Math.max(t,o),65536))))return!0}return!1},fd_write:()=>0};async function h(){let r=await t({env:a,wasi_snapshot_preview1:a});i((e=r.memory).buffer),Object.assign(n,r),n.UTF8ToString=o}return await h(),n}var h=Object.defineProperty,c=(t,e,r)=>((t,e,r)=>e in t?h(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r);let l=null;class p{constructor(t){c(this,"utf16Length"),c(this,"utf8Length"),c(this,"utf16Value"),c(this,"utf8Value"),c(this,"utf16OffsetToUtf8"),c(this,"utf8OffsetToUtf16");let e=t.length,r=p._utf8ByteLength(t),n=r!==e,i=n?new Uint32Array(e+1):null;n&&(i[e]=r);let f=n?new Uint32Array(r+1):null;n&&(f[r]=e);let o=new Uint8Array(r),s=0;for(let r=0;r<e;r++){let u=t.charCodeAt(r),a=u,h=!1;if(u>=55296&&u<=56319&&r+1<e){let e=t.charCodeAt(r+1);e>=56320&&e<=57343&&(a=(u-55296<<10)+65536|e-56320,h=!0)}n&&(i[r]=s,h&&(i[r+1]=s),a<=127?f[s+0]=r:a<=2047?(f[s+0]=r,f[s+1]=r):a<=65535?(f[s+0]=r,f[s+1]=r,f[s+2]=r):(f[s+0]=r,f[s+1]=r,f[s+2]=r,f[s+3]=r)),a<=127?o[s++]=a:(a<=2047?o[s++]=192|(1984&a)>>>6:(a<=65535?o[s++]=224|(61440&a)>>>12:(o[s++]=240|(1835008&a)>>>18,o[s++]=128|(258048&a)>>>12),o[s++]=128|(4032&a)>>>6),o[s++]=128|(63&a)>>>0),h&&r++}this.utf16Length=e,this.utf8Length=r,this.utf16Value=t,this.utf8Value=o,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=f}static _utf8ByteLength(t){let e=0;for(let r=0,n=t.length;r<n;r++){let i=t.charCodeAt(r),f=i,o=!1;if(i>=55296&&i<=56319&&r+1<n){let e=t.charCodeAt(r+1);e>=56320&&e<=57343&&(f=(i-55296<<10)+65536|e-56320,o=!0)}f<=127?e+=1:f<=2047?e+=2:f<=65535?e+=3:e+=4,o&&r++}return e}createString(t){let e=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,e),e}}let y=class t{constructor(e){if(c(this,"id",++t.LAST_ID),c(this,"_onigBinding"),c(this,"content"),c(this,"utf16Length"),c(this,"utf8Length"),c(this,"utf16OffsetToUtf8"),c(this,"utf8OffsetToUtf16"),c(this,"ptr"),!l)throw new o("Must invoke loadWasm first.");this._onigBinding=l,this.content=e;let r=new p(e);this.utf16Length=r.utf16Length,this.utf8Length=r.utf8Length,this.utf16OffsetToUtf8=r.utf16OffsetToUtf8,this.utf8OffsetToUtf16=r.utf8OffsetToUtf16,this.utf8Length<1e4&&!t._sharedPtrInUse?(t._sharedPtr||(t._sharedPtr=l.omalloc(1e4)),t._sharedPtrInUse=!0,l.HEAPU8.set(r.utf8Value,t._sharedPtr),this.ptr=t._sharedPtr):this.ptr=r.createString(l)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===t._sharedPtr?t._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};c(y,"LAST_ID",0),c(y,"_sharedPtr",0),c(y,"_sharedPtrInUse",!1);class g{constructor(t){if(c(this,"_onigBinding"),c(this,"_ptr"),!l)throw new o("Must invoke loadWasm first.");let e=[],r=[];for(let n=0,i=t.length;n<i;n++){let i=new p(t[n]);e[n]=i.createString(l),r[n]=i.utf8Length}let n=l.omalloc(4*t.length);l.HEAPU32.set(e,n/4);let i=l.omalloc(4*t.length);l.HEAPU32.set(r,i/4);let f=l.createOnigScanner(n,i,t.length);for(let r=0,n=t.length;r<n;r++)l.ofree(e[r]);l.ofree(i),l.ofree(n),0===f&&function(t){throw new o(t.UTF8ToString(t.getLastOnigError()))}(l),this._onigBinding=l,this._ptr=f}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,e,r){let n=0;if("number"==typeof r&&(n=r),"string"==typeof t){t=new y(t);let r=this._findNextMatchSync(t,e,!1,n);return t.dispose(),r}return this._findNextMatchSync(t,e,!1,n)}_findNextMatchSync(t,e,r,n){let i=this._onigBinding,f=i.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(e),n);if(0===f)return null;let o=i.HEAPU32,s=f/4,u=o[s++],a=o[s++],h=[];for(let e=0;e<a;e++){let r=t.convertUtf8OffsetToUtf16(o[s++]),n=t.convertUtf8OffsetToUtf16(o[s++]);h[e]={start:r,end:n,length:n-r}}return{index:u,captureIndices:h}}}function d(t){return n||(n=async function(){l=await a(async e=>{let r=t;if("function"==typeof(r=await r)&&(r=await r(e)),"function"==typeof r&&(r=await r(e)),"function"==typeof r.instantiator)r=await r.instantiator(e);else if("function"==typeof r.default)r=await r.default(e);else{var n,i,o,s;if(void 0!==r.data&&(r=r.data),n=r,"undefined"!=typeof Response&&n instanceof Response){r="function"==typeof WebAssembly.instantiateStreaming?await (o=r,t=>WebAssembly.instantiateStreaming(o,t))(e):await (s=r,async t=>{let e=await s.arrayBuffer();return WebAssembly.instantiate(e,t)})(e)}else(i=r,"undefined"!=typeof ArrayBuffer&&(i instanceof ArrayBuffer||ArrayBuffer.isView(i))||void 0!==f&&f.isBuffer?.(i)||"undefined"!=typeof SharedArrayBuffer&&i instanceof SharedArrayBuffer||"undefined"!=typeof Uint32Array&&i instanceof Uint32Array||r instanceof WebAssembly.Module)?r=await w(r)(e):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await w(r.default)(e))}return"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}())}function w(t){return e=>WebAssembly.instantiate(t,e)}function v(t){i=t}function b(){return i}async function m(t){return t&&await d(t),{createScanner:t=>new g(t.map(t=>"string"==typeof t?t:t.source)),createString:t=>new y(t)}}}}]); |