Repository: masotime/json-url
Branch: master
Commit: f048e1b19376
Files: 55
Total size: 471.2 KB
Directory structure:
gitextract_mxai2kco/
├── .babelrc
├── .editorconfig
├── .eslintignore
├── .eslintrc
├── .gitignore
├── .npmignore
├── .nycrc
├── .travis.yml
├── LICENSE
├── README.md
├── dist/
│ ├── browser/
│ │ ├── json-url-998.js
│ │ ├── json-url-998.js.LICENSE.txt
│ │ ├── json-url-lzma.js
│ │ ├── json-url-lzstring.js
│ │ ├── json-url-lzw.js
│ │ ├── json-url-msgpack.js
│ │ ├── json-url-safe64.js
│ │ ├── json-url-safe64.js.LICENSE.txt
│ │ ├── json-url-single.js
│ │ ├── json-url-single.js.LICENSE.txt
│ │ ├── json-url.js
│ │ └── json-url.js.LICENSE.txt
│ └── node/
│ ├── browser-index.js
│ ├── codecs/
│ │ ├── index.js
│ │ ├── lzma.js
│ │ ├── lzstring.js
│ │ ├── lzw.js
│ │ └── pack.js
│ ├── index.js
│ ├── loaders.js
│ └── main/
│ ├── browser-index.js
│ ├── codecs/
│ │ ├── index.js
│ │ ├── lzma.js
│ │ ├── lzstring.js
│ │ ├── lzw.js
│ │ └── pack.js
│ ├── index.js
│ └── loaders.js
├── eslint.config.js
├── examples/
│ └── browser/
│ └── test.html
├── karma.conf.js
├── package.json
├── src/
│ └── main/
│ ├── browser-index.js
│ ├── codecs/
│ │ ├── index.js
│ │ ├── lzma.js
│ │ ├── lzstring.js
│ │ ├── lzw.js
│ │ └── pack.js
│ ├── index.js
│ └── loaders.js
├── test/
│ ├── index.js
│ ├── perf.js
│ └── samples.json
├── webpack.config.js
└── webpack.config.single.js
================================================
FILE CONTENTS
================================================
================================================
FILE: .babelrc
================================================
{
"presets": [
"@babel/preset-env"
],
"plugins": [
[
"module-resolver",
{
"root": [
"src"
],
"transformFunctions": [
"require",
"require.resolve",
"import"
]
}
],
"dynamic-import-node",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-json-strings",
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions",
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-logical-assignment-operators",
"@babel/plugin-proposal-optional-chaining",
[
"@babel/plugin-proposal-pipeline-operator",
{
"proposal": "minimal"
}
],
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-proposal-do-expressions",
"@babel/plugin-proposal-function-bind"
],
"env": {
"test": {
"plugins": [
"istanbul"
]
}
}
}
================================================
FILE: .editorconfig
================================================
# top-most EditorConfig file
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = tab
indent_size = 2
trim_trailing_whitespace = true
================================================
FILE: .eslintignore
================================================
dist/**/*
================================================
FILE: .eslintrc
================================================
{
"parser": "babel-eslint",
"plugins": [ "import" ],
"extends": [ "eslint:recommended", "plugin:import/recommended" ],
"settings": {
"import/resolver": {
"babel-module": {}
}
},
"rules": {
"no-undef": 2,
"no-unused-vars": 2,
"no-console": 0
},
"env": {
"node": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 2015,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"experimentalObjectRestSpread": true,
"forOf": true
}
}
}
================================================
FILE: .gitignore
================================================
node_modules
*.log
.DS_Store
coverage/
.nyc_output/
stats.json
================================================
FILE: .npmignore
================================================
*.log
test/
examples/
.DS_Store
coverage/
.nyc_output/
================================================
FILE: .nycrc
================================================
{
"include": [ "src/**/*.js" ],
"require": [ "@babel/register", "@babel/polyfill" ],
"sourceMap": false,
"instrument": false,
"reporter": [ "text", "lcov" ]
}
================================================
FILE: .travis.yml
================================================
language: node_js
node_js:
- "node"
- "14"
- "12"
- "10"
after_success: npm run coverage
install: npm install
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) Facebook, Inc. and its affiliates.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# json-url
[![npm downloads][downloads-image]][downloads-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage Status][coverage-image]][coverage-url]
Generate URL-safe representations of some arbtirary JSON data in as small a space as possible that can be shared in a bookmark / link.
Although designed to work in Node, a standalone client-side library is provided that can be used directly on the browser.
## Usage
### Compress
```
var codec = require('json-url')('lzw');
var obj = { one: 1, two: 2, three: [1,2,3], four: 'red pineapples' };
codec.compress(obj).then(result => console.log(result));
/* Result: woTCo29uZQHCo3R3bwLCpXRocmVlwpMBAgPCpGZvdXLCrsSOZCBwacSDYXBwbGVz */
```
### Decompress
```
var codec = require('json-url')('lzma');
codec.decompress(someCompressedString).then(json => { /* operate on json */ })
```
### Stats
```
var codec = require('json-url')('lzstring');
codec.stats(obj).then(
({ rawencoded, compressedencoded, compression }) => {
console.log(`Raw URI-encoded JSON string length: ${rawencoded}`);
console.log(`Compressed URI-encoded JSON string length: ${compressedencoded}`);
console.log(`Compression ratio (raw / compressed): ${compression}`);
}
);
```
### Standalone Browser Bundle
```
```
To see it in action, download the source code and run `npm run example`, or simply visit [this link](http://jsbin.com/cayuhox).
* The browser bundle is generated using Webpack and consists of multiple chunks, with the main chunk entry point located at `dist/browser/json-url.js`. Chunks must be located in the same folder as the main module itself.
* I've tried my best to reduce the bundle sizes, but the module (at least the entry) is still surprisingly large on the browser (56kb minified, 20kb gzipped). Most of it is due to the buffer.js shim, and partly due to the regenerator-runtime - I may revisit this later to try and improve efficiency.
## Usage Notes
* Although not all algorithms are asynchronous, all functions return Promises to ensure compatibility.
* Instantiate an instance with appropriate compression codec before using.
* Valid codecs:
* lzw
* lzma
* lzstring - runs lzstring against a stringified JSON instead of using MessagePack on JSON
* pack - this just uses MessagePack and converts the binary buffer into a Base64 URL-safe representation, without any other compression
## Motivation
Typically when you want to shorten a long URL with large amounts of data parameters, the approach is to generate a "short URL" where compression is achieved by using a third-party service which stores the true URL and redirects the user (e.g. bit.ly or goo.gl).
However, if you want to:
* share bookmarks with virtually unlimited combinations of state and/or
* want to avoid the third-party dependency
you would encode the data structure (typically JSON) in your URL, but this often results in very large URLs.
This approach differs by removing that third-party dependency and encodes it using common compression algorithms such as LZW or LZMA.
Note: It is arguable that a custom dictionary / domain specific encoding would ultimately provide better compression, but here we want to
* avoid maintaining such a dictionary and/or
* retain cross-application compatibility (otherwise you need a shared dictionary)
## Approach
I explored several options, the most popular one being [MessagePack][1]. However, I noticed that it did not give the best possible compression as compared to [LZMA][2] and [LZW][3].
At first I tried to apply the binary compression directly on a stringified JSON, then I realised that packing it first resulted in better compression.
For small JS objects, LZW largely outperformed LZMA, but for the most part you'd probably be looking to compress large JSON data rather than small amounts (otherwise a simple stringify + base64 is sufficient). You can choose to use whatever codec suits you best.
In addition, there is now support for [LZSTRING][5], although the URI encoding still uses urlsafe-base64 because LZSTRING still uses unsafe characters via their `compressToURIEncodedString` method - notably the [`+` character][6]
Finally, I went with [urlsafe-base64][4] to encode it in a URL-friendly format.
## TODO
Find a way to improve bundle sizes for browser usage.
[1]: http://msgpack.org/index.html
[2]: https://www.npmjs.com/package/lzma
[3]: https://www.npmjs.com/package/node-lzw
[4]: https://www.npmjs.com/package/urlsafe-base64
[5]: http://pieroxy.net/blog/pages/lz-string/index.html
[6]: https://github.com/pieroxy/lz-string/blob/master/libs/lz-string.js#L15
[downloads-image]: https://img.shields.io/npm/dm/json-url.svg?style=flat-square
[downloads-url]: https://www.npmjs.com/package/json-url
[travis-image]: https://travis-ci.org/masotime/json-url.svg?bxeranch=master
[travis-url]: https://travis-ci.org/masotime/json-url
[daviddm-image]: https://david-dm.org/masotime/json-url.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/masotime/json-url
[coverage-image]: https://coveralls.io/repos/github/masotime/json-url/badge.svg?branch=master
[coverage-url]: https://coveralls.io/github/masotime/json-url?branch=master
================================================
FILE: dist/browser/json-url-998.js
================================================
/*! For license information please see json-url-998.js.LICENSE.txt */
(self.webpackChunkJsonUrl=self.webpackChunkJsonUrl||[]).push([[998],{41:(t,e,r)=>{"use strict";var n=r(655),o=r(8068),i=r(9675),a=r(5795);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new i("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var u=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,f=arguments.length>6&&arguments[6],l=!!a&&a(t,e);if(n)n(t,e,{configurable:null===c&&l?l.configurable:!c,enumerable:null===u&&l?l.enumerable:!u,value:r,writable:null===s&&l?l.writable:!s});else{if(!f&&(u||s||c))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},63:(t,e,r)=>{"use strict";const n=r(8399).Transform,o=r(6698),i=r(4829);function a(t){(t=t||{}).objectMode=!0,t.highWaterMark=16,n.call(this,t),this._msgpack=t.msgpack}function u(t){if(!(this instanceof u))return(t=t||{}).msgpack=this,new u(t);a.call(this,t),this._wrap="wrap"in t&&t.wrap}function s(t){if(!(this instanceof s))return(t=t||{}).msgpack=this,new s(t);a.call(this,t),this._chunks=i(),this._wrap="wrap"in t&&t.wrap}o(a,n),o(u,a),u.prototype._transform=function(t,e,r){let n=null;try{n=this._msgpack.encode(this._wrap?t.value:t).slice(0)}catch(t){return this.emit("error",t),r()}this.push(n),r()},o(s,a),s.prototype._transform=function(t,e,r){t&&this._chunks.append(t);try{let t=this._msgpack.decode(this._chunks);this._wrap&&(t={value:t}),this.push(t)}catch(t){return void(t instanceof this._msgpack.IncompleteBufferError?r():this.emit("error",t))}this._chunks.length>0?this._transform(null,e,r):r()},t.exports.decoder=s,t.exports.encoder=u},76:t=>{"use strict";t.exports=Function.prototype.call},345:(t,e,r)=>{t.exports=r(7007).EventEmitter},414:t=>{"use strict";t.exports=Math.round},453:(t,e,r)=>{"use strict";var n,o=r(9612),i=r(9383),a=r(1237),u=r(9290),s=r(9538),c=r(8068),f=r(9675),l=r(5345),p=r(1514),h=r(8968),y=r(6188),d=r(8002),g=r(5880),b=r(414),v=r(3093),m=Function,w=function(t){try{return m('"use strict"; return ('+t+").constructor;")()}catch(t){}},S=r(5795),E=r(655),_=function(){throw new f},O=S?function(){try{return _}catch(t){try{return S(arguments,"callee").get}catch(t){return _}}}():_,j=r(4039)(),A=r(3628),x=r(1064),R=r(8648),k=r(1002),P=r(76),T={},M="undefined"!=typeof Uint8Array&&A?A(Uint8Array):n,I={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":j&&A?A([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":T,"%AsyncGenerator%":T,"%AsyncGeneratorFunction%":T,"%AsyncIteratorPrototype%":T,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":"undefined"==typeof Float16Array?n:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":T,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":j&&A?A(A([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&j&&A?A((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":o,"%Object.getOwnPropertyDescriptor%":S,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":u,"%ReferenceError%":s,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&j&&A?A((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":j&&A?A(""[Symbol.iterator]()):n,"%Symbol%":j?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":O,"%TypedArray%":M,"%TypeError%":f,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet,"%Function.prototype.call%":P,"%Function.prototype.apply%":k,"%Object.defineProperty%":E,"%Object.getPrototypeOf%":x,"%Math.abs%":p,"%Math.floor%":h,"%Math.max%":y,"%Math.min%":d,"%Math.pow%":g,"%Math.round%":b,"%Math.sign%":v,"%Reflect.getPrototypeOf%":R};if(A)try{null.error}catch(t){var L=A(A(t));I["%Error.prototype%"]=L}var N=function t(e){var r;if("%AsyncFunction%"===e)r=w("async function () {}");else if("%GeneratorFunction%"===e)r=w("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=w("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&A&&(r=A(o.prototype))}return I[e]=r,r},U={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},B=r(6743),F=r(9957),D=B.call(P,Array.prototype.concat),C=B.call(k,Array.prototype.splice),q=B.call(P,String.prototype.replace),W=B.call(P,String.prototype.slice),G=B.call(P,RegExp.prototype.exec),V=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,$=/\\(\\)?/g,H=function(t,e){var r,n=t;if(F(U,n)&&(n="%"+(r=U[n])[0]+"%"),F(I,n)){var o=I[n];if(o===T&&(o=N(n)),void 0===o&&!e)throw new f("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new c("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new f("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new f('"allowMissing" argument must be a boolean');if(null===G(/^%?[^%]*%?$/,t))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=W(t,0,1),r=W(t,-1);if("%"===e&&"%"!==r)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return q(t,V,function(t,e,r,o){n[n.length]=r?q(o,$,"$1"):e||t}),n}(t),n=r.length>0?r[0]:"",o=H("%"+n+"%",e),i=o.name,a=o.value,u=!1,s=o.alias;s&&(n=s[0],C(r,D([0,1],s)));for(var l=1,p=!0;l=r.length){var g=S(a,h);a=(p=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:a[h]}else p=F(a,h),a=a[h];p&&!u&&(I[i]=a)}}return a}},487:(t,e,r)=>{"use strict";var n=r(6897),o=r(655),i=r(3126),a=r(2205);t.exports=function(t){var e=i(arguments),r=t.length-(arguments.length-1);return n(e,1+(r>0?r:0),!0)},o?o(t.exports,"apply",{value:a}):t.exports.apply=a},537:(t,e,r)=>{var n=r(5606),o=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),u=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&e._extend(n,r),m(n.showHidden)&&(n.showHidden=!1),m(n.depth)&&(n.depth=2),m(n.colors)&&(n.colors=!1),m(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),l(n,t,n.depth)}function c(t,e){var r=s.styles[e];return r?"["+s.colors[r][0]+"m"+t+"["+s.colors[r][1]+"m":t}function f(t,e){return t}function l(t,r,n){if(t.customInspect&&r&&O(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,t);return v(o)||(o=l(t,o,n)),o}var i=function(t,e){if(m(e))return t.stylize("undefined","undefined");if(v(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(b(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(g(e))return t.stylize("null","null")}(t,r);if(i)return i;var a=Object.keys(r),u=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),_(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return p(r);if(0===a.length){if(O(r)){var s=r.name?": "+r.name:"";return t.stylize("[Function"+s+"]","special")}if(w(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return t.stylize(Date.prototype.toString.call(r),"date");if(_(r))return p(r)}var c,f="",S=!1,j=["{","}"];(y(r)&&(S=!0,j=["[","]"]),O(r))&&(f=" [Function"+(r.name?": "+r.name:"")+"]");return w(r)&&(f=" "+RegExp.prototype.toString.call(r)),E(r)&&(f=" "+Date.prototype.toUTCString.call(r)),_(r)&&(f=" "+p(r)),0!==a.length||S&&0!=r.length?n<0?w(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=S?function(t,e,r,n,o){for(var i=[],a=0,u=e.length;a=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(n>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(c,f,j)):j[0]+f+j[1]}function p(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,o,i){var a,u,s;if((s=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]}).get?u=s.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):s.set&&(u=t.stylize("[Setter]","special")),R(n,o)||(a="["+o+"]"),u||(t.seen.indexOf(s.value)<0?(u=g(r)?l(t,s.value,null):l(t,s.value,r-1)).indexOf("\n")>-1&&(u=i?u.split("\n").map(function(t){return" "+t}).join("\n").slice(2):"\n"+u.split("\n").map(function(t){return" "+t}).join("\n")):u=t.stylize("[Circular]","special")),m(a)){if(i&&o.match(/^\d+$/))return u;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+u}function y(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function g(t){return null===t}function b(t){return"number"==typeof t}function v(t){return"string"==typeof t}function m(t){return void 0===t}function w(t){return S(t)&&"[object RegExp]"===j(t)}function S(t){return"object"==typeof t&&null!==t}function E(t){return S(t)&&"[object Date]"===j(t)}function _(t){return S(t)&&("[object Error]"===j(t)||t instanceof Error)}function O(t){return"function"==typeof t}function j(t){return Object.prototype.toString.call(t)}function A(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!a[t])if(u.test(t)){var r=n.pid;a[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else a[t]=function(){};return a[t]},e.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=r(9032),e.isArray=y,e.isBoolean=d,e.isNull=g,e.isNullOrUndefined=function(t){return null==t},e.isNumber=b,e.isString=v,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=m,e.isRegExp=w,e.types.isRegExp=w,e.isObject=S,e.isDate=E,e.types.isDate=E,e.isError=_,e.types.isNativeError=_,e.isFunction=O,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(1135);var x=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function R(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,r;console.log("%s - %s",(t=new Date,r=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":"),[t.getDate(),x[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=r(6698),e._extend=function(t,e){if(!e||!S(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var k="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function P(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(k&&t[k]){var e;if("function"!=typeof(e=t[k]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,k,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise(function(t,n){e=t,r=n}),o=[],i=0;i{"use strict";var n=r(655),o=function(){return!!n};o.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},655:t=>{"use strict";var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}t.exports=e},1002:t=>{"use strict";t.exports=Function.prototype.apply},1064:(t,e,r)=>{"use strict";var n=r(9612);t.exports=n.getPrototypeOf||null},1093:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var r=e.call(t),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),n}},1135:t=>{t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},1189:(t,e,r)=>{"use strict";var n=Array.prototype.slice,o=r(1093),i=Object.keys,a=i?function(t){return i(t)}:r(8875),u=Object.keys;a.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return o(t)?u(n.call(t)):u(t)})}else Object.keys=a;return Object.keys||a},t.exports=a},1237:t=>{"use strict";t.exports=EvalError},1333:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},1514:t=>{"use strict";t.exports=Math.abs},2205:(t,e,r)=>{"use strict";var n=r(6743),o=r(1002),i=r(3144);t.exports=function(){return i(n,o,arguments)}},2299:(t,e,r)=>{"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],s=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);s=!0);}catch(t){c=!0,o=t}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(t,e)}(t,e)||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 o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r10)return!0;for(var e=0;e57)return!0}return 10===t.length&&t>=Math.pow(2,32)}function I(t){return Object.keys(t).filter(M).concat(f(t).filter(Object.prototype.propertyIsEnumerable.bind(t)))}function L(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o{"use strict";var n=r(8452),o=r(6642);t.exports=function(){var t=o();return n(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}},2682:(t,e,r)=>{"use strict";var n=r(9600),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){if(!n(e))throw new TypeError("iterator must be a function");var a,u;arguments.length>=3&&(a=r),u=t,"[object Array]"===o.call(u)?function(t,e,r){for(var n=0,o=t.length;n{"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function o(t){for(var e=1;e0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e=s.allocUnsafe(t>>>0),r=this.head,n=0;r;)l(r.data,e,n),n+=r.data.length,r=r.next;return e}},{key:"consume",value:function(t,e){var r;return to.length?o.length:t;if(i===o.length?n+=o:n+=o.slice(0,t),0===(t-=i)){i===o.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=o.slice(i));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var o=r.data,i=t>o.length?o.length:t;if(o.copy(e,e.length-t,0,i),0===(t-=i)){i===o.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=o.slice(i));break}++n}return this.length-=n,e}},{key:f,value:function(t,e){return c(this,o(o({},e),{},{depth:0,customInspect:!1}))}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}()},2861:(t,e,r)=>{var n=r(8287),o=n.Buffer;function i(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return o(t,e,r)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?t.exports=n:(i(n,e),e.Buffer=a),a.prototype=Object.create(o.prototype),i(o,a),a.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return o(t,e,r)},a.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=o(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return o(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},2955:(t,e,r)=>{"use strict";var n,o=r(5606);function i(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var a=r(6238),u=Symbol("lastResolve"),s=Symbol("lastReject"),c=Symbol("error"),f=Symbol("ended"),l=Symbol("lastPromise"),p=Symbol("handlePromise"),h=Symbol("stream");function y(t,e){return{value:t,done:e}}function d(t){var e=t[u];if(null!==e){var r=t[h].read();null!==r&&(t[l]=null,t[u]=null,t[s]=null,e(y(r,!1)))}}function g(t){o.nextTick(d,t)}var b=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var t=this,e=this[c];if(null!==e)return Promise.reject(e);if(this[f])return Promise.resolve(y(void 0,!0));if(this[h].destroyed)return new Promise(function(e,r){o.nextTick(function(){t[c]?r(t[c]):e(y(void 0,!0))})});var r,n=this[l];if(n)r=new Promise(function(t,e){return function(r,n){t.then(function(){e[f]?r(y(void 0,!0)):e[p](r,n)},n)}}(n,this));else{var i=this[h].read();if(null!==i)return Promise.resolve(y(i,!1));r=new Promise(this[p])}return this[l]=r,r}},Symbol.asyncIterator,function(){return this}),i(n,"return",function(){var t=this;return new Promise(function(e,r){t[h].destroy(null,function(t){t?r(t):e(y(void 0,!0))})})}),n),b);t.exports=function(t){var e,r=Object.create(v,(i(e={},h,{value:t,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,c,{value:null,writable:!0}),i(e,f,{value:t._readableState.endEmitted,writable:!0}),i(e,p,{value:function(t,e){var n=r[h].read();n?(r[l]=null,r[u]=null,r[s]=null,t(y(n,!1))):(r[u]=t,r[s]=e)},writable:!0}),e));return r[l]=null,a(t,function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[s];return null!==e&&(r[l]=null,r[u]=null,r[s]=null,e(t)),void(r[c]=t)}var n=r[u];null!==n&&(r[l]=null,r[u]=null,r[s]=null,n(y(void 0,!0))),r[f]=!0}),t.on("readable",g.bind(null,r)),r}},3003:t=>{"use strict";t.exports=function(t){return t!=t}},3070:(t,e,r)=>{"use strict";const n=r(4829),o=r(4571).N,i={196:2,197:3,198:5,199:3,200:4,201:6,202:5,203:9,204:2,205:3,206:5,207:9,208:2,209:3,210:5,211:9,212:3,213:4,214:6,215:10,216:18,217:2,218:3,219:5,222:3,220:3,221:5};function a(t,e,r){return e>=r+t}function u(t,e,r,n,o){let i=e;const a=[];let u=0;for(;u++=192&&c<=195)return function(t){if(192===t)return[null,1];if(194===t)return[!1,1];if(195===t)return[!0,1]}(c);if(c>=196&&c<=198){const e=t.readUIntBE(o,l-1);if(o+=l-1,!a(e,n,l))return null;return[t.slice(o,o+e),l+e]}if(c>=199&&c<=201){const e=t.readUIntBE(o,l-2);o+=l-2;const i=t.readInt8(o);return o+=1,a(e,n,l)?f(t,o,i,e,l,r):null}if(c>=202&&c<=203)return function(t,e,r){let n;4===r&&(n=t.readFloatBE(e));8===r&&(n=t.readDoubleBE(e));return[n,r+1]}(t,o,l-1);if(c>=204&&c<=207)return function(t,e,r){const n=e+r;let o=0;for(;e=208&&c<=211)return function(t,e,r){let n;1===r&&(n=t.readInt8(e));2===r&&(n=t.readInt16BE(e));4===r&&(n=t.readInt32BE(e));8===r&&(n=function(t,e){var r=!(128&~t[e]);if(r){let r=1;for(let n=e+7;n>=e;n--){const e=(255^t[n])+r;t[n]=255&e,r=e>>8}}const n=t.readUInt32BE(e+0),o=t.readUInt32BE(e+4);return(4294967296*n+o)*(r?-1:1)}(t.slice(e,e+8),0));return[n,r+1]}(t,o,l-1);if(c>=212&&c<=216){const e=t.readInt8(o);return o+=1,f(t,o,e,l-2,2,r)}if(c>=217&&c<=219){const e=t.readUIntBE(o,l-1);if(o+=l-1,!a(e,n,l))return null;return[t.toString("utf8",o,o+e),l+e]}if(c>=220&&c<=221){const e=t.readUIntBE(o,l-1);return o+=l-1,u(t,o,e,l,r)}if(c>=222&&c<=223){let e;switch(c){case 222:return e=t.readUInt16BE(o),o+=2,s(t,o,e,3,r);case 223:return e=t.readUInt32BE(o),o+=4,s(t,o,e,5,r)}}if(c>=224)return[c-256,1];throw new Error("not implemented yet")}function f(t,e,r,n,o,i){const a=t.slice(e,e+n),u=i.decodingTypes.get(r);if(!u)throw new Error("unable to find ext type "+r);return[u(a),o+n]}t.exports=function(t,e){const r={decodingTypes:t,options:e,decode:i};return i;function i(t){n.isBufferList(t)||(t=n(t));const e=c(t,0,r);if(!e)throw new o;return t.consume(e[1]),e[0]}}},3093:(t,e,r)=>{"use strict";var n=r(4459);t.exports=function(t){return n(t)||0===t?t:t<0?-1:1}},3126:(t,e,r)=>{"use strict";var n=r(6743),o=r(9675),i=r(76),a=r(3144);t.exports=function(t){if(t.length<1||"function"!=typeof t[0])throw new o("a function is required");return a(n,i,t)}},3141:(t,e,r)=>{"use strict";var n=r(2861).Buffer,o=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===o||!o(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=s,this.end=c,e=4;break;case"utf8":this.fillLast=u,e=4;break;case"base64":this.text=f,this.end=l,e=3;break;default:return this.write=p,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function u(t){var e=this.lastTotal-this.lastNeed,r=function(t,e){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function s(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function p(t){return t.toString(this.encoding)}function h(t){return t&&t.length?this.write(t):""}e.I=i,i.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return o>0&&(t.lastNeed=o-1),o;if(--n=0)return o>0&&(t.lastNeed=o-2),o;if(--n=0)return o>0&&(2===o?o=0:t.lastNeed=o-3),o;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},i.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},3144:(t,e,r)=>{"use strict";var n=r(6743),o=r(1002),i=r(76),a=r(7119);t.exports=a||n.call(i,o)},3600:(t,e,r)=>{"use strict";t.exports=o;var n=r(4610);function o(t){if(!(this instanceof o))return new o(t);n.call(this,t)}r(6698)(o,n),o.prototype._transform=function(t,e,r){r(null,t)}},3628:(t,e,r)=>{"use strict";var n=r(8648),o=r(1064),i=r(7176);t.exports=n?function(t){return n(t)}:o?function(t){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("getProto: not an object");return o(t)}:i?function(t){return i(t)}:null},3918:(t,e,r)=>{"use strict";var n=r(5606);function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function i(t){for(var e=1;et.length)&&(r=t.length),t.substring(r-e.length,r)===e}var w="",S="",E="",_="",O={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function j(t){var e=Object.keys(t),r=Object.create(Object.getPrototypeOf(t));return e.forEach(function(e){r[e]=t[e]}),Object.defineProperty(r,"message",{value:t.message}),r}function A(t){return b(t,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function x(t,e,r){var o="",i="",a=0,u="",s=!1,c=A(t),f=c.split("\n"),l=A(e).split("\n"),p=0,h="";if("strictEqual"===r&&"object"===g(t)&&"object"===g(e)&&null!==t&&null!==e&&(r="strictEqualObject"),1===f.length&&1===l.length&&f[0]!==l[0]){var y=f[0].length+l[0].length;if(y<=10){if(!("object"===g(t)&&null!==t||"object"===g(e)&&null!==e||0===t&&0===e))return"".concat(O[r],"\n\n")+"".concat(f[0]," !== ").concat(l[0],"\n")}else if("strictEqualObject"!==r){if(y<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;f[0][p]===l[0][p];)p++;p>2&&(h="\n ".concat(function(t,e){if(e=Math.floor(e),0==t.length||0==e)return"";var r=t.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)t+=t,e--;return t+t.substring(0,r-t.length)}(" ",p),"^"),p=0)}}}for(var d=f[f.length-1],b=l[l.length-1];d===b&&(p++<2?u="\n ".concat(d).concat(u):o=d,f.pop(),l.pop(),0!==f.length&&0!==l.length);)d=f[f.length-1],b=l[l.length-1];var v=Math.max(f.length,l.length);if(0===v){var j=c.split("\n");if(j.length>30)for(j[26]="".concat(w,"...").concat(_);j.length>27;)j.pop();return"".concat(O.notIdentical,"\n\n").concat(j.join("\n"),"\n")}p>3&&(u="\n".concat(w,"...").concat(_).concat(u),s=!0),""!==o&&(u="\n ".concat(o).concat(u),o="");var x=0,R=O[r]+"\n".concat(S,"+ actual").concat(_," ").concat(E,"- expected").concat(_),k=" ".concat(w,"...").concat(_," Lines skipped");for(p=0;p1&&p>2&&(P>4?(i+="\n".concat(w,"...").concat(_),s=!0):P>3&&(i+="\n ".concat(l[p-2]),x++),i+="\n ".concat(l[p-1]),x++),a=p,o+="\n".concat(E,"-").concat(_," ").concat(l[p]),x++;else if(l.length