From 4a4c0e7ef6cdf24ed21464a58f7b876133e68110 Mon Sep 17 00:00:00 2001 From: Gabi Dobocan Date: Tue, 27 Sep 2022 12:10:26 +0300 Subject: [PATCH] fix: support nested node_modules --- dist/index.js | 2 +- src/module.js | 2 +- tests/unit/module.test.js | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 915e36e..159c84f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,2 +1,2 @@ /*! For license information please see index.js.LICENSE.txt */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Sandworm=t():e.Sandworm=t()}(this,(()=>(()=>{var e={244:(e,t,n)=>{function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";t.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=u(e),a=i[0],s=i[1],c=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),l=0,f=s>0?a-4:a;for(n=0;n>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===s&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[l++]=255&t),1===s&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,u=r-o;su?u:s+a));return 1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=i.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,r){for(var o,i,a=[],s=t;s>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},764:(e,t,n)=>{"use strict";const r=n(742),o=n(645),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return c(e,t,n)}function c(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|d(e,t);let r=s(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(X(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(X(e,ArrayBuffer)||e&&X(e.buffer,ArrayBuffer))return p(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(X(e,SharedArrayBuffer)||e&&X(e.buffer,SharedArrayBuffer)))return p(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return u.from(r,t,n);const o=function(e){if(u.isBuffer(e)){const t=0|m(e.length),n=s(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?s(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return l(e),s(e<0?0:0|m(e))}function h(e){const t=e.length<0?0:0|m(e.length),n=s(t);for(let r=0;r=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||X(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(e).length;default:if(o)return r?-1:H(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,n);case"utf8":case"utf-8":return O(this,t,n);case"ascii":return x(this,t,n);case"latin1":case"binary":return M(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),J(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,o){let i,a=1,s=e.length,u=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;a=2,s/=2,u/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let r=-1;for(i=n;is&&(n=s-u),i=n;i>=0;i--){let n=!0;for(let r=0;ro&&(r=o):r=o;const i=t.length;let a;for(r>i/2&&(r=i/2),a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function O(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o239?4:t>223?3:t>191?2:1;if(o+a<=n){let n,r,s,u;switch(a){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(u=(31&t)<<6|63&n,u>127&&(i=u));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(u=(15&t)<<12|(63&n)<<6|63&r,u>2047&&(u<55296||u>57343)&&(i=u));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(u=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,u>65535&&u<1114112&&(i=u))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return function(e){const t=e.length;if(t<=L)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rr.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(r,o)):Uint8Array.prototype.set.call(r,t,o);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,o)}o+=t.length}return r},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},i&&(u.prototype[i]=u.prototype.inspect),u.prototype.compare=function(e,t,n,r,o){if(X(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new 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===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;let i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0);const s=Math.min(i,a),c=this.slice(r,o),l=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return S(this,e,t,n);case"ascii":case"latin1":case"binary":return _(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const L=4096;function x(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;or)&&(n=r);let o="";for(let r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function B(e,t,n,r,o,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function k(e,t,n,r,o){$(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function j(e,t,n,r,o){$(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n+7]=i,i>>=8,e[n+6]=i,i>>=8,e[n+5]=i,i>>=8,e[n+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function U(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function T(e,t,n,r,i){return t=+t,n>>>=0,i||U(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function N(e,t,n,r,i){return t=+t,n>>>=0,i||U(e,0,n,8),o.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],o=1,i=0;for(;++i>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e+--t],o=1;for(;t>0&&(o*=256);)r+=this[e+--t]*o;return r},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=Q((function(e){q(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(o)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],o=1,i=0;for(;++i=o&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=t,o=1,i=this[e+--r];for(;r>0&&(o*=256);)i+=this[e+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=Q((function(e){q(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||P(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||B(this,e,t,n,Math.pow(2,8*n)-1,0);let o=1,i=0;for(this[t]=255&e;++i>>=0,n>>>=0,r||B(this,e,t,n,Math.pow(2,8*n)-1,0);let o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=Q((function(e,t=0){return k(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=Q((function(e,t=0){return j(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);B(this,e,t,n,r-1,-r)}let o=0,i=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);B(this,e,t,n,r-1,-r)}let o=n-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=Q((function(e,t=0){return k(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=Q((function(e,t=0){return j(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,n){return T(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return T(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return N(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(!u.isBuffer(e))throw new 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=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function $(e,t,n,r,o,i){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and < 2 ** ${8*(i+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new F.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,n){q(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||W(t,e.length-(n+1))}(r,o,i)}function q(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function W(e,t,n){if(Math.floor(e)!==e)throw q(e,n),new F.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}D("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),D("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),D("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>2**32?o=G(String(n)):"bigint"==typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=G(o)),o+="n"),r+=` It must be ${t}. Received ${o}`,r}),RangeError);const z=/[^+/0-9A-Za-z-_]/g;function H(e,t){let n;t=t||1/0;const r=e.length;let o=null;const i=[];for(let a=0;a55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function Y(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(z,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,n,r){let o;for(o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const K=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function Q(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},645:(e,t)=>{t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,u=(1<>1,l=-7,f=n?o-1:0,h=n?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=c}return(p?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,u,c=8*i-o-1,l=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,m=r?1:-1,d=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&s,p+=m,s/=256,o-=8);for(a=a<0;e[n+p]=255&a,p+=m,a/=256,c-=8);e[n+p-m]|=128*d}},86:(e,t,n)=>{var r=n(305),o=Object.prototype.hasOwnProperty,i="undefined"!=typeof Map;function a(){this._array=[],this._set=i?new Map:Object.create(null)}a.fromArray=function(e,t){for(var n=new a,r=0,o=e.length;r=0)return t}else{var n=r.toSetString(e);if(o.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')},a.prototype.at=function(e){if(e>=0&&e{var r=n(167);t.encode=function(e){var t,n="",o=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&o,(o>>>=5)>0&&(t|=32),n+=r.encode(t)}while(o>0);return n},t.decode=function(e,t,n){var o,i,a,s,u=e.length,c=0,l=0;do{if(t>=u)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=r.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));o=!!(32&i),c+=(i&=31)<>1,1==(1&a)?-s:s),n.rest=t}},167:(e,t)=>{var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&e{function n(e,r,o,i,a,s){var u=Math.floor((r-e)/2)+e,c=a(o,i[u],!0);return 0===c?u:c>0?r-u>1?n(u,r,o,i,a,s):s==t.LEAST_UPPER_BOUND?r1?n(e,u,o,i,a,s):s==t.LEAST_UPPER_BOUND?u:e<0?-1:e}t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(e,r,o,i){if(0===r.length)return-1;var a=n(-1,r.length,e,r,o,i||t.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===o(r[a],r[a-1],!0);)--a;return a}},688:(e,t,n)=>{var r=n(305);function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}o.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},o.prototype.add=function(e){var t,n,o,i,a,s;n=e,o=(t=this._last).generatedLine,i=n.generatedLine,a=t.generatedColumn,s=n.generatedColumn,i>o||i==o&&s>=a||r.compareByGeneratedPositionsInflated(t,n)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(r.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},t.H=o},523:(e,t)=>{function n(e){function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}return function e(n,r,o,i){if(o{var r=n(305),o=n(183),i=n(86).I,a=n(520),s=n(523).U;function u(e,t){var n=e;return"string"==typeof e&&(n=r.parseSourceMapInput(e)),null!=n.sections?new p(n,t):new c(n,t)}function c(e,t){var n=e;"string"==typeof e&&(n=r.parseSourceMapInput(e));var o=r.getArg(n,"version"),a=r.getArg(n,"sources"),s=r.getArg(n,"names",[]),u=r.getArg(n,"sourceRoot",null),c=r.getArg(n,"sourcesContent",null),l=r.getArg(n,"mappings"),f=r.getArg(n,"file",null);if(o!=this._version)throw new Error("Unsupported version: "+o);u&&(u=r.normalize(u)),a=a.map(String).map(r.normalize).map((function(e){return u&&r.isAbsolute(u)&&r.isAbsolute(e)?r.relative(u,e):e})),this._names=i.fromArray(s.map(String),!0),this._sources=i.fromArray(a,!0),this._absoluteSources=this._sources.toArray().map((function(e){return r.computeSourceURL(u,e,t)})),this.sourceRoot=u,this.sourcesContent=c,this._mappings=l,this._sourceMapURL=t,this.file=f}function l(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}u.fromSourceMap=function(e,t){return c.fromSourceMap(e,t)},u.prototype._version=3,u.prototype.__generatedMappings=null,Object.defineProperty(u.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),u.prototype.__originalMappings=null,Object.defineProperty(u.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),u.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return";"===n||","===n},u.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},u.GENERATED_ORDER=1,u.ORIGINAL_ORDER=2,u.GREATEST_LOWER_BOUND=1,u.LEAST_UPPER_BOUND=2,u.prototype.eachMapping=function(e,t,n){var o,i=t||null;switch(n||u.GENERATED_ORDER){case u.GENERATED_ORDER:o=this._generatedMappings;break;case u.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var a=this.sourceRoot,s=e.bind(i),c=this._names,l=this._sources,f=this._sourceMapURL,h=0,p=o.length;h=0){var s=this._originalMappings[a];if(void 0===e.column)for(var u=s.originalLine;s&&s.originalLine===u;)i.push({line:r.getArg(s,"generatedLine",null),column:r.getArg(s,"generatedColumn",null),lastColumn:r.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++a];else for(var c=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==c;)i.push({line:r.getArg(s,"generatedLine",null),column:r.getArg(s,"generatedColumn",null),lastColumn:r.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++a]}return i},t.SourceMapConsumer=u,c.prototype=Object.create(u.prototype),c.prototype.consumer=u,c.prototype._findSourceIndex=function(e){var t,n=e;if(null!=this.sourceRoot&&(n=r.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);for(t=0;t0&&(e[t]=r,e[t+1]=n)}else if(r<20)for(let r=t;rt;n--){let t=e[n-1],r=e[n];if(f(t,r)<=0)break;e[n-1]=r,e[n]=t}else s(e,f,t)}function p(e,t){var n=e;"string"==typeof e&&(n=r.parseSourceMapInput(e));var o=r.getArg(n,"version"),a=r.getArg(n,"sections");if(o!=this._version)throw new Error("Unsupported version: "+o);this._sources=new i,this._names=new i;var s={line:-1,column:0};this._sections=a.map((function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var n=r.getArg(e,"offset"),o=r.getArg(n,"line"),i=r.getArg(n,"column");if(o1&&(n.source=d+o[1],d+=o[1],n.originalLine=p+o[2],p=n.originalLine,n.originalLine+=1,n.originalColumn=m+o[3],m=n.originalColumn,o.length>4&&(n.name=g+o[4],g+=o[4])),S.push(n),"number"==typeof n.originalLine){let e=n.source;for(;w.length<=e;)w.push(null);null===w[e]&&(w[e]=[]),w[e].push(n)}}h(S,_),this.__generatedMappings=S;for(var E=0;E=0){var o=this._generatedMappings[n];if(o.generatedLine===t.generatedLine){var i=r.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),i=r.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var a=r.getArg(o,"name",null);return null!==a&&(a=this._names.at(a)),{source:i,line:r.getArg(o,"originalLine",null),column:r.getArg(o,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},c.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e}))},c.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var o,i=e;if(null!=this.sourceRoot&&(i=r.relative(this.sourceRoot,i)),null!=this.sourceRoot&&(o=r.urlParse(this.sourceRoot))){var a=i.replace(/^file:\/\//,"");if("file"==o.scheme&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!o.path||"/"==o.path)&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(t)return null;throw new Error('"'+i+'" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(e){var t=r.getArg(e,"source");if((t=this._findSourceIndex(t))<0)return{line:null,column:null,lastColumn:null};var n={source:t,originalLine:r.getArg(e,"line"),originalColumn:r.getArg(e,"column")},o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions,r.getArg(e,"bias",u.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===n.source)return{line:r.getArg(i,"generatedLine",null),column:r.getArg(i,"generatedColumn",null),lastColumn:r.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},p.prototype=Object.create(u.prototype),p.prototype.constructor=u,p.prototype._version=3,Object.defineProperty(p.prototype,"sources",{get:function(){for(var e=[],t=0;t{var r=n(520),o=n(305),i=n(86).I,a=n(688).H;function s(e){e||(e={}),this._file=o.getArg(e,"file",null),this._sourceRoot=o.getArg(e,"sourceRoot",null),this._skipValidation=o.getArg(e,"skipValidation",!1),this._sources=new i,this._names=new i,this._mappings=new a,this._sourcesContents=null}s.prototype._version=3,s.fromSourceMap=function(e){var t=e.sourceRoot,n=new s({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=o.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)})),e.sources.forEach((function(r){var i=r;null!==t&&(i=o.relative(t,r)),n._sources.has(i)||n._sources.add(i);var a=e.sourceContentFor(r);null!=a&&n.setSourceContent(r,a)})),n},s.prototype.addMapping=function(e){var t=o.getArg(e,"generated"),n=o.getArg(e,"original",null),r=o.getArg(e,"source",null),i=o.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,i),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:i})},s.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=o.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[o.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[o.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},s.prototype.applySourceMap=function(e,t,n){var r=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=e.file}var a=this._sourceRoot;null!=a&&(r=o.relative(a,r));var s=new i,u=new i;this._mappings.unsortedForEach((function(t){if(t.source===r&&null!=t.originalLine){var i=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=i.source&&(t.source=i.source,null!=n&&(t.source=o.join(n,t.source)),null!=a&&(t.source=o.relative(a,t.source)),t.originalLine=i.line,t.originalColumn=i.column,null!=i.name&&(t.name=i.name))}var c=t.source;null==c||s.has(c)||s.add(c);var l=t.name;null==l||u.has(l)||u.add(l)}),this),this._sources=s,this._names=u,e.sources.forEach((function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=o.join(n,t)),null!=a&&(t=o.relative(a,t)),this.setSourceContent(t,r))}),this)},s.prototype._validateMapping=function(e,t,n,r){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},s.prototype._serializeMappings=function(){for(var e,t,n,i,a=0,s=1,u=0,c=0,l=0,f=0,h="",p=this._mappings.toArray(),m=0,d=p.length;m0){if(!o.compareByGeneratedPositionsInflated(t,p[m-1]))continue;e+=","}e+=r.encode(t.generatedColumn-a),a=t.generatedColumn,null!=t.source&&(i=this._sources.indexOf(t.source),e+=r.encode(i-f),f=i,e+=r.encode(t.originalLine-1-c),c=t.originalLine-1,e+=r.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=r.encode(n-l),l=n)),h+=e}return h},s.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=o.relative(t,e));var n=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)},s.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},s.prototype.toString=function(){return JSON.stringify(this.toJSON())},t.h=s},231:(e,t,n)=>{var r=n(508).h,o=n(305),i=/(\r?\n)/,a="$$$isSourceNode$$$";function s(e,t,n,r,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==o?null:o,this[a]=!0,null!=r&&this.add(r)}s.fromStringWithSourceMap=function(e,t,n){var r=new s,a=e.split(i),u=0,c=function(){return e()+(e()||"");function e(){return u=0;t--)this.prepend(e[t]);else{if(!e[a]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},s.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n0){for(t=[],n=0;n{t.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function o(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function i(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}t.urlParse=o,t.urlGenerate=i;var a,s,u=(a=function(e){var n=e,r=o(e);if(r){if(!r.path)return e;n=r.path}for(var a=t.isAbsolute(n),s=[],u=0,c=0;;){if(u=c,-1===(c=n.indexOf("/",u))){s.push(n.slice(u));break}for(s.push(n.slice(u,c));c=0;c--)"."===(l=s[c])?s.splice(c,1):".."===l?f++:f>0&&(""===l?(s.splice(c+1,f),f=0):(s.splice(c,2),f--));return""===(n=s.join("/"))&&(n=a?"/":"."),r?(r.path=n,i(r)):n},s=[],function(e){for(var t=0;t32&&s.pop(),r});function c(e,t){""===e&&(e="."),""===t&&(t=".");var n=o(t),a=o(e);if(a&&(e=a.path||"/"),n&&!n.scheme)return a&&(n.scheme=a.scheme),i(n);if(n||t.match(r))return t;if(a&&!a.host&&!a.path)return a.host=t,i(a);var s="/"===t.charAt(0)?t:u(e.replace(/\/+$/,"")+"/"+t);return a?(a.path=s,i(a)):s}t.normalize=u,t.join=c,t.isAbsolute=function(e){return"/"===e.charAt(0)||n.test(e)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var l=!("__proto__"in Object.create(null));function f(e){return e}function h(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function p(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}t.toSetString=l?f:function(e){return h(e)?"$"+e:e},t.fromSetString=l?f:function(e){return h(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,n){var r=p(e.source,t.source);return 0!==r||0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)||n||0!=(r=e.generatedColumn-t.generatedColumn)||0!=(r=e.generatedLine-t.generatedLine)?r:p(e.name,t.name)},t.compareByOriginalPositionsNoSource=function(e,t,n){var r;return 0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)||n||0!=(r=e.generatedColumn-t.generatedColumn)||0!=(r=e.generatedLine-t.generatedLine)?r:p(e.name,t.name)},t.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r||0!=(r=e.generatedColumn-t.generatedColumn)||n||0!==(r=p(e.source,t.source))||0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)?r:p(e.name,t.name)},t.compareByGeneratedPositionsDeflatedNoLine=function(e,t,n){var r=e.generatedColumn-t.generatedColumn;return 0!==r||n||0!==(r=p(e.source,t.source))||0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)?r:p(e.name,t.name)},t.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n||0!=(n=e.generatedColumn-t.generatedColumn)||0!==(n=p(e.source,t.source))||0!=(n=e.originalLine-t.originalLine)||0!=(n=e.originalColumn-t.originalColumn)?n:p(e.name,t.name)},t.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},t.computeSourceURL=function(e,t,n){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),n){var r=o(n);if(!r)throw new Error("sourceMapURL could not be parsed");if(r.path){var a=r.path.lastIndexOf("/");a>=0&&(r.path=r.path.substring(0,a+1))}t=c(i(r),t)}return u(t)}},298:(e,t,n)=>{n(508).h,t.SourceMapConsumer=n(529).SourceMapConsumer,n(231)}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};return(()=>{"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nQe});var s,u={},c=function(e){var t,n,r=(e||"").trim(),o=u[r];if(o)return o;var a,s,c,l,f=[];if((c=r.match(/at (.+) \(eval at .+ \((.+)\), .+\)/))||(c=r.match(/at (.+) \((.+)\)/))||"at "!==r.slice(0,3)&&(c=r.match(/(.*)@(.*)/)))a=i(c,2)[1],f=(c[2].match(/(.*):(\d+):(\d+)/)||c[2].match(/(.*):(\d+)/)||[]).slice(1);else{if(!(c=r.match(/^(at\s+)*(.+):(\d+):(\d+)/)))return void(u[r]=void 0);f=c.slice(2)}if(null!==(t=a)&&void 0!==t&&null!==(n=t.includes)&&void 0!==n&&n.call(t," [as ")){var h=i(a.slice(0,-1).split(" [as "),2);a=h[0],s=h[1]}return u[r]={beforeParse:r,file:(l=f[0]||"",l.replace(/\\/g,"/")),line:parseInt(f[1]||"",10)||void 0,column:parseInt(f[2]||"",10)||void 0,name:a,alias:s},u[r]},l=function(){var e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var n=((new Error).stack||"").split("\n");return Error.stackTraceLimit=e,n.map(c).filter((function(e){return void 0!==e})).map((function(e,n,r){var o=r[n+1],i=r[n-1];return t(t({},e),{},{caller:o?o.alias||o.name:void 0,called:i?i.alias||i.name:void 0})}))},f=n(298),h=n(764).Buffer;function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:O(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}function g(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function y(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){g(i,r,o,a,s,"next",e)}function s(e){g(i,r,o,a,s,"throw",e)}a(void 0)}))}}try{s=require("fs")}catch(e){}var v=/^data:application\/json[^,]+base64,/,b=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,w=console,S=function(){var e=y(d().mark((function e(t){var n;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(t);case 3:return n=e.sent,e.abrupt("return",n.text());case 7:return e.prev=7,e.t0=e.catch(0),w.error(e.t0),e.abrupt("return",null);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),_=function(){var e=y(d().mark((function e(t){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s){e.next=2;break}return e.abrupt("return",null);case 2:return e.abrupt("return",new Promise((function(e){s.readFile(t,{encoding:"utf8"},(function(t,n){t&&(w.error(t),e(null)),e(n)}))})));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),E=function(e){try{var t=new URL(e);return S(t)}catch(t){return _(e)}},A=function(){var e=y(d().mark((function e(t){var n,r,o,i,a,s,u,c,l;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,w.debug("loading source from ".concat(t)),e.next=4,E(t);case 4:if(r=e.sent,null==(o=null==r||null===(n=r.match)||void 0===n?void 0:n.call(r,b))||!o[1]){e.next=28;break}if(w.debug("found sourcemap reference"),i=o[1],!v.test(i)){e.next=15;break}w.debug("loading inline sourcemap"),s=i.slice(i.indexOf(",")+1),a="function"==typeof atob?atob(s):h.from(s,"base64").toString(),e.next=22;break;case 15:return(u=t.split("/")).splice(-1,1),c=[].concat((p=u,function(e){if(Array.isArray(e))return m(e)}(p)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(p)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(p)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[i]).join("/"),w.debug("loading sourcemap from ".concat(c)),e.next=21,E(c);case 21:a=e.sent;case 22:if(!a){e.next=28;break}return e.next=25,new f.SourceMapConsumer(a);case 25:return l=e.sent,w.debug("loaded sourcemap"),e.abrupt("return",l);case 28:return w.debug("sourcemap not available"),e.abrupt("return",null);case 32:return e.prev=32,e.t0=e.catch(0),w.error(e.t0),e.abrupt("return",null);case 36:case"end":return e.stop()}var p}),e,null,[[0,32]])})));return function(t){return e.apply(this,arguments)}}(),C=function(){var e=y(d().mark((function e(t){var n,r;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,w.debug("loading sourcemap from ".concat(t)),e.next=4,E(t);case 4:if(!(n=e.sent)){e.next=10;break}return e.next=8,new f.SourceMapConsumer(n);case 8:return r=e.sent,e.abrupt("return",r);case 10:return w.debug("sourcemap not available"),e.abrupt("return",null);case 14:return e.prev=14,e.t0=e.catch(0),w.error(e.t0),e.abrupt("return",null);case 18:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(t){return e.apply(this,arguments)}}();function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}var L="undefined"!=typeof window||"undefined"!=typeof self,x="object"===("undefined"==typeof process?"undefined":O(process))&&"object"===O(process.versions)&&!!process.versions.node,M="NODE",R="WEB",I="UNKNOWN";const P=function(){try{return L?R:x?M:I}catch(e){return I}},B=JSON.parse('[{"name":"AudioContext","globalConstructor":true},{"name":"BackgroundFetchManager","methods":[{"name":"fetch"},{"name":"get"},{"name":"getIds"}]},{"name":"BackgroundTasks","globalMethods":[{"name":"requestIdleCallback"},{"name":"cancelIdleCallback"}]},{"name":"Beacon","navigatorMethods":[{"name":"sendBeacon"}]},{"name":"Bluetooth","methods":[{"name":"getAvailability"},{"name":"getDevices"},{"name":"requestDevice"}]},{"name":"Clipboard","methods":[{"name":"read"},{"name":"readText"},{"name":"write"},{"name":"writeText"}]},{"name":"ContactsManager","methods":[{"name":"select"},{"name":"getProperties"}]},{"name":"ContentIndex","methods":[{"name":"add"},{"name":"delete"},{"name":"getAll"}]},{"name":"CookieStore","methods":[{"name":"delete"},{"name":"get"},{"name":"getAll"},{"name":"set"}]},{"name":"CredentialsContainer","methods":[{"name":"create"},{"name":"get"},{"name":"preventSilentAccess"},{"name":"store"}]},{"name":"EventSource","globalConstructor":true},{"name":"Fetch","globalMethods":[{"name":"fetch"}]},{"name":"FileReader","globalConstructor":true,"methods":[{"name":"abort"},{"name":"readAsArrayBuffer"},{"name":"readAsBinaryString"},{"name":"readAsDataURL"},{"name":"readAsText"}]},{"name":"FileReaderSync","globalConstructor":true,"methods":[{"name":"readAsArrayBuffer"},{"name":"readAsBinaryString"},{"name":"readAsDataURL"},{"name":"readAsText"}]},{"name":"FileSystem","globalMethods":[{"name":"showOpenFilePicker"},{"name":"showSaveFilePicker"},{"name":"showDirectoryPicker"}]},{"name":"Gamepad","navigatorMethods":[{"name":"getGamepads"}]},{"name":"Geolocation","methods":[{"name":"clearWatch"},{"name":"getCurrentPosition"},{"name":"watchPosition"}]},{"name":"Battery","navigatorMethods":[{"name":"getBattery"}]},{"name":"HID","methods":[{"name":"getDevices"},{"name":"requestDevice"}]},{"name":"History","methods":[{"name":"back"},{"name":"forward"},{"name":"go"},{"name":"pushState"},{"name":"replaceState"}]},{"name":"IDBFactory","methods":[{"name":"cmp"},{"name":"databases"},{"name":"deleteDatabase"},{"name":"open"}]},{"name":"ImageCapture","globalConstructor":true,"methods":[{"name":"getPhotoCapabilities"},{"name":"getPhotoSettings"},{"name":"grabFrame"},{"name":"takePhoto"}]},{"name":"MediaDevices","methods":[{"name":"enumerateDevices"},{"name":"getDisplayMedia"},{"name":"getSupportedConstraints"},{"name":"getUserMedia"},{"name":"selectAudioOutput"}]},{"name":"MediaRecorder","globalConstructor":true},{"name":"MediaStream","globalConstructor":true},{"name":"MessageChannel","globalConstructor":true,"globalMethods":[{"name":"postMessage"}]},{"name":"MIDI","navigatorMethods":[{"name":"requestMIDIAccess"}]},{"name":"Notification","globalConstructor":true,"methods":[{"name":"requestPermission"}],"swrMethods":[{"name":"showNotification"},{"name":"getNotifications"}]},{"name":"PaymentRequest","globalConstructor":true},{"name":"PerformanceObserver","globalConstructor":true},{"name":"PeriodicSyncManager","methods":[{"name":"register"},{"name":"unregister"},{"name":"getTags"}]},{"name":"Permissions","methods":[{"name":"query"},{"name":"revoke"}]},{"name":"PresentationRequest","globalConstructor":true,"methods":[{"name":"start"},{"name":"reconnect"},{"name":"getAvailability"}]},{"name":"PushManager","methods":[{"name":"getSubscription"},{"name":"hasPermission"},{"name":"permissionState"},{"name":"register"},{"name":"registrations"},{"name":"subscribe"},{"name":"unregister"}]},{"name":"ReportingObserver","globalConstructor":true},{"name":"Scheduler","methods":[{"name":"postTask"}]},{"name":"Selection","globalMethods":[{"name":"getSelection"}],"documentMethods":[{"name":"getSelection"}]},{"name":"Sensor","globalConstructors":[{"name":"AbsoluteOrientationSensor"},{"name":"Accelerometer"},{"name":"AmbientLightSensor"},{"name":"GravitySensor"},{"name":"Gyroscope"},{"name":"LinearAccelerationSensor"},{"name":"Magnetometer"},{"name":"RelativeOrientationSensor"}]},{"name":"Share","navigatorMethods":[{"name":"share"},{"name":"canShare"}]},{"name":"SpeechRecognition","globalConstructors":[{"name":"SpeechRecognition"},{"name":"webkitSpeechRecognition"}],"methods":[{"name":"abort"},{"name":"start"},{"name":"stop"}]},{"name":"SpeechSynthesis","globalPropertyMethods":[{"name":"cancel"},{"name":"getVoices"},{"name":"pause"},{"name":"resume"},{"name":"speak"}],"globalProperty":"speechSynthesis"},{"name":"Storage","methods":[{"name":"getItem"},{"name":"setItem"},{"name":"removeItem"},{"name":"clear"},{"name":"key"}]},{"name":"StorageAccess","documentMethods":[{"name":"requestStorageAccess"},{"name":"hasStorageAccess"}]},{"name":"StorageManager","methods":[{"name":"estimate"},{"name":"persist"},{"name":"persisted"}]},{"name":"SubtleCrypto","methods":[{"name":"decrypt"},{"name":"deriveBits"},{"name":"deriveKey"},{"name":"digest"},{"name":"encrypt"},{"name":"exportKey"},{"name":"generateKey"},{"name":"importKey"},{"name":"sign"},{"name":"unwrapKey"},{"name":"verify"},{"name":"wrapKey"}]},{"name":"USB","methods":[{"name":"getDevices"},{"name":"requestDevice"}]},{"name":"Vibration","navigatorMethods":[{"name":"vibrate"}]},{"name":"WakeLock","methods":[{"name":"request"}]},{"name":"WebSocket","globalConstructor":true,"methods":[{"name":"close"},{"name":"send"}]},{"name":"Worker","globalConstructor":true,"methods":[{"name":"postMessage"},{"name":"terminate"}]},{"name":"SharedWorker","globalConstructor":true},{"name":"XMLHttpRequest","globalConstructor":true,"methods":[{"name":"abort"},{"name":"getAllResponseHeaders"},{"name":"getResponseHeader"},{"name":"open"},{"name":"overrideMimeType"},{"name":"send"},{"name":"setRequestHeader"}]}]'),k=JSON.parse('[{"name":"child_process","methods":[{"name":"exec","needsExplicitPermission":true},{"name":"execFile","needsExplicitPermission":true},{"name":"fork"},{"name":"spawn"},{"name":"execFileSync","needsExplicitPermission":true},{"name":"execSync","needsExplicitPermission":true},{"name":"spawnSync"}]},{"name":"cluster","methods":[{"name":"disconnect"},{"name":"fork"},{"name":"setupPrimary"},{"name":"setupMaster"}]},{"name":"dgram","methods":[{"name":"createSocket"}]},{"name":"dns","methods":[{"name":"Resolver","isConstructor":true},{"name":"getServers"},{"name":"lookup"},{"name":"lookupService"},{"name":"resolve"},{"name":"resolve4"},{"name":"resolve6"},{"name":"resolveAny"},{"name":"resolveCname"},{"name":"resolveCaa"},{"name":"resolveMx"},{"name":"resolveNaptr"},{"name":"resolveNs"},{"name":"resolvePtr"},{"name":"resolveSoa"},{"name":"resolveSrv"},{"name":"resolveTxt"},{"name":"reverse"},{"name":"setDefaultResultOrder"},{"name":"setServers"}]},{"name":"fetch","methods":[{"name":"fetch"}],"globalMethod":true},{"name":"eval","methods":[{"name":"eval","needsExplicitPermission":true}],"globalMethod":true},{"name":"Function","methods":[{"name":"Function","needsExplicitPermission":true}],"globalMethod":true},{"name":"fs","methods":[{"name":"access"},{"name":"appendFile"},{"name":"chmod"},{"name":"chown"},{"name":"close"},{"name":"copyFile"},{"name":"cp"},{"name":"createReadStream"},{"name":"createWriteStream"},{"name":"exists"},{"name":"fchmod"},{"name":"fchown"},{"name":"fdatasync"},{"name":"fstat"},{"name":"fsync"},{"name":"ftruncate"},{"name":"futimes"},{"name":"lchmod"},{"name":"lchown"},{"name":"lutimes"},{"name":"link"},{"name":"lstat"},{"name":"mkdir"},{"name":"mkdtemp"},{"name":"open"},{"name":"opendir"},{"name":"read"},{"name":"readdir"},{"name":"readFile"},{"name":"readlink"},{"name":"readv"},{"name":"realpath"},{"name":"rename"},{"name":"rmdir"},{"name":"rm"},{"name":"stat"},{"name":"symlink"},{"name":"truncate"},{"name":"unlink"},{"name":"unwatchFile"},{"name":"utimes"},{"name":"watch"},{"name":"watchFile"},{"name":"write"},{"name":"writeFile"},{"name":"writev"},{"name":"accessSync"},{"name":"appendFileSync"},{"name":"chmodSync"},{"name":"chownSync"},{"name":"closeSync"},{"name":"copyFileSync"},{"name":"cpSync"},{"name":"existsSync"},{"name":"fchmodSync"},{"name":"fchownSync"},{"name":"fdatasyncSync"},{"name":"fstatSync"},{"name":"fsyncSync"},{"name":"ftruncateSync"},{"name":"futimesSync"},{"name":"lchmodSync"},{"name":"lchownSync"},{"name":"lutimesSync"},{"name":"linkSync"},{"name":"lstatSync"},{"name":"mkdirSync"},{"name":"mkdtempSync"},{"name":"openSync"},{"name":"opendirSync"},{"name":"readSync"},{"name":"readdirSync"},{"name":"readFileSync"},{"name":"readlinkSync"},{"name":"readvSync"},{"name":"realpathSync"},{"name":"renameSync"},{"name":"rmdirSync"},{"name":"rmSync"},{"name":"statSync"},{"name":"symlinkSync"},{"name":"truncateSync"},{"name":"unlinkSync"},{"name":"utimesSync"},{"name":"writeSync"},{"name":"writeFileSync"},{"name":"writevSync"}]},{"name":"fs/promises","methods":[{"name":"access"},{"name":"appendFile"},{"name":"chmod"},{"name":"chown"},{"name":"copyFile"},{"name":"cp"},{"name":"lchmod"},{"name":"lchown"},{"name":"lutimes"},{"name":"link"},{"name":"lstat"},{"name":"mkdir"},{"name":"mkdtemp"},{"name":"open"},{"name":"opendir"},{"name":"readdir"},{"name":"readFile"},{"name":"readlink"},{"name":"realpath"},{"name":"rename"},{"name":"rmdir"},{"name":"rm"},{"name":"stat"},{"name":"symlink"},{"name":"truncate"},{"name":"unlink"},{"name":"utimes"},{"name":"watch"},{"name":"writeFile"}]},{"name":"http","methods":[{"name":"Agent"},{"name":"createServer"},{"name":"get"},{"name":"request"}]},{"name":"http2","methods":[{"name":"createServer"},{"name":"createSecureServer"},{"name":"connect"},{"name":"getDefaultSettings"},{"name":"getPackedSettings"},{"name":"getUnpackedSettings"}]},{"name":"https","methods":[{"name":"Agent"},{"name":"createServer"},{"name":"get"},{"name":"request"}]},{"name":"inspector","methods":[{"name":"close"},{"name":"open"},{"name":"url"},{"name":"waitForDebugger"},{"name":"Session","isConstructor":true}]},{"name":"net","methods":[{"name":"Server"},{"name":"Socket"},{"name":"connect"},{"name":"createConnection"},{"name":"createServer"}]},{"name":"os","methods":[{"name":"arch"},{"name":"cpus"},{"name":"endianness"},{"name":"freemem"},{"name":"getPriority"},{"name":"homedir"},{"name":"hostname"},{"name":"loadavg"},{"name":"networkInterfaces"},{"name":"platform"},{"name":"release"},{"name":"setPriority"},{"name":"tmpdir"},{"name":"totalmem"},{"name":"type"},{"name":"uptime"},{"name":"userInfo"},{"name":"version"}]},{"name":"process","methods":[{"name":"abort"},{"name":"chdir"},{"name":"cpuUsage"},{"name":"cwd"},{"name":"disconnect"},{"name":"dlopen","needsExplicitPermission":true},{"name":"emitWarning"},{"name":"exit"},{"name":"getActiveResourcesInfo"},{"name":"getegid"},{"name":"geteuid"},{"name":"getgid"},{"name":"getgroups"},{"name":"getuid"},{"name":"hasUncaughtExceptionCaptureCallback"},{"name":"hrtime"},{"name":"initgroups"},{"name":"kill"},{"name":"memoryUsage"},{"name":"resourceUsage"},{"name":"send"},{"name":"setegid"},{"name":"seteuid"},{"name":"setgid"},{"name":"setgroups"},{"name":"setuid"},{"name":"setSourceMapsEnabled"},{"name":"setUncaughtExceptionCaptureCallback"},{"name":"umask"},{"name":"uptime"},{"name":"on"}]},{"name":"timers","methods":[{"name":"setImmediate"},{"name":"setInterval"},{"name":"setTimeout"},{"name":"clearImmediate"},{"name":"clearInterval"},{"name":"clearTimeout"}]},{"name":"timers/promises","methods":[{"name":"setImmediate"},{"name":"setInterval"},{"name":"setTimeout"}]},{"name":"tls","methods":[{"name":"Server"},{"name":"TLSSocket"},{"name":"checkServerIdentity"},{"name":"connect"},{"name":"createSecureContext"},{"name":"createSecurePair"},{"name":"createServer"},{"name":"getCiphers"}]},{"name":"trace_events","methods":[{"name":"createTracing"},{"name":"getEnabledCategories"}]},{"name":"v8","methods":[{"name":"cachedDataVersionTag"},{"name":"getHeapCodeStatistics"},{"name":"getHeapSnapshot"},{"name":"getHeapSpaceStatistics"},{"name":"getHeapStatistics"},{"name":"setFlagsFromString"},{"name":"stopCoverage"},{"name":"takeCoverage"},{"name":"writeHeapSnapshot"},{"name":"serialize"},{"name":"deserialize"}]},{"name":"vm","methods":[{"name":"Script","isConstructor":true,"needsExplicitPermission":true},{"name":"SourceTextModule"},{"name":"SyntheticModule"},{"name":"compileFunction"},{"name":"createContext"},{"name":"isContext"},{"name":"measureMemory"},{"name":"runInContext","needsExplicitPermission":true},{"name":"runInNewContext","needsExplicitPermission":true},{"name":"runInThisContext","needsExplicitPermission":true}]},{"name":"wasi","methods":[{"name":"WASI","isConstructor":true,"needsExplicitPermission":true}]},{"name":"worker_threads","methods":[{"name":"Worker","isConstructor":true},{"name":"getEnvironmentData"},{"name":"markAsUntransferable"},{"name":"moveMessagePortToContext"},{"name":"receiveMessageOnPort"},{"name":"setEnvironmentData"}]}]');var j=["debug","info","warn","error"],U={level:"warn"};j.forEach((function(e){U[e]=function(){var t;U.level&&j.indexOf(U.level)<=j.indexOf(e)&&(t=console)[e].apply(t,arguments)}}));const T=U;function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){return function(e){if(Array.isArray(e))return G(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return G(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?G(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:[];Array.isArray(e)&&(ce=ne(e.filter((function(e){return e&&e.path&&e.name}))))},me=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Array.isArray(e)&&(se=-1!==e.findIndex((function(e){return"root"===e.module}))?ne(e):[ae].concat(ne(e)))},de=function(e){var t=["bind"].concat(ne(e.map((function(e){return e.name}))));se=[{module:/.*/,permissions:t},{module:"root",permissions:t}]},ge=function(e){var t=null==e?void 0:e.file,n=t,r=null==e?void 0:e.line,o=null==e?void 0:e.column;if(t&&null!=le&&le[t]){var i=le[t].originalPositionFor({line:e.line,column:e.column});n=i.source,r=i.line,o=i.column}return{item:e,mapping:n,mappingLine:r,mappingColumn:o}},ye=function(e,t){var n,r,o="root";if(e&&"string"==typeof e)if(e.startsWith("node:"))o=(n=e.split("/"),r=1,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(n,r)||re(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];else if(e.includes("node_modules"))o=function(e){var t=e.split("/"),n=t.findIndex((function(e){return"node_modules"===e})),r=t[n+1];if(r.startsWith("@")){var o=t[n+2];o&&(r="".concat(r,"/").concat(o))}return r}(e);else if(t&&e.includes("://"))o=e;else{var i=ce.find((function(t){var n=t.path;return e.includes(n)}));i&&(o=i.name)}else o=void 0;return o},ve=function(e){var t,n=[];return e.forEach((function(e){t!==e&&(t=e,n.push(e))})),n},be=function(e){var t=ne(e),n=t.lastIndexOf("root");-1!==n&&(t=t.slice(n+1));for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=e.stack,n=e.allowURLs,r=void 0!==n&&n;try{var o=(t||l()).map((function(e){return ge(e)})).map((function(e){var t=e.item,n=e.mapping,o=e.mappingLine,i=e.mappingColumn,a=ye(n,r);return{caller:t.caller,called:t.called,name:t.name,alias:t.alias,file:t.file,fileLine:t.line,fileColumn:t.column,mapping:n,mappingLine:o,mappingColumn:i,module:a}})),i=o.find((function(e){return"sandworm"!==e.module})),a=o.find((function(e){var t=e.module;return"sandworm"!==t&&void 0!==t&&!t.startsWith("node:")})),s=o.reverse().map((function(e){var t=e.module;return ue.includes(t)||null!=t&&t.startsWith("node:")?void 0:t})).filter((function(e){return void 0!==e})),u="root",c=!1;if(s.length){var f=ve(s),h=be(f);u=h.join(">")||"root",c=!!s.find((function(e){return e.startsWith("chrome-extension://")||e.startsWith("moz-extension://")}))}return{name:u,stack:o,directCaller:i,lastModuleCaller:a,isExtension:c}}catch(e){return T.error(e),{name:"root",error:e.message}}},Se=function(e){var t=e.module,n=e.family,r=e.method,o=function(e){if(Object.keys(ie).includes(e))return ie[e];var t=se.find((function(t){return t.module===e}));if(t)return ie[e]=t.permissions,t.permissions;var n=se.find((function(t){var n=t.module;return n instanceof RegExp&&e.match(n)}));return n?(ie[e]=n.permissions,n.permissions):(ie[e]=!1,!1)}(t);return"boolean"!=typeof o||r.needsExplicitPermission?!!Array.isArray(o)&&(o.includes(n.name)||o.includes("".concat(n.name,".").concat(r.name))||!r.needsExplicitPermission&&o.includes("*")):o};function _e(e){return _e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_e(e)}function Ee(e,t){if(t&&("object"===_e(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ae(e){var t="function"==typeof Map?new Map:void 0;return Ae=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Ce(e,arguments,xe(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Le(r,e)},Ae(e)}function Ce(e,t,n){return Ce=Oe()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Le(o,n.prototype),o},Ce.apply(null,arguments)}function Oe(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Le(e,t){return Le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Le(e,t)}function xe(e){return xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xe(e)}var Me=!0,Re=function(){},Ie=function(e){Me=!!e},Pe=function(e){"function"==typeof e&&(Re=e)},Be=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Le(e,t)}(i,e);var t,n,r,o=(t=i,n=Oe(),function(){var e,r=xe(t);if(n){var o=xe(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Ee(this,e)});function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this,e)).name="SandwormError",t}return r=i,Object.defineProperty(r,"prototype",{writable:!1}),r}(Ae(Error));function ke(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:function(){};return function(){for(var r,o,i,a=we({allowURLs:!0}),s=a.name,u=a.stack,c=a.directCaller,l=a.lastModuleCaller,f=a.isExtension,h=a.error,p=arguments.length,m=new Array(p),d=0;d ".concat(s,">").concat(e.name,".").concat(t.name," has been allowed"),l?"as a consequence of `".concat(l.module,"` calling `").concat(l.alias||l.name,".").concat(l.called,"`"):""),i=!0):(T.debug("".concat(s," called ").concat(e.name,".").concat(t.name)),i=Se({module:s,family:e,method:t}),n({module:s,family:e.name,method:t.name,args:m,allowed:i,stack:u,error:h})),i)return t.isConstructor?ke.apply(void 0,[t.original].concat(m)):t.original.apply(this,m);var g="".concat(e.name,".").concat(t.name);T.error("".concat(s," was blocked from calling ").concat(g," with"),m);var y=new Be("Sandworm: access denied (".concat(s," called ").concat(g,")"));y.module=s,y.method="".concat(g);try{Re(y)}catch(e){}throw y}};const Ue=function(e){var t=e.family,n=e.track,r=void 0===n?function(){}:n;t.available&&t.methods.forEach((function(e){if(e.original=t.originalRoot()[e.name],e.original){T.debug("installing ".concat(t.name,".").concat(e.name)),e.originalBind=e.original.bind;var n=je(t,e,r);for(var o in e.original)Object.prototype.hasOwnProperty.call(e.original,o)&&(n[o]=e.original[o]);n.prototype=e.original.prototype,n.bind=je({name:"bind"},{name:"args",original:e.originalBind,minArgsToTrigger:2},r),t.originalRoot()[e.name]=n}}))};var Te=n(244);function Ne(e){return Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ne(e)}function Fe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return De(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?De(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function De(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:A(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}function $e(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function qe(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){$e(i,r,o,a,s,"next",e)}function s(e){$e(i,r,o,a,s,"throw",e)}a(void 0)}))}}var We=!1,ze=!1,He=[],Ye=!1,Ve=P(),Xe=function(e){return"[object Object]"===Object.prototype.toString.call(e)},Je=function(){return We||Ve===R&&self.sandwormInitialized||Ve===M&&n.g.sandwormInitialized},Ke=function(){We=!0,Ve===R?self.sandwormInitialized=!0:Ve===M&&(n.g.sandwormInitialized=!0)};const Qe={init:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.loadSourceMaps,n=void 0===t?Ve===R:t,r=e.devMode,o=void 0!==r&&r,i=e.verbose,a=void 0!==i&&i,s=e.skipTracking,u=void 0!==s&&s,c=e.trackingIP,f=e.trackingPort,h=e.ignoreExtensions,p=void 0===h||h,m=e.trustedModules,d=void 0===m?[]:m,g=e.permissions,y=void 0===g?[]:g,v=e.onAccessDenied,b=e.aliases,w=void 0===b?[]:b;try{if(Je())return T.warn("already initialized"),Promise.resolve();var S=we({allowURLs:!1}),_=S.name;if(!["root","mocha>sandworm-mocha"].includes(_))return T.warn("only root may call init (called from ".concat(_,")")),Promise.resolve();"boolean"!=typeof o?(T.warn("devMode option must be a boolean, defaulting to false"),Ye=!1):Ye=o,!0===a&&(T.level="debug"),K(u),ee(c,f),Array.isArray(d)?he(d):T.warn("trustedModules option must be an array, defaulting to empty array"),Ie(p),Pe(v),pe(w);var E=[];return Ve===R?E=(0,Te.buildWebLibraryFrom)(B):Ve===M?E=(0,Te.buildNodeLibraryFrom)(k):T.debug("current platform is not supported"),Ye?de(E):y&&(Array.isArray(y)?me(y):T.warn("permissions option must be an array, defaulting to empty array")),E.forEach((function(e){Ue({family:e,track:function(e){Ye&&ze&&(He.push(e),te(e))}})})),Ke(),qe(Ge().mark((function e(){var t,r;return Ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!n){e.next=18;break}if(!0!==n){e.next=13;break}return t=l()[1],r=t.file,e.t0=fe,e.t1=r,e.next=9,A(r);case 9:e.t2=e.sent,(0,e.t0)(e.t1,e.t2),e.next=17;break;case 13:if(!Xe(n)){e.next=17;break}return e.next=16,Promise.all(Object.keys(n).map(function(){var e=qe(Ge().mark((function e(t){return Ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=t,e.next=3,C(n[t]);case 3:return e.t1=e.sent,e.abrupt("return",[e.t0,e.t1]);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 16:e.sent.forEach((function(e){var t=Fe(e,2),n=t[0],r=t[1];fe(n,r)}));case 17:T.debug("loaded source maps");case 18:e.next=23;break;case 20:e.prev=20,e.t3=e.catch(0),T.error(e.t3);case 23:return e.prev=23,ze=!0,T.debug("initialized"),e.finish(23);case 27:case"end":return e.stop()}}),e,null,[[0,20,23,27]])})))()}catch(e){return T.error(e),ze=!0,T.debug("initialized with errors"),Promise.resolve()}},getHistory:function(){return Ye?He:[]},clearHistory:function(){Ye&&(He=[])},Error:Be}})(),r.default})())); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Sandworm=t():e.Sandworm=t()}(this,(()=>(()=>{var e={244:(e,t,n)=>{function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";t.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=u(e),a=i[0],s=i[1],c=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),l=0,f=s>0?a-4:a;for(n=0;n>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===s&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[l++]=255&t),1===s&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,u=r-o;su?u:s+a));return 1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=i.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,r){for(var o,i,a=[],s=t;s>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},764:(e,t,n)=>{"use strict";const r=n(742),o=n(645),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return c(e,t,n)}function c(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|d(e,t);let r=s(n);const o=r.write(e,t);return o!==n&&(r=r.slice(0,o)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(X(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(X(e,ArrayBuffer)||e&&X(e.buffer,ArrayBuffer))return p(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(X(e,SharedArrayBuffer)||e&&X(e.buffer,SharedArrayBuffer)))return p(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return u.from(r,t,n);const o=function(e){if(u.isBuffer(e)){const t=0|m(e.length),n=s(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?s(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return l(e),s(e<0?0:0|m(e))}function h(e){const t=e.length<0?0:0|m(e.length),n=s(t);for(let r=0;r=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||X(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(e).length;default:if(o)return r?-1:H(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return R(this,t,n);case"utf8":case"utf-8":return O(this,t,n);case"ascii":return x(this,t,n);case"latin1":case"binary":return M(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),J(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,o){let i,a=1,s=e.length,u=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;a=2,s/=2,u/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let r=-1;for(i=n;is&&(n=s-u),i=n;i>=0;i--){let n=!0;for(let r=0;ro&&(r=o):r=o;const i=t.length;let a;for(r>i/2&&(r=i/2),a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function O(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o239?4:t>223?3:t>191?2:1;if(o+a<=n){let n,r,s,u;switch(a){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(u=(31&t)<<6|63&n,u>127&&(i=u));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(u=(15&t)<<12|(63&n)<<6|63&r,u>2047&&(u<55296||u>57343)&&(i=u));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(u=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,u>65535&&u<1114112&&(i=u))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return function(e){const t=e.length;if(t<=L)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rr.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(r,o)):Uint8Array.prototype.set.call(r,t,o);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,o)}o+=t.length}return r},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},i&&(u.prototype[i]=u.prototype.inspect),u.prototype.compare=function(e,t,n,r,o){if(X(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new 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===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;let i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0);const s=Math.min(i,a),c=this.slice(r,o),l=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return S(this,e,t,n);case"ascii":case"latin1":case"binary":return _(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const L=4096;function x(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;or)&&(n=r);let o="";for(let r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function B(e,t,n,r,o,i){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function k(e,t,n,r,o){$(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function j(e,t,n,r,o){$(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n+7]=i,i>>=8,e[n+6]=i,i>>=8,e[n+5]=i,i>>=8,e[n+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function U(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function T(e,t,n,r,i){return t=+t,n>>>=0,i||U(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function N(e,t,n,r,i){return t=+t,n>>>=0,i||U(e,0,n,8),o.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],o=1,i=0;for(;++i>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e+--t],o=1;for(;t>0&&(o*=256);)r+=this[e+--t]*o;return r},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=Q((function(e){q(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(o)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],o=1,i=0;for(;++i=o&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=t,o=1,i=this[e+--r];for(;r>0&&(o*=256);)i+=this[e+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},u.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=Q((function(e){q(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||P(e,4,this.length),o.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),o.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),o.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),o.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||B(this,e,t,n,Math.pow(2,8*n)-1,0);let o=1,i=0;for(this[t]=255&e;++i>>=0,n>>>=0,r||B(this,e,t,n,Math.pow(2,8*n)-1,0);let o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=Q((function(e,t=0){return k(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=Q((function(e,t=0){return j(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);B(this,e,t,n,r-1,-r)}let o=0,i=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);B(this,e,t,n,r-1,-r)}let o=n-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i>>0)-a&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||B(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=Q((function(e,t=0){return k(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=Q((function(e,t=0){return j(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,n){return T(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return T(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return N(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(!u.isBuffer(e))throw new 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=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function $(e,t,n,r,o,i){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and < 2 ** ${8*(i+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new F.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,n){q(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||W(t,e.length-(n+1))}(r,o,i)}function q(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function W(e,t,n){if(Math.floor(e)!==e)throw q(e,n),new F.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}D("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),D("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),D("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>2**32?o=G(String(n)):"bigint"==typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=G(o)),o+="n"),r+=` It must be ${t}. Received ${o}`,r}),RangeError);const z=/[^+/0-9A-Za-z-_]/g;function H(e,t){let n;t=t||1/0;const r=e.length;let o=null;const i=[];for(let a=0;a55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function Y(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(z,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,n,r){let o;for(o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const K=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function Q(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},645:(e,t)=>{t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,u=(1<>1,l=-7,f=n?o-1:0,h=n?-1:1,p=e[t+f];for(f+=h,i=p&(1<<-l)-1,p>>=-l,l+=s;l>0;i=256*i+e[t+f],f+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+f],f+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=c}return(p?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,u,c=8*i-o-1,l=(1<>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,m=r?1:-1,d=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&s,p+=m,s/=256,o-=8);for(a=a<0;e[n+p]=255&a,p+=m,a/=256,c-=8);e[n+p-m]|=128*d}},86:(e,t,n)=>{var r=n(305),o=Object.prototype.hasOwnProperty,i="undefined"!=typeof Map;function a(){this._array=[],this._set=i?new Map:Object.create(null)}a.fromArray=function(e,t){for(var n=new a,r=0,o=e.length;r=0)return t}else{var n=r.toSetString(e);if(o.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')},a.prototype.at=function(e){if(e>=0&&e{var r=n(167);t.encode=function(e){var t,n="",o=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&o,(o>>>=5)>0&&(t|=32),n+=r.encode(t)}while(o>0);return n},t.decode=function(e,t,n){var o,i,a,s,u=e.length,c=0,l=0;do{if(t>=u)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=r.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));o=!!(32&i),c+=(i&=31)<>1,1==(1&a)?-s:s),n.rest=t}},167:(e,t)=>{var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&e{function n(e,r,o,i,a,s){var u=Math.floor((r-e)/2)+e,c=a(o,i[u],!0);return 0===c?u:c>0?r-u>1?n(u,r,o,i,a,s):s==t.LEAST_UPPER_BOUND?r1?n(e,u,o,i,a,s):s==t.LEAST_UPPER_BOUND?u:e<0?-1:e}t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(e,r,o,i){if(0===r.length)return-1;var a=n(-1,r.length,e,r,o,i||t.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===o(r[a],r[a-1],!0);)--a;return a}},688:(e,t,n)=>{var r=n(305);function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}o.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},o.prototype.add=function(e){var t,n,o,i,a,s;n=e,o=(t=this._last).generatedLine,i=n.generatedLine,a=t.generatedColumn,s=n.generatedColumn,i>o||i==o&&s>=a||r.compareByGeneratedPositionsInflated(t,n)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(r.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},t.H=o},523:(e,t)=>{function n(e){function t(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}return function e(n,r,o,i){if(o{var r=n(305),o=n(183),i=n(86).I,a=n(520),s=n(523).U;function u(e,t){var n=e;return"string"==typeof e&&(n=r.parseSourceMapInput(e)),null!=n.sections?new p(n,t):new c(n,t)}function c(e,t){var n=e;"string"==typeof e&&(n=r.parseSourceMapInput(e));var o=r.getArg(n,"version"),a=r.getArg(n,"sources"),s=r.getArg(n,"names",[]),u=r.getArg(n,"sourceRoot",null),c=r.getArg(n,"sourcesContent",null),l=r.getArg(n,"mappings"),f=r.getArg(n,"file",null);if(o!=this._version)throw new Error("Unsupported version: "+o);u&&(u=r.normalize(u)),a=a.map(String).map(r.normalize).map((function(e){return u&&r.isAbsolute(u)&&r.isAbsolute(e)?r.relative(u,e):e})),this._names=i.fromArray(s.map(String),!0),this._sources=i.fromArray(a,!0),this._absoluteSources=this._sources.toArray().map((function(e){return r.computeSourceURL(u,e,t)})),this.sourceRoot=u,this.sourcesContent=c,this._mappings=l,this._sourceMapURL=t,this.file=f}function l(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}u.fromSourceMap=function(e,t){return c.fromSourceMap(e,t)},u.prototype._version=3,u.prototype.__generatedMappings=null,Object.defineProperty(u.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),u.prototype.__originalMappings=null,Object.defineProperty(u.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),u.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return";"===n||","===n},u.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},u.GENERATED_ORDER=1,u.ORIGINAL_ORDER=2,u.GREATEST_LOWER_BOUND=1,u.LEAST_UPPER_BOUND=2,u.prototype.eachMapping=function(e,t,n){var o,i=t||null;switch(n||u.GENERATED_ORDER){case u.GENERATED_ORDER:o=this._generatedMappings;break;case u.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var a=this.sourceRoot,s=e.bind(i),c=this._names,l=this._sources,f=this._sourceMapURL,h=0,p=o.length;h=0){var s=this._originalMappings[a];if(void 0===e.column)for(var u=s.originalLine;s&&s.originalLine===u;)i.push({line:r.getArg(s,"generatedLine",null),column:r.getArg(s,"generatedColumn",null),lastColumn:r.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++a];else for(var c=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==c;)i.push({line:r.getArg(s,"generatedLine",null),column:r.getArg(s,"generatedColumn",null),lastColumn:r.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++a]}return i},t.SourceMapConsumer=u,c.prototype=Object.create(u.prototype),c.prototype.consumer=u,c.prototype._findSourceIndex=function(e){var t,n=e;if(null!=this.sourceRoot&&(n=r.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);for(t=0;t0&&(e[t]=r,e[t+1]=n)}else if(r<20)for(let r=t;rt;n--){let t=e[n-1],r=e[n];if(f(t,r)<=0)break;e[n-1]=r,e[n]=t}else s(e,f,t)}function p(e,t){var n=e;"string"==typeof e&&(n=r.parseSourceMapInput(e));var o=r.getArg(n,"version"),a=r.getArg(n,"sections");if(o!=this._version)throw new Error("Unsupported version: "+o);this._sources=new i,this._names=new i;var s={line:-1,column:0};this._sections=a.map((function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var n=r.getArg(e,"offset"),o=r.getArg(n,"line"),i=r.getArg(n,"column");if(o1&&(n.source=d+o[1],d+=o[1],n.originalLine=p+o[2],p=n.originalLine,n.originalLine+=1,n.originalColumn=m+o[3],m=n.originalColumn,o.length>4&&(n.name=g+o[4],g+=o[4])),S.push(n),"number"==typeof n.originalLine){let e=n.source;for(;w.length<=e;)w.push(null);null===w[e]&&(w[e]=[]),w[e].push(n)}}h(S,_),this.__generatedMappings=S;for(var E=0;E=0){var o=this._generatedMappings[n];if(o.generatedLine===t.generatedLine){var i=r.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),i=r.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var a=r.getArg(o,"name",null);return null!==a&&(a=this._names.at(a)),{source:i,line:r.getArg(o,"originalLine",null),column:r.getArg(o,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},c.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e}))},c.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;var n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];var o,i=e;if(null!=this.sourceRoot&&(i=r.relative(this.sourceRoot,i)),null!=this.sourceRoot&&(o=r.urlParse(this.sourceRoot))){var a=i.replace(/^file:\/\//,"");if("file"==o.scheme&&this._sources.has(a))return this.sourcesContent[this._sources.indexOf(a)];if((!o.path||"/"==o.path)&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(t)return null;throw new Error('"'+i+'" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(e){var t=r.getArg(e,"source");if((t=this._findSourceIndex(t))<0)return{line:null,column:null,lastColumn:null};var n={source:t,originalLine:r.getArg(e,"line"),originalColumn:r.getArg(e,"column")},o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions,r.getArg(e,"bias",u.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===n.source)return{line:r.getArg(i,"generatedLine",null),column:r.getArg(i,"generatedColumn",null),lastColumn:r.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},p.prototype=Object.create(u.prototype),p.prototype.constructor=u,p.prototype._version=3,Object.defineProperty(p.prototype,"sources",{get:function(){for(var e=[],t=0;t{var r=n(520),o=n(305),i=n(86).I,a=n(688).H;function s(e){e||(e={}),this._file=o.getArg(e,"file",null),this._sourceRoot=o.getArg(e,"sourceRoot",null),this._skipValidation=o.getArg(e,"skipValidation",!1),this._sources=new i,this._names=new i,this._mappings=new a,this._sourcesContents=null}s.prototype._version=3,s.fromSourceMap=function(e){var t=e.sourceRoot,n=new s({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=o.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)})),e.sources.forEach((function(r){var i=r;null!==t&&(i=o.relative(t,r)),n._sources.has(i)||n._sources.add(i);var a=e.sourceContentFor(r);null!=a&&n.setSourceContent(r,a)})),n},s.prototype.addMapping=function(e){var t=o.getArg(e,"generated"),n=o.getArg(e,"original",null),r=o.getArg(e,"source",null),i=o.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,i),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:i})},s.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=o.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[o.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[o.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},s.prototype.applySourceMap=function(e,t,n){var r=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=e.file}var a=this._sourceRoot;null!=a&&(r=o.relative(a,r));var s=new i,u=new i;this._mappings.unsortedForEach((function(t){if(t.source===r&&null!=t.originalLine){var i=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=i.source&&(t.source=i.source,null!=n&&(t.source=o.join(n,t.source)),null!=a&&(t.source=o.relative(a,t.source)),t.originalLine=i.line,t.originalColumn=i.column,null!=i.name&&(t.name=i.name))}var c=t.source;null==c||s.has(c)||s.add(c);var l=t.name;null==l||u.has(l)||u.add(l)}),this),this._sources=s,this._names=u,e.sources.forEach((function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=o.join(n,t)),null!=a&&(t=o.relative(a,t)),this.setSourceContent(t,r))}),this)},s.prototype._validateMapping=function(e,t,n,r){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},s.prototype._serializeMappings=function(){for(var e,t,n,i,a=0,s=1,u=0,c=0,l=0,f=0,h="",p=this._mappings.toArray(),m=0,d=p.length;m0){if(!o.compareByGeneratedPositionsInflated(t,p[m-1]))continue;e+=","}e+=r.encode(t.generatedColumn-a),a=t.generatedColumn,null!=t.source&&(i=this._sources.indexOf(t.source),e+=r.encode(i-f),f=i,e+=r.encode(t.originalLine-1-c),c=t.originalLine-1,e+=r.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=r.encode(n-l),l=n)),h+=e}return h},s.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=o.relative(t,e));var n=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)},s.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},s.prototype.toString=function(){return JSON.stringify(this.toJSON())},t.h=s},231:(e,t,n)=>{var r=n(508).h,o=n(305),i=/(\r?\n)/,a="$$$isSourceNode$$$";function s(e,t,n,r,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==o?null:o,this[a]=!0,null!=r&&this.add(r)}s.fromStringWithSourceMap=function(e,t,n){var r=new s,a=e.split(i),u=0,c=function(){return e()+(e()||"");function e(){return u=0;t--)this.prepend(e[t]);else{if(!e[a]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},s.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n0){for(t=[],n=0;n{t.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function o(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function i(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}t.urlParse=o,t.urlGenerate=i;var a,s,u=(a=function(e){var n=e,r=o(e);if(r){if(!r.path)return e;n=r.path}for(var a=t.isAbsolute(n),s=[],u=0,c=0;;){if(u=c,-1===(c=n.indexOf("/",u))){s.push(n.slice(u));break}for(s.push(n.slice(u,c));c=0;c--)"."===(l=s[c])?s.splice(c,1):".."===l?f++:f>0&&(""===l?(s.splice(c+1,f),f=0):(s.splice(c,2),f--));return""===(n=s.join("/"))&&(n=a?"/":"."),r?(r.path=n,i(r)):n},s=[],function(e){for(var t=0;t32&&s.pop(),r});function c(e,t){""===e&&(e="."),""===t&&(t=".");var n=o(t),a=o(e);if(a&&(e=a.path||"/"),n&&!n.scheme)return a&&(n.scheme=a.scheme),i(n);if(n||t.match(r))return t;if(a&&!a.host&&!a.path)return a.host=t,i(a);var s="/"===t.charAt(0)?t:u(e.replace(/\/+$/,"")+"/"+t);return a?(a.path=s,i(a)):s}t.normalize=u,t.join=c,t.isAbsolute=function(e){return"/"===e.charAt(0)||n.test(e)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var l=!("__proto__"in Object.create(null));function f(e){return e}function h(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function p(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}t.toSetString=l?f:function(e){return h(e)?"$"+e:e},t.fromSetString=l?f:function(e){return h(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,n){var r=p(e.source,t.source);return 0!==r||0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)||n||0!=(r=e.generatedColumn-t.generatedColumn)||0!=(r=e.generatedLine-t.generatedLine)?r:p(e.name,t.name)},t.compareByOriginalPositionsNoSource=function(e,t,n){var r;return 0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)||n||0!=(r=e.generatedColumn-t.generatedColumn)||0!=(r=e.generatedLine-t.generatedLine)?r:p(e.name,t.name)},t.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r||0!=(r=e.generatedColumn-t.generatedColumn)||n||0!==(r=p(e.source,t.source))||0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)?r:p(e.name,t.name)},t.compareByGeneratedPositionsDeflatedNoLine=function(e,t,n){var r=e.generatedColumn-t.generatedColumn;return 0!==r||n||0!==(r=p(e.source,t.source))||0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)?r:p(e.name,t.name)},t.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n||0!=(n=e.generatedColumn-t.generatedColumn)||0!==(n=p(e.source,t.source))||0!=(n=e.originalLine-t.originalLine)||0!=(n=e.originalColumn-t.originalColumn)?n:p(e.name,t.name)},t.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},t.computeSourceURL=function(e,t,n){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),n){var r=o(n);if(!r)throw new Error("sourceMapURL could not be parsed");if(r.path){var a=r.path.lastIndexOf("/");a>=0&&(r.path=r.path.substring(0,a+1))}t=c(i(r),t)}return u(t)}},298:(e,t,n)=>{n(508).h,t.SourceMapConsumer=n(529).SourceMapConsumer,n(231)}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};return(()=>{"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nQe});var s,u={},c=function(e){var t,n,r=(e||"").trim(),o=u[r];if(o)return o;var a,s,c,l,f=[];if((c=r.match(/at (.+) \(eval at .+ \((.+)\), .+\)/))||(c=r.match(/at (.+) \((.+)\)/))||"at "!==r.slice(0,3)&&(c=r.match(/(.*)@(.*)/)))a=i(c,2)[1],f=(c[2].match(/(.*):(\d+):(\d+)/)||c[2].match(/(.*):(\d+)/)||[]).slice(1);else{if(!(c=r.match(/^(at\s+)*(.+):(\d+):(\d+)/)))return void(u[r]=void 0);f=c.slice(2)}if(null!==(t=a)&&void 0!==t&&null!==(n=t.includes)&&void 0!==n&&n.call(t," [as ")){var h=i(a.slice(0,-1).split(" [as "),2);a=h[0],s=h[1]}return u[r]={beforeParse:r,file:(l=f[0]||"",l.replace(/\\/g,"/")),line:parseInt(f[1]||"",10)||void 0,column:parseInt(f[2]||"",10)||void 0,name:a,alias:s},u[r]},l=function(){var e=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var n=((new Error).stack||"").split("\n");return Error.stackTraceLimit=e,n.map(c).filter((function(e){return void 0!==e})).map((function(e,n,r){var o=r[n+1],i=r[n-1];return t(t({},e),{},{caller:o?o.alias||o.name:void 0,called:i?i.alias||i.name:void 0})}))},f=n(298),h=n(764).Buffer;function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:O(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}function g(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function y(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){g(i,r,o,a,s,"next",e)}function s(e){g(i,r,o,a,s,"throw",e)}a(void 0)}))}}try{s=require("fs")}catch(e){}var v=/^data:application\/json[^,]+base64,/,b=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,w=console,S=function(){var e=y(d().mark((function e(t){var n;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(t);case 3:return n=e.sent,e.abrupt("return",n.text());case 7:return e.prev=7,e.t0=e.catch(0),w.error(e.t0),e.abrupt("return",null);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),_=function(){var e=y(d().mark((function e(t){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s){e.next=2;break}return e.abrupt("return",null);case 2:return e.abrupt("return",new Promise((function(e){s.readFile(t,{encoding:"utf8"},(function(t,n){t&&(w.error(t),e(null)),e(n)}))})));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),E=function(e){try{var t=new URL(e);return S(t)}catch(t){return _(e)}},A=function(){var e=y(d().mark((function e(t){var n,r,o,i,a,s,u,c,l;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,w.debug("loading source from ".concat(t)),e.next=4,E(t);case 4:if(r=e.sent,null==(o=null==r||null===(n=r.match)||void 0===n?void 0:n.call(r,b))||!o[1]){e.next=28;break}if(w.debug("found sourcemap reference"),i=o[1],!v.test(i)){e.next=15;break}w.debug("loading inline sourcemap"),s=i.slice(i.indexOf(",")+1),a="function"==typeof atob?atob(s):h.from(s,"base64").toString(),e.next=22;break;case 15:return(u=t.split("/")).splice(-1,1),c=[].concat((p=u,function(e){if(Array.isArray(e))return m(e)}(p)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(p)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(p)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[i]).join("/"),w.debug("loading sourcemap from ".concat(c)),e.next=21,E(c);case 21:a=e.sent;case 22:if(!a){e.next=28;break}return e.next=25,new f.SourceMapConsumer(a);case 25:return l=e.sent,w.debug("loaded sourcemap"),e.abrupt("return",l);case 28:return w.debug("sourcemap not available"),e.abrupt("return",null);case 32:return e.prev=32,e.t0=e.catch(0),w.error(e.t0),e.abrupt("return",null);case 36:case"end":return e.stop()}var p}),e,null,[[0,32]])})));return function(t){return e.apply(this,arguments)}}(),C=function(){var e=y(d().mark((function e(t){var n,r;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,w.debug("loading sourcemap from ".concat(t)),e.next=4,E(t);case 4:if(!(n=e.sent)){e.next=10;break}return e.next=8,new f.SourceMapConsumer(n);case 8:return r=e.sent,e.abrupt("return",r);case 10:return w.debug("sourcemap not available"),e.abrupt("return",null);case 14:return e.prev=14,e.t0=e.catch(0),w.error(e.t0),e.abrupt("return",null);case 18:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(t){return e.apply(this,arguments)}}();function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}var L="undefined"!=typeof window||"undefined"!=typeof self,x="object"===("undefined"==typeof process?"undefined":O(process))&&"object"===O(process.versions)&&!!process.versions.node,M="NODE",R="WEB",I="UNKNOWN";const P=function(){try{return L?R:x?M:I}catch(e){return I}},B=JSON.parse('[{"name":"AudioContext","globalConstructor":true},{"name":"BackgroundFetchManager","methods":[{"name":"fetch"},{"name":"get"},{"name":"getIds"}]},{"name":"BackgroundTasks","globalMethods":[{"name":"requestIdleCallback"},{"name":"cancelIdleCallback"}]},{"name":"Beacon","navigatorMethods":[{"name":"sendBeacon"}]},{"name":"Bluetooth","methods":[{"name":"getAvailability"},{"name":"getDevices"},{"name":"requestDevice"}]},{"name":"Clipboard","methods":[{"name":"read"},{"name":"readText"},{"name":"write"},{"name":"writeText"}]},{"name":"ContactsManager","methods":[{"name":"select"},{"name":"getProperties"}]},{"name":"ContentIndex","methods":[{"name":"add"},{"name":"delete"},{"name":"getAll"}]},{"name":"CookieStore","methods":[{"name":"delete"},{"name":"get"},{"name":"getAll"},{"name":"set"}]},{"name":"CredentialsContainer","methods":[{"name":"create"},{"name":"get"},{"name":"preventSilentAccess"},{"name":"store"}]},{"name":"EventSource","globalConstructor":true},{"name":"Fetch","globalMethods":[{"name":"fetch"}]},{"name":"FileReader","globalConstructor":true,"methods":[{"name":"abort"},{"name":"readAsArrayBuffer"},{"name":"readAsBinaryString"},{"name":"readAsDataURL"},{"name":"readAsText"}]},{"name":"FileReaderSync","globalConstructor":true,"methods":[{"name":"readAsArrayBuffer"},{"name":"readAsBinaryString"},{"name":"readAsDataURL"},{"name":"readAsText"}]},{"name":"FileSystem","globalMethods":[{"name":"showOpenFilePicker"},{"name":"showSaveFilePicker"},{"name":"showDirectoryPicker"}]},{"name":"Gamepad","navigatorMethods":[{"name":"getGamepads"}]},{"name":"Geolocation","methods":[{"name":"clearWatch"},{"name":"getCurrentPosition"},{"name":"watchPosition"}]},{"name":"Battery","navigatorMethods":[{"name":"getBattery"}]},{"name":"HID","methods":[{"name":"getDevices"},{"name":"requestDevice"}]},{"name":"History","methods":[{"name":"back"},{"name":"forward"},{"name":"go"},{"name":"pushState"},{"name":"replaceState"}]},{"name":"IDBFactory","methods":[{"name":"cmp"},{"name":"databases"},{"name":"deleteDatabase"},{"name":"open"}]},{"name":"ImageCapture","globalConstructor":true,"methods":[{"name":"getPhotoCapabilities"},{"name":"getPhotoSettings"},{"name":"grabFrame"},{"name":"takePhoto"}]},{"name":"MediaDevices","methods":[{"name":"enumerateDevices"},{"name":"getDisplayMedia"},{"name":"getSupportedConstraints"},{"name":"getUserMedia"},{"name":"selectAudioOutput"}]},{"name":"MediaRecorder","globalConstructor":true},{"name":"MediaStream","globalConstructor":true},{"name":"MessageChannel","globalConstructor":true,"globalMethods":[{"name":"postMessage"}]},{"name":"MIDI","navigatorMethods":[{"name":"requestMIDIAccess"}]},{"name":"Notification","globalConstructor":true,"methods":[{"name":"requestPermission"}],"swrMethods":[{"name":"showNotification"},{"name":"getNotifications"}]},{"name":"PaymentRequest","globalConstructor":true},{"name":"PerformanceObserver","globalConstructor":true},{"name":"PeriodicSyncManager","methods":[{"name":"register"},{"name":"unregister"},{"name":"getTags"}]},{"name":"Permissions","methods":[{"name":"query"},{"name":"revoke"}]},{"name":"PresentationRequest","globalConstructor":true,"methods":[{"name":"start"},{"name":"reconnect"},{"name":"getAvailability"}]},{"name":"PushManager","methods":[{"name":"getSubscription"},{"name":"hasPermission"},{"name":"permissionState"},{"name":"register"},{"name":"registrations"},{"name":"subscribe"},{"name":"unregister"}]},{"name":"ReportingObserver","globalConstructor":true},{"name":"Scheduler","methods":[{"name":"postTask"}]},{"name":"Selection","globalMethods":[{"name":"getSelection"}],"documentMethods":[{"name":"getSelection"}]},{"name":"Sensor","globalConstructors":[{"name":"AbsoluteOrientationSensor"},{"name":"Accelerometer"},{"name":"AmbientLightSensor"},{"name":"GravitySensor"},{"name":"Gyroscope"},{"name":"LinearAccelerationSensor"},{"name":"Magnetometer"},{"name":"RelativeOrientationSensor"}]},{"name":"Share","navigatorMethods":[{"name":"share"},{"name":"canShare"}]},{"name":"SpeechRecognition","globalConstructors":[{"name":"SpeechRecognition"},{"name":"webkitSpeechRecognition"}],"methods":[{"name":"abort"},{"name":"start"},{"name":"stop"}]},{"name":"SpeechSynthesis","globalPropertyMethods":[{"name":"cancel"},{"name":"getVoices"},{"name":"pause"},{"name":"resume"},{"name":"speak"}],"globalProperty":"speechSynthesis"},{"name":"Storage","methods":[{"name":"getItem"},{"name":"setItem"},{"name":"removeItem"},{"name":"clear"},{"name":"key"}]},{"name":"StorageAccess","documentMethods":[{"name":"requestStorageAccess"},{"name":"hasStorageAccess"}]},{"name":"StorageManager","methods":[{"name":"estimate"},{"name":"persist"},{"name":"persisted"}]},{"name":"SubtleCrypto","methods":[{"name":"decrypt"},{"name":"deriveBits"},{"name":"deriveKey"},{"name":"digest"},{"name":"encrypt"},{"name":"exportKey"},{"name":"generateKey"},{"name":"importKey"},{"name":"sign"},{"name":"unwrapKey"},{"name":"verify"},{"name":"wrapKey"}]},{"name":"USB","methods":[{"name":"getDevices"},{"name":"requestDevice"}]},{"name":"Vibration","navigatorMethods":[{"name":"vibrate"}]},{"name":"WakeLock","methods":[{"name":"request"}]},{"name":"WebSocket","globalConstructor":true,"methods":[{"name":"close"},{"name":"send"}]},{"name":"Worker","globalConstructor":true,"methods":[{"name":"postMessage"},{"name":"terminate"}]},{"name":"SharedWorker","globalConstructor":true},{"name":"XMLHttpRequest","globalConstructor":true,"methods":[{"name":"abort"},{"name":"getAllResponseHeaders"},{"name":"getResponseHeader"},{"name":"open"},{"name":"overrideMimeType"},{"name":"send"},{"name":"setRequestHeader"}]}]'),k=JSON.parse('[{"name":"child_process","methods":[{"name":"exec","needsExplicitPermission":true},{"name":"execFile","needsExplicitPermission":true},{"name":"fork"},{"name":"spawn"},{"name":"execFileSync","needsExplicitPermission":true},{"name":"execSync","needsExplicitPermission":true},{"name":"spawnSync"}]},{"name":"cluster","methods":[{"name":"disconnect"},{"name":"fork"},{"name":"setupPrimary"},{"name":"setupMaster"}]},{"name":"dgram","methods":[{"name":"createSocket"}]},{"name":"dns","methods":[{"name":"Resolver","isConstructor":true},{"name":"getServers"},{"name":"lookup"},{"name":"lookupService"},{"name":"resolve"},{"name":"resolve4"},{"name":"resolve6"},{"name":"resolveAny"},{"name":"resolveCname"},{"name":"resolveCaa"},{"name":"resolveMx"},{"name":"resolveNaptr"},{"name":"resolveNs"},{"name":"resolvePtr"},{"name":"resolveSoa"},{"name":"resolveSrv"},{"name":"resolveTxt"},{"name":"reverse"},{"name":"setDefaultResultOrder"},{"name":"setServers"}]},{"name":"fetch","methods":[{"name":"fetch"}],"globalMethod":true},{"name":"eval","methods":[{"name":"eval","needsExplicitPermission":true}],"globalMethod":true},{"name":"Function","methods":[{"name":"Function","needsExplicitPermission":true}],"globalMethod":true},{"name":"fs","methods":[{"name":"access"},{"name":"appendFile"},{"name":"chmod"},{"name":"chown"},{"name":"close"},{"name":"copyFile"},{"name":"cp"},{"name":"createReadStream"},{"name":"createWriteStream"},{"name":"exists"},{"name":"fchmod"},{"name":"fchown"},{"name":"fdatasync"},{"name":"fstat"},{"name":"fsync"},{"name":"ftruncate"},{"name":"futimes"},{"name":"lchmod"},{"name":"lchown"},{"name":"lutimes"},{"name":"link"},{"name":"lstat"},{"name":"mkdir"},{"name":"mkdtemp"},{"name":"open"},{"name":"opendir"},{"name":"read"},{"name":"readdir"},{"name":"readFile"},{"name":"readlink"},{"name":"readv"},{"name":"realpath"},{"name":"rename"},{"name":"rmdir"},{"name":"rm"},{"name":"stat"},{"name":"symlink"},{"name":"truncate"},{"name":"unlink"},{"name":"unwatchFile"},{"name":"utimes"},{"name":"watch"},{"name":"watchFile"},{"name":"write"},{"name":"writeFile"},{"name":"writev"},{"name":"accessSync"},{"name":"appendFileSync"},{"name":"chmodSync"},{"name":"chownSync"},{"name":"closeSync"},{"name":"copyFileSync"},{"name":"cpSync"},{"name":"existsSync"},{"name":"fchmodSync"},{"name":"fchownSync"},{"name":"fdatasyncSync"},{"name":"fstatSync"},{"name":"fsyncSync"},{"name":"ftruncateSync"},{"name":"futimesSync"},{"name":"lchmodSync"},{"name":"lchownSync"},{"name":"lutimesSync"},{"name":"linkSync"},{"name":"lstatSync"},{"name":"mkdirSync"},{"name":"mkdtempSync"},{"name":"openSync"},{"name":"opendirSync"},{"name":"readSync"},{"name":"readdirSync"},{"name":"readFileSync"},{"name":"readlinkSync"},{"name":"readvSync"},{"name":"realpathSync"},{"name":"renameSync"},{"name":"rmdirSync"},{"name":"rmSync"},{"name":"statSync"},{"name":"symlinkSync"},{"name":"truncateSync"},{"name":"unlinkSync"},{"name":"utimesSync"},{"name":"writeSync"},{"name":"writeFileSync"},{"name":"writevSync"}]},{"name":"fs/promises","methods":[{"name":"access"},{"name":"appendFile"},{"name":"chmod"},{"name":"chown"},{"name":"copyFile"},{"name":"cp"},{"name":"lchmod"},{"name":"lchown"},{"name":"lutimes"},{"name":"link"},{"name":"lstat"},{"name":"mkdir"},{"name":"mkdtemp"},{"name":"open"},{"name":"opendir"},{"name":"readdir"},{"name":"readFile"},{"name":"readlink"},{"name":"realpath"},{"name":"rename"},{"name":"rmdir"},{"name":"rm"},{"name":"stat"},{"name":"symlink"},{"name":"truncate"},{"name":"unlink"},{"name":"utimes"},{"name":"watch"},{"name":"writeFile"}]},{"name":"http","methods":[{"name":"Agent"},{"name":"createServer"},{"name":"get"},{"name":"request"}]},{"name":"http2","methods":[{"name":"createServer"},{"name":"createSecureServer"},{"name":"connect"},{"name":"getDefaultSettings"},{"name":"getPackedSettings"},{"name":"getUnpackedSettings"}]},{"name":"https","methods":[{"name":"Agent"},{"name":"createServer"},{"name":"get"},{"name":"request"}]},{"name":"inspector","methods":[{"name":"close"},{"name":"open"},{"name":"url"},{"name":"waitForDebugger"},{"name":"Session","isConstructor":true}]},{"name":"net","methods":[{"name":"Server"},{"name":"Socket"},{"name":"connect"},{"name":"createConnection"},{"name":"createServer"}]},{"name":"os","methods":[{"name":"arch"},{"name":"cpus"},{"name":"endianness"},{"name":"freemem"},{"name":"getPriority"},{"name":"homedir"},{"name":"hostname"},{"name":"loadavg"},{"name":"networkInterfaces"},{"name":"platform"},{"name":"release"},{"name":"setPriority"},{"name":"tmpdir"},{"name":"totalmem"},{"name":"type"},{"name":"uptime"},{"name":"userInfo"},{"name":"version"}]},{"name":"process","methods":[{"name":"abort"},{"name":"chdir"},{"name":"cpuUsage"},{"name":"cwd"},{"name":"disconnect"},{"name":"dlopen","needsExplicitPermission":true},{"name":"emitWarning"},{"name":"exit"},{"name":"getActiveResourcesInfo"},{"name":"getegid"},{"name":"geteuid"},{"name":"getgid"},{"name":"getgroups"},{"name":"getuid"},{"name":"hasUncaughtExceptionCaptureCallback"},{"name":"hrtime"},{"name":"initgroups"},{"name":"kill"},{"name":"memoryUsage"},{"name":"resourceUsage"},{"name":"send"},{"name":"setegid"},{"name":"seteuid"},{"name":"setgid"},{"name":"setgroups"},{"name":"setuid"},{"name":"setSourceMapsEnabled"},{"name":"setUncaughtExceptionCaptureCallback"},{"name":"umask"},{"name":"uptime"},{"name":"on"}]},{"name":"timers","methods":[{"name":"setImmediate"},{"name":"setInterval"},{"name":"setTimeout"},{"name":"clearImmediate"},{"name":"clearInterval"},{"name":"clearTimeout"}]},{"name":"timers/promises","methods":[{"name":"setImmediate"},{"name":"setInterval"},{"name":"setTimeout"}]},{"name":"tls","methods":[{"name":"Server"},{"name":"TLSSocket"},{"name":"checkServerIdentity"},{"name":"connect"},{"name":"createSecureContext"},{"name":"createSecurePair"},{"name":"createServer"},{"name":"getCiphers"}]},{"name":"trace_events","methods":[{"name":"createTracing"},{"name":"getEnabledCategories"}]},{"name":"v8","methods":[{"name":"cachedDataVersionTag"},{"name":"getHeapCodeStatistics"},{"name":"getHeapSnapshot"},{"name":"getHeapSpaceStatistics"},{"name":"getHeapStatistics"},{"name":"setFlagsFromString"},{"name":"stopCoverage"},{"name":"takeCoverage"},{"name":"writeHeapSnapshot"},{"name":"serialize"},{"name":"deserialize"}]},{"name":"vm","methods":[{"name":"Script","isConstructor":true,"needsExplicitPermission":true},{"name":"SourceTextModule"},{"name":"SyntheticModule"},{"name":"compileFunction"},{"name":"createContext"},{"name":"isContext"},{"name":"measureMemory"},{"name":"runInContext","needsExplicitPermission":true},{"name":"runInNewContext","needsExplicitPermission":true},{"name":"runInThisContext","needsExplicitPermission":true}]},{"name":"wasi","methods":[{"name":"WASI","isConstructor":true,"needsExplicitPermission":true}]},{"name":"worker_threads","methods":[{"name":"Worker","isConstructor":true},{"name":"getEnvironmentData"},{"name":"markAsUntransferable"},{"name":"moveMessagePortToContext"},{"name":"receiveMessageOnPort"},{"name":"setEnvironmentData"}]}]');var j=["debug","info","warn","error"],U={level:"warn"};j.forEach((function(e){U[e]=function(){var t;U.level&&j.indexOf(U.level)<=j.indexOf(e)&&(t=console)[e].apply(t,arguments)}}));const T=U;function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){return function(e){if(Array.isArray(e))return G(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return G(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?G(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:[];Array.isArray(e)&&(ce=ne(e.filter((function(e){return e&&e.path&&e.name}))))},me=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Array.isArray(e)&&(se=-1!==e.findIndex((function(e){return"root"===e.module}))?ne(e):[ae].concat(ne(e)))},de=function(e){var t=["bind"].concat(ne(e.map((function(e){return e.name}))));se=[{module:/.*/,permissions:t},{module:"root",permissions:t}]},ge=function(e){var t=null==e?void 0:e.file,n=t,r=null==e?void 0:e.line,o=null==e?void 0:e.column;if(t&&null!=le&&le[t]){var i=le[t].originalPositionFor({line:e.line,column:e.column});n=i.source,r=i.line,o=i.column}return{item:e,mapping:n,mappingLine:r,mappingColumn:o}},ye=function(e,t){var n,r,o="root";if(e&&"string"==typeof e)if(e.startsWith("node:"))o=(n=e.split("/"),r=1,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(n,r)||re(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];else if(e.includes("node_modules"))o=function(e){var t=e.split("/"),n=t.lastIndexOf("node_modules"),r=t[n+1];if(r.startsWith("@")){var o=t[n+2];o&&(r="".concat(r,"/").concat(o))}return r}(e);else if(t&&e.includes("://"))o=e;else{var i=ce.find((function(t){var n=t.path;return e.includes(n)}));i&&(o=i.name)}else o=void 0;return o},ve=function(e){var t,n=[];return e.forEach((function(e){t!==e&&(t=e,n.push(e))})),n},be=function(e){var t=ne(e),n=t.lastIndexOf("root");-1!==n&&(t=t.slice(n+1));for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=e.stack,n=e.allowURLs,r=void 0!==n&&n;try{var o=(t||l()).map((function(e){return ge(e)})).map((function(e){var t=e.item,n=e.mapping,o=e.mappingLine,i=e.mappingColumn,a=ye(n,r);return{caller:t.caller,called:t.called,name:t.name,alias:t.alias,file:t.file,fileLine:t.line,fileColumn:t.column,mapping:n,mappingLine:o,mappingColumn:i,module:a}})),i=o.find((function(e){return"sandworm"!==e.module})),a=o.find((function(e){var t=e.module;return"sandworm"!==t&&void 0!==t&&!t.startsWith("node:")})),s=o.reverse().map((function(e){var t=e.module;return ue.includes(t)||null!=t&&t.startsWith("node:")?void 0:t})).filter((function(e){return void 0!==e})),u="root",c=!1;if(s.length){var f=ve(s),h=be(f);u=h.join(">")||"root",c=!!s.find((function(e){return e.startsWith("chrome-extension://")||e.startsWith("moz-extension://")}))}return{name:u,stack:o,directCaller:i,lastModuleCaller:a,isExtension:c}}catch(e){return T.error(e),{name:"root",error:e.message}}},Se=function(e){var t=e.module,n=e.family,r=e.method,o=function(e){if(Object.keys(ie).includes(e))return ie[e];var t=se.find((function(t){return t.module===e}));if(t)return ie[e]=t.permissions,t.permissions;var n=se.find((function(t){var n=t.module;return n instanceof RegExp&&e.match(n)}));return n?(ie[e]=n.permissions,n.permissions):(ie[e]=!1,!1)}(t);return"boolean"!=typeof o||r.needsExplicitPermission?!!Array.isArray(o)&&(o.includes(n.name)||o.includes("".concat(n.name,".").concat(r.name))||!r.needsExplicitPermission&&o.includes("*")):o};function _e(e){return _e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_e(e)}function Ee(e,t){if(t&&("object"===_e(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ae(e){var t="function"==typeof Map?new Map:void 0;return Ae=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Ce(e,arguments,xe(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Le(r,e)},Ae(e)}function Ce(e,t,n){return Ce=Oe()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Le(o,n.prototype),o},Ce.apply(null,arguments)}function Oe(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Le(e,t){return Le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Le(e,t)}function xe(e){return xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xe(e)}var Me=!0,Re=function(){},Ie=function(e){Me=!!e},Pe=function(e){"function"==typeof e&&(Re=e)},Be=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Le(e,t)}(i,e);var t,n,r,o=(t=i,n=Oe(),function(){var e,r=xe(t);if(n){var o=xe(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Ee(this,e)});function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this,e)).name="SandwormError",t}return r=i,Object.defineProperty(r,"prototype",{writable:!1}),r}(Ae(Error));function ke(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r2&&void 0!==arguments[2]?arguments[2]:function(){};return function(){for(var r,o,i,a=we({allowURLs:!0}),s=a.name,u=a.stack,c=a.directCaller,l=a.lastModuleCaller,f=a.isExtension,h=a.error,p=arguments.length,m=new Array(p),d=0;d ".concat(s,">").concat(e.name,".").concat(t.name," has been allowed"),l?"as a consequence of `".concat(l.module,"` calling `").concat(l.alias||l.name,".").concat(l.called,"`"):""),i=!0):(T.debug("".concat(s," called ").concat(e.name,".").concat(t.name)),i=Se({module:s,family:e,method:t}),n({module:s,family:e.name,method:t.name,args:m,allowed:i,stack:u,error:h})),i)return t.isConstructor?ke.apply(void 0,[t.original].concat(m)):t.original.apply(this,m);var g="".concat(e.name,".").concat(t.name);T.error("".concat(s," was blocked from calling ").concat(g," with"),m);var y=new Be("Sandworm: access denied (".concat(s," called ").concat(g,")"));y.module=s,y.method="".concat(g);try{Re(y)}catch(e){}throw y}};const Ue=function(e){var t=e.family,n=e.track,r=void 0===n?function(){}:n;t.available&&t.methods.forEach((function(e){if(e.original=t.originalRoot()[e.name],e.original){T.debug("installing ".concat(t.name,".").concat(e.name)),e.originalBind=e.original.bind;var n=je(t,e,r);for(var o in e.original)Object.prototype.hasOwnProperty.call(e.original,o)&&(n[o]=e.original[o]);n.prototype=e.original.prototype,n.bind=je({name:"bind"},{name:"args",original:e.originalBind,minArgsToTrigger:2},r),t.originalRoot()[e.name]=n}}))};var Te=n(244);function Ne(e){return Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ne(e)}function Fe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return De(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?De(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function De(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:A(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}function $e(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function qe(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){$e(i,r,o,a,s,"next",e)}function s(e){$e(i,r,o,a,s,"throw",e)}a(void 0)}))}}var We=!1,ze=!1,He=[],Ye=!1,Ve=P(),Xe=function(e){return"[object Object]"===Object.prototype.toString.call(e)},Je=function(){return We||Ve===R&&self.sandwormInitialized||Ve===M&&n.g.sandwormInitialized},Ke=function(){We=!0,Ve===R?self.sandwormInitialized=!0:Ve===M&&(n.g.sandwormInitialized=!0)};const Qe={init:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.loadSourceMaps,n=void 0===t?Ve===R:t,r=e.devMode,o=void 0!==r&&r,i=e.verbose,a=void 0!==i&&i,s=e.skipTracking,u=void 0!==s&&s,c=e.trackingIP,f=e.trackingPort,h=e.ignoreExtensions,p=void 0===h||h,m=e.trustedModules,d=void 0===m?[]:m,g=e.permissions,y=void 0===g?[]:g,v=e.onAccessDenied,b=e.aliases,w=void 0===b?[]:b;try{if(Je())return T.warn("already initialized"),Promise.resolve();var S=we({allowURLs:!1}),_=S.name;if(!["root","mocha>sandworm-mocha"].includes(_))return T.warn("only root may call init (called from ".concat(_,")")),Promise.resolve();"boolean"!=typeof o?(T.warn("devMode option must be a boolean, defaulting to false"),Ye=!1):Ye=o,!0===a&&(T.level="debug"),K(u),ee(c,f),Array.isArray(d)?he(d):T.warn("trustedModules option must be an array, defaulting to empty array"),Ie(p),Pe(v),pe(w);var E=[];return Ve===R?E=(0,Te.buildWebLibraryFrom)(B):Ve===M?E=(0,Te.buildNodeLibraryFrom)(k):T.debug("current platform is not supported"),Ye?de(E):y&&(Array.isArray(y)?me(y):T.warn("permissions option must be an array, defaulting to empty array")),E.forEach((function(e){Ue({family:e,track:function(e){Ye&&ze&&(He.push(e),te(e))}})})),Ke(),qe(Ge().mark((function e(){var t,r;return Ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!n){e.next=18;break}if(!0!==n){e.next=13;break}return t=l()[1],r=t.file,e.t0=fe,e.t1=r,e.next=9,A(r);case 9:e.t2=e.sent,(0,e.t0)(e.t1,e.t2),e.next=17;break;case 13:if(!Xe(n)){e.next=17;break}return e.next=16,Promise.all(Object.keys(n).map(function(){var e=qe(Ge().mark((function e(t){return Ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=t,e.next=3,C(n[t]);case 3:return e.t1=e.sent,e.abrupt("return",[e.t0,e.t1]);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 16:e.sent.forEach((function(e){var t=Fe(e,2),n=t[0],r=t[1];fe(n,r)}));case 17:T.debug("loaded source maps");case 18:e.next=23;break;case 20:e.prev=20,e.t3=e.catch(0),T.error(e.t3);case 23:return e.prev=23,ze=!0,T.debug("initialized"),e.finish(23);case 27:case"end":return e.stop()}}),e,null,[[0,20,23,27]])})))()}catch(e){return T.error(e),ze=!0,T.debug("initialized with errors"),Promise.resolve()}},getHistory:function(){return Ye?He:[]},clearHistory:function(){Ye&&(He=[])},Error:Be}})(),r.default})())); \ No newline at end of file diff --git a/src/module.js b/src/module.js index 4891c7c..4b8b70a 100644 --- a/src/module.js +++ b/src/module.js @@ -78,7 +78,7 @@ export const mapStackItemToSource = (item) => { export const getNodeModuleName = (location) => { const components = location.split('/'); - const nodeModulesIndex = components.findIndex((v) => v === 'node_modules'); + const nodeModulesIndex = components.lastIndexOf('node_modules'); let moduleName = components[nodeModulesIndex + 1]; // Names starting with `@` are organizations, so it's good to get // a bit more context by also grabbing the next path component diff --git a/tests/unit/module.test.js b/tests/unit/module.test.js index 59332a7..4c9cada 100644 --- a/tests/unit/module.test.js +++ b/tests/unit/module.test.js @@ -261,6 +261,14 @@ describe('module', () => { ).toBe('lodash'); }); + test('should indicate module name for a nested node-modules path', () => { + expect( + getModuleNameFromLocation( + '/Users/jason/code/sandworm/node_modules/lodash/node_modules/react/index.js', + ), + ).toBe('react'); + }); + test('should grab full name for org paths', () => { expect( getModuleNameFromLocation(