index.js 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. module.exports = (function() {
  2. var __MODS__ = {};
  3. var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexports: {} }; __MODS__[modId] = { status: 0, func: func, req: req, m: m }; };
  4. var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
  5. var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
  6. var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
  7. __DEFINE__(1682324647459, function(require, module, exports) {
  8. /* eslint-disable node/no-deprecated-api */
  9. var toString = Object.prototype.toString
  10. var isModern = (
  11. typeof Buffer !== 'undefined' &&
  12. typeof Buffer.alloc === 'function' &&
  13. typeof Buffer.allocUnsafe === 'function' &&
  14. typeof Buffer.from === 'function'
  15. )
  16. function isArrayBuffer (input) {
  17. return toString.call(input).slice(8, -1) === 'ArrayBuffer'
  18. }
  19. function fromArrayBuffer (obj, byteOffset, length) {
  20. byteOffset >>>= 0
  21. var maxLength = obj.byteLength - byteOffset
  22. if (maxLength < 0) {
  23. throw new RangeError("'offset' is out of bounds")
  24. }
  25. if (length === undefined) {
  26. length = maxLength
  27. } else {
  28. length >>>= 0
  29. if (length > maxLength) {
  30. throw new RangeError("'length' is out of bounds")
  31. }
  32. }
  33. return isModern
  34. ? Buffer.from(obj.slice(byteOffset, byteOffset + length))
  35. : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length)))
  36. }
  37. function fromString (string, encoding) {
  38. if (typeof encoding !== 'string' || encoding === '') {
  39. encoding = 'utf8'
  40. }
  41. if (!Buffer.isEncoding(encoding)) {
  42. throw new TypeError('"encoding" must be a valid string encoding')
  43. }
  44. return isModern
  45. ? Buffer.from(string, encoding)
  46. : new Buffer(string, encoding)
  47. }
  48. function bufferFrom (value, encodingOrOffset, length) {
  49. if (typeof value === 'number') {
  50. throw new TypeError('"value" argument must not be a number')
  51. }
  52. if (isArrayBuffer(value)) {
  53. return fromArrayBuffer(value, encodingOrOffset, length)
  54. }
  55. if (typeof value === 'string') {
  56. return fromString(value, encodingOrOffset)
  57. }
  58. return isModern
  59. ? Buffer.from(value)
  60. : new Buffer(value)
  61. }
  62. module.exports = bufferFrom
  63. }, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
  64. return __REQUIRE__(1682324647459);
  65. })()
  66. //miniprogram-npm-outsideDeps=[]
  67. //# sourceMappingURL=index.js.map