@rspack-debug/browser 2.0.3 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -125,7 +125,7 @@ __webpack_require__.add({
125
125
  "../../node_modules/.pnpm/asn1.js@4.10.1/node_modules/asn1.js/lib/asn1/base/buffer.js" (__unused_rspack_module, exports, __webpack_require__) {
126
126
  var inherits = __webpack_require__("../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js");
127
127
  var Reporter = __webpack_require__("../../node_modules/.pnpm/asn1.js@4.10.1/node_modules/asn1.js/lib/asn1/base/index.js").Reporter;
128
- var Buffer = __webpack_require__("./src/browser/buffer.ts").Buffer;
128
+ var Buffer = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js").Buffer;
129
129
  function DecoderBuffer(base, options) {
130
130
  Reporter.call(this, options);
131
131
  if (!Buffer.isBuffer(base)) return void this.error('Input not Buffer');
@@ -1013,7 +1013,7 @@ __webpack_require__.add({
1013
1013
  },
1014
1014
  "../../node_modules/.pnpm/asn1.js@4.10.1/node_modules/asn1.js/lib/asn1/decoders/pem.js" (module, __unused_rspack_exports, __webpack_require__) {
1015
1015
  var inherits = __webpack_require__("../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js");
1016
- var Buffer = __webpack_require__("./src/browser/buffer.ts").Buffer;
1016
+ var Buffer = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js").Buffer;
1017
1017
  var DERDecoder = __webpack_require__("../../node_modules/.pnpm/asn1.js@4.10.1/node_modules/asn1.js/lib/asn1/decoders/der.js");
1018
1018
  function PEMDecoder(entity) {
1019
1019
  DERDecoder.call(this, entity);
@@ -1049,7 +1049,7 @@ __webpack_require__.add({
1049
1049
  },
1050
1050
  "../../node_modules/.pnpm/asn1.js@4.10.1/node_modules/asn1.js/lib/asn1/encoders/der.js" (module, __unused_rspack_exports, __webpack_require__) {
1051
1051
  var inherits = __webpack_require__("../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js");
1052
- var Buffer = __webpack_require__("./src/browser/buffer.ts").Buffer;
1052
+ var Buffer = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js").Buffer;
1053
1053
  var asn1 = __webpack_require__("../../node_modules/.pnpm/asn1.js@4.10.1/node_modules/asn1.js/lib/asn1.js");
1054
1054
  var base = asn1.base;
1055
1055
  var der = asn1.constants.der;
@@ -2761,6 +2761,95 @@ __webpack_require__.add({
2761
2761
  isDeepStrictEqual: isDeepStrictEqual
2762
2762
  };
2763
2763
  },
2764
+ "../../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js" (__unused_rspack_module, exports) {
2765
+ exports.byteLength = byteLength;
2766
+ exports.toByteArray = toByteArray;
2767
+ exports.fromByteArray = fromByteArray;
2768
+ var lookup = [];
2769
+ var revLookup = [];
2770
+ var Arr = "u" > typeof Uint8Array ? Uint8Array : Array;
2771
+ var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
2772
+ for(var i = 0, len = code.length; i < len; ++i){
2773
+ lookup[i] = code[i];
2774
+ revLookup[code.charCodeAt(i)] = i;
2775
+ }
2776
+ revLookup['-'.charCodeAt(0)] = 62;
2777
+ revLookup['_'.charCodeAt(0)] = 63;
2778
+ function getLens(b64) {
2779
+ var len = b64.length;
2780
+ if (len % 4 > 0) throw new Error('Invalid string. Length must be a multiple of 4');
2781
+ var validLen = b64.indexOf('=');
2782
+ if (-1 === validLen) validLen = len;
2783
+ var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4;
2784
+ return [
2785
+ validLen,
2786
+ placeHoldersLen
2787
+ ];
2788
+ }
2789
+ function byteLength(b64) {
2790
+ var lens = getLens(b64);
2791
+ var validLen = lens[0];
2792
+ var placeHoldersLen = lens[1];
2793
+ return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
2794
+ }
2795
+ function _byteLength(b64, validLen, placeHoldersLen) {
2796
+ return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
2797
+ }
2798
+ function toByteArray(b64) {
2799
+ var tmp;
2800
+ var lens = getLens(b64);
2801
+ var validLen = lens[0];
2802
+ var placeHoldersLen = lens[1];
2803
+ var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
2804
+ var curByte = 0;
2805
+ var len = placeHoldersLen > 0 ? validLen - 4 : validLen;
2806
+ var i;
2807
+ for(i = 0; i < len; i += 4){
2808
+ tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];
2809
+ arr[curByte++] = tmp >> 16 & 0xFF;
2810
+ arr[curByte++] = tmp >> 8 & 0xFF;
2811
+ arr[curByte++] = 0xFF & tmp;
2812
+ }
2813
+ if (2 === placeHoldersLen) {
2814
+ tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;
2815
+ arr[curByte++] = 0xFF & tmp;
2816
+ }
2817
+ if (1 === placeHoldersLen) {
2818
+ tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;
2819
+ arr[curByte++] = tmp >> 8 & 0xFF;
2820
+ arr[curByte++] = 0xFF & tmp;
2821
+ }
2822
+ return arr;
2823
+ }
2824
+ function tripletToBase64(num) {
2825
+ return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[0x3F & num];
2826
+ }
2827
+ function encodeChunk(uint8, start, end) {
2828
+ var tmp;
2829
+ var output = [];
2830
+ for(var i = start; i < end; i += 3){
2831
+ tmp = (uint8[i] << 16 & 0xFF0000) + (uint8[i + 1] << 8 & 0xFF00) + (0xFF & uint8[i + 2]);
2832
+ output.push(tripletToBase64(tmp));
2833
+ }
2834
+ return output.join('');
2835
+ }
2836
+ function fromByteArray(uint8) {
2837
+ var tmp;
2838
+ var len = uint8.length;
2839
+ var extraBytes = len % 3;
2840
+ var parts = [];
2841
+ var maxChunkLength = 16383;
2842
+ for(var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength)parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));
2843
+ if (1 === extraBytes) {
2844
+ tmp = uint8[len - 1];
2845
+ parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 0x3F] + '==');
2846
+ } else if (2 === extraBytes) {
2847
+ tmp = (uint8[len - 2] << 8) + uint8[len - 1];
2848
+ parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 0x3F] + lookup[tmp << 2 & 0x3F] + '=');
2849
+ }
2850
+ return parts.join('');
2851
+ }
2852
+ },
2764
2853
  "../../node_modules/.pnpm/bn.js@4.12.3/node_modules/bn.js/lib/bn.js" (module, __unused_rspack_exports, __webpack_require__) {
2765
2854
  module = __webpack_require__.nmd(module);
2766
2855
  (function(module, exports) {
@@ -8600,7 +8689,7 @@ __webpack_require__.add({
8600
8689
  module.exports = modes;
8601
8690
  },
8602
8691
  "../../node_modules/.pnpm/browserify-aes@1.2.0/node_modules/browserify-aes/modes/ofb.js" (__unused_rspack_module, exports, __webpack_require__) {
8603
- var Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
8692
+ var Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
8604
8693
  var xor = __webpack_require__("../../node_modules/.pnpm/buffer-xor@1.0.3/node_modules/buffer-xor/index.js");
8605
8694
  function getBlock(self1) {
8606
8695
  self1._prev = self1._cipher.encryptBlock(self1._prev);
@@ -9117,7 +9206,7 @@ __webpack_require__.add({
9117
9206
  module.exports = verify;
9118
9207
  },
9119
9208
  "../../node_modules/.pnpm/browserify-zlib@0.2.0/node_modules/browserify-zlib/lib/binding.js" (__unused_rspack_module, exports, __webpack_require__) {
9120
- var Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
9209
+ var Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
9121
9210
  var process = __webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");
9122
9211
  var assert = __webpack_require__("../../node_modules/.pnpm/assert@2.1.0/node_modules/assert/build/assert.js");
9123
9212
  var Zstream = __webpack_require__("../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/zstream.js");
@@ -9378,12 +9467,12 @@ __webpack_require__.add({
9378
9467
  },
9379
9468
  "../../node_modules/.pnpm/browserify-zlib@0.2.0/node_modules/browserify-zlib/lib/index.js" (__unused_rspack_module, exports, __webpack_require__) {
9380
9469
  var process = __webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");
9381
- var Buffer = __webpack_require__("./src/browser/buffer.ts").Buffer;
9470
+ var Buffer = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js").Buffer;
9382
9471
  var Transform = __webpack_require__("../../node_modules/.pnpm/stream-browserify@3.0.0/node_modules/stream-browserify/index.js").Transform;
9383
9472
  var binding = __webpack_require__("../../node_modules/.pnpm/browserify-zlib@0.2.0/node_modules/browserify-zlib/lib/binding.js");
9384
9473
  var util = __webpack_require__("../../node_modules/.pnpm/util@0.12.5/node_modules/util/util.js");
9385
9474
  var assert = __webpack_require__("../../node_modules/.pnpm/assert@2.1.0/node_modules/assert/build/assert.js").ok;
9386
- var kMaxLength = __webpack_require__("./src/browser/buffer.ts").kMaxLength;
9475
+ var kMaxLength = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js").kMaxLength;
9387
9476
  var kRangeErrorMessage = "Cannot create final Buffer. It would be larger than 0x" + kMaxLength.toString(16) + ' bytes';
9388
9477
  binding.Z_MIN_WINDOWBITS = 8;
9389
9478
  binding.Z_MAX_WINDOWBITS = 15;
@@ -9485,320 +9574,1402 @@ __webpack_require__.add({
9485
9574
  exports.deflateRawSync = function(buffer, opts) {
9486
9575
  return zlibBufferSync(new DeflateRaw(opts), buffer);
9487
9576
  };
9488
- exports.unzip = function(buffer, opts, callback) {
9489
- if ('function' == typeof opts) {
9490
- callback = opts;
9491
- opts = {};
9492
- }
9493
- return zlibBuffer(new Unzip(opts), buffer, callback);
9577
+ exports.unzip = function(buffer, opts, callback) {
9578
+ if ('function' == typeof opts) {
9579
+ callback = opts;
9580
+ opts = {};
9581
+ }
9582
+ return zlibBuffer(new Unzip(opts), buffer, callback);
9583
+ };
9584
+ exports.unzipSync = function(buffer, opts) {
9585
+ return zlibBufferSync(new Unzip(opts), buffer);
9586
+ };
9587
+ exports.inflate = function(buffer, opts, callback) {
9588
+ if ('function' == typeof opts) {
9589
+ callback = opts;
9590
+ opts = {};
9591
+ }
9592
+ return zlibBuffer(new Inflate(opts), buffer, callback);
9593
+ };
9594
+ exports.inflateSync = function(buffer, opts) {
9595
+ return zlibBufferSync(new Inflate(opts), buffer);
9596
+ };
9597
+ exports.gunzip = function(buffer, opts, callback) {
9598
+ if ('function' == typeof opts) {
9599
+ callback = opts;
9600
+ opts = {};
9601
+ }
9602
+ return zlibBuffer(new Gunzip(opts), buffer, callback);
9603
+ };
9604
+ exports.gunzipSync = function(buffer, opts) {
9605
+ return zlibBufferSync(new Gunzip(opts), buffer);
9606
+ };
9607
+ exports.inflateRaw = function(buffer, opts, callback) {
9608
+ if ('function' == typeof opts) {
9609
+ callback = opts;
9610
+ opts = {};
9611
+ }
9612
+ return zlibBuffer(new InflateRaw(opts), buffer, callback);
9613
+ };
9614
+ exports.inflateRawSync = function(buffer, opts) {
9615
+ return zlibBufferSync(new InflateRaw(opts), buffer);
9616
+ };
9617
+ function zlibBuffer(engine, buffer, callback) {
9618
+ var buffers = [];
9619
+ var nread = 0;
9620
+ engine.on('error', onError);
9621
+ engine.on('end', onEnd);
9622
+ engine.end(buffer);
9623
+ flow();
9624
+ function flow() {
9625
+ var chunk;
9626
+ while(null !== (chunk = engine.read())){
9627
+ buffers.push(chunk);
9628
+ nread += chunk.length;
9629
+ }
9630
+ engine.once('readable', flow);
9631
+ }
9632
+ function onError(err) {
9633
+ engine.removeListener('end', onEnd);
9634
+ engine.removeListener('readable', flow);
9635
+ callback(err);
9636
+ }
9637
+ function onEnd() {
9638
+ var buf;
9639
+ var err = null;
9640
+ if (nread >= kMaxLength) err = new RangeError(kRangeErrorMessage);
9641
+ else buf = Buffer.concat(buffers, nread);
9642
+ buffers = [];
9643
+ engine.close();
9644
+ callback(err, buf);
9645
+ }
9646
+ }
9647
+ function zlibBufferSync(engine, buffer) {
9648
+ if ('string' == typeof buffer) buffer = Buffer.from(buffer);
9649
+ if (!Buffer.isBuffer(buffer)) throw new TypeError('Not a string or buffer');
9650
+ var flushFlag = engine._finishFlushFlag;
9651
+ return engine._processChunk(buffer, flushFlag);
9652
+ }
9653
+ function Deflate(opts) {
9654
+ if (!(this instanceof Deflate)) return new Deflate(opts);
9655
+ Zlib.call(this, opts, binding.DEFLATE);
9656
+ }
9657
+ function Inflate(opts) {
9658
+ if (!(this instanceof Inflate)) return new Inflate(opts);
9659
+ Zlib.call(this, opts, binding.INFLATE);
9660
+ }
9661
+ function Gzip(opts) {
9662
+ if (!(this instanceof Gzip)) return new Gzip(opts);
9663
+ Zlib.call(this, opts, binding.GZIP);
9664
+ }
9665
+ function Gunzip(opts) {
9666
+ if (!(this instanceof Gunzip)) return new Gunzip(opts);
9667
+ Zlib.call(this, opts, binding.GUNZIP);
9668
+ }
9669
+ function DeflateRaw(opts) {
9670
+ if (!(this instanceof DeflateRaw)) return new DeflateRaw(opts);
9671
+ Zlib.call(this, opts, binding.DEFLATERAW);
9672
+ }
9673
+ function InflateRaw(opts) {
9674
+ if (!(this instanceof InflateRaw)) return new InflateRaw(opts);
9675
+ Zlib.call(this, opts, binding.INFLATERAW);
9676
+ }
9677
+ function Unzip(opts) {
9678
+ if (!(this instanceof Unzip)) return new Unzip(opts);
9679
+ Zlib.call(this, opts, binding.UNZIP);
9680
+ }
9681
+ function isValidFlushFlag(flag) {
9682
+ return flag === binding.Z_NO_FLUSH || flag === binding.Z_PARTIAL_FLUSH || flag === binding.Z_SYNC_FLUSH || flag === binding.Z_FULL_FLUSH || flag === binding.Z_FINISH || flag === binding.Z_BLOCK;
9683
+ }
9684
+ function Zlib(opts, mode) {
9685
+ var _this = this;
9686
+ this._opts = opts = opts || {};
9687
+ this._chunkSize = opts.chunkSize || exports.Z_DEFAULT_CHUNK;
9688
+ Transform.call(this, opts);
9689
+ if (opts.flush && !isValidFlushFlag(opts.flush)) throw new Error('Invalid flush flag: ' + opts.flush);
9690
+ if (opts.finishFlush && !isValidFlushFlag(opts.finishFlush)) throw new Error('Invalid flush flag: ' + opts.finishFlush);
9691
+ this._flushFlag = opts.flush || binding.Z_NO_FLUSH;
9692
+ this._finishFlushFlag = void 0 !== opts.finishFlush ? opts.finishFlush : binding.Z_FINISH;
9693
+ if (opts.chunkSize) {
9694
+ if (opts.chunkSize < exports.Z_MIN_CHUNK || opts.chunkSize > exports.Z_MAX_CHUNK) throw new Error('Invalid chunk size: ' + opts.chunkSize);
9695
+ }
9696
+ if (opts.windowBits) {
9697
+ if (opts.windowBits < exports.Z_MIN_WINDOWBITS || opts.windowBits > exports.Z_MAX_WINDOWBITS) throw new Error('Invalid windowBits: ' + opts.windowBits);
9698
+ }
9699
+ if (opts.level) {
9700
+ if (opts.level < exports.Z_MIN_LEVEL || opts.level > exports.Z_MAX_LEVEL) throw new Error('Invalid compression level: ' + opts.level);
9701
+ }
9702
+ if (opts.memLevel) {
9703
+ if (opts.memLevel < exports.Z_MIN_MEMLEVEL || opts.memLevel > exports.Z_MAX_MEMLEVEL) throw new Error('Invalid memLevel: ' + opts.memLevel);
9704
+ }
9705
+ if (opts.strategy) {
9706
+ if (opts.strategy != exports.Z_FILTERED && opts.strategy != exports.Z_HUFFMAN_ONLY && opts.strategy != exports.Z_RLE && opts.strategy != exports.Z_FIXED && opts.strategy != exports.Z_DEFAULT_STRATEGY) throw new Error('Invalid strategy: ' + opts.strategy);
9707
+ }
9708
+ if (opts.dictionary) {
9709
+ if (!Buffer.isBuffer(opts.dictionary)) throw new Error('Invalid dictionary: it should be a Buffer instance');
9710
+ }
9711
+ this._handle = new binding.Zlib(mode);
9712
+ var self1 = this;
9713
+ this._hadError = false;
9714
+ this._handle.onerror = function(message, errno) {
9715
+ _close(self1);
9716
+ self1._hadError = true;
9717
+ var error = new Error(message);
9718
+ error.errno = errno;
9719
+ error.code = exports.codes[errno];
9720
+ self1.emit('error', error);
9721
+ };
9722
+ var level = exports.Z_DEFAULT_COMPRESSION;
9723
+ if ('number' == typeof opts.level) level = opts.level;
9724
+ var strategy = exports.Z_DEFAULT_STRATEGY;
9725
+ if ('number' == typeof opts.strategy) strategy = opts.strategy;
9726
+ this._handle.init(opts.windowBits || exports.Z_DEFAULT_WINDOWBITS, level, opts.memLevel || exports.Z_DEFAULT_MEMLEVEL, strategy, opts.dictionary);
9727
+ this._buffer = Buffer.allocUnsafe(this._chunkSize);
9728
+ this._offset = 0;
9729
+ this._level = level;
9730
+ this._strategy = strategy;
9731
+ this.once('end', this.close);
9732
+ Object.defineProperty(this, '_closed', {
9733
+ get: function() {
9734
+ return !_this._handle;
9735
+ },
9736
+ configurable: true,
9737
+ enumerable: true
9738
+ });
9739
+ }
9740
+ util.inherits(Zlib, Transform);
9741
+ Zlib.prototype.params = function(level, strategy, callback) {
9742
+ if (level < exports.Z_MIN_LEVEL || level > exports.Z_MAX_LEVEL) throw new RangeError('Invalid compression level: ' + level);
9743
+ if (strategy != exports.Z_FILTERED && strategy != exports.Z_HUFFMAN_ONLY && strategy != exports.Z_RLE && strategy != exports.Z_FIXED && strategy != exports.Z_DEFAULT_STRATEGY) throw new TypeError('Invalid strategy: ' + strategy);
9744
+ if (this._level !== level || this._strategy !== strategy) {
9745
+ var self1 = this;
9746
+ this.flush(binding.Z_SYNC_FLUSH, function() {
9747
+ assert(self1._handle, 'zlib binding closed');
9748
+ self1._handle.params(level, strategy);
9749
+ if (!self1._hadError) {
9750
+ self1._level = level;
9751
+ self1._strategy = strategy;
9752
+ if (callback) callback();
9753
+ }
9754
+ });
9755
+ } else process.nextTick(callback);
9756
+ };
9757
+ Zlib.prototype.reset = function() {
9758
+ assert(this._handle, 'zlib binding closed');
9759
+ return this._handle.reset();
9760
+ };
9761
+ Zlib.prototype._flush = function(callback) {
9762
+ this._transform(Buffer.alloc(0), '', callback);
9763
+ };
9764
+ Zlib.prototype.flush = function(kind, callback) {
9765
+ var _this2 = this;
9766
+ var ws = this._writableState;
9767
+ if ('function' == typeof kind || void 0 === kind && !callback) {
9768
+ callback = kind;
9769
+ kind = binding.Z_FULL_FLUSH;
9770
+ }
9771
+ if (ws.ended) {
9772
+ if (callback) process.nextTick(callback);
9773
+ } else if (ws.ending) {
9774
+ if (callback) this.once('end', callback);
9775
+ } else if (ws.needDrain) {
9776
+ if (callback) this.once('drain', function() {
9777
+ return _this2.flush(kind, callback);
9778
+ });
9779
+ } else {
9780
+ this._flushFlag = kind;
9781
+ this.write(Buffer.alloc(0), '', callback);
9782
+ }
9783
+ };
9784
+ Zlib.prototype.close = function(callback) {
9785
+ _close(this, callback);
9786
+ process.nextTick(emitCloseNT, this);
9787
+ };
9788
+ function _close(engine, callback) {
9789
+ if (callback) process.nextTick(callback);
9790
+ if (!engine._handle) return;
9791
+ engine._handle.close();
9792
+ engine._handle = null;
9793
+ }
9794
+ function emitCloseNT(self1) {
9795
+ self1.emit('close');
9796
+ }
9797
+ Zlib.prototype._transform = function(chunk, encoding, cb) {
9798
+ var flushFlag;
9799
+ var ws = this._writableState;
9800
+ var ending = ws.ending || ws.ended;
9801
+ var last = ending && (!chunk || ws.length === chunk.length);
9802
+ if (null !== chunk && !Buffer.isBuffer(chunk)) return cb(new Error('invalid input'));
9803
+ if (!this._handle) return cb(new Error('zlib binding closed'));
9804
+ if (last) flushFlag = this._finishFlushFlag;
9805
+ else {
9806
+ flushFlag = this._flushFlag;
9807
+ if (chunk.length >= ws.length) this._flushFlag = this._opts.flush || binding.Z_NO_FLUSH;
9808
+ }
9809
+ this._processChunk(chunk, flushFlag, cb);
9810
+ };
9811
+ Zlib.prototype._processChunk = function(chunk, flushFlag, cb) {
9812
+ var availInBefore = chunk && chunk.length;
9813
+ var availOutBefore = this._chunkSize - this._offset;
9814
+ var inOff = 0;
9815
+ var self1 = this;
9816
+ var async = 'function' == typeof cb;
9817
+ if (!async) {
9818
+ var buffers = [];
9819
+ var nread = 0;
9820
+ var error;
9821
+ this.on('error', function(er) {
9822
+ error = er;
9823
+ });
9824
+ assert(this._handle, 'zlib binding closed');
9825
+ do var res = this._handle.writeSync(flushFlag, chunk, inOff, availInBefore, this._buffer, this._offset, availOutBefore);
9826
+ while (!this._hadError && callback(res[0], res[1]))
9827
+ if (this._hadError) throw error;
9828
+ if (nread >= kMaxLength) {
9829
+ _close(this);
9830
+ throw new RangeError(kRangeErrorMessage);
9831
+ }
9832
+ var buf = Buffer.concat(buffers, nread);
9833
+ _close(this);
9834
+ return buf;
9835
+ }
9836
+ assert(this._handle, 'zlib binding closed');
9837
+ var req = this._handle.write(flushFlag, chunk, inOff, availInBefore, this._buffer, this._offset, availOutBefore);
9838
+ req.buffer = chunk;
9839
+ req.callback = callback;
9840
+ function callback(availInAfter, availOutAfter) {
9841
+ if (this) {
9842
+ this.buffer = null;
9843
+ this.callback = null;
9844
+ }
9845
+ if (self1._hadError) return;
9846
+ var have = availOutBefore - availOutAfter;
9847
+ assert(have >= 0, 'have should not go down');
9848
+ if (have > 0) {
9849
+ var out = self1._buffer.slice(self1._offset, self1._offset + have);
9850
+ self1._offset += have;
9851
+ if (async) self1.push(out);
9852
+ else {
9853
+ buffers.push(out);
9854
+ nread += out.length;
9855
+ }
9856
+ }
9857
+ if (0 === availOutAfter || self1._offset >= self1._chunkSize) {
9858
+ availOutBefore = self1._chunkSize;
9859
+ self1._offset = 0;
9860
+ self1._buffer = Buffer.allocUnsafe(self1._chunkSize);
9861
+ }
9862
+ if (0 === availOutAfter) {
9863
+ inOff += availInBefore - availInAfter;
9864
+ availInBefore = availInAfter;
9865
+ if (!async) return true;
9866
+ var newReq = self1._handle.write(flushFlag, chunk, inOff, availInBefore, self1._buffer, self1._offset, self1._chunkSize);
9867
+ newReq.callback = callback;
9868
+ newReq.buffer = chunk;
9869
+ return;
9870
+ }
9871
+ if (!async) return false;
9872
+ cb();
9873
+ }
9874
+ };
9875
+ util.inherits(Deflate, Zlib);
9876
+ util.inherits(Inflate, Zlib);
9877
+ util.inherits(Gzip, Zlib);
9878
+ util.inherits(Gunzip, Zlib);
9879
+ util.inherits(DeflateRaw, Zlib);
9880
+ util.inherits(InflateRaw, Zlib);
9881
+ util.inherits(Unzip, Zlib);
9882
+ },
9883
+ "../../node_modules/.pnpm/buffer-xor@1.0.3/node_modules/buffer-xor/index.js" (module, __unused_rspack_exports, __webpack_require__) {
9884
+ var Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
9885
+ module.exports = function(a, b) {
9886
+ var length = Math.min(a.length, b.length);
9887
+ var buffer = new Buffer(length);
9888
+ for(var i = 0; i < length; ++i)buffer[i] = a[i] ^ b[i];
9889
+ return buffer;
9890
+ };
9891
+ },
9892
+ "../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js" (__unused_rspack_module, exports, __webpack_require__) {
9893
+ /*!
9894
+ * The buffer module from node.js, for the browser.
9895
+ *
9896
+ * @author Feross Aboukhadijeh <https://feross.org>
9897
+ * @license MIT
9898
+ */ var base64 = __webpack_require__("../../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js");
9899
+ var ieee754 = __webpack_require__("../../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js");
9900
+ var customInspectSymbol = 'function' == typeof Symbol && 'function' == typeof Symbol['for'] ? Symbol['for']('nodejs.util.inspect.custom') : null;
9901
+ exports.Buffer = Buffer;
9902
+ exports.SlowBuffer = SlowBuffer;
9903
+ exports.INSPECT_MAX_BYTES = 50;
9904
+ var K_MAX_LENGTH = 0x7fffffff;
9905
+ exports.kMaxLength = K_MAX_LENGTH;
9906
+ Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport();
9907
+ if (!Buffer.TYPED_ARRAY_SUPPORT && "u" > typeof console && 'function' == typeof console.error) console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");
9908
+ function typedArraySupport() {
9909
+ try {
9910
+ var arr = new Uint8Array(1);
9911
+ var proto = {
9912
+ foo: function() {
9913
+ return 42;
9914
+ }
9915
+ };
9916
+ Object.setPrototypeOf(proto, Uint8Array.prototype);
9917
+ Object.setPrototypeOf(arr, proto);
9918
+ return 42 === arr.foo();
9919
+ } catch (e) {
9920
+ return false;
9921
+ }
9922
+ }
9923
+ Object.defineProperty(Buffer.prototype, 'parent', {
9924
+ enumerable: true,
9925
+ get: function() {
9926
+ if (!Buffer.isBuffer(this)) return;
9927
+ return this.buffer;
9928
+ }
9929
+ });
9930
+ Object.defineProperty(Buffer.prototype, 'offset', {
9931
+ enumerable: true,
9932
+ get: function() {
9933
+ if (!Buffer.isBuffer(this)) return;
9934
+ return this.byteOffset;
9935
+ }
9936
+ });
9937
+ function createBuffer(length) {
9938
+ if (length > K_MAX_LENGTH) throw new RangeError('The value "' + length + '" is invalid for option "size"');
9939
+ var buf = new Uint8Array(length);
9940
+ Object.setPrototypeOf(buf, Buffer.prototype);
9941
+ return buf;
9942
+ }
9943
+ function Buffer(arg, encodingOrOffset, length) {
9944
+ if ('number' == typeof arg) {
9945
+ if ('string' == typeof encodingOrOffset) throw new TypeError('The "string" argument must be of type string. Received type number');
9946
+ return allocUnsafe(arg);
9947
+ }
9948
+ return from(arg, encodingOrOffset, length);
9949
+ }
9950
+ Buffer.poolSize = 8192;
9951
+ function from(value, encodingOrOffset, length) {
9952
+ if ('string' == typeof value) return fromString(value, encodingOrOffset);
9953
+ if (ArrayBuffer.isView(value)) return fromArrayView(value);
9954
+ if (null == value) throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value);
9955
+ if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) return fromArrayBuffer(value, encodingOrOffset, length);
9956
+ if ("u" > typeof SharedArrayBuffer && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) return fromArrayBuffer(value, encodingOrOffset, length);
9957
+ if ('number' == typeof value) throw new TypeError('The "value" argument must not be of type number. Received type number');
9958
+ var valueOf = value.valueOf && value.valueOf();
9959
+ if (null != valueOf && valueOf !== value) return Buffer.from(valueOf, encodingOrOffset, length);
9960
+ var b = fromObject(value);
9961
+ if (b) return b;
9962
+ if ("u" > typeof Symbol && null != Symbol.toPrimitive && 'function' == typeof value[Symbol.toPrimitive]) return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length);
9963
+ throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value);
9964
+ }
9965
+ Buffer.from = function(value, encodingOrOffset, length) {
9966
+ return from(value, encodingOrOffset, length);
9967
+ };
9968
+ Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype);
9969
+ Object.setPrototypeOf(Buffer, Uint8Array);
9970
+ function assertSize(size) {
9971
+ if ('number' != typeof size) throw new TypeError('"size" argument must be of type number');
9972
+ if (size < 0) throw new RangeError('The value "' + size + '" is invalid for option "size"');
9973
+ }
9974
+ function alloc(size, fill, encoding) {
9975
+ assertSize(size);
9976
+ if (size <= 0) return createBuffer(size);
9977
+ if (void 0 !== fill) return 'string' == typeof encoding ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);
9978
+ return createBuffer(size);
9979
+ }
9980
+ Buffer.alloc = function(size, fill, encoding) {
9981
+ return alloc(size, fill, encoding);
9982
+ };
9983
+ function allocUnsafe(size) {
9984
+ assertSize(size);
9985
+ return createBuffer(size < 0 ? 0 : 0 | checked(size));
9986
+ }
9987
+ Buffer.allocUnsafe = function(size) {
9988
+ return allocUnsafe(size);
9989
+ };
9990
+ Buffer.allocUnsafeSlow = function(size) {
9991
+ return allocUnsafe(size);
9992
+ };
9993
+ function fromString(string, encoding) {
9994
+ if ('string' != typeof encoding || '' === encoding) encoding = 'utf8';
9995
+ if (!Buffer.isEncoding(encoding)) throw new TypeError('Unknown encoding: ' + encoding);
9996
+ var length = 0 | byteLength(string, encoding);
9997
+ var buf = createBuffer(length);
9998
+ var actual = buf.write(string, encoding);
9999
+ if (actual !== length) buf = buf.slice(0, actual);
10000
+ return buf;
10001
+ }
10002
+ function fromArrayLike(array) {
10003
+ var length = array.length < 0 ? 0 : 0 | checked(array.length);
10004
+ var buf = createBuffer(length);
10005
+ for(var i = 0; i < length; i += 1)buf[i] = 255 & array[i];
10006
+ return buf;
10007
+ }
10008
+ function fromArrayView(arrayView) {
10009
+ if (isInstance(arrayView, Uint8Array)) {
10010
+ var copy = new Uint8Array(arrayView);
10011
+ return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);
10012
+ }
10013
+ return fromArrayLike(arrayView);
10014
+ }
10015
+ function fromArrayBuffer(array, byteOffset, length) {
10016
+ if (byteOffset < 0 || array.byteLength < byteOffset) throw new RangeError('"offset" is outside of buffer bounds');
10017
+ if (array.byteLength < byteOffset + (length || 0)) throw new RangeError('"length" is outside of buffer bounds');
10018
+ var buf;
10019
+ buf = void 0 === byteOffset && void 0 === length ? new Uint8Array(array) : void 0 === length ? new Uint8Array(array, byteOffset) : new Uint8Array(array, byteOffset, length);
10020
+ Object.setPrototypeOf(buf, Buffer.prototype);
10021
+ return buf;
10022
+ }
10023
+ function fromObject(obj) {
10024
+ if (Buffer.isBuffer(obj)) {
10025
+ var len = 0 | checked(obj.length);
10026
+ var buf = createBuffer(len);
10027
+ if (0 === buf.length) return buf;
10028
+ obj.copy(buf, 0, 0, len);
10029
+ return buf;
10030
+ }
10031
+ if (void 0 !== obj.length) {
10032
+ if ('number' != typeof obj.length || numberIsNaN(obj.length)) return createBuffer(0);
10033
+ return fromArrayLike(obj);
10034
+ }
10035
+ if ('Buffer' === obj.type && Array.isArray(obj.data)) return fromArrayLike(obj.data);
10036
+ }
10037
+ function checked(length) {
10038
+ if (length >= K_MAX_LENGTH) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + K_MAX_LENGTH.toString(16) + ' bytes');
10039
+ return 0 | length;
10040
+ }
10041
+ function SlowBuffer(length) {
10042
+ if (+length != length) length = 0;
10043
+ return Buffer.alloc(+length);
10044
+ }
10045
+ Buffer.isBuffer = function(b) {
10046
+ return null != b && true === b._isBuffer && b !== Buffer.prototype;
10047
+ };
10048
+ Buffer.compare = function(a, b) {
10049
+ if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength);
10050
+ if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength);
10051
+ if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
10052
+ if (a === b) return 0;
10053
+ var x = a.length;
10054
+ var y = b.length;
10055
+ for(var i = 0, len = Math.min(x, y); i < len; ++i)if (a[i] !== b[i]) {
10056
+ x = a[i];
10057
+ y = b[i];
10058
+ break;
10059
+ }
10060
+ if (x < y) return -1;
10061
+ if (y < x) return 1;
10062
+ return 0;
10063
+ };
10064
+ Buffer.isEncoding = function(encoding) {
10065
+ switch(String(encoding).toLowerCase()){
10066
+ case 'hex':
10067
+ case 'utf8':
10068
+ case 'utf-8':
10069
+ case 'ascii':
10070
+ case 'latin1':
10071
+ case 'binary':
10072
+ case 'base64':
10073
+ case 'ucs2':
10074
+ case 'ucs-2':
10075
+ case 'utf16le':
10076
+ case 'utf-16le':
10077
+ return true;
10078
+ default:
10079
+ return false;
10080
+ }
10081
+ };
10082
+ Buffer.concat = function(list, length) {
10083
+ if (!Array.isArray(list)) throw new TypeError('"list" argument must be an Array of Buffers');
10084
+ if (0 === list.length) return Buffer.alloc(0);
10085
+ var i;
10086
+ if (void 0 === length) {
10087
+ length = 0;
10088
+ for(i = 0; i < list.length; ++i)length += list[i].length;
10089
+ }
10090
+ var buffer = Buffer.allocUnsafe(length);
10091
+ var pos = 0;
10092
+ for(i = 0; i < list.length; ++i){
10093
+ var buf = list[i];
10094
+ if (isInstance(buf, Uint8Array)) if (pos + buf.length > buffer.length) Buffer.from(buf).copy(buffer, pos);
10095
+ else Uint8Array.prototype.set.call(buffer, buf, pos);
10096
+ else if (Buffer.isBuffer(buf)) buf.copy(buffer, pos);
10097
+ else throw new TypeError('"list" argument must be an Array of Buffers');
10098
+ pos += buf.length;
10099
+ }
10100
+ return buffer;
10101
+ };
10102
+ function byteLength(string, encoding) {
10103
+ if (Buffer.isBuffer(string)) return string.length;
10104
+ if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) return string.byteLength;
10105
+ if ('string' != typeof string) throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string);
10106
+ var len = string.length;
10107
+ var mustMatch = arguments.length > 2 && true === arguments[2];
10108
+ if (!mustMatch && 0 === len) return 0;
10109
+ var loweredCase = false;
10110
+ for(;;)switch(encoding){
10111
+ case 'ascii':
10112
+ case 'latin1':
10113
+ case 'binary':
10114
+ return len;
10115
+ case 'utf8':
10116
+ case 'utf-8':
10117
+ return utf8ToBytes(string).length;
10118
+ case 'ucs2':
10119
+ case 'ucs-2':
10120
+ case 'utf16le':
10121
+ case 'utf-16le':
10122
+ return 2 * len;
10123
+ case 'hex':
10124
+ return len >>> 1;
10125
+ case 'base64':
10126
+ return base64ToBytes(string).length;
10127
+ default:
10128
+ if (loweredCase) return mustMatch ? -1 : utf8ToBytes(string).length;
10129
+ encoding = ('' + encoding).toLowerCase();
10130
+ loweredCase = true;
10131
+ }
10132
+ }
10133
+ Buffer.byteLength = byteLength;
10134
+ function slowToString(encoding, start, end) {
10135
+ var loweredCase = false;
10136
+ if (void 0 === start || start < 0) start = 0;
10137
+ if (start > this.length) return '';
10138
+ if (void 0 === end || end > this.length) end = this.length;
10139
+ if (end <= 0) return '';
10140
+ end >>>= 0;
10141
+ start >>>= 0;
10142
+ if (end <= start) return '';
10143
+ if (!encoding) encoding = 'utf8';
10144
+ while(true)switch(encoding){
10145
+ case 'hex':
10146
+ return hexSlice(this, start, end);
10147
+ case 'utf8':
10148
+ case 'utf-8':
10149
+ return utf8Slice(this, start, end);
10150
+ case 'ascii':
10151
+ return asciiSlice(this, start, end);
10152
+ case 'latin1':
10153
+ case 'binary':
10154
+ return latin1Slice(this, start, end);
10155
+ case 'base64':
10156
+ return base64Slice(this, start, end);
10157
+ case 'ucs2':
10158
+ case 'ucs-2':
10159
+ case 'utf16le':
10160
+ case 'utf-16le':
10161
+ return utf16leSlice(this, start, end);
10162
+ default:
10163
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
10164
+ encoding = (encoding + '').toLowerCase();
10165
+ loweredCase = true;
10166
+ }
10167
+ }
10168
+ Buffer.prototype._isBuffer = true;
10169
+ function swap(b, n, m) {
10170
+ var i = b[n];
10171
+ b[n] = b[m];
10172
+ b[m] = i;
10173
+ }
10174
+ Buffer.prototype.swap16 = function() {
10175
+ var len = this.length;
10176
+ if (len % 2 !== 0) throw new RangeError('Buffer size must be a multiple of 16-bits');
10177
+ for(var i = 0; i < len; i += 2)swap(this, i, i + 1);
10178
+ return this;
10179
+ };
10180
+ Buffer.prototype.swap32 = function() {
10181
+ var len = this.length;
10182
+ if (len % 4 !== 0) throw new RangeError('Buffer size must be a multiple of 32-bits');
10183
+ for(var i = 0; i < len; i += 4){
10184
+ swap(this, i, i + 3);
10185
+ swap(this, i + 1, i + 2);
10186
+ }
10187
+ return this;
10188
+ };
10189
+ Buffer.prototype.swap64 = function() {
10190
+ var len = this.length;
10191
+ if (len % 8 !== 0) throw new RangeError('Buffer size must be a multiple of 64-bits');
10192
+ for(var i = 0; i < len; i += 8){
10193
+ swap(this, i, i + 7);
10194
+ swap(this, i + 1, i + 6);
10195
+ swap(this, i + 2, i + 5);
10196
+ swap(this, i + 3, i + 4);
10197
+ }
10198
+ return this;
10199
+ };
10200
+ Buffer.prototype.toString = function() {
10201
+ var length = this.length;
10202
+ if (0 === length) return '';
10203
+ if (0 === arguments.length) return utf8Slice(this, 0, length);
10204
+ return slowToString.apply(this, arguments);
10205
+ };
10206
+ Buffer.prototype.toLocaleString = Buffer.prototype.toString;
10207
+ Buffer.prototype.equals = function(b) {
10208
+ if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer');
10209
+ if (this === b) return true;
10210
+ return 0 === Buffer.compare(this, b);
10211
+ };
10212
+ Buffer.prototype.inspect = function() {
10213
+ var str = '';
10214
+ var max = exports.INSPECT_MAX_BYTES;
10215
+ str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim();
10216
+ if (this.length > max) str += ' ... ';
10217
+ return '<Buffer ' + str + '>';
10218
+ };
10219
+ if (customInspectSymbol) Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect;
10220
+ Buffer.prototype.compare = function(target, start, end, thisStart, thisEnd) {
10221
+ if (isInstance(target, Uint8Array)) target = Buffer.from(target, target.offset, target.byteLength);
10222
+ if (!Buffer.isBuffer(target)) throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target);
10223
+ if (void 0 === start) start = 0;
10224
+ if (void 0 === end) end = target ? target.length : 0;
10225
+ if (void 0 === thisStart) thisStart = 0;
10226
+ if (void 0 === thisEnd) thisEnd = this.length;
10227
+ if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) throw new RangeError('out of range index');
10228
+ if (thisStart >= thisEnd && start >= end) return 0;
10229
+ if (thisStart >= thisEnd) return -1;
10230
+ if (start >= end) return 1;
10231
+ start >>>= 0;
10232
+ end >>>= 0;
10233
+ thisStart >>>= 0;
10234
+ thisEnd >>>= 0;
10235
+ if (this === target) return 0;
10236
+ var x = thisEnd - thisStart;
10237
+ var y = end - start;
10238
+ var len = Math.min(x, y);
10239
+ var thisCopy = this.slice(thisStart, thisEnd);
10240
+ var targetCopy = target.slice(start, end);
10241
+ for(var i = 0; i < len; ++i)if (thisCopy[i] !== targetCopy[i]) {
10242
+ x = thisCopy[i];
10243
+ y = targetCopy[i];
10244
+ break;
10245
+ }
10246
+ if (x < y) return -1;
10247
+ if (y < x) return 1;
10248
+ return 0;
10249
+ };
10250
+ function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
10251
+ if (0 === buffer.length) return -1;
10252
+ if ('string' == typeof byteOffset) {
10253
+ encoding = byteOffset;
10254
+ byteOffset = 0;
10255
+ } else if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff;
10256
+ else if (byteOffset < -2147483648) byteOffset = -2147483648;
10257
+ byteOffset *= 1;
10258
+ if (numberIsNaN(byteOffset)) byteOffset = dir ? 0 : buffer.length - 1;
10259
+ if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
10260
+ if (byteOffset >= buffer.length) if (dir) return -1;
10261
+ else byteOffset = buffer.length - 1;
10262
+ else if (byteOffset < 0) if (!dir) return -1;
10263
+ else byteOffset = 0;
10264
+ if ('string' == typeof val) val = Buffer.from(val, encoding);
10265
+ if (Buffer.isBuffer(val)) {
10266
+ if (0 === val.length) return -1;
10267
+ return arrayIndexOf(buffer, val, byteOffset, encoding, dir);
10268
+ }
10269
+ if ('number' == typeof val) {
10270
+ val &= 0xFF;
10271
+ if ('function' == typeof Uint8Array.prototype.indexOf) if (dir) return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);
10272
+ else return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);
10273
+ return arrayIndexOf(buffer, [
10274
+ val
10275
+ ], byteOffset, encoding, dir);
10276
+ }
10277
+ throw new TypeError('val must be string, number or Buffer');
10278
+ }
10279
+ function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
10280
+ var indexSize = 1;
10281
+ var arrLength = arr.length;
10282
+ var valLength = val.length;
10283
+ if (void 0 !== encoding) {
10284
+ encoding = String(encoding).toLowerCase();
10285
+ if ('ucs2' === encoding || 'ucs-2' === encoding || 'utf16le' === encoding || 'utf-16le' === encoding) {
10286
+ if (arr.length < 2 || val.length < 2) return -1;
10287
+ indexSize = 2;
10288
+ arrLength /= 2;
10289
+ valLength /= 2;
10290
+ byteOffset /= 2;
10291
+ }
10292
+ }
10293
+ function read(buf, i) {
10294
+ if (1 === indexSize) return buf[i];
10295
+ return buf.readUInt16BE(i * indexSize);
10296
+ }
10297
+ var i;
10298
+ if (dir) {
10299
+ var foundIndex = -1;
10300
+ for(i = byteOffset; i < arrLength; i++)if (read(arr, i) === read(val, -1 === foundIndex ? 0 : i - foundIndex)) {
10301
+ if (-1 === foundIndex) foundIndex = i;
10302
+ if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
10303
+ } else {
10304
+ if (-1 !== foundIndex) i -= i - foundIndex;
10305
+ foundIndex = -1;
10306
+ }
10307
+ } else {
10308
+ if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
10309
+ for(i = byteOffset; i >= 0; i--){
10310
+ var found = true;
10311
+ for(var j = 0; j < valLength; j++)if (read(arr, i + j) !== read(val, j)) {
10312
+ found = false;
10313
+ break;
10314
+ }
10315
+ if (found) return i;
10316
+ }
10317
+ }
10318
+ return -1;
10319
+ }
10320
+ Buffer.prototype.includes = function(val, byteOffset, encoding) {
10321
+ return -1 !== this.indexOf(val, byteOffset, encoding);
10322
+ };
10323
+ Buffer.prototype.indexOf = function(val, byteOffset, encoding) {
10324
+ return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
10325
+ };
10326
+ Buffer.prototype.lastIndexOf = function(val, byteOffset, encoding) {
10327
+ return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
10328
+ };
10329
+ function hexWrite(buf, string, offset, length) {
10330
+ offset = Number(offset) || 0;
10331
+ var remaining = buf.length - offset;
10332
+ if (length) {
10333
+ length = Number(length);
10334
+ if (length > remaining) length = remaining;
10335
+ } else length = remaining;
10336
+ var strLen = string.length;
10337
+ if (length > strLen / 2) length = strLen / 2;
10338
+ for(var i = 0; i < length; ++i){
10339
+ var parsed = parseInt(string.substr(2 * i, 2), 16);
10340
+ if (numberIsNaN(parsed)) break;
10341
+ buf[offset + i] = parsed;
10342
+ }
10343
+ return i;
10344
+ }
10345
+ function utf8Write(buf, string, offset, length) {
10346
+ return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
10347
+ }
10348
+ function asciiWrite(buf, string, offset, length) {
10349
+ return blitBuffer(asciiToBytes(string), buf, offset, length);
10350
+ }
10351
+ function base64Write(buf, string, offset, length) {
10352
+ return blitBuffer(base64ToBytes(string), buf, offset, length);
10353
+ }
10354
+ function ucs2Write(buf, string, offset, length) {
10355
+ return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
10356
+ }
10357
+ Buffer.prototype.write = function(string, offset, length, encoding) {
10358
+ if (void 0 === offset) {
10359
+ encoding = 'utf8';
10360
+ length = this.length;
10361
+ offset = 0;
10362
+ } else if (void 0 === length && 'string' == typeof offset) {
10363
+ encoding = offset;
10364
+ length = this.length;
10365
+ offset = 0;
10366
+ } else if (isFinite(offset)) {
10367
+ offset >>>= 0;
10368
+ if (isFinite(length)) {
10369
+ length >>>= 0;
10370
+ if (void 0 === encoding) encoding = 'utf8';
10371
+ } else {
10372
+ encoding = length;
10373
+ length = void 0;
10374
+ }
10375
+ } else throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');
10376
+ var remaining = this.length - offset;
10377
+ if (void 0 === length || length > remaining) length = remaining;
10378
+ if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) throw new RangeError('Attempt to write outside buffer bounds');
10379
+ if (!encoding) encoding = 'utf8';
10380
+ var loweredCase = false;
10381
+ for(;;)switch(encoding){
10382
+ case 'hex':
10383
+ return hexWrite(this, string, offset, length);
10384
+ case 'utf8':
10385
+ case 'utf-8':
10386
+ return utf8Write(this, string, offset, length);
10387
+ case 'ascii':
10388
+ case 'latin1':
10389
+ case 'binary':
10390
+ return asciiWrite(this, string, offset, length);
10391
+ case 'base64':
10392
+ return base64Write(this, string, offset, length);
10393
+ case 'ucs2':
10394
+ case 'ucs-2':
10395
+ case 'utf16le':
10396
+ case 'utf-16le':
10397
+ return ucs2Write(this, string, offset, length);
10398
+ default:
10399
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
10400
+ encoding = ('' + encoding).toLowerCase();
10401
+ loweredCase = true;
10402
+ }
10403
+ };
10404
+ Buffer.prototype.toJSON = function() {
10405
+ return {
10406
+ type: 'Buffer',
10407
+ data: Array.prototype.slice.call(this._arr || this, 0)
10408
+ };
10409
+ };
10410
+ function base64Slice(buf, start, end) {
10411
+ if (0 === start && end === buf.length) return base64.fromByteArray(buf);
10412
+ return base64.fromByteArray(buf.slice(start, end));
10413
+ }
10414
+ function utf8Slice(buf, start, end) {
10415
+ end = Math.min(buf.length, end);
10416
+ var res = [];
10417
+ var i = start;
10418
+ while(i < end){
10419
+ var firstByte = buf[i];
10420
+ var codePoint = null;
10421
+ var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;
10422
+ if (i + bytesPerSequence <= end) {
10423
+ var secondByte, thirdByte, fourthByte, tempCodePoint;
10424
+ switch(bytesPerSequence){
10425
+ case 1:
10426
+ if (firstByte < 0x80) codePoint = firstByte;
10427
+ break;
10428
+ case 2:
10429
+ secondByte = buf[i + 1];
10430
+ if ((0xC0 & secondByte) === 0x80) {
10431
+ tempCodePoint = (0x1F & firstByte) << 0x6 | 0x3F & secondByte;
10432
+ if (tempCodePoint > 0x7F) codePoint = tempCodePoint;
10433
+ }
10434
+ break;
10435
+ case 3:
10436
+ secondByte = buf[i + 1];
10437
+ thirdByte = buf[i + 2];
10438
+ if ((0xC0 & secondByte) === 0x80 && (0xC0 & thirdByte) === 0x80) {
10439
+ tempCodePoint = (0xF & firstByte) << 0xC | (0x3F & secondByte) << 0x6 | 0x3F & thirdByte;
10440
+ if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) codePoint = tempCodePoint;
10441
+ }
10442
+ break;
10443
+ case 4:
10444
+ secondByte = buf[i + 1];
10445
+ thirdByte = buf[i + 2];
10446
+ fourthByte = buf[i + 3];
10447
+ if ((0xC0 & secondByte) === 0x80 && (0xC0 & thirdByte) === 0x80 && (0xC0 & fourthByte) === 0x80) {
10448
+ tempCodePoint = (0xF & firstByte) << 0x12 | (0x3F & secondByte) << 0xC | (0x3F & thirdByte) << 0x6 | 0x3F & fourthByte;
10449
+ if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) codePoint = tempCodePoint;
10450
+ }
10451
+ }
10452
+ }
10453
+ if (null === codePoint) {
10454
+ codePoint = 0xFFFD;
10455
+ bytesPerSequence = 1;
10456
+ } else if (codePoint > 0xFFFF) {
10457
+ codePoint -= 0x10000;
10458
+ res.push(codePoint >>> 10 & 0x3FF | 0xD800);
10459
+ codePoint = 0xDC00 | 0x3FF & codePoint;
10460
+ }
10461
+ res.push(codePoint);
10462
+ i += bytesPerSequence;
10463
+ }
10464
+ return decodeCodePointsArray(res);
10465
+ }
10466
+ var MAX_ARGUMENTS_LENGTH = 0x1000;
10467
+ function decodeCodePointsArray(codePoints) {
10468
+ var len = codePoints.length;
10469
+ if (len <= MAX_ARGUMENTS_LENGTH) return String.fromCharCode.apply(String, codePoints);
10470
+ var res = '';
10471
+ var i = 0;
10472
+ while(i < len)res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));
10473
+ return res;
10474
+ }
10475
+ function asciiSlice(buf, start, end) {
10476
+ var ret = '';
10477
+ end = Math.min(buf.length, end);
10478
+ for(var i = start; i < end; ++i)ret += String.fromCharCode(0x7F & buf[i]);
10479
+ return ret;
10480
+ }
10481
+ function latin1Slice(buf, start, end) {
10482
+ var ret = '';
10483
+ end = Math.min(buf.length, end);
10484
+ for(var i = start; i < end; ++i)ret += String.fromCharCode(buf[i]);
10485
+ return ret;
10486
+ }
10487
+ function hexSlice(buf, start, end) {
10488
+ var len = buf.length;
10489
+ if (!start || start < 0) start = 0;
10490
+ if (!end || end < 0 || end > len) end = len;
10491
+ var out = '';
10492
+ for(var i = start; i < end; ++i)out += hexSliceLookupTable[buf[i]];
10493
+ return out;
10494
+ }
10495
+ function utf16leSlice(buf, start, end) {
10496
+ var bytes = buf.slice(start, end);
10497
+ var res = '';
10498
+ for(var i = 0; i < bytes.length - 1; i += 2)res += String.fromCharCode(bytes[i] + 256 * bytes[i + 1]);
10499
+ return res;
10500
+ }
10501
+ Buffer.prototype.slice = function(start, end) {
10502
+ var len = this.length;
10503
+ start = ~~start;
10504
+ end = void 0 === end ? len : ~~end;
10505
+ if (start < 0) {
10506
+ start += len;
10507
+ if (start < 0) start = 0;
10508
+ } else if (start > len) start = len;
10509
+ if (end < 0) {
10510
+ end += len;
10511
+ if (end < 0) end = 0;
10512
+ } else if (end > len) end = len;
10513
+ if (end < start) end = start;
10514
+ var newBuf = this.subarray(start, end);
10515
+ Object.setPrototypeOf(newBuf, Buffer.prototype);
10516
+ return newBuf;
10517
+ };
10518
+ function checkOffset(offset, ext, length) {
10519
+ if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');
10520
+ if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');
10521
+ }
10522
+ Buffer.prototype.readUintLE = Buffer.prototype.readUIntLE = function(offset, byteLength, noAssert) {
10523
+ offset >>>= 0;
10524
+ byteLength >>>= 0;
10525
+ if (!noAssert) checkOffset(offset, byteLength, this.length);
10526
+ var val = this[offset];
10527
+ var mul = 1;
10528
+ var i = 0;
10529
+ while(++i < byteLength && (mul *= 0x100))val += this[offset + i] * mul;
10530
+ return val;
10531
+ };
10532
+ Buffer.prototype.readUintBE = Buffer.prototype.readUIntBE = function(offset, byteLength, noAssert) {
10533
+ offset >>>= 0;
10534
+ byteLength >>>= 0;
10535
+ if (!noAssert) checkOffset(offset, byteLength, this.length);
10536
+ var val = this[offset + --byteLength];
10537
+ var mul = 1;
10538
+ while(byteLength > 0 && (mul *= 0x100))val += this[offset + --byteLength] * mul;
10539
+ return val;
10540
+ };
10541
+ Buffer.prototype.readUint8 = Buffer.prototype.readUInt8 = function(offset, noAssert) {
10542
+ offset >>>= 0;
10543
+ if (!noAssert) checkOffset(offset, 1, this.length);
10544
+ return this[offset];
10545
+ };
10546
+ Buffer.prototype.readUint16LE = Buffer.prototype.readUInt16LE = function(offset, noAssert) {
10547
+ offset >>>= 0;
10548
+ if (!noAssert) checkOffset(offset, 2, this.length);
10549
+ return this[offset] | this[offset + 1] << 8;
10550
+ };
10551
+ Buffer.prototype.readUint16BE = Buffer.prototype.readUInt16BE = function(offset, noAssert) {
10552
+ offset >>>= 0;
10553
+ if (!noAssert) checkOffset(offset, 2, this.length);
10554
+ return this[offset] << 8 | this[offset + 1];
10555
+ };
10556
+ Buffer.prototype.readUint32LE = Buffer.prototype.readUInt32LE = function(offset, noAssert) {
10557
+ offset >>>= 0;
10558
+ if (!noAssert) checkOffset(offset, 4, this.length);
10559
+ return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + 0x1000000 * this[offset + 3];
10560
+ };
10561
+ Buffer.prototype.readUint32BE = Buffer.prototype.readUInt32BE = function(offset, noAssert) {
10562
+ offset >>>= 0;
10563
+ if (!noAssert) checkOffset(offset, 4, this.length);
10564
+ return 0x1000000 * this[offset] + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
10565
+ };
10566
+ Buffer.prototype.readIntLE = function(offset, byteLength, noAssert) {
10567
+ offset >>>= 0;
10568
+ byteLength >>>= 0;
10569
+ if (!noAssert) checkOffset(offset, byteLength, this.length);
10570
+ var val = this[offset];
10571
+ var mul = 1;
10572
+ var i = 0;
10573
+ while(++i < byteLength && (mul *= 0x100))val += this[offset + i] * mul;
10574
+ mul *= 0x80;
10575
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength);
10576
+ return val;
10577
+ };
10578
+ Buffer.prototype.readIntBE = function(offset, byteLength, noAssert) {
10579
+ offset >>>= 0;
10580
+ byteLength >>>= 0;
10581
+ if (!noAssert) checkOffset(offset, byteLength, this.length);
10582
+ var i = byteLength;
10583
+ var mul = 1;
10584
+ var val = this[offset + --i];
10585
+ while(i > 0 && (mul *= 0x100))val += this[offset + --i] * mul;
10586
+ mul *= 0x80;
10587
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength);
10588
+ return val;
10589
+ };
10590
+ Buffer.prototype.readInt8 = function(offset, noAssert) {
10591
+ offset >>>= 0;
10592
+ if (!noAssert) checkOffset(offset, 1, this.length);
10593
+ if (!(0x80 & this[offset])) return this[offset];
10594
+ return (0xff - this[offset] + 1) * -1;
10595
+ };
10596
+ Buffer.prototype.readInt16LE = function(offset, noAssert) {
10597
+ offset >>>= 0;
10598
+ if (!noAssert) checkOffset(offset, 2, this.length);
10599
+ var val = this[offset] | this[offset + 1] << 8;
10600
+ return 0x8000 & val ? 0xFFFF0000 | val : val;
10601
+ };
10602
+ Buffer.prototype.readInt16BE = function(offset, noAssert) {
10603
+ offset >>>= 0;
10604
+ if (!noAssert) checkOffset(offset, 2, this.length);
10605
+ var val = this[offset + 1] | this[offset] << 8;
10606
+ return 0x8000 & val ? 0xFFFF0000 | val : val;
10607
+ };
10608
+ Buffer.prototype.readInt32LE = function(offset, noAssert) {
10609
+ offset >>>= 0;
10610
+ if (!noAssert) checkOffset(offset, 4, this.length);
10611
+ return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
10612
+ };
10613
+ Buffer.prototype.readInt32BE = function(offset, noAssert) {
10614
+ offset >>>= 0;
10615
+ if (!noAssert) checkOffset(offset, 4, this.length);
10616
+ return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
10617
+ };
10618
+ Buffer.prototype.readFloatLE = function(offset, noAssert) {
10619
+ offset >>>= 0;
10620
+ if (!noAssert) checkOffset(offset, 4, this.length);
10621
+ return ieee754.read(this, offset, true, 23, 4);
10622
+ };
10623
+ Buffer.prototype.readFloatBE = function(offset, noAssert) {
10624
+ offset >>>= 0;
10625
+ if (!noAssert) checkOffset(offset, 4, this.length);
10626
+ return ieee754.read(this, offset, false, 23, 4);
10627
+ };
10628
+ Buffer.prototype.readDoubleLE = function(offset, noAssert) {
10629
+ offset >>>= 0;
10630
+ if (!noAssert) checkOffset(offset, 8, this.length);
10631
+ return ieee754.read(this, offset, true, 52, 8);
10632
+ };
10633
+ Buffer.prototype.readDoubleBE = function(offset, noAssert) {
10634
+ offset >>>= 0;
10635
+ if (!noAssert) checkOffset(offset, 8, this.length);
10636
+ return ieee754.read(this, offset, false, 52, 8);
10637
+ };
10638
+ function checkInt(buf, value, offset, ext, max, min) {
10639
+ if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
10640
+ if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
10641
+ if (offset + ext > buf.length) throw new RangeError('Index out of range');
10642
+ }
10643
+ Buffer.prototype.writeUintLE = Buffer.prototype.writeUIntLE = function(value, offset, byteLength, noAssert) {
10644
+ value *= 1;
10645
+ offset >>>= 0;
10646
+ byteLength >>>= 0;
10647
+ if (!noAssert) {
10648
+ var maxBytes = Math.pow(2, 8 * byteLength) - 1;
10649
+ checkInt(this, value, offset, byteLength, maxBytes, 0);
10650
+ }
10651
+ var mul = 1;
10652
+ var i = 0;
10653
+ this[offset] = 0xFF & value;
10654
+ while(++i < byteLength && (mul *= 0x100))this[offset + i] = value / mul & 0xFF;
10655
+ return offset + byteLength;
10656
+ };
10657
+ Buffer.prototype.writeUintBE = Buffer.prototype.writeUIntBE = function(value, offset, byteLength, noAssert) {
10658
+ value *= 1;
10659
+ offset >>>= 0;
10660
+ byteLength >>>= 0;
10661
+ if (!noAssert) {
10662
+ var maxBytes = Math.pow(2, 8 * byteLength) - 1;
10663
+ checkInt(this, value, offset, byteLength, maxBytes, 0);
10664
+ }
10665
+ var i = byteLength - 1;
10666
+ var mul = 1;
10667
+ this[offset + i] = 0xFF & value;
10668
+ while(--i >= 0 && (mul *= 0x100))this[offset + i] = value / mul & 0xFF;
10669
+ return offset + byteLength;
10670
+ };
10671
+ Buffer.prototype.writeUint8 = Buffer.prototype.writeUInt8 = function(value, offset, noAssert) {
10672
+ value *= 1;
10673
+ offset >>>= 0;
10674
+ if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);
10675
+ this[offset] = 0xff & value;
10676
+ return offset + 1;
10677
+ };
10678
+ Buffer.prototype.writeUint16LE = Buffer.prototype.writeUInt16LE = function(value, offset, noAssert) {
10679
+ value *= 1;
10680
+ offset >>>= 0;
10681
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
10682
+ this[offset] = 0xff & value;
10683
+ this[offset + 1] = value >>> 8;
10684
+ return offset + 2;
10685
+ };
10686
+ Buffer.prototype.writeUint16BE = Buffer.prototype.writeUInt16BE = function(value, offset, noAssert) {
10687
+ value *= 1;
10688
+ offset >>>= 0;
10689
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
10690
+ this[offset] = value >>> 8;
10691
+ this[offset + 1] = 0xff & value;
10692
+ return offset + 2;
10693
+ };
10694
+ Buffer.prototype.writeUint32LE = Buffer.prototype.writeUInt32LE = function(value, offset, noAssert) {
10695
+ value *= 1;
10696
+ offset >>>= 0;
10697
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
10698
+ this[offset + 3] = value >>> 24;
10699
+ this[offset + 2] = value >>> 16;
10700
+ this[offset + 1] = value >>> 8;
10701
+ this[offset] = 0xff & value;
10702
+ return offset + 4;
10703
+ };
10704
+ Buffer.prototype.writeUint32BE = Buffer.prototype.writeUInt32BE = function(value, offset, noAssert) {
10705
+ value *= 1;
10706
+ offset >>>= 0;
10707
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
10708
+ this[offset] = value >>> 24;
10709
+ this[offset + 1] = value >>> 16;
10710
+ this[offset + 2] = value >>> 8;
10711
+ this[offset + 3] = 0xff & value;
10712
+ return offset + 4;
10713
+ };
10714
+ Buffer.prototype.writeIntLE = function(value, offset, byteLength, noAssert) {
10715
+ value *= 1;
10716
+ offset >>>= 0;
10717
+ if (!noAssert) {
10718
+ var limit = Math.pow(2, 8 * byteLength - 1);
10719
+ checkInt(this, value, offset, byteLength, limit - 1, -limit);
10720
+ }
10721
+ var i = 0;
10722
+ var mul = 1;
10723
+ var sub = 0;
10724
+ this[offset] = 0xFF & value;
10725
+ while(++i < byteLength && (mul *= 0x100)){
10726
+ if (value < 0 && 0 === sub && 0 !== this[offset + i - 1]) sub = 1;
10727
+ this[offset + i] = (value / mul | 0) - sub & 0xFF;
10728
+ }
10729
+ return offset + byteLength;
10730
+ };
10731
+ Buffer.prototype.writeIntBE = function(value, offset, byteLength, noAssert) {
10732
+ value *= 1;
10733
+ offset >>>= 0;
10734
+ if (!noAssert) {
10735
+ var limit = Math.pow(2, 8 * byteLength - 1);
10736
+ checkInt(this, value, offset, byteLength, limit - 1, -limit);
10737
+ }
10738
+ var i = byteLength - 1;
10739
+ var mul = 1;
10740
+ var sub = 0;
10741
+ this[offset + i] = 0xFF & value;
10742
+ while(--i >= 0 && (mul *= 0x100)){
10743
+ if (value < 0 && 0 === sub && 0 !== this[offset + i + 1]) sub = 1;
10744
+ this[offset + i] = (value / mul | 0) - sub & 0xFF;
10745
+ }
10746
+ return offset + byteLength;
10747
+ };
10748
+ Buffer.prototype.writeInt8 = function(value, offset, noAssert) {
10749
+ value *= 1;
10750
+ offset >>>= 0;
10751
+ if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -128);
10752
+ if (value < 0) value = 0xff + value + 1;
10753
+ this[offset] = 0xff & value;
10754
+ return offset + 1;
10755
+ };
10756
+ Buffer.prototype.writeInt16LE = function(value, offset, noAssert) {
10757
+ value *= 1;
10758
+ offset >>>= 0;
10759
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -32768);
10760
+ this[offset] = 0xff & value;
10761
+ this[offset + 1] = value >>> 8;
10762
+ return offset + 2;
10763
+ };
10764
+ Buffer.prototype.writeInt16BE = function(value, offset, noAssert) {
10765
+ value *= 1;
10766
+ offset >>>= 0;
10767
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -32768);
10768
+ this[offset] = value >>> 8;
10769
+ this[offset + 1] = 0xff & value;
10770
+ return offset + 2;
10771
+ };
10772
+ Buffer.prototype.writeInt32LE = function(value, offset, noAssert) {
10773
+ value *= 1;
10774
+ offset >>>= 0;
10775
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -2147483648);
10776
+ this[offset] = 0xff & value;
10777
+ this[offset + 1] = value >>> 8;
10778
+ this[offset + 2] = value >>> 16;
10779
+ this[offset + 3] = value >>> 24;
10780
+ return offset + 4;
10781
+ };
10782
+ Buffer.prototype.writeInt32BE = function(value, offset, noAssert) {
10783
+ value *= 1;
10784
+ offset >>>= 0;
10785
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -2147483648);
10786
+ if (value < 0) value = 0xffffffff + value + 1;
10787
+ this[offset] = value >>> 24;
10788
+ this[offset + 1] = value >>> 16;
10789
+ this[offset + 2] = value >>> 8;
10790
+ this[offset + 3] = 0xff & value;
10791
+ return offset + 4;
9494
10792
  };
