@harbour-enterprises/superdoc 0.14.16 → 0.14.17

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.
Files changed (40) hide show
  1. package/dist/chunks/{index-BqH3eQTm.es.js → index-BAysJGB4.es.js} +1 -1
  2. package/dist/chunks/index-CXnGrIkh.es.js +2956 -0
  3. package/dist/chunks/{index-DhQaJbc2.cjs → index-CsCJAG9Q.cjs} +1 -1
  4. package/dist/chunks/{index-DzFLdJgk.es.js → index-D40l9uDK.es.js} +1 -1
  5. package/dist/chunks/index-Drl2YGAZ.cjs +2955 -0
  6. package/dist/chunks/{index-B5xS6OKK.cjs → index-FmrzO61m.cjs} +1 -1
  7. package/dist/chunks/{super-editor.es-BMEPPjoP.cjs → super-editor.es-CD1J7J1S.cjs} +27 -20
  8. package/dist/chunks/{super-editor.es-DgSN0Pjh.es.js → super-editor.es-DZNEocN0.es.js} +27 -20
  9. package/dist/chunks/{url-CNqDAz7z.es.js → url-BGS7DYX5.es.js} +1 -1
  10. package/dist/chunks/{url-7PXI9_kJ.cjs → url-CXyMtOuA.cjs} +1 -1
  11. package/dist/chunks/{xml-js-Bn0K9fTK.es.js → xml-js-BC-eqb4d.es.js} +24 -2257
  12. package/dist/chunks/{xml-js-B_rfwhrZ.cjs → xml-js-D24l3ypz.cjs} +20 -2253
  13. package/dist/style.css +8 -0
  14. package/dist/super-editor/ai-writer.es.js +2 -2
  15. package/dist/super-editor/chunks/{converter-fWl4mnxk.js → converter-Cb4ybypu.js} +12 -6
  16. package/dist/super-editor/chunks/{docx-zipper-BD70NG3a.js → docx-zipper-Da0EppdO.js} +1 -1
  17. package/dist/super-editor/chunks/{editor-BJCoXUyT.js → editor-BsKovpPN.js} +17 -16
  18. package/dist/super-editor/chunks/{toolbar-CfZV_bo8.js → toolbar-CHJXE6J5.js} +2 -2
  19. package/dist/super-editor/converter.es.js +1 -1
  20. package/dist/super-editor/core/Editor.d.ts.map +1 -1
  21. package/dist/super-editor/core/commands/splitListItem.d.ts.map +1 -1
  22. package/dist/super-editor/core/super-converter/v2/importer/imageImporter.d.ts.map +1 -1
  23. package/dist/super-editor/docx-zipper.es.js +2 -2
  24. package/dist/super-editor/editor.es.js +3 -3
  25. package/dist/super-editor/extensions/list-item/list-item.d.ts.map +1 -1
  26. package/dist/super-editor/extensions/pagination/pagination-helpers.d.ts.map +1 -1
  27. package/dist/super-editor/file-zipper.es.js +1 -1
  28. package/dist/super-editor/style.css +8 -0
  29. package/dist/super-editor/super-editor.es.js +6 -6
  30. package/dist/super-editor/toolbar.es.js +2 -2
  31. package/dist/super-editor.cjs +1 -1
  32. package/dist/super-editor.es.js +1 -1
  33. package/dist/superdoc.cjs +5 -5
  34. package/dist/superdoc.css +8 -0
  35. package/dist/superdoc.es.js +6 -6
  36. package/dist/superdoc.umd.js +28 -21
  37. package/dist/superdoc.umd.js.map +1 -1
  38. package/package.json +1 -1
  39. package/dist/chunks/index-D612mw4O.es.js +0 -727
  40. package/dist/chunks/index-ibuaxW1X.cjs +0 -726
@@ -204,10 +204,10 @@ function requireEvents() {
204
204
  }
205
205
  }
206
206
  function _onceWrap(target, type2, listener) {
207
- var state2 = { fired: false, wrapFn: void 0, target, type: type2, listener };
208
- var wrapped = onceWrapper.bind(state2);
207
+ var state = { fired: false, wrapFn: void 0, target, type: type2, listener };
208
+ var wrapped = onceWrapper.bind(state);
209
209
  wrapped.listener = listener;
210
- state2.wrapFn = wrapped;
210
+ state.wrapFn = wrapped;
211
211
  return wrapped;
212
212
  }
213
213
  EventEmitter.prototype.once = function once2(type2, listener) {
@@ -402,14 +402,6 @@ function requireEvents() {
402
402
  }
403
403
  return events.exports;
404
404
  }
405
- var streamBrowser;
406
- var hasRequiredStreamBrowser;
407
- function requireStreamBrowser() {
408
- if (hasRequiredStreamBrowser) return streamBrowser;
409
- hasRequiredStreamBrowser = 1;
410
- streamBrowser = requireEvents().EventEmitter;
411
- return streamBrowser;
412
- }
413
405
  var dist = {};
414
406
  var hasRequiredDist;