9495
- exports.unzipSync = function(buffer, opts) {
9496
- return zlibBufferSync(new Unzip(opts), buffer);
10793
+ function checkIEEE754(buf, value, offset, ext, max, min) {
10794
+ if (offset + ext > buf.length) throw new RangeError('Index out of range');
10795
+ if (offset < 0) throw new RangeError('Index out of range');
10796
+ }
10797
+ function writeFloat(buf, value, offset, littleEndian, noAssert) {
10798
+ value *= 1;
10799
+ offset >>>= 0;
10800
+ if (!noAssert) checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38);
10801
+ ieee754.write(buf, value, offset, littleEndian, 23, 4);
10802
+ return offset + 4;
10803
+ }
10804
+ Buffer.prototype.writeFloatLE = function(value, offset, noAssert) {
10805
+ return writeFloat(this, value, offset, true, noAssert);
9497
10806
  };
9498
- exports.inflate = function(buffer, opts, callback) {
9499
- if ('function' == typeof opts) {
9500
- callback = opts;
9501
- opts = {};
9502
- }
9503
- return zlibBuffer(new Inflate(opts), buffer, callback);
10807
+ Buffer.prototype.writeFloatBE = function(value, offset, noAssert) {
10808
+ return writeFloat(this, value, offset, false, noAssert);
9504
10809
  };
9505
- exports.inflateSync = function(buffer, opts) {
9506
- return zlibBufferSync(new Inflate(opts), buffer);
10810
+ function writeDouble(buf, value, offset, littleEndian, noAssert) {
10811
+ value *= 1;
10812
+ offset >>>= 0;
10813
+ if (!noAssert) checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157e+308);
10814
+ ieee754.write(buf, value, offset, littleEndian, 52, 8);
10815
+ return offset + 8;
10816
+ }
10817
+ Buffer.prototype.writeDoubleLE = function(value, offset, noAssert) {
10818
+ return writeDouble(this, value, offset, true, noAssert);
9507
10819
  };
9508
- exports.gunzip = function(buffer, opts, callback) {
9509
- if ('function' == typeof opts) {
9510
- callback = opts;
9511
- opts = {};
9512
- }
9513
- return zlibBuffer(new Gunzip(opts), buffer, callback);
10820
+ Buffer.prototype.writeDoubleBE = function(value, offset, noAssert) {
10821
+ return writeDouble(this, value, offset, false, noAssert);
9514
10822
  };
9515
- exports.gunzipSync = function(buffer, opts) {
9516
- return zlibBufferSync(new Gunzip(opts), buffer);
10823
+ Buffer.prototype.copy = function(target, targetStart, start, end) {
10824
+ if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer');
10825
+ if (!start) start = 0;
10826
+ if (!end && 0 !== end) end = this.length;
10827
+ if (targetStart >= target.length) targetStart = target.length;
10828
+ if (!targetStart) targetStart = 0;
10829
+ if (end > 0 && end < start) end = start;
10830
+ if (end === start) return 0;
10831
+ if (0 === target.length || 0 === this.length) return 0;
10832
+ if (targetStart < 0) throw new RangeError('targetStart out of bounds');
10833
+ if (start < 0 || start >= this.length) throw new RangeError('Index out of range');
10834
+ if (end < 0) throw new RangeError('sourceEnd out of bounds');
10835
+ if (end > this.length) end = this.length;
10836
+ if (target.length - targetStart < end - start) end = target.length - targetStart + start;
10837
+ var len = end - start;
10838
+ if (this === target && 'function' == typeof Uint8Array.prototype.copyWithin) this.copyWithin(targetStart, start, end);
10839
+ else Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);
10840
+ return len;
9517
10841
  };
9518
- exports.inflateRaw = function(buffer, opts, callback) {
9519
- if ('function' == typeof opts) {
9520
- callback = opts;
9521
- opts = {};
10842
+ Buffer.prototype.fill = function(val, start, end, encoding) {
10843
+ if ('string' == typeof val) {
10844
+ if ('string' == typeof start) {
10845
+ encoding = start;
10846
+ start = 0;
10847
+ end = this.length;
10848
+ } else if ('string' == typeof end) {
10849
+ encoding = end;
10850
+ end = this.length;
10851
+ }
10852
+ if (void 0 !== encoding && 'string' != typeof encoding) throw new TypeError('encoding must be a string');
10853
+ if ('string' == typeof encoding && !Buffer.isEncoding(encoding)) throw new TypeError('Unknown encoding: ' + encoding);
10854
+ if (1 === val.length) {
10855
+ var code = val.charCodeAt(0);
10856
+ if ('utf8' === encoding && code < 128 || 'latin1' === encoding) val = code;
10857
+ }
10858
+ } else if ('number' == typeof val) val &= 255;
10859
+ else if ('boolean' == typeof val) val = Number(val);
10860
+ if (start < 0 || this.length < start || this.length < end) throw new RangeError('Out of range index');
10861
+ if (end <= start) return this;
10862
+ start >>>= 0;
10863
+ end = void 0 === end ? this.length : end >>> 0;
10864
+ if (!val) val = 0;
10865
+ var i;
10866
+ if ('number' == typeof val) for(i = start; i < end; ++i)this[i] = val;
10867
+ else {
10868
+ var bytes = Buffer.isBuffer(val) ? val : Buffer.from(val, encoding);
10869
+ var len = bytes.length;
10870
+ if (0 === len) throw new TypeError('The value "' + val + '" is invalid for argument "value"');
10871
+ for(i = 0; i < end - start; ++i)this[i + start] = bytes[i % len];
9522
10872
  }
9523
- return zlibBuffer(new InflateRaw(opts), buffer, callback);
9524
- };
9525
- exports.inflateRawSync = function(buffer, opts) {
9526
- return zlibBufferSync(new InflateRaw(opts), buffer);
10873
+ return this;
9527
10874
  };
9528
- function zlibBuffer(engine, buffer, callback) {
9529
- var buffers = [];
9530
- var nread = 0;
9531
- engine.on('error', onError);
9532
- engine.on('end', onEnd);
9533
- engine.end(buffer);
9534
- flow();
9535
- function flow() {
9536
- var chunk;
9537
- while(null !== (chunk = engine.read())){
9538
- buffers.push(chunk);
9539
- nread += chunk.length;
10875
+ var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;
10876
+ function base64clean(str) {
10877
+ str = str.split('=')[0];
10878
+ str = str.trim().replace(INVALID_BASE64_RE, '');
10879
+ if (str.length < 2) return '';
10880
+ while(str.length % 4 !== 0)str += '=';
10881
+ return str;
10882
+ }
10883
+ function utf8ToBytes(string, units) {
10884
+ units = units || 1 / 0;
10885
+ var codePoint;
10886
+ var length = string.length;
10887
+ var leadSurrogate = null;
10888
+ var bytes = [];
10889
+ for(var i = 0; i < length; ++i){
10890
+ codePoint = string.charCodeAt(i);
10891
+ if (codePoint > 0xD7FF && codePoint < 0xE000) {
10892
+ if (!leadSurrogate) {
10893
+ if (codePoint > 0xDBFF) {
10894
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
10895
+ continue;
10896
+ }
10897
+ if (i + 1 === length) {
10898
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
10899
+ continue;
10900
+ }
10901
+ leadSurrogate = codePoint;
10902
+ continue;
10903
+ }
10904
+ if (codePoint < 0xDC00) {
10905
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
10906
+ leadSurrogate = codePoint;
10907
+ continue;
10908
+ }
10909
+ codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;
10910
+ } else if (leadSurrogate) {
10911
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
9540
10912
  }
9541
- engine.once('readable', flow);
9542
- }
9543
- function onError(err) {
9544
- engine.removeListener('end', onEnd);
9545
- engine.removeListener('readable', flow);
9546
- callback(err);
9547
- }
9548
- function onEnd() {
9549
- var buf;
9550
- var err = null;
9551
- if (nread >= kMaxLength) err = new RangeError(kRangeErrorMessage);
9552
- else buf = Buffer.concat(buffers, nread);
9553
- buffers = [];
9554
- engine.close();
9555
- callback(err, buf);
10913
+ leadSurrogate = null;
10914
+ if (codePoint < 0x80) {
10915
+ if ((units -= 1) < 0) break;
10916
+ bytes.push(codePoint);
10917
+ } else if (codePoint < 0x800) {
10918
+ if ((units -= 2) < 0) break;
10919
+ bytes.push(codePoint >> 0x6 | 0xC0, 0x3F & codePoint | 0x80);
10920
+ } else if (codePoint < 0x10000) {
10921
+ if ((units -= 3) < 0) break;
10922
+ bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, 0x3F & codePoint | 0x80);
10923
+ } else if (codePoint < 0x110000) {
10924
+ if ((units -= 4) < 0) break;
10925
+ bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, 0x3F & codePoint | 0x80);
10926
+ } else throw new Error('Invalid code point');
9556
10927
  }
10928
+ return bytes;
9557
10929
  }
9558
- function zlibBufferSync(engine, buffer) {
9559
- if ('string' == typeof buffer) buffer = Buffer.from(buffer);
9560
- if (!Buffer.isBuffer(buffer)) throw new TypeError('Not a string or buffer');
9561
- var flushFlag = engine._finishFlushFlag;
9562
- return engine._processChunk(buffer, flushFlag);
9563
- }
9564
- function Deflate(opts) {
9565
- if (!(this instanceof Deflate)) return new Deflate(opts);
9566
- Zlib.call(this, opts, binding.DEFLATE);
9567
- }
9568
- function Inflate(opts) {
9569
- if (!(this instanceof Inflate)) return new Inflate(opts);
9570
- Zlib.call(this, opts, binding.INFLATE);
9571
- }
9572
- function Gzip(opts) {
9573
- if (!(this instanceof Gzip)) return new Gzip(opts);
9574
- Zlib.call(this, opts, binding.GZIP);
9575
- }
9576
- function Gunzip(opts) {
9577
- if (!(this instanceof Gunzip)) return new Gunzip(opts);
9578
- Zlib.call(this, opts, binding.GUNZIP);
9579
- }
9580
- function DeflateRaw(opts) {
9581
- if (!(this instanceof DeflateRaw)) return new DeflateRaw(opts);
9582
- Zlib.call(this, opts, binding.DEFLATERAW);
9583
- }
9584
- function InflateRaw(opts) {
9585
- if (!(this instanceof InflateRaw)) return new InflateRaw(opts);
9586
- Zlib.call(this, opts, binding.INFLATERAW);
10930
+ function asciiToBytes(str) {
10931
+ var byteArray = [];
10932
+ for(var i = 0; i < str.length; ++i)byteArray.push(0xFF & str.charCodeAt(i));
10933
+ return byteArray;
9587
10934
  }
9588
- function Unzip(opts) {
9589
- if (!(this instanceof Unzip)) return new Unzip(opts);
9590
- Zlib.call(this, opts, binding.UNZIP);
10935
+ function utf16leToBytes(str, units) {
10936
+ var c, hi, lo;
10937
+ var byteArray = [];
10938
+ for(var i = 0; i < str.length; ++i){
10939
+ if ((units -= 2) < 0) break;
10940
+ c = str.charCodeAt(i);
10941
+ hi = c >> 8;
10942
+ lo = c % 256;
10943
+ byteArray.push(lo);
10944
+ byteArray.push(hi);
10945
+ }
10946
+ return byteArray;
9591
10947
  }
9592
- function isValidFlushFlag(flag) {
9593
- return flag === binding.Z_NO_FLUSH || flag === binding.Z_PARTIAL_FLUSH || flag === binding.Z_SYNC_FLUSH || flag === binding.Z_FULL_FLUSH || flag === binding.Z_FINISH || flag === binding.Z_BLOCK;
10948
+ function base64ToBytes(str) {
10949
+ return base64.toByteArray(base64clean(str));
9594
10950
  }
9595
- function Zlib(opts, mode) {
9596
- var _this = this;
9597
- this._opts = opts = opts || {};
9598
- this._chunkSize = opts.chunkSize || exports.Z_DEFAULT_CHUNK;
9599
- Transform.call(this, opts);
9600
- if (opts.flush && !isValidFlushFlag(opts.flush)) throw new Error('Invalid flush flag: ' + opts.flush);
9601
- if (opts.finishFlush && !isValidFlushFlag(opts.finishFlush)) throw new Error('Invalid flush flag: ' + opts.finishFlush);
9602
- this._flushFlag = opts.flush || binding.Z_NO_FLUSH;
9603
- this._finishFlushFlag = void 0 !== opts.finishFlush ? opts.finishFlush : binding.Z_FINISH;
9604
- if (opts.chunkSize) {
9605
- if (opts.chunkSize < exports.Z_MIN_CHUNK || opts.chunkSize > exports.Z_MAX_CHUNK) throw new Error('Invalid chunk size: ' + opts.chunkSize);
9606
- }
9607
- if (opts.windowBits) {
9608
- if (opts.windowBits < exports.Z_MIN_WINDOWBITS || opts.windowBits > exports.Z_MAX_WINDOWBITS) throw new Error('Invalid windowBits: ' + opts.windowBits);
9609
- }
9610
- if (opts.level) {
9611
- if (opts.level < exports.Z_MIN_LEVEL || opts.level > exports.Z_MAX_LEVEL) throw new Error('Invalid compression level: ' + opts.level);
9612
- }
9613
- if (opts.memLevel) {
9614
- if (opts.memLevel < exports.Z_MIN_MEMLEVEL || opts.memLevel > exports.Z_MAX_MEMLEVEL) throw new Error('Invalid memLevel: ' + opts.memLevel);
9615
- }
9616
- if (opts.strategy) {
9617
- if (opts.strategy != exports.Z_FILTERED && opts.strategy != exports.Z_HUFFMAN_ONLY && opts.strategy != exports.Z_RLE && opts.strategy != exports.Z_FIXED && opts.strategy != exports.Z_DEFAULT_STRATEGY) throw new Error('Invalid strategy: ' + opts.strategy);
9618
- }
9619
- if (opts.dictionary) {
9620
- if (!Buffer.isBuffer(opts.dictionary)) throw new Error('Invalid dictionary: it should be a Buffer instance');
10951
+ function blitBuffer(src, dst, offset, length) {
10952
+ for(var i = 0; i < length; ++i){
10953
+ if (i + offset >= dst.length || i >= src.length) break;
10954
+ dst[i + offset] = src[i];
9621
10955
  }
9622
- this._handle = new binding.Zlib(mode);
9623
- var self1 = this;
9624
- this._hadError = false;
9625
- this._handle.onerror = function(message, errno) {
9626
- _close(self1);
9627
- self1._hadError = true;
9628
- var error = new Error(message);
9629
- error.errno = errno;
9630
- error.code = exports.codes[errno];
9631
- self1.emit('error', error);
9632
- };
9633
- var level = exports.Z_DEFAULT_COMPRESSION;
9634
- if ('number' == typeof opts.level) level = opts.level;
9635
- var strategy = exports.Z_DEFAULT_STRATEGY;
9636
- if ('number' == typeof opts.strategy) strategy = opts.strategy;
9637
- this._handle.init(opts.windowBits || exports.Z_DEFAULT_WINDOWBITS, level, opts.memLevel || exports.Z_DEFAULT_MEMLEVEL, strategy, opts.dictionary);
9638
- this._buffer = Buffer.allocUnsafe(this._chunkSize);
9639
- this._offset = 0;
9640
- this._level = level;
9641
- this._strategy = strategy;
9642
- this.once('end', this.close);
9643
- Object.defineProperty(this, '_closed', {
9644
- get: function() {
9645
- return !_this._handle;
9646
- },
9647
- configurable: true,
9648
- enumerable: true
9649
- });
10956
+ return i;
9650
10957
  }
9651
- util.inherits(Zlib, Transform);
9652
- Zlib.prototype.params = function(level, strategy, callback) {
9653
- if (level < exports.Z_MIN_LEVEL || level > exports.Z_MAX_LEVEL) throw new RangeError('Invalid compression level: ' + level);
9654
- if (strategy != exports.Z_FILTERED && strategy != exports.Z_HUFFMAN_ONLY && strategy != exports.Z_RLE && strategy != exports.Z_FIXED && strategy != exports.Z_DEFAULT_STRATEGY) throw new TypeError('Invalid strategy: ' + strategy);
9655
- if (this._level !== level || this._strategy !== strategy) {
9656
- var self1 = this;
9657
- this.flush(binding.Z_SYNC_FLUSH, function() {
9658
- assert(self1._handle, 'zlib binding closed');
9659
- self1._handle.params(level, strategy);
9660
- if (!self1._hadError) {
9661
- self1._level = level;
9662
- self1._strategy = strategy;
9663
- if (callback) callback();
9664
- }
9665
- });
9666
- } else process.nextTick(callback);
9667
- };
9668
- Zlib.prototype.reset = function() {
9669
- assert(this._handle, 'zlib binding closed');
9670
- return this._handle.reset();
9671
- };
9672
- Zlib.prototype._flush = function(callback) {
9673
- this._transform(Buffer.alloc(0), '', callback);
9674
- };
9675
- Zlib.prototype.flush = function(kind, callback) {
9676
- var _this2 = this;
9677
- var ws = this._writableState;
9678
- if ('function' == typeof kind || void 0 === kind && !callback) {
9679
- callback = kind;
9680
- kind = binding.Z_FULL_FLUSH;
9681
- }
9682
- if (ws.ended) {
9683
- if (callback) process.nextTick(callback);
9684
- } else if (ws.ending) {
9685
- if (callback) this.once('end', callback);
9686
- } else if (ws.needDrain) {
9687
- if (callback) this.once('drain', function() {
9688
- return _this2.flush(kind, callback);
9689
- });
9690
- } else {
9691
- this._flushFlag = kind;
9692
- this.write(Buffer.alloc(0), '', callback);
9693
- }
9694
- };
9695
- Zlib.prototype.close = function(callback) {
9696
- _close(this, callback);
9697
- process.nextTick(emitCloseNT, this);
9698
- };
9699
- function _close(engine, callback) {
9700
- if (callback) process.nextTick(callback);
9701
- if (!engine._handle) return;
9702
- engine._handle.close();
9703
- engine._handle = null;
10958
+ function isInstance(obj, type) {
10959
+ return obj instanceof type || null != obj && null != obj.constructor && null != obj.constructor.name && obj.constructor.name === type.name;
9704
10960
  }
9705
- function emitCloseNT(self1) {
9706
- self1.emit('close');
10961
+ function numberIsNaN(obj) {
10962
+ return obj !== obj;
9707
10963
  }
9708
- Zlib.prototype._transform = function(chunk, encoding, cb) {
9709
- var flushFlag;
9710
- var ws = this._writableState;
9711
- var ending = ws.ending || ws.ended;
9712
- var last = ending && (!chunk || ws.length === chunk.length);
9713
- if (null !== chunk && !Buffer.isBuffer(chunk)) return cb(new Error('invalid input'));
9714
- if (!this._handle) return cb(new Error('zlib binding closed'));
9715
- if (last) flushFlag = this._finishFlushFlag;
9716
- else {
9717
- flushFlag = this._flushFlag;
9718
- if (chunk.length >= ws.length) this._flushFlag = this._opts.flush || binding.Z_NO_FLUSH;
9719
- }
9720
- this._processChunk(chunk, flushFlag, cb);
9721
- };
9722
- Zlib.prototype._processChunk = function(chunk, flushFlag, cb) {
9723
- var availInBefore = chunk && chunk.length;
9724
- var availOutBefore = this._chunkSize - this._offset;
9725
- var inOff = 0;
9726
- var self1 = this;
9727
- var async = 'function' == typeof cb;
9728
- if (!async) {
9729
- var buffers = [];
9730
- var nread = 0;
9731
- var error;
9732
- this.on('error', function(er) {
9733
- error = er;
9734
- });
9735
- assert(this._handle, 'zlib binding closed');
9736
- do var res = this._handle.writeSync(flushFlag, chunk, inOff, availInBefore, this._buffer, this._offset, availOutBefore);
9737
- while (!this._hadError && callback(res[0], res[1]))
9738
- if (this._hadError) throw error;
9739
- if (nread >= kMaxLength) {
9740
- _close(this);
9741
- throw new RangeError(kRangeErrorMessage);
9742
- }
9743
- var buf = Buffer.concat(buffers, nread);
9744
- _close(this);
9745
- return buf;
9746
- }
9747
- assert(this._handle, 'zlib binding closed');
9748
- var req = this._handle.write(flushFlag, chunk, inOff, availInBefore, this._buffer, this._offset, availOutBefore);
9749
- req.buffer = chunk;
9750
- req.callback = callback;
9751
- function callback(availInAfter, availOutAfter) {
9752
- if (this) {
9753
- this.buffer = null;
9754
- this.callback = null;
9755
- }
9756
- if (self1._hadError) return;
9757
- var have = availOutBefore - availOutAfter;
9758
- assert(have >= 0, 'have should not go down');
9759
- if (have > 0) {
9760
- var out = self1._buffer.slice(self1._offset, self1._offset + have);
9761
- self1._offset += have;
9762
- if (async) self1.push(out);
9763
- else {
9764
- buffers.push(out);
9765
- nread += out.length;
9766
- }
9767
- }
9768
- if (0 === availOutAfter || self1._offset >= self1._chunkSize) {
9769
- availOutBefore = self1._chunkSize;
9770
- self1._offset = 0;
9771
- self1._buffer = Buffer.allocUnsafe(self1._chunkSize);
9772
- }
9773
- if (0 === availOutAfter) {
9774
- inOff += availInBefore - availInAfter;
9775
- availInBefore = availInAfter;
9776
- if (!async) return true;
9777
- var newReq = self1._handle.write(flushFlag, chunk, inOff, availInBefore, self1._buffer, self1._offset, self1._chunkSize);
9778
- newReq.callback = callback;
9779
- newReq.buffer = chunk;
9780
- return;
9781
- }
9782
- if (!async) return false;
9783
- cb();
10964
+ var hexSliceLookupTable = function() {
10965
+ var alphabet = '0123456789abcdef';
10966
+ var table = new Array(256);
10967
+ for(var i = 0; i < 16; ++i){
10968
+ var i16 = 16 * i;
10969
+ for(var j = 0; j < 16; ++j)table[i16 + j] = alphabet[i] + alphabet[j];
9784
10970
  }
9785
- };
9786
- util.inherits(Deflate, Zlib);
9787
- util.inherits(Inflate, Zlib);
9788
- util.inherits(Gzip, Zlib);
9789
- util.inherits(Gunzip, Zlib);
9790
- util.inherits(DeflateRaw, Zlib);
9791
- util.inherits(InflateRaw, Zlib);
9792
- util.inherits(Unzip, Zlib);
9793
- },
9794
- "../../node_modules/.pnpm/buffer-xor@1.0.3/node_modules/buffer-xor/index.js" (module, __unused_rspack_exports, __webpack_require__) {
9795
- var Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
9796
- module.exports = function(a, b) {
9797
- var length = Math.min(a.length, b.length);
9798
- var buffer = new Buffer(length);
9799
- for(var i = 0; i < length; ++i)buffer[i] = a[i] ^ b[i];
9800
- return buffer;
9801
- };
10971
+ return table;
10972
+ }();
9802
10973
  },
9803
10974
  "../../node_modules/.pnpm/builtin-status-codes@3.0.0/node_modules/builtin-status-codes/browser.js" (module) {
9804
10975
  module.exports = {
@@ -10070,13 +11241,13 @@ __webpack_require__.add({
10070
11241
  return null === arg || 'boolean' == typeof arg || 'number' == typeof arg || 'string' == typeof arg || 'symbol' == typeof arg || void 0 === arg;
10071
11242
  }
10072
11243
  exports.isPrimitive = isPrimitive;
10073
- exports.isBuffer = __webpack_require__("./src/browser/buffer.ts").Buffer.isBuffer;
11244
+ exports.isBuffer = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js").Buffer.isBuffer;
10074
11245
  function objectToString(o) {
10075
11246
  return Object.prototype.toString.call(o);
10076
11247
  }
10077
11248
  },
10078
11249
  "../../node_modules/.pnpm/create-ecdh@4.0.4/node_modules/create-ecdh/browser.js" (module, __unused_rspack_exports, __webpack_require__) {
10079
- var Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
11250
+ var Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
10080
11251
  var elliptic = __webpack_require__("../../node_modules/.pnpm/elliptic@6.6.1/node_modules/elliptic/lib/elliptic.js");
10081
11252
  var BN = __webpack_require__("../../node_modules/.pnpm/bn.js@4.12.3/node_modules/bn.js/lib/bn.js");
10082
11253
  module.exports = function(curve) {
@@ -11461,7 +12632,7 @@ __webpack_require__.add({
11461
12632
  };
11462
12633
  },
11463
12634
  "../../node_modules/.pnpm/diffie-hellman@5.0.3/node_modules/diffie-hellman/browser.js" (__unused_rspack_module, exports, __webpack_require__) {
11464
- var Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
12635
+ var Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
11465
12636
  var generatePrime = __webpack_require__("../../node_modules/.pnpm/diffie-hellman@5.0.3/node_modules/diffie-hellman/lib/generatePrime.js");
11466
12637
  var primes = __webpack_require__("../../node_modules/.pnpm/diffie-hellman@5.0.3/node_modules/diffie-hellman/lib/primes.json");
11467
12638
  var DH = __webpack_require__("../../node_modules/.pnpm/diffie-hellman@5.0.3/node_modules/diffie-hellman/lib/dh.js");
@@ -11491,7 +12662,7 @@ __webpack_require__.add({
11491
12662
  exports.createDiffieHellman = exports.DiffieHellman = createDiffieHellman;
11492
12663
  },
11493
12664
  "../../node_modules/.pnpm/diffie-hellman@5.0.3/node_modules/diffie-hellman/lib/dh.js" (module, __unused_rspack_exports, __webpack_require__) {
11494
- var Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
12665
+ var Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
11495
12666
  var BN = __webpack_require__("../../node_modules/.pnpm/bn.js@4.12.3/node_modules/bn.js/lib/bn.js");
11496
12667
  var MillerRabin = __webpack_require__("../../node_modules/.pnpm/miller-rabin@4.0.1/node_modules/miller-rabin/lib/mr.js");
11497
12668
  var millerRabin = new MillerRabin();
@@ -14616,9 +15787,9 @@ __webpack_require__.add({
14616
15787
  }
14617
15788
  utils.intFromLE = intFromLE;
14618
15789
  },
14619
- "../../node_modules/.pnpm/enhanced-resolve@5.21.2/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js" (module, __unused_rspack_exports, __webpack_require__) {
14620
- var Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
14621
- const { nextTick } = __webpack_require__("../../node_modules/.pnpm/enhanced-resolve@5.21.2/node_modules/enhanced-resolve/lib/util/process-browser.js");
15790
+ "../../node_modules/.pnpm/enhanced-resolve@5.21.3/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js" (module, __unused_rspack_exports, __webpack_require__) {
15791
+ var Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
15792
+ const { nextTick } = __webpack_require__("../../node_modules/.pnpm/enhanced-resolve@5.21.3/node_modules/enhanced-resolve/lib/util/process-browser.js");
14622
15793
  const dirname = (path)=>{
14623
15794
  let idx = path.length - 1;
14624
15795
  while(idx >= 0){
@@ -14913,7 +16084,7 @@ __webpack_require__.add({
14913
16084
  }
14914
16085
  };
14915
16086
  },
14916
- "../../node_modules/.pnpm/enhanced-resolve@5.21.2/node_modules/enhanced-resolve/lib/util/process-browser.js" (module) {
16087
+ "../../node_modules/.pnpm/enhanced-resolve@5.21.3/node_modules/enhanced-resolve/lib/util/process-browser.js" (module) {
14917
16088
  module.exports = {
14918
16089
  versions: {},
14919
16090
  nextTick (fn) {
@@ -15756,7 +16927,7 @@ __webpack_require__.add({
15756
16927
  ]
15757
16928
  };
15758
16929
  var bind = __webpack_require__("../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js");
15759
- var hasOwn = __webpack_require__("../../node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js");
16930
+ var hasOwn = __webpack_require__("../../node_modules/.pnpm/hasown@2.0.3/node_modules/hasown/index.js");
15760
16931
  var $concat = bind.call($call, Array.prototype.concat);
15761
16932
  var $spliceApply = bind.call($apply, Array.prototype.splice);
15762
16933
  var $replace = bind.call($call, String.prototype.replace);
@@ -18248,7 +19419,7 @@ __webpack_require__.add({
18248
19419
  }
18249
19420
  exports.shr64_lo = shr64_lo;
18250
19421
  },
18251
- "../../node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js" (module, __unused_rspack_exports, __webpack_require__) {
19422
+ "../../node_modules/.pnpm/hasown@2.0.3/node_modules/hasown/index.js" (module, __unused_rspack_exports, __webpack_require__) {
18252
19423
  var call = Function.prototype.call;
18253
19424
  var $hasOwn = Object.prototype.hasOwnProperty;
18254
19425
  var bind = __webpack_require__("../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js");
@@ -18357,6 +19528,76 @@ __webpack_require__.add({
18357
19528
  return params;
18358
19529
  }
18359
19530
  },
19531
+ "../../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js" (__unused_rspack_module, exports) {
19532
+ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ exports.read = function(buffer, offset, isLE, mLen, nBytes) {
19533
+ var e, m;
19534
+ var eLen = 8 * nBytes - mLen - 1;
19535
+ var eMax = (1 << eLen) - 1;
19536
+ var eBias = eMax >> 1;
19537
+ var nBits = -7;
19538
+ var i = isLE ? nBytes - 1 : 0;
19539
+ var d = isLE ? -1 : 1;
19540
+ var s = buffer[offset + i];
19541
+ i += d;
19542
+ e = s & (1 << -nBits) - 1;
19543
+ s >>= -nBits;
19544
+ nBits += eLen;
19545
+ for(; nBits > 0; e = 256 * e + buffer[offset + i], i += d, nBits -= 8);
19546
+ m = e & (1 << -nBits) - 1;
19547
+ e >>= -nBits;
19548
+ nBits += mLen;
19549
+ for(; nBits > 0; m = 256 * m + buffer[offset + i], i += d, nBits -= 8);
19550
+ if (0 === e) e = 1 - eBias;
19551
+ else {
19552
+ if (e === eMax) return m ? NaN : 1 / 0 * (s ? -1 : 1);
19553
+ m += Math.pow(2, mLen);
19554
+ e -= eBias;
19555
+ }
19556
+ return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
19557
+ };
19558
+ exports.write = function(buffer, value, offset, isLE, mLen, nBytes) {
19559
+ var e, m, c;
19560
+ var eLen = 8 * nBytes - mLen - 1;
19561
+ var eMax = (1 << eLen) - 1;
19562
+ var eBias = eMax >> 1;
19563
+ var rt = 23 === mLen ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
19564
+ var i = isLE ? 0 : nBytes - 1;
19565
+ var d = isLE ? 1 : -1;
19566
+ var s = value < 0 || 0 === value && 1 / value < 0 ? 1 : 0;
19567
+ value = Math.abs(value);
19568
+ if (isNaN(value) || value === 1 / 0) {
19569
+ m = isNaN(value) ? 1 : 0;
19570
+ e = eMax;
19571
+ } else {
19572
+ e = Math.floor(Math.log(value) / Math.LN2);
19573
+ if (value * (c = Math.pow(2, -e)) < 1) {
19574
+ e--;
19575
+ c *= 2;
19576
+ }
19577
+ if (e + eBias >= 1) value += rt / c;
19578
+ else value += rt * Math.pow(2, 1 - eBias);
19579
+ if (value * c >= 2) {
19580
+ e++;
19581
+ c /= 2;
19582
+ }
19583
+ if (e + eBias >= eMax) {
19584
+ m = 0;
19585
+ e = eMax;
19586
+ } else if (e + eBias >= 1) {
19587
+ m = (value * c - 1) * Math.pow(2, mLen);
19588
+ e += eBias;
19589
+ } else {
19590
+ m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
19591
+ e = 0;
19592
+ }
19593
+ }
19594
+ for(; mLen >= 8; buffer[offset + i] = 0xff & m, i += d, m /= 256, mLen -= 8);
19595
+ e = e << mLen | m;
19596
+ eLen += mLen;
19597
+ for(; eLen > 0; buffer[offset + i] = 0xff & e, i += d, e /= 256, eLen -= 8);
19598
+ buffer[offset + i - d] |= 128 * s;
19599
+ };
19600
+ },
18360
19601
  "../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js" (module) {
18361
19602
  if ('function' == typeof Object.create) module.exports = function(ctor, superCtor) {
18362
19603
  if (superCtor) {
@@ -18546,7 +19787,7 @@ __webpack_require__.add({
18546
19787
  "../../node_modules/.pnpm/is-regex@1.2.1/node_modules/is-regex/index.js" (module, __unused_rspack_exports, __webpack_require__) {
18547
19788
  var callBound = __webpack_require__("../../node_modules/.pnpm/call-bound@1.0.4/node_modules/call-bound/index.js");
18548
19789
  var hasToStringTag = __webpack_require__("../../node_modules/.pnpm/has-tostringtag@1.0.2/node_modules/has-tostringtag/shams.js")();
18549
- var hasOwn = __webpack_require__("../../node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js");
19790
+ var hasOwn = __webpack_require__("../../node_modules/.pnpm/hasown@2.0.3/node_modules/hasown/index.js");
18550
19791
  var gOPD = __webpack_require__("../../node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.js");
18551
19792
  var fn;
18552
19793
  if (hasToStringTag) {
@@ -26340,7 +27581,7 @@ __webpack_require__.add({
26340
27581
  return emitter.listeners(type).length;
26341
27582
  };
26342
27583
  var Stream = __webpack_require__("../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/stream-browser.js");
26343
- var Buffer = __webpack_require__("./src/browser/buffer.ts").Buffer;
27584
+ var Buffer = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js").Buffer;
26344
27585
  var OurUint8Array = (void 0 !== __webpack_require__.g ? __webpack_require__.g : "u" > typeof window ? window : "u" > typeof self ? self : {}).Uint8Array || function() {};
26345
27586
  function _uint8ArrayToBuffer(chunk) {
26346
27587
  return Buffer.from(chunk);
@@ -27089,7 +28330,7 @@ __webpack_require__.add({
27089
28330
  deprecate: __webpack_require__("../../node_modules/.pnpm/util-deprecate@1.0.2/node_modules/util-deprecate/browser.js")
27090
28331
  };
27091
28332
  var Stream = __webpack_require__("../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/stream-browser.js");
27092
- var Buffer = __webpack_require__("./src/browser/buffer.ts").Buffer;
28333
+ var Buffer = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js").Buffer;
27093
28334
  var OurUint8Array = (void 0 !== __webpack_require__.g ? __webpack_require__.g : "u" > typeof window ? window : "u" > typeof self ? self : {}).Uint8Array || function() {};
27094
28335
  function _uint8ArrayToBuffer(chunk) {
27095
28336
  return Buffer.from(chunk);
@@ -27724,7 +28965,7 @@ __webpack_require__.add({
27724
28965
  }
27725
28966
  return ("string" === hint ? String : Number)(input);
27726
28967
  }
27727
- var _require = __webpack_require__("./src/browser/buffer.ts"), Buffer = _require.Buffer;
28968
+ var _require = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js"), Buffer = _require.Buffer;
27728
28969
  var _require2 = __webpack_require__("?c028"), inspect = _require2.inspect;
27729
28970
  var custom = inspect && inspect.custom || 'inspect';
27730
28971
  function copyBuffer(src, target, offset) {
@@ -28164,7 +29405,7 @@ __webpack_require__.add({
28164
29405
  exports.pipeline = __webpack_require__("../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/pipeline.js");
28165
29406
  },
28166
29407
  "../../node_modules/.pnpm/ripemd160@2.0.3/node_modules/ripemd160/index.js" (module, __unused_rspack_exports, __webpack_require__) {
28167
- var Buffer = __webpack_require__("./src/browser/buffer.ts").Buffer;
29408
+ var Buffer = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js").Buffer;
28168
29409
  var inherits = __webpack_require__("../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js");
28169
29410
  var HashBase = __webpack_require__("../../node_modules/.pnpm/hash-base@3.1.2/node_modules/hash-base/index.js");
28170
29411
  var ARRAY16 = new Array(16);
@@ -28610,7 +29851,7 @@ __webpack_require__.add({
28610
29851
  module.exports = RIPEMD160;
28611
29852
  },
28612
29853
  "../../node_modules/.pnpm/safe-buffer@5.1.2/node_modules/safe-buffer/index.js" (module, exports, __webpack_require__) {
28613
- var buffer = __webpack_require__("./src/browser/buffer.ts");
29854
+ var buffer = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js");
28614
29855
  var Buffer = buffer.Buffer;
28615
29856
  function copyProps(src, dst) {
28616
29857
  for(var key in src)dst[key] = src[key];
@@ -28646,7 +29887,7 @@ __webpack_require__.add({
28646
29887
  };
28647
29888
  },
28648
29889
  "../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js" (module, exports, __webpack_require__) {
28649
- /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ var buffer = __webpack_require__("./src/browser/buffer.ts");
29890
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ var buffer = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js");
28650
29891
  var Buffer = buffer.Buffer;
28651
29892
  function copyProps(src, dst) {
28652
29893
  for(var key in src)dst[key] = src[key];
@@ -29850,7 +31091,7 @@ __webpack_require__.add({
29850
31091
  xhr = null;
29851
31092
  },
29852
31093
  "../../node_modules/.pnpm/stream-http@3.2.0/node_modules/stream-http/lib/request.js" (module, __unused_rspack_exports, __webpack_require__) {
29853
- var Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
31094
+ var Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
29854
31095
  var process = __webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");
29855
31096
  var capability = __webpack_require__("../../node_modules/.pnpm/stream-http@3.2.0/node_modules/stream-http/lib/capability.js");
29856
31097
  var inherits = __webpack_require__("../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js");
@@ -30102,7 +31343,7 @@ __webpack_require__.add({
30102
31343
  },
30103
31344
  "../../node_modules/.pnpm/stream-http@3.2.0/node_modules/stream-http/lib/response.js" (__unused_rspack_module, exports, __webpack_require__) {
30104
31345
  var process = __webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");
30105
- var Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
31346
+ var Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
30106
31347
  var capability = __webpack_require__("../../node_modules/.pnpm/stream-http@3.2.0/node_modules/stream-http/lib/capability.js");
30107
31348
  var inherits = __webpack_require__("../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js");
30108
31349
  var stream = __webpack_require__("../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/readable-browser.js");
@@ -33242,7 +34483,7 @@ __webpack_require__.add({
33242
34483
  };
33243
34484
  },
33244
34485
  "../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/CachedSource.js" (module, __unused_rspack_exports, __webpack_require__) {
33245
- var Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
34486
+ var Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
33246
34487
  const Source = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/Source.js");
33247
34488
  const streamAndGetSourceAndMap = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/helpers/streamAndGetSourceAndMap.js");
33248
34489
  const streamChunksOfRawSource = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/helpers/streamChunksOfRawSource.js");
@@ -33467,7 +34708,7 @@ __webpack_require__.add({
33467
34708
  module.exports = CompatSource;
33468
34709
  },
33469
34710
  "../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/ConcatSource.js" (module, __unused_rspack_exports, __webpack_require__) {
33470
- var Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
34711
+ var Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
33471
34712
  const RawSource = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/RawSource.js");
33472
34713
  const Source = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/Source.js");
33473
34714
  const { getMap, getSourceAndMap } = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/helpers/getFromStreamChunks.js");
@@ -33643,7 +34884,7 @@ __webpack_require__.add({
33643
34884
  module.exports = ConcatSource;
33644
34885
  },
33645
34886
  "../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/OriginalSource.js" (module, __unused_rspack_exports, __webpack_require__) {
33646
- var Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
34887
+ var Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
33647
34888
  const Source = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/Source.js");
33648
34889
  const { getMap, getSourceAndMap } = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/helpers/getFromStreamChunks.js");
33649
34890
  const getGeneratedSourceInfo = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/helpers/getGeneratedSourceInfo.js");
@@ -33744,7 +34985,7 @@ __webpack_require__.add({
33744
34985
  module.exports = OriginalSource;
33745
34986
  },
33746
34987
  "../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/PrefixSource.js" (module, __unused_rspack_exports, __webpack_require__) {
33747
- var Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
34988
+ var Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
33748
34989
  const RawSource = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/RawSource.js");
33749
34990
  const Source = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/Source.js");
33750
34991
  const { getMap, getSourceAndMap } = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/helpers/getFromStreamChunks.js");
@@ -33803,7 +35044,7 @@ __webpack_require__.add({
33803
35044
  module.exports = PrefixSource;
33804
35045
  },
33805
35046
  "../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/RawSource.js" (module, __unused_rspack_exports, __webpack_require__) {
33806
- var Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
35047
+ var Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
33807
35048
  const Source = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/Source.js");
33808
35049
  const streamChunksOfRawSource = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/helpers/streamChunksOfRawSource.js");
33809
35050
  const { internString, isDualStringBufferCachingEnabled } = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/helpers/stringBufferUtils.js");
@@ -34161,7 +35402,7 @@ __webpack_require__.add({
34161
35402
  module.exports = SizeOnlySource;
34162
35403
  },
34163
35404
  "../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/Source.js" (module, __unused_rspack_exports, __webpack_require__) {
34164
- var Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
35405
+ var Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
34165
35406
  class Source {
34166
35407
  source() {
34167
35408
  throw new Error("Abstract");
@@ -34190,7 +35431,7 @@ __webpack_require__.add({
34190
35431
  module.exports = Source;
34191
35432
  },
34192
35433
  "../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/SourceMapSource.js" (module, __unused_rspack_exports, __webpack_require__) {
34193
- var Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
35434
+ var Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
34194
35435
  const Source = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/Source.js");
34195
35436
  const { getMap, getSourceAndMap } = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/helpers/getFromStreamChunks.js");
34196
35437
  const streamChunksOfCombinedSourceMap = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/helpers/streamChunksOfCombinedSourceMap.js");
@@ -35318,9 +36559,8 @@ __webpack_require__.add({
35318
36559
  }
35319
36560
  },
35320
36561
  "./src/browser/buffer.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
35321
- __webpack_require__.r(__webpack_exports__);
35322
36562
  __webpack_require__.d(__webpack_exports__, {
35323
- Buffer: ()=>_napi_rs_wasm_runtime_fs__rspack_import_0.hp
36563
+ h: ()=>_napi_rs_wasm_runtime_fs__rspack_import_0.hp
35324
36564
  });
35325
36565
  var _napi_rs_wasm_runtime_fs__rspack_import_0 = __webpack_require__("../../node_modules/.pnpm/@napi-rs+wasm-runtime@1.1.4_@emnapi+core@1.10.0_@emnapi+runtime@1.10.0/node_modules/@napi-rs/wasm-runtime/dist/fs.js");
35326
36566
  },
@@ -35339,14 +36579,14 @@ __webpack_require__.add({
35339
36579
  watch: ()=>watch
35340
36580
  });
35341
36581
  var _napi_rs_wasm_runtime_fs__rspack_import_0 = __webpack_require__("../../node_modules/.pnpm/@napi-rs+wasm-runtime@1.1.4_@emnapi+core@1.10.0_@emnapi+runtime@1.10.0/node_modules/@napi-rs/wasm-runtime/dist/fs.js");
35342
- var _rspack_binding__rspack_import_1 = __webpack_require__("@rspack/binding?5821");
36582
+ var _rspack_binding__rspack_import_1 = __webpack_require__("@rspack/binding?d2c4");
35343
36583
  const fs = _rspack_binding__rspack_import_1.__fs;
35344
36584
  const volume = _rspack_binding__rspack_import_1.__volume;
35345
36585
  const memfs = _napi_rs_wasm_runtime_fs__rspack_import_0.tO;
35346
36586
  const { readFileSync, readdirSync, lstat, existsSync, readdir, watch } = fs;
35347
36587
  const __rspack_default_export = fs;
35348
36588
  },
35349
- "@rspack/binding?5821" (module) {
36589
+ "@rspack/binding?d2c4" (module) {
35350
36590
  module.exports = __rspack_external__rspack_wasi_browser_js_bd433424;
35351
36591
  },
35352
36592
  "?7763" () {},
@@ -55106,7 +56346,7 @@ function createFakeCompilationDependencies(getDeps, addDeps) {
55106
56346
  };
55107
56347
  }
55108
56348
  const webpack_sources_lib = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.4_patch_hash=0d62122aa5f9ac77d9ad3b4959c3c0492778a5948c0b00b45a673f3facfca327/node_modules/webpack-sources/lib/index.js");
55109
- var Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
56349
+ var Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
55110
56350
  class SourceAdapter {
55111
56351
  static fromBinding(source) {
55112
56352
  if (!source.map) return new webpack_sources_lib.RawSource(source.source);
@@ -56186,6 +57426,12 @@ const BundlerInfoRspackPlugin = base_create(external_rspack_wasi_browser_js_Buil
56186
57426
  }));
56187
57427
  const CaseSensitivePlugin = base_create(external_rspack_wasi_browser_js_BuiltinPluginName.CaseSensitivePlugin, ()=>{}, 'compilation');
56188
57428
  const ChunkPrefetchPreloadPlugin = base_create(external_rspack_wasi_browser_js_BuiltinPluginName.ChunkPrefetchPreloadPlugin, ()=>{});
57429
+ class CircularModulesInfoPlugin extends RspackBuiltinPlugin {
57430
+ name = external_rspack_wasi_browser_js_BuiltinPluginName.CircularModulesInfoPlugin;
57431
+ raw(_compiler) {
57432
+ return createBuiltinPlugin(this.name, void 0);
57433
+ }
57434
+ }
56189
57435
  class CircularDependencyRspackPlugin extends RspackBuiltinPlugin {
56190
57436
  name = external_rspack_wasi_browser_js_BuiltinPluginName.CircularDependencyRspackPlugin;
56191
57437
  _options;
@@ -56281,6 +57527,7 @@ const CssChunkingPlugin = base_create(rspack_wasi_browser.BuiltinPluginName.CssC
56281
57527
  }
56282
57528
  return options;
56283
57529
  });
57530
+ const CssHttpExternalsRspackPlugin = base_create(external_rspack_wasi_browser_js_BuiltinPluginName.CssHttpExternalsRspackPlugin, ()=>void 0);
56284
57531
  const CssModulesPlugin = base_create(external_rspack_wasi_browser_js_BuiltinPluginName.CssModulesPlugin, ()=>{}, 'compilation');
56285
57532
  const path_browserify = __webpack_require__("../../node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.js");
56286
57533
  var path_browserify_default = /*#__PURE__*/ __webpack_require__.n(path_browserify);
@@ -56657,7 +57904,7 @@ function applyLimits(options) {
56657
57904
  base_create(external_rspack_wasi_browser_js_BuiltinPluginName.EsmNodeTargetPlugin, ()=>void 0);
56658
57905
  const EvalDevToolModulePlugin = base_create(external_rspack_wasi_browser_js_BuiltinPluginName.EvalDevToolModulePlugin, (options)=>options, 'compilation');
56659
57906
  const EvalSourceMapDevToolPlugin = base_create(external_rspack_wasi_browser_js_BuiltinPluginName.EvalSourceMapDevToolPlugin, (options)=>options, 'compilation');
56660
- var util_Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
57907
+ var util_Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
56661
57908
  function isNil(value) {
56662
57909
  return null == value;
56663
57910
  }
@@ -57355,7 +58602,7 @@ class Hash {
57355
58602
  throw new AbstractMethodError();
57356
58603
  }
57357
58604
  }
57358
- var wasm_hash_Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
58605
+ var wasm_hash_Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
57359
58606
  const MAX_SHORT_STRING = -4 & Math.floor(16368);
57360
58607
  class WasmHash {
57361
58608
  exports;
@@ -57474,7 +58721,7 @@ const wasm_hash_create = (wasmModule, instancesPool, chunkSize, digestSize)=>{
57474
58721
  return new WasmHash(new WebAssembly.Instance(wasmModule), instancesPool, chunkSize, digestSize);
57475
58722
  };
57476
58723
  const wasm_hash = wasm_hash_create;
57477
- var md4_Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
58724
+ var md4_Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
57478
58725
  let createMd4;
57479
58726
  const hash_md4 = ()=>{
57480
58727
  if (!createMd4) {
@@ -57483,7 +58730,7 @@ const hash_md4 = ()=>{
57483
58730
  }
57484
58731
  return createMd4();
57485
58732
  };
57486
- var xxhash64_Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
58733
+ var xxhash64_Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
57487
58734
  let createXxhash64;
57488
58735
  const hash_xxhash64 = ()=>{
57489
58736
  if (!createXxhash64) {
@@ -57492,7 +58739,7 @@ const hash_xxhash64 = ()=>{
57492
58739
  }
57493
58740
  return createXxhash64();
57494
58741
  };
57495
- var createHash_Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
58742
+ var createHash_Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
57496
58743
  const BULK_SIZE = 2000;
57497
58744
  const digestCaches = {};
57498
58745
  class BulkUpdateDecorator extends Hash {
@@ -57663,7 +58910,7 @@ function handleResult(loader, module, callback) {
57663
58910
  if ('function' != typeof loader.normal && 'function' != typeof loader.pitch) return callback(new LoaderLoadingError(`Module '${loader.path}' is not a loader (must have normal or pitch function)`));
57664
58911
  callback();
57665
58912
  }
57666
- var utils_Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
58913
+ var utils_Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
57667
58914
  const decoder = new TextDecoder();
57668
58915
  function utf8BufferToString(buf) {
57669
58916
  const isShared = buf.buffer instanceof SharedArrayBuffer || buf.buffer.constructor?.name === 'SharedArrayBuffer';
@@ -58564,6 +59811,7 @@ function getRawOutput(output) {
58564
59811
  function getRawOutputEnvironment(environment = {}) {
58565
59812
  return {
58566
59813
  const: Boolean(environment.const),
59814
+ computedProperty: Boolean(environment.computedProperty),
58567
59815
  methodShorthand: Boolean(environment.methodShorthand),
58568
59816
  arrowFunction: Boolean(environment.arrowFunction),
58569
59817
  nodePrefixForCoreModules: Boolean(environment.nodePrefixForCoreModules),
@@ -58798,12 +60046,16 @@ function getRawParserOptions(parser, type) {
58798
60046
  };
58799
60047
  if ('css' === type) return {
58800
60048
  type: 'css',
58801
- css: getRawCssParserOptions(parser)
60049
+ css: getRawCssParserOptionsForCss(parser)
58802
60050
  };
58803
60051
  if ('css/auto' === type) return {
58804
60052
  type: 'css/auto',
58805
60053
  cssAuto: getRawCssParserOptions(parser)
58806
60054
  };
60055
+ if ('css/global' === type) return {
60056
+ type: 'css/global',
60057
+ cssGlobal: getRawCssParserOptions(parser)
60058
+ };
58807
60059
  if ('css/module' === type) return {
58808
60060
  type: 'css/module',
58809
60061
  cssModule: getRawCssParserOptions(parser)
@@ -58866,7 +60118,22 @@ function getRawCssParserOptions(parser) {
58866
60118
  return {
58867
60119
  namedExports: parser.namedExports,
58868
60120
  url: parser.url,
58869
- resolveImport: parser.resolveImport
60121
+ import: parser.import,
60122
+ resolveImport: parser.resolveImport,
60123
+ animation: parser.animation,
60124
+ customIdents: parser.customIdents,
60125
+ dashedIdents: parser.dashedIdents
60126
+ };
60127
+ }
60128
+ function getRawCssParserOptionsForCss(parser) {
60129
+ return {
60130
+ namedExports: parser.namedExports,
60131
+ url: parser.url,
60132
+ import: parser.import,
60133
+ resolveImport: parser.resolveImport,
60134
+ animation: parser.animation,
60135
+ customIdents: parser.customIdents,
60136
+ dashedIdents: parser.dashedIdents
58870
60137
  };
58871
60138
  }
58872
60139
  function getRawJsonParserOptions(parser) {
@@ -58896,6 +60163,10 @@ function getRawGeneratorOptions(generator, type) {
58896
60163
  type: 'css/auto',
58897
60164
  cssAuto: getRawCssAutoOrModuleGeneratorOptions(generator)
58898
60165
  };
60166
+ if ('css/global' === type) return {
60167
+ type: 'css/global',
60168
+ cssGlobal: getRawCssAutoOrModuleGeneratorOptions(generator)
60169
+ };
58899
60170
  if ('css/module' === type) return {
58900
60171
  type: 'css/module',
58901
60172
  cssModule: getRawCssAutoOrModuleGeneratorOptions(generator)
@@ -58956,6 +60227,10 @@ function getRawCssGeneratorOptions(options) {
58956
60227
  function getRawCssAutoOrModuleGeneratorOptions(options) {
58957
60228
  return {
58958
60229
  localIdentName: options.localIdentName,
60230
+ localIdentHashDigest: options.localIdentHashDigest,
60231
+ localIdentHashDigestLength: options.localIdentHashDigestLength,
60232
+ localIdentHashFunction: options.localIdentHashFunction,
60233
+ localIdentHashSalt: options.localIdentHashSalt,
58959
60234
  exportsConvention: options.exportsConvention,
58960
60235
  exportsOnly: options.exportsOnly,
58961
60236
  esModule: options.esModule
@@ -58986,16 +60261,18 @@ class ExternalsPlugin extends RspackBuiltinPlugin {
58986
60261
  type;
58987
60262
  externals;
58988
60263
  placeInInitial;
60264
+ fallbackType;
58989
60265
  name = external_rspack_wasi_browser_js_BuiltinPluginName.ExternalsPlugin;
58990
60266
  #resolveRequestCache = new Map();
58991
- constructor(type, externals, placeInInitial){
58992
- super(), this.type = type, this.externals = externals, this.placeInInitial = placeInInitial;
60267
+ constructor(type, externals, placeInInitial, fallbackType){
60268
+ super(), this.type = type, this.externals = externals, this.placeInInitial = placeInInitial, this.fallbackType = fallbackType;
58993
60269
  }
58994
60270
  raw() {
58995
60271
  const type = this.type;
58996
60272
  const externals = this.externals;
58997
60273
  const raw = {
58998
60274
  type,
60275
+ fallbackType: this.fallbackType,
58999
60276
  externals: (Array.isArray(externals) ? externals : [
59000
60277
  externals
59001
60278
  ]).filter(Boolean).map((item)=>this.#getRawExternalItem(item)),
@@ -59111,11 +60388,10 @@ class HotModuleReplacementPlugin extends RspackBuiltinPlugin {
59111
60388
  return createBuiltinPlugin(this.name, void 0);
59112
60389
  }
59113
60390
  }
59114
- const HttpExternalsRspackPlugin = base_create(external_rspack_wasi_browser_js_BuiltinPluginName.HttpExternalsRspackPlugin, (css, webAsync)=>({
59115
- css,
60391
+ const HttpExternalsRspackPlugin = base_create(external_rspack_wasi_browser_js_BuiltinPluginName.HttpExternalsRspackPlugin, (webAsync)=>({
59116
60392
  webAsync
59117
60393
  }));
59118
- var HttpUriPlugin_Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
60394
+ var HttpUriPlugin_Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
59119
60395
  memoize(()=>__webpack_require__("../../node_modules/.pnpm/stream-http@3.2.0/node_modules/stream-http/index.js"));
59120
60396
  memoize(()=>__webpack_require__("../../node_modules/.pnpm/https-browserify@1.0.0/node_modules/https-browserify/index.js"));
59121
60397
  const defaultHttpClientForBrowser = async (url, headers)=>{
@@ -59772,7 +61048,7 @@ const SizeLimitsPlugin = base_create(external_rspack_wasi_browser_js_BuiltinPlug
59772
61048
  };
59773
61049
  });
59774
61050
  const SourceMapDevToolPlugin = base_create(external_rspack_wasi_browser_js_BuiltinPluginName.SourceMapDevToolPlugin, (options)=>options, 'compilation');
59775
- var SubresourceIntegrityPlugin_Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
61051
+ var SubresourceIntegrityPlugin_Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
59776
61052
  const SubresourceIntegrityPlugin_PLUGIN_NAME = 'SubresourceIntegrityPlugin';
59777
61053
  const NATIVE_HTML_PLUGIN = 'HtmlRspackPlugin';
59778
61054
  const HTTP_PROTOCOL_REGEX = /^https?:/;
@@ -60728,6 +62004,35 @@ const browserslistTargetHandler_resolve = (browsers)=>{
60728
62004
  9
60729
62005
  ]
60730
62006
  }),
62007
+ computedProperty: rawChecker({
62008
+ chrome: 47,
62009
+ and_chr: 47,
62010
+ edge: 12,
62011
+ firefox: 34,
62012
+ and_ff: 34,
62013
+ opera: 34,
62014
+ op_mob: 34,
62015
+ safari: 8,
62016
+ ios_saf: 8,
62017
+ samsung: 5,
62018
+ android: 47,
62019
+ and_qq: [
62020
+ 14,
62021
+ 9
62022
+ ],
62023
+ and_uc: [
62024
+ 15,
62025
+ 5
62026
+ ],
62027
+ kaios: [
62028
+ 2,
62029
+ 5
62030
+ ],
62031
+ node: [
62032
+ 4,
62033
+ 0
62034
+ ]
62035
+ }),
60731
62036
  arrowFunction: rawChecker({
60732
62037
  chrome: 45,
60733
62038
  and_chr: 45,
@@ -61147,6 +62452,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
61147
62452
  importScriptsInWorker: false,
61148
62453
  globalThis: v(12),
61149
62454
  const: v(6),
62455
+ computedProperty: v(4),
61150
62456
  templateLiteral: v(4),
61151
62457
  optionalChaining: v(14),
61152
62458
  methodShorthand: v(4),
@@ -61192,6 +62498,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
61192
62498
  importScriptsInWorker: true,
61193
62499
  globalThis: v(5),
61194
62500
  const: v(1, 1),
62501
+ computedProperty: v(1, 1),
61195
62502
  templateLiteral: v(1, 1),
61196
62503
  optionalChaining: v(8),
61197
62504
  methodShorthand: v(1, 1),
@@ -61232,6 +62539,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
61232
62539
  require: false,
61233
62540
  globalThis: v(0, 43),
61234
62541
  const: v(0, 15),
62542
+ computedProperty: v(0, 15),
61235
62543
  templateLiteral: v(0, 13),
61236
62544
  optionalChaining: v(0, 44),
61237
62545
  methodShorthand: v(0, 15),
@@ -61256,6 +62564,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
61256
62564
  return {
61257
62565
  esVersion: v > 2022 ? 2022 : v,
61258
62566
  const: v >= 2015,
62567
+ computedProperty: v >= 2015,
61259
62568
  templateLiteral: v >= 2015,
61260
62569
  optionalChaining: v >= 2020,
61261
62570
  methodShorthand: v >= 2015,
@@ -61353,19 +62662,21 @@ const applyRspackOptionsDefaults = (options)=>{
61353
62662
  applySnapshotDefaults(options.snapshot, {
61354
62663
  production
61355
62664
  });
62665
+ applyOutputDefaults(options, {
62666
+ context: options.context,
62667
+ targetProperties,
62668
+ isAffectedByBrowserslist: void 0 === target || 'string' == typeof target && target.startsWith('browserslist') || Array.isArray(target) && target.some((target)=>target.startsWith('browserslist')),
62669
+ entry: options.entry
62670
+ });
61356
62671
  applyModuleDefaults(options.module, {
61357
62672
  asyncWebAssembly: options.experiments.asyncWebAssembly,
61358
62673
  targetProperties,
61359
62674
  mode: options.mode,
61360
62675
  uniqueName: options.output.uniqueName,
61361
62676
  deferImport: options.experiments.deferImport,
61362
- outputModule: options.output.module
61363
- });
61364
- applyOutputDefaults(options, {
61365
- context: options.context,
61366
- targetProperties,
61367
- isAffectedByBrowserslist: void 0 === target || 'string' == typeof target && target.startsWith('browserslist') || Array.isArray(target) && target.some((target)=>target.startsWith('browserslist')),
61368
- entry: options.entry
62677
+ outputModule: options.output.module,
62678
+ hashFunction: options.output.hashFunction,
62679
+ hashSalt: options.output.hashSalt
61369
62680
  });
61370
62681
  applyExternalsPresetsDefaults(options.externalsPresets, {
61371
62682
  targetProperties,
@@ -61480,10 +62791,25 @@ const applyCssGeneratorOptionsDefaults = (generatorOptions, { targetProperties }
61480
62791
  D(generatorOptions, 'exportsOnly', !targetProperties || false === targetProperties.document);
61481
62792
  D(generatorOptions, 'esModule', true);
61482
62793
  };
62794
+ const applyCssModuleGeneratorOptionsDefaults = (generatorOptions, { hashFunction, hashSalt, localIdentName, targetProperties })=>{
62795
+ D(generatorOptions, 'exportsOnly', !targetProperties || false === targetProperties.document);
62796
+ D(generatorOptions, 'esModule', true);
62797
+ D(generatorOptions, 'exportsConvention', 'as-is');
62798
+ D(generatorOptions, 'localIdentName', localIdentName);
62799
+ D(generatorOptions, 'localIdentHashSalt', hashSalt);
62800
+ D(generatorOptions, 'localIdentHashFunction', hashFunction);
62801
+ D(generatorOptions, 'localIdentHashDigest', 'base64url');
62802
+ D(generatorOptions, 'localIdentHashDigestLength', 6);
62803
+ };
62804
+ const applyCssModuleParserOptionsDefaults = (parserOptions)=>{
62805
+ D(parserOptions, 'namedExports', true);
62806
+ D(parserOptions, 'url', true);
62807
+ D(parserOptions, 'import', true);
62808
+ };
61483
62809
  const applyJsonGeneratorOptionsDefaults = (generatorOptions)=>{
61484
62810
  D(generatorOptions, 'JSONParse', true);
61485
62811
  };
61486
- const applyModuleDefaults = (module, { asyncWebAssembly, targetProperties, mode, uniqueName, deferImport, outputModule })=>{
62812
+ const applyModuleDefaults = (module, { asyncWebAssembly, targetProperties, mode, uniqueName, deferImport, outputModule, hashFunction, hashSalt })=>{
61487
62813
  assertNotNill(module.parser);
61488
62814
  assertNotNill(module.generator);
61489
62815
  F(module.parser, "asset", ()=>({}));
@@ -61506,14 +62832,17 @@ const applyModuleDefaults = (module, { asyncWebAssembly, targetProperties, mode,
61506
62832
  assertNotNill(module.parser.css);
61507
62833
  D(module.parser.css, 'namedExports', true);
61508
62834
  D(module.parser.css, 'url', true);
62835
+ D(module.parser.css, 'import', true);
62836
+ D(module.parser.css, 'animation', true);
61509
62837
  F(module.parser, 'css/auto', ()=>({}));
61510
62838
  assertNotNill(module.parser['css/auto']);
61511
- D(module.parser['css/auto'], 'namedExports', true);
61512
- D(module.parser['css/auto'], 'url', true);
62839
+ applyCssModuleParserOptionsDefaults(module.parser['css/auto']);
62840
+ F(module.parser, 'css/global', ()=>({}));
62841
+ assertNotNill(module.parser['css/global']);
62842
+ applyCssModuleParserOptionsDefaults(module.parser['css/global']);
61513
62843
  F(module.parser, 'css/module', ()=>({}));
61514
62844
  assertNotNill(module.parser['css/module']);
61515
- D(module.parser['css/module'], 'namedExports', true);
61516
- D(module.parser['css/module'], 'url', true);
62845
+ applyCssModuleParserOptionsDefaults(module.parser['css/module']);
61517
62846
  F(module.generator, 'css', ()=>({}));
61518
62847
  assertNotNill(module.generator.css);
61519
62848
  applyCssGeneratorOptionsDefaults(module.generator.css, {
@@ -61521,19 +62850,29 @@ const applyModuleDefaults = (module, { asyncWebAssembly, targetProperties, mode,
61521
62850
  });
61522
62851
  F(module.generator, 'css/auto', ()=>({}));
61523
62852
  assertNotNill(module.generator['css/auto']);
61524
- applyCssGeneratorOptionsDefaults(module.generator['css/auto'], {
62853
+ const localIdentName = 'development' === mode ? uniqueName && uniqueName.length > 0 ? '[uniqueName]-[id]-[local]' : '[id]-[local]' : '[fullhash]';
62854
+ applyCssModuleGeneratorOptionsDefaults(module.generator['css/auto'], {
62855
+ hashFunction,
62856
+ hashSalt,
62857
+ localIdentName,
61525
62858
  targetProperties
61526
62859
  });
61527
- D(module.generator['css/auto'], 'exportsConvention', 'as-is');
61528
- const localIdentName = 'development' === mode ? uniqueName && uniqueName.length > 0 ? '[uniqueName]-[id]-[local]' : '[id]-[local]' : '[fullhash]';
61529
- D(module.generator['css/auto'], 'localIdentName', localIdentName);
61530
62860
  F(module.generator, 'css/module', ()=>({}));
61531
62861
  assertNotNill(module.generator['css/module']);
61532
- applyCssGeneratorOptionsDefaults(module.generator['css/module'], {
62862
+ applyCssModuleGeneratorOptionsDefaults(module.generator['css/module'], {
62863
+ hashFunction,
62864
+ hashSalt,
62865
+ localIdentName,
62866
+ targetProperties
62867
+ });
62868
+ F(module.generator, 'css/global', ()=>({}));
62869
+ assertNotNill(module.generator['css/global']);
62870
+ applyCssModuleGeneratorOptionsDefaults(module.generator['css/global'], {
62871
+ hashFunction,
62872
+ hashSalt,
62873
+ localIdentName,
61533
62874
  targetProperties
61534
62875
  });
61535
- D(module.generator['css/module'], 'exportsConvention', 'as-is');
61536
- D(module.generator['css/module'], 'localIdentName', localIdentName);
61537
62876
  A(module, 'defaultRules', ()=>{
61538
62877
  const esm = {
61539
62878
  type: "javascript/esm",
@@ -61699,6 +63038,7 @@ const applyOutputDefaults = (options, { context, targetProperties: tp, isAffecte
61699
63038
  F(environment, 'globalThis', ()=>tp && tp.globalThis);
61700
63039
  F(environment, 'bigIntLiteral', ()=>tp && optimistic(tp.bigIntLiteral));
61701
63040
  F(environment, 'const', ()=>tp && optimistic(tp.const));
63041
+ F(environment, 'computedProperty', ()=>tp && optimistic(tp.computedProperty));
61702
63042
  F(environment, 'methodShorthand', ()=>tp && optimistic(tp.methodShorthand));
61703
63043
  F(environment, 'arrowFunction', ()=>tp && optimistic(tp.arrowFunction));
61704
63044
  F(environment, 'asyncFunction', ()=>tp && optimistic(tp.asyncFunction));
@@ -61858,7 +63198,7 @@ const applyOutputDefaults = (options, { context, targetProperties: tp, isAffecte
61858
63198
  });
61859
63199
  D(output, 'bundlerInfo', {});
61860
63200
  if ('object' == typeof output.bundlerInfo) {
61861
- D(output.bundlerInfo, 'version', "2.0.3");
63201
+ D(output.bundlerInfo, 'version', "2.0.5");
61862
63202
  D(output.bundlerInfo, 'bundler', 'rspack');
61863
63203
  D(output.bundlerInfo, 'force', false);
61864
63204
  }
@@ -62829,7 +64169,7 @@ const mkdirp = (fs, p, callback)=>{
62829
64169
  callback();
62830
64170
  });
62831
64171
  };
62832
- var FileSystem_Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
64172
+ var FileSystem_Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
62833
64173
  const BUFFER_SIZE = 1000;
62834
64174
  const ASYNC_NOOP = async ()=>{};
62835
64175
  const NOOP_FILESYSTEM = {
@@ -63516,7 +64856,7 @@ class MultiStats {
63516
64856
  return obj;
63517
64857
  });
63518
64858
  if (childOptions.version) {
63519
- obj.rspackVersion = "2.0.3";
64859
+ obj.rspackVersion = "2.0.5";
63520
64860
  obj.version = "5.75.0";
63521
64861
  }
63522
64862
  if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join('');
@@ -64393,7 +65733,7 @@ function nodeConsole({ colors, appendOnly, stream }) {
64393
65733
  }
64394
65734
  };
64395
65735
  }
64396
- const CachedInputFileSystem = __webpack_require__("../../node_modules/.pnpm/enhanced-resolve@5.21.2/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js");
65736
+ const CachedInputFileSystem = __webpack_require__("../../node_modules/.pnpm/enhanced-resolve@5.21.3/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js");
64397
65737
  var CachedInputFileSystem_default = /*#__PURE__*/ __webpack_require__.n(CachedInputFileSystem);
64398
65738
  class NodeEnvironmentPlugin {
64399
65739
  options;
@@ -65222,7 +66562,7 @@ const SIMPLE_EXTRACTORS = {
65222
66562
  },
65223
66563
  version: (object)=>{
65224
66564
  object.version = "5.75.0";
65225
- object.rspackVersion = "2.0.3";
66565
+ object.rspackVersion = "2.0.5";
65226
66566
  },
65227
66567
  env: (object, _compilation, _context, { _env })=>{
65228
66568
  object.env = _env;
@@ -66726,15 +68066,18 @@ class RspackOptionsApply {
66726
68066
  compiler.outputFileSystem = fs_0["default"];
66727
68067
  if (options.externals) {
66728
68068
  if (!options.externalsType) throw new Error('options.externalsType should have a value after `applyRspackOptionsDefaults`');
66729
- new ExternalsPlugin(options.externalsType, options.externals, false).apply(compiler);
68069
+ new ExternalsPlugin(options.externalsType, options.externals, false, getModernModuleCjsExternalType(options)).apply(compiler);
68070
+ }
68071
+ if (options.externalsPresets.node) {
68072
+ new NodeTargetPlugin().apply(compiler);
68073
+ new CssHttpExternalsRspackPlugin().apply(compiler);
66730
68074
  }
66731
- if (options.externalsPresets.node) new NodeTargetPlugin().apply(compiler);
66732
68075
  if (options.externalsPresets.electronMain) new ElectronTargetPlugin('main').apply(compiler);
66733
68076
  if (options.externalsPresets.electronPreload) new ElectronTargetPlugin('preload').apply(compiler);
66734
68077
  if (options.externalsPresets.electronRenderer) new ElectronTargetPlugin('renderer').apply(compiler);
66735
68078
  if (options.externalsPresets.electron && !options.externalsPresets.electronMain && !options.externalsPresets.electronPreload && !options.externalsPresets.electronRenderer) new ElectronTargetPlugin().apply(compiler);
66736
68079
  if (options.externalsPresets.nwjs) new ExternalsPlugin('node-commonjs', 'nw.gui', false).apply(compiler);
66737
- if (options.externalsPresets.web || options.externalsPresets.webAsync || options.externalsPresets.node) new HttpExternalsRspackPlugin(true, !!options.externalsPresets.webAsync).apply(compiler);
68080
+ if (options.externalsPresets.web || options.externalsPresets.webAsync) new HttpExternalsRspackPlugin(!!options.externalsPresets.webAsync).apply(compiler);
66738
68081
  new ChunkPrefetchPreloadPlugin().apply(compiler);
66739
68082
  if (options.output.pathinfo) new ModuleInfoHeaderPlugin('verbose' === options.output.pathinfo).apply(compiler);
66740
68083
  if ('string' == typeof options.output.chunkFormat) switch(options.output.chunkFormat){
@@ -66801,6 +68144,7 @@ class RspackOptionsApply {
66801
68144
  if (options.optimization.mergeDuplicateChunks) new MergeDuplicateChunksPlugin().apply(compiler);
66802
68145
  if (options.optimization.sideEffects) new SideEffectsFlagPlugin(options.experiments.pureFunctions).apply(compiler);
66803
68146
  if (options.optimization.providedExports) new FlagDependencyExportsPlugin().apply(compiler);
68147
+ if ('production' === options.mode) new CircularModulesInfoPlugin().apply(compiler);
66804
68148
  if (options.optimization.usedExports) new FlagDependencyUsagePlugin('global' === options.optimization.usedExports).apply(compiler);
66805
68149
  if (options.optimization.concatenateModules) new ModuleConcatenationPlugin().apply(compiler);
66806
68150
  if (options.optimization.inlineExports) new InlineExportsPlugin().apply(compiler);
@@ -66886,6 +68230,10 @@ class RspackOptionsApply {
66886
68230
  compiler.hooks.afterResolvers.call(compiler);
66887
68231
  }
66888
68232
  }
68233
+ function getModernModuleCjsExternalType(options) {
68234
+ const presets = options.externalsPresets;
68235
+ return presets.node || presets.electron || presets.electronMain || presets.electronPreload || presets.electronRenderer || presets.nwjs ? 'node-commonjs' : 'commonjs';
68236
+ }
66889
68237
  const validateConfig_ERROR_PREFIX = 'Invalid Rspack configuration:';
66890
68238
  const validateContext = ({ context })=>{
66891
68239
  if (context && !(0, path_browserify.isAbsolute)(context)) throw new Error(`${validateConfig_ERROR_PREFIX} "context" must be an absolute path, get "${context}".`);
@@ -67108,7 +68456,7 @@ const createHtmlPluginHooksRegisters = (getCompiler, createTap)=>{
67108
68456
  })
67109
68457
  };
67110
68458
  };
67111
- var compilation_Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
68459
+ var compilation_Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
67112
68460
  class CodeGenerationResult {
67113
68461
  #inner;
67114
68462
  constructor(result){
@@ -67576,7 +68924,7 @@ const createContextModuleFactoryHooksRegisters = (getCompiler, createTap)=>({
67576
68924
  };
67577
68925
  })
67578
68926
  });
67579
- var javascriptModules_Buffer = __webpack_require__("./src/browser/buffer.ts")["Buffer"];
68927
+ var javascriptModules_Buffer = __webpack_require__("./src/browser/buffer.ts")["h"];
67580
68928
  const createJavaScriptModulesHooksRegisters = (getCompiler, createTap)=>({
67581
68929
  registerJavascriptModulesChunkHashTaps: createTap(rspack_wasi_browser.RegisterJsTapKind.JavascriptModulesChunkHash, function() {
67582
68930
  return JavascriptModulesPlugin.getCompilationHooks(getCompiler().__internal__get_compilation()).chunkHash;
@@ -68461,7 +69809,7 @@ class Compiler {
68461
69809
  const rawOptions = getRawOptions(options, this);
68462
69810
  rawOptions.__references = Object.fromEntries(this.#ruleSet.builtinReferences.entries());
68463
69811
  rawOptions.__virtual_files = VirtualModulesPlugin.__internal__take_virtual_files(this);
68464
- const instanceBinding = __webpack_require__("@rspack/binding?5821");
69812
+ const instanceBinding = __webpack_require__("@rspack/binding?d2c4");
68465
69813
  this.#registers = this.#createHooksRegisters();
68466
69814
  const inputFileSystem = this.inputFileSystem && ThreadsafeInputNodeFS.needsBinding(options.experiments.useInputFileSystem) ? ThreadsafeInputNodeFS.__to_binding(this.inputFileSystem) : void 0;
68467
69815
  try {
@@ -70051,7 +71399,7 @@ function transformSync(source, options) {
70051
71399
  const _options = JSON.stringify(options || {});
70052
71400
  return rspack_wasi_browser.transformSync(source, _options);
70053
71401
  }
70054
- const exports_rspackVersion = "2.0.3";
71402
+ const exports_rspackVersion = "2.0.5";
70055
71403
  const exports_version = "5.75.0";
70056
71404
  const exports_WebpackError = Error;
70057
71405
  const exports_config = {