415
407
  function requireDist() {
@@ -4473,9 +4465,9 @@ function requireUtil() {
4473
4465
  if (typeof maybeCb !== "function") {
4474
4466
  throw new TypeError("The last argument must be of type Function");
4475
4467
  }
4476
- var self2 = this;
4468
+ var self = this;
4477
4469
  var cb = function() {
4478
- return maybeCb.apply(self2, arguments);
4470
+ return maybeCb.apply(self, arguments);
4479
4471
  };
4480
4472
  original.apply(this, args).then(
4481
4473
  function(ret) {
@@ -4497,468 +4489,6 @@ function requireUtil() {
4497
4489
  })(util);
4498
4490
  return util;
4499
4491
  }
4500
- var buffer_list;
4501
- var hasRequiredBuffer_list;
4502
- function requireBuffer_list() {
4503
- if (hasRequiredBuffer_list) return buffer_list;
4504
- hasRequiredBuffer_list = 1;
4505
- function ownKeys(object, enumerableOnly) {
4506
- var keys = Object.keys(object);
4507
- if (Object.getOwnPropertySymbols) {
4508
- var symbols = Object.getOwnPropertySymbols(object);
4509
- enumerableOnly && (symbols = symbols.filter(function(sym) {
4510
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
4511
- })), keys.push.apply(keys, symbols);
4512
- }
4513
- return keys;
4514
- }
4515
- function _objectSpread(target) {
4516
- for (var i = 1; i < arguments.length; i++) {
4517
- var source = null != arguments[i] ? arguments[i] : {};
4518
- i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
4519
- _defineProperty(target, key, source[key]);
4520
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
4521
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
4522
- });
4523
- }
4524
- return target;
4525
- }
4526
- function _defineProperty(obj, key, value) {
4527
- key = _toPropertyKey(key);
4528
- if (key in obj) {
4529
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
4530
- } else {
4531
- obj[key] = value;
4532
- }
4533
- return obj;
4534
- }
4535
- function _classCallCheck(instance, Constructor) {
4536
- if (!(instance instanceof Constructor)) {
4537
- throw new TypeError("Cannot call a class as a function");
4538
- }
4539
- }
4540
- function _defineProperties(target, props) {
4541
- for (var i = 0; i < props.length; i++) {
4542
- var descriptor = props[i];
4543
- descriptor.enumerable = descriptor.enumerable || false;
4544
- descriptor.configurable = true;
4545
- if ("value" in descriptor) descriptor.writable = true;
4546
- Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
4547
- }
4548
- }
4549
- function _createClass(Constructor, protoProps, staticProps) {
4550
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
4551
- Object.defineProperty(Constructor, "prototype", { writable: false });
4552
- return Constructor;
4553
- }
4554
- function _toPropertyKey(arg) {
4555
- var key = _toPrimitive(arg, "string");
4556
- return typeof key === "symbol" ? key : String(key);
4557
- }
4558
- function _toPrimitive(input, hint) {
4559
- if (typeof input !== "object" || input === null) return input;
4560
- var prim = input[Symbol.toPrimitive];
4561
- if (prim !== void 0) {
4562
- var res = prim.call(input, hint);
4563
- if (typeof res !== "object") return res;
4564
- throw new TypeError("@@toPrimitive must return a primitive value.");
4565
- }
4566
- return String(input);
4567
- }
4568
- var _require = requireDist(), Buffer = _require.Buffer;
4569
- var _require2 = requireUtil(), inspect = _require2.inspect;
4570
- var custom = inspect && inspect.custom || "inspect";
4571
- function copyBuffer(src, target, offset) {
4572
- Buffer.prototype.copy.call(src, target, offset);
4573
- }
4574
- buffer_list = /* @__PURE__ */ function() {
4575
- function BufferList() {
4576
- _classCallCheck(this, BufferList);
4577
- this.head = null;
4578
- this.tail = null;
4579
- this.length = 0;
4580
- }
4581
- _createClass(BufferList, [{
4582
- key: "push",
4583
- value: function push(v) {
4584
- var entry = {
4585
- data: v,
4586
- next: null
4587
- };
4588
- if (this.length > 0) this.tail.next = entry;
4589
- else this.head = entry;
4590
- this.tail = entry;
4591
- ++this.length;
4592
- }
4593
- }, {
4594
- key: "unshift",
4595
- value: function unshift(v) {
4596
- var entry = {
4597
- data: v,
4598
- next: this.head
4599
- };
4600
- if (this.length === 0) this.tail = entry;
4601
- this.head = entry;
4602
- ++this.length;
4603
- }
4604
- }, {
4605
- key: "shift",
4606
- value: function shift() {
4607
- if (this.length === 0) return;
4608
- var ret = this.head.data;
4609
- if (this.length === 1) this.head = this.tail = null;
4610
- else this.head = this.head.next;
4611
- --this.length;
4612
- return ret;
4613
- }
4614
- }, {
4615
- key: "clear",
4616
- value: function clear() {
4617
- this.head = this.tail = null;
4618
- this.length = 0;
4619
- }
4620
- }, {
4621
- key: "join",
4622
- value: function join(s) {
4623
- if (this.length === 0) return "";
4624
- var p = this.head;
4625
- var ret = "" + p.data;
4626
- while (p = p.next) ret += s + p.data;
4627
- return ret;
4628
- }
4629
- }, {
4630
- key: "concat",
4631
- value: function concat(n) {
4632
- if (this.length === 0) return Buffer.alloc(0);
4633
- var ret = Buffer.allocUnsafe(n >>> 0);
4634
- var p = this.head;
4635
- var i = 0;
4636
- while (p) {
4637
- copyBuffer(p.data, ret, i);
4638
- i += p.data.length;
4639
- p = p.next;
4640
- }
4641
- return ret;
4642
- }
4643
- // Consumes a specified amount of bytes or characters from the buffered data.
4644
- }, {
4645
- key: "consume",
4646
- value: function consume(n, hasStrings) {
4647
- var ret;
4648
- if (n < this.head.data.length) {
4649
- ret = this.head.data.slice(0, n);
4650
- this.head.data = this.head.data.slice(n);
4651
- } else if (n === this.head.data.length) {
4652
- ret = this.shift();
4653
- } else {
4654
- ret = hasStrings ? this._getString(n) : this._getBuffer(n);
4655
- }
4656
- return ret;
4657
- }
4658
- }, {
4659
- key: "first",
4660
- value: function first() {
4661
- return this.head.data;
4662
- }
4663
- // Consumes a specified amount of characters from the buffered data.
4664
- }, {
4665
- key: "_getString",
4666
- value: function _getString(n) {
4667
- var p = this.head;
4668
- var c = 1;
4669
- var ret = p.data;
4670
- n -= ret.length;
4671
- while (p = p.next) {
4672
- var str = p.data;
4673
- var nb = n > str.length ? str.length : n;
4674
- if (nb === str.length) ret += str;
4675
- else ret += str.slice(0, n);
4676
- n -= nb;
4677
- if (n === 0) {
4678
- if (nb === str.length) {
4679
- ++c;
4680
- if (p.next) this.head = p.next;
4681
- else this.head = this.tail = null;
4682
- } else {
4683
- this.head = p;
4684
- p.data = str.slice(nb);
4685
- }
4686
- break;
4687
- }
4688
- ++c;
4689
- }
4690
- this.length -= c;
4691
- return ret;
4692
- }
4693
- // Consumes a specified amount of bytes from the buffered data.
4694
- }, {
4695
- key: "_getBuffer",
4696
- value: function _getBuffer(n) {
4697
- var ret = Buffer.allocUnsafe(n);
4698
- var p = this.head;
4699
- var c = 1;
4700
- p.data.copy(ret);
4701
- n -= p.data.length;
4702
- while (p = p.next) {
4703
- var buf = p.data;
4704
- var nb = n > buf.length ? buf.length : n;
4705
- buf.copy(ret, ret.length - n, 0, nb);
4706
- n -= nb;
4707
- if (n === 0) {
4708
- if (nb === buf.length) {
4709
- ++c;
4710
- if (p.next) this.head = p.next;
4711
- else this.head = this.tail = null;
4712
- } else {
4713
- this.head = p;
4714
- p.data = buf.slice(nb);
4715
- }
4716
- break;
4717
- }
4718
- ++c;
4719
- }
4720
- this.length -= c;
4721
- return ret;
4722
- }
4723
- // Make sure the linked list only shows the minimal necessary information.
4724
- }, {
4725
- key: custom,
4726
- value: function value(_, options) {
4727
- return inspect(this, _objectSpread(_objectSpread({}, options), {}, {
4728
- // Only inspect one level.
4729
- depth: 0,
4730
- // It should not recurse.
4731
- customInspect: false
4732
- }));
4733
- }
4734
- }]);
4735
- return BufferList;
4736
- }();
4737
- return buffer_list;
4738
- }
4739
- var destroy_1;
4740
- var hasRequiredDestroy;
4741
- function requireDestroy() {
4742
- if (hasRequiredDestroy) return destroy_1;
4743
- hasRequiredDestroy = 1;
4744
- function destroy(err, cb) {
4745
- var _this = this;
4746
- var readableDestroyed = this._readableState && this._readableState.destroyed;
4747
- var writableDestroyed = this._writableState && this._writableState.destroyed;
4748
- if (readableDestroyed || writableDestroyed) {
4749
- if (cb) {
4750
- cb(err);
4751
- } else if (err) {
4752
- if (!this._writableState) {
4753
- vue.process$1.nextTick(emitErrorNT, this, err);
4754
- } else if (!this._writableState.errorEmitted) {
4755
- this._writableState.errorEmitted = true;
4756
- vue.process$1.nextTick(emitErrorNT, this, err);
4757
- }
4758
- }
4759
- return this;
4760
- }
4761
- if (this._readableState) {
4762
- this._readableState.destroyed = true;
4763
- }
4764
- if (this._writableState) {
4765
- this._writableState.destroyed = true;
4766
- }
4767
- this._destroy(err || null, function(err2) {
4768
- if (!cb && err2) {
4769
- if (!_this._writableState) {
4770
- vue.process$1.nextTick(emitErrorAndCloseNT, _this, err2);
4771
- } else if (!_this._writableState.errorEmitted) {
4772
- _this._writableState.errorEmitted = true;
4773
- vue.process$1.nextTick(emitErrorAndCloseNT, _this, err2);
4774
- } else {
4775
- vue.process$1.nextTick(emitCloseNT, _this);
4776
- }
4777
- } else if (cb) {
4778
- vue.process$1.nextTick(emitCloseNT, _this);
4779
- cb(err2);
4780
- } else {
4781
- vue.process$1.nextTick(emitCloseNT, _this);
4782
- }
4783
- });
4784
- return this;
4785
- }
4786
- function emitErrorAndCloseNT(self2, err) {
4787
- emitErrorNT(self2, err);
4788
- emitCloseNT(self2);
4789
- }
4790
- function emitCloseNT(self2) {
4791
- if (self2._writableState && !self2._writableState.emitClose) return;
4792
- if (self2._readableState && !self2._readableState.emitClose) return;
4793
- self2.emit("close");
4794
- }
4795
- function undestroy() {
4796
- if (this._readableState) {
4797
- this._readableState.destroyed = false;
4798
- this._readableState.reading = false;
4799
- this._readableState.ended = false;
4800
- this._readableState.endEmitted = false;
4801
- }
4802
- if (this._writableState) {
4803
- this._writableState.destroyed = false;
4804
- this._writableState.ended = false;
4805
- this._writableState.ending = false;
4806
- this._writableState.finalCalled = false;
4807
- this._writableState.prefinished = false;
4808
- this._writableState.finished = false;
4809
- this._writableState.errorEmitted = false;
4810
- }
4811
- }
4812
- function emitErrorNT(self2, err) {
4813
- self2.emit("error", err);
4814
- }
4815
- function errorOrDestroy(stream, err) {
4816
- var rState = stream._readableState;
4817
- var wState = stream._writableState;
4818
- if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);
4819
- else stream.emit("error", err);
4820
- }
4821
- destroy_1 = {
4822
- destroy,
4823
- undestroy,
4824
- errorOrDestroy
4825
- };
4826
- return destroy_1;
4827
- }
4828
- var errorsBrowser = {};
4829
- var hasRequiredErrorsBrowser;
4830
- function requireErrorsBrowser() {
4831
- if (hasRequiredErrorsBrowser) return errorsBrowser;
4832
- hasRequiredErrorsBrowser = 1;
4833
- function _inheritsLoose(subClass, superClass) {
4834
- subClass.prototype = Object.create(superClass.prototype);
4835
- subClass.prototype.constructor = subClass;
4836
- subClass.__proto__ = superClass;
4837
- }
4838
- var codes = {};
4839
- function createErrorType(code, message, Base) {
4840
- if (!Base) {
4841
- Base = Error;
4842
- }
4843
- function getMessage(arg1, arg2, arg3) {
4844
- if (typeof message === "string") {
4845
- return message;
4846
- } else {
4847
- return message(arg1, arg2, arg3);
4848
- }
4849
- }
4850
- var NodeError = /* @__PURE__ */ function(_Base) {
4851
- _inheritsLoose(NodeError2, _Base);
4852
- function NodeError2(arg1, arg2, arg3) {
4853
- return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;
4854
- }
4855
- return NodeError2;
4856
- }(Base);
4857
- NodeError.prototype.name = Base.name;
4858
- NodeError.prototype.code = code;
4859
- codes[code] = NodeError;
4860
- }
4861
- function oneOf(expected, thing) {
4862
- if (Array.isArray(expected)) {
4863
- var len = expected.length;
4864
- expected = expected.map(function(i) {
4865
- return String(i);
4866
- });
4867
- if (len > 2) {
4868
- return "one of ".concat(thing, " ").concat(expected.slice(0, len - 1).join(", "), ", or ") + expected[len - 1];
4869
- } else if (len === 2) {
4870
- return "one of ".concat(thing, " ").concat(expected[0], " or ").concat(expected[1]);
4871
- } else {
4872
- return "of ".concat(thing, " ").concat(expected[0]);
4873
- }
4874
- } else {
4875
- return "of ".concat(thing, " ").concat(String(expected));
4876
- }
4877
- }
4878
- function startsWith(str, search, pos) {
4879
- return str.substr(0, search.length) === search;
4880
- }
4881
- function endsWith(str, search, this_len) {
4882
- if (this_len === void 0 || this_len > str.length) {
4883
- this_len = str.length;
4884
- }
4885
- return str.substring(this_len - search.length, this_len) === search;
4886
- }
4887
- function includes(str, search, start) {
4888
- if (typeof start !== "number") {
4889
- start = 0;
4890
- }
4891
- if (start + search.length > str.length) {
4892
- return false;
4893
- } else {
4894
- return str.indexOf(search, start) !== -1;
4895
- }
4896
- }
4897
- createErrorType("ERR_INVALID_OPT_VALUE", function(name, value) {
4898
- return 'The value "' + value + '" is invalid for option "' + name + '"';
4899
- }, TypeError);
4900
- createErrorType("ERR_INVALID_ARG_TYPE", function(name, expected, actual) {
4901
- var determiner;
4902
- if (typeof expected === "string" && startsWith(expected, "not ")) {
4903
- determiner = "must not be";
4904
- expected = expected.replace(/^not /, "");
4905
- } else {
4906
- determiner = "must be";
4907
- }
4908
- var msg;
4909
- if (endsWith(name, " argument")) {
4910
- msg = "The ".concat(name, " ").concat(determiner, " ").concat(oneOf(expected, "type"));
4911
- } else {
4912
- var type2 = includes(name, ".") ? "property" : "argument";
4913
- msg = 'The "'.concat(name, '" ').concat(type2, " ").concat(determiner, " ").concat(oneOf(expected, "type"));
4914
- }
4915
- msg += ". Received type ".concat(typeof actual);
4916
- return msg;
4917
- }, TypeError);
4918
- createErrorType("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF");
4919
- createErrorType("ERR_METHOD_NOT_IMPLEMENTED", function(name) {
4920
- return "The " + name + " method is not implemented";
4921
- });
4922
- createErrorType("ERR_STREAM_PREMATURE_CLOSE", "Premature close");
4923
- createErrorType("ERR_STREAM_DESTROYED", function(name) {
4924
- return "Cannot call " + name + " after a stream was destroyed";
4925
- });
4926
- createErrorType("ERR_MULTIPLE_CALLBACK", "Callback called multiple times");
4927
- createErrorType("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable");
4928
- createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end");
4929
- createErrorType("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError);
4930
- createErrorType("ERR_UNKNOWN_ENCODING", function(arg) {
4931
- return "Unknown encoding: " + arg;
4932
- }, TypeError);
4933
- createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event");
4934
- errorsBrowser.codes = codes;
4935
- return errorsBrowser;
4936
- }
4937
- var state;
4938
- var hasRequiredState;
4939
- function requireState() {
4940
- if (hasRequiredState) return state;
4941
- hasRequiredState = 1;
4942
- var ERR_INVALID_OPT_VALUE = requireErrorsBrowser().codes.ERR_INVALID_OPT_VALUE;
4943
- function highWaterMarkFrom(options, isDuplex, duplexKey) {
4944
- return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;
4945
- }
4946
- function getHighWaterMark(state2, options, duplexKey, isDuplex) {
4947
- var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);
4948
- if (hwm != null) {
4949
- if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {
4950
- var name = isDuplex ? duplexKey : "highWaterMark";
4951
- throw new ERR_INVALID_OPT_VALUE(name, hwm);
4952
- }
4953
- return Math.floor(hwm);
4954
- }
4955
- return state2.objectMode ? 16 : 16 * 1024;
4956
- }
4957
- state = {
4958
- getHighWaterMark
4959
- };
4960
- return state;
4961
- }
4962
4492
  var browser;
4963
4493
  var hasRequiredBrowser;
4964
4494
  function requireBrowser() {
@@ -4997,561 +4527,8 @@ function requireBrowser() {
4997
4527
  }
4998
4528
  return browser;
4999
4529
  }
5000
- var _stream_writable;
5001
- var hasRequired_stream_writable;
5002
- function require_stream_writable() {
5003
- if (hasRequired_stream_writable) return _stream_writable;
5004
- hasRequired_stream_writable = 1;
5005
- _stream_writable = Writable;
5006
- function CorkedRequest(state2) {
5007
- var _this = this;
5008
- this.next = null;
5009
- this.entry = null;
5010
- this.finish = function() {
5011
- onCorkedFinish(_this, state2);
5012
- };
5013
- }
5014
- var Duplex;
5015
- Writable.WritableState = WritableState;
5016
- var internalUtil = {
5017
- deprecate: requireBrowser()
5018
- };
5019
- var Stream = requireStreamBrowser();
5020
- var Buffer = requireDist().Buffer;
5021
- var OurUint8Array = (typeof jszip.commonjsGlobal !== "undefined" ? jszip.commonjsGlobal : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() {
5022
- };
5023
- function _uint8ArrayToBuffer(chunk) {
5024
- return Buffer.from(chunk);
5025
- }
5026
- function _isUint8Array(obj) {
5027
- return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
5028
- }
5029
- var destroyImpl = requireDestroy();
5030
- var _require = requireState(), getHighWaterMark = _require.getHighWaterMark;
5031
- var _require$codes = requireErrorsBrowser().codes, ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE, ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED, ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES, ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END, ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;
5032
- var errorOrDestroy = destroyImpl.errorOrDestroy;
5033
- requireInherits_browser()(Writable, Stream);
5034
- function nop() {
5035
- }
5036
- function WritableState(options, stream, isDuplex) {
5037
- Duplex = Duplex || require_stream_duplex();
5038
- options = options || {};
5039
- if (typeof isDuplex !== "boolean") isDuplex = stream instanceof Duplex;
5040
- this.objectMode = !!options.objectMode;
5041
- if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
5042
- this.highWaterMark = getHighWaterMark(this, options, "writableHighWaterMark", isDuplex);
5043
- this.finalCalled = false;
5044
- this.needDrain = false;
5045
- this.ending = false;
5046
- this.ended = false;
5047
- this.finished = false;
5048
- this.destroyed = false;
5049
- var noDecode = options.decodeStrings === false;
5050
- this.decodeStrings = !noDecode;
5051
- this.defaultEncoding = options.defaultEncoding || "utf8";
5052
- this.length = 0;
5053
- this.writing = false;
5054
- this.corked = 0;
5055
- this.sync = true;
5056
- this.bufferProcessing = false;
5057
- this.onwrite = function(er) {
5058
- onwrite(stream, er);
5059
- };
5060
- this.writecb = null;
5061
- this.writelen = 0;
5062
- this.bufferedRequest = null;
5063
- this.lastBufferedRequest = null;
5064
- this.pendingcb = 0;
5065
- this.prefinished = false;
5066
- this.errorEmitted = false;
5067
- this.emitClose = options.emitClose !== false;
5068
- this.autoDestroy = !!options.autoDestroy;
5069
- this.bufferedRequestCount = 0;
5070
- this.corkedRequestsFree = new CorkedRequest(this);
5071
- }
5072
- WritableState.prototype.getBuffer = function getBuffer() {
5073
- var current = this.bufferedRequest;
5074
- var out = [];
5075
- while (current) {
5076
- out.push(current);
5077
- current = current.next;
5078
- }
5079
- return out;
5080
- };
5081
- (function() {
5082
- try {
5083
- Object.defineProperty(WritableState.prototype, "buffer", {
5084
- get: internalUtil.deprecate(function writableStateBufferGetter() {
5085
- return this.getBuffer();
5086
- }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003")
5087
- });
5088
- } catch (_) {
5089
- }
5090
- })();
5091
- var realHasInstance;
5092
- if (typeof Symbol === "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === "function") {
5093
- realHasInstance = Function.prototype[Symbol.hasInstance];
5094
- Object.defineProperty(Writable, Symbol.hasInstance, {
5095
- value: function value(object) {
5096
- if (realHasInstance.call(this, object)) return true;
5097
- if (this !== Writable) return false;
5098
- return object && object._writableState instanceof WritableState;
5099
- }
5100
- });
5101
- } else {
5102
- realHasInstance = function realHasInstance2(object) {
5103
- return object instanceof this;
5104
- };
5105
- }
5106
- function Writable(options) {
5107
- Duplex = Duplex || require_stream_duplex();
5108
- var isDuplex = this instanceof Duplex;
5109
- if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options);
5110
- this._writableState = new WritableState(options, this, isDuplex);
5111
- this.writable = true;
5112
- if (options) {
5113
- if (typeof options.write === "function") this._write = options.write;
5114
- if (typeof options.writev === "function") this._writev = options.writev;
5115
- if (typeof options.destroy === "function") this._destroy = options.destroy;
5116
- if (typeof options.final === "function") this._final = options.final;
5117
- }
5118
- Stream.call(this);
5119
- }
5120
- Writable.prototype.pipe = function() {
5121
- errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());
5122
- };
5123
- function writeAfterEnd(stream, cb) {
5124
- var er = new ERR_STREAM_WRITE_AFTER_END();
5125
- errorOrDestroy(stream, er);
5126
- vue.process$1.nextTick(cb, er);
5127
- }
5128
- function validChunk(stream, state2, chunk, cb) {
5129
- var er;
5130
- if (chunk === null) {
5131
- er = new ERR_STREAM_NULL_VALUES();
5132
- } else if (typeof chunk !== "string" && !state2.objectMode) {
5133
- er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer"], chunk);
5134
- }
5135
- if (er) {
5136
- errorOrDestroy(stream, er);
5137
- vue.process$1.nextTick(cb, er);
5138
- return false;
5139
- }
5140
- return true;
5141
- }
5142
- Writable.prototype.write = function(chunk, encoding, cb) {
5143
- var state2 = this._writableState;
5144
- var ret = false;
5145
- var isBuf = !state2.objectMode && _isUint8Array(chunk);
5146
- if (isBuf && !Buffer.isBuffer(chunk)) {
5147
- chunk = _uint8ArrayToBuffer(chunk);
5148
- }
5149
- if (typeof encoding === "function") {
5150
- cb = encoding;
5151
- encoding = null;
5152
- }
5153
- if (isBuf) encoding = "buffer";
5154
- else if (!encoding) encoding = state2.defaultEncoding;
5155
- if (typeof cb !== "function") cb = nop;
5156
- if (state2.ending) writeAfterEnd(this, cb);
5157
- else if (isBuf || validChunk(this, state2, chunk, cb)) {
5158
- state2.pendingcb++;
5159
- ret = writeOrBuffer(this, state2, isBuf, chunk, encoding, cb);
5160
- }
5161
- return ret;
5162
- };
5163
- Writable.prototype.cork = function() {
5164
- this._writableState.corked++;
5165
- };
5166
- Writable.prototype.uncork = function() {
5167
- var state2 = this._writableState;
5168
- if (state2.corked) {
5169
- state2.corked--;
5170
- if (!state2.writing && !state2.corked && !state2.bufferProcessing && state2.bufferedRequest) clearBuffer(this, state2);
5171
- }
5172
- };
5173
- Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
5174
- if (typeof encoding === "string") encoding = encoding.toLowerCase();
5175
- if (!(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((encoding + "").toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding);
5176
- this._writableState.defaultEncoding = encoding;
5177
- return this;
5178
- };
5179
- Object.defineProperty(Writable.prototype, "writableBuffer", {
5180
- // making it explicit this property is not enumerable
5181
- // because otherwise some prototype manipulation in
5182
- // userland will fail
5183
- enumerable: false,
5184
- get: function get2() {
5185
- return this._writableState && this._writableState.getBuffer();
5186
- }
5187
- });
5188
- function decodeChunk(state2, chunk, encoding) {
5189
- if (!state2.objectMode && state2.decodeStrings !== false && typeof chunk === "string") {
5190
- chunk = Buffer.from(chunk, encoding);
5191
- }
5192
- return chunk;
5193
- }
5194
- Object.defineProperty(Writable.prototype, "writableHighWaterMark", {
5195
- // making it explicit this property is not enumerable
5196
- // because otherwise some prototype manipulation in
5197
- // userland will fail
5198
- enumerable: false,
5199
- get: function get2() {
5200
- return this._writableState.highWaterMark;
5201
- }
5202
- });
5203
- function writeOrBuffer(stream, state2, isBuf, chunk, encoding, cb) {
5204
- if (!isBuf) {
5205
- var newChunk = decodeChunk(state2, chunk, encoding);
5206
- if (chunk !== newChunk) {
5207
- isBuf = true;
5208
- encoding = "buffer";
5209
- chunk = newChunk;
5210
- }
5211
- }
5212
- var len = state2.objectMode ? 1 : chunk.length;
5213
- state2.length += len;
5214
- var ret = state2.length < state2.highWaterMark;
5215
- if (!ret) state2.needDrain = true;
5216
- if (state2.writing || state2.corked) {
5217
- var last = state2.lastBufferedRequest;
5218
- state2.lastBufferedRequest = {
5219
- chunk,
5220
- encoding,
5221
- isBuf,
5222
- callback: cb,
5223
- next: null
5224
- };
5225
- if (last) {
5226
- last.next = state2.lastBufferedRequest;
5227
- } else {
5228
- state2.bufferedRequest = state2.lastBufferedRequest;
5229
- }
5230
- state2.bufferedRequestCount += 1;
5231
- } else {
5232
- doWrite(stream, state2, false, len, chunk, encoding, cb);
5233
- }
5234
- return ret;
5235
- }
5236
- function doWrite(stream, state2, writev, len, chunk, encoding, cb) {
5237
- state2.writelen = len;
5238
- state2.writecb = cb;
5239
- state2.writing = true;
5240
- state2.sync = true;
5241
- if (state2.destroyed) state2.onwrite(new ERR_STREAM_DESTROYED("write"));
5242
- else if (writev) stream._writev(chunk, state2.onwrite);
5243
- else stream._write(chunk, encoding, state2.onwrite);
5244
- state2.sync = false;
5245
- }
5246
- function onwriteError(stream, state2, sync, er, cb) {
5247
- --state2.pendingcb;
5248
- if (sync) {
5249
- vue.process$1.nextTick(cb, er);
5250
- vue.process$1.nextTick(finishMaybe, stream, state2);
5251
- stream._writableState.errorEmitted = true;
5252
- errorOrDestroy(stream, er);
5253
- } else {
5254
- cb(er);
5255
- stream._writableState.errorEmitted = true;
5256
- errorOrDestroy(stream, er);
5257
- finishMaybe(stream, state2);
5258
- }
5259
- }
5260
- function onwriteStateUpdate(state2) {
5261
- state2.writing = false;
5262
- state2.writecb = null;
5263
- state2.length -= state2.writelen;
5264
- state2.writelen = 0;
5265
- }
5266
- function onwrite(stream, er) {
5267
- var state2 = stream._writableState;
5268
- var sync = state2.sync;
5269
- var cb = state2.writecb;
5270
- if (typeof cb !== "function") throw new ERR_MULTIPLE_CALLBACK();
5271
- onwriteStateUpdate(state2);
5272
- if (er) onwriteError(stream, state2, sync, er, cb);
5273
- else {
5274
- var finished = needFinish(state2) || stream.destroyed;
5275
- if (!finished && !state2.corked && !state2.bufferProcessing && state2.bufferedRequest) {
5276
- clearBuffer(stream, state2);
5277
- }
5278
- if (sync) {
5279
- vue.process$1.nextTick(afterWrite, stream, state2, finished, cb);
5280
- } else {
5281
- afterWrite(stream, state2, finished, cb);
5282
- }
5283
- }
5284
- }
5285
- function afterWrite(stream, state2, finished, cb) {
5286
- if (!finished) onwriteDrain(stream, state2);
5287
- state2.pendingcb--;
5288
- cb();
5289
- finishMaybe(stream, state2);
5290
- }
5291
- function onwriteDrain(stream, state2) {
5292
- if (state2.length === 0 && state2.needDrain) {
5293
- state2.needDrain = false;
5294
- stream.emit("drain");
5295
- }
5296
- }
5297
- function clearBuffer(stream, state2) {
5298
- state2.bufferProcessing = true;
5299
- var entry = state2.bufferedRequest;
5300
- if (stream._writev && entry && entry.next) {
5301
- var l = state2.bufferedRequestCount;
5302
- var buffer = new Array(l);
5303
- var holder = state2.corkedRequestsFree;
5304
- holder.entry = entry;
5305
- var count = 0;
5306
- var allBuffers = true;
5307
- while (entry) {
5308
- buffer[count] = entry;
5309
- if (!entry.isBuf) allBuffers = false;
5310
- entry = entry.next;
5311
- count += 1;
5312
- }
5313
- buffer.allBuffers = allBuffers;
5314
- doWrite(stream, state2, true, state2.length, buffer, "", holder.finish);
5315
- state2.pendingcb++;
5316
- state2.lastBufferedRequest = null;
5317
- if (holder.next) {
5318
- state2.corkedRequestsFree = holder.next;
5319
- holder.next = null;
5320
- } else {
5321
- state2.corkedRequestsFree = new CorkedRequest(state2);
5322
- }
5323
- state2.bufferedRequestCount = 0;
5324
- } else {
5325
- while (entry) {
5326
- var chunk = entry.chunk;
5327
- var encoding = entry.encoding;
5328
- var cb = entry.callback;
5329
- var len = state2.objectMode ? 1 : chunk.length;
5330
- doWrite(stream, state2, false, len, chunk, encoding, cb);
5331
- entry = entry.next;
5332
- state2.bufferedRequestCount--;
5333
- if (state2.writing) {
5334
- break;
5335
- }
5336
- }
5337
- if (entry === null) state2.lastBufferedRequest = null;
5338
- }
5339
- state2.bufferedRequest = entry;
5340
- state2.bufferProcessing = false;
5341
- }
5342
- Writable.prototype._write = function(chunk, encoding, cb) {
5343
- cb(new ERR_METHOD_NOT_IMPLEMENTED("_write()"));
5344
- };
5345
- Writable.prototype._writev = null;
5346
- Writable.prototype.end = function(chunk, encoding, cb) {
5347
- var state2 = this._writableState;
5348
- if (typeof chunk === "function") {
5349
- cb = chunk;
5350
- chunk = null;
5351
- encoding = null;
5352
- } else if (typeof encoding === "function") {
5353
- cb = encoding;
5354
- encoding = null;
5355
- }
5356
- if (chunk !== null && chunk !== void 0) this.write(chunk, encoding);
5357
- if (state2.corked) {
5358
- state2.corked = 1;
5359
- this.uncork();
5360
- }
5361
- if (!state2.ending) endWritable(this, state2, cb);
5362
- return this;
5363
- };
5364
- Object.defineProperty(Writable.prototype, "writableLength", {
5365
- // making it explicit this property is not enumerable
5366
- // because otherwise some prototype manipulation in
5367
- // userland will fail
5368
- enumerable: false,
5369
- get: function get2() {
5370
- return this._writableState.length;
5371
- }
5372
- });
5373
- function needFinish(state2) {
5374
- return state2.ending && state2.length === 0 && state2.bufferedRequest === null && !state2.finished && !state2.writing;
5375
- }
5376
- function callFinal(stream, state2) {
5377
- stream._final(function(err) {
5378
- state2.pendingcb--;
5379
- if (err) {
5380
- errorOrDestroy(stream, err);
5381
- }
5382
- state2.prefinished = true;
5383
- stream.emit("prefinish");
5384
- finishMaybe(stream, state2);
5385
- });
5386
- }
5387
- function prefinish(stream, state2) {
5388
- if (!state2.prefinished && !state2.finalCalled) {
5389
- if (typeof stream._final === "function" && !state2.destroyed) {
5390
- state2.pendingcb++;
5391
- state2.finalCalled = true;
5392
- vue.process$1.nextTick(callFinal, stream, state2);
5393
- } else {
5394
- state2.prefinished = true;
5395
- stream.emit("prefinish");
5396
- }
5397
- }
5398
- }
5399
- function finishMaybe(stream, state2) {
5400
- var need = needFinish(state2);
5401
- if (need) {
5402
- prefinish(stream, state2);
5403
- if (state2.pendingcb === 0) {
5404
- state2.finished = true;
5405
- stream.emit("finish");
5406
- if (state2.autoDestroy) {
5407
- var rState = stream._readableState;
5408
- if (!rState || rState.autoDestroy && rState.endEmitted) {
5409
- stream.destroy();
5410
- }
5411
- }
5412
- }
5413
- }
5414
- return need;
5415
- }
5416
- function endWritable(stream, state2, cb) {
5417
- state2.ending = true;
5418
- finishMaybe(stream, state2);
5419
- if (cb) {
5420
- if (state2.finished) vue.process$1.nextTick(cb);
5421
- else stream.once("finish", cb);
5422
- }
5423
- state2.ended = true;
5424
- stream.writable = false;
5425
- }
5426
- function onCorkedFinish(corkReq, state2, err) {
5427
- var entry = corkReq.entry;
5428
- corkReq.entry = null;
5429
- while (entry) {
5430
- var cb = entry.callback;
5431
- state2.pendingcb--;
5432
- cb(err);
5433
- entry = entry.next;
5434
- }
5435
- state2.corkedRequestsFree.next = corkReq;
5436
- }
5437
- Object.defineProperty(Writable.prototype, "destroyed", {
5438
- // making it explicit this property is not enumerable
5439
- // because otherwise some prototype manipulation in
5440
- // userland will fail
5441
- enumerable: false,
5442
- get: function get2() {
5443
- if (this._writableState === void 0) {
5444
- return false;
5445
- }
5446
- return this._writableState.destroyed;
5447
- },
5448
- set: function set(value) {
5449
- if (!this._writableState) {
5450
- return;
5451
- }
5452
- this._writableState.destroyed = value;
5453
- }
5454
- });
5455
- Writable.prototype.destroy = destroyImpl.destroy;
5456
- Writable.prototype._undestroy = destroyImpl.undestroy;
5457
- Writable.prototype._destroy = function(err, cb) {
5458
- cb(err);
5459
- };
5460
- return _stream_writable;
5461
- }
5462
- var _stream_duplex;
5463
- var hasRequired_stream_duplex;
5464
- function require_stream_duplex() {
5465
- if (hasRequired_stream_duplex) return _stream_duplex;
5466
- hasRequired_stream_duplex = 1;
5467
- var objectKeys = Object.keys || function(obj) {
5468
- var keys2 = [];
5469
- for (var key in obj) keys2.push(key);
5470
- return keys2;
5471
- };
5472
- _stream_duplex = Duplex;
5473
- var Readable = require_stream_readable();
5474
- var Writable = require_stream_writable();
5475
- requireInherits_browser()(Duplex, Readable);
5476
- {
5477
- var keys = objectKeys(Writable.prototype);
5478
- for (var v = 0; v < keys.length; v++) {
5479
- var method = keys[v];
5480
- if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
5481
- }
5482
- }
5483
- function Duplex(options) {
5484
- if (!(this instanceof Duplex)) return new Duplex(options);
5485
- Readable.call(this, options);
5486
- Writable.call(this, options);
5487
- this.allowHalfOpen = true;
5488
- if (options) {
5489
- if (options.readable === false) this.readable = false;
5490
- if (options.writable === false) this.writable = false;
5491
- if (options.allowHalfOpen === false) {
5492
- this.allowHalfOpen = false;
5493
- this.once("end", onend);
5494
- }
5495
- }
5496
- }
5497
- Object.defineProperty(Duplex.prototype, "writableHighWaterMark", {
5498
- // making it explicit this property is not enumerable
5499
- // because otherwise some prototype manipulation in
5500
- // userland will fail
5501
- enumerable: false,
5502
- get: function get2() {
5503
- return this._writableState.highWaterMark;
5504
- }
5505
- });
5506
- Object.defineProperty(Duplex.prototype, "writableBuffer", {
5507
- // making it explicit this property is not enumerable
5508
- // because otherwise some prototype manipulation in
5509
- // userland will fail
5510
- enumerable: false,
5511
- get: function get2() {
5512
- return this._writableState && this._writableState.getBuffer();
5513
- }
5514
- });
5515
- Object.defineProperty(Duplex.prototype, "writableLength", {
5516
- // making it explicit this property is not enumerable
5517
- // because otherwise some prototype manipulation in
5518
- // userland will fail
5519
- enumerable: false,
5520
- get: function get2() {
5521
- return this._writableState.length;
5522
- }
5523
- });
5524
- function onend() {
5525
- if (this._writableState.ended) return;
5526
- vue.process$1.nextTick(onEndNT, this);
5527
- }
5528
- function onEndNT(self2) {
5529
- self2.end();
5530
- }
5531
- Object.defineProperty(Duplex.prototype, "destroyed", {
5532
- // making it explicit this property is not enumerable
5533
- // because otherwise some prototype manipulation in
5534
- // userland will fail
5535
- enumerable: false,
5536
- get: function get2() {
5537
- if (this._readableState === void 0 || this._writableState === void 0) {
5538
- return false;
5539
- }
5540
- return this._readableState.destroyed && this._writableState.destroyed;
5541
- },
5542
- set: function set(value) {
5543
- if (this._readableState === void 0 || this._writableState === void 0) {
5544
- return;
5545
- }
5546
- this._readableState.destroyed = value;
5547
- this._writableState.destroyed = value;
5548
- }
5549
- });
5550
- return _stream_duplex;
5551
- }
5552
4530
  var string_decoder = {};
5553
4531
  var safeBuffer = { exports: {} };
5554
- /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
5555
4532
  var hasRequiredSafeBuffer;
5556
4533
  function requireSafeBuffer() {
5557
4534
  if (hasRequiredSafeBuffer) return safeBuffer.exports;
@@ -5573,7 +4550,6 @@ function requireSafeBuffer() {
5573
4550
  function SafeBuffer(arg, encodingOrOffset, length) {
5574
4551
  return Buffer(arg, encodingOrOffset, length);
5575
4552
  }
5576
- SafeBuffer.prototype = Object.create(Buffer.prototype);
5577
4553
  copyProps(Buffer, SafeBuffer);
5578
4554
  SafeBuffer.from = function(arg, encodingOrOffset, length) {
5579
4555
  if (typeof arg === "number") {
@@ -5728,18 +4704,18 @@ function requireString_decoder() {
5728
4704
  else if (byte >> 3 === 30) return 4;
5729
4705
  return byte >> 6 === 2 ? -1 : -2;
5730
4706
  }
5731
- function utf8CheckIncomplete(self2, buf, i) {
4707
+ function utf8CheckIncomplete(self, buf, i) {
5732
4708
  var j = buf.length - 1;
5733
4709
  if (j < i) return 0;
5734
4710
  var nb = utf8CheckByte(buf[j]);
5735
4711
  if (nb >= 0) {
5736
- if (nb > 0) self2.lastNeed = nb - 1;
4712
+ if (nb > 0) self.lastNeed = nb - 1;
5737
4713
  return nb;
5738
4714
  }
5739
4715
  if (--j < i || nb === -2) return 0;
5740
4716
  nb = utf8CheckByte(buf[j]);
5741
4717
  if (nb >= 0) {
5742
- if (nb > 0) self2.lastNeed = nb - 2;
4718
+ if (nb > 0) self.lastNeed = nb - 2;
5743
4719
  return nb;
5744
4720
  }
5745
4721
  if (--j < i || nb === -2) return 0;
@@ -5747,25 +4723,25 @@ function requireString_decoder() {
5747
4723
  if (nb >= 0) {
5748
4724
  if (nb > 0) {
5749
4725
  if (nb === 2) nb = 0;
5750
- else self2.lastNeed = nb - 3;
4726
+ else self.lastNeed = nb - 3;
5751
4727
  }
5752
4728
  return nb;
5753
4729
  }
5754
4730
  return 0;
5755
4731
  }
5756
- function utf8CheckExtraBytes(self2, buf, p) {
4732
+ function utf8CheckExtraBytes(self, buf, p) {
5757
4733
  if ((buf[0] & 192) !== 128) {
5758
- self2.lastNeed = 0;
4734
+ self.lastNeed = 0;
5759
4735
  return "�";
5760
4736
  }
5761
- if (self2.lastNeed > 1 && buf.length > 1) {
4737
+ if (self.lastNeed > 1 && buf.length > 1) {
5762
4738
  if ((buf[1] & 192) !== 128) {
5763
- self2.lastNeed = 1;
4739
+ self.lastNeed = 1;
5764
4740
  return "�";
5765
4741
  }
5766
- if (self2.lastNeed > 2 && buf.length > 2) {
4742
+ if (self.lastNeed > 2 && buf.length > 2) {
5767
4743
  if ((buf[2] & 192) !== 128) {
5768
- self2.lastNeed = 2;
4744
+ self.lastNeed = 2;
5769
4745
  return "�";
5770
4746
  }
5771
4747
  }
@@ -5849,1221 +4825,12 @@ function requireString_decoder() {
5849
4825
  }
5850
4826
  return string_decoder;
5851
4827
  }
5852
- var endOfStream;
5853
- var hasRequiredEndOfStream;
5854
- function requireEndOfStream() {
5855
- if (hasRequiredEndOfStream) return endOfStream;
5856
- hasRequiredEndOfStream = 1;
5857
- var ERR_STREAM_PREMATURE_CLOSE = requireErrorsBrowser().codes.ERR_STREAM_PREMATURE_CLOSE;
5858
- function once(callback) {
5859
- var called = false;
5860
- return function() {
5861
- if (called) return;
5862
- called = true;
5863
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
5864
- args[_key] = arguments[_key];
5865
- }
5866
- callback.apply(this, args);
5867
- };
5868
- }
5869
- function noop() {
5870
- }
5871
- function isRequest(stream) {
5872
- return stream.setHeader && typeof stream.abort === "function";
5873
- }
5874
- function eos(stream, opts, callback) {
5875
- if (typeof opts === "function") return eos(stream, null, opts);
5876
- if (!opts) opts = {};
5877
- callback = once(callback || noop);
5878
- var readable = opts.readable || opts.readable !== false && stream.readable;
5879
- var writable = opts.writable || opts.writable !== false && stream.writable;
5880
- var onlegacyfinish = function onlegacyfinish2() {
5881
- if (!stream.writable) onfinish();
5882
- };
5883
- var writableEnded = stream._writableState && stream._writableState.finished;
5884
- var onfinish = function onfinish2() {
5885
- writable = false;
5886
- writableEnded = true;
5887
- if (!readable) callback.call(stream);
5888
- };
5889
- var readableEnded = stream._readableState && stream._readableState.endEmitted;
5890
- var onend = function onend2() {
5891
- readable = false;
5892
- readableEnded = true;
5893
- if (!writable) callback.call(stream);
5894
- };
5895
- var onerror = function onerror2(err) {
5896
- callback.call(stream, err);
5897
- };
5898
- var onclose = function onclose2() {
5899
- var err;
5900
- if (readable && !readableEnded) {
5901
- if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();
5902
- return callback.call(stream, err);
5903
- }
5904
- if (writable && !writableEnded) {
5905
- if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();
5906
- return callback.call(stream, err);
5907
- }
5908
- };
5909
- var onrequest = function onrequest2() {
5910
- stream.req.on("finish", onfinish);
5911
- };
5912
- if (isRequest(stream)) {
5913
- stream.on("complete", onfinish);
5914
- stream.on("abort", onclose);
5915
- if (stream.req) onrequest();
5916
- else stream.on("request", onrequest);
5917
- } else if (writable && !stream._writableState) {
5918
- stream.on("end", onlegacyfinish);
5919
- stream.on("close", onlegacyfinish);
5920
- }
5921
- stream.on("end", onend);
5922
- stream.on("finish", onfinish);
5923
- if (opts.error !== false) stream.on("error", onerror);
5924
- stream.on("close", onclose);
5925
- return function() {
5926
- stream.removeListener("complete", onfinish);
5927
- stream.removeListener("abort", onclose);
5928
- stream.removeListener("request", onrequest);
5929
- if (stream.req) stream.req.removeListener("finish", onfinish);
5930
- stream.removeListener("end", onlegacyfinish);
5931
- stream.removeListener("close", onlegacyfinish);
5932
- stream.removeListener("finish", onfinish);
5933
- stream.removeListener("end", onend);
5934
- stream.removeListener("error", onerror);
5935
- stream.removeListener("close", onclose);
5936
- };
5937
- }
5938
- endOfStream = eos;
5939
- return endOfStream;
5940
- }
5941
- var async_iterator;
5942
- var hasRequiredAsync_iterator;
5943
- function requireAsync_iterator() {
5944
- if (hasRequiredAsync_iterator) return async_iterator;
5945
- hasRequiredAsync_iterator = 1;
5946
- var _Object$setPrototypeO;
5947
- function _defineProperty(obj, key, value) {
5948
- key = _toPropertyKey(key);
5949
- if (key in obj) {
5950
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
5951
- } else {
5952
- obj[key] = value;
5953
- }
5954
- return obj;
5955
- }
5956
- function _toPropertyKey(arg) {
5957
- var key = _toPrimitive(arg, "string");
5958
- return typeof key === "symbol" ? key : String(key);
5959
- }
5960
- function _toPrimitive(input, hint) {
5961
- if (typeof input !== "object" || input === null) return input;
5962
- var prim = input[Symbol.toPrimitive];
5963
- if (prim !== void 0) {
5964
- var res = prim.call(input, hint);
5965
- if (typeof res !== "object") return res;
5966
- throw new TypeError("@@toPrimitive must return a primitive value.");
5967
- }
5968
- return (hint === "string" ? String : Number)(input);
5969
- }
5970
- var finished = requireEndOfStream();
5971
- var kLastResolve = Symbol("lastResolve");
5972
- var kLastReject = Symbol("lastReject");
5973
- var kError = Symbol("error");
5974
- var kEnded = Symbol("ended");
5975
- var kLastPromise = Symbol("lastPromise");
5976
- var kHandlePromise = Symbol("handlePromise");
5977
- var kStream = Symbol("stream");
5978
- function createIterResult(value, done) {
5979
- return {
5980
- value,
5981
- done
5982
- };
5983
- }
5984
- function readAndResolve(iter) {
5985
- var resolve = iter[kLastResolve];
5986
- if (resolve !== null) {
5987
- var data = iter[kStream].read();
5988
- if (data !== null) {
5989
- iter[kLastPromise] = null;
5990
- iter[kLastResolve] = null;
5991
- iter[kLastReject] = null;
5992
- resolve(createIterResult(data, false));
5993
- }
5994
- }
5995
- }
5996
- function onReadable(iter) {
5997
- vue.process$1.nextTick(readAndResolve, iter);
5998
- }
5999
- function wrapForNext(lastPromise, iter) {
6000
- return function(resolve, reject) {
6001
- lastPromise.then(function() {
6002
- if (iter[kEnded]) {
6003
- resolve(createIterResult(void 0, true));
6004
- return;
6005
- }
6006
- iter[kHandlePromise](resolve, reject);
6007
- }, reject);
6008
- };
6009
- }
6010
- var AsyncIteratorPrototype = Object.getPrototypeOf(function() {
6011
- });
6012
- var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {
6013
- get stream() {
6014
- return this[kStream];
6015
- },
6016
- next: function next() {
6017
- var _this = this;
6018
- var error = this[kError];
6019
- if (error !== null) {
6020
- return Promise.reject(error);
6021
- }
6022
- if (this[kEnded]) {
6023
- return Promise.resolve(createIterResult(void 0, true));
6024
- }
6025
- if (this[kStream].destroyed) {
6026
- return new Promise(function(resolve, reject) {
6027
- vue.process$1.nextTick(function() {
6028
- if (_this[kError]) {
6029
- reject(_this[kError]);
6030
- } else {
6031
- resolve(createIterResult(void 0, true));
6032
- }
6033
- });
6034
- });
6035
- }
6036
- var lastPromise = this[kLastPromise];
6037
- var promise;
6038
- if (lastPromise) {
6039
- promise = new Promise(wrapForNext(lastPromise, this));
6040
- } else {
6041
- var data = this[kStream].read();
6042
- if (data !== null) {
6043
- return Promise.resolve(createIterResult(data, false));
6044
- }
6045
- promise = new Promise(this[kHandlePromise]);
6046
- }
6047
- this[kLastPromise] = promise;
6048
- return promise;
6049
- }
6050
- }, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function() {
6051
- return this;
6052
- }), _defineProperty(_Object$setPrototypeO, "return", function _return() {
6053
- var _this2 = this;
6054
- return new Promise(function(resolve, reject) {
6055
- _this2[kStream].destroy(null, function(err) {
6056
- if (err) {
6057
- reject(err);
6058
- return;
6059
- }
6060
- resolve(createIterResult(void 0, true));
6061
- });
6062
- });
6063
- }), _Object$setPrototypeO), AsyncIteratorPrototype);
6064
- var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator2(stream) {
6065
- var _Object$create;
6066
- var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {
6067
- value: stream,
6068
- writable: true
6069
- }), _defineProperty(_Object$create, kLastResolve, {
6070
- value: null,
6071
- writable: true
6072
- }), _defineProperty(_Object$create, kLastReject, {
6073
- value: null,
6074
- writable: true
6075
- }), _defineProperty(_Object$create, kError, {
6076
- value: null,
6077
- writable: true
6078
- }), _defineProperty(_Object$create, kEnded, {
6079
- value: stream._readableState.endEmitted,
6080
- writable: true
6081
- }), _defineProperty(_Object$create, kHandlePromise, {
6082
- value: function value(resolve, reject) {
6083
- var data = iterator[kStream].read();
6084
- if (data) {
6085
- iterator[kLastPromise] = null;
6086
- iterator[kLastResolve] = null;
6087
- iterator[kLastReject] = null;
6088
- resolve(createIterResult(data, false));
6089
- } else {
6090
- iterator[kLastResolve] = resolve;
6091
- iterator[kLastReject] = reject;
6092
- }
6093
- },
6094
- writable: true
6095
- }), _Object$create));
6096
- iterator[kLastPromise] = null;
6097
- finished(stream, function(err) {
6098
- if (err && err.code !== "ERR_STREAM_PREMATURE_CLOSE") {
6099
- var reject = iterator[kLastReject];
6100
- if (reject !== null) {
6101
- iterator[kLastPromise] = null;
6102
- iterator[kLastResolve] = null;
6103
- iterator[kLastReject] = null;
6104
- reject(err);
6105
- }
6106
- iterator[kError] = err;
6107
- return;
6108
- }
6109
- var resolve = iterator[kLastResolve];
6110
- if (resolve !== null) {
6111
- iterator[kLastPromise] = null;
6112
- iterator[kLastResolve] = null;
6113
- iterator[kLastReject] = null;
6114
- resolve(createIterResult(void 0, true));
6115
- }
6116
- iterator[kEnded] = true;
6117
- });
6118
- stream.on("readable", onReadable.bind(null, iterator));
6119
- return iterator;
6120
- };
6121
- async_iterator = createReadableStreamAsyncIterator;
6122
- return async_iterator;
6123
- }
6124
- var fromBrowser;
6125
- var hasRequiredFromBrowser;
6126
- function requireFromBrowser() {
6127
- if (hasRequiredFromBrowser) return fromBrowser;
6128
- hasRequiredFromBrowser = 1;
6129
- fromBrowser = function() {
6130
- throw new Error("Readable.from is not available in the browser");
6131
- };
6132
- return fromBrowser;
6133
- }
6134
- var _stream_readable;
6135
- var hasRequired_stream_readable;
6136
- function require_stream_readable() {
6137
- if (hasRequired_stream_readable) return _stream_readable;
6138
- hasRequired_stream_readable = 1;
6139
- _stream_readable = Readable;
6140
- var Duplex;
6141
- Readable.ReadableState = ReadableState;
6142
- requireEvents().EventEmitter;
6143
- var EElistenerCount = function EElistenerCount2(emitter, type2) {
6144
- return emitter.listeners(type2).length;
6145
- };
6146
- var Stream = requireStreamBrowser();
6147
- var Buffer = requireDist().Buffer;
6148
- var OurUint8Array = (typeof jszip.commonjsGlobal !== "undefined" ? jszip.commonjsGlobal : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() {
6149
- };
6150
- function _uint8ArrayToBuffer(chunk) {
6151
- return Buffer.from(chunk);
6152
- }
6153
- function _isUint8Array(obj) {
6154
- return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
6155
- }
6156
- var debugUtil = requireUtil();
6157
- var debug;
6158
- if (debugUtil && debugUtil.debuglog) {
6159
- debug = debugUtil.debuglog("stream");
6160
- } else {
6161
- debug = function debug2() {
6162
- };
6163
- }
6164
- var BufferList = requireBuffer_list();
6165
- var destroyImpl = requireDestroy();
6166
- var _require = requireState(), getHighWaterMark = _require.getHighWaterMark;
6167
- var _require$codes = requireErrorsBrowser().codes, ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF, ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
6168
- var StringDecoder;
6169
- var createReadableStreamAsyncIterator;
6170
- var from;
6171
- requireInherits_browser()(Readable, Stream);
6172
- var errorOrDestroy = destroyImpl.errorOrDestroy;
6173
- var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
6174
- function prependListener(emitter, event, fn) {
6175
- if (typeof emitter.prependListener === "function") return emitter.prependListener(event, fn);
6176
- if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);
6177
- else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);
6178
- else emitter._events[event] = [fn, emitter._events[event]];
6179
- }
6180
- function ReadableState(options, stream, isDuplex) {
6181
- Duplex = Duplex || require_stream_duplex();
6182
- options = options || {};
6183
- if (typeof isDuplex !== "boolean") isDuplex = stream instanceof Duplex;
6184
- this.objectMode = !!options.objectMode;
6185
- if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
6186
- this.highWaterMark = getHighWaterMark(this, options, "readableHighWaterMark", isDuplex);
6187
- this.buffer = new BufferList();
6188
- this.length = 0;
6189
- this.pipes = null;
6190
- this.pipesCount = 0;
6191
- this.flowing = null;
6192
- this.ended = false;
6193
- this.endEmitted = false;
6194
- this.reading = false;
6195
- this.sync = true;
6196
- this.needReadable = false;
6197
- this.emittedReadable = false;
6198
- this.readableListening = false;
6199
- this.resumeScheduled = false;
6200
- this.paused = true;
6201
- this.emitClose = options.emitClose !== false;
6202
- this.autoDestroy = !!options.autoDestroy;
6203
- this.destroyed = false;
6204
- this.defaultEncoding = options.defaultEncoding || "utf8";
6205
- this.awaitDrain = 0;
6206
- this.readingMore = false;
6207
- this.decoder = null;
6208
- this.encoding = null;
6209
- if (options.encoding) {
6210
- if (!StringDecoder) StringDecoder = requireString_decoder().StringDecoder;
6211
- this.decoder = new StringDecoder(options.encoding);
6212
- this.encoding = options.encoding;
6213
- }
6214
- }
6215
- function Readable(options) {
6216
- Duplex = Duplex || require_stream_duplex();
6217
- if (!(this instanceof Readable)) return new Readable(options);
6218
- var isDuplex = this instanceof Duplex;
6219
- this._readableState = new ReadableState(options, this, isDuplex);
6220
- this.readable = true;
6221
- if (options) {
6222
- if (typeof options.read === "function") this._read = options.read;
6223
- if (typeof options.destroy === "function") this._destroy = options.destroy;
6224
- }
6225
- Stream.call(this);
6226
- }
6227
- Object.defineProperty(Readable.prototype, "destroyed", {
6228
- // making it explicit this property is not enumerable
6229
- // because otherwise some prototype manipulation in
6230
- // userland will fail
6231
- enumerable: false,
6232
- get: function get2() {
6233
- if (this._readableState === void 0) {
6234
- return false;
6235
- }
6236
- return this._readableState.destroyed;
6237
- },
6238
- set: function set(value) {
6239
- if (!this._readableState) {
6240
- return;
6241
- }
6242
- this._readableState.destroyed = value;
6243
- }
6244
- });
6245
- Readable.prototype.destroy = destroyImpl.destroy;
6246
- Readable.prototype._undestroy = destroyImpl.undestroy;
6247
- Readable.prototype._destroy = function(err, cb) {
6248
- cb(err);
6249
- };
6250
- Readable.prototype.push = function(chunk, encoding) {
6251
- var state2 = this._readableState;
6252
- var skipChunkCheck;
6253
- if (!state2.objectMode) {
6254
- if (typeof chunk === "string") {
6255
- encoding = encoding || state2.defaultEncoding;
6256
- if (encoding !== state2.encoding) {
6257
- chunk = Buffer.from(chunk, encoding);
6258
- encoding = "";
6259
- }
6260
- skipChunkCheck = true;
6261
- }
6262
- } else {
6263
- skipChunkCheck = true;
6264
- }
6265
- return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
6266
- };
6267
- Readable.prototype.unshift = function(chunk) {
6268
- return readableAddChunk(this, chunk, null, true, false);
6269
- };
6270
- function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
6271
- debug("readableAddChunk", chunk);
6272
- var state2 = stream._readableState;
6273
- if (chunk === null) {
6274
- state2.reading = false;
6275
- onEofChunk(stream, state2);
6276
- } else {
6277
- var er;
6278
- if (!skipChunkCheck) er = chunkInvalid(state2, chunk);
6279
- if (er) {
6280
- errorOrDestroy(stream, er);
6281
- } else if (state2.objectMode || chunk && chunk.length > 0) {
6282
- if (typeof chunk !== "string" && !state2.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
6283
- chunk = _uint8ArrayToBuffer(chunk);
6284
- }
6285
- if (addToFront) {
6286
- if (state2.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());
6287
- else addChunk(stream, state2, chunk, true);
6288
- } else if (state2.ended) {
6289
- errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());
6290
- } else if (state2.destroyed) {
6291
- return false;
6292
- } else {
6293
- state2.reading = false;
6294
- if (state2.decoder && !encoding) {
6295
- chunk = state2.decoder.write(chunk);
6296
- if (state2.objectMode || chunk.length !== 0) addChunk(stream, state2, chunk, false);
6297
- else maybeReadMore(stream, state2);
6298
- } else {
6299
- addChunk(stream, state2, chunk, false);
6300
- }
6301
- }
6302
- } else if (!addToFront) {
6303
- state2.reading = false;
6304
- maybeReadMore(stream, state2);
6305
- }
6306
- }
6307
- return !state2.ended && (state2.length < state2.highWaterMark || state2.length === 0);
6308
- }
6309
- function addChunk(stream, state2, chunk, addToFront) {
6310
- if (state2.flowing && state2.length === 0 && !state2.sync) {
6311
- state2.awaitDrain = 0;
6312
- stream.emit("data", chunk);
6313
- } else {
6314
- state2.length += state2.objectMode ? 1 : chunk.length;
6315
- if (addToFront) state2.buffer.unshift(chunk);
6316
- else state2.buffer.push(chunk);
6317
- if (state2.needReadable) emitReadable(stream);
6318
- }
6319
- maybeReadMore(stream, state2);
6320
- }
6321
- function chunkInvalid(state2, chunk) {
6322
- var er;
6323
- if (!_isUint8Array(chunk) && typeof chunk !== "string" && chunk !== void 0 && !state2.objectMode) {
6324
- er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer", "Uint8Array"], chunk);
6325
- }
6326
- return er;
6327
- }
6328
- Readable.prototype.isPaused = function() {
6329
- return this._readableState.flowing === false;
6330
- };
6331
- Readable.prototype.setEncoding = function(enc) {
6332
- if (!StringDecoder) StringDecoder = requireString_decoder().StringDecoder;
6333
- var decoder = new StringDecoder(enc);
6334
- this._readableState.decoder = decoder;
6335
- this._readableState.encoding = this._readableState.decoder.encoding;
6336
- var p = this._readableState.buffer.head;
6337
- var content = "";
6338
- while (p !== null) {
6339
- content += decoder.write(p.data);
6340
- p = p.next;
6341
- }
6342
- this._readableState.buffer.clear();
6343
- if (content !== "") this._readableState.buffer.push(content);
6344
- this._readableState.length = content.length;
6345
- return this;
6346
- };
6347
- var MAX_HWM = 1073741824;
6348
- function computeNewHighWaterMark(n) {
6349
- if (n >= MAX_HWM) {
6350
- n = MAX_HWM;
6351
- } else {
6352
- n--;
6353
- n |= n >>> 1;
6354
- n |= n >>> 2;
6355
- n |= n >>> 4;
6356
- n |= n >>> 8;
6357
- n |= n >>> 16;
6358
- n++;
6359
- }
6360
- return n;
6361
- }
6362
- function howMuchToRead(n, state2) {
6363
- if (n <= 0 || state2.length === 0 && state2.ended) return 0;
6364
- if (state2.objectMode) return 1;
6365
- if (n !== n) {
6366
- if (state2.flowing && state2.length) return state2.buffer.head.data.length;
6367
- else return state2.length;
6368
- }
6369
- if (n > state2.highWaterMark) state2.highWaterMark = computeNewHighWaterMark(n);
6370
- if (n <= state2.length) return n;
6371
- if (!state2.ended) {
6372
- state2.needReadable = true;
6373
- return 0;
6374
- }
6375
- return state2.length;
6376
- }
6377
- Readable.prototype.read = function(n) {
6378
- debug("read", n);
6379
- n = parseInt(n, 10);
6380
- var state2 = this._readableState;
6381
- var nOrig = n;
6382
- if (n !== 0) state2.emittedReadable = false;
6383
- if (n === 0 && state2.needReadable && ((state2.highWaterMark !== 0 ? state2.length >= state2.highWaterMark : state2.length > 0) || state2.ended)) {
6384
- debug("read: emitReadable", state2.length, state2.ended);
6385
- if (state2.length === 0 && state2.ended) endReadable(this);
6386
- else emitReadable(this);
6387
- return null;
6388
- }
6389
- n = howMuchToRead(n, state2);
6390
- if (n === 0 && state2.ended) {
6391
- if (state2.length === 0) endReadable(this);
6392
- return null;
6393
- }
6394
- var doRead = state2.needReadable;
6395
- debug("need readable", doRead);
6396
- if (state2.length === 0 || state2.length - n < state2.highWaterMark) {
6397
- doRead = true;
6398
- debug("length less than watermark", doRead);
6399
- }
6400
- if (state2.ended || state2.reading) {
6401
- doRead = false;
6402
- debug("reading or ended", doRead);
6403
- } else if (doRead) {
6404
- debug("do read");
6405
- state2.reading = true;
6406
- state2.sync = true;
6407
- if (state2.length === 0) state2.needReadable = true;
6408
- this._read(state2.highWaterMark);
6409
- state2.sync = false;
6410
- if (!state2.reading) n = howMuchToRead(nOrig, state2);
6411
- }
6412
- var ret;
6413
- if (n > 0) ret = fromList(n, state2);
6414
- else ret = null;
6415
- if (ret === null) {
6416
- state2.needReadable = state2.length <= state2.highWaterMark;
6417
- n = 0;
6418
- } else {
6419
- state2.length -= n;
6420
- state2.awaitDrain = 0;
6421
- }
6422
- if (state2.length === 0) {
6423
- if (!state2.ended) state2.needReadable = true;
6424
- if (nOrig !== n && state2.ended) endReadable(this);
6425
- }
6426
- if (ret !== null) this.emit("data", ret);
6427
- return ret;
6428
- };
6429
- function onEofChunk(stream, state2) {
6430
- debug("onEofChunk");
6431
- if (state2.ended) return;
6432
- if (state2.decoder) {
6433
- var chunk = state2.decoder.end();
6434
- if (chunk && chunk.length) {
6435
- state2.buffer.push(chunk);
6436
- state2.length += state2.objectMode ? 1 : chunk.length;
6437
- }
6438
- }
6439
- state2.ended = true;
6440
- if (state2.sync) {
6441
- emitReadable(stream);
6442
- } else {
6443
- state2.needReadable = false;
6444
- if (!state2.emittedReadable) {
6445
- state2.emittedReadable = true;
6446
- emitReadable_(stream);
6447
- }
6448
- }
6449
- }
6450
- function emitReadable(stream) {
6451
- var state2 = stream._readableState;
6452
- debug("emitReadable", state2.needReadable, state2.emittedReadable);
6453
- state2.needReadable = false;
6454
- if (!state2.emittedReadable) {
6455
- debug("emitReadable", state2.flowing);
6456
- state2.emittedReadable = true;
6457
- vue.process$1.nextTick(emitReadable_, stream);
6458
- }
6459
- }
6460
- function emitReadable_(stream) {
6461
- var state2 = stream._readableState;
6462
- debug("emitReadable_", state2.destroyed, state2.length, state2.ended);
6463
- if (!state2.destroyed && (state2.length || state2.ended)) {
6464
- stream.emit("readable");
6465
- state2.emittedReadable = false;
6466
- }
6467
- state2.needReadable = !state2.flowing && !state2.ended && state2.length <= state2.highWaterMark;
6468
- flow(stream);
6469
- }
6470
- function maybeReadMore(stream, state2) {
6471
- if (!state2.readingMore) {
6472
- state2.readingMore = true;
6473
- vue.process$1.nextTick(maybeReadMore_, stream, state2);
6474
- }
6475
- }
6476
- function maybeReadMore_(stream, state2) {
6477
- while (!state2.reading && !state2.ended && (state2.length < state2.highWaterMark || state2.flowing && state2.length === 0)) {
6478
- var len = state2.length;
6479
- debug("maybeReadMore read 0");
6480
- stream.read(0);
6481
- if (len === state2.length)
6482
- break;
6483
- }
6484
- state2.readingMore = false;
6485
- }
6486
- Readable.prototype._read = function(n) {
6487
- errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED("_read()"));
6488
- };
6489
- Readable.prototype.pipe = function(dest, pipeOpts) {
6490
- var src = this;
6491
- var state2 = this._readableState;
6492
- switch (state2.pipesCount) {
6493
- case 0:
6494
- state2.pipes = dest;
6495
- break;
6496
- case 1:
6497
- state2.pipes = [state2.pipes, dest];
6498
- break;
6499
- default:
6500
- state2.pipes.push(dest);
6501
- break;
6502
- }
6503
- state2.pipesCount += 1;
6504
- debug("pipe count=%d opts=%j", state2.pipesCount, pipeOpts);
6505
- var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== vue.process$1.stdout && dest !== vue.process$1.stderr;
6506
- var endFn = doEnd ? onend : unpipe;
6507
- if (state2.endEmitted) vue.process$1.nextTick(endFn);
6508
- else src.once("end", endFn);
6509
- dest.on("unpipe", onunpipe);
6510
- function onunpipe(readable, unpipeInfo) {
6511
- debug("onunpipe");
6512
- if (readable === src) {
6513
- if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
6514
- unpipeInfo.hasUnpiped = true;
6515
- cleanup();
6516
- }
6517
- }
6518
- }
6519
- function onend() {
6520
- debug("onend");
6521
- dest.end();
6522
- }
6523
- var ondrain = pipeOnDrain(src);
6524
- dest.on("drain", ondrain);
6525
- var cleanedUp = false;
6526
- function cleanup() {
6527
- debug("cleanup");
6528
- dest.removeListener("close", onclose);
6529
- dest.removeListener("finish", onfinish);
6530
- dest.removeListener("drain", ondrain);
6531
- dest.removeListener("error", onerror);
6532
- dest.removeListener("unpipe", onunpipe);
6533
- src.removeListener("end", onend);
6534
- src.removeListener("end", unpipe);
6535
- src.removeListener("data", ondata);
6536
- cleanedUp = true;
6537
- if (state2.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
6538
- }
6539
- src.on("data", ondata);
6540
- function ondata(chunk) {
6541
- debug("ondata");
6542
- var ret = dest.write(chunk);
6543
- debug("dest.write", ret);
6544
- if (ret === false) {
6545
- if ((state2.pipesCount === 1 && state2.pipes === dest || state2.pipesCount > 1 && indexOf(state2.pipes, dest) !== -1) && !cleanedUp) {
6546
- debug("false write response, pause", state2.awaitDrain);
6547
- state2.awaitDrain++;
6548
- }
6549
- src.pause();
6550
- }
6551
- }
6552
- function onerror(er) {
6553
- debug("onerror", er);
6554
- unpipe();
6555
- dest.removeListener("error", onerror);
6556
- if (EElistenerCount(dest, "error") === 0) errorOrDestroy(dest, er);
6557
- }
6558
- prependListener(dest, "error", onerror);
6559
- function onclose() {
6560
- dest.removeListener("finish", onfinish);
6561
- unpipe();
6562
- }
6563
- dest.once("close", onclose);
6564
- function onfinish() {
6565
- debug("onfinish");
6566
- dest.removeListener("close", onclose);
6567
- unpipe();
6568
- }
6569
- dest.once("finish", onfinish);
6570
- function unpipe() {
6571
- debug("unpipe");
6572
- src.unpipe(dest);
6573
- }
6574
- dest.emit("pipe", src);
6575
- if (!state2.flowing) {
6576
- debug("pipe resume");
6577
- src.resume();
6578
- }
6579
- return dest;
6580
- };
6581
- function pipeOnDrain(src) {
6582
- return function pipeOnDrainFunctionResult() {
6583
- var state2 = src._readableState;
6584
- debug("pipeOnDrain", state2.awaitDrain);
6585
- if (state2.awaitDrain) state2.awaitDrain--;
6586
- if (state2.awaitDrain === 0 && EElistenerCount(src, "data")) {
6587
- state2.flowing = true;
6588
- flow(src);
6589
- }
6590
- };
6591
- }
6592
- Readable.prototype.unpipe = function(dest) {
6593
- var state2 = this._readableState;
6594
- var unpipeInfo = {
6595
- hasUnpiped: false
6596
- };
6597
- if (state2.pipesCount === 0) return this;
6598
- if (state2.pipesCount === 1) {
6599
- if (dest && dest !== state2.pipes) return this;
6600
- if (!dest) dest = state2.pipes;
6601
- state2.pipes = null;
6602
- state2.pipesCount = 0;
6603
- state2.flowing = false;
6604
- if (dest) dest.emit("unpipe", this, unpipeInfo);
6605
- return this;
6606
- }
6607
- if (!dest) {
6608
- var dests = state2.pipes;
6609
- var len = state2.pipesCount;
6610
- state2.pipes = null;
6611
- state2.pipesCount = 0;
6612
- state2.flowing = false;
6613
- for (var i = 0; i < len; i++) dests[i].emit("unpipe", this, {
6614
- hasUnpiped: false
6615
- });
6616
- return this;
6617
- }
6618
- var index = indexOf(state2.pipes, dest);
6619
- if (index === -1) return this;
6620
- state2.pipes.splice(index, 1);
6621
- state2.pipesCount -= 1;
6622
- if (state2.pipesCount === 1) state2.pipes = state2.pipes[0];
6623
- dest.emit("unpipe", this, unpipeInfo);
6624
- return this;
6625
- };
6626
- Readable.prototype.on = function(ev, fn) {
6627
- var res = Stream.prototype.on.call(this, ev, fn);
6628
- var state2 = this._readableState;
6629
- if (ev === "data") {
6630
- state2.readableListening = this.listenerCount("readable") > 0;
6631
- if (state2.flowing !== false) this.resume();
6632
- } else if (ev === "readable") {
6633
- if (!state2.endEmitted && !state2.readableListening) {
6634
- state2.readableListening = state2.needReadable = true;
6635
- state2.flowing = false;
6636
- state2.emittedReadable = false;
6637
- debug("on readable", state2.length, state2.reading);
6638
- if (state2.length) {
6639
- emitReadable(this);
6640
- } else if (!state2.reading) {
6641
- vue.process$1.nextTick(nReadingNextTick, this);
6642
- }
6643
- }
6644
- }
6645
- return res;
6646
- };
6647
- Readable.prototype.addListener = Readable.prototype.on;
6648
- Readable.prototype.removeListener = function(ev, fn) {
6649
- var res = Stream.prototype.removeListener.call(this, ev, fn);
6650
- if (ev === "readable") {
6651
- vue.process$1.nextTick(updateReadableListening, this);
6652
- }
6653
- return res;
6654
- };
6655
- Readable.prototype.removeAllListeners = function(ev) {
6656
- var res = Stream.prototype.removeAllListeners.apply(this, arguments);
6657
- if (ev === "readable" || ev === void 0) {
6658
- vue.process$1.nextTick(updateReadableListening, this);
6659
- }
6660
- return res;
6661
- };
6662
- function updateReadableListening(self2) {
6663
- var state2 = self2._readableState;
6664
- state2.readableListening = self2.listenerCount("readable") > 0;
6665
- if (state2.resumeScheduled && !state2.paused) {
6666
- state2.flowing = true;
6667
- } else if (self2.listenerCount("data") > 0) {
6668
- self2.resume();
6669
- }
6670
- }
6671
- function nReadingNextTick(self2) {
6672
- debug("readable nexttick read 0");
6673
- self2.read(0);
6674
- }
6675
- Readable.prototype.resume = function() {
6676
- var state2 = this._readableState;
6677
- if (!state2.flowing) {
6678
- debug("resume");
6679
- state2.flowing = !state2.readableListening;
6680
- resume(this, state2);
6681
- }
6682
- state2.paused = false;
6683
- return this;
6684
- };
6685
- function resume(stream, state2) {
6686
- if (!state2.resumeScheduled) {
6687
- state2.resumeScheduled = true;
6688
- vue.process$1.nextTick(resume_, stream, state2);
6689
- }
6690
- }
6691
- function resume_(stream, state2) {
6692
- debug("resume", state2.reading);
6693
- if (!state2.reading) {
6694
- stream.read(0);
6695
- }
6696
- state2.resumeScheduled = false;
6697
- stream.emit("resume");
6698
- flow(stream);
6699
- if (state2.flowing && !state2.reading) stream.read(0);
6700
- }
6701
- Readable.prototype.pause = function() {
6702
- debug("call pause flowing=%j", this._readableState.flowing);
6703
- if (this._readableState.flowing !== false) {
6704
- debug("pause");
6705
- this._readableState.flowing = false;
6706
- this.emit("pause");
6707
- }
6708
- this._readableState.paused = true;
6709
- return this;
6710
- };
6711
- function flow(stream) {
6712
- var state2 = stream._readableState;
6713
- debug("flow", state2.flowing);
6714
- while (state2.flowing && stream.read() !== null) ;
6715
- }
6716
- Readable.prototype.wrap = function(stream) {
6717
- var _this = this;
6718
- var state2 = this._readableState;
6719
- var paused = false;
6720
- stream.on("end", function() {
6721
- debug("wrapped end");
6722
- if (state2.decoder && !state2.ended) {
6723
- var chunk = state2.decoder.end();
6724
- if (chunk && chunk.length) _this.push(chunk);
6725
- }
6726
- _this.push(null);
6727
- });
6728
- stream.on("data", function(chunk) {
6729
- debug("wrapped data");
6730
- if (state2.decoder) chunk = state2.decoder.write(chunk);
6731
- if (state2.objectMode && (chunk === null || chunk === void 0)) return;
6732
- else if (!state2.objectMode && (!chunk || !chunk.length)) return;
6733
- var ret = _this.push(chunk);
6734
- if (!ret) {
6735
- paused = true;
6736
- stream.pause();
6737
- }
6738
- });
6739
- for (var i in stream) {
6740
- if (this[i] === void 0 && typeof stream[i] === "function") {
6741
- this[i] = /* @__PURE__ */ function methodWrap(method) {
6742
- return function methodWrapReturnFunction() {
6743
- return stream[method].apply(stream, arguments);
6744
- };
6745
- }(i);
6746
- }
6747
- }
6748
- for (var n = 0; n < kProxyEvents.length; n++) {
6749
- stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
6750
- }
6751
- this._read = function(n2) {
6752
- debug("wrapped _read", n2);
6753
- if (paused) {
6754
- paused = false;
6755
- stream.resume();
6756
- }
6757
- };
6758
- return this;
6759
- };
6760
- if (typeof Symbol === "function") {
6761
- Readable.prototype[Symbol.asyncIterator] = function() {
6762
- if (createReadableStreamAsyncIterator === void 0) {
6763
- createReadableStreamAsyncIterator = requireAsync_iterator();
6764
- }
6765
- return createReadableStreamAsyncIterator(this);
6766
- };
6767
- }
6768
- Object.defineProperty(Readable.prototype, "readableHighWaterMark", {
6769
- // making it explicit this property is not enumerable
6770
- // because otherwise some prototype manipulation in
6771
- // userland will fail
6772
- enumerable: false,
6773
- get: function get2() {
6774
- return this._readableState.highWaterMark;
6775
- }
6776
- });
6777
- Object.defineProperty(Readable.prototype, "readableBuffer", {
6778
- // making it explicit this property is not enumerable
6779
- // because otherwise some prototype manipulation in
6780
- // userland will fail
6781
- enumerable: false,
6782
- get: function get2() {
6783
- return this._readableState && this._readableState.buffer;
6784
- }
6785
- });
6786
- Object.defineProperty(Readable.prototype, "readableFlowing", {
6787
- // making it explicit this property is not enumerable
6788
- // because otherwise some prototype manipulation in
6789
- // userland will fail
6790
- enumerable: false,
6791
- get: function get2() {
6792
- return this._readableState.flowing;
6793
- },
6794
- set: function set(state2) {
6795
- if (this._readableState) {
6796
- this._readableState.flowing = state2;
6797
- }
6798
- }
6799
- });
6800
- Readable._fromList = fromList;
6801
- Object.defineProperty(Readable.prototype, "readableLength", {
6802
- // making it explicit this property is not enumerable
6803
- // because otherwise some prototype manipulation in
6804
- // userland will fail
6805
- enumerable: false,
6806
- get: function get2() {
6807
- return this._readableState.length;
6808
- }
6809
- });
6810
- function fromList(n, state2) {
6811
- if (state2.length === 0) return null;
6812
- var ret;
6813
- if (state2.objectMode) ret = state2.buffer.shift();
6814
- else if (!n || n >= state2.length) {
6815
- if (state2.decoder) ret = state2.buffer.join("");
6816
- else if (state2.buffer.length === 1) ret = state2.buffer.first();
6817
- else ret = state2.buffer.concat(state2.length);
6818
- state2.buffer.clear();
6819
- } else {
6820
- ret = state2.buffer.consume(n, state2.decoder);
6821
- }
6822
- return ret;
6823
- }
6824
- function endReadable(stream) {
6825
- var state2 = stream._readableState;
6826
- debug("endReadable", state2.endEmitted);
6827
- if (!state2.endEmitted) {
6828
- state2.ended = true;
6829
- vue.process$1.nextTick(endReadableNT, state2, stream);
6830
- }
6831
- }
6832
- function endReadableNT(state2, stream) {
6833
- debug("endReadableNT", state2.endEmitted, state2.length);
6834
- if (!state2.endEmitted && state2.length === 0) {
6835
- state2.endEmitted = true;
6836
- stream.readable = false;
6837
- stream.emit("end");
6838
- if (state2.autoDestroy) {
6839
- var wState = stream._writableState;
6840
- if (!wState || wState.autoDestroy && wState.finished) {
6841
- stream.destroy();
6842
- }
6843
- }
6844
- }
6845
- }
6846
- if (typeof Symbol === "function") {
6847
- Readable.from = function(iterable, opts) {
6848
- if (from === void 0) {
6849
- from = requireFromBrowser();
6850
- }
6851
- return from(Readable, iterable, opts);
6852
- };
6853
- }
6854
- function indexOf(xs, x) {
6855
- for (var i = 0, l = xs.length; i < l; i++) {
6856
- if (xs[i] === x) return i;
6857
- }
6858
- return -1;
6859
- }
6860
- return _stream_readable;
6861
- }
6862
- var _stream_transform;
6863
- var hasRequired_stream_transform;
6864
- function require_stream_transform() {
6865
- if (hasRequired_stream_transform) return _stream_transform;
6866
- hasRequired_stream_transform = 1;
6867
- _stream_transform = Transform;
6868
- var _require$codes = requireErrorsBrowser().codes, ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING, ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;
6869
- var Duplex = require_stream_duplex();
6870
- requireInherits_browser()(Transform, Duplex);
6871
- function afterTransform(er, data) {
6872
- var ts = this._transformState;
6873
- ts.transforming = false;
6874
- var cb = ts.writecb;
6875
- if (cb === null) {
6876
- return this.emit("error", new ERR_MULTIPLE_CALLBACK());
6877
- }
6878
- ts.writechunk = null;
6879
- ts.writecb = null;
6880
- if (data != null)
6881
- this.push(data);
6882
- cb(er);
6883
- var rs = this._readableState;
6884
- rs.reading = false;
6885
- if (rs.needReadable || rs.length < rs.highWaterMark) {
6886
- this._read(rs.highWaterMark);
6887
- }
6888
- }
6889
- function Transform(options) {
6890
- if (!(this instanceof Transform)) return new Transform(options);
6891
- Duplex.call(this, options);
6892
- this._transformState = {
6893
- afterTransform: afterTransform.bind(this),
6894
- needTransform: false,
6895
- transforming: false,
6896
- writecb: null,
6897
- writechunk: null,
6898
- writeencoding: null
6899
- };
6900
- this._readableState.needReadable = true;
6901
- this._readableState.sync = false;
6902
- if (options) {
6903
- if (typeof options.transform === "function") this._transform = options.transform;
6904
- if (typeof options.flush === "function") this._flush = options.flush;
6905
- }
6906
- this.on("prefinish", prefinish);
6907
- }
6908
- function prefinish() {
6909
- var _this = this;
6910
- if (typeof this._flush === "function" && !this._readableState.destroyed) {
6911
- this._flush(function(er, data) {
6912
- done(_this, er, data);
6913
- });
6914
- } else {
6915
- done(this, null, null);
6916
- }
6917
- }
6918
- Transform.prototype.push = function(chunk, encoding) {
6919
- this._transformState.needTransform = false;
6920
- return Duplex.prototype.push.call(this, chunk, encoding);
6921
- };
6922
- Transform.prototype._transform = function(chunk, encoding, cb) {
6923
- cb(new ERR_METHOD_NOT_IMPLEMENTED("_transform()"));
6924
- };
6925
- Transform.prototype._write = function(chunk, encoding, cb) {
6926
- var ts = this._transformState;
6927
- ts.writecb = cb;
6928
- ts.writechunk = chunk;
6929
- ts.writeencoding = encoding;
6930
- if (!ts.transforming) {
6931
- var rs = this._readableState;
6932
- if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
6933
- }
6934
- };
6935
- Transform.prototype._read = function(n) {
6936
- var ts = this._transformState;
6937
- if (ts.writechunk !== null && !ts.transforming) {
6938
- ts.transforming = true;
6939
- this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
6940
- } else {
6941
- ts.needTransform = true;
6942
- }
6943
- };
6944
- Transform.prototype._destroy = function(err, cb) {
6945
- Duplex.prototype._destroy.call(this, err, function(err2) {
6946
- cb(err2);
6947
- });
6948
- };
6949
- function done(stream, er, data) {
6950
- if (er) return stream.emit("error", er);
6951
- if (data != null)
6952
- stream.push(data);
6953
- if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0();
6954
- if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();
6955
- return stream.push(null);
6956
- }
6957
- return _stream_transform;
6958
- }
6959
- var _stream_passthrough;
6960
- var hasRequired_stream_passthrough;
6961
- function require_stream_passthrough() {
6962
- if (hasRequired_stream_passthrough) return _stream_passthrough;
6963
- hasRequired_stream_passthrough = 1;
6964
- _stream_passthrough = PassThrough;
6965
- var Transform = require_stream_transform();
6966
- requireInherits_browser()(PassThrough, Transform);
6967
- function PassThrough(options) {
6968
- if (!(this instanceof PassThrough)) return new PassThrough(options);
6969
- Transform.call(this, options);
6970
- }
6971
- PassThrough.prototype._transform = function(chunk, encoding, cb) {
6972
- cb(null, chunk);
6973
- };
6974
- return _stream_passthrough;
6975
- }
6976
- var pipeline_1;
6977
- var hasRequiredPipeline;
6978
- function requirePipeline() {
6979
- if (hasRequiredPipeline) return pipeline_1;
6980
- hasRequiredPipeline = 1;
6981
- var eos;
6982
- function once(callback) {
6983
- var called = false;
6984
- return function() {
6985
- if (called) return;
6986
- called = true;
6987
- callback.apply(void 0, arguments);
6988
- };
6989
- }
6990
- var _require$codes = requireErrorsBrowser().codes, ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS, ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;
6991
- function noop(err) {
6992
- if (err) throw err;
6993
- }
6994
- function isRequest(stream) {
6995
- return stream.setHeader && typeof stream.abort === "function";
6996
- }
6997
- function destroyer(stream, reading, writing, callback) {
6998
- callback = once(callback);
6999
- var closed = false;
7000
- stream.on("close", function() {
7001
- closed = true;
7002
- });
7003
- if (eos === void 0) eos = requireEndOfStream();
7004
- eos(stream, {
7005
- readable: reading,
7006
- writable: writing
7007
- }, function(err) {
7008
- if (err) return callback(err);
7009
- closed = true;
7010
- callback();
7011
- });
7012
- var destroyed = false;
7013
- return function(err) {
7014
- if (closed) return;
7015
- if (destroyed) return;
7016
- destroyed = true;
7017
- if (isRequest(stream)) return stream.abort();
7018
- if (typeof stream.destroy === "function") return stream.destroy();
7019
- callback(err || new ERR_STREAM_DESTROYED("pipe"));
7020
- };
7021
- }
7022
- function call(fn) {
7023
- fn();
7024
- }
7025
- function pipe(from, to) {
7026
- return from.pipe(to);
7027
- }
7028
- function popCallback(streams) {
7029
- if (!streams.length) return noop;
7030
- if (typeof streams[streams.length - 1] !== "function") return noop;
7031
- return streams.pop();
7032
- }
7033
- function pipeline() {
7034
- for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {
7035
- streams[_key] = arguments[_key];
7036
- }
7037
- var callback = popCallback(streams);
7038
- if (Array.isArray(streams[0])) streams = streams[0];
7039
- if (streams.length < 2) {
7040
- throw new ERR_MISSING_ARGS("streams");
7041
- }
7042
- var error;
7043
- var destroys = streams.map(function(stream, i) {
7044
- var reading = i < streams.length - 1;
7045
- var writing = i > 0;
7046
- return destroyer(stream, reading, writing, function(err) {
7047
- if (!error) error = err;
7048
- if (err) destroys.forEach(call);
7049
- if (reading) return;
7050
- destroys.forEach(call);
7051
- callback(error);
7052
- });
7053
- });
7054
- return streams.reduce(pipe);
7055
- }
7056
- pipeline_1 = pipeline;
7057
- return pipeline_1;
7058
- }
4828
+ exports.requireBrowser = requireBrowser;
7059
4829
  exports.requireCallBound = requireCallBound;
7060
- exports.requireEndOfStream = requireEndOfStream;
4830
+ exports.requireDist = requireDist;
4831
+ exports.requireEvents = requireEvents;
7061
4832
  exports.requireGetIntrinsic = requireGetIntrinsic;
7062
4833
  exports.requireInherits_browser = requireInherits_browser;
7063
- exports.requirePipeline = requirePipeline;
4834
+ exports.requireString_decoder = requireString_decoder;
7064
4835
  exports.requireType = requireType;
7065
- exports.require_stream_duplex = require_stream_duplex;
7066
- exports.require_stream_passthrough = require_stream_passthrough;
7067
- exports.require_stream_readable = require_stream_readable;
7068
- exports.require_stream_transform = require_stream_transform;
7069
- exports.require_stream_writable = require_stream_writable;
4836
+ exports.requireUtil = requireUtil;