@jspm/core
Advanced tools
Comparing version 1.0.4 to 1.1.0
@@ -1,7 +0,1 @@ | ||
import empty from './@empty.js'; | ||
function dew () { | ||
return empty; | ||
} | ||
export { dew }; | ||
import empty from'./@empty.js';function dew(){return empty}export{dew}; |
@@ -1,3 +0,1 @@ | ||
var empty = Object.freeze(Object.create(null)); | ||
export default empty; | ||
var empty=Object.freeze(Object.create(null));export default empty; |
@@ -1,502 +0,7 @@ | ||
import { a as _util } from './util-c86b84df.js'; | ||
import './process.js'; | ||
var exports = {}, | ||
_dewExec = false; | ||
var _global = typeof self !== "undefined" ? self : global; | ||
function dew() { | ||
if (_dewExec) return exports; | ||
_dewExec = true; | ||
// compare and isBuffer taken from https://github.com/feross/buffer/blob/680e9e5e488f22aac27599a57dc844a6315928dd/index.js | ||
// original notice: | ||
/*! | ||
* The buffer module from node.js, for the browser. | ||
* | ||
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> | ||
* @license MIT | ||
*/ | ||
function compare(a, b) { | ||
if (a === b) { | ||
return 0; | ||
} | ||
var x = a.length; | ||
var y = b.length; | ||
for (var i = 0, len = Math.min(x, y); i < len; ++i) { | ||
if (a[i] !== b[i]) { | ||
x = a[i]; | ||
y = b[i]; | ||
break; | ||
} | ||
} | ||
if (x < y) { | ||
return -1; | ||
} | ||
if (y < x) { | ||
return 1; | ||
} | ||
return 0; | ||
} | ||
function isBuffer(b) { | ||
if (_global.Buffer && typeof _global.Buffer.isBuffer === 'function') { | ||
return _global.Buffer.isBuffer(b); | ||
} | ||
return !!(b != null && b._isBuffer); | ||
} // based on node assert, original notice: | ||
// http://wiki.commonjs.org/wiki/Unit_Testing/1.0 | ||
// | ||
// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8! | ||
// | ||
// Originally from narwhal.js (http://narwhaljs.org) | ||
// Copyright (c) 2009 Thomas Robinson <280north.com> | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the 'Software'), to | ||
// deal in the Software without restriction, including without limitation the | ||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | ||
// sell copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in | ||
// all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
var util = _util; | ||
var hasOwn = Object.prototype.hasOwnProperty; | ||
var pSlice = Array.prototype.slice; | ||
var functionsHaveNames = function () { | ||
return function foo() {}.name === 'foo'; | ||
}(); | ||
function pToString(obj) { | ||
return Object.prototype.toString.call(obj); | ||
} | ||
function isView(arrbuf) { | ||
if (isBuffer(arrbuf)) { | ||
return false; | ||
} | ||
if (typeof _global.ArrayBuffer !== 'function') { | ||
return false; | ||
} | ||
if (typeof ArrayBuffer.isView === 'function') { | ||
return ArrayBuffer.isView(arrbuf); | ||
} | ||
if (!arrbuf) { | ||
return false; | ||
} | ||
if (arrbuf instanceof DataView) { | ||
return true; | ||
} | ||
if (arrbuf.buffer && arrbuf.buffer instanceof ArrayBuffer) { | ||
return true; | ||
} | ||
return false; | ||
} // 1. The assert module provides functions that throw | ||
// AssertionError's when particular conditions are not met. The | ||
// assert module must conform to the following interface. | ||
var assert = exports = ok; // 2. The AssertionError is defined in assert. | ||
// new assert.AssertionError({ message: message, | ||
// actual: actual, | ||
// expected: expected }) | ||
var regex = /\s*function\s+([^\(\s]*)\s*/; // based on https://github.com/ljharb/function.prototype.name/blob/adeeeec8bfcc6068b187d7d9fb3d5bb1d3a30899/implementation.js | ||
function getName(func) { | ||
if (!util.isFunction(func)) { | ||
return; | ||
} | ||
if (functionsHaveNames) { | ||
return func.name; | ||
} | ||
var str = func.toString(); | ||
var match = str.match(regex); | ||
return match && match[1]; | ||
} | ||
assert.AssertionError = function AssertionError(options) { | ||
this.name = 'AssertionError'; | ||
this.actual = options.actual; | ||
this.expected = options.expected; | ||
this.operator = options.operator; | ||
if (options.message) { | ||
this.message = options.message; | ||
this.generatedMessage = false; | ||
} else { | ||
this.message = getMessage(this); | ||
this.generatedMessage = true; | ||
} | ||
var stackStartFunction = options.stackStartFunction || fail; | ||
if (Error.captureStackTrace) { | ||
Error.captureStackTrace(this, stackStartFunction); | ||
} else { | ||
// non v8 browsers so we can have a stacktrace | ||
var err = new Error(); | ||
if (err.stack) { | ||
var out = err.stack; // try to strip useless frames | ||
var fn_name = getName(stackStartFunction); | ||
var idx = out.indexOf('\n' + fn_name); | ||
if (idx >= 0) { | ||
// once we have located the function frame | ||
// we need to strip out everything before it (and its line) | ||
var next_line = out.indexOf('\n', idx + 1); | ||
out = out.substring(next_line + 1); | ||
} | ||
this.stack = out; | ||
} | ||
} | ||
}; // assert.AssertionError instanceof Error | ||
util.inherits(assert.AssertionError, Error); | ||
function truncate(s, n) { | ||
if (typeof s === 'string') { | ||
return s.length < n ? s : s.slice(0, n); | ||
} else { | ||
return s; | ||
} | ||
} | ||
function inspect(something) { | ||
if (functionsHaveNames || !util.isFunction(something)) { | ||
return util.inspect(something); | ||
} | ||
var rawname = getName(something); | ||
var name = rawname ? ': ' + rawname : ''; | ||
return '[Function' + name + ']'; | ||
} | ||
function getMessage(self) { | ||
return truncate(inspect(self.actual), 128) + ' ' + self.operator + ' ' + truncate(inspect(self.expected), 128); | ||
} // At present only the three keys mentioned above are used and | ||
// understood by the spec. Implementations or sub modules can pass | ||
// other keys to the AssertionError's constructor - they will be | ||
// ignored. | ||
// 3. All of the following functions must throw an AssertionError | ||
// when a corresponding condition is not met, with a message that | ||
// may be undefined if not provided. All assertion methods provide | ||
// both the actual and expected values to the assertion error for | ||
// display purposes. | ||
function fail(actual, expected, message, operator, stackStartFunction) { | ||
throw new assert.AssertionError({ | ||
message: message, | ||
actual: actual, | ||
expected: expected, | ||
operator: operator, | ||
stackStartFunction: stackStartFunction | ||
}); | ||
} // EXTENSION! allows for well behaved errors defined elsewhere. | ||
assert.fail = fail; // 4. Pure assertion tests whether a value is truthy, as determined | ||
// by !!guard. | ||
// assert.ok(guard, message_opt); | ||
// This statement is equivalent to assert.equal(true, !!guard, | ||
// message_opt);. To test strictly for the value true, use | ||
// assert.strictEqual(true, guard, message_opt);. | ||
function ok(value, message) { | ||
if (!value) fail(value, true, message, '==', assert.ok); | ||
} | ||
assert.ok = ok; // 5. The equality assertion tests shallow, coercive equality with | ||
// ==. | ||
// assert.equal(actual, expected, message_opt); | ||
assert.equal = function equal(actual, expected, message) { | ||
if (actual != expected) fail(actual, expected, message, '==', assert.equal); | ||
}; // 6. The non-equality assertion tests for whether two objects are not equal | ||
// with != assert.notEqual(actual, expected, message_opt); | ||
assert.notEqual = function notEqual(actual, expected, message) { | ||
if (actual == expected) { | ||
fail(actual, expected, message, '!=', assert.notEqual); | ||
} | ||
}; // 7. The equivalence assertion tests a deep equality relation. | ||
// assert.deepEqual(actual, expected, message_opt); | ||
assert.deepEqual = function deepEqual(actual, expected, message) { | ||
if (!_deepEqual(actual, expected, false)) { | ||
fail(actual, expected, message, 'deepEqual', assert.deepEqual); | ||
} | ||
}; | ||
assert.deepStrictEqual = function deepStrictEqual(actual, expected, message) { | ||
if (!_deepEqual(actual, expected, true)) { | ||
fail(actual, expected, message, 'deepStrictEqual', assert.deepStrictEqual); | ||
} | ||
}; | ||
function _deepEqual(actual, expected, strict, memos) { | ||
// 7.1. All identical values are equivalent, as determined by ===. | ||
if (actual === expected) { | ||
return true; | ||
} else if (isBuffer(actual) && isBuffer(expected)) { | ||
return compare(actual, expected) === 0; // 7.2. If the expected value is a Date object, the actual value is | ||
// equivalent if it is also a Date object that refers to the same time. | ||
} else if (util.isDate(actual) && util.isDate(expected)) { | ||
return actual.getTime() === expected.getTime(); // 7.3 If the expected value is a RegExp object, the actual value is | ||
// equivalent if it is also a RegExp object with the same source and | ||
// properties (`global`, `multiline`, `lastIndex`, `ignoreCase`). | ||
} else if (util.isRegExp(actual) && util.isRegExp(expected)) { | ||
return actual.source === expected.source && actual.global === expected.global && actual.multiline === expected.multiline && actual.lastIndex === expected.lastIndex && actual.ignoreCase === expected.ignoreCase; // 7.4. Other pairs that do not both pass typeof value == 'object', | ||
// equivalence is determined by ==. | ||
} else if ((actual === null || typeof actual !== 'object') && (expected === null || typeof expected !== 'object')) { | ||
return strict ? actual === expected : actual == expected; // If both values are instances of typed arrays, wrap their underlying | ||
// ArrayBuffers in a Buffer each to increase performance | ||
// This optimization requires the arrays to have the same type as checked by | ||
// Object.prototype.toString (aka pToString). Never perform binary | ||
// comparisons for Float*Arrays, though, since e.g. +0 === -0 but their | ||
// bit patterns are not identical. | ||
} else if (isView(actual) && isView(expected) && pToString(actual) === pToString(expected) && !(actual instanceof Float32Array || actual instanceof Float64Array)) { | ||
return compare(new Uint8Array(actual.buffer), new Uint8Array(expected.buffer)) === 0; // 7.5 For all other Object pairs, including Array objects, equivalence is | ||
// determined by having the same number of owned properties (as verified | ||
// with Object.prototype.hasOwnProperty.call), the same set of keys | ||
// (although not necessarily the same order), equivalent values for every | ||
// corresponding key, and an identical 'prototype' property. Note: this | ||
// accounts for both named and indexed properties on Arrays. | ||
} else if (isBuffer(actual) !== isBuffer(expected)) { | ||
return false; | ||
} else { | ||
memos = memos || { | ||
actual: [], | ||
expected: [] | ||
}; | ||
var actualIndex = memos.actual.indexOf(actual); | ||
if (actualIndex !== -1) { | ||
if (actualIndex === memos.expected.indexOf(expected)) { | ||
return true; | ||
} | ||
} | ||
memos.actual.push(actual); | ||
memos.expected.push(expected); | ||
return objEquiv(actual, expected, strict, memos); | ||
} | ||
} | ||
function isArguments(object) { | ||
return Object.prototype.toString.call(object) == '[object Arguments]'; | ||
} | ||
function objEquiv(a, b, strict, actualVisitedObjects) { | ||
if (a === null || a === undefined || b === null || b === undefined) return false; // if one is a primitive, the other must be same | ||
if (util.isPrimitive(a) || util.isPrimitive(b)) return a === b; | ||
if (strict && Object.getPrototypeOf(a) !== Object.getPrototypeOf(b)) return false; | ||
var aIsArgs = isArguments(a); | ||
var bIsArgs = isArguments(b); | ||
if (aIsArgs && !bIsArgs || !aIsArgs && bIsArgs) return false; | ||
if (aIsArgs) { | ||
a = pSlice.call(a); | ||
b = pSlice.call(b); | ||
return _deepEqual(a, b, strict); | ||
} | ||
var ka = objectKeys(a); | ||
var kb = objectKeys(b); | ||
var key, i; // having the same number of owned properties (keys incorporates | ||
// hasOwnProperty) | ||
if (ka.length !== kb.length) return false; //the same set of keys (although not necessarily the same order), | ||
ka.sort(); | ||
kb.sort(); //~~~cheap key test | ||
for (i = ka.length - 1; i >= 0; i--) { | ||
if (ka[i] !== kb[i]) return false; | ||
} //equivalent values for every corresponding key, and | ||
//~~~possibly expensive deep test | ||
for (i = ka.length - 1; i >= 0; i--) { | ||
key = ka[i]; | ||
if (!_deepEqual(a[key], b[key], strict, actualVisitedObjects)) return false; | ||
} | ||
return true; | ||
} // 8. The non-equivalence assertion tests for any deep inequality. | ||
// assert.notDeepEqual(actual, expected, message_opt); | ||
assert.notDeepEqual = function notDeepEqual(actual, expected, message) { | ||
if (_deepEqual(actual, expected, false)) { | ||
fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual); | ||
} | ||
}; | ||
assert.notDeepStrictEqual = notDeepStrictEqual; | ||
function notDeepStrictEqual(actual, expected, message) { | ||
if (_deepEqual(actual, expected, true)) { | ||
fail(actual, expected, message, 'notDeepStrictEqual', notDeepStrictEqual); | ||
} | ||
} // 9. The strict equality assertion tests strict equality, as determined by ===. | ||
// assert.strictEqual(actual, expected, message_opt); | ||
assert.strictEqual = function strictEqual(actual, expected, message) { | ||
if (actual !== expected) { | ||
fail(actual, expected, message, '===', assert.strictEqual); | ||
} | ||
}; // 10. The strict non-equality assertion tests for strict inequality, as | ||
// determined by !==. assert.notStrictEqual(actual, expected, message_opt); | ||
assert.notStrictEqual = function notStrictEqual(actual, expected, message) { | ||
if (actual === expected) { | ||
fail(actual, expected, message, '!==', assert.notStrictEqual); | ||
} | ||
}; | ||
function expectedException(actual, expected) { | ||
if (!actual || !expected) { | ||
return false; | ||
} | ||
if (Object.prototype.toString.call(expected) == '[object RegExp]') { | ||
return expected.test(actual); | ||
} | ||
try { | ||
if (actual instanceof expected) { | ||
return true; | ||
} | ||
} catch (e) {// Ignore. The instanceof check doesn't work for arrow functions. | ||
} | ||
if (Error.isPrototypeOf(expected)) { | ||
return false; | ||
} | ||
return expected.call({}, actual) === true; | ||
} | ||
function _tryBlock(block) { | ||
var error; | ||
try { | ||
block(); | ||
} catch (e) { | ||
error = e; | ||
} | ||
return error; | ||
} | ||
function _throws(shouldThrow, block, expected, message) { | ||
var actual; | ||
if (typeof block !== 'function') { | ||
throw new TypeError('"block" argument must be a function'); | ||
} | ||
if (typeof expected === 'string') { | ||
message = expected; | ||
expected = null; | ||
} | ||
actual = _tryBlock(block); | ||
message = (expected && expected.name ? ' (' + expected.name + ').' : '.') + (message ? ' ' + message : '.'); | ||
if (shouldThrow && !actual) { | ||
fail(actual, expected, 'Missing expected exception' + message); | ||
} | ||
var userProvidedMessage = typeof message === 'string'; | ||
var isUnwantedException = !shouldThrow && util.isError(actual); | ||
var isUnexpectedException = !shouldThrow && actual && !expected; | ||
if (isUnwantedException && userProvidedMessage && expectedException(actual, expected) || isUnexpectedException) { | ||
fail(actual, expected, 'Got unwanted exception' + message); | ||
} | ||
if (shouldThrow && actual && expected && !expectedException(actual, expected) || !shouldThrow && actual) { | ||
throw actual; | ||
} | ||
} // 11. Expected to throw an error: | ||
// assert.throws(block, Error_opt, message_opt); | ||
assert.throws = function (block, | ||
/*optional*/ | ||
error, | ||
/*optional*/ | ||
message) { | ||
_throws(true, block, error, message); | ||
}; // EXTENSION! This is annoying to write outside this module. | ||
assert.doesNotThrow = function (block, | ||
/*optional*/ | ||
error, | ||
/*optional*/ | ||
message) { | ||
_throws(false, block, error, message); | ||
}; | ||
assert.ifError = function (err) { | ||
if (err) throw err; | ||
}; | ||
var objectKeys = Object.keys || function (obj) { | ||
var keys = []; | ||
for (var key in obj) { | ||
if (hasOwn.call(obj, key)) keys.push(key); | ||
} | ||
return keys; | ||
}; | ||
return exports; | ||
} | ||
const exports$1 = dew(); | ||
const AssertionError = exports$1.AssertionError, deepEqual = exports$1.deepEqual, deepStrictEqual = exports$1.deepStrictEqual, doesNotReject = exports$1.doesNotReject, doesNotThrow = exports$1.doesNotThrow, equal = exports$1.equal, fail = exports$1.fail, ifError = exports$1.ifError, notDeepEqual = exports$1.notDeepEqual, notDeepStrictEqual = exports$1.notDeepStrictEqual, notEqual = exports$1.notEqual, notStrictEqual = exports$1.notStrictEqual, ok = exports$1.ok, rejects = exports$1.rejects, strict = exports$1.strict, strictEqual = exports$1.strictEqual, throws = exports$1.throws; | ||
export default exports$1; | ||
export { AssertionError, deepEqual, deepStrictEqual, doesNotReject, doesNotThrow, equal, fail, ifError, notDeepEqual, notDeepStrictEqual, notEqual, notStrictEqual, ok, rejects, strict, strictEqual, throws }; | ||
import {u as util}from'./chunk-dac557ba.js';import {h as h$2}from'./chunk-0c2d1322.js';function e(e,r){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var t=Object(e),n=1;n<arguments.length;n++){var o=arguments[n];if(null!=o)for(var a=Object.keys(Object(o)),l=0,i=a.length;l<i;l++){var c=a[l],b=Object.getOwnPropertyDescriptor(o,c);void 0!==b&&b.enumerable&&(t[c]=o[c]);}}return t}var r={assign:e,polyfill:function(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:e});}};var t,e$1=Object.prototype.toString,r$1=function(t){var r=e$1.call(t),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e$1.call(t.callee)),n};if(!Object.keys){var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,c=r$1,l=Object.prototype.propertyIsEnumerable,i=!l.call({toString:null},"toString"),a=l.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(t){var e=t.constructor;return e&&e.prototype===t},p={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},s=function(){if("undefined"==typeof window)return !1;for(var t in window)try{if(!p["$"+t]&&n.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{f(window[t]);}catch(t){return !0}}catch(t){return !0}return !1}();t=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===o.call(t),l=c(t),p=e&&"[object String]"===o.call(t),y=[];if(!e&&!r&&!l)throw new TypeError("Object.keys called on a non-object");var b=a&&r;if(p&&t.length>0&&!n.call(t,0))for(var g=0;g<t.length;++g)y.push(String(g));if(l&&t.length>0)for(var h=0;h<t.length;++h)y.push(String(h));else for(var $ in t)b&&"prototype"===$||!n.call(t,$)||y.push(String($));if(i)for(var j=function(t){if("undefined"==typeof window||!s)return f(t);try{return f(t)}catch(t){return !1}}(t),w=0;w<u.length;++w)j&&"constructor"===u[w]||!n.call(t,u[w])||y.push(u[w]);return y};}var y=t,b=Array.prototype.slice,g=r$1,h=Object.keys,$=h?function(t){return h(t)}:y,j=Object.keys;$.shim=function(){Object.keys?function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2)||(Object.keys=function(t){return g(t)?j(b.call(t)):j(t)}):Object.keys=$;return Object.keys||$};var w=$;var r$2=w,e$2="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o$1=Object.prototype.toString,n$1=Array.prototype.concat,a$1=Object.defineProperty,c$1=a$1&&function(){var t={};try{for(var r in a$1(t,"x",{enumerable:!1,value:t}),t)return !1;return t.x===t}catch(t){return !1}}(),l$1=function(t,r,e,n){var l;(!(r in t)||"function"==typeof(l=n)&&"[object Function]"===o$1.call(l)&&n())&&(c$1?a$1(t,r,{configurable:!0,enumerable:!1,value:e,writable:!0}):t[r]=e);},u$1=function(t,o){var a=arguments.length>2?arguments[2]:{},c=r$2(o);e$2&&(c=n$1.call(c,Object.getOwnPropertySymbols(o)));for(var u=0;u<c.length;u+=1)l$1(t,c[u],o[c[u]],a[c[u]]);};u$1.supportsDescriptors=!!c$1;var f$1=u$1;var t$1=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return !1;if("symbol"==typeof Symbol.iterator)return !0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return !1;if("[object Symbol]"!==Object.prototype.toString.call(e))return !1;if("[object Symbol]"!==Object.prototype.toString.call(r))return !1;for(e in t[e]=42,t)return !1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return !1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return !1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return !1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return !1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(t,e);if(42!==n.value||!0!==n.enumerable)return !1}return !0};var f$2=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:global).Symbol,e$3=t$1,l$2=function(){return "function"==typeof f$2&&("function"==typeof Symbol&&("symbol"==typeof f$2("foo")&&("symbol"==typeof Symbol("bar")&&e$3())))};var t$2="Function.prototype.bind called on incompatible ",n$2=Array.prototype.slice,o$2=Object.prototype.toString,r$3=function(r){var e=this;if("function"!=typeof e||"[object Function]"!==o$2.call(e))throw new TypeError(t$2+e);for(var p,i=n$2.call(arguments,1),c=function(){if(this instanceof p){var t=e.apply(this,i.concat(n$2.call(arguments)));return Object(t)===t?t:this}return e.apply(r,i.concat(n$2.call(arguments)))},a=Math.max(0,e.length-i.length),l=[],u=0;u<a;u++)l.push("$"+u);if(p=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(c),e.prototype){var y=function(){};y.prototype=e.prototype,p.prototype=new y,y.prototype=null;}return p},e$4=Function.prototype.bind||r$3;var o$3=TypeError,t$3=Object.getOwnPropertyDescriptor;if(t$3)try{t$3({},"");}catch(r){t$3=null;}var n$3=function(){throw new o$3},y$1=t$3?function(){try{return arguments.callee,n$3}catch(r){try{return t$3(arguments,"callee").get}catch(r){return n$3}}}():n$3,a$2=l$2(),i$1=Object.getPrototypeOf||function(r){return r.__proto__},d="undefined"==typeof Uint8Array?void 0:i$1(Uint8Array),f$3={"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayBufferPrototype%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer.prototype,"%ArrayIteratorPrototype%":a$2?i$1([][Symbol.iterator]()):void 0,"%ArrayPrototype%":Array.prototype,"%ArrayProto_entries%":Array.prototype.entries,"%ArrayProto_forEach%":Array.prototype.forEach,"%ArrayProto_keys%":Array.prototype.keys,"%ArrayProto_values%":Array.prototype.values,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":void 0,"%AsyncFunctionPrototype%":void 0,"%AsyncGenerator%":void 0,"%AsyncGeneratorFunction%":void 0,"%AsyncGeneratorPrototype%":void 0,"%AsyncIteratorPrototype%":void 0,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%Boolean%":Boolean,"%BooleanPrototype%":Boolean.prototype,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%DataViewPrototype%":"undefined"==typeof DataView?void 0:DataView.prototype,"%Date%":Date,"%DatePrototype%":Date.prototype,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%ErrorPrototype%":Error.prototype,"%eval%":eval,"%EvalError%":EvalError,"%EvalErrorPrototype%":EvalError.prototype,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float32ArrayPrototype%":"undefined"==typeof Float32Array?void 0:Float32Array.prototype,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%Float64ArrayPrototype%":"undefined"==typeof Float64Array?void 0:Float64Array.prototype,"%Function%":Function,"%FunctionPrototype%":Function.prototype,"%Generator%":void 0,"%GeneratorFunction%":void 0,"%GeneratorPrototype%":void 0,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int8ArrayPrototype%":"undefined"==typeof Int8Array?void 0:Int8Array.prototype,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int16ArrayPrototype%":"undefined"==typeof Int16Array?void 0:Int8Array.prototype,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%Int32ArrayPrototype%":"undefined"==typeof Int32Array?void 0:Int32Array.prototype,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":a$2?i$1(i$1([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%JSONParse%":"object"==typeof JSON?JSON.parse:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&a$2?i$1((new Map)[Symbol.iterator]()):void 0,"%MapPrototype%":"undefined"==typeof Map?void 0:Map.prototype,"%Math%":Math,"%Number%":Number,"%NumberPrototype%":Number.prototype,"%Object%":Object,"%ObjectPrototype%":Object.prototype,"%ObjProto_toString%":Object.prototype.toString,"%ObjProto_valueOf%":Object.prototype.valueOf,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%PromisePrototype%":"undefined"==typeof Promise?void 0:Promise.prototype,"%PromiseProto_then%":"undefined"==typeof Promise?void 0:Promise.prototype.then,"%Promise_all%":"undefined"==typeof Promise?void 0:Promise.all,"%Promise_reject%":"undefined"==typeof Promise?void 0:Promise.reject,"%Promise_resolve%":"undefined"==typeof Promise?void 0:Promise.resolve,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%RangeErrorPrototype%":RangeError.prototype,"%ReferenceError%":ReferenceError,"%ReferenceErrorPrototype%":ReferenceError.prototype,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%RegExpPrototype%":RegExp.prototype,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&a$2?i$1((new Set)[Symbol.iterator]()):void 0,"%SetPrototype%":"undefined"==typeof Set?void 0:Set.prototype,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%SharedArrayBufferPrototype%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer.prototype,"%String%":String,"%StringIteratorPrototype%":a$2?i$1(""[Symbol.iterator]()):void 0,"%StringPrototype%":String.prototype,"%Symbol%":a$2?Symbol:void 0,"%SymbolPrototype%":a$2?Symbol.prototype:void 0,"%SyntaxError%":SyntaxError,"%SyntaxErrorPrototype%":SyntaxError.prototype,"%ThrowTypeError%":y$1,"%TypedArray%":d,"%TypedArrayPrototype%":d?d.prototype:void 0,"%TypeError%":o$3,"%TypeErrorPrototype%":o$3.prototype,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ArrayPrototype%":"undefined"==typeof Uint8Array?void 0:Uint8Array.prototype,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint8ClampedArrayPrototype%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray.prototype,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint16ArrayPrototype%":"undefined"==typeof Uint16Array?void 0:Uint16Array.prototype,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%Uint32ArrayPrototype%":"undefined"==typeof Uint32Array?void 0:Uint32Array.prototype,"%URIError%":URIError,"%URIErrorPrototype%":URIError.prototype,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakMapPrototype%":"undefined"==typeof WeakMap?void 0:WeakMap.prototype,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet,"%WeakSetPrototype%":"undefined"==typeof WeakSet?void 0:WeakSet.prototype},u$2=e$4.call(Function.call,String.prototype.replace),A=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,l$3=/\\(\\)?/g,v=function(r){var e=[];return u$2(r,A,(function(r,o,t,n){e[e.length]=t?u$2(n,l$3,"$1"):o||r;})),e},P=function(r,e){if(!(r in f$3))throw new SyntaxError("intrinsic "+r+" does not exist!");if(void 0===f$3[r]&&!e)throw new o$3("intrinsic "+r+" exists, but is not available. Please file an issue!");return f$3[r]},c$2=function(r,e){if("string"!=typeof r||0===r.length)throw new TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new TypeError('"allowMissing" argument must be a boolean');for(var n=v(r),y=P("%"+(n.length>0?n[0]:"")+"%",e),a=1;a<n.length;a+=1)if(null!=y)if(t$3&&a+1>=n.length){var i=t$3(y,n[a]);if(!e&&!(n[a]in y))throw new o$3("base intrinsic for "+r+" exists, but the property is not available.");y=i?i.get||i.value:y[n[a]];}else y=y[n[a]];return y};var t$4,p$1=e$4,o$4=c$2("%Function%"),i$2=o$4.apply,a$3=o$4.call;(t$4=function(){return p$1.apply(a$3,arguments)}).apply=function(){return p$1.apply(i$2,arguments)};var l$4=t$4;var r$4,n$4,i$3=function(t){return t!=t},o$5=(r$4=function(t,e){return 0===t&&0===e?1/t==1/e:t===e||!(!i$3(t)||!i$3(e))},r$4),c$3=(n$4=function(){return "function"==typeof Object.is?Object.is:o$5},n$4),f$4=f$1,u$3=f$1,s$1=r$4,a$4=n$4,l$5=function(){var t=c$3();return f$4(Object,{is:t},{is:function(){return Object.is!==t}}),t},p$2=l$4(a$4(),Object);u$3(p$2,{getPolyfill:a$4,implementation:s$1,shim:l$5});var m=p$2;N=function(r){return r!=r};var N,e$5,i$4=N,n$5=(e$5=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:i$4},f$1),t$5=e$5,u$4=f$1,a$5=N,m$1=e$5,o$6=function(){var r=t$5();return n$5(Number,{isNaN:r},{isNaN:function(){return Number.isNaN!==r}}),r},s$2=m$1();u$4(s$2,{getPolyfill:m$1,implementation:a$5,shim:o$6});var f$5=s$2;var c$4={},a$6=!1;function i$5(){if(a$6)return c$4;function e(t){return (e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(t,n){return !n||"object"!==e(n)&&"function"!=typeof n?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):n}function r(t){return (r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function o(t,e){return (o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}a$6=!0;var i,u,l={};function f(t,e,c){c||(c=Error);var a=function(c){function a(o,c,i){var u;return !function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(u=n(this,r(a).call(this,function(t,n,r){return "string"==typeof e?e:e(t,n,r)}(o,c,i)))).code=t,u}return !function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e);}(a,c),a}(c);l[t]=a;}function s(t,e){if(Array.isArray(t)){var n=t.length;return t=t.map((function(t){return String(t)})),n>2?"one of ".concat(e," ").concat(t.slice(0,n-1).join(", "),", or ")+t[n-1]:2===n?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return "of ".concat(e," ").concat(String(t))}return f("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),f("ERR_INVALID_ARG_TYPE",(function(t,n,r){var o,c,u;if(void 0===i&&(i=tt()),i("string"==typeof t,"'name' must be a string"),"string"==typeof n&&(c="not ",n.substr(0,c.length)===c)?(o="must not be",n=n.replace(/^not /,"")):o="must be",function(t,e,n){return (void 0===n||n>t.length)&&(n=t.length),t.substring(n-e.length,n)===e}(t," argument"))u="The ".concat(t," ").concat(o," ").concat(s(n,"type"));else {var l=function(t,e,n){return "number"!=typeof n&&(n=0),!(n+e.length>t.length)&&-1!==t.indexOf(e,n)}(t,".")?"property":"argument";u='The "'.concat(t,'" ').concat(l," ").concat(o," ").concat(s(n,"type"));}return u+=". Received type ".concat(e(r))}),TypeError),f("ERR_INVALID_ARG_VALUE",(function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===u&&(u=util);var o=u.inspect(n);return o.length>128&&(o="".concat(o.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(o)}),TypeError),f("ERR_INVALID_RETURN_VALUE",(function(t,n,r){var o;return o=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(e(r)),"Expected ".concat(t,' to be returned from the "').concat(n,'"')+" function but got ".concat(o,".")}),TypeError),f("ERR_MISSING_ARGS",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];void 0===i&&(i=tt()),i(e.length>0,"At least one arg needs to be specified");var r="The ",o=e.length;switch(e=e.map((function(t){return '"'.concat(t,'"')})),o){case 1:r+="".concat(e[0]," argument");break;case 2:r+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:r+=e.slice(0,o-1).join(", "),r+=", and ".concat(e[o-1]," arguments");}return "".concat(r," must be specified")}),TypeError),c$4.codes=l,c$4}var u$5={},l$6=!1;function f$6(){if(l$6)return u$5;l$6=!0;var n=h$2;function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r);}}function c(t,e){return !e||"object"!==y(e)&&"function"!=typeof e?a(t):e}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){var e="function"==typeof Map?new Map:void 0;return (f=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r);}function r(){return p(t,arguments,h(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),g(r,t)})(t)}function s(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return !1}}function p(t,e,n){return (p=s()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&g(o,n.prototype),o}).apply(null,arguments)}function g(t,e){return (g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(t){return (h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function y(t){return (y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var b=util.inspect,v=i$5().codes.ERR_INVALID_ARG_TYPE;function d(t,e,n){return (void 0===n||n>t.length)&&(n=t.length),t.substring(n-e.length,n)===e}var m="",E="",w="",S="",j={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function O(t){var e=Object.keys(t),n=Object.create(Object.getPrototypeOf(t));return e.forEach((function(e){n[e]=t[e];})),Object.defineProperty(n,"message",{value:t.message}),n}function x(t){return b(t,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function q(t,e,r){var o="",c="",a=0,i="",u=!1,l=x(t),f=l.split("\n"),s=x(e).split("\n"),p=0,g="";if("strictEqual"===r&&"object"===y(t)&&"object"===y(e)&&null!==t&&null!==e&&(r="strictEqualObject"),1===f.length&&1===s.length&&f[0]!==s[0]){var h=f[0].length+s[0].length;if(h<=10){if(!("object"===y(t)&&null!==t||"object"===y(e)&&null!==e||0===t&&0===e))return "".concat(j[r],"\n\n")+"".concat(f[0]," !== ").concat(s[0],"\n")}else if("strictEqualObject"!==r){if(h<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;f[0][p]===s[0][p];)p++;p>2&&(g="\n ".concat(function(t,e){if(e=Math.floor(e),0==t.length||0==e)return "";var n=t.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)t+=t,e--;return t+=t.substring(0,n-t.length)}(" ",p),"^"),p=0);}}}for(var b=f[f.length-1],v=s[s.length-1];b===v&&(p++<2?i="\n ".concat(b).concat(i):o=b,f.pop(),s.pop(),0!==f.length&&0!==s.length);)b=f[f.length-1],v=s[s.length-1];var O=Math.max(f.length,s.length);if(0===O){var q=l.split("\n");if(q.length>30)for(q[26]="".concat(m,"...").concat(S);q.length>27;)q.pop();return "".concat(j.notIdentical,"\n\n").concat(q.join("\n"),"\n")}p>3&&(i="\n".concat(m,"...").concat(S).concat(i),u=!0),""!==o&&(i="\n ".concat(o).concat(i),o="");var R=0,A=j[r]+"\n".concat(E,"+ actual").concat(S," ").concat(w,"- expected").concat(S),k=" ".concat(m,"...").concat(S," Lines skipped");for(p=0;p<O;p++){var _=p-a;if(f.length<p+1)_>1&&p>2&&(_>4?(c+="\n".concat(m,"...").concat(S),u=!0):_>3&&(c+="\n ".concat(s[p-2]),R++),c+="\n ".concat(s[p-1]),R++),a=p,o+="\n".concat(w,"-").concat(S," ").concat(s[p]),R++;else if(s.length<p+1)_>1&&p>2&&(_>4?(c+="\n".concat(m,"...").concat(S),u=!0):_>3&&(c+="\n ".concat(f[p-2]),R++),c+="\n ".concat(f[p-1]),R++),a=p,c+="\n".concat(E,"+").concat(S," ").concat(f[p]),R++;else {var T=s[p],P=f[p],I=P!==T&&(!d(P,",")||P.slice(0,-1)!==T);I&&d(T,",")&&T.slice(0,-1)===P&&(I=!1,P+=","),I?(_>1&&p>2&&(_>4?(c+="\n".concat(m,"...").concat(S),u=!0):_>3&&(c+="\n ".concat(f[p-2]),R++),c+="\n ".concat(f[p-1]),R++),a=p,c+="\n".concat(E,"+").concat(S," ").concat(P),o+="\n".concat(w,"-").concat(S," ").concat(T),R+=2):(c+=o,o="",1!==_&&0!==p||(c+="\n ".concat(P),R++));}if(R>20&&p<O-2)return "".concat(A).concat(k,"\n").concat(c,"\n").concat(m,"...").concat(S).concat(o,"\n")+"".concat(m,"...").concat(S)}return "".concat(A).concat(u?k:"","\n").concat(c).concat(o).concat(i).concat(g)}var R=function(t){function e(t){var r;if(!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),"object"!==y(t)||null===t)throw new v("options","Object",t);var o=t.message,i=t.operator,u=t.stackStartFn,l=t.actual,f=t.expected,s=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=o)r=c(this,h(e).call(this,String(o)));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(m="[34m",E="[32m",S="[39m",w="[31m"):(m="",E="",S="",w="")),"object"===y(l)&&null!==l&&"object"===y(f)&&null!==f&&"stack"in l&&l instanceof Error&&"stack"in f&&f instanceof Error&&(l=O(l),f=O(f)),"deepStrictEqual"===i||"strictEqual"===i)r=c(this,h(e).call(this,q(l,f,i)));else if("notDeepStrictEqual"===i||"notStrictEqual"===i){var p=j[i],g=x(l).split("\n");if("notStrictEqual"===i&&"object"===y(l)&&null!==l&&(p=j.notStrictEqualObject),g.length>30)for(g[26]="".concat(m,"...").concat(S);g.length>27;)g.pop();r=1===g.length?c(this,h(e).call(this,"".concat(p," ").concat(g[0]))):c(this,h(e).call(this,"".concat(p,"\n\n").concat(g.join("\n"),"\n")));}else {var b=x(l),d="",R=j[i];"notDeepEqual"===i||"notEqual"===i?(b="".concat(j[i],"\n\n").concat(b)).length>1024&&(b="".concat(b.slice(0,1021),"...")):(d="".concat(x(f)),b.length>512&&(b="".concat(b.slice(0,509),"...")),d.length>512&&(d="".concat(d.slice(0,509),"...")),"deepEqual"===i||"equal"===i?b="".concat(R,"\n\n").concat(b,"\n\nshould equal\n\n"):d=" ".concat(i," ").concat(d)),r=c(this,h(e).call(this,"".concat(b).concat(d)));}return Error.stackTraceLimit=s,r.generatedMessage=!o,Object.defineProperty(a(r),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),r.code="ERR_ASSERTION",r.actual=l,r.expected=f,r.operator=i,Error.captureStackTrace&&Error.captureStackTrace(a(r),u),r.stack,r.name="AssertionError",c(r)}var i,u;return !function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&g(t,e);}(e,t),i=e,(u=[{key:"toString",value:function(){return "".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:b.custom,value:function(t,e){return b(this,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),o.forEach((function(e){r(t,e,n[e]);}));}return t}({},e,{customInspect:!1,depth:0}))}}])&&o(i.prototype,u),e}(f(Error));return u$5=R}function s$3(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=t[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,c=t;}finally{try{r||null==i.return||i.return();}finally{if(o)throw c}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function p$3(t){return (p$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var g$1=void 0!==/a/g.flags,h$1=function(t){var e=[];return t.forEach((function(t){return e.push(t)})),e},y$2=function(t){var e=[];return t.forEach((function(t,n){return e.push([n,t])})),e},b$1=Object.is?Object.is:m,v$1=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return []},d$1=Number.isNaN?Number.isNaN:f$5;function m$2(t){return t.call.bind(t)}var E=m$2(Object.prototype.hasOwnProperty),w$1=m$2(Object.prototype.propertyIsEnumerable),S=m$2(Object.prototype.toString),j$1=util.types,O=j$1.isAnyArrayBuffer,x=j$1.isArrayBufferView,q=j$1.isDate,R=j$1.isMap,A$1=j$1.isRegExp,k=j$1.isSet,_=j$1.isNativeError,T=j$1.isBoxedPrimitive,P$1=j$1.isNumberObject,I=j$1.isStringObject,D=j$1.isBooleanObject,F=j$1.isBigIntObject,N$1=j$1.isSymbolObject,L=j$1.isFloat32Array,M=j$1.isFloat64Array;function U(t){if(0===t.length||t.length>10)return !0;for(var e=0;e<t.length;e++){var n=t.charCodeAt(e);if(n<48||n>57)return !0}return 10===t.length&&t>=Math.pow(2,32)}function G(t){return Object.keys(t).filter(U).concat(v$1(t).filter(Object.prototype.propertyIsEnumerable.bind(t)))} | ||
/*! | ||
* The buffer module from node.js, for the browser. | ||
* | ||
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> | ||
* @license MIT | ||
*/function V(t,e){if(t===e)return 0;for(var n=t.length,r=e.length,o=0,c=Math.min(n,r);o<c;++o)if(t[o]!==e[o]){n=t[o],r=e[o];break}return n<r?-1:r<n?1:0}function B(t,e,n,r){if(t===e)return 0!==t||(!n||b$1(t,e));if(n){if("object"!==p$3(t))return "number"==typeof t&&d$1(t)&&d$1(e);if("object"!==p$3(e)||null===t||null===e)return !1;if(Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return !1}else {if(null===t||"object"!==p$3(t))return (null===e||"object"!==p$3(e))&&t==e;if(null===e||"object"!==p$3(e))return !1}var o,c,a,i,u=S(t);if(u!==S(e))return !1;if(Array.isArray(t)){if(t.length!==e.length)return !1;var l=G(t),f=G(e);return l.length===f.length&&C(t,e,n,r,1,l)}if("[object Object]"===u&&(!R(t)&&R(e)||!k(t)&&k(e)))return !1;if(q(t)){if(!q(e)||Date.prototype.getTime.call(t)!==Date.prototype.getTime.call(e))return !1}else if(A$1(t)){if(!A$1(e)||(a=t,i=e,!(g$1?a.source===i.source&&a.flags===i.flags:RegExp.prototype.toString.call(a)===RegExp.prototype.toString.call(i))))return !1}else if(_(t)||t instanceof Error){if(t.message!==e.message||t.name!==e.name)return !1}else {if(x(t)){if(n||!L(t)&&!M(t)){if(!function(t,e){return t.byteLength===e.byteLength&&0===V(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}(t,e))return !1}else if(!function(t,e){if(t.byteLength!==e.byteLength)return !1;for(var n=0;n<t.byteLength;n++)if(t[n]!==e[n])return !1;return !0}(t,e))return !1;var s=G(t),h=G(e);return s.length===h.length&&C(t,e,n,r,0,s)}if(k(t))return !(!k(e)||t.size!==e.size)&&C(t,e,n,r,2);if(R(t))return !(!R(e)||t.size!==e.size)&&C(t,e,n,r,3);if(O(t)){if(c=e,(o=t).byteLength!==c.byteLength||0!==V(new Uint8Array(o),new Uint8Array(c)))return !1}else if(T(t)&&!function(t,e){return P$1(t)?P$1(e)&&b$1(Number.prototype.valueOf.call(t),Number.prototype.valueOf.call(e)):I(t)?I(e)&&String.prototype.valueOf.call(t)===String.prototype.valueOf.call(e):D(t)?D(e)&&Boolean.prototype.valueOf.call(t)===Boolean.prototype.valueOf.call(e):F(t)?F(e)&&BigInt.prototype.valueOf.call(t)===BigInt.prototype.valueOf.call(e):N$1(e)&&Symbol.prototype.valueOf.call(t)===Symbol.prototype.valueOf.call(e)}(t,e))return !1}return C(t,e,n,r,0)}function z(t,e){return e.filter((function(e){return w$1(t,e)}))}function C(t,e,n,r,o,c){if(5===arguments.length){c=Object.keys(t);var a=Object.keys(e);if(c.length!==a.length)return !1}for(var i=0;i<c.length;i++)if(!E(e,c[i]))return !1;if(n&&5===arguments.length){var u=v$1(t);if(0!==u.length){var l=0;for(i=0;i<u.length;i++){var f=u[i];if(w$1(t,f)){if(!w$1(e,f))return !1;c.push(f),l++;}else if(w$1(e,f))return !1}var s=v$1(e);if(u.length!==s.length&&z(e,s).length!==l)return !1}else {var p=v$1(e);if(0!==p.length&&0!==z(e,p).length)return !1}}if(0===c.length&&(0===o||1===o&&0===t.length||0===t.size))return !0;if(void 0===r)r={val1:new Map,val2:new Map,position:0};else {var g=r.val1.get(t);if(void 0!==g){var h=r.val2.get(e);if(void 0!==h)return g===h}r.position++;}r.val1.set(t,r.position),r.val2.set(e,r.position);var y=Q(t,e,n,c,r,o);return r.val1.delete(t),r.val2.delete(e),y}function Y(t,e,n,r){for(var o=h$1(t),c=0;c<o.length;c++){var a=o[c];if(B(e,a,n,r))return t.delete(a),!0}return !1}function W(t){switch(p$3(t)){case"undefined":return null;case"object":return;case"symbol":return !1;case"string":t=+t;case"number":if(d$1(t))return !1}return !0}function H(t,e,n){var r=W(n);return null!=r?r:e.has(r)&&!t.has(r)}function J(t,e,n,r,o){var c=W(n);if(null!=c)return c;var a=e.get(c);return !(void 0===a&&!e.has(c)||!B(r,a,!1,o))&&(!t.has(c)&&B(r,a,!1,o))}function K(t,e,n,r,o,c){for(var a=h$1(t),i=0;i<a.length;i++){var u=a[i];if(B(n,u,o,c)&&B(r,e.get(u),o,c))return t.delete(u),!0}return !1}function Q(t,e,n,r,o,c){var a=0;if(2===c){if(!function(t,e,n,r){for(var o=null,c=h$1(t),a=0;a<c.length;a++){var i=c[a];if("object"===p$3(i)&&null!==i)null===o&&(o=new Set),o.add(i);else if(!e.has(i)){if(n)return !1;if(!H(t,e,i))return !1;null===o&&(o=new Set),o.add(i);}}if(null!==o){for(var u=h$1(e),l=0;l<u.length;l++){var f=u[l];if("object"===p$3(f)&&null!==f){if(!Y(o,f,n,r))return !1}else if(!n&&!t.has(f)&&!Y(o,f,n,r))return !1}return 0===o.size}return !0}(t,e,n,o))return !1}else if(3===c){if(!function(t,e,n,r){for(var o=null,c=y$2(t),a=0;a<c.length;a++){var i=s$3(c[a],2),u=i[0],l=i[1];if("object"===p$3(u)&&null!==u)null===o&&(o=new Set),o.add(u);else {var f=e.get(u);if(void 0===f&&!e.has(u)||!B(l,f,n,r)){if(n)return !1;if(!J(t,e,u,l,r))return !1;null===o&&(o=new Set),o.add(u);}}}if(null!==o){for(var g=y$2(e),h=0;h<g.length;h++){var b=s$3(g[h],2),v=(u=b[0],b[1]);if("object"===p$3(u)&&null!==u){if(!K(o,t,u,v,n,r))return !1}else if(!(n||t.has(u)&&B(t.get(u),v,!1,r)||K(o,t,u,v,!1,r)))return !1}return 0===o.size}return !0}(t,e,n,o))return !1}else if(1===c)for(;a<t.length;a++){if(!E(t,a)){if(E(e,a))return !1;for(var i=Object.keys(t);a<i.length;a++){var u=i[a];if(!E(e,u)||!B(t[u],e[u],n,o))return !1}return i.length===Object.keys(e).length}if(!E(e,a)||!B(t[a],e[a],n,o))return !1}for(a=0;a<r.length;a++){var l=r[a];if(!B(t[l],e[l],n,o))return !1}return !0}var X={isDeepEqual:function(t,e){return B(t,e,!1)},isDeepStrictEqual:function(t,e){return B(t,e,!0)}},Z={},$$1=!1;function tt(){if($$1)return Z;$$1=!0;var o=h$2;function c(t){return (c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var a,u,l=i$5().codes,s=l.ERR_AMBIGUOUS_ARGUMENT,p=l.ERR_INVALID_ARG_TYPE,g=l.ERR_INVALID_ARG_VALUE,h=l.ERR_INVALID_RETURN_VALUE,y=l.ERR_MISSING_ARGS,b=f$6(),v=util.inspect,d=util.types,m$1=d.isPromise,E=d.isRegExp,w=Object.assign?Object.assign:r.assign,S=Object.is?Object.is:m;function j(){a=X.isDeepEqual,u=X.isDeepStrictEqual;}var O=!1,x=Z=k,q={};function R(t){if(t.message instanceof Error)throw t.message;throw new b(t)}function A(t,e,n,r){if(!n){var o=!1;if(0===e)o=!0,r="No value argument passed to `assert.ok()`";else if(r instanceof Error)throw r;var c=new b({actual:n,expected:!0,message:r,operator:"==",stackStartFn:t});throw c.generatedMessage=o,c}}function k(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];A.apply(void 0,[k,e.length].concat(e));}x.fail=function t(e,n,r,c,a){var i,u=arguments.length;if(0===u)i="Failed";else if(1===u)r=e,e=void 0;else {if(!1===O){O=!0;var l=o.emitWarning?o.emitWarning:console.warn.bind(console);l("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094");}2===u&&(c="!=");}if(r instanceof Error)throw r;var f={actual:e,expected:n,operator:void 0===c?"fail":c,stackStartFn:a||t};void 0!==r&&(f.message=r);var s=new b(f);throw i&&(s.message=i,s.generatedMessage=!0),s},x.AssertionError=b,x.ok=k,x.equal=function t(e,n,r){if(arguments.length<2)throw new y("actual","expected");e!=n&&R({actual:e,expected:n,message:r,operator:"==",stackStartFn:t});},x.notEqual=function t(e,n,r){if(arguments.length<2)throw new y("actual","expected");e==n&&R({actual:e,expected:n,message:r,operator:"!=",stackStartFn:t});},x.deepEqual=function t(e,n,r){if(arguments.length<2)throw new y("actual","expected");void 0===a&&j(),a(e,n)||R({actual:e,expected:n,message:r,operator:"deepEqual",stackStartFn:t});},x.notDeepEqual=function t(e,n,r){if(arguments.length<2)throw new y("actual","expected");void 0===a&&j(),a(e,n)&&R({actual:e,expected:n,message:r,operator:"notDeepEqual",stackStartFn:t});},x.deepStrictEqual=function t(e,n,r){if(arguments.length<2)throw new y("actual","expected");void 0===a&&j(),u(e,n)||R({actual:e,expected:n,message:r,operator:"deepStrictEqual",stackStartFn:t});},x.notDeepStrictEqual=function t(e,n,r){if(arguments.length<2)throw new y("actual","expected");void 0===a&&j();u(e,n)&&R({actual:e,expected:n,message:r,operator:"notDeepStrictEqual",stackStartFn:t});},x.strictEqual=function t(e,n,r){if(arguments.length<2)throw new y("actual","expected");S(e,n)||R({actual:e,expected:n,message:r,operator:"strictEqual",stackStartFn:t});},x.notStrictEqual=function t(e,n,r){if(arguments.length<2)throw new y("actual","expected");S(e,n)&&R({actual:e,expected:n,message:r,operator:"notStrictEqual",stackStartFn:t});};var _=function t(e,n,r){var o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n.forEach((function(t){t in e&&(void 0!==r&&"string"==typeof r[t]&&E(e[t])&&e[t].test(r[t])?o[t]=r[t]:o[t]=e[t]);}));};function T(t,e,n,r,o,c){if(!(n in t)||!u(t[n],e[n])){if(!r){var a=new _(t,o),i=new _(e,o,t),l=new b({actual:a,expected:i,operator:"deepStrictEqual",stackStartFn:c});throw l.actual=t,l.expected=e,l.operator=c.name,l}R({actual:t,expected:e,message:r,operator:c.name,stackStartFn:c});}}function P(t,e,n,r){if("function"!=typeof e){if(E(e))return e.test(t);if(2===arguments.length)throw new p("expected",["Function","RegExp"],e);if("object"!==c(t)||null===t){var o=new b({actual:t,expected:e,message:n,operator:"deepStrictEqual",stackStartFn:r});throw o.operator=r.name,o}var i=Object.keys(e);if(e instanceof Error)i.push("name","message");else if(0===i.length)throw new g("error",e,"may not be an empty object");return void 0===a&&j(),i.forEach((function(o){"string"==typeof t[o]&&E(e[o])&&e[o].test(t[o])||T(t,e,o,n,i,r);})),!0}return void 0!==e.prototype&&t instanceof e||!Error.isPrototypeOf(e)&&!0===e.call({},t)}function I(t){if("function"!=typeof t)throw new p("fn","Function",t);try{t();}catch(t){return t}return q}function D(t){return m$1(t)||null!==t&&"object"===c(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function F(t){return Promise.resolve().then((function(){var e;if("function"==typeof t){if(!D(e=t()))throw new h("instance of Promise","promiseFn",e)}else {if(!D(t))throw new p("promiseFn",["Function","Promise"],t);e=t;}return Promise.resolve().then((function(){return e})).then((function(){return q})).catch((function(t){return t}))}))}function N(t,e,n,r){if("string"==typeof n){if(4===arguments.length)throw new p("error",["Object","Error","Function","RegExp"],n);if("object"===c(e)&&null!==e){if(e.message===n)throw new s("error/message",'The error message "'.concat(e.message,'" is identical to the message.'))}else if(e===n)throw new s("error/message",'The error "'.concat(e,'" is identical to the message.'));r=n,n=void 0;}else if(null!=n&&"object"!==c(n)&&"function"!=typeof n)throw new p("error",["Object","Error","Function","RegExp"],n);if(e===q){var o="";n&&n.name&&(o+=" (".concat(n.name,")")),o+=r?": ".concat(r):".";var a="rejects"===t.name?"rejection":"exception";R({actual:void 0,expected:n,operator:t.name,message:"Missing expected ".concat(a).concat(o),stackStartFn:t});}if(n&&!P(e,n,r,t))throw e}function L(t,e,n,r){if(e!==q){if("string"==typeof n&&(r=n,n=void 0),!n||P(e,n)){var o=r?": ".concat(r):".",c="doesNotReject"===t.name?"rejection":"exception";R({actual:e,expected:n,operator:t.name,message:"Got unwanted ".concat(c).concat(o,"\n")+'Actual message: "'.concat(e&&e.message,'"'),stackStartFn:t});}throw e}}function M(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];A.apply(void 0,[M,e.length].concat(e));}return x.throws=function t(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];N.apply(void 0,[t,I(e)].concat(r));},x.rejects=function t(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return F(e).then((function(e){return N.apply(void 0,[t,e].concat(r))}))},x.doesNotThrow=function t(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];L.apply(void 0,[t,I(e)].concat(r));},x.doesNotReject=function t(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return F(e).then((function(e){return L.apply(void 0,[t,e].concat(r))}))},x.ifError=function t(e){if(null!=e){var n="ifError got unwanted exception: ";"object"===c(e)&&"string"==typeof e.message?0===e.message.length&&e.constructor?n+=e.constructor.name:n+=e.message:n+=v(e);var r=new b({actual:e,expected:null,operator:"ifError",message:n,stackStartFn:t}),o=e.stack;if("string"==typeof o){var a=o.split("\n");a.shift();for(var i=r.stack.split("\n"),u=0;u<a.length;u++){var l=i.indexOf(a[u]);if(-1!==l){i=i.slice(0,l);break}}r.stack="".concat(i.join("\n"),"\n").concat(a.join("\n"));}throw r}},x.strict=w(M,x,{equal:x.strictEqual,deepEqual:x.deepStrictEqual,notEqual:x.notStrictEqual,notDeepEqual:x.notDeepStrictEqual}),x.strict.strict=x.strict,Z}var et=tt();var AssertionError=et.AssertionError;var deepEqual=et.deepEqual;var deepStrictEqual=et.deepStrictEqual;var doesNotReject=et.doesNotReject;var doesNotThrow=et.doesNotThrow;var equal=et.equal;var fail=et.fail;var ifError=et.ifError;var notDeepEqual=et.notDeepEqual;var notDeepStrictEqual=et.notDeepStrictEqual;var notEqual=et.notEqual;var notStrictEqual=et.notStrictEqual;var ok=et.ok;var rejects=et.rejects;var strict=et.strict;var strictEqual=et.strictEqual;var throws=et.throws;export default et;export{AssertionError,deepEqual,deepStrictEqual,doesNotReject,doesNotThrow,equal,fail,ifError,notDeepEqual,notDeepStrictEqual,notEqual,notStrictEqual,ok,rejects,strict,strictEqual,throws}; |
@@ -1,2027 +0,1 @@ | ||
var exports = {}, | ||
_dewExec = false; | ||
function dew() { | ||
if (_dewExec) return exports; | ||
_dewExec = true; | ||
exports.byteLength = byteLength; | ||
exports.toByteArray = toByteArray; | ||
exports.fromByteArray = fromByteArray; | ||
var lookup = []; | ||
var revLookup = []; | ||
var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array; | ||
var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; | ||
for (var i = 0, len = code.length; i < len; ++i) { | ||
lookup[i] = code[i]; | ||
revLookup[code.charCodeAt(i)] = i; | ||
} // Support decoding URL-safe base64 strings, as Node.js does. | ||
// See: https://en.wikipedia.org/wiki/Base64#URL_applications | ||
revLookup['-'.charCodeAt(0)] = 62; | ||
revLookup['_'.charCodeAt(0)] = 63; | ||
function getLens(b64) { | ||
var len = b64.length; | ||
if (len % 4 > 0) { | ||
throw new Error('Invalid string. Length must be a multiple of 4'); | ||
} // Trim off extra bytes after placeholder bytes are found | ||
// See: https://github.com/beatgammit/base64-js/issues/42 | ||
var validLen = b64.indexOf('='); | ||
if (validLen === -1) validLen = len; | ||
var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4; | ||
return [validLen, placeHoldersLen]; | ||
} // base64 is 4/3 + up to two characters of the original data | ||
function byteLength(b64) { | ||
var lens = getLens(b64); | ||
var validLen = lens[0]; | ||
var placeHoldersLen = lens[1]; | ||
return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen; | ||
} | ||
function _byteLength(b64, validLen, placeHoldersLen) { | ||
return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen; | ||
} | ||
function toByteArray(b64) { | ||
var tmp; | ||
var lens = getLens(b64); | ||
var validLen = lens[0]; | ||
var placeHoldersLen = lens[1]; | ||
var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)); | ||
var curByte = 0; // if there are placeholders, only get up to the last complete 4 chars | ||
var len = placeHoldersLen > 0 ? validLen - 4 : validLen; | ||
for (var i = 0; i < len; i += 4) { | ||
tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)]; | ||
arr[curByte++] = tmp >> 16 & 0xFF; | ||
arr[curByte++] = tmp >> 8 & 0xFF; | ||
arr[curByte++] = tmp & 0xFF; | ||
} | ||
if (placeHoldersLen === 2) { | ||
tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4; | ||
arr[curByte++] = tmp & 0xFF; | ||
} | ||
if (placeHoldersLen === 1) { | ||
tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2; | ||
arr[curByte++] = tmp >> 8 & 0xFF; | ||
arr[curByte++] = tmp & 0xFF; | ||
} | ||
return arr; | ||
} | ||
function tripletToBase64(num) { | ||
return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]; | ||
} | ||
function encodeChunk(uint8, start, end) { | ||
var tmp; | ||
var output = []; | ||
for (var i = start; i < end; i += 3) { | ||
tmp = (uint8[i] << 16 & 0xFF0000) + (uint8[i + 1] << 8 & 0xFF00) + (uint8[i + 2] & 0xFF); | ||
output.push(tripletToBase64(tmp)); | ||
} | ||
return output.join(''); | ||
} | ||
function fromByteArray(uint8) { | ||
var tmp; | ||
var len = uint8.length; | ||
var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes | ||
var parts = []; | ||
var maxChunkLength = 16383; // must be multiple of 3 | ||
// go through the array every three bytes, we'll deal with trailing stuff later | ||
for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { | ||
parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength)); | ||
} // pad the end with zeros, but make sure to not forget the extra bytes | ||
if (extraBytes === 1) { | ||
tmp = uint8[len - 1]; | ||
parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 0x3F] + '=='); | ||
} else if (extraBytes === 2) { | ||
tmp = (uint8[len - 2] << 8) + uint8[len - 1]; | ||
parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 0x3F] + lookup[tmp << 2 & 0x3F] + '='); | ||
} | ||
return parts.join(''); | ||
} | ||
return exports; | ||
} | ||
var exports$1 = {}, | ||
_dewExec$1 = false; | ||
function dew$1() { | ||
if (_dewExec$1) return exports$1; | ||
_dewExec$1 = true; | ||
exports$1.read = function (buffer, offset, isLE, mLen, nBytes) { | ||
var e, m; | ||
var eLen = nBytes * 8 - mLen - 1; | ||
var eMax = (1 << eLen) - 1; | ||
var eBias = eMax >> 1; | ||
var nBits = -7; | ||
var i = isLE ? nBytes - 1 : 0; | ||
var d = isLE ? -1 : 1; | ||
var s = buffer[offset + i]; | ||
i += d; | ||
e = s & (1 << -nBits) - 1; | ||
s >>= -nBits; | ||
nBits += eLen; | ||
for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} | ||
m = e & (1 << -nBits) - 1; | ||
e >>= -nBits; | ||
nBits += mLen; | ||
for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} | ||
if (e === 0) { | ||
e = 1 - eBias; | ||
} else if (e === eMax) { | ||
return m ? NaN : (s ? -1 : 1) * Infinity; | ||
} else { | ||
m = m + Math.pow(2, mLen); | ||
e = e - eBias; | ||
} | ||
return (s ? -1 : 1) * m * Math.pow(2, e - mLen); | ||
}; | ||
exports$1.write = function (buffer, value, offset, isLE, mLen, nBytes) { | ||
var e, m, c; | ||
var eLen = nBytes * 8 - mLen - 1; | ||
var eMax = (1 << eLen) - 1; | ||
var eBias = eMax >> 1; | ||
var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0; | ||
var i = isLE ? 0 : nBytes - 1; | ||
var d = isLE ? 1 : -1; | ||
var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0; | ||
value = Math.abs(value); | ||
if (isNaN(value) || value === Infinity) { | ||
m = isNaN(value) ? 1 : 0; | ||
e = eMax; | ||
} else { | ||
e = Math.floor(Math.log(value) / Math.LN2); | ||
if (value * (c = Math.pow(2, -e)) < 1) { | ||
e--; | ||
c *= 2; | ||
} | ||
if (e + eBias >= 1) { | ||
value += rt / c; | ||
} else { | ||
value += rt * Math.pow(2, 1 - eBias); | ||
} | ||
if (value * c >= 2) { | ||
e++; | ||
c /= 2; | ||
} | ||
if (e + eBias >= eMax) { | ||
m = 0; | ||
e = eMax; | ||
} else if (e + eBias >= 1) { | ||
m = (value * c - 1) * Math.pow(2, mLen); | ||
e = e + eBias; | ||
} else { | ||
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); | ||
e = 0; | ||
} | ||
} | ||
for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} | ||
e = e << mLen | m; | ||
eLen += mLen; | ||
for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} | ||
buffer[offset + i - d] |= s * 128; | ||
}; | ||
return exports$1; | ||
} | ||
var exports$2 = {}, | ||
_dewExec$2 = false; | ||
function dew$2() { | ||
if (_dewExec$2) return exports$2; | ||
_dewExec$2 = true; | ||
var base64 = dew(); | ||
var ieee754 = dew$1(); | ||
exports$2.Buffer = Buffer; | ||
exports$2.SlowBuffer = SlowBuffer; | ||
exports$2.INSPECT_MAX_BYTES = 50; | ||
var K_MAX_LENGTH = 0x7fffffff; | ||
exports$2.kMaxLength = K_MAX_LENGTH; | ||
/** | ||
* If `Buffer.TYPED_ARRAY_SUPPORT`: | ||
* === true Use Uint8Array implementation (fastest) | ||
* === false Print warning and recommend using `buffer` v4.x which has an Object | ||
* implementation (most compatible, even IE6) | ||
* | ||
* Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, | ||
* Opera 11.6+, iOS 4.2+. | ||
* | ||
* We report that the browser does not support typed arrays if the are not subclassable | ||
* using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` | ||
* (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support | ||
* for __proto__ and has a buggy typed array implementation. | ||
*/ | ||
Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport(); | ||
if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && typeof console.error === 'function') { | ||
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.'); | ||
} | ||
function typedArraySupport() { | ||
// Can typed array instances can be augmented? | ||
try { | ||
var arr = new Uint8Array(1); | ||
arr.__proto__ = { | ||
__proto__: Uint8Array.prototype, | ||
foo: function () { | ||
return 42; | ||
} | ||
}; | ||
return arr.foo() === 42; | ||
} catch (e) { | ||
return false; | ||
} | ||
} | ||
Object.defineProperty(Buffer.prototype, 'parent', { | ||
enumerable: true, | ||
get: function () { | ||
if (!Buffer.isBuffer(this)) return undefined; | ||
return this.buffer; | ||
} | ||
}); | ||
Object.defineProperty(Buffer.prototype, 'offset', { | ||
enumerable: true, | ||
get: function () { | ||
if (!Buffer.isBuffer(this)) return undefined; | ||
return this.byteOffset; | ||
} | ||
}); | ||
function createBuffer(length) { | ||
if (length > K_MAX_LENGTH) { | ||
throw new RangeError('The value "' + length + '" is invalid for option "size"'); | ||
} // Return an augmented `Uint8Array` instance | ||
var buf = new Uint8Array(length); | ||
buf.__proto__ = Buffer.prototype; | ||
return buf; | ||
} | ||
/** | ||
* The Buffer constructor returns instances of `Uint8Array` that have their | ||
* prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of | ||
* `Uint8Array`, so the returned instances will have all the node `Buffer` methods | ||
* and the `Uint8Array` methods. Square bracket notation works as expected -- it | ||
* returns a single octet. | ||
* | ||
* The `Uint8Array` prototype remains unmodified. | ||
*/ | ||
function Buffer(arg, encodingOrOffset, length) { | ||
// Common case. | ||
if (typeof arg === 'number') { | ||
if (typeof encodingOrOffset === 'string') { | ||
throw new TypeError('The "string" argument must be of type string. Received type number'); | ||
} | ||
return allocUnsafe(arg); | ||
} | ||
return from(arg, encodingOrOffset, length); | ||
} // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 | ||
if (typeof Symbol !== 'undefined' && Symbol.species != null && Buffer[Symbol.species] === Buffer) { | ||
Object.defineProperty(Buffer, Symbol.species, { | ||
value: null, | ||
configurable: true, | ||
enumerable: false, | ||
writable: false | ||
}); | ||
} | ||
Buffer.poolSize = 8192; // not used by this implementation | ||
function from(value, encodingOrOffset, length) { | ||
if (typeof value === 'string') { | ||
return fromString(value, encodingOrOffset); | ||
} | ||
if (ArrayBuffer.isView(value)) { | ||
return fromArrayLike(value); | ||
} | ||
if (value == null) { | ||
throw TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received type ' + typeof value); | ||
} | ||
if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) { | ||
return fromArrayBuffer(value, encodingOrOffset, length); | ||
} | ||
if (typeof value === 'number') { | ||
throw new TypeError('The "value" argument must not be of type number. Received type number'); | ||
} | ||
var valueOf = value.valueOf && value.valueOf(); | ||
if (valueOf != null && valueOf !== value) { | ||
return Buffer.from(valueOf, encodingOrOffset, length); | ||
} | ||
var b = fromObject(value); | ||
if (b) return b; | ||
if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === 'function') { | ||
return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length); | ||
} | ||
throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received type ' + typeof value); | ||
} | ||
/** | ||
* Functionally equivalent to Buffer(arg, encoding) but throws a TypeError | ||
* if value is a number. | ||
* Buffer.from(str[, encoding]) | ||
* Buffer.from(array) | ||
* Buffer.from(buffer) | ||
* Buffer.from(arrayBuffer[, byteOffset[, length]]) | ||
**/ | ||
Buffer.from = function (value, encodingOrOffset, length) { | ||
return from(value, encodingOrOffset, length); | ||
}; // Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: | ||
// https://github.com/feross/buffer/pull/148 | ||
Buffer.prototype.__proto__ = Uint8Array.prototype; | ||
Buffer.__proto__ = Uint8Array; | ||
function assertSize(size) { | ||
if (typeof size !== 'number') { | ||
throw new TypeError('"size" argument must be of type number'); | ||
} else if (size < 0) { | ||
throw new RangeError('The value "' + size + '" is invalid for option "size"'); | ||
} | ||
} | ||
function alloc(size, fill, encoding) { | ||
assertSize(size); | ||
if (size <= 0) { | ||
return createBuffer(size); | ||
} | ||
if (fill !== undefined) { | ||
// Only pay attention to encoding if it's a string. This | ||
// prevents accidentally sending in a number that would | ||
// be interpretted as a start offset. | ||
return typeof encoding === 'string' ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill); | ||
} | ||
return createBuffer(size); | ||
} | ||
/** | ||
* Creates a new filled Buffer instance. | ||
* alloc(size[, fill[, encoding]]) | ||
**/ | ||
Buffer.alloc = function (size, fill, encoding) { | ||
return alloc(size, fill, encoding); | ||
}; | ||
function allocUnsafe(size) { | ||
assertSize(size); | ||
return createBuffer(size < 0 ? 0 : checked(size) | 0); | ||
} | ||
/** | ||
* Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. | ||
* */ | ||
Buffer.allocUnsafe = function (size) { | ||
return allocUnsafe(size); | ||
}; | ||
/** | ||
* Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. | ||
*/ | ||
Buffer.allocUnsafeSlow = function (size) { | ||
return allocUnsafe(size); | ||
}; | ||
function fromString(string, encoding) { | ||
if (typeof encoding !== 'string' || encoding === '') { | ||
encoding = 'utf8'; | ||
} | ||
if (!Buffer.isEncoding(encoding)) { | ||
throw new TypeError('Unknown encoding: ' + encoding); | ||
} | ||
var length = byteLength(string, encoding) | 0; | ||
var buf = createBuffer(length); | ||
var actual = buf.write(string, encoding); | ||
if (actual !== length) { | ||
// Writing a hex string, for example, that contains invalid characters will | ||
// cause everything after the first invalid character to be ignored. (e.g. | ||
// 'abxxcd' will be treated as 'ab') | ||
buf = buf.slice(0, actual); | ||
} | ||
return buf; | ||
} | ||
function fromArrayLike(array) { | ||
var length = array.length < 0 ? 0 : checked(array.length) | 0; | ||
var buf = createBuffer(length); | ||
for (var i = 0; i < length; i += 1) { | ||
buf[i] = array[i] & 255; | ||
} | ||
return buf; | ||
} | ||
function fromArrayBuffer(array, byteOffset, length) { | ||
if (byteOffset < 0 || array.byteLength < byteOffset) { | ||
throw new RangeError('"offset" is outside of buffer bounds'); | ||
} | ||
if (array.byteLength < byteOffset + (length || 0)) { | ||
throw new RangeError('"length" is outside of buffer bounds'); | ||
} | ||
var buf; | ||
if (byteOffset === undefined && length === undefined) { | ||
buf = new Uint8Array(array); | ||
} else if (length === undefined) { | ||
buf = new Uint8Array(array, byteOffset); | ||
} else { | ||
buf = new Uint8Array(array, byteOffset, length); | ||
} // Return an augmented `Uint8Array` instance | ||
buf.__proto__ = Buffer.prototype; | ||
return buf; | ||
} | ||
function fromObject(obj) { | ||
if (Buffer.isBuffer(obj)) { | ||
var len = checked(obj.length) | 0; | ||
var buf = createBuffer(len); | ||
if (buf.length === 0) { | ||
return buf; | ||
} | ||
obj.copy(buf, 0, 0, len); | ||
return buf; | ||
} | ||
if (obj.length !== undefined) { | ||
if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { | ||
return createBuffer(0); | ||
} | ||
return fromArrayLike(obj); | ||
} | ||
if (obj.type === 'Buffer' && Array.isArray(obj.data)) { | ||
return fromArrayLike(obj.data); | ||
} | ||
} | ||
function checked(length) { | ||
// Note: cannot use `length < K_MAX_LENGTH` here because that fails when | ||
// length is NaN (which is otherwise coerced to zero.) | ||
if (length >= K_MAX_LENGTH) { | ||
throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes'); | ||
} | ||
return length | 0; | ||
} | ||
function SlowBuffer(length) { | ||
if (+length != length) { | ||
// eslint-disable-line eqeqeq | ||
length = 0; | ||
} | ||
return Buffer.alloc(+length); | ||
} | ||
Buffer.isBuffer = function isBuffer(b) { | ||
return b != null && b._isBuffer === true && b !== Buffer.prototype; // so Buffer.isBuffer(Buffer.prototype) will be false | ||
}; | ||
Buffer.compare = function compare(a, b) { | ||
if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength); | ||
if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength); | ||
if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { | ||
throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); | ||
} | ||
if (a === b) return 0; | ||
var x = a.length; | ||
var y = b.length; | ||
for (var i = 0, len = Math.min(x, y); i < len; ++i) { | ||
if (a[i] !== b[i]) { | ||
x = a[i]; | ||
y = b[i]; | ||
break; | ||
} | ||
} | ||
if (x < y) return -1; | ||
if (y < x) return 1; | ||
return 0; | ||
}; | ||
Buffer.isEncoding = function isEncoding(encoding) { | ||
switch (String(encoding).toLowerCase()) { | ||
case 'hex': | ||
case 'utf8': | ||
case 'utf-8': | ||
case 'ascii': | ||
case 'latin1': | ||
case 'binary': | ||
case 'base64': | ||
case 'ucs2': | ||
case 'ucs-2': | ||
case 'utf16le': | ||
case 'utf-16le': | ||
return true; | ||
default: | ||
return false; | ||
} | ||
}; | ||
Buffer.concat = function concat(list, length) { | ||
if (!Array.isArray(list)) { | ||
throw new TypeError('"list" argument must be an Array of Buffers'); | ||
} | ||
if (list.length === 0) { | ||
return Buffer.alloc(0); | ||
} | ||
var i; | ||
if (length === undefined) { | ||
length = 0; | ||
for (i = 0; i < list.length; ++i) { | ||
length += list[i].length; | ||
} | ||
} | ||
var buffer = Buffer.allocUnsafe(length); | ||
var pos = 0; | ||
for (i = 0; i < list.length; ++i) { | ||
var buf = list[i]; | ||
if (isInstance(buf, Uint8Array)) { | ||
buf = Buffer.from(buf); | ||
} | ||
if (!Buffer.isBuffer(buf)) { | ||
throw new TypeError('"list" argument must be an Array of Buffers'); | ||
} | ||
buf.copy(buffer, pos); | ||
pos += buf.length; | ||
} | ||
return buffer; | ||
}; | ||
function byteLength(string, encoding) { | ||
if (Buffer.isBuffer(string)) { | ||
return string.length; | ||
} | ||
if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { | ||
return string.byteLength; | ||
} | ||
if (typeof string !== 'string') { | ||
throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + 'Received type ' + typeof string); | ||
} | ||
var len = string.length; | ||
var mustMatch = arguments.length > 2 && arguments[2] === true; | ||
if (!mustMatch && len === 0) return 0; // Use a for loop to avoid recursion | ||
var loweredCase = false; | ||
for (;;) { | ||
switch (encoding) { | ||
case 'ascii': | ||
case 'latin1': | ||
case 'binary': | ||
return len; | ||
case 'utf8': | ||
case 'utf-8': | ||
return utf8ToBytes(string).length; | ||
case 'ucs2': | ||
case 'ucs-2': | ||
case 'utf16le': | ||
case 'utf-16le': | ||
return len * 2; | ||
case 'hex': | ||
return len >>> 1; | ||
case 'base64': | ||
return base64ToBytes(string).length; | ||
default: | ||
if (loweredCase) { | ||
return mustMatch ? -1 : utf8ToBytes(string).length; // assume utf8 | ||
} | ||
encoding = ('' + encoding).toLowerCase(); | ||
loweredCase = true; | ||
} | ||
} | ||
} | ||
Buffer.byteLength = byteLength; | ||
function slowToString(encoding, start, end) { | ||
var loweredCase = false; // No need to verify that "this.length <= MAX_UINT32" since it's a read-only | ||
// property of a typed array. | ||
// This behaves neither like String nor Uint8Array in that we set start/end | ||
// to their upper/lower bounds if the value passed is out of range. | ||
// undefined is handled specially as per ECMA-262 6th Edition, | ||
// Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. | ||
if (start === undefined || start < 0) { | ||
start = 0; | ||
} // Return early if start > this.length. Done here to prevent potential uint32 | ||
// coercion fail below. | ||
if (start > this.length) { | ||
return ''; | ||
} | ||
if (end === undefined || end > this.length) { | ||
end = this.length; | ||
} | ||
if (end <= 0) { | ||
return ''; | ||
} // Force coersion to uint32. This will also coerce falsey/NaN values to 0. | ||
end >>>= 0; | ||
start >>>= 0; | ||
if (end <= start) { | ||
return ''; | ||
} | ||
if (!encoding) encoding = 'utf8'; | ||
while (true) { | ||
switch (encoding) { | ||
case 'hex': | ||
return hexSlice(this, start, end); | ||
case 'utf8': | ||
case 'utf-8': | ||
return utf8Slice(this, start, end); | ||
case 'ascii': | ||
return asciiSlice(this, start, end); | ||
case 'latin1': | ||
case 'binary': | ||
return latin1Slice(this, start, end); | ||
case 'base64': | ||
return base64Slice(this, start, end); | ||
case 'ucs2': | ||
case 'ucs-2': | ||
case 'utf16le': | ||
case 'utf-16le': | ||
return utf16leSlice(this, start, end); | ||
default: | ||
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding); | ||
encoding = (encoding + '').toLowerCase(); | ||
loweredCase = true; | ||
} | ||
} | ||
} // This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) | ||
// to detect a Buffer instance. It's not possible to use `instanceof Buffer` | ||
// reliably in a browserify context because there could be multiple different | ||
// copies of the 'buffer' package in use. This method works even for Buffer | ||
// instances that were created from another copy of the `buffer` package. | ||
// See: https://github.com/feross/buffer/issues/154 | ||
Buffer.prototype._isBuffer = true; | ||
function swap(b, n, m) { | ||
var i = b[n]; | ||
b[n] = b[m]; | ||
b[m] = i; | ||
} | ||
Buffer.prototype.swap16 = function swap16() { | ||
var len = this.length; | ||
if (len % 2 !== 0) { | ||
throw new RangeError('Buffer size must be a multiple of 16-bits'); | ||
} | ||
for (var i = 0; i < len; i += 2) { | ||
swap(this, i, i + 1); | ||
} | ||
return this; | ||
}; | ||
Buffer.prototype.swap32 = function swap32() { | ||
var len = this.length; | ||
if (len % 4 !== 0) { | ||
throw new RangeError('Buffer size must be a multiple of 32-bits'); | ||
} | ||
for (var i = 0; i < len; i += 4) { | ||
swap(this, i, i + 3); | ||
swap(this, i + 1, i + 2); | ||
} | ||
return this; | ||
}; | ||
Buffer.prototype.swap64 = function swap64() { | ||
var len = this.length; | ||
if (len % 8 !== 0) { | ||
throw new RangeError('Buffer size must be a multiple of 64-bits'); | ||
} | ||
for (var i = 0; i < len; i += 8) { | ||
swap(this, i, i + 7); | ||
swap(this, i + 1, i + 6); | ||
swap(this, i + 2, i + 5); | ||
swap(this, i + 3, i + 4); | ||
} | ||
return this; | ||
}; | ||
Buffer.prototype.toString = function toString() { | ||
var length = this.length; | ||
if (length === 0) return ''; | ||
if (arguments.length === 0) return utf8Slice(this, 0, length); | ||
return slowToString.apply(this, arguments); | ||
}; | ||
Buffer.prototype.toLocaleString = Buffer.prototype.toString; | ||
Buffer.prototype.equals = function equals(b) { | ||
if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer'); | ||
if (this === b) return true; | ||
return Buffer.compare(this, b) === 0; | ||
}; | ||
Buffer.prototype.inspect = function inspect() { | ||
var str = ''; | ||
var max = exports$2.INSPECT_MAX_BYTES; | ||
str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim(); | ||
if (this.length > max) str += ' ... '; | ||
return '<Buffer ' + str + '>'; | ||
}; | ||
Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) { | ||
if (isInstance(target, Uint8Array)) { | ||
target = Buffer.from(target, target.offset, target.byteLength); | ||
} | ||
if (!Buffer.isBuffer(target)) { | ||
throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. ' + 'Received type ' + typeof target); | ||
} | ||
if (start === undefined) { | ||
start = 0; | ||
} | ||
if (end === undefined) { | ||
end = target ? target.length : 0; | ||
} | ||
if (thisStart === undefined) { | ||
thisStart = 0; | ||
} | ||
if (thisEnd === undefined) { | ||
thisEnd = this.length; | ||
} | ||
if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { | ||
throw new RangeError('out of range index'); | ||
} | ||
if (thisStart >= thisEnd && start >= end) { | ||
return 0; | ||
} | ||
if (thisStart >= thisEnd) { | ||
return -1; | ||
} | ||
if (start >= end) { | ||
return 1; | ||
} | ||
start >>>= 0; | ||
end >>>= 0; | ||
thisStart >>>= 0; | ||
thisEnd >>>= 0; | ||
if (this === target) return 0; | ||
var x = thisEnd - thisStart; | ||
var y = end - start; | ||
var len = Math.min(x, y); | ||
var thisCopy = this.slice(thisStart, thisEnd); | ||
var targetCopy = target.slice(start, end); | ||
for (var i = 0; i < len; ++i) { | ||
if (thisCopy[i] !== targetCopy[i]) { | ||
x = thisCopy[i]; | ||
y = targetCopy[i]; | ||
break; | ||
} | ||
} | ||
if (x < y) return -1; | ||
if (y < x) return 1; | ||
return 0; | ||
}; // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, | ||
// OR the last index of `val` in `buffer` at offset <= `byteOffset`. | ||
// | ||
// Arguments: | ||
// - buffer - a Buffer to search | ||
// - val - a string, Buffer, or number | ||
// - byteOffset - an index into `buffer`; will be clamped to an int32 | ||
// - encoding - an optional encoding, relevant is val is a string | ||
// - dir - true for indexOf, false for lastIndexOf | ||
function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) { | ||
// Empty buffer means no match | ||
if (buffer.length === 0) return -1; // Normalize byteOffset | ||
if (typeof byteOffset === 'string') { | ||
encoding = byteOffset; | ||
byteOffset = 0; | ||
} else if (byteOffset > 0x7fffffff) { | ||
byteOffset = 0x7fffffff; | ||
} else if (byteOffset < -0x80000000) { | ||
byteOffset = -0x80000000; | ||
} | ||
byteOffset = +byteOffset; // Coerce to Number. | ||
if (numberIsNaN(byteOffset)) { | ||
// byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer | ||
byteOffset = dir ? 0 : buffer.length - 1; | ||
} // Normalize byteOffset: negative offsets start from the end of the buffer | ||
if (byteOffset < 0) byteOffset = buffer.length + byteOffset; | ||
if (byteOffset >= buffer.length) { | ||
if (dir) return -1;else byteOffset = buffer.length - 1; | ||
} else if (byteOffset < 0) { | ||
if (dir) byteOffset = 0;else return -1; | ||
} // Normalize val | ||
if (typeof val === 'string') { | ||
val = Buffer.from(val, encoding); | ||
} // Finally, search either indexOf (if dir is true) or lastIndexOf | ||
if (Buffer.isBuffer(val)) { | ||
// Special case: looking for empty string/buffer always fails | ||
if (val.length === 0) { | ||
return -1; | ||
} | ||
return arrayIndexOf(buffer, val, byteOffset, encoding, dir); | ||
} else if (typeof val === 'number') { | ||
val = val & 0xFF; // Search for a byte value [0-255] | ||
if (typeof Uint8Array.prototype.indexOf === 'function') { | ||
if (dir) { | ||
return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset); | ||
} else { | ||
return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset); | ||
} | ||
} | ||
return arrayIndexOf(buffer, [val], byteOffset, encoding, dir); | ||
} | ||
throw new TypeError('val must be string, number or Buffer'); | ||
} | ||
function arrayIndexOf(arr, val, byteOffset, encoding, dir) { | ||
var indexSize = 1; | ||
var arrLength = arr.length; | ||
var valLength = val.length; | ||
if (encoding !== undefined) { | ||
encoding = String(encoding).toLowerCase(); | ||
if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') { | ||
if (arr.length < 2 || val.length < 2) { | ||
return -1; | ||
} | ||
indexSize = 2; | ||
arrLength /= 2; | ||
valLength /= 2; | ||
byteOffset /= 2; | ||
} | ||
} | ||
function read(buf, i) { | ||
if (indexSize === 1) { | ||
return buf[i]; | ||
} else { | ||
return buf.readUInt16BE(i * indexSize); | ||
} | ||
} | ||
var i; | ||
if (dir) { | ||
var foundIndex = -1; | ||
for (i = byteOffset; i < arrLength; i++) { | ||
if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { | ||
if (foundIndex === -1) foundIndex = i; | ||
if (i - foundIndex + 1 === valLength) return foundIndex * indexSize; | ||
} else { | ||
if (foundIndex !== -1) i -= i - foundIndex; | ||
foundIndex = -1; | ||
} | ||
} | ||
} else { | ||
if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength; | ||
for (i = byteOffset; i >= 0; i--) { | ||
var found = true; | ||
for (var j = 0; j < valLength; j++) { | ||
if (read(arr, i + j) !== read(val, j)) { | ||
found = false; | ||
break; | ||
} | ||
} | ||
if (found) return i; | ||
} | ||
} | ||
return -1; | ||
} | ||
Buffer.prototype.includes = function includes(val, byteOffset, encoding) { | ||
return this.indexOf(val, byteOffset, encoding) !== -1; | ||
}; | ||
Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) { | ||
return bidirectionalIndexOf(this, val, byteOffset, encoding, true); | ||
}; | ||
Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) { | ||
return bidirectionalIndexOf(this, val, byteOffset, encoding, false); | ||
}; | ||
function hexWrite(buf, string, offset, length) { | ||
offset = Number(offset) || 0; | ||
var remaining = buf.length - offset; | ||
if (!length) { | ||
length = remaining; | ||
} else { | ||
length = Number(length); | ||
if (length > remaining) { | ||
length = remaining; | ||
} | ||
} | ||
var strLen = string.length; | ||
if (length > strLen / 2) { | ||
length = strLen / 2; | ||
} | ||
for (var i = 0; i < length; ++i) { | ||
var parsed = parseInt(string.substr(i * 2, 2), 16); | ||
if (numberIsNaN(parsed)) return i; | ||
buf[offset + i] = parsed; | ||
} | ||
return i; | ||
} | ||
function utf8Write(buf, string, offset, length) { | ||
return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length); | ||
} | ||
function asciiWrite(buf, string, offset, length) { | ||
return blitBuffer(asciiToBytes(string), buf, offset, length); | ||
} | ||
function latin1Write(buf, string, offset, length) { | ||
return asciiWrite(buf, string, offset, length); | ||
} | ||
function base64Write(buf, string, offset, length) { | ||
return blitBuffer(base64ToBytes(string), buf, offset, length); | ||
} | ||
function ucs2Write(buf, string, offset, length) { | ||
return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length); | ||
} | ||
Buffer.prototype.write = function write(string, offset, length, encoding) { | ||
// Buffer#write(string) | ||
if (offset === undefined) { | ||
encoding = 'utf8'; | ||
length = this.length; | ||
offset = 0; // Buffer#write(string, encoding) | ||
} else if (length === undefined && typeof offset === 'string') { | ||
encoding = offset; | ||
length = this.length; | ||
offset = 0; // Buffer#write(string, offset[, length][, encoding]) | ||
} else if (isFinite(offset)) { | ||
offset = offset >>> 0; | ||
if (isFinite(length)) { | ||
length = length >>> 0; | ||
if (encoding === undefined) encoding = 'utf8'; | ||
} else { | ||
encoding = length; | ||
length = undefined; | ||
} | ||
} else { | ||
throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported'); | ||
} | ||
var remaining = this.length - offset; | ||
if (length === undefined || length > remaining) length = remaining; | ||
if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) { | ||
throw new RangeError('Attempt to write outside buffer bounds'); | ||
} | ||
if (!encoding) encoding = 'utf8'; | ||
var loweredCase = false; | ||
for (;;) { | ||
switch (encoding) { | ||
case 'hex': | ||
return hexWrite(this, string, offset, length); | ||
case 'utf8': | ||
case 'utf-8': | ||
return utf8Write(this, string, offset, length); | ||
case 'ascii': | ||
return asciiWrite(this, string, offset, length); | ||
case 'latin1': | ||
case 'binary': | ||
return latin1Write(this, string, offset, length); | ||
case 'base64': | ||
// Warning: maxLength not taken into account in base64Write | ||
return base64Write(this, string, offset, length); | ||
case 'ucs2': | ||
case 'ucs-2': | ||
case 'utf16le': | ||
case 'utf-16le': | ||
return ucs2Write(this, string, offset, length); | ||
default: | ||
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding); | ||
encoding = ('' + encoding).toLowerCase(); | ||
loweredCase = true; | ||
} | ||
} | ||
}; | ||
Buffer.prototype.toJSON = function toJSON() { | ||
return { | ||
type: 'Buffer', | ||
data: Array.prototype.slice.call(this._arr || this, 0) | ||
}; | ||
}; | ||
function base64Slice(buf, start, end) { | ||
if (start === 0 && end === buf.length) { | ||
return base64.fromByteArray(buf); | ||
} else { | ||
return base64.fromByteArray(buf.slice(start, end)); | ||
} | ||
} | ||
function utf8Slice(buf, start, end) { | ||
end = Math.min(buf.length, end); | ||
var res = []; | ||
var i = start; | ||
while (i < end) { | ||
var firstByte = buf[i]; | ||
var codePoint = null; | ||
var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1; | ||
if (i + bytesPerSequence <= end) { | ||
var secondByte, thirdByte, fourthByte, tempCodePoint; | ||
switch (bytesPerSequence) { | ||
case 1: | ||
if (firstByte < 0x80) { | ||
codePoint = firstByte; | ||
} | ||
break; | ||
case 2: | ||
secondByte = buf[i + 1]; | ||
if ((secondByte & 0xC0) === 0x80) { | ||
tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F; | ||
if (tempCodePoint > 0x7F) { | ||
codePoint = tempCodePoint; | ||
} | ||
} | ||
break; | ||
case 3: | ||
secondByte = buf[i + 1]; | ||
thirdByte = buf[i + 2]; | ||
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { | ||
tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F; | ||
if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { | ||
codePoint = tempCodePoint; | ||
} | ||
} | ||
break; | ||
case 4: | ||
secondByte = buf[i + 1]; | ||
thirdByte = buf[i + 2]; | ||
fourthByte = buf[i + 3]; | ||
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { | ||
tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F; | ||
if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { | ||
codePoint = tempCodePoint; | ||
} | ||
} | ||
} | ||
} | ||
if (codePoint === null) { | ||
// we did not generate a valid codePoint so insert a | ||
// replacement char (U+FFFD) and advance only 1 byte | ||
codePoint = 0xFFFD; | ||
bytesPerSequence = 1; | ||
} else if (codePoint > 0xFFFF) { | ||
// encode to utf16 (surrogate pair dance) | ||
codePoint -= 0x10000; | ||
res.push(codePoint >>> 10 & 0x3FF | 0xD800); | ||
codePoint = 0xDC00 | codePoint & 0x3FF; | ||
} | ||
res.push(codePoint); | ||
i += bytesPerSequence; | ||
} | ||
return decodeCodePointsArray(res); | ||
} // Based on http://stackoverflow.com/a/22747272/680742, the browser with | ||
// the lowest limit is Chrome, with 0x10000 args. | ||
// We go 1 magnitude less, for safety | ||
var MAX_ARGUMENTS_LENGTH = 0x1000; | ||
function decodeCodePointsArray(codePoints) { | ||
var len = codePoints.length; | ||
if (len <= MAX_ARGUMENTS_LENGTH) { | ||
return String.fromCharCode.apply(String, codePoints); // avoid extra slice() | ||
} // Decode in chunks to avoid "call stack size exceeded". | ||
var res = ''; | ||
var i = 0; | ||
while (i < len) { | ||
res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)); | ||
} | ||
return res; | ||
} | ||
function asciiSlice(buf, start, end) { | ||
var ret = ''; | ||
end = Math.min(buf.length, end); | ||
for (var i = start; i < end; ++i) { | ||
ret += String.fromCharCode(buf[i] & 0x7F); | ||
} | ||
return ret; | ||
} | ||
function latin1Slice(buf, start, end) { | ||
var ret = ''; | ||
end = Math.min(buf.length, end); | ||
for (var i = start; i < end; ++i) { | ||
ret += String.fromCharCode(buf[i]); | ||
} | ||
return ret; | ||
} | ||
function hexSlice(buf, start, end) { | ||
var len = buf.length; | ||
if (!start || start < 0) start = 0; | ||
if (!end || end < 0 || end > len) end = len; | ||
var out = ''; | ||
for (var i = start; i < end; ++i) { | ||
out += toHex(buf[i]); | ||
} | ||
return out; | ||
} | ||
function utf16leSlice(buf, start, end) { | ||
var bytes = buf.slice(start, end); | ||
var res = ''; | ||
for (var i = 0; i < bytes.length; i += 2) { | ||
res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256); | ||
} | ||
return res; | ||
} | ||
Buffer.prototype.slice = function slice(start, end) { | ||
var len = this.length; | ||
start = ~~start; | ||
end = end === undefined ? len : ~~end; | ||
if (start < 0) { | ||
start += len; | ||
if (start < 0) start = 0; | ||
} else if (start > len) { | ||
start = len; | ||
} | ||
if (end < 0) { | ||
end += len; | ||
if (end < 0) end = 0; | ||
} else if (end > len) { | ||
end = len; | ||
} | ||
if (end < start) end = start; | ||
var newBuf = this.subarray(start, end); // Return an augmented `Uint8Array` instance | ||
newBuf.__proto__ = Buffer.prototype; | ||
return newBuf; | ||
}; | ||
/* | ||
* Need to make sure that buffer isn't trying to write out of bounds. | ||
*/ | ||
function checkOffset(offset, ext, length) { | ||
if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint'); | ||
if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length'); | ||
} | ||
Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) { | ||
offset = offset >>> 0; | ||
byteLength = byteLength >>> 0; | ||
if (!noAssert) checkOffset(offset, byteLength, this.length); | ||
var val = this[offset]; | ||
var mul = 1; | ||
var i = 0; | ||
while (++i < byteLength && (mul *= 0x100)) { | ||
val += this[offset + i] * mul; | ||
} | ||
return val; | ||
}; | ||
Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) { | ||
offset = offset >>> 0; | ||
byteLength = byteLength >>> 0; | ||
if (!noAssert) { | ||
checkOffset(offset, byteLength, this.length); | ||
} | ||
var val = this[offset + --byteLength]; | ||
var mul = 1; | ||
while (byteLength > 0 && (mul *= 0x100)) { | ||
val += this[offset + --byteLength] * mul; | ||
} | ||
return val; | ||
}; | ||
Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) { | ||
offset = offset >>> 0; | ||
if (!noAssert) checkOffset(offset, 1, this.length); | ||
return this[offset]; | ||
}; | ||
Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) { | ||
offset = offset >>> 0; | ||
if (!noAssert) checkOffset(offset, 2, this.length); | ||
return this[offset] | this[offset + 1] << 8; | ||
}; | ||
Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) { | ||
offset = offset >>> 0; | ||
if (!noAssert) checkOffset(offset, 2, this.length); | ||
return this[offset] << 8 | this[offset + 1]; | ||
}; | ||
Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) { | ||
offset = offset >>> 0; | ||
if (!noAssert) checkOffset(offset, 4, this.length); | ||
return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000; | ||
}; | ||
Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) { | ||
offset = offset >>> 0; | ||
if (!noAssert) checkOffset(offset, 4, this.length); | ||
return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]); | ||
}; | ||
Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) { | ||
offset = offset >>> 0; | ||
byteLength = byteLength >>> 0; | ||
if (!noAssert) checkOffset(offset, byteLength, this.length); | ||
var val = this[offset]; | ||
var mul = 1; | ||
var i = 0; | ||
while (++i < byteLength && (mul *= 0x100)) { | ||
val += this[offset + i] * mul; | ||
} | ||
mul *= 0x80; | ||
if (val >= mul) val -= Math.pow(2, 8 * byteLength); | ||
return val; | ||
}; | ||
Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) { | ||
offset = offset >>> 0; | ||
byteLength = byteLength >>> 0; | ||
if (!noAssert) checkOffset(offset, byteLength, this.length); | ||
var i = byteLength; | ||
var mul = 1; | ||
var val = this[offset + --i]; | ||
while (i > 0 && (mul *= 0x100)) { | ||
val += this[offset + --i] * mul; | ||
} | ||
mul *= 0x80; | ||
if (val >= mul) val -= Math.pow(2, 8 * byteLength); | ||
return val; | ||
}; | ||
Buffer.prototype.readInt8 = function readInt8(offset, noAssert) { | ||
offset = offset >>> 0; | ||
if (!noAssert) checkOffset(offset, 1, this.length); | ||
if (!(this[offset] & 0x80)) return this[offset]; | ||
return (0xff - this[offset] + 1) * -1; | ||
}; | ||
Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) { | ||
offset = offset >>> 0; | ||
if (!noAssert) checkOffset(offset, 2, this.length); | ||
var val = this[offset] | this[offset + 1] << 8; | ||
return val & 0x8000 ? val | 0xFFFF0000 : val; | ||
}; | ||
Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) { | ||
offset = offset >>> 0; | ||
if (!noAssert) checkOffset(offset, 2, this.length); | ||
var val = this[offset + 1] | this[offset] << 8; | ||
return val & 0x8000 ? val | 0xFFFF0000 : val; | ||
}; | ||
Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) { | ||
offset = offset >>> 0; | ||
if (!noAssert) checkOffset(offset, 4, this.length); | ||
return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24; | ||
}; | ||
Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) { | ||
offset = offset >>> 0; | ||
if (!noAssert) checkOffset(offset, 4, this.length); | ||
return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]; | ||
}; | ||
Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) { | ||
offset = offset >>> 0; | ||
if (!noAssert) checkOffset(offset, 4, this.length); | ||
return ieee754.read(this, offset, true, 23, 4); | ||
}; | ||
Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) { | ||
offset = offset >>> 0; | ||
if (!noAssert) checkOffset(offset, 4, this.length); | ||
return ieee754.read(this, offset, false, 23, 4); | ||
}; | ||
Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) { | ||
offset = offset >>> 0; | ||
if (!noAssert) checkOffset(offset, 8, this.length); | ||
return ieee754.read(this, offset, true, 52, 8); | ||
}; | ||
Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) { | ||
offset = offset >>> 0; | ||
if (!noAssert) checkOffset(offset, 8, this.length); | ||
return ieee754.read(this, offset, false, 52, 8); | ||
}; | ||
function checkInt(buf, value, offset, ext, max, min) { | ||
if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance'); | ||
if (value > max || value < min) throw new RangeError('"value" argument is out of bounds'); | ||
if (offset + ext > buf.length) throw new RangeError('Index out of range'); | ||
} | ||
Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) { | ||
value = +value; | ||
offset = offset >>> 0; | ||
byteLength = byteLength >>> 0; | ||
if (!noAssert) { | ||
var maxBytes = Math.pow(2, 8 * byteLength) - 1; | ||
checkInt(this, value, offset, byteLength, maxBytes, 0); | ||
} | ||
var mul = 1; | ||
var i = 0; | ||
this[offset] = value & 0xFF; | ||
while (++i < byteLength && (mul *= 0x100)) { | ||
this[offset + i] = value / mul & 0xFF; | ||
} | ||
return offset + byteLength; | ||
}; | ||
Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) { | ||
value = +value; | ||
offset = offset >>> 0; | ||
byteLength = byteLength >>> 0; | ||
if (!noAssert) { | ||
var maxBytes = Math.pow(2, 8 * byteLength) - 1; | ||
checkInt(this, value, offset, byteLength, maxBytes, 0); | ||
} | ||
var i = byteLength - 1; | ||
var mul = 1; | ||
this[offset + i] = value & 0xFF; | ||
while (--i >= 0 && (mul *= 0x100)) { | ||
this[offset + i] = value / mul & 0xFF; | ||
} | ||
return offset + byteLength; | ||
}; | ||
Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) { | ||
value = +value; | ||
offset = offset >>> 0; | ||
if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0); | ||
this[offset] = value & 0xff; | ||
return offset + 1; | ||
}; | ||
Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) { | ||
value = +value; | ||
offset = offset >>> 0; | ||
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); | ||
this[offset] = value & 0xff; | ||
this[offset + 1] = value >>> 8; | ||
return offset + 2; | ||
}; | ||
Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) { | ||
value = +value; | ||
offset = offset >>> 0; | ||
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); | ||
this[offset] = value >>> 8; | ||
this[offset + 1] = value & 0xff; | ||
return offset + 2; | ||
}; | ||
Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) { | ||
value = +value; | ||
offset = offset >>> 0; | ||
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); | ||
this[offset + 3] = value >>> 24; | ||
this[offset + 2] = value >>> 16; | ||
this[offset + 1] = value >>> 8; | ||
this[offset] = value & 0xff; | ||
return offset + 4; | ||
}; | ||
Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) { | ||
value = +value; | ||
offset = offset >>> 0; | ||
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); | ||
this[offset] = value >>> 24; | ||
this[offset + 1] = value >>> 16; | ||
this[offset + 2] = value >>> 8; | ||
this[offset + 3] = value & 0xff; | ||
return offset + 4; | ||
}; | ||
Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) { | ||
value = +value; | ||
offset = offset >>> 0; | ||
if (!noAssert) { | ||
var limit = Math.pow(2, 8 * byteLength - 1); | ||
checkInt(this, value, offset, byteLength, limit - 1, -limit); | ||
} | ||
var i = 0; | ||
var mul = 1; | ||
var sub = 0; | ||
this[offset] = value & 0xFF; | ||
while (++i < byteLength && (mul *= 0x100)) { | ||
if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { | ||
sub = 1; | ||
} | ||
this[offset + i] = (value / mul >> 0) - sub & 0xFF; | ||
} | ||
return offset + byteLength; | ||
}; | ||
Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) { | ||
value = +value; | ||
offset = offset >>> 0; | ||
if (!noAssert) { | ||
var limit = Math.pow(2, 8 * byteLength - 1); | ||
checkInt(this, value, offset, byteLength, limit - 1, -limit); | ||
} | ||
var i = byteLength - 1; | ||
var mul = 1; | ||
var sub = 0; | ||
this[offset + i] = value & 0xFF; | ||
while (--i >= 0 && (mul *= 0x100)) { | ||
if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { | ||
sub = 1; | ||
} | ||
this[offset + i] = (value / mul >> 0) - sub & 0xFF; | ||
} | ||
return offset + byteLength; | ||
}; | ||
Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) { | ||
value = +value; | ||
offset = offset >>> 0; | ||
if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80); | ||
if (value < 0) value = 0xff + value + 1; | ||
this[offset] = value & 0xff; | ||
return offset + 1; | ||
}; | ||
Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) { | ||
value = +value; | ||
offset = offset >>> 0; | ||
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); | ||
this[offset] = value & 0xff; | ||
this[offset + 1] = value >>> 8; | ||
return offset + 2; | ||
}; | ||
Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) { | ||
value = +value; | ||
offset = offset >>> 0; | ||
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); | ||
this[offset] = value >>> 8; | ||
this[offset + 1] = value & 0xff; | ||
return offset + 2; | ||
}; | ||
Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) { | ||
value = +value; | ||
offset = offset >>> 0; | ||
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); | ||
this[offset] = value & 0xff; | ||
this[offset + 1] = value >>> 8; | ||
this[offset + 2] = value >>> 16; | ||
this[offset + 3] = value >>> 24; | ||
return offset + 4; | ||
}; | ||
Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) { | ||
value = +value; | ||
offset = offset >>> 0; | ||
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); | ||
if (value < 0) value = 0xffffffff + value + 1; | ||
this[offset] = value >>> 24; | ||
this[offset + 1] = value >>> 16; | ||
this[offset + 2] = value >>> 8; | ||
this[offset + 3] = value & 0xff; | ||
return offset + 4; | ||
}; | ||
function checkIEEE754(buf, value, offset, ext, max, min) { | ||
if (offset + ext > buf.length) throw new RangeError('Index out of range'); | ||
if (offset < 0) throw new RangeError('Index out of range'); | ||
} | ||
function writeFloat(buf, value, offset, littleEndian, noAssert) { | ||
value = +value; | ||
offset = offset >>> 0; | ||
if (!noAssert) { | ||
checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38); | ||
} | ||
ieee754.write(buf, value, offset, littleEndian, 23, 4); | ||
return offset + 4; | ||
} | ||
Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) { | ||
return writeFloat(this, value, offset, true, noAssert); | ||
}; | ||
Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) { | ||
return writeFloat(this, value, offset, false, noAssert); | ||
}; | ||
function writeDouble(buf, value, offset, littleEndian, noAssert) { | ||
value = +value; | ||
offset = offset >>> 0; | ||
if (!noAssert) { | ||
checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308); | ||
} | ||
ieee754.write(buf, value, offset, littleEndian, 52, 8); | ||
return offset + 8; | ||
} | ||
Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) { | ||
return writeDouble(this, value, offset, true, noAssert); | ||
}; | ||
Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) { | ||
return writeDouble(this, value, offset, false, noAssert); | ||
}; // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) | ||
Buffer.prototype.copy = function copy(target, targetStart, start, end) { | ||
if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer'); | ||
if (!start) start = 0; | ||
if (!end && end !== 0) end = this.length; | ||
if (targetStart >= target.length) targetStart = target.length; | ||
if (!targetStart) targetStart = 0; | ||
if (end > 0 && end < start) end = start; // Copy 0 bytes; we're done | ||
if (end === start) return 0; | ||
if (target.length === 0 || this.length === 0) return 0; // Fatal error conditions | ||
if (targetStart < 0) { | ||
throw new RangeError('targetStart out of bounds'); | ||
} | ||
if (start < 0 || start >= this.length) throw new RangeError('Index out of range'); | ||
if (end < 0) throw new RangeError('sourceEnd out of bounds'); // Are we oob? | ||
if (end > this.length) end = this.length; | ||
if (target.length - targetStart < end - start) { | ||
end = target.length - targetStart + start; | ||
} | ||
var len = end - start; | ||
if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { | ||
// Use built-in when available, missing from IE11 | ||
this.copyWithin(targetStart, start, end); | ||
} else if (this === target && start < targetStart && targetStart < end) { | ||
// descending copy from end | ||
for (var i = len - 1; i >= 0; --i) { | ||
target[i + targetStart] = this[i + start]; | ||
} | ||
} else { | ||
Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart); | ||
} | ||
return len; | ||
}; // Usage: | ||
// buffer.fill(number[, offset[, end]]) | ||
// buffer.fill(buffer[, offset[, end]]) | ||
// buffer.fill(string[, offset[, end]][, encoding]) | ||
Buffer.prototype.fill = function fill(val, start, end, encoding) { | ||
// Handle string cases: | ||
if (typeof val === 'string') { | ||
if (typeof start === 'string') { | ||
encoding = start; | ||
start = 0; | ||
end = this.length; | ||
} else if (typeof end === 'string') { | ||
encoding = end; | ||
end = this.length; | ||
} | ||
if (encoding !== undefined && typeof encoding !== 'string') { | ||
throw new TypeError('encoding must be a string'); | ||
} | ||
if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { | ||
throw new TypeError('Unknown encoding: ' + encoding); | ||
} | ||
if (val.length === 1) { | ||
var code = val.charCodeAt(0); | ||
if (encoding === 'utf8' && code < 128 || encoding === 'latin1') { | ||
// Fast path: If `val` fits into a single byte, use that numeric value. | ||
val = code; | ||
} | ||
} | ||
} else if (typeof val === 'number') { | ||
val = val & 255; | ||
} // Invalid ranges are not set to a default, so can range check early. | ||
if (start < 0 || this.length < start || this.length < end) { | ||
throw new RangeError('Out of range index'); | ||
} | ||
if (end <= start) { | ||
return this; | ||
} | ||
start = start >>> 0; | ||
end = end === undefined ? this.length : end >>> 0; | ||
if (!val) val = 0; | ||
var i; | ||
if (typeof val === 'number') { | ||
for (i = start; i < end; ++i) { | ||
this[i] = val; | ||
} | ||
} else { | ||
var bytes = Buffer.isBuffer(val) ? val : Buffer.from(val, encoding); | ||
var len = bytes.length; | ||
if (len === 0) { | ||
throw new TypeError('The value "' + val + '" is invalid for argument "value"'); | ||
} | ||
for (i = 0; i < end - start; ++i) { | ||
this[i + start] = bytes[i % len]; | ||
} | ||
} | ||
return this; | ||
}; // HELPER FUNCTIONS | ||
// ================ | ||
var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g; | ||
function base64clean(str) { | ||
// Node takes equal signs as end of the Base64 encoding | ||
str = str.split('=')[0]; // Node strips out invalid characters like \n and \t from the string, base64-js does not | ||
str = str.trim().replace(INVALID_BASE64_RE, ''); // Node converts strings with length < 2 to '' | ||
if (str.length < 2) return ''; // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not | ||
while (str.length % 4 !== 0) { | ||
str = str + '='; | ||
} | ||
return str; | ||
} | ||
function toHex(n) { | ||
if (n < 16) return '0' + n.toString(16); | ||
return n.toString(16); | ||
} | ||
function utf8ToBytes(string, units) { | ||
units = units || Infinity; | ||
var codePoint; | ||
var length = string.length; | ||
var leadSurrogate = null; | ||
var bytes = []; | ||
for (var i = 0; i < length; ++i) { | ||
codePoint = string.charCodeAt(i); // is surrogate component | ||
if (codePoint > 0xD7FF && codePoint < 0xE000) { | ||
// last char was a lead | ||
if (!leadSurrogate) { | ||
// no lead yet | ||
if (codePoint > 0xDBFF) { | ||
// unexpected trail | ||
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); | ||
continue; | ||
} else if (i + 1 === length) { | ||
// unpaired lead | ||
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); | ||
continue; | ||
} // valid lead | ||
leadSurrogate = codePoint; | ||
continue; | ||
} // 2 leads in a row | ||
if (codePoint < 0xDC00) { | ||
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); | ||
leadSurrogate = codePoint; | ||
continue; | ||
} // valid surrogate pair | ||
codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000; | ||
} else if (leadSurrogate) { | ||
// valid bmp char, but last char was a lead | ||
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); | ||
} | ||
leadSurrogate = null; // encode utf8 | ||
if (codePoint < 0x80) { | ||
if ((units -= 1) < 0) break; | ||
bytes.push(codePoint); | ||
} else if (codePoint < 0x800) { | ||
if ((units -= 2) < 0) break; | ||
bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80); | ||
} else if (codePoint < 0x10000) { | ||
if ((units -= 3) < 0) break; | ||
bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80); | ||
} else if (codePoint < 0x110000) { | ||
if ((units -= 4) < 0) break; | ||
bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80); | ||
} else { | ||
throw new Error('Invalid code point'); | ||
} | ||
} | ||
return bytes; | ||
} | ||
function asciiToBytes(str) { | ||
var byteArray = []; | ||
for (var i = 0; i < str.length; ++i) { | ||
// Node's code seems to be doing this and not & 0x7F.. | ||
byteArray.push(str.charCodeAt(i) & 0xFF); | ||
} | ||
return byteArray; | ||
} | ||
function utf16leToBytes(str, units) { | ||
var c, hi, lo; | ||
var byteArray = []; | ||
for (var i = 0; i < str.length; ++i) { | ||
if ((units -= 2) < 0) break; | ||
c = str.charCodeAt(i); | ||
hi = c >> 8; | ||
lo = c % 256; | ||
byteArray.push(lo); | ||
byteArray.push(hi); | ||
} | ||
return byteArray; | ||
} | ||
function base64ToBytes(str) { | ||
return base64.toByteArray(base64clean(str)); | ||
} | ||
function blitBuffer(src, dst, offset, length) { | ||
for (var i = 0; i < length; ++i) { | ||
if (i + offset >= dst.length || i >= src.length) break; | ||
dst[i + offset] = src[i]; | ||
} | ||
return i; | ||
} // ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass | ||
// the `instanceof` check but they should be treated as of that type. | ||
// See: https://github.com/feross/buffer/issues/166 | ||
function isInstance(obj, type) { | ||
return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name; | ||
} | ||
function numberIsNaN(obj) { | ||
// For IE11 support | ||
return obj !== obj; // eslint-disable-line no-self-compare | ||
} | ||
return exports$2; | ||
} | ||
const exports$3 = dew$2(); | ||
const Buffer = exports$3.Buffer, INSPECT_MAX_BYTES = exports$3.INSPECT_MAX_BYTES, SlowBuffer = exports$3.SlowBuffer, kMaxLength = exports$3.kMaxLength; | ||
export default exports$3; | ||
export { Buffer, INSPECT_MAX_BYTES, SlowBuffer, kMaxLength }; | ||
for(var r={byteLength:function(r){var t=u(r),e=t[0],n=t[1];return 3*(e+n)/4-n},toByteArray:function(r){var t,o,a=u(r),h=a[0],c=a[1],d=new n(function(r,t,e){return 3*(t+e)/4-e}(0,h,c)),f=0,A=c>0?h-4:h;for(o=0;o<A;o+=4)t=e[r.charCodeAt(o)]<<18|e[r.charCodeAt(o+1)]<<12|e[r.charCodeAt(o+2)]<<6|e[r.charCodeAt(o+3)],d[f++]=t>>16&255,d[f++]=t>>8&255,d[f++]=255&t;2===c&&(t=e[r.charCodeAt(o)]<<2|e[r.charCodeAt(o+1)]>>4,d[f++]=255&t);1===c&&(t=e[r.charCodeAt(o)]<<10|e[r.charCodeAt(o+1)]<<4|e[r.charCodeAt(o+2)]>>2,d[f++]=t>>8&255,d[f++]=255&t);return d},fromByteArray:function(r){for(var e,n=r.length,o=n%3,a=[],h=0,u=n-o;h<u;h+=16383)a.push(c(r,h,h+16383>u?u:h+16383));1===o?(e=r[n-1],a.push(t[e>>2]+t[e<<4&63]+"==")):2===o&&(e=(r[n-2]<<8)+r[n-1],a.push(t[e>>10]+t[e>>4&63]+t[e<<2&63]+"="));return a.join("")}},t=[],e=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,h=o.length;a<h;++a)t[a]=o[a],e[o.charCodeAt(a)]=a;function u(r){var t=r.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");return -1===e&&(e=t),[e,e===t?0:4-e%4]}function c(r,e,n){for(var o,a,h=[],u=e;u<n;u+=3)o=(r[u]<<16&16711680)+(r[u+1]<<8&65280)+(255&r[u+2]),h.push(t[(a=o)>>18&63]+t[a>>12&63]+t[a>>6&63]+t[63&a]);return h.join("")}e["-".charCodeAt(0)]=62,e["_".charCodeAt(0)]=63;var a$1={read:function(a,t,o,r,h){var M,f,p=8*h-r-1,w=(1<<p)-1,e=w>>1,i=-7,N=o?h-1:0,n=o?-1:1,u=a[t+N];for(N+=n,M=u&(1<<-i)-1,u>>=-i,i+=p;i>0;M=256*M+a[t+N],N+=n,i-=8);for(f=M&(1<<-i)-1,M>>=-i,i+=r;i>0;f=256*f+a[t+N],N+=n,i-=8);if(0===M)M=1-e;else {if(M===w)return f?NaN:1/0*(u?-1:1);f+=Math.pow(2,r),M-=e;}return (u?-1:1)*f*Math.pow(2,M-r)},write:function(a,t,o,r,h,M){var f,p,w,e=8*M-h-1,i=(1<<e)-1,N=i>>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,u=r?0:M-1,l=r?1:-1,s=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(p=isNaN(t)?1:0,f=i):(f=Math.floor(Math.log(t)/Math.LN2),t*(w=Math.pow(2,-f))<1&&(f--,w*=2),(t+=f+N>=1?n/w:n*Math.pow(2,1-N))*w>=2&&(f++,w/=2),f+N>=i?(p=0,f=i):f+N>=1?(p=(t*w-1)*Math.pow(2,h),f+=N):(p=t*Math.pow(2,N-1)*Math.pow(2,h),f=0));h>=8;a[o+u]=255&p,u+=l,p/=256,h-=8);for(f=f<<h|p,e+=h;e>0;a[o+u]=255&f,u+=l,f/=256,e-=8);a[o+u-l]|=128*s;}};var e$1={},n$1=r,i=a$1,o$1="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e$1.Buffer=u$1,e$1.SlowBuffer=function(t){+t!=t&&(t=0);return u$1.alloc(+t)},e$1.INSPECT_MAX_BYTES=50;function f(t){if(t>2147483647)throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=new Uint8Array(t);return Object.setPrototypeOf(r,u$1.prototype),r}function u$1(t,r,e){if("number"==typeof t){if("string"==typeof r)throw new TypeError('The "string" argument must be of type string. Received type number');return a$2(t)}return s(t,r,e)}function s(t,r,e){if("string"==typeof t)return function(t,r){"string"==typeof r&&""!==r||(r="utf8");if(!u$1.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var e=0|y(t,r),n=f(e),i=n.write(t,r);i!==e&&(n=n.slice(0,i));return n}(t,r);if(ArrayBuffer.isView(t))return p(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(F(t,ArrayBuffer)||t&&F(t.buffer,ArrayBuffer))return c$1(t,r,e);if("undefined"!=typeof SharedArrayBuffer&&(F(t,SharedArrayBuffer)||t&&F(t.buffer,SharedArrayBuffer)))return c$1(t,r,e);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u$1.from(n,r,e);var i=function(t){if(u$1.isBuffer(t)){var r=0|l(t.length),e=f(r);return 0===e.length||t.copy(e,0,0,r),e}if(void 0!==t.length)return "number"!=typeof t.length||N(t.length)?f(0):p(t);if("Buffer"===t.type&&Array.isArray(t.data))return p(t.data)}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u$1.from(t[Symbol.toPrimitive]("string"),r,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function h$1(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function a$2(t){return h$1(t),f(t<0?0:0|l(t))}function p(t){for(var r=t.length<0?0:0|l(t.length),e=f(r),n=0;n<r;n+=1)e[n]=255&t[n];return e}function c$1(t,r,e){if(r<0||t.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<r+(e||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===r&&void 0===e?new Uint8Array(t):void 0===e?new Uint8Array(t,r):new Uint8Array(t,r,e),Object.setPrototypeOf(n,u$1.prototype),n}function l(t){if(t>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|t}function y(t,r){if(u$1.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||F(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var e=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===e)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return _(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return z(t).length;default:if(i)return n?-1:_(t).length;r=(""+r).toLowerCase(),i=!0;}}function g(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return "";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return "";if((e>>>=0)<=(r>>>=0))return "";for(t||(t="utf8");;)switch(t){case"hex":return O(this,r,e);case"utf8":case"utf-8":return I(this,r,e);case"ascii":return S(this,r,e);case"latin1":case"binary":return R(this,r,e);case"base64":return T(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0;}}function w(t,r,e){var n=t[r];t[r]=t[e],t[e]=n;}function d(t,r,e,n,i){if(0===t.length)return -1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),N(e=+e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return -1;e=t.length-1;}else if(e<0){if(!i)return -1;e=0;}if("string"==typeof r&&(r=u$1.from(r,n)),u$1.isBuffer(r))return 0===r.length?-1:v(t,r,e,n,i);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):v(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function v(t,r,e,n,i){var o,f=1,u=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return -1;f=2,u/=2,s/=2,e/=2;}function h(t,r){return 1===f?t[r]:t.readUInt16BE(r*f)}if(i){var a=-1;for(o=e;o<u;o++)if(h(t,o)===h(r,-1===a?0:o-a)){if(-1===a&&(a=o),o-a+1===s)return a*f}else -1!==a&&(o-=o-a),a=-1;}else for(e+s>u&&(e=u-s),o=e;o>=0;o--){for(var p=!0,c=0;c<s;c++)if(h(t,o+c)!==h(r,c)){p=!1;break}if(p)return o}return -1}function b(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n))>i&&(n=i):n=i;var o=r.length;n>o/2&&(n=o/2);for(var f=0;f<n;++f){var u=parseInt(r.substr(2*f,2),16);if(N(u))return f;t[e+f]=u;}return f}function m(t,r,e,n){return D(_(r,t.length-e),t,e,n)}function E(t,r,e,n){return D(function(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}(r),t,e,n)}function B(t,r,e,n){return E(t,r,e,n)}function A(t,r,e,n){return D(z(r),t,e,n)}function U(t,r,e,n){return D(function(t,r){for(var e,n,i,o=[],f=0;f<t.length&&!((r-=2)<0);++f)e=t.charCodeAt(f),n=e>>8,i=e%256,o.push(i),o.push(n);return o}(r,t.length-e),t,e,n)}function T(t,r,e){return 0===r&&e===t.length?n$1.fromByteArray(t):n$1.fromByteArray(t.slice(r,e))}function I(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o,f,u,s,h=t[i],a=null,p=h>239?4:h>223?3:h>191?2:1;if(i+p<=e)switch(p){case 1:h<128&&(a=h);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&h)<<6|63&o)>127&&(a=s);break;case 3:o=t[i+1],f=t[i+2],128==(192&o)&&128==(192&f)&&(s=(15&h)<<12|(63&o)<<6|63&f)>2047&&(s<55296||s>57343)&&(a=s);break;case 4:o=t[i+1],f=t[i+2],u=t[i+3],128==(192&o)&&128==(192&f)&&128==(192&u)&&(s=(15&h)<<18|(63&o)<<12|(63&f)<<6|63&u)>65535&&s<1114112&&(a=s);}null===a?(a=65533,p=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=p;}return function(t){var r=t.length;if(r<=4096)return String.fromCharCode.apply(String,t);var e="",n=0;for(;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return e}(n)}e$1.kMaxLength=2147483647,u$1.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),r={foo:function(){return 42}};return Object.setPrototypeOf(r,Uint8Array.prototype),Object.setPrototypeOf(t,r),42===t.foo()}catch(t){return !1}}(),u$1.TYPED_ARRAY_SUPPORT||"undefined"==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."),Object.defineProperty(u$1.prototype,"parent",{enumerable:!0,get:function(){if(u$1.isBuffer(this))return this.buffer}}),Object.defineProperty(u$1.prototype,"offset",{enumerable:!0,get:function(){if(u$1.isBuffer(this))return this.byteOffset}}),u$1.poolSize=8192,u$1.from=function(t,r,e){return s(t,r,e)},Object.setPrototypeOf(u$1.prototype,Uint8Array.prototype),Object.setPrototypeOf(u$1,Uint8Array),u$1.alloc=function(t,r,e){return function(t,r,e){return h$1(t),t<=0?f(t):void 0!==r?"string"==typeof e?f(t).fill(r,e):f(t).fill(r):f(t)}(t,r,e)},u$1.allocUnsafe=function(t){return a$2(t)},u$1.allocUnsafeSlow=function(t){return a$2(t)},u$1.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u$1.prototype},u$1.compare=function(t,r){if(F(t,Uint8Array)&&(t=u$1.from(t,t.offset,t.byteLength)),F(r,Uint8Array)&&(r=u$1.from(r,r.offset,r.byteLength)),!u$1.isBuffer(t)||!u$1.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i<o;++i)if(t[i]!==r[i]){e=t[i],n=r[i];break}return e<n?-1:n<e?1:0},u$1.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return !0;default:return !1}},u$1.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u$1.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var n=u$1.allocUnsafe(r),i=0;for(e=0;e<t.length;++e){var o=t[e];if(F(o,Uint8Array)&&(o=u$1.from(o)),!u$1.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length;}return n},u$1.byteLength=y,u$1.prototype._isBuffer=!0,u$1.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)w(this,r,r+1);return this},u$1.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)w(this,r,r+3),w(this,r+1,r+2);return this},u$1.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)w(this,r,r+7),w(this,r+1,r+6),w(this,r+2,r+5),w(this,r+3,r+4);return this},u$1.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?I(this,0,t):g.apply(this,arguments)},u$1.prototype.toLocaleString=u$1.prototype.toString,u$1.prototype.equals=function(t){if(!u$1.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u$1.compare(this,t)},u$1.prototype.inspect=function(){var t="",r=e$1.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o$1&&(u$1.prototype[o$1]=u$1.prototype.inspect),u$1.prototype.compare=function(t,r,e,n,i){if(F(t,Uint8Array)&&(t=u$1.from(t,t.offset,t.byteLength)),!u$1.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return -1;if(r>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),f=(e>>>=0)-(r>>>=0),s=Math.min(o,f),h=this.slice(n,i),a=t.slice(r,e),p=0;p<s;++p)if(h[p]!==a[p]){o=h[p],f=a[p];break}return o<f?-1:f<o?1:0},u$1.prototype.includes=function(t,r,e){return -1!==this.indexOf(t,r,e)},u$1.prototype.indexOf=function(t,r,e){return d(this,t,r,e,!0)},u$1.prototype.lastIndexOf=function(t,r,e){return d(this,t,r,e,!1)},u$1.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else {if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r>>>=0,isFinite(e)?(e>>>=0,void 0===n&&(n="utf8")):(n=e,e=void 0);}var i=this.length-r;if((void 0===e||e>i)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return b(this,t,r,e);case"utf8":case"utf-8":return m(this,t,r,e);case"ascii":return E(this,t,r,e);case"latin1":case"binary":return B(this,t,r,e);case"base64":return A(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0;}},u$1.prototype.toJSON=function(){return {type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(127&t[i]);return n}function R(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function O(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=r;o<e;++o)i+=Y[t[o]];return i}function L(t,r,e){for(var n=t.slice(r,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function x(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function C(t,r,e,n,i,o){if(!u$1.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function P(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function k(t,r,e,n,o){return r=+r,e>>>=0,o||P(t,0,e,4),i.write(t,r,e,n,23,4),e+4}function M(t,r,e,n,o){return r=+r,e>>>=0,o||P(t,0,e,8),i.write(t,r,e,n,52,8),e+8}u$1.prototype.slice=function(t,r){var e=this.length;(t=~~t)<0?(t+=e)<0&&(t=0):t>e&&(t=e),(r=void 0===r?e:~~r)<0?(r+=e)<0&&(r=0):r>e&&(r=e),r<t&&(r=t);var n=this.subarray(t,r);return Object.setPrototypeOf(n,u$1.prototype),n},u$1.prototype.readUIntLE=function(t,r,e){t>>>=0,r>>>=0,e||x(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n},u$1.prototype.readUIntBE=function(t,r,e){t>>>=0,r>>>=0,e||x(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},u$1.prototype.readUInt8=function(t,r){return t>>>=0,r||x(t,1,this.length),this[t]},u$1.prototype.readUInt16LE=function(t,r){return t>>>=0,r||x(t,2,this.length),this[t]|this[t+1]<<8},u$1.prototype.readUInt16BE=function(t,r){return t>>>=0,r||x(t,2,this.length),this[t]<<8|this[t+1]},u$1.prototype.readUInt32LE=function(t,r){return t>>>=0,r||x(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u$1.prototype.readUInt32BE=function(t,r){return t>>>=0,r||x(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u$1.prototype.readIntLE=function(t,r,e){t>>>=0,r>>>=0,e||x(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*r)),n},u$1.prototype.readIntBE=function(t,r,e){t>>>=0,r>>>=0,e||x(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},u$1.prototype.readInt8=function(t,r){return t>>>=0,r||x(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u$1.prototype.readInt16LE=function(t,r){t>>>=0,r||x(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},u$1.prototype.readInt16BE=function(t,r){t>>>=0,r||x(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},u$1.prototype.readInt32LE=function(t,r){return t>>>=0,r||x(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u$1.prototype.readInt32BE=function(t,r){return t>>>=0,r||x(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u$1.prototype.readFloatLE=function(t,r){return t>>>=0,r||x(t,4,this.length),i.read(this,t,!0,23,4)},u$1.prototype.readFloatBE=function(t,r){return t>>>=0,r||x(t,4,this.length),i.read(this,t,!1,23,4)},u$1.prototype.readDoubleLE=function(t,r){return t>>>=0,r||x(t,8,this.length),i.read(this,t,!0,52,8)},u$1.prototype.readDoubleBE=function(t,r){return t>>>=0,r||x(t,8,this.length),i.read(this,t,!1,52,8)},u$1.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r>>>=0,e>>>=0,n)||C(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o<e&&(i*=256);)this[r+o]=t/i&255;return r+e},u$1.prototype.writeUIntBE=function(t,r,e,n){(t=+t,r>>>=0,e>>>=0,n)||C(this,t,r,e,Math.pow(2,8*e)-1,0);var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+e},u$1.prototype.writeUInt8=function(t,r,e){return t=+t,r>>>=0,e||C(this,t,r,1,255,0),this[r]=255&t,r+1},u$1.prototype.writeUInt16LE=function(t,r,e){return t=+t,r>>>=0,e||C(this,t,r,2,65535,0),this[r]=255&t,this[r+1]=t>>>8,r+2},u$1.prototype.writeUInt16BE=function(t,r,e){return t=+t,r>>>=0,e||C(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=255&t,r+2},u$1.prototype.writeUInt32LE=function(t,r,e){return t=+t,r>>>=0,e||C(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t,r+4},u$1.prototype.writeUInt32BE=function(t,r,e){return t=+t,r>>>=0,e||C(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t,r+4},u$1.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r>>>=0,!n){var i=Math.pow(2,8*e-1);C(this,t,r,e,i-1,-i);}var o=0,f=1,u=0;for(this[r]=255&t;++o<e&&(f*=256);)t<0&&0===u&&0!==this[r+o-1]&&(u=1),this[r+o]=(t/f>>0)-u&255;return r+e},u$1.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r>>>=0,!n){var i=Math.pow(2,8*e-1);C(this,t,r,e,i-1,-i);}var o=e-1,f=1,u=0;for(this[r+o]=255&t;--o>=0&&(f*=256);)t<0&&0===u&&0!==this[r+o+1]&&(u=1),this[r+o]=(t/f>>0)-u&255;return r+e},u$1.prototype.writeInt8=function(t,r,e){return t=+t,r>>>=0,e||C(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=255&t,r+1},u$1.prototype.writeInt16LE=function(t,r,e){return t=+t,r>>>=0,e||C(this,t,r,2,32767,-32768),this[r]=255&t,this[r+1]=t>>>8,r+2},u$1.prototype.writeInt16BE=function(t,r,e){return t=+t,r>>>=0,e||C(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=255&t,r+2},u$1.prototype.writeInt32LE=function(t,r,e){return t=+t,r>>>=0,e||C(this,t,r,4,2147483647,-2147483648),this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4},u$1.prototype.writeInt32BE=function(t,r,e){return t=+t,r>>>=0,e||C(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t,r+4},u$1.prototype.writeFloatLE=function(t,r,e){return k(this,t,r,!0,e)},u$1.prototype.writeFloatBE=function(t,r,e){return k(this,t,r,!1,e)},u$1.prototype.writeDoubleLE=function(t,r,e){return M(this,t,r,!0,e)},u$1.prototype.writeDoubleBE=function(t,r,e){return M(this,t,r,!1,e)},u$1.prototype.copy=function(t,r,e,n){if(!u$1.isBuffer(t))throw new TypeError("argument should be a Buffer");if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var i=n-e;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(r,e,n);else if(this===t&&e<r&&r<n)for(var o=i-1;o>=0;--o)t[o+r]=this[o+e];else Uint8Array.prototype.set.call(t,this.subarray(e,n),r);return i},u$1.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u$1.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i);}}else "number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var o;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o<e;++o)this[o]=t;else {var f=u$1.isBuffer(t)?t:u$1.from(t,n),s=f.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<e-r;++o)this[o+r]=f[o%s];}return this};var j=/[^+/0-9A-Za-z-_]/g;function _(t,r){var e;r=r||1/0;for(var n=t.length,i=null,o=[],f=0;f<n;++f){if((e=t.charCodeAt(f))>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(f+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320);}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e);}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128);}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128);}else {if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128);}}return o}function z(t){return n$1.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(j,"")).length<2)return "";for(;t.length%4!=0;)t+="=";return t}(t))}function D(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function F(t,r){return t instanceof r||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===r.name}function N(t){return t!=t}var Y=function(){for(var t=new Array(256),r=0;r<16;++r)for(var e=16*r,n=0;n<16;++n)t[e+n]="0123456789abcdef"[r]+"0123456789abcdef"[n];return t}();var Buffer=e$1.Buffer;var INSPECT_MAX_BYTES=e$1.INSPECT_MAX_BYTES;var kMaxLength=e$1.kMaxLength;export default e$1;export{Buffer,INSPECT_MAX_BYTES,kMaxLength}; |
@@ -1,114 +0,1 @@ | ||
import { a as _util } from './util-c86b84df.js'; | ||
import './process.js'; | ||
import _assert from './assert.js'; | ||
var exports = {}, | ||
_dewExec = false; | ||
function dew() { | ||
if (_dewExec) return exports; | ||
_dewExec = true; | ||
exports = now; | ||
function now() { | ||
return new Date().getTime(); | ||
} | ||
return exports; | ||
} | ||
var exports$1 = {}, | ||
_dewExec$1 = false; | ||
var _global = typeof self !== "undefined" ? self : global; | ||
function dew$1() { | ||
if (_dewExec$1) return exports$1; | ||
_dewExec$1 = true; | ||
/*global window, global*/ | ||
var util = _util; | ||
var assert = _assert; | ||
var now = dew(); | ||
var slice = Array.prototype.slice; | ||
var console; | ||
var times = {}; | ||
if (typeof _global !== "undefined" && _global.console) { | ||
console = _global.console; | ||
} else if (typeof window !== "undefined" && window.console) { | ||
console = window.console; | ||
} else { | ||
console = {}; | ||
} | ||
var functions = [[log, "log"], [info, "info"], [warn, "warn"], [error, "error"], [time, "time"], [timeEnd, "timeEnd"], [trace, "trace"], [dir, "dir"], [consoleAssert, "assert"]]; | ||
for (var i = 0; i < functions.length; i++) { | ||
var tuple = functions[i]; | ||
var f = tuple[0]; | ||
var name = tuple[1]; | ||
if (!console[name]) { | ||
console[name] = f; | ||
} | ||
} | ||
exports$1 = console; | ||
function log() {} | ||
function info() { | ||
console.log.apply(console, arguments); | ||
} | ||
function warn() { | ||
console.log.apply(console, arguments); | ||
} | ||
function error() { | ||
console.warn.apply(console, arguments); | ||
} | ||
function time(label) { | ||
times[label] = now(); | ||
} | ||
function timeEnd(label) { | ||
var time = times[label]; | ||
if (!time) { | ||
throw new Error("No such label: " + label); | ||
} | ||
var duration = now() - time; | ||
console.log(label + ": " + duration + "ms"); | ||
} | ||
function trace() { | ||
var err = new Error(); | ||
err.name = "Trace"; | ||
err.message = util.format.apply(null, arguments); | ||
console.error(err.stack); | ||
} | ||
function dir(object) { | ||
console.log(util.inspect(object) + "\n"); | ||
} | ||
function consoleAssert(expression) { | ||
if (!expression) { | ||
var arr = slice.call(arguments, 1); | ||
assert.ok(false, util.format.apply(null, arr)); | ||
} | ||
} | ||
return exports$1; | ||
} | ||
const exports$2 = dew$1(); | ||
const assert = exports$2.assert, clear = exports$2.clear, context = exports$2.context, count = exports$2.count, countReset = exports$2.countReset, debug = exports$2.debug, dir = exports$2.dir, dirxml = exports$2.dirxml, error = exports$2.error, group = exports$2.group, groupCollapsed = exports$2.groupCollapsed, groupEnd = exports$2.groupEnd, info = exports$2.info, log = exports$2.log, memory = exports$2.memory, profile = exports$2.profile, profileEnd = exports$2.profileEnd, table = exports$2.table, time = exports$2.time, timeEnd = exports$2.timeEnd, timeStamp = exports$2.timeStamp, trace = exports$2.trace, warn = exports$2.warn; | ||
export default exports$2; | ||
export { assert, clear, context, count, countReset, debug, dir, dirxml, error, group, groupCollapsed, groupEnd, info, log, memory, profile, profileEnd, table, time, timeEnd, timeStamp, trace, warn }; | ||
import'./chunk-dac557ba.js';import'./chunk-0c2d1322.js';import i$1 from'./assert.js';import a$1 from'./util.js';var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:global,r=a$1,l=i$1;function t(){return (new Date).getTime()}var a,i=Array.prototype.slice,f={};a=void 0!==e&&e.console?e.console:"undefined"!=typeof window&&window.console?window.console:{};for(var c=[[function(){},"log"],[function(){a.log.apply(a,arguments);},"info"],[function(){a.log.apply(a,arguments);},"warn"],[function(){a.warn.apply(a,arguments);},"error"],[function(o){f[o]=t();},"time"],[function(o){var n=f[o];if(!n)throw new Error("No such label: "+o);delete f[o];var e=t()-n;a.log(o+": "+e+"ms");},"timeEnd"],[function(){var o=new Error;o.name="Trace",o.message=r.format.apply(null,arguments),a.error(o.stack);},"trace"],[function(o){a.log(r.inspect(o)+"\n");},"dir"],[function(o){if(!o){var n=i.call(arguments,1);l.ok(!1,r.format.apply(null,n));}},"assert"]],p=0;p<c.length;p++){var s=c[p],u=s[0],d=s[1];a[d]||(a[d]=u);}var m=a;var assert=m.assert;var clear=m.clear;var context=m.context;var count=m.count;var countReset=m.countReset;var debug=m.debug;var dir=m.dir;var dirxml=m.dirxml;var error=m.error;var group=m.group;var groupCollapsed=m.groupCollapsed;var groupEnd=m.groupEnd;var info=m.info;var log=m.log;var memory=m.memory;var profile=m.profile;var profileEnd=m.profileEnd;var table=m.table;var time=m.time;var timeEnd=m.timeEnd;var timeStamp=m.timeStamp;var trace=m.trace;var warn=m.warn;export default m;export{assert,clear,context,count,countReset,debug,dir,dirxml,error,group,groupCollapsed,groupEnd,info,log,memory,profile,profileEnd,table,time,timeEnd,timeStamp,trace,warn}; |
@@ -1,10 +0,1 @@ | ||
function dew () { | ||
return exports; | ||
} | ||
var exports = {"O_RDONLY":0,"O_WRONLY":1,"O_RDWR":2,"S_IFMT":61440,"S_IFREG":32768,"S_IFDIR":16384,"S_IFCHR":8192,"S_IFBLK":24576,"S_IFIFO":4096,"S_IFLNK":40960,"S_IFSOCK":49152,"O_CREAT":512,"O_EXCL":2048,"O_NOCTTY":131072,"O_TRUNC":1024,"O_APPEND":8,"O_DIRECTORY":1048576,"O_NOFOLLOW":256,"O_SYNC":128,"O_SYMLINK":2097152,"O_NONBLOCK":4,"S_IRWXU":448,"S_IRUSR":256,"S_IWUSR":128,"S_IXUSR":64,"S_IRWXG":56,"S_IRGRP":32,"S_IWGRP":16,"S_IXGRP":8,"S_IRWXO":7,"S_IROTH":4,"S_IWOTH":2,"S_IXOTH":1,"E2BIG":7,"EACCES":13,"EADDRINUSE":48,"EADDRNOTAVAIL":49,"EAFNOSUPPORT":47,"EAGAIN":35,"EALREADY":37,"EBADF":9,"EBADMSG":94,"EBUSY":16,"ECANCELED":89,"ECHILD":10,"ECONNABORTED":53,"ECONNREFUSED":61,"ECONNRESET":54,"EDEADLK":11,"EDESTADDRREQ":39,"EDOM":33,"EDQUOT":69,"EEXIST":17,"EFAULT":14,"EFBIG":27,"EHOSTUNREACH":65,"EIDRM":90,"EILSEQ":92,"EINPROGRESS":36,"EINTR":4,"EINVAL":22,"EIO":5,"EISCONN":56,"EISDIR":21,"ELOOP":62,"EMFILE":24,"EMLINK":31,"EMSGSIZE":40,"EMULTIHOP":95,"ENAMETOOLONG":63,"ENETDOWN":50,"ENETRESET":52,"ENETUNREACH":51,"ENFILE":23,"ENOBUFS":55,"ENODATA":96,"ENODEV":19,"ENOENT":2,"ENOEXEC":8,"ENOLCK":77,"ENOLINK":97,"ENOMEM":12,"ENOMSG":91,"ENOPROTOOPT":42,"ENOSPC":28,"ENOSR":98,"ENOSTR":99,"ENOSYS":78,"ENOTCONN":57,"ENOTDIR":20,"ENOTEMPTY":66,"ENOTSOCK":38,"ENOTSUP":45,"ENOTTY":25,"ENXIO":6,"EOPNOTSUPP":102,"EOVERFLOW":84,"EPERM":1,"EPIPE":32,"EPROTO":100,"EPROTONOSUPPORT":43,"EPROTOTYPE":41,"ERANGE":34,"EROFS":30,"ESPIPE":29,"ESRCH":3,"ESTALE":70,"ETIME":101,"ETIMEDOUT":60,"ETXTBSY":26,"EWOULDBLOCK":35,"EXDEV":18,"SIGHUP":1,"SIGINT":2,"SIGQUIT":3,"SIGILL":4,"SIGTRAP":5,"SIGABRT":6,"SIGIOT":6,"SIGBUS":10,"SIGFPE":8,"SIGKILL":9,"SIGUSR1":30,"SIGSEGV":11,"SIGUSR2":31,"SIGPIPE":13,"SIGALRM":14,"SIGTERM":15,"SIGCHLD":20,"SIGCONT":19,"SIGSTOP":17,"SIGTSTP":18,"SIGTTIN":21,"SIGTTOU":22,"SIGURG":16,"SIGXCPU":24,"SIGXFSZ":25,"SIGVTALRM":26,"SIGPROF":27,"SIGWINCH":28,"SIGIO":23,"SIGSYS":12,"SSL_OP_ALL":2147486719,"SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION":262144,"SSL_OP_CIPHER_SERVER_PREFERENCE":4194304,"SSL_OP_CISCO_ANYCONNECT":32768,"SSL_OP_COOKIE_EXCHANGE":8192,"SSL_OP_CRYPTOPRO_TLSEXT_BUG":2147483648,"SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS":2048,"SSL_OP_EPHEMERAL_RSA":0,"SSL_OP_LEGACY_SERVER_CONNECT":4,"SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER":32,"SSL_OP_MICROSOFT_SESS_ID_BUG":1,"SSL_OP_MSIE_SSLV2_RSA_PADDING":0,"SSL_OP_NETSCAPE_CA_DN_BUG":536870912,"SSL_OP_NETSCAPE_CHALLENGE_BUG":2,"SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG":1073741824,"SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG":8,"SSL_OP_NO_COMPRESSION":131072,"SSL_OP_NO_QUERY_MTU":4096,"SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION":65536,"SSL_OP_NO_SSLv2":16777216,"SSL_OP_NO_SSLv3":33554432,"SSL_OP_NO_TICKET":16384,"SSL_OP_NO_TLSv1":67108864,"SSL_OP_NO_TLSv1_1":268435456,"SSL_OP_NO_TLSv1_2":134217728,"SSL_OP_PKCS1_CHECK_1":0,"SSL_OP_PKCS1_CHECK_2":0,"SSL_OP_SINGLE_DH_USE":1048576,"SSL_OP_SINGLE_ECDH_USE":524288,"SSL_OP_SSLEAY_080_CLIENT_DH_BUG":128,"SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG":0,"SSL_OP_TLS_BLOCK_PADDING_BUG":512,"SSL_OP_TLS_D5_BUG":256,"SSL_OP_TLS_ROLLBACK_BUG":8388608,"ENGINE_METHOD_DSA":2,"ENGINE_METHOD_DH":4,"ENGINE_METHOD_RAND":8,"ENGINE_METHOD_ECDH":16,"ENGINE_METHOD_ECDSA":32,"ENGINE_METHOD_CIPHERS":64,"ENGINE_METHOD_DIGESTS":128,"ENGINE_METHOD_STORE":256,"ENGINE_METHOD_PKEY_METHS":512,"ENGINE_METHOD_PKEY_ASN1_METHS":1024,"ENGINE_METHOD_ALL":65535,"ENGINE_METHOD_NONE":0,"DH_CHECK_P_NOT_SAFE_PRIME":2,"DH_CHECK_P_NOT_PRIME":1,"DH_UNABLE_TO_CHECK_GENERATOR":4,"DH_NOT_SUITABLE_GENERATOR":8,"NPN_ENABLED":1,"RSA_PKCS1_PADDING":1,"RSA_SSLV23_PADDING":2,"RSA_NO_PADDING":3,"RSA_PKCS1_OAEP_PADDING":4,"RSA_X931_PADDING":5,"RSA_PKCS1_PSS_PADDING":6,"POINT_CONVERSION_COMPRESSED":2,"POINT_CONVERSION_UNCOMPRESSED":4,"POINT_CONVERSION_HYBRID":6,"F_OK":0,"R_OK":4,"W_OK":2,"X_OK":1,"UV_UDP_REUSEADDR":4}; | ||
const exports$1 = dew(); | ||
const DH_CHECK_P_NOT_PRIME = exports$1.DH_CHECK_P_NOT_PRIME, DH_CHECK_P_NOT_SAFE_PRIME = exports$1.DH_CHECK_P_NOT_SAFE_PRIME, DH_NOT_SUITABLE_GENERATOR = exports$1.DH_NOT_SUITABLE_GENERATOR, DH_UNABLE_TO_CHECK_GENERATOR = exports$1.DH_UNABLE_TO_CHECK_GENERATOR, E2BIG = exports$1.E2BIG, EACCES = exports$1.EACCES, EADDRINUSE = exports$1.EADDRINUSE, EADDRNOTAVAIL = exports$1.EADDRNOTAVAIL, EAFNOSUPPORT = exports$1.EAFNOSUPPORT, EAGAIN = exports$1.EAGAIN, EALREADY = exports$1.EALREADY, EBADF = exports$1.EBADF, EBADMSG = exports$1.EBADMSG, EBUSY = exports$1.EBUSY, ECANCELED = exports$1.ECANCELED, ECHILD = exports$1.ECHILD, ECONNABORTED = exports$1.ECONNABORTED, ECONNREFUSED = exports$1.ECONNREFUSED, ECONNRESET = exports$1.ECONNRESET, EDEADLK = exports$1.EDEADLK, EDESTADDRREQ = exports$1.EDESTADDRREQ, EDOM = exports$1.EDOM, EDQUOT = exports$1.EDQUOT, EEXIST = exports$1.EEXIST, EFAULT = exports$1.EFAULT, EFBIG = exports$1.EFBIG, EHOSTUNREACH = exports$1.EHOSTUNREACH, EIDRM = exports$1.EIDRM, EILSEQ = exports$1.EILSEQ, EINPROGRESS = exports$1.EINPROGRESS, EINTR = exports$1.EINTR, EINVAL = exports$1.EINVAL, EIO = exports$1.EIO, EISCONN = exports$1.EISCONN, EISDIR = exports$1.EISDIR, ELOOP = exports$1.ELOOP, EMFILE = exports$1.EMFILE, EMLINK = exports$1.EMLINK, EMSGSIZE = exports$1.EMSGSIZE, EMULTIHOP = exports$1.EMULTIHOP, ENAMETOOLONG = exports$1.ENAMETOOLONG, ENETDOWN = exports$1.ENETDOWN, ENETRESET = exports$1.ENETRESET, ENETUNREACH = exports$1.ENETUNREACH, ENFILE = exports$1.ENFILE, ENGINE_METHOD_ALL = exports$1.ENGINE_METHOD_ALL, ENGINE_METHOD_CIPHERS = exports$1.ENGINE_METHOD_CIPHERS, ENGINE_METHOD_DH = exports$1.ENGINE_METHOD_DH, ENGINE_METHOD_DIGESTS = exports$1.ENGINE_METHOD_DIGESTS, ENGINE_METHOD_DSA = exports$1.ENGINE_METHOD_DSA, ENGINE_METHOD_ECDH = exports$1.ENGINE_METHOD_ECDH, ENGINE_METHOD_ECDSA = exports$1.ENGINE_METHOD_ECDSA, ENGINE_METHOD_NONE = exports$1.ENGINE_METHOD_NONE, ENGINE_METHOD_PKEY_ASN1_METHS = exports$1.ENGINE_METHOD_PKEY_ASN1_METHS, ENGINE_METHOD_PKEY_METHS = exports$1.ENGINE_METHOD_PKEY_METHS, ENGINE_METHOD_RAND = exports$1.ENGINE_METHOD_RAND, ENGINE_METHOD_STORE = exports$1.ENGINE_METHOD_STORE, ENOBUFS = exports$1.ENOBUFS, ENODATA = exports$1.ENODATA, ENODEV = exports$1.ENODEV, ENOENT = exports$1.ENOENT, ENOEXEC = exports$1.ENOEXEC, ENOLCK = exports$1.ENOLCK, ENOLINK = exports$1.ENOLINK, ENOMEM = exports$1.ENOMEM, ENOMSG = exports$1.ENOMSG, ENOPROTOOPT = exports$1.ENOPROTOOPT, ENOSPC = exports$1.ENOSPC, ENOSR = exports$1.ENOSR, ENOSTR = exports$1.ENOSTR, ENOSYS = exports$1.ENOSYS, ENOTCONN = exports$1.ENOTCONN, ENOTDIR = exports$1.ENOTDIR, ENOTEMPTY = exports$1.ENOTEMPTY, ENOTSOCK = exports$1.ENOTSOCK, ENOTSUP = exports$1.ENOTSUP, ENOTTY = exports$1.ENOTTY, ENXIO = exports$1.ENXIO, EOPNOTSUPP = exports$1.EOPNOTSUPP, EOVERFLOW = exports$1.EOVERFLOW, EPERM = exports$1.EPERM, EPIPE = exports$1.EPIPE, EPROTO = exports$1.EPROTO, EPROTONOSUPPORT = exports$1.EPROTONOSUPPORT, EPROTOTYPE = exports$1.EPROTOTYPE, ERANGE = exports$1.ERANGE, EROFS = exports$1.EROFS, ESPIPE = exports$1.ESPIPE, ESRCH = exports$1.ESRCH, ESTALE = exports$1.ESTALE, ETIME = exports$1.ETIME, ETIMEDOUT = exports$1.ETIMEDOUT, ETXTBSY = exports$1.ETXTBSY, EWOULDBLOCK = exports$1.EWOULDBLOCK, EXDEV = exports$1.EXDEV, F_OK = exports$1.F_OK, NPN_ENABLED = exports$1.NPN_ENABLED, O_APPEND = exports$1.O_APPEND, O_CREAT = exports$1.O_CREAT, O_DIRECTORY = exports$1.O_DIRECTORY, O_EXCL = exports$1.O_EXCL, O_NOCTTY = exports$1.O_NOCTTY, O_NOFOLLOW = exports$1.O_NOFOLLOW, O_NONBLOCK = exports$1.O_NONBLOCK, O_RDONLY = exports$1.O_RDONLY, O_RDWR = exports$1.O_RDWR, O_SYMLINK = exports$1.O_SYMLINK, O_SYNC = exports$1.O_SYNC, O_TRUNC = exports$1.O_TRUNC, O_WRONLY = exports$1.O_WRONLY, POINT_CONVERSION_COMPRESSED = exports$1.POINT_CONVERSION_COMPRESSED, POINT_CONVERSION_HYBRID = exports$1.POINT_CONVERSION_HYBRID, POINT_CONVERSION_UNCOMPRESSED = exports$1.POINT_CONVERSION_UNCOMPRESSED, RSA_NO_PADDING = exports$1.RSA_NO_PADDING, RSA_PKCS1_OAEP_PADDING = exports$1.RSA_PKCS1_OAEP_PADDING, RSA_PKCS1_PADDING = exports$1.RSA_PKCS1_PADDING, RSA_PKCS1_PSS_PADDING = exports$1.RSA_PKCS1_PSS_PADDING, RSA_SSLV23_PADDING = exports$1.RSA_SSLV23_PADDING, RSA_X931_PADDING = exports$1.RSA_X931_PADDING, R_OK = exports$1.R_OK, SIGABRT = exports$1.SIGABRT, SIGALRM = exports$1.SIGALRM, SIGBUS = exports$1.SIGBUS, SIGCHLD = exports$1.SIGCHLD, SIGCONT = exports$1.SIGCONT, SIGFPE = exports$1.SIGFPE, SIGHUP = exports$1.SIGHUP, SIGILL = exports$1.SIGILL, SIGINT = exports$1.SIGINT, SIGIO = exports$1.SIGIO, SIGIOT = exports$1.SIGIOT, SIGKILL = exports$1.SIGKILL, SIGPIPE = exports$1.SIGPIPE, SIGPROF = exports$1.SIGPROF, SIGQUIT = exports$1.SIGQUIT, SIGSEGV = exports$1.SIGSEGV, SIGSTOP = exports$1.SIGSTOP, SIGSYS = exports$1.SIGSYS, SIGTERM = exports$1.SIGTERM, SIGTRAP = exports$1.SIGTRAP, SIGTSTP = exports$1.SIGTSTP, SIGTTIN = exports$1.SIGTTIN, SIGTTOU = exports$1.SIGTTOU, SIGURG = exports$1.SIGURG, SIGUSR1 = exports$1.SIGUSR1, SIGUSR2 = exports$1.SIGUSR2, SIGVTALRM = exports$1.SIGVTALRM, SIGWINCH = exports$1.SIGWINCH, SIGXCPU = exports$1.SIGXCPU, SIGXFSZ = exports$1.SIGXFSZ, SSL_OP_ALL = exports$1.SSL_OP_ALL, SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION = exports$1.SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION, SSL_OP_CIPHER_SERVER_PREFERENCE = exports$1.SSL_OP_CIPHER_SERVER_PREFERENCE, SSL_OP_CISCO_ANYCONNECT = exports$1.SSL_OP_CISCO_ANYCONNECT, SSL_OP_COOKIE_EXCHANGE = exports$1.SSL_OP_COOKIE_EXCHANGE, SSL_OP_CRYPTOPRO_TLSEXT_BUG = exports$1.SSL_OP_CRYPTOPRO_TLSEXT_BUG, SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS = exports$1.SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS, SSL_OP_EPHEMERAL_RSA = exports$1.SSL_OP_EPHEMERAL_RSA, SSL_OP_LEGACY_SERVER_CONNECT = exports$1.SSL_OP_LEGACY_SERVER_CONNECT, SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER = exports$1.SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER, SSL_OP_MICROSOFT_SESS_ID_BUG = exports$1.SSL_OP_MICROSOFT_SESS_ID_BUG, SSL_OP_MSIE_SSLV2_RSA_PADDING = exports$1.SSL_OP_MSIE_SSLV2_RSA_PADDING, SSL_OP_NETSCAPE_CA_DN_BUG = exports$1.SSL_OP_NETSCAPE_CA_DN_BUG, SSL_OP_NETSCAPE_CHALLENGE_BUG = exports$1.SSL_OP_NETSCAPE_CHALLENGE_BUG, SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG = exports$1.SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG, SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG = exports$1.SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG, SSL_OP_NO_COMPRESSION = exports$1.SSL_OP_NO_COMPRESSION, SSL_OP_NO_QUERY_MTU = exports$1.SSL_OP_NO_QUERY_MTU, SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION = exports$1.SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION, SSL_OP_NO_SSLv2 = exports$1.SSL_OP_NO_SSLv2, SSL_OP_NO_SSLv3 = exports$1.SSL_OP_NO_SSLv3, SSL_OP_NO_TICKET = exports$1.SSL_OP_NO_TICKET, SSL_OP_NO_TLSv1 = exports$1.SSL_OP_NO_TLSv1, SSL_OP_NO_TLSv1_1 = exports$1.SSL_OP_NO_TLSv1_1, SSL_OP_NO_TLSv1_2 = exports$1.SSL_OP_NO_TLSv1_2, SSL_OP_PKCS1_CHECK_1 = exports$1.SSL_OP_PKCS1_CHECK_1, SSL_OP_PKCS1_CHECK_2 = exports$1.SSL_OP_PKCS1_CHECK_2, SSL_OP_SINGLE_DH_USE = exports$1.SSL_OP_SINGLE_DH_USE, SSL_OP_SINGLE_ECDH_USE = exports$1.SSL_OP_SINGLE_ECDH_USE, SSL_OP_SSLEAY_080_CLIENT_DH_BUG = exports$1.SSL_OP_SSLEAY_080_CLIENT_DH_BUG, SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG = exports$1.SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG, SSL_OP_TLS_BLOCK_PADDING_BUG = exports$1.SSL_OP_TLS_BLOCK_PADDING_BUG, SSL_OP_TLS_D5_BUG = exports$1.SSL_OP_TLS_D5_BUG, SSL_OP_TLS_ROLLBACK_BUG = exports$1.SSL_OP_TLS_ROLLBACK_BUG, S_IFBLK = exports$1.S_IFBLK, S_IFCHR = exports$1.S_IFCHR, S_IFDIR = exports$1.S_IFDIR, S_IFIFO = exports$1.S_IFIFO, S_IFLNK = exports$1.S_IFLNK, S_IFMT = exports$1.S_IFMT, S_IFREG = exports$1.S_IFREG, S_IFSOCK = exports$1.S_IFSOCK, S_IRGRP = exports$1.S_IRGRP, S_IROTH = exports$1.S_IROTH, S_IRUSR = exports$1.S_IRUSR, S_IRWXG = exports$1.S_IRWXG, S_IRWXO = exports$1.S_IRWXO, S_IRWXU = exports$1.S_IRWXU, S_IWGRP = exports$1.S_IWGRP, S_IWOTH = exports$1.S_IWOTH, S_IWUSR = exports$1.S_IWUSR, S_IXGRP = exports$1.S_IXGRP, S_IXOTH = exports$1.S_IXOTH, S_IXUSR = exports$1.S_IXUSR, UV_UDP_REUSEADDR = exports$1.UV_UDP_REUSEADDR, W_OK = exports$1.W_OK, X_OK = exports$1.X_OK; | ||
export default exports$1; | ||
export { DH_CHECK_P_NOT_PRIME, DH_CHECK_P_NOT_SAFE_PRIME, DH_NOT_SUITABLE_GENERATOR, DH_UNABLE_TO_CHECK_GENERATOR, E2BIG, EACCES, EADDRINUSE, EADDRNOTAVAIL, EAFNOSUPPORT, EAGAIN, EALREADY, EBADF, EBADMSG, EBUSY, ECANCELED, ECHILD, ECONNABORTED, ECONNREFUSED, ECONNRESET, EDEADLK, EDESTADDRREQ, EDOM, EDQUOT, EEXIST, EFAULT, EFBIG, EHOSTUNREACH, EIDRM, EILSEQ, EINPROGRESS, EINTR, EINVAL, EIO, EISCONN, EISDIR, ELOOP, EMFILE, EMLINK, EMSGSIZE, EMULTIHOP, ENAMETOOLONG, ENETDOWN, ENETRESET, ENETUNREACH, ENFILE, ENGINE_METHOD_ALL, ENGINE_METHOD_CIPHERS, ENGINE_METHOD_DH, ENGINE_METHOD_DIGESTS, ENGINE_METHOD_DSA, ENGINE_METHOD_ECDH, ENGINE_METHOD_ECDSA, ENGINE_METHOD_NONE, ENGINE_METHOD_PKEY_ASN1_METHS, ENGINE_METHOD_PKEY_METHS, ENGINE_METHOD_RAND, ENGINE_METHOD_STORE, ENOBUFS, ENODATA, ENODEV, ENOENT, ENOEXEC, ENOLCK, ENOLINK, ENOMEM, ENOMSG, ENOPROTOOPT, ENOSPC, ENOSR, ENOSTR, ENOSYS, ENOTCONN, ENOTDIR, ENOTEMPTY, ENOTSOCK, ENOTSUP, ENOTTY, ENXIO, EOPNOTSUPP, EOVERFLOW, EPERM, EPIPE, EPROTO, EPROTONOSUPPORT, EPROTOTYPE, ERANGE, EROFS, ESPIPE, ESRCH, ESTALE, ETIME, ETIMEDOUT, ETXTBSY, EWOULDBLOCK, EXDEV, F_OK, NPN_ENABLED, O_APPEND, O_CREAT, O_DIRECTORY, O_EXCL, O_NOCTTY, O_NOFOLLOW, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYMLINK, O_SYNC, O_TRUNC, O_WRONLY, POINT_CONVERSION_COMPRESSED, POINT_CONVERSION_HYBRID, POINT_CONVERSION_UNCOMPRESSED, RSA_NO_PADDING, RSA_PKCS1_OAEP_PADDING, RSA_PKCS1_PADDING, RSA_PKCS1_PSS_PADDING, RSA_SSLV23_PADDING, RSA_X931_PADDING, R_OK, SIGABRT, SIGALRM, SIGBUS, SIGCHLD, SIGCONT, SIGFPE, SIGHUP, SIGILL, SIGINT, SIGIO, SIGIOT, SIGKILL, SIGPIPE, SIGPROF, SIGQUIT, SIGSEGV, SIGSTOP, SIGSYS, SIGTERM, SIGTRAP, SIGTSTP, SIGTTIN, SIGTTOU, SIGURG, SIGUSR1, SIGUSR2, SIGVTALRM, SIGWINCH, SIGXCPU, SIGXFSZ, SSL_OP_ALL, SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION, SSL_OP_CIPHER_SERVER_PREFERENCE, SSL_OP_CISCO_ANYCONNECT, SSL_OP_COOKIE_EXCHANGE, SSL_OP_CRYPTOPRO_TLSEXT_BUG, SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS, SSL_OP_EPHEMERAL_RSA, SSL_OP_LEGACY_SERVER_CONNECT, SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER, SSL_OP_MICROSOFT_SESS_ID_BUG, SSL_OP_MSIE_SSLV2_RSA_PADDING, SSL_OP_NETSCAPE_CA_DN_BUG, SSL_OP_NETSCAPE_CHALLENGE_BUG, SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG, SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG, SSL_OP_NO_COMPRESSION, SSL_OP_NO_QUERY_MTU, SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION, SSL_OP_NO_SSLv2, SSL_OP_NO_SSLv3, SSL_OP_NO_TICKET, SSL_OP_NO_TLSv1, SSL_OP_NO_TLSv1_1, SSL_OP_NO_TLSv1_2, SSL_OP_PKCS1_CHECK_1, SSL_OP_PKCS1_CHECK_2, SSL_OP_SINGLE_DH_USE, SSL_OP_SINGLE_ECDH_USE, SSL_OP_SSLEAY_080_CLIENT_DH_BUG, SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG, SSL_OP_TLS_BLOCK_PADDING_BUG, SSL_OP_TLS_D5_BUG, SSL_OP_TLS_ROLLBACK_BUG, S_IFBLK, S_IFCHR, S_IFDIR, S_IFIFO, S_IFLNK, S_IFMT, S_IFREG, S_IFSOCK, S_IRGRP, S_IROTH, S_IRUSR, S_IRWXG, S_IRWXO, S_IRWXU, S_IWGRP, S_IWOTH, S_IWUSR, S_IXGRP, S_IXOTH, S_IXUSR, UV_UDP_REUSEADDR, W_OK, X_OK }; | ||
var constants = {O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4};var DH_CHECK_P_NOT_PRIME=constants.DH_CHECK_P_NOT_PRIME;var DH_CHECK_P_NOT_SAFE_PRIME=constants.DH_CHECK_P_NOT_SAFE_PRIME;var DH_NOT_SUITABLE_GENERATOR=constants.DH_NOT_SUITABLE_GENERATOR;var DH_UNABLE_TO_CHECK_GENERATOR=constants.DH_UNABLE_TO_CHECK_GENERATOR;var E2BIG=constants.E2BIG;var EACCES=constants.EACCES;var EADDRINUSE=constants.EADDRINUSE;var EADDRNOTAVAIL=constants.EADDRNOTAVAIL;var EAFNOSUPPORT=constants.EAFNOSUPPORT;var EAGAIN=constants.EAGAIN;var EALREADY=constants.EALREADY;var EBADF=constants.EBADF;var EBADMSG=constants.EBADMSG;var EBUSY=constants.EBUSY;var ECANCELED=constants.ECANCELED;var ECHILD=constants.ECHILD;var ECONNABORTED=constants.ECONNABORTED;var ECONNREFUSED=constants.ECONNREFUSED;var ECONNRESET=constants.ECONNRESET;var EDEADLK=constants.EDEADLK;var EDESTADDRREQ=constants.EDESTADDRREQ;var EDOM=constants.EDOM;var EDQUOT=constants.EDQUOT;var EEXIST=constants.EEXIST;var EFAULT=constants.EFAULT;var EFBIG=constants.EFBIG;var EHOSTUNREACH=constants.EHOSTUNREACH;var EIDRM=constants.EIDRM;var EILSEQ=constants.EILSEQ;var EINPROGRESS=constants.EINPROGRESS;var EINTR=constants.EINTR;var EINVAL=constants.EINVAL;var EIO=constants.EIO;var EISCONN=constants.EISCONN;var EISDIR=constants.EISDIR;var ELOOP=constants.ELOOP;var EMFILE=constants.EMFILE;var EMLINK=constants.EMLINK;var EMSGSIZE=constants.EMSGSIZE;var EMULTIHOP=constants.EMULTIHOP;var ENAMETOOLONG=constants.ENAMETOOLONG;var ENETDOWN=constants.ENETDOWN;var ENETRESET=constants.ENETRESET;var ENETUNREACH=constants.ENETUNREACH;var ENFILE=constants.ENFILE;var ENGINE_METHOD_ALL=constants.ENGINE_METHOD_ALL;var ENGINE_METHOD_CIPHERS=constants.ENGINE_METHOD_CIPHERS;var ENGINE_METHOD_DH=constants.ENGINE_METHOD_DH;var ENGINE_METHOD_DIGESTS=constants.ENGINE_METHOD_DIGESTS;var ENGINE_METHOD_DSA=constants.ENGINE_METHOD_DSA;var ENGINE_METHOD_ECDH=constants.ENGINE_METHOD_ECDH;var ENGINE_METHOD_ECDSA=constants.ENGINE_METHOD_ECDSA;var ENGINE_METHOD_NONE=constants.ENGINE_METHOD_NONE;var ENGINE_METHOD_PKEY_ASN1_METHS=constants.ENGINE_METHOD_PKEY_ASN1_METHS;var ENGINE_METHOD_PKEY_METHS=constants.ENGINE_METHOD_PKEY_METHS;var ENGINE_METHOD_RAND=constants.ENGINE_METHOD_RAND;var ENGINE_METHOD_STORE=constants.ENGINE_METHOD_STORE;var ENOBUFS=constants.ENOBUFS;var ENODATA=constants.ENODATA;var ENODEV=constants.ENODEV;var ENOENT=constants.ENOENT;var ENOEXEC=constants.ENOEXEC;var ENOLCK=constants.ENOLCK;var ENOLINK=constants.ENOLINK;var ENOMEM=constants.ENOMEM;var ENOMSG=constants.ENOMSG;var ENOPROTOOPT=constants.ENOPROTOOPT;var ENOSPC=constants.ENOSPC;var ENOSR=constants.ENOSR;var ENOSTR=constants.ENOSTR;var ENOSYS=constants.ENOSYS;var ENOTCONN=constants.ENOTCONN;var ENOTDIR=constants.ENOTDIR;var ENOTEMPTY=constants.ENOTEMPTY;var ENOTSOCK=constants.ENOTSOCK;var ENOTSUP=constants.ENOTSUP;var ENOTTY=constants.ENOTTY;var ENXIO=constants.ENXIO;var EOPNOTSUPP=constants.EOPNOTSUPP;var EOVERFLOW=constants.EOVERFLOW;var EPERM=constants.EPERM;var EPIPE=constants.EPIPE;var EPROTO=constants.EPROTO;var EPROTONOSUPPORT=constants.EPROTONOSUPPORT;var EPROTOTYPE=constants.EPROTOTYPE;var ERANGE=constants.ERANGE;var EROFS=constants.EROFS;var ESPIPE=constants.ESPIPE;var ESRCH=constants.ESRCH;var ESTALE=constants.ESTALE;var ETIME=constants.ETIME;var ETIMEDOUT=constants.ETIMEDOUT;var ETXTBSY=constants.ETXTBSY;var EWOULDBLOCK=constants.EWOULDBLOCK;var EXDEV=constants.EXDEV;var F_OK=constants.F_OK;var NPN_ENABLED=constants.NPN_ENABLED;var O_APPEND=constants.O_APPEND;var O_CREAT=constants.O_CREAT;var O_DIRECTORY=constants.O_DIRECTORY;var O_EXCL=constants.O_EXCL;var O_NOCTTY=constants.O_NOCTTY;var O_NOFOLLOW=constants.O_NOFOLLOW;var O_NONBLOCK=constants.O_NONBLOCK;var O_RDONLY=constants.O_RDONLY;var O_RDWR=constants.O_RDWR;var O_SYMLINK=constants.O_SYMLINK;var O_SYNC=constants.O_SYNC;var O_TRUNC=constants.O_TRUNC;var O_WRONLY=constants.O_WRONLY;var POINT_CONVERSION_COMPRESSED=constants.POINT_CONVERSION_COMPRESSED;var POINT_CONVERSION_HYBRID=constants.POINT_CONVERSION_HYBRID;var POINT_CONVERSION_UNCOMPRESSED=constants.POINT_CONVERSION_UNCOMPRESSED;var RSA_NO_PADDING=constants.RSA_NO_PADDING;var RSA_PKCS1_OAEP_PADDING=constants.RSA_PKCS1_OAEP_PADDING;var RSA_PKCS1_PADDING=constants.RSA_PKCS1_PADDING;var RSA_PKCS1_PSS_PADDING=constants.RSA_PKCS1_PSS_PADDING;var RSA_SSLV23_PADDING=constants.RSA_SSLV23_PADDING;var RSA_X931_PADDING=constants.RSA_X931_PADDING;var R_OK=constants.R_OK;var SIGABRT=constants.SIGABRT;var SIGALRM=constants.SIGALRM;var SIGBUS=constants.SIGBUS;var SIGCHLD=constants.SIGCHLD;var SIGCONT=constants.SIGCONT;var SIGFPE=constants.SIGFPE;var SIGHUP=constants.SIGHUP;var SIGILL=constants.SIGILL;var SIGINT=constants.SIGINT;var SIGIO=constants.SIGIO;var SIGIOT=constants.SIGIOT;var SIGKILL=constants.SIGKILL;var SIGPIPE=constants.SIGPIPE;var SIGPROF=constants.SIGPROF;var SIGQUIT=constants.SIGQUIT;var SIGSEGV=constants.SIGSEGV;var SIGSTOP=constants.SIGSTOP;var SIGSYS=constants.SIGSYS;var SIGTERM=constants.SIGTERM;var SIGTRAP=constants.SIGTRAP;var SIGTSTP=constants.SIGTSTP;var SIGTTIN=constants.SIGTTIN;var SIGTTOU=constants.SIGTTOU;var SIGURG=constants.SIGURG;var SIGUSR1=constants.SIGUSR1;var SIGUSR2=constants.SIGUSR2;var SIGVTALRM=constants.SIGVTALRM;var SIGWINCH=constants.SIGWINCH;var SIGXCPU=constants.SIGXCPU;var SIGXFSZ=constants.SIGXFSZ;var SSL_OP_ALL=constants.SSL_OP_ALL;var SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION=constants.SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION;var SSL_OP_CIPHER_SERVER_PREFERENCE=constants.SSL_OP_CIPHER_SERVER_PREFERENCE;var SSL_OP_CISCO_ANYCONNECT=constants.SSL_OP_CISCO_ANYCONNECT;var SSL_OP_COOKIE_EXCHANGE=constants.SSL_OP_COOKIE_EXCHANGE;var SSL_OP_CRYPTOPRO_TLSEXT_BUG=constants.SSL_OP_CRYPTOPRO_TLSEXT_BUG;var SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS=constants.SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS;var SSL_OP_EPHEMERAL_RSA=constants.SSL_OP_EPHEMERAL_RSA;var SSL_OP_LEGACY_SERVER_CONNECT=constants.SSL_OP_LEGACY_SERVER_CONNECT;var SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER=constants.SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER;var SSL_OP_MICROSOFT_SESS_ID_BUG=constants.SSL_OP_MICROSOFT_SESS_ID_BUG;var SSL_OP_MSIE_SSLV2_RSA_PADDING=constants.SSL_OP_MSIE_SSLV2_RSA_PADDING;var SSL_OP_NETSCAPE_CA_DN_BUG=constants.SSL_OP_NETSCAPE_CA_DN_BUG;var SSL_OP_NETSCAPE_CHALLENGE_BUG=constants.SSL_OP_NETSCAPE_CHALLENGE_BUG;var SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG=constants.SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG;var SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG=constants.SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG;var SSL_OP_NO_COMPRESSION=constants.SSL_OP_NO_COMPRESSION;var SSL_OP_NO_QUERY_MTU=constants.SSL_OP_NO_QUERY_MTU;var SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION=constants.SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION;var SSL_OP_NO_SSLv2=constants.SSL_OP_NO_SSLv2;var SSL_OP_NO_SSLv3=constants.SSL_OP_NO_SSLv3;var SSL_OP_NO_TICKET=constants.SSL_OP_NO_TICKET;var SSL_OP_NO_TLSv1=constants.SSL_OP_NO_TLSv1;var SSL_OP_NO_TLSv1_1=constants.SSL_OP_NO_TLSv1_1;var SSL_OP_NO_TLSv1_2=constants.SSL_OP_NO_TLSv1_2;var SSL_OP_PKCS1_CHECK_1=constants.SSL_OP_PKCS1_CHECK_1;var SSL_OP_PKCS1_CHECK_2=constants.SSL_OP_PKCS1_CHECK_2;var SSL_OP_SINGLE_DH_USE=constants.SSL_OP_SINGLE_DH_USE;var SSL_OP_SINGLE_ECDH_USE=constants.SSL_OP_SINGLE_ECDH_USE;var SSL_OP_SSLEAY_080_CLIENT_DH_BUG=constants.SSL_OP_SSLEAY_080_CLIENT_DH_BUG;var SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG=constants.SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG;var SSL_OP_TLS_BLOCK_PADDING_BUG=constants.SSL_OP_TLS_BLOCK_PADDING_BUG;var SSL_OP_TLS_D5_BUG=constants.SSL_OP_TLS_D5_BUG;var SSL_OP_TLS_ROLLBACK_BUG=constants.SSL_OP_TLS_ROLLBACK_BUG;var S_IFBLK=constants.S_IFBLK;var S_IFCHR=constants.S_IFCHR;var S_IFDIR=constants.S_IFDIR;var S_IFIFO=constants.S_IFIFO;var S_IFLNK=constants.S_IFLNK;var S_IFMT=constants.S_IFMT;var S_IFREG=constants.S_IFREG;var S_IFSOCK=constants.S_IFSOCK;var S_IRGRP=constants.S_IRGRP;var S_IROTH=constants.S_IROTH;var S_IRUSR=constants.S_IRUSR;var S_IRWXG=constants.S_IRWXG;var S_IRWXO=constants.S_IRWXO;var S_IRWXU=constants.S_IRWXU;var S_IWGRP=constants.S_IWGRP;var S_IWOTH=constants.S_IWOTH;var S_IWUSR=constants.S_IWUSR;var S_IXGRP=constants.S_IXGRP;var S_IXOTH=constants.S_IXOTH;var S_IXUSR=constants.S_IXUSR;var UV_UDP_REUSEADDR=constants.UV_UDP_REUSEADDR;var W_OK=constants.W_OK;var X_OK=constants.X_OK;export default constants;export{DH_CHECK_P_NOT_PRIME,DH_CHECK_P_NOT_SAFE_PRIME,DH_NOT_SUITABLE_GENERATOR,DH_UNABLE_TO_CHECK_GENERATOR,E2BIG,EACCES,EADDRINUSE,EADDRNOTAVAIL,EAFNOSUPPORT,EAGAIN,EALREADY,EBADF,EBADMSG,EBUSY,ECANCELED,ECHILD,ECONNABORTED,ECONNREFUSED,ECONNRESET,EDEADLK,EDESTADDRREQ,EDOM,EDQUOT,EEXIST,EFAULT,EFBIG,EHOSTUNREACH,EIDRM,EILSEQ,EINPROGRESS,EINTR,EINVAL,EIO,EISCONN,EISDIR,ELOOP,EMFILE,EMLINK,EMSGSIZE,EMULTIHOP,ENAMETOOLONG,ENETDOWN,ENETRESET,ENETUNREACH,ENFILE,ENGINE_METHOD_ALL,ENGINE_METHOD_CIPHERS,ENGINE_METHOD_DH,ENGINE_METHOD_DIGESTS,ENGINE_METHOD_DSA,ENGINE_METHOD_ECDH,ENGINE_METHOD_ECDSA,ENGINE_METHOD_NONE,ENGINE_METHOD_PKEY_ASN1_METHS,ENGINE_METHOD_PKEY_METHS,ENGINE_METHOD_RAND,ENGINE_METHOD_STORE,ENOBUFS,ENODATA,ENODEV,ENOENT,ENOEXEC,ENOLCK,ENOLINK,ENOMEM,ENOMSG,ENOPROTOOPT,ENOSPC,ENOSR,ENOSTR,ENOSYS,ENOTCONN,ENOTDIR,ENOTEMPTY,ENOTSOCK,ENOTSUP,ENOTTY,ENXIO,EOPNOTSUPP,EOVERFLOW,EPERM,EPIPE,EPROTO,EPROTONOSUPPORT,EPROTOTYPE,ERANGE,EROFS,ESPIPE,ESRCH,ESTALE,ETIME,ETIMEDOUT,ETXTBSY,EWOULDBLOCK,EXDEV,F_OK,NPN_ENABLED,O_APPEND,O_CREAT,O_DIRECTORY,O_EXCL,O_NOCTTY,O_NOFOLLOW,O_NONBLOCK,O_RDONLY,O_RDWR,O_SYMLINK,O_SYNC,O_TRUNC,O_WRONLY,POINT_CONVERSION_COMPRESSED,POINT_CONVERSION_HYBRID,POINT_CONVERSION_UNCOMPRESSED,RSA_NO_PADDING,RSA_PKCS1_OAEP_PADDING,RSA_PKCS1_PADDING,RSA_PKCS1_PSS_PADDING,RSA_SSLV23_PADDING,RSA_X931_PADDING,R_OK,SIGABRT,SIGALRM,SIGBUS,SIGCHLD,SIGCONT,SIGFPE,SIGHUP,SIGILL,SIGINT,SIGIO,SIGIOT,SIGKILL,SIGPIPE,SIGPROF,SIGQUIT,SIGSEGV,SIGSTOP,SIGSYS,SIGTERM,SIGTRAP,SIGTSTP,SIGTTIN,SIGTTOU,SIGURG,SIGUSR1,SIGUSR2,SIGVTALRM,SIGWINCH,SIGXCPU,SIGXFSZ,SSL_OP_ALL,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION,SSL_OP_CIPHER_SERVER_PREFERENCE,SSL_OP_CISCO_ANYCONNECT,SSL_OP_COOKIE_EXCHANGE,SSL_OP_CRYPTOPRO_TLSEXT_BUG,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS,SSL_OP_EPHEMERAL_RSA,SSL_OP_LEGACY_SERVER_CONNECT,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER,SSL_OP_MICROSOFT_SESS_ID_BUG,SSL_OP_MSIE_SSLV2_RSA_PADDING,SSL_OP_NETSCAPE_CA_DN_BUG,SSL_OP_NETSCAPE_CHALLENGE_BUG,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG,SSL_OP_NO_COMPRESSION,SSL_OP_NO_QUERY_MTU,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION,SSL_OP_NO_SSLv2,SSL_OP_NO_SSLv3,SSL_OP_NO_TICKET,SSL_OP_NO_TLSv1,SSL_OP_NO_TLSv1_1,SSL_OP_NO_TLSv1_2,SSL_OP_PKCS1_CHECK_1,SSL_OP_PKCS1_CHECK_2,SSL_OP_SINGLE_DH_USE,SSL_OP_SINGLE_ECDH_USE,SSL_OP_SSLEAY_080_CLIENT_DH_BUG,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG,SSL_OP_TLS_BLOCK_PADDING_BUG,SSL_OP_TLS_D5_BUG,SSL_OP_TLS_ROLLBACK_BUG,S_IFBLK,S_IFCHR,S_IFDIR,S_IFIFO,S_IFLNK,S_IFMT,S_IFREG,S_IFSOCK,S_IRGRP,S_IROTH,S_IRUSR,S_IRWXG,S_IRWXO,S_IRWXU,S_IWGRP,S_IWOTH,S_IWUSR,S_IXGRP,S_IXOTH,S_IXUSR,UV_UDP_REUSEADDR,W_OK,X_OK}; |
@@ -1,90 +0,1 @@ | ||
import _events from './events.js'; | ||
var exports = {}, | ||
_dewExec = false; | ||
function dew() { | ||
if (_dewExec) return exports; | ||
_dewExec = true; | ||
exports = function () { | ||
// Import Events | ||
var events = _events; // Export Domain | ||
var domain = {}; | ||
domain.createDomain = domain.create = function () { | ||
var d = new events.EventEmitter(); | ||
function emitError(e) { | ||
d.emit('error', e); | ||
} | ||
d.add = function (emitter) { | ||
emitter.on('error', emitError); | ||
}; | ||
d.remove = function (emitter) { | ||
emitter.removeListener('error', emitError); | ||
}; | ||
d.bind = function (fn) { | ||
return function () { | ||
var args = Array.prototype.slice.call(arguments); | ||
try { | ||
fn.apply(null, args); | ||
} catch (err) { | ||
emitError(err); | ||
} | ||
}; | ||
}; | ||
d.intercept = function (fn) { | ||
return function (err) { | ||
if (err) { | ||
emitError(err); | ||
} else { | ||
var args = Array.prototype.slice.call(arguments, 1); | ||
try { | ||
fn.apply(null, args); | ||
} catch (err) { | ||
emitError(err); | ||
} | ||
} | ||
}; | ||
}; | ||
d.run = function (fn) { | ||
try { | ||
fn(); | ||
} catch (err) { | ||
emitError(err); | ||
} | ||
return this; | ||
}; | ||
d.dispose = function () { | ||
this.removeAllListeners(); | ||
return this; | ||
}; | ||
d.enter = d.exit = function () { | ||
return this; | ||
}; | ||
return d; | ||
}; | ||
return domain; | ||
}.call(exports); | ||
return exports; | ||
} | ||
const exports$1 = dew(); | ||
const create = exports$1.create, createDomain = exports$1.createDomain; | ||
export default exports$1; | ||
export { create, createDomain }; | ||
import r from'./events.js';var t={},e=t=function(){var t=r,e={};return e.createDomain=e.create=function(){var r=new t.EventEmitter;function e(t){r.emit("error",t);}return r.add=function(r){r.on("error",e);},r.remove=function(r){r.removeListener("error",e);},r.bind=function(r){return function(){var t=Array.prototype.slice.call(arguments);try{r.apply(null,t);}catch(r){e(r);}}},r.intercept=function(r){return function(t){if(t)e(t);else {var n=Array.prototype.slice.call(arguments,1);try{r.apply(null,n);}catch(t){e(t);}}}},r.run=function(r){try{r();}catch(r){e(r);}return this},r.dispose=function(){return this.removeAllListeners(),this},r.enter=r.exit=function(){return this},r},e}.call(t);var create=e.create;var createDomain=e.createDomain;export default e;export{create,createDomain}; |
@@ -1,409 +0,1 @@ | ||
var exports = {}, | ||
_dewExec = false; | ||
function dew() { | ||
if (_dewExec) return exports; | ||
_dewExec = true; | ||
var R = typeof Reflect === 'object' ? Reflect : null; | ||
var ReflectApply = R && typeof R.apply === 'function' ? R.apply : function ReflectApply(target, receiver, args) { | ||
return Function.prototype.apply.call(target, receiver, args); | ||
}; | ||
var ReflectOwnKeys; | ||
if (R && typeof R.ownKeys === 'function') { | ||
ReflectOwnKeys = R.ownKeys; | ||
} else if (Object.getOwnPropertySymbols) { | ||
ReflectOwnKeys = function ReflectOwnKeys(target) { | ||
return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target)); | ||
}; | ||
} else { | ||
ReflectOwnKeys = function ReflectOwnKeys(target) { | ||
return Object.getOwnPropertyNames(target); | ||
}; | ||
} | ||
function ProcessEmitWarning(warning) { | ||
if (console && console.warn) console.warn(warning); | ||
} | ||
var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) { | ||
return value !== value; | ||
}; | ||
function EventEmitter() { | ||
EventEmitter.init.call(this); | ||
} | ||
exports = EventEmitter; // Backwards-compat with node 0.10.x | ||
EventEmitter.EventEmitter = EventEmitter; | ||
EventEmitter.prototype._events = undefined; | ||
EventEmitter.prototype._eventsCount = 0; | ||
EventEmitter.prototype._maxListeners = undefined; // By default EventEmitters will print a warning if more than 10 listeners are | ||
// added to it. This is a useful default which helps finding memory leaks. | ||
var defaultMaxListeners = 10; | ||
Object.defineProperty(EventEmitter, 'defaultMaxListeners', { | ||
enumerable: true, | ||
get: function () { | ||
return defaultMaxListeners; | ||
}, | ||
set: function (arg) { | ||
if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) { | ||
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.'); | ||
} | ||
defaultMaxListeners = arg; | ||
} | ||
}); | ||
EventEmitter.init = function () { | ||
if (this._events === undefined || this._events === Object.getPrototypeOf(this)._events) { | ||
this._events = Object.create(null); | ||
this._eventsCount = 0; | ||
} | ||
this._maxListeners = this._maxListeners || undefined; | ||
}; // Obviously not all Emitters should be limited to 10. This function allows | ||
// that to be increased. Set to zero for unlimited. | ||
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) { | ||
if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) { | ||
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.'); | ||
} | ||
this._maxListeners = n; | ||
return this; | ||
}; | ||
function $getMaxListeners(that) { | ||
if (that._maxListeners === undefined) return EventEmitter.defaultMaxListeners; | ||
return that._maxListeners; | ||
} | ||
EventEmitter.prototype.getMaxListeners = function getMaxListeners() { | ||
return $getMaxListeners(this); | ||
}; | ||
EventEmitter.prototype.emit = function emit(type) { | ||
var args = []; | ||
for (var i = 1; i < arguments.length; i++) args.push(arguments[i]); | ||
var doError = type === 'error'; | ||
var events = this._events; | ||
if (events !== undefined) doError = doError && events.error === undefined;else if (!doError) return false; // If there is no 'error' event listener then throw. | ||
if (doError) { | ||
var er; | ||
if (args.length > 0) er = args[0]; | ||
if (er instanceof Error) { | ||
// Note: The comments on the `throw` lines are intentional, they show | ||
// up in Node's output if this results in an unhandled exception. | ||
throw er; // Unhandled 'error' event | ||
} // At least give some kind of context to the user | ||
var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : '')); | ||
err.context = er; | ||
throw err; // Unhandled 'error' event | ||
} | ||
var handler = events[type]; | ||
if (handler === undefined) return false; | ||
if (typeof handler === 'function') { | ||
ReflectApply(handler, this, args); | ||
} else { | ||
var len = handler.length; | ||
var listeners = arrayClone(handler, len); | ||
for (var i = 0; i < len; ++i) ReflectApply(listeners[i], this, args); | ||
} | ||
return true; | ||
}; | ||
function _addListener(target, type, listener, prepend) { | ||
var m; | ||
var events; | ||
var existing; | ||
if (typeof listener !== 'function') { | ||
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener); | ||
} | ||
events = target._events; | ||
if (events === undefined) { | ||
events = target._events = Object.create(null); | ||
target._eventsCount = 0; | ||
} else { | ||
// To avoid recursion in the case that type === "newListener"! Before | ||
// adding it to the listeners, first emit "newListener". | ||
if (events.newListener !== undefined) { | ||
target.emit('newListener', type, listener.listener ? listener.listener : listener); // Re-assign `events` because a newListener handler could have caused the | ||
// this._events to be assigned to a new object | ||
events = target._events; | ||
} | ||
existing = events[type]; | ||
} | ||
if (existing === undefined) { | ||
// Optimize the case of one listener. Don't need the extra array object. | ||
existing = events[type] = listener; | ||
++target._eventsCount; | ||
} else { | ||
if (typeof existing === 'function') { | ||
// Adding the second element, need to change to array. | ||
existing = events[type] = prepend ? [listener, existing] : [existing, listener]; // If we've already got an array, just append. | ||
} else if (prepend) { | ||
existing.unshift(listener); | ||
} else { | ||
existing.push(listener); | ||
} // Check for listener leak | ||
m = $getMaxListeners(target); | ||
if (m > 0 && existing.length > m && !existing.warned) { | ||
existing.warned = true; // No error code for this since it is a Warning | ||
// eslint-disable-next-line no-restricted-syntax | ||
var w = new Error('Possible EventEmitter memory leak detected. ' + existing.length + ' ' + String(type) + ' listeners ' + 'added. Use emitter.setMaxListeners() to ' + 'increase limit'); | ||
w.name = 'MaxListenersExceededWarning'; | ||
w.emitter = target; | ||
w.type = type; | ||
w.count = existing.length; | ||
ProcessEmitWarning(w); | ||
} | ||
} | ||
return target; | ||
} | ||
EventEmitter.prototype.addListener = function addListener(type, listener) { | ||
return _addListener(this, type, listener, false); | ||
}; | ||
EventEmitter.prototype.on = EventEmitter.prototype.addListener; | ||
EventEmitter.prototype.prependListener = function prependListener(type, listener) { | ||
return _addListener(this, type, listener, true); | ||
}; | ||
function onceWrapper() { | ||
var args = []; | ||
for (var i = 0; i < arguments.length; i++) args.push(arguments[i]); | ||
if (!this.fired) { | ||
this.target.removeListener(this.type, this.wrapFn); | ||
this.fired = true; | ||
ReflectApply(this.listener, this.target, args); | ||
} | ||
} | ||
function _onceWrap(target, type, listener) { | ||
var state = { | ||
fired: false, | ||
wrapFn: undefined, | ||
target: target, | ||
type: type, | ||
listener: listener | ||
}; | ||
var wrapped = onceWrapper.bind(state); | ||
wrapped.listener = listener; | ||
state.wrapFn = wrapped; | ||
return wrapped; | ||
} | ||
EventEmitter.prototype.once = function once(type, listener) { | ||
if (typeof listener !== 'function') { | ||
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener); | ||
} | ||
this.on(type, _onceWrap(this, type, listener)); | ||
return this; | ||
}; | ||
EventEmitter.prototype.prependOnceListener = function prependOnceListener(type, listener) { | ||
if (typeof listener !== 'function') { | ||
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener); | ||
} | ||
this.prependListener(type, _onceWrap(this, type, listener)); | ||
return this; | ||
}; // Emits a 'removeListener' event if and only if the listener was removed. | ||
EventEmitter.prototype.removeListener = function removeListener(type, listener) { | ||
var list, events, position, i, originalListener; | ||
if (typeof listener !== 'function') { | ||
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener); | ||
} | ||
events = this._events; | ||
if (events === undefined) return this; | ||
list = events[type]; | ||
if (list === undefined) return this; | ||
if (list === listener || list.listener === listener) { | ||
if (--this._eventsCount === 0) this._events = Object.create(null);else { | ||
delete events[type]; | ||
if (events.removeListener) this.emit('removeListener', type, list.listener || listener); | ||
} | ||
} else if (typeof list !== 'function') { | ||
position = -1; | ||
for (i = list.length - 1; i >= 0; i--) { | ||
if (list[i] === listener || list[i].listener === listener) { | ||
originalListener = list[i].listener; | ||
position = i; | ||
break; | ||
} | ||
} | ||
if (position < 0) return this; | ||
if (position === 0) list.shift();else { | ||
spliceOne(list, position); | ||
} | ||
if (list.length === 1) events[type] = list[0]; | ||
if (events.removeListener !== undefined) this.emit('removeListener', type, originalListener || listener); | ||
} | ||
return this; | ||
}; | ||
EventEmitter.prototype.off = EventEmitter.prototype.removeListener; | ||
EventEmitter.prototype.removeAllListeners = function removeAllListeners(type) { | ||
var listeners, events, i; | ||
events = this._events; | ||
if (events === undefined) return this; // not listening for removeListener, no need to emit | ||
if (events.removeListener === undefined) { | ||
if (arguments.length === 0) { | ||
this._events = Object.create(null); | ||
this._eventsCount = 0; | ||
} else if (events[type] !== undefined) { | ||
if (--this._eventsCount === 0) this._events = Object.create(null);else delete events[type]; | ||
} | ||
return this; | ||
} // emit removeListener for all listeners on all events | ||
if (arguments.length === 0) { | ||
var keys = Object.keys(events); | ||
var key; | ||
for (i = 0; i < keys.length; ++i) { | ||
key = keys[i]; | ||
if (key === 'removeListener') continue; | ||
this.removeAllListeners(key); | ||
} | ||
this.removeAllListeners('removeListener'); | ||
this._events = Object.create(null); | ||
this._eventsCount = 0; | ||
return this; | ||
} | ||
listeners = events[type]; | ||
if (typeof listeners === 'function') { | ||
this.removeListener(type, listeners); | ||
} else if (listeners !== undefined) { | ||
// LIFO order | ||
for (i = listeners.length - 1; i >= 0; i--) { | ||
this.removeListener(type, listeners[i]); | ||
} | ||
} | ||
return this; | ||
}; | ||
function _listeners(target, type, unwrap) { | ||
var events = target._events; | ||
if (events === undefined) return []; | ||
var evlistener = events[type]; | ||
if (evlistener === undefined) return []; | ||
if (typeof evlistener === 'function') return unwrap ? [evlistener.listener || evlistener] : [evlistener]; | ||
return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length); | ||
} | ||
EventEmitter.prototype.listeners = function listeners(type) { | ||
return _listeners(this, type, true); | ||
}; | ||
EventEmitter.prototype.rawListeners = function rawListeners(type) { | ||
return _listeners(this, type, false); | ||
}; | ||
EventEmitter.listenerCount = function (emitter, type) { | ||
if (typeof emitter.listenerCount === 'function') { | ||
return emitter.listenerCount(type); | ||
} else { | ||
return listenerCount.call(emitter, type); | ||
} | ||
}; | ||
EventEmitter.prototype.listenerCount = listenerCount; | ||
function listenerCount(type) { | ||
var events = this._events; | ||
if (events !== undefined) { | ||
var evlistener = events[type]; | ||
if (typeof evlistener === 'function') { | ||
return 1; | ||
} else if (evlistener !== undefined) { | ||
return evlistener.length; | ||
} | ||
} | ||
return 0; | ||
} | ||
EventEmitter.prototype.eventNames = function eventNames() { | ||
return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : []; | ||
}; | ||
function arrayClone(arr, n) { | ||
var copy = new Array(n); | ||
for (var i = 0; i < n; ++i) copy[i] = arr[i]; | ||
return copy; | ||
} | ||
function spliceOne(list, index) { | ||
for (; index + 1 < list.length; index++) list[index] = list[index + 1]; | ||
list.pop(); | ||
} | ||
function unwrapListeners(arr) { | ||
var ret = new Array(arr.length); | ||
for (var i = 0; i < ret.length; ++i) { | ||
ret[i] = arr[i].listener || arr[i]; | ||
} | ||
return ret; | ||
} | ||
return exports; | ||
} | ||
const exports$1 = dew(); | ||
const EventEmitter = exports$1.EventEmitter, defaultMaxListeners = exports$1.defaultMaxListeners, init = exports$1.init, listenerCount = exports$1.listenerCount; | ||
export default exports$1; | ||
export { EventEmitter, defaultMaxListeners, init, listenerCount }; | ||
var e,t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this);}e=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function f(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function v(e,t,n,r){var i,o,s,v;if(u(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=f(e))>0&&s.length>i&&!s.warned){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=s.length,v=a,console&&console.warn&&console.warn(v);}return e}function a(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=a.bind(r);return i.listener=n,r.wrapFn=i,i}function h(e,t,n){var r=e._events;if(void 0===r)return [];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):c(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function c(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e;}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0;},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return f(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return !1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var u=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw u.context=s,u}var f=o[e];if(void 0===f)return !1;if("function"==typeof f)r(f,this,t);else {var v=f.length,a=c(f,v);for(n=0;n<v;++n)r(a[n],this,t);}return !0},o.prototype.addListener=function(e,t){return v(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return v(this,e,t,!0)},o.prototype.once=function(e,t){return u(t),this.on(e,l(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,l(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,i,o,s;if(u(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():!function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop();}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t);}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return "function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};var y=e;var EventEmitter=y.EventEmitter;var defaultMaxListeners=y.defaultMaxListeners;var init=y.init;var listenerCount=y.listenerCount;export default y;export{EventEmitter,defaultMaxListeners,init,listenerCount}; |
@@ -1,868 +0,3 @@ | ||
import { b as dew$7 } from './util-c86b84df.js'; | ||
import _process from './process.js'; | ||
import _buffer from './buffer.js'; | ||
import './string_decoder-a044d0fd.js'; | ||
import './events.js'; | ||
import { c as dew$8 } from './chunk-147c6ebb.js'; | ||
import './punycode.js'; | ||
import _url from './url.js'; | ||
import './querystring.js'; | ||
var exports = {}, | ||
_dewExec = false; | ||
var _global = typeof self !== "undefined" ? self : global; | ||
function dew() { | ||
if (_dewExec) return exports; | ||
_dewExec = true; | ||
exports.fetch = isFunction(_global.fetch) && isFunction(_global.ReadableStream); | ||
exports.writableStream = isFunction(_global.WritableStream); | ||
exports.abortController = isFunction(_global.AbortController); | ||
exports.blobConstructor = false; | ||
try { | ||
new Blob([new ArrayBuffer(1)]); | ||
exports.blobConstructor = true; | ||
} catch (e) {} // The xhr request to example.com may violate some restrictive CSP configurations, | ||
// so if we're running in a browser that supports `fetch`, avoid calling getXHR() | ||
// and assume support for certain features below. | ||
var xhr; | ||
function getXHR() { | ||
// Cache the xhr value | ||
if (xhr !== undefined) return xhr; | ||
if (_global.XMLHttpRequest) { | ||
xhr = new _global.XMLHttpRequest(); // If XDomainRequest is available (ie only, where xhr might not work | ||
// cross domain), use the page location. Otherwise use example.com | ||
// Note: this doesn't actually make an http request. | ||
try { | ||
xhr.open('GET', _global.XDomainRequest ? '/' : 'https://example.com'); | ||
} catch (e) { | ||
xhr = null; | ||
} | ||
} else { | ||
// Service workers don't have XHR | ||
xhr = null; | ||
} | ||
return xhr; | ||
} | ||
function checkTypeSupport(type) { | ||
var xhr = getXHR(); | ||
if (!xhr) return false; | ||
try { | ||
xhr.responseType = type; | ||
return xhr.responseType === type; | ||
} catch (e) {} | ||
return false; | ||
} // For some strange reason, Safari 7.0 reports typeof global.ArrayBuffer === 'object'. | ||
// Safari 7.1 appears to have fixed this bug. | ||
var haveArrayBuffer = typeof _global.ArrayBuffer !== 'undefined'; | ||
var haveSlice = haveArrayBuffer && isFunction(_global.ArrayBuffer.prototype.slice); // If fetch is supported, then arraybuffer will be supported too. Skip calling | ||
// checkTypeSupport(), since that calls getXHR(). | ||
exports.arraybuffer = exports.fetch || haveArrayBuffer && checkTypeSupport('arraybuffer'); // These next two tests unavoidably show warnings in Chrome. Since fetch will always | ||
// be used if it's available, just return false for these to avoid the warnings. | ||
exports.msstream = !exports.fetch && haveSlice && checkTypeSupport('ms-stream'); | ||
exports.mozchunkedarraybuffer = !exports.fetch && haveArrayBuffer && checkTypeSupport('moz-chunked-arraybuffer'); // If fetch is supported, then overrideMimeType will be supported too. Skip calling | ||
// getXHR(). | ||
exports.overrideMimeType = exports.fetch || (getXHR() ? isFunction(getXHR().overrideMimeType) : false); | ||
exports.vbArray = isFunction(_global.VBArray); | ||
function isFunction(value) { | ||
return typeof value === 'function'; | ||
} | ||
xhr = null; // Help gc | ||
return exports; | ||
} | ||
var exports$1 = {}, | ||
_dewExec$1 = false; | ||
var _global$1 = typeof self !== "undefined" ? self : global; | ||
function dew$1() { | ||
if (_dewExec$1) return exports$1; | ||
_dewExec$1 = true; | ||
var Buffer = _buffer.Buffer; | ||
var process = _process; | ||
var capability = dew(); | ||
var inherits = dew$7(); | ||
var stream = dew$8(); | ||
var rStates = exports$1.readyStates = { | ||
UNSENT: 0, | ||
OPENED: 1, | ||
HEADERS_RECEIVED: 2, | ||
LOADING: 3, | ||
DONE: 4 | ||
}; | ||
var IncomingMessage = exports$1.IncomingMessage = function (xhr, response, mode, fetchTimer) { | ||
var self = this || _global$1; | ||
stream.Readable.call(self); | ||
self._mode = mode; | ||
self.headers = {}; | ||
self.rawHeaders = []; | ||
self.trailers = {}; | ||
self.rawTrailers = []; // Fake the 'close' event, but only once 'end' fires | ||
self.on('end', function () { | ||
// The nextTick is necessary to prevent the 'request' module from causing an infinite loop | ||
process.nextTick(function () { | ||
self.emit('close'); | ||
}); | ||
}); | ||
if (mode === 'fetch') { | ||
self._fetchResponse = response; | ||
self.url = response.url; | ||
self.statusCode = response.status; | ||
self.statusMessage = response.statusText; | ||
response.headers.forEach(function (header, key) { | ||
self.headers[key.toLowerCase()] = header; | ||
self.rawHeaders.push(key, header); | ||
}); | ||
if (capability.writableStream) { | ||
var writable = new WritableStream({ | ||
write: function (chunk) { | ||
return new Promise(function (resolve, reject) { | ||
if (self._destroyed) { | ||
reject(); | ||
} else if (self.push(new Buffer(chunk))) { | ||
resolve(); | ||
} else { | ||
self._resumeFetch = resolve; | ||
} | ||
}); | ||
}, | ||
close: function () { | ||
_global$1.clearTimeout(fetchTimer); | ||
if (!self._destroyed) self.push(null); | ||
}, | ||
abort: function (err) { | ||
if (!self._destroyed) self.emit('error', err); | ||
} | ||
}); | ||
try { | ||
response.body.pipeTo(writable).catch(function (err) { | ||
_global$1.clearTimeout(fetchTimer); | ||
if (!self._destroyed) self.emit('error', err); | ||
}); | ||
return; | ||
} catch (e) {} // pipeTo method isn't defined. Can't find a better way to feature test this | ||
} // fallback for when writableStream or pipeTo aren't available | ||
var reader = response.body.getReader(); | ||
function read() { | ||
reader.read().then(function (result) { | ||
if (self._destroyed) return; | ||
if (result.done) { | ||
_global$1.clearTimeout(fetchTimer); | ||
self.push(null); | ||
return; | ||
} | ||
self.push(new Buffer(result.value)); | ||
read(); | ||
}).catch(function (err) { | ||
_global$1.clearTimeout(fetchTimer); | ||
if (!self._destroyed) self.emit('error', err); | ||
}); | ||
} | ||
read(); | ||
} else { | ||
self._xhr = xhr; | ||
self._pos = 0; | ||
self.url = xhr.responseURL; | ||
self.statusCode = xhr.status; | ||
self.statusMessage = xhr.statusText; | ||
var headers = xhr.getAllResponseHeaders().split(/\r?\n/); | ||
headers.forEach(function (header) { | ||
var matches = header.match(/^([^:]+):\s*(.*)/); | ||
if (matches) { | ||
var key = matches[1].toLowerCase(); | ||
if (key === 'set-cookie') { | ||
if (self.headers[key] === undefined) { | ||
self.headers[key] = []; | ||
} | ||
self.headers[key].push(matches[2]); | ||
} else if (self.headers[key] !== undefined) { | ||
self.headers[key] += ', ' + matches[2]; | ||
} else { | ||
self.headers[key] = matches[2]; | ||
} | ||
self.rawHeaders.push(matches[1], matches[2]); | ||
} | ||
}); | ||
self._charset = 'x-user-defined'; | ||
if (!capability.overrideMimeType) { | ||
var mimeType = self.rawHeaders['mime-type']; | ||
if (mimeType) { | ||
var charsetMatch = mimeType.match(/;\s*charset=([^;])(;|$)/); | ||
if (charsetMatch) { | ||
self._charset = charsetMatch[1].toLowerCase(); | ||
} | ||
} | ||
if (!self._charset) self._charset = 'utf-8'; // best guess | ||
} | ||
} | ||
}; | ||
inherits(IncomingMessage, stream.Readable); | ||
IncomingMessage.prototype._read = function () { | ||
var self = this || _global$1; | ||
var resolve = self._resumeFetch; | ||
if (resolve) { | ||
self._resumeFetch = null; | ||
resolve(); | ||
} | ||
}; | ||
IncomingMessage.prototype._onXHRProgress = function () { | ||
var self = this || _global$1; | ||
var xhr = self._xhr; | ||
var response = null; | ||
switch (self._mode) { | ||
case 'text:vbarray': | ||
// For IE9 | ||
if (xhr.readyState !== rStates.DONE) break; | ||
try { | ||
// This fails in IE8 | ||
response = new _global$1.VBArray(xhr.responseBody).toArray(); | ||
} catch (e) {} | ||
if (response !== null) { | ||
self.push(new Buffer(response)); | ||
break; | ||
} | ||
// Falls through in IE8 | ||
case 'text': | ||
try { | ||
// This will fail when readyState = 3 in IE9. Switch mode and wait for readyState = 4 | ||
response = xhr.responseText; | ||
} catch (e) { | ||
self._mode = 'text:vbarray'; | ||
break; | ||
} | ||
if (response.length > self._pos) { | ||
var newData = response.substr(self._pos); | ||
if (self._charset === 'x-user-defined') { | ||
var buffer = new Buffer(newData.length); | ||
for (var i = 0; i < newData.length; i++) buffer[i] = newData.charCodeAt(i) & 0xff; | ||
self.push(buffer); | ||
} else { | ||
self.push(newData, self._charset); | ||
} | ||
self._pos = response.length; | ||
} | ||
break; | ||
case 'arraybuffer': | ||
if (xhr.readyState !== rStates.DONE || !xhr.response) break; | ||
response = xhr.response; | ||
self.push(new Buffer(new Uint8Array(response))); | ||
break; | ||
case 'moz-chunked-arraybuffer': | ||
// take whole | ||
response = xhr.response; | ||
if (xhr.readyState !== rStates.LOADING || !response) break; | ||
self.push(new Buffer(new Uint8Array(response))); | ||
break; | ||
case 'ms-stream': | ||
response = xhr.response; | ||
if (xhr.readyState !== rStates.LOADING) break; | ||
var reader = new _global$1.MSStreamReader(); | ||
reader.onprogress = function () { | ||
if (reader.result.byteLength > self._pos) { | ||
self.push(new Buffer(new Uint8Array(reader.result.slice(self._pos)))); | ||
self._pos = reader.result.byteLength; | ||
} | ||
}; | ||
reader.onload = function () { | ||
self.push(null); | ||
}; // reader.onerror = ??? // TODO: this | ||
reader.readAsArrayBuffer(response); | ||
break; | ||
} // The ms-stream case handles end separately in reader.onload() | ||
if (self._xhr.readyState === rStates.DONE && self._mode !== 'ms-stream') { | ||
self.push(null); | ||
} | ||
}; | ||
return exports$1; | ||
} | ||
var exports$2 = {}, | ||
_dewExec$2 = false; | ||
function dew$2() { | ||
if (_dewExec$2) return exports$2; | ||
_dewExec$2 = true; | ||
var Buffer = _buffer.Buffer; | ||
exports$2 = function (buf) { | ||
// If the buffer is backed by a Uint8Array, a faster version will work | ||
if (buf instanceof Uint8Array) { | ||
// If the buffer isn't a subarray, return the underlying ArrayBuffer | ||
if (buf.byteOffset === 0 && buf.byteLength === buf.buffer.byteLength) { | ||
return buf.buffer; | ||
} else if (typeof buf.buffer.slice === 'function') { | ||
// Otherwise we need to get a proper copy | ||
return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); | ||
} | ||
} | ||
if (Buffer.isBuffer(buf)) { | ||
// This is the slow version that will work with any Buffer | ||
// implementation (even in old browsers) | ||
var arrayCopy = new Uint8Array(buf.length); | ||
var len = buf.length; | ||
for (var i = 0; i < len; i++) { | ||
arrayCopy[i] = buf[i]; | ||
} | ||
return arrayCopy.buffer; | ||
} else { | ||
throw new Error('Argument must be a Buffer'); | ||
} | ||
}; | ||
return exports$2; | ||
} | ||
var exports$3 = {}, | ||
_dewExec$3 = false; | ||
var _global$2 = typeof self !== "undefined" ? self : global; | ||
function dew$3() { | ||
if (_dewExec$3) return exports$3; | ||
_dewExec$3 = true; | ||
var Buffer = _buffer.Buffer; | ||
var process = _process; | ||
var capability = dew(); | ||
var inherits = dew$7(); | ||
var response = dew$1(); | ||
var stream = dew$8(); | ||
var toArrayBuffer = dew$2(); | ||
var IncomingMessage = response.IncomingMessage; | ||
var rStates = response.readyStates; | ||
function decideMode(preferBinary, useFetch) { | ||
if (capability.fetch && useFetch) { | ||
return 'fetch'; | ||
} else if (capability.mozchunkedarraybuffer) { | ||
return 'moz-chunked-arraybuffer'; | ||
} else if (capability.msstream) { | ||
return 'ms-stream'; | ||
} else if (capability.arraybuffer && preferBinary) { | ||
return 'arraybuffer'; | ||
} else if (capability.vbArray && preferBinary) { | ||
return 'text:vbarray'; | ||
} else { | ||
return 'text'; | ||
} | ||
} | ||
var ClientRequest = exports$3 = function (opts) { | ||
var self = this || _global$2; | ||
stream.Writable.call(self); | ||
self._opts = opts; | ||
self._body = []; | ||
self._headers = {}; | ||
if (opts.auth) self.setHeader('Authorization', 'Basic ' + new Buffer(opts.auth).toString('base64')); | ||
Object.keys(opts.headers).forEach(function (name) { | ||
self.setHeader(name, opts.headers[name]); | ||
}); | ||
var preferBinary; | ||
var useFetch = true; | ||
if (opts.mode === 'disable-fetch' || 'requestTimeout' in opts && !capability.abortController) { | ||
// If the use of XHR should be preferred. Not typically needed. | ||
useFetch = false; | ||
preferBinary = true; | ||
} else if (opts.mode === 'prefer-streaming') { | ||
// If streaming is a high priority but binary compatibility and | ||
// the accuracy of the 'content-type' header aren't | ||
preferBinary = false; | ||
} else if (opts.mode === 'allow-wrong-content-type') { | ||
// If streaming is more important than preserving the 'content-type' header | ||
preferBinary = !capability.overrideMimeType; | ||
} else if (!opts.mode || opts.mode === 'default' || opts.mode === 'prefer-fast') { | ||
// Use binary if text streaming may corrupt data or the content-type header, or for speed | ||
preferBinary = true; | ||
} else { | ||
throw new Error('Invalid value for opts.mode'); | ||
} | ||
self._mode = decideMode(preferBinary, useFetch); | ||
self._fetchTimer = null; | ||
self.on('finish', function () { | ||
self._onFinish(); | ||
}); | ||
}; | ||
inherits(ClientRequest, stream.Writable); | ||
ClientRequest.prototype.setHeader = function (name, value) { | ||
var self = this || _global$2; | ||
var lowerName = name.toLowerCase(); // This check is not necessary, but it prevents warnings from browsers about setting unsafe | ||
// headers. To be honest I'm not entirely sure hiding these warnings is a good thing, but | ||
// http-browserify did it, so I will too. | ||
if (unsafeHeaders.indexOf(lowerName) !== -1) return; | ||
self._headers[lowerName] = { | ||
name: name, | ||
value: value | ||
}; | ||
}; | ||
ClientRequest.prototype.getHeader = function (name) { | ||
var header = (this || _global$2)._headers[name.toLowerCase()]; | ||
if (header) return header.value; | ||
return null; | ||
}; | ||
ClientRequest.prototype.removeHeader = function (name) { | ||
var self = this || _global$2; | ||
delete self._headers[name.toLowerCase()]; | ||
}; | ||
ClientRequest.prototype._onFinish = function () { | ||
var self = this || _global$2; | ||
if (self._destroyed) return; | ||
var opts = self._opts; | ||
var headersObj = self._headers; | ||
var body = null; | ||
if (opts.method !== 'GET' && opts.method !== 'HEAD') { | ||
if (capability.arraybuffer) { | ||
body = toArrayBuffer(Buffer.concat(self._body)); | ||
} else if (capability.blobConstructor) { | ||
body = new _global$2.Blob(self._body.map(function (buffer) { | ||
return toArrayBuffer(buffer); | ||
}), { | ||
type: (headersObj['content-type'] || {}).value || '' | ||
}); | ||
} else { | ||
// get utf8 string | ||
body = Buffer.concat(self._body).toString(); | ||
} | ||
} // create flattened list of headers | ||
var headersList = []; | ||
Object.keys(headersObj).forEach(function (keyName) { | ||
var name = headersObj[keyName].name; | ||
var value = headersObj[keyName].value; | ||
if (Array.isArray(value)) { | ||
value.forEach(function (v) { | ||
headersList.push([name, v]); | ||
}); | ||
} else { | ||
headersList.push([name, value]); | ||
} | ||
}); | ||
if (self._mode === 'fetch') { | ||
var signal = null; | ||
if (capability.abortController) { | ||
var controller = new AbortController(); | ||
signal = controller.signal; | ||
self._fetchAbortController = controller; | ||
if ('requestTimeout' in opts && opts.requestTimeout !== 0) { | ||
self._fetchTimer = _global$2.setTimeout(function () { | ||
self.emit('requestTimeout'); | ||
if (self._fetchAbortController) self._fetchAbortController.abort(); | ||
}, opts.requestTimeout); | ||
} | ||
} | ||
_global$2.fetch(self._opts.url, { | ||
method: self._opts.method, | ||
headers: headersList, | ||
body: body || undefined, | ||
mode: 'cors', | ||
credentials: opts.withCredentials ? 'include' : 'same-origin', | ||
signal: signal | ||
}).then(function (response) { | ||
self._fetchResponse = response; | ||
self._connect(); | ||
}, function (reason) { | ||
_global$2.clearTimeout(self._fetchTimer); | ||
if (!self._destroyed) self.emit('error', reason); | ||
}); | ||
} else { | ||
var xhr = self._xhr = new _global$2.XMLHttpRequest(); | ||
try { | ||
xhr.open(self._opts.method, self._opts.url, true); | ||
} catch (err) { | ||
process.nextTick(function () { | ||
self.emit('error', err); | ||
}); | ||
return; | ||
} // Can't set responseType on really old browsers | ||
if ('responseType' in xhr) xhr.responseType = self._mode.split(':')[0]; | ||
if ('withCredentials' in xhr) xhr.withCredentials = !!opts.withCredentials; | ||
if (self._mode === 'text' && 'overrideMimeType' in xhr) xhr.overrideMimeType('text/plain; charset=x-user-defined'); | ||
if ('requestTimeout' in opts) { | ||
xhr.timeout = opts.requestTimeout; | ||
xhr.ontimeout = function () { | ||
self.emit('requestTimeout'); | ||
}; | ||
} | ||
headersList.forEach(function (header) { | ||
xhr.setRequestHeader(header[0], header[1]); | ||
}); | ||
self._response = null; | ||
xhr.onreadystatechange = function () { | ||
switch (xhr.readyState) { | ||
case rStates.LOADING: | ||
case rStates.DONE: | ||
self._onXHRProgress(); | ||
break; | ||
} | ||
}; // Necessary for streaming in Firefox, since xhr.response is ONLY defined | ||
// in onprogress, not in onreadystatechange with xhr.readyState = 3 | ||
if (self._mode === 'moz-chunked-arraybuffer') { | ||
xhr.onprogress = function () { | ||
self._onXHRProgress(); | ||
}; | ||
} | ||
xhr.onerror = function () { | ||
if (self._destroyed) return; | ||
self.emit('error', new Error('XHR error')); | ||
}; | ||
try { | ||
xhr.send(body); | ||
} catch (err) { | ||
process.nextTick(function () { | ||
self.emit('error', err); | ||
}); | ||
return; | ||
} | ||
} | ||
}; | ||
/** | ||
* Checks if xhr.status is readable and non-zero, indicating no error. | ||
* Even though the spec says it should be available in readyState 3, | ||
* accessing it throws an exception in IE8 | ||
*/ | ||
function statusValid(xhr) { | ||
try { | ||
var status = xhr.status; | ||
return status !== null && status !== 0; | ||
} catch (e) { | ||
return false; | ||
} | ||
} | ||
ClientRequest.prototype._onXHRProgress = function () { | ||
var self = this || _global$2; | ||
if (!statusValid(self._xhr) || self._destroyed) return; | ||
if (!self._response) self._connect(); | ||
self._response._onXHRProgress(); | ||
}; | ||
ClientRequest.prototype._connect = function () { | ||
var self = this || _global$2; | ||
if (self._destroyed) return; | ||
self._response = new IncomingMessage(self._xhr, self._fetchResponse, self._mode, self._fetchTimer); | ||
self._response.on('error', function (err) { | ||
self.emit('error', err); | ||
}); | ||
self.emit('response', self._response); | ||
}; | ||
ClientRequest.prototype._write = function (chunk, encoding, cb) { | ||
var self = this || _global$2; | ||
self._body.push(chunk); | ||
cb(); | ||
}; | ||
ClientRequest.prototype.abort = ClientRequest.prototype.destroy = function () { | ||
var self = this || _global$2; | ||
self._destroyed = true; | ||
_global$2.clearTimeout(self._fetchTimer); | ||
if (self._response) self._response._destroyed = true; | ||
if (self._xhr) self._xhr.abort();else if (self._fetchAbortController) self._fetchAbortController.abort(); | ||
}; | ||
ClientRequest.prototype.end = function (data, encoding, cb) { | ||
var self = this || _global$2; | ||
if (typeof data === 'function') { | ||
cb = data; | ||
data = undefined; | ||
} | ||
stream.Writable.prototype.end.call(self, data, encoding, cb); | ||
}; | ||
ClientRequest.prototype.flushHeaders = function () {}; | ||
ClientRequest.prototype.setTimeout = function () {}; | ||
ClientRequest.prototype.setNoDelay = function () {}; | ||
ClientRequest.prototype.setSocketKeepAlive = function () {}; // Taken from http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader%28%29-method | ||
var unsafeHeaders = ['accept-charset', 'accept-encoding', 'access-control-request-headers', 'access-control-request-method', 'connection', 'content-length', 'cookie', 'cookie2', 'date', 'dnt', 'expect', 'host', 'keep-alive', 'origin', 'referer', 'te', 'trailer', 'transfer-encoding', 'upgrade', 'via']; | ||
return exports$3; | ||
} | ||
var exports$4 = {}, | ||
_dewExec$4 = false; | ||
function dew$4() { | ||
if (_dewExec$4) return exports$4; | ||
_dewExec$4 = true; | ||
exports$4 = extend; | ||
var hasOwnProperty = Object.prototype.hasOwnProperty; | ||
function extend() { | ||
var target = {}; | ||
for (var i = 0; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
} | ||
return exports$4; | ||
} | ||
var exports$5 = {}, | ||
_dewExec$5 = false; | ||
function dew$5() { | ||
if (_dewExec$5) return exports$5; | ||
_dewExec$5 = true; | ||
exports$5 = { | ||
"100": "Continue", | ||
"101": "Switching Protocols", | ||
"102": "Processing", | ||
"200": "OK", | ||
"201": "Created", | ||
"202": "Accepted", | ||
"203": "Non-Authoritative Information", | ||
"204": "No Content", | ||
"205": "Reset Content", | ||
"206": "Partial Content", | ||
"207": "Multi-Status", | ||
"208": "Already Reported", | ||
"226": "IM Used", | ||
"300": "Multiple Choices", | ||
"301": "Moved Permanently", | ||
"302": "Found", | ||
"303": "See Other", | ||
"304": "Not Modified", | ||
"305": "Use Proxy", | ||
"307": "Temporary Redirect", | ||
"308": "Permanent Redirect", | ||
"400": "Bad Request", | ||
"401": "Unauthorized", | ||
"402": "Payment Required", | ||
"403": "Forbidden", | ||
"404": "Not Found", | ||
"405": "Method Not Allowed", | ||
"406": "Not Acceptable", | ||
"407": "Proxy Authentication Required", | ||
"408": "Request Timeout", | ||
"409": "Conflict", | ||
"410": "Gone", | ||
"411": "Length Required", | ||
"412": "Precondition Failed", | ||
"413": "Payload Too Large", | ||
"414": "URI Too Long", | ||
"415": "Unsupported Media Type", | ||
"416": "Range Not Satisfiable", | ||
"417": "Expectation Failed", | ||
"418": "I'm a teapot", | ||
"421": "Misdirected Request", | ||
"422": "Unprocessable Entity", | ||
"423": "Locked", | ||
"424": "Failed Dependency", | ||
"425": "Unordered Collection", | ||
"426": "Upgrade Required", | ||
"428": "Precondition Required", | ||
"429": "Too Many Requests", | ||
"431": "Request Header Fields Too Large", | ||
"451": "Unavailable For Legal Reasons", | ||
"500": "Internal Server Error", | ||
"501": "Not Implemented", | ||
"502": "Bad Gateway", | ||
"503": "Service Unavailable", | ||
"504": "Gateway Timeout", | ||
"505": "HTTP Version Not Supported", | ||
"506": "Variant Also Negotiates", | ||
"507": "Insufficient Storage", | ||
"508": "Loop Detected", | ||
"509": "Bandwidth Limit Exceeded", | ||
"510": "Not Extended", | ||
"511": "Network Authentication Required" | ||
}; | ||
return exports$5; | ||
} | ||
var exports$6 = {}, | ||
_dewExec$6 = false; | ||
var _global$3 = typeof self !== "undefined" ? self : global; | ||
function dew$6() { | ||
if (_dewExec$6) return exports$6; | ||
_dewExec$6 = true; | ||
var ClientRequest = dew$3(); | ||
var response = dew$1(); | ||
var extend = dew$4(); | ||
var statusCodes = dew$5(); | ||
var url = _url; | ||
var http = exports$6; | ||
http.request = function (opts, cb) { | ||
if (typeof opts === 'string') opts = url.parse(opts);else opts = extend(opts); // Normally, the page is loaded from http or https, so not specifying a protocol | ||
// will result in a (valid) protocol-relative url. However, this won't work if | ||
// the protocol is something else, like 'file:' | ||
var defaultProtocol = _global$3.location.protocol.search(/^https?:$/) === -1 ? 'http:' : ''; | ||
var protocol = opts.protocol || defaultProtocol; | ||
var host = opts.hostname || opts.host; | ||
var port = opts.port; | ||
var path = opts.path || '/'; // Necessary for IPv6 addresses | ||
if (host && host.indexOf(':') !== -1) host = '[' + host + ']'; // This may be a relative url. The browser should always be able to interpret it correctly. | ||
opts.url = (host ? protocol + '//' + host : '') + (port ? ':' + port : '') + path; | ||
opts.method = (opts.method || 'GET').toUpperCase(); | ||
opts.headers = opts.headers || {}; // Also valid opts.auth, opts.mode | ||
var req = new ClientRequest(opts); | ||
if (cb) req.on('response', cb); | ||
return req; | ||
}; | ||
http.get = function get(opts, cb) { | ||
var req = http.request(opts, cb); | ||
req.end(); | ||
return req; | ||
}; | ||
http.ClientRequest = ClientRequest; | ||
http.IncomingMessage = response.IncomingMessage; | ||
http.Agent = function () {}; | ||
http.Agent.defaultMaxSockets = 4; | ||
http.globalAgent = new http.Agent(); | ||
http.STATUS_CODES = statusCodes; | ||
http.METHODS = ['CHECKOUT', 'CONNECT', 'COPY', 'DELETE', 'GET', 'HEAD', 'LOCK', 'M-SEARCH', 'MERGE', 'MKACTIVITY', 'MKCOL', 'MOVE', 'NOTIFY', 'OPTIONS', 'PATCH', 'POST', 'PROPFIND', 'PROPPATCH', 'PURGE', 'PUT', 'REPORT', 'SEARCH', 'SUBSCRIBE', 'TRACE', 'UNLOCK', 'UNSUBSCRIBE']; | ||
return exports$6; | ||
} | ||
const exports$7 = dew$6(); | ||
const Agent = exports$7.Agent, ClientRequest = exports$7.ClientRequest, IncomingMessage = exports$7.IncomingMessage, METHODS = exports$7.METHODS, STATUS_CODES = exports$7.STATUS_CODES, get = exports$7.get, globalAgent = exports$7.globalAgent, request = exports$7.request; | ||
export default exports$7; | ||
export { Agent, ClientRequest, IncomingMessage, METHODS, STATUS_CODES, get, globalAgent, request }; | ||
import {t as t$4}from'./chunk-dac557ba.js';import {h as h$1}from'./chunk-0c2d1322.js';import t$3 from'./buffer.js';import'./util.js';import'./chunk-6e68c801.js';import'./events.js';import {o,s,e as e$2,t as t$2,i,r as r$2,m as m$1}from'./chunk-cffba9d4.js';import'./punycode.js';import'./querystring.js';import o$1 from'./url.js';var e,r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:global,t={};function n(){if(void 0!==e)return e;if(r.XMLHttpRequest){e=new r.XMLHttpRequest;try{e.open("GET",r.XDomainRequest?"/":"https://example.com");}catch(r){e=null;}}else e=null;return e}function f(e){var r=n();if(!r)return !1;try{return r.responseType=e,r.responseType===e}catch(e){}return !1}function a(e){return "function"==typeof e}t.fetch=a(r.fetch)&&a(r.ReadableStream),t.writableStream=a(r.WritableStream),t.abortController=a(r.AbortController),t.arraybuffer=t.fetch||f("arraybuffer"),t.msstream=!t.fetch&&f("ms-stream"),t.mozchunkedarraybuffer=!t.fetch&&f("moz-chunked-arraybuffer"),t.overrideMimeType=t.fetch||!!n()&&a(n().overrideMimeType),e=null; | ||
var a$1={};(a$1=a$1=o).Stream=a$1,a$1.Readable=a$1,a$1.Writable=s,a$1.Duplex=e$2,a$1.Transform=t$2,a$1.PassThrough=i,a$1.finished=r$2,a$1.pipeline=m$1;var p=a$1;var r$1;r$1=function(){for(var r={},t=0;t<arguments.length;t++){var e=arguments[t];for(var o in e)a$2.call(e,o)&&(r[o]=e[o]);}return r};var a$2=Object.prototype.hasOwnProperty;var t$1=r$1;var e$1={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"};var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:global,c={},d=t$3.Buffer,f$1=h$1,l=t,h=t$4,p$1=p,m=c.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},_=c.IncomingMessage=function(e,t,r,o){var s=this||u;if(p$1.Readable.call(s),s._mode=r,s.headers={},s.rawHeaders=[],s.trailers={},s.rawTrailers=[],s.on("end",(function(){f$1.nextTick((function(){s.emit("close");}));})),"fetch"===r){if(s._fetchResponse=t,s.url=t.url,s.statusCode=t.status,s.statusMessage=t.statusText,t.headers.forEach((function(e,t){s.headers[t.toLowerCase()]=e,s.rawHeaders.push(t,e);})),l.writableStream){var n=new WritableStream({write:function(e){return new Promise((function(t,r){s._destroyed?r():s.push(d.from(e))?t():s._resumeFetch=t;}))},close:function(){u.clearTimeout(o),s._destroyed||s.push(null);},abort:function(e){s._destroyed||s.emit("error",e);}});try{return t.body.pipeTo(n).catch((function(e){u.clearTimeout(o),s._destroyed||s.emit("error",e);})),void 0}catch(e){}}var a=t.body.getReader();!function e(){a.read().then((function(t){if(!s._destroyed){if(t.done)return u.clearTimeout(o),s.push(null),void 0;s.push(d.from(t.value)),e();}})).catch((function(e){u.clearTimeout(o),s._destroyed||s.emit("error",e);}));}();}else {if(s._xhr=e,s._pos=0,s.url=e.responseURL,s.statusCode=e.status,s.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===s.headers[r]&&(s.headers[r]=[]),s.headers[r].push(t[2])):void 0!==s.headers[r]?s.headers[r]+=", "+t[2]:s.headers[r]=t[2],s.rawHeaders.push(t[1],t[2]);}})),s._charset="x-user-defined",!l.overrideMimeType){var i=s.rawHeaders["mime-type"];if(i){var c=i.match(/;\s*charset=([^;])(;|$)/);c&&(s._charset=c[1].toLowerCase());}s._charset||(s._charset="utf-8");}}};h(_,p$1.Readable),_.prototype._read=function(){var e=this||u,t=e._resumeFetch;t&&(e._resumeFetch=null,t());},_.prototype._onXHRProgress=function(){var e=this||u,t=e._xhr,r=null;switch(e._mode){case"text":if((r=t.responseText).length>e._pos){var o=r.substr(e._pos);if("x-user-defined"===e._charset){for(var s=d.alloc(o.length),n=0;n<o.length;n++)s[n]=255&o.charCodeAt(n);e.push(s);}else e.push(o,e._charset);e._pos=r.length;}break;case"arraybuffer":if(t.readyState!==m.DONE||!t.response)break;r=t.response,e.push(d.from(new Uint8Array(r)));break;case"moz-chunked-arraybuffer":if(r=t.response,t.readyState!==m.LOADING||!r)break;e.push(d.from(new Uint8Array(r)));break;case"ms-stream":if(r=t.response,t.readyState!==m.LOADING)break;var a=new u.MSStreamReader;a.onprogress=function(){a.result.byteLength>e._pos&&(e.push(d.from(new Uint8Array(a.result.slice(e._pos)))),e._pos=a.result.byteLength);},a.onload=function(){e.push(null);},a.readAsArrayBuffer(r);}e._xhr.readyState===m.DONE&&"ms-stream"!==e._mode&&e.push(null);};var y,b="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:global,T=t$3.Buffer,v=h$1,g=t,E=t$4,C=c,w=p,A=C.IncomingMessage,R=C.readyStates;var O=y=function(e){var t,r=this||b;w.Writable.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+T.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){r.setHeader(t,e.headers[t]);}));var o=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!g.abortController)o=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!g.overrideMimeType;else {if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0;}r._mode=function(e,t){return g.fetch&&t?"fetch":g.mozchunkedarraybuffer?"moz-chunked-arraybuffer":g.msstream?"ms-stream":g.arraybuffer&&e?"arraybuffer":"text"}(t,o),r._fetchTimer=null,r.on("finish",(function(){r._onFinish();}));};E(O,w.Writable),O.prototype.setHeader=function(e,t){var r=this||b,o=e.toLowerCase();-1===H.indexOf(o)&&(r._headers[o]={name:e,value:t});},O.prototype.getHeader=function(e){var t=(this||b)._headers[e.toLowerCase()];return t?t.value:null},O.prototype.removeHeader=function(e){delete(this||b)._headers[e.toLowerCase()];},O.prototype._onFinish=function(){var e=this||b;if(!e._destroyed){var t=e._opts,r=e._headers,o=null;"GET"!==t.method&&"HEAD"!==t.method&&(o=new Blob(e._body,{type:(r["content-type"]||{}).value||""}));var s=[];if(Object.keys(r).forEach((function(e){var t=r[e].name,o=r[e].value;Array.isArray(o)?o.forEach((function(e){s.push([t,e]);})):s.push([t,o]);})),"fetch"===e._mode){var n=null;if(g.abortController){var a=new AbortController;n=a.signal,e._fetchAbortController=a,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=b.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort();}),t.requestTimeout));}b.fetch(e._opts.url,{method:e._opts.method,headers:s,body:o||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:n}).then((function(t){e._fetchResponse=t,e._connect();}),(function(t){b.clearTimeout(e._fetchTimer),e._destroyed||e.emit("error",t);}));}else {var i=e._xhr=new b.XMLHttpRequest;try{i.open(e._opts.method,e._opts.url,!0);}catch(t){return v.nextTick((function(){e.emit("error",t);})),void 0}"responseType"in i&&(i.responseType=e._mode),"withCredentials"in i&&(i.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in i&&i.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(i.timeout=t.requestTimeout,i.ontimeout=function(){e.emit("requestTimeout");}),s.forEach((function(e){i.setRequestHeader(e[0],e[1]);})),e._response=null,i.onreadystatechange=function(){switch(i.readyState){case R.LOADING:case R.DONE:e._onXHRProgress();}},"moz-chunked-arraybuffer"===e._mode&&(i.onprogress=function(){e._onXHRProgress();}),i.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"));};try{i.send(o);}catch(t){return v.nextTick((function(){e.emit("error",t);})),void 0}}}},O.prototype._onXHRProgress=function(){var e=this||b;(function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return !1}})(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress());},O.prototype._connect=function(){var e=this||b;e._destroyed||(e._response=new A(e._xhr,e._fetchResponse,e._mode,e._fetchTimer),e._response.on("error",(function(t){e.emit("error",t);})),e.emit("response",e._response));},O.prototype._write=function(e,t,r){(this||b)._body.push(e),r();},O.prototype.abort=O.prototype.destroy=function(){var e=this||b;e._destroyed=!0,b.clearTimeout(e._fetchTimer),e._response&&(e._response._destroyed=!0),e._xhr?e._xhr.abort():e._fetchAbortController&&e._fetchAbortController.abort();},O.prototype.end=function(e,t,r){var o=this||b;"function"==typeof e&&(r=e,e=void 0),w.Writable.prototype.end.call(o,e,t,r);},O.prototype.flushHeaders=function(){},O.prototype.setTimeout=function(){},O.prototype.setNoDelay=function(){},O.prototype.setSocketKeepAlive=function(){};var H=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"],S="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:global,x={},k=y,M=c,N=t$1,P=e$1,D=o$1,L=x;L.request=function(e,t){e="string"==typeof e?D.parse(e):N(e);var r=-1===S.location.protocol.search(/^https?:$/)?"http:":"",o=e.protocol||r,s=e.hostname||e.host,n=e.port,a=e.path||"/";s&&-1!==s.indexOf(":")&&(s="["+s+"]"),e.url=(s?o+"//"+s:"")+(n?":"+n:"")+a,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var i=new k(e);return t&&i.on("response",t),i},L.get=function(e,t){var r=L.request(e,t);return r.end(),r},L.ClientRequest=k,L.IncomingMessage=M.IncomingMessage,L.Agent=function(){},L.Agent.defaultMaxSockets=4,L.globalAgent=new L.Agent,L.STATUS_CODES=P,L.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]; | ||
var Agent=x.Agent;var ClientRequest=x.ClientRequest;var IncomingMessage=x.IncomingMessage;var METHODS=x.METHODS;var STATUS_CODES=x.STATUS_CODES;var get=x.get;var globalAgent=x.globalAgent;var request=x.request;export default x;export{Agent,ClientRequest,IncomingMessage,METHODS,STATUS_CODES,get,globalAgent,request}; |
@@ -1,61 +0,1 @@ | ||
import './util-c86b84df.js'; | ||
import './process.js'; | ||
import './buffer.js'; | ||
import './string_decoder-a044d0fd.js'; | ||
import './events.js'; | ||
import './chunk-147c6ebb.js'; | ||
import _http from './http.js'; | ||
import './punycode.js'; | ||
import _url from './url.js'; | ||
import './querystring.js'; | ||
var exports = {}, | ||
_dewExec = false; | ||
var _global = typeof self !== "undefined" ? self : global; | ||
function dew() { | ||
if (_dewExec) return exports; | ||
_dewExec = true; | ||
var http = _http; | ||
var url = _url; | ||
var https = exports; | ||
for (var key in http) { | ||
if (http.hasOwnProperty(key)) https[key] = http[key]; | ||
} | ||
https.request = function (params, cb) { | ||
params = validateParams(params); | ||
return http.request.call(this || _global, params, cb); | ||
}; | ||
https.get = function (params, cb) { | ||
params = validateParams(params); | ||
return http.get.call(this || _global, params, cb); | ||
}; | ||
function validateParams(params) { | ||
if (typeof params === 'string') { | ||
params = url.parse(params); | ||
} | ||
if (!params.protocol) { | ||
params.protocol = 'https:'; | ||
} | ||
if (params.protocol !== 'https:') { | ||
throw new Error('Protocol "' + params.protocol + '" not supported. Expected "https:"'); | ||
} | ||
return params; | ||
} | ||
return exports; | ||
} | ||
const exports$1 = dew(); | ||
const Agent = exports$1.Agent, ClientRequest = exports$1.ClientRequest, IncomingMessage = exports$1.IncomingMessage, METHODS = exports$1.METHODS, STATUS_CODES = exports$1.STATUS_CODES, get = exports$1.get, globalAgent = exports$1.globalAgent, request = exports$1.request; | ||
export default exports$1; | ||
export { Agent, ClientRequest, IncomingMessage, METHODS, STATUS_CODES, get, globalAgent, request }; | ||
import'./chunk-dac557ba.js';import'./chunk-0c2d1322.js';import'./buffer.js';import'./util.js';import'./chunk-6e68c801.js';import'./events.js';import'./chunk-cffba9d4.js';import t from'./http.js';import'./punycode.js';import'./querystring.js';import o from'./url.js';var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:global,e={},l=t,p=o,n=e;for(var f in l)l.hasOwnProperty(f)&&(n[f]=l[f]);function s(t){if("string"==typeof t&&(t=p.parse(t)),t.protocol||(t.protocol="https:"),"https:"!==t.protocol)throw new Error('Protocol "'+t.protocol+'" not supported. Expected "https:"');return t}n.request=function(t,o){return t=s(t),l.request.call(this||r,t,o)},n.get=function(t,o){return t=s(t),l.get.call(this||r,t,o)};var Agent=e.Agent;var ClientRequest=e.ClientRequest;var IncomingMessage=e.IncomingMessage;var METHODS=e.METHODS;var STATUS_CODES=e.STATUS_CODES;var get=e.get;var globalAgent=e.globalAgent;var request=e.request;export default e;export{Agent,ClientRequest,IncomingMessage,METHODS,STATUS_CODES,get,globalAgent,request}; |
@@ -1,78 +0,1 @@ | ||
var exports = {}, | ||
_dewExec = false; | ||
function dew() { | ||
if (_dewExec) return exports; | ||
_dewExec = true; | ||
exports.endianness = function () { | ||
return 'LE'; | ||
}; | ||
exports.hostname = function () { | ||
if (typeof location !== 'undefined') { | ||
return location.hostname; | ||
} else return ''; | ||
}; | ||
exports.loadavg = function () { | ||
return []; | ||
}; | ||
exports.uptime = function () { | ||
return 0; | ||
}; | ||
exports.freemem = function () { | ||
return Number.MAX_VALUE; | ||
}; | ||
exports.totalmem = function () { | ||
return Number.MAX_VALUE; | ||
}; | ||
exports.cpus = function () { | ||
return []; | ||
}; | ||
exports.type = function () { | ||
return 'Browser'; | ||
}; | ||
exports.release = function () { | ||
if (typeof navigator !== 'undefined') { | ||
return navigator.appVersion; | ||
} | ||
return ''; | ||
}; | ||
exports.networkInterfaces = exports.getNetworkInterfaces = function () { | ||
return {}; | ||
}; | ||
exports.arch = function () { | ||
return 'javascript'; | ||
}; | ||
exports.platform = function () { | ||
return 'browser'; | ||
}; | ||
exports.tmpdir = exports.tmpDir = function () { | ||
return '/tmp'; | ||
}; | ||
exports.EOL = '\n'; | ||
exports.homedir = function () { | ||
return '/'; | ||
}; | ||
return exports; | ||
} | ||
const exports$1 = dew(); | ||
const EOL = exports$1.EOL, arch = exports$1.arch, cpus = exports$1.cpus, endianness = exports$1.endianness, freemem = exports$1.freemem, getNetworkInterfaces = exports$1.getNetworkInterfaces, homedir = exports$1.homedir, hostname = exports$1.hostname, loadavg = exports$1.loadavg, networkInterfaces = exports$1.networkInterfaces, platform = exports$1.platform, release = exports$1.release, tmpDir = exports$1.tmpDir, tmpdir = exports$1.tmpdir, totalmem = exports$1.totalmem, type = exports$1.type, uptime = exports$1.uptime; | ||
export default exports$1; | ||
export { EOL, arch, cpus, endianness, freemem, getNetworkInterfaces, homedir, hostname, loadavg, networkInterfaces, platform, release, tmpDir, tmpdir, totalmem, type, uptime }; | ||
var n={endianness:function(){return "LE"},hostname:function(){return "undefined"!=typeof location?location.hostname:""},loadavg:function(){return []},uptime:function(){return 0},freemem:function(){return Number.MAX_VALUE},totalmem:function(){return Number.MAX_VALUE},cpus:function(){return []},type:function(){return "Browser"},release:function(){return "undefined"!=typeof navigator?navigator.appVersion:""}};n.networkInterfaces=n.getNetworkInterfaces=function(){return {}},n.arch=function(){return "javascript"},n.platform=function(){return "browser"},n.tmpdir=n.tmpDir=function(){return "/tmp"},n.EOL="\n",n.homedir=function(){return "/"};var EOL=n.EOL;var arch=n.arch;var cpus=n.cpus;var endianness=n.endianness;var freemem=n.freemem;var getNetworkInterfaces=n.getNetworkInterfaces;var homedir=n.homedir;var hostname=n.hostname;var loadavg=n.loadavg;var networkInterfaces=n.networkInterfaces;var platform=n.platform;var release=n.release;var tmpDir=n.tmpDir;var tmpdir=n.tmpdir;var totalmem=n.totalmem;var type=n.type;var uptime=n.uptime;export default n;export{EOL,arch,cpus,endianness,freemem,getNetworkInterfaces,homedir,hostname,loadavg,networkInterfaces,platform,release,tmpDir,tmpdir,totalmem,type,uptime}; |
@@ -1,241 +0,2 @@ | ||
import _process from './process.js'; | ||
var exports = {}, | ||
_dewExec = false; | ||
function dew() { | ||
if (_dewExec) return exports; | ||
_dewExec = true; | ||
var process = _process; | ||
// Copyright Joyent, Inc. and other Node contributors. | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a | ||
// copy of this software and associated documentation files (the | ||
// "Software"), to deal in the Software without restriction, including | ||
// without limitation the rights to use, copy, modify, merge, publish, | ||
// distribute, sublicense, and/or sell copies of the Software, and to permit | ||
// persons to whom the Software is furnished to do so, subject to the | ||
// following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included | ||
// in all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN | ||
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, | ||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | ||
// USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
// resolves . and .. elements in a path array with directory names there | ||
// must be no slashes, empty elements, or device names (c:\) in the array | ||
// (so also no leading and trailing slashes - it does not distinguish | ||
// relative and absolute paths) | ||
function normalizeArray(parts, allowAboveRoot) { | ||
// if the path tries to go above the root, `up` ends up > 0 | ||
var up = 0; | ||
for (var i = parts.length - 1; i >= 0; i--) { | ||
var last = parts[i]; | ||
if (last === '.') { | ||
parts.splice(i, 1); | ||
} else if (last === '..') { | ||
parts.splice(i, 1); | ||
up++; | ||
} else if (up) { | ||
parts.splice(i, 1); | ||
up--; | ||
} | ||
} // if the path is allowed to go above the root, restore leading ..s | ||
if (allowAboveRoot) { | ||
for (; up--; up) { | ||
parts.unshift('..'); | ||
} | ||
} | ||
return parts; | ||
} // Split a filename into [root, dir, basename, ext], unix version | ||
// 'root' is just a slash, or nothing. | ||
var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; | ||
var splitPath = function (filename) { | ||
return splitPathRe.exec(filename).slice(1); | ||
}; // path.resolve([from ...], to) | ||
// posix version | ||
exports.resolve = function () { | ||
var resolvedPath = '', | ||
resolvedAbsolute = false; | ||
for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { | ||
var path = i >= 0 ? arguments[i] : process.cwd(); // Skip empty and invalid entries | ||
if (typeof path !== 'string') { | ||
throw new TypeError('Arguments to path.resolve must be strings'); | ||
} else if (!path) { | ||
continue; | ||
} | ||
resolvedPath = path + '/' + resolvedPath; | ||
resolvedAbsolute = path.charAt(0) === '/'; | ||
} // At this point the path should be resolved to a full absolute path, but | ||
// handle relative paths to be safe (might happen when process.cwd() fails) | ||
// Normalize the path | ||
resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function (p) { | ||
return !!p; | ||
}), !resolvedAbsolute).join('/'); | ||
return (resolvedAbsolute ? '/' : '') + resolvedPath || '.'; | ||
}; // path.normalize(path) | ||
// posix version | ||
exports.normalize = function (path) { | ||
var isAbsolute = exports.isAbsolute(path), | ||
trailingSlash = substr(path, -1) === '/'; // Normalize the path | ||
path = normalizeArray(filter(path.split('/'), function (p) { | ||
return !!p; | ||
}), !isAbsolute).join('/'); | ||
if (!path && !isAbsolute) { | ||
path = '.'; | ||
} | ||
if (path && trailingSlash) { | ||
path += '/'; | ||
} | ||
return (isAbsolute ? '/' : '') + path; | ||
}; // posix version | ||
exports.isAbsolute = function (path) { | ||
return path.charAt(0) === '/'; | ||
}; // posix version | ||
exports.join = function () { | ||
var paths = Array.prototype.slice.call(arguments, 0); | ||
return exports.normalize(filter(paths, function (p, index) { | ||
if (typeof p !== 'string') { | ||
throw new TypeError('Arguments to path.join must be strings'); | ||
} | ||
return p; | ||
}).join('/')); | ||
}; // path.relative(from, to) | ||
// posix version | ||
exports.relative = function (from, to) { | ||
from = exports.resolve(from).substr(1); | ||
to = exports.resolve(to).substr(1); | ||
function trim(arr) { | ||
var start = 0; | ||
for (; start < arr.length; start++) { | ||
if (arr[start] !== '') break; | ||
} | ||
var end = arr.length - 1; | ||
for (; end >= 0; end--) { | ||
if (arr[end] !== '') break; | ||
} | ||
if (start > end) return []; | ||
return arr.slice(start, end - start + 1); | ||
} | ||
var fromParts = trim(from.split('/')); | ||
var toParts = trim(to.split('/')); | ||
var length = Math.min(fromParts.length, toParts.length); | ||
var samePartsLength = length; | ||
for (var i = 0; i < length; i++) { | ||
if (fromParts[i] !== toParts[i]) { | ||
samePartsLength = i; | ||
break; | ||
} | ||
} | ||
var outputParts = []; | ||
for (var i = samePartsLength; i < fromParts.length; i++) { | ||
outputParts.push('..'); | ||
} | ||
outputParts = outputParts.concat(toParts.slice(samePartsLength)); | ||
return outputParts.join('/'); | ||
}; | ||
exports.sep = '/'; | ||
exports.delimiter = ':'; | ||
exports.dirname = function (path) { | ||
var result = splitPath(path), | ||
root = result[0], | ||
dir = result[1]; | ||
if (!root && !dir) { | ||
// No dirname whatsoever | ||
return '.'; | ||
} | ||
if (dir) { | ||
// It has a dirname, strip trailing slash | ||
dir = dir.substr(0, dir.length - 1); | ||
} | ||
return root + dir; | ||
}; | ||
exports.basename = function (path, ext) { | ||
var f = splitPath(path)[2]; // TODO: make this comparison case-insensitive on windows? | ||
if (ext && f.substr(-1 * ext.length) === ext) { | ||
f = f.substr(0, f.length - ext.length); | ||
} | ||
return f; | ||
}; | ||
exports.extname = function (path) { | ||
return splitPath(path)[3]; | ||
}; | ||
function filter(xs, f) { | ||
if (xs.filter) return xs.filter(f); | ||
var res = []; | ||
for (var i = 0; i < xs.length; i++) { | ||
if (f(xs[i], i, xs)) res.push(xs[i]); | ||
} | ||
return res; | ||
} // String.prototype.substr - negative index don't work in IE8 | ||
var substr = 'ab'.substr(-1) === 'b' ? function (str, start, len) { | ||
return str.substr(start, len); | ||
} : function (str, start, len) { | ||
if (start < 0) start = str.length + start; | ||
return str.substr(start, len); | ||
}; | ||
return exports; | ||
} | ||
const exports$1 = dew(); | ||
const _makeLong = exports$1._makeLong, basename = exports$1.basename, delimiter = exports$1.delimiter, dirname = exports$1.dirname, extname = exports$1.extname, format = exports$1.format, isAbsolute = exports$1.isAbsolute, join = exports$1.join, normalize = exports$1.normalize, parse = exports$1.parse, posix = exports$1.posix, relative = exports$1.relative, resolve = exports$1.resolve, sep = exports$1.sep, win32 = exports$1.win32; | ||
export default exports$1; | ||
export { _makeLong, basename, delimiter, dirname, extname, format, isAbsolute, join, normalize, parse, posix, relative, resolve, sep, win32 }; | ||
import {h}from'./chunk-0c2d1322.js';var r=h;function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,r){for(var t,n="",i=0,l=-1,o=0,a=0;a<=e.length;++a){if(a<e.length)t=e.charCodeAt(a);else {if(47===t)break;t=47;}if(47===t){if(l===a-1||1===o);else if(l!==a-1&&2===o){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var h=n.lastIndexOf("/");if(h!==n.length-1){-1===h?(n="",i=0):i=(n=n.slice(0,h)).length-1-n.lastIndexOf("/"),l=a,o=0;continue}}else if(2===n.length||1===n.length){n="",i=0,l=a,o=0;continue}r&&(n.length>0?n+="/..":n="..",i=2);}else n.length>0?n+="/"+e.slice(l+1,a):n=e.slice(l+1,a),i=a-l-1;l=a,o=0;}else 46===t&&-1!==o?++o:o=-1;}return n}var i={resolve:function(){for(var e,i="",l=!1,o=arguments.length-1;o>=-1&&!l;o--){var a;o>=0?a=arguments[o]:(void 0===e&&(e=r.cwd()),a=e),t(a),0!==a.length&&(i=a+"/"+i,l=47===a.charCodeAt(0));}return i=n(i,!l),l?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(e){if(t(e),0===e.length)return ".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return ".";for(var e,r=0;r<arguments.length;++r){var n=arguments[r];t(n),n.length>0&&(void 0===e?e=n:e+="/"+n);}return void 0===e?".":i.normalize(e)},relative:function(e,r){if(t(e),t(r),e===r)return "";if((e=i.resolve(e))===(r=i.resolve(r)))return "";for(var n=1;n<e.length&&47===e.charCodeAt(n);++n);for(var l=e.length,o=l-n,a=1;a<r.length&&47===r.charCodeAt(a);++a);for(var h=r.length-a,f=o<h?o:h,c=-1,s=0;s<=f;++s){if(s===f){if(h>f){if(47===r.charCodeAt(a+s))return r.slice(a+s+1);if(0===s)return r.slice(a+s)}else o>f&&(47===e.charCodeAt(n+s)?c=s:0===s&&(c=0));break}var g=e.charCodeAt(n+s);if(g!==r.charCodeAt(a+s))break;47===g&&(c=s);}var u="";for(s=n+c+1;s<=l;++s)s!==l&&47!==e.charCodeAt(s)||(0===u.length?u+="..":u+="/..");return u.length>0?u+r.slice(a+c):(a+=c,47===r.charCodeAt(a)&&++a,r.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return ".";for(var r=e.charCodeAt(0),n=47===r,i=-1,l=!0,o=e.length-1;o>=1;--o)if(47===(r=e.charCodeAt(o))){if(!l){i=o;break}}else l=!1;return -1===i?n?"/":".":n&&1===i?"//":e.slice(0,i)},basename:function(e,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');t(e);var n,i=0,l=-1,o=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return "";var a=r.length-1,h=-1;for(n=e.length-1;n>=0;--n){var f=e.charCodeAt(n);if(47===f){if(!o){i=n+1;break}}else -1===h&&(o=!1,h=n+1),a>=0&&(f===r.charCodeAt(a)?-1==--a&&(l=n):(a=-1,l=h));}return i===l?l=h:-1===l&&(l=e.length),e.slice(i,l)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!o){i=n+1;break}}else -1===l&&(o=!1,l=n+1);return -1===l?"":e.slice(i,l)},extname:function(e){t(e);for(var r=-1,n=0,i=-1,l=!0,o=0,a=e.length-1;a>=0;--a){var h=e.charCodeAt(a);if(47!==h)-1===i&&(l=!1,i=a+1),46===h?-1===r?r=a:1!==o&&(o=1):-1!==r&&(o=-1);else if(!l){n=a+1;break}}return -1===r||-1===i||0===o||1===o&&r===i-1&&r===n+1?"":e.slice(r,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,r){var t=r.dir||r.root,n=r.base||(r.name||"")+(r.ext||"");return t?t===r.root?t+n:t+e+n:n}("/",e)},parse:function(e){t(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var n,i=e.charCodeAt(0),l=47===i;l?(r.root="/",n=1):n=0;for(var o=-1,a=0,h=-1,f=!0,c=e.length-1,s=0;c>=n;--c)if(47!==(i=e.charCodeAt(c)))-1===h&&(f=!1,h=c+1),46===i?-1===o?o=c:1!==s&&(s=1):-1!==o&&(s=-1);else if(!f){a=c+1;break}return -1===o||-1===h||0===s||1===s&&o===h-1&&o===a+1?-1!==h&&(r.base=r.name=0===a&&l?e.slice(1,h):e.slice(a,h)):(0===a&&l?(r.name=e.slice(1,o),r.base=e.slice(1,h)):(r.name=e.slice(a,o),r.base=e.slice(a,h)),r.ext=e.slice(o,h)),a>0?r.dir=e.slice(0,a-1):l&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i;var l=i; | ||
var _makeLong=l._makeLong;var basename=l.basename;var delimiter=l.delimiter;var dirname=l.dirname;var extname=l.extname;var format=l.format;var isAbsolute=l.isAbsolute;var join=l.join;var normalize=l.normalize;var parse=l.parse;var posix=l.posix;var relative=l.relative;var resolve=l.resolve;var sep=l.sep;var win32=l.win32;export default l;export{_makeLong,basename,delimiter,dirname,extname,format,isAbsolute,join,normalize,parse,posix,relative,resolve,sep,win32}; |
@@ -1,3 +0,1 @@ | ||
import { env } from './process.js'; | ||
env.NODE_ENV = 'production'; | ||
import {w as process}from'./chunk-0c2d1322.js';export{a as addListener,b as argv,c as binding,d as browser,e as chdir,f as cwd,g as emit,i as env,l as listeners,n as nextTick,o as off,j as on,k as once,p as prependListener,m as prependOnceListener,r as removeAllListeners,q as removeListener,t as title,u as umask,v as version,s as versions}from'./chunk-0c2d1322.js';process.env.NODE_ENV="production";export default process; |
@@ -1,225 +0,1 @@ | ||
var exports = {}, | ||
_dewExec = false; | ||
var _global = typeof self !== "undefined" ? self : global; | ||
function dew() { | ||
if (_dewExec) return exports; | ||
_dewExec = true; | ||
// shim for using process in browser | ||
var process = exports = {}; // cached from whatever global is present so that test runners that stub it | ||
// don't break things. But we need to wrap it in a try catch in case it is | ||
// wrapped in strict mode code which doesn't define any globals. It's inside a | ||
// function because try/catches deoptimize in certain engines. | ||
var cachedSetTimeout; | ||
var cachedClearTimeout; | ||
function defaultSetTimout() { | ||
throw new Error('setTimeout has not been defined'); | ||
} | ||
function defaultClearTimeout() { | ||
throw new Error('clearTimeout has not been defined'); | ||
} | ||
(function () { | ||
try { | ||
if (typeof setTimeout === 'function') { | ||
cachedSetTimeout = setTimeout; | ||
} else { | ||
cachedSetTimeout = defaultSetTimout; | ||
} | ||
} catch (e) { | ||
cachedSetTimeout = defaultSetTimout; | ||
} | ||
try { | ||
if (typeof clearTimeout === 'function') { | ||
cachedClearTimeout = clearTimeout; | ||
} else { | ||
cachedClearTimeout = defaultClearTimeout; | ||
} | ||
} catch (e) { | ||
cachedClearTimeout = defaultClearTimeout; | ||
} | ||
})(); | ||
function runTimeout(fun) { | ||
if (cachedSetTimeout === setTimeout) { | ||
//normal enviroments in sane situations | ||
return setTimeout(fun, 0); | ||
} // if setTimeout wasn't available but was latter defined | ||
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { | ||
cachedSetTimeout = setTimeout; | ||
return setTimeout(fun, 0); | ||
} | ||
try { | ||
// when when somebody has screwed with setTimeout but no I.E. maddness | ||
return cachedSetTimeout(fun, 0); | ||
} catch (e) { | ||
try { | ||
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally | ||
return cachedSetTimeout.call(null, fun, 0); | ||
} catch (e) { | ||
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error | ||
return cachedSetTimeout.call(this || _global, fun, 0); | ||
} | ||
} | ||
} | ||
function runClearTimeout(marker) { | ||
if (cachedClearTimeout === clearTimeout) { | ||
//normal enviroments in sane situations | ||
return clearTimeout(marker); | ||
} // if clearTimeout wasn't available but was latter defined | ||
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { | ||
cachedClearTimeout = clearTimeout; | ||
return clearTimeout(marker); | ||
} | ||
try { | ||
// when when somebody has screwed with setTimeout but no I.E. maddness | ||
return cachedClearTimeout(marker); | ||
} catch (e) { | ||
try { | ||
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally | ||
return cachedClearTimeout.call(null, marker); | ||
} catch (e) { | ||
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. | ||
// Some versions of I.E. have different rules for clearTimeout vs setTimeout | ||
return cachedClearTimeout.call(this || _global, marker); | ||
} | ||
} | ||
} | ||
var queue = []; | ||
var draining = false; | ||
var currentQueue; | ||
var queueIndex = -1; | ||
function cleanUpNextTick() { | ||
if (!draining || !currentQueue) { | ||
return; | ||
} | ||
draining = false; | ||
if (currentQueue.length) { | ||
queue = currentQueue.concat(queue); | ||
} else { | ||
queueIndex = -1; | ||
} | ||
if (queue.length) { | ||
drainQueue(); | ||
} | ||
} | ||
function drainQueue() { | ||
if (draining) { | ||
return; | ||
} | ||
var timeout = runTimeout(cleanUpNextTick); | ||
draining = true; | ||
var len = queue.length; | ||
while (len) { | ||
currentQueue = queue; | ||
queue = []; | ||
while (++queueIndex < len) { | ||
if (currentQueue) { | ||
currentQueue[queueIndex].run(); | ||
} | ||
} | ||
queueIndex = -1; | ||
len = queue.length; | ||
} | ||
currentQueue = null; | ||
draining = false; | ||
runClearTimeout(timeout); | ||
} | ||
process.nextTick = function (fun) { | ||
var args = new Array(arguments.length - 1); | ||
if (arguments.length > 1) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
args[i - 1] = arguments[i]; | ||
} | ||
} | ||
queue.push(new Item(fun, args)); | ||
if (queue.length === 1 && !draining) { | ||
runTimeout(drainQueue); | ||
} | ||
}; // v8 likes predictible objects | ||
function Item(fun, array) { | ||
(this || _global).fun = fun; | ||
(this || _global).array = array; | ||
} | ||
Item.prototype.run = function () { | ||
(this || _global).fun.apply(null, (this || _global).array); | ||
}; | ||
process.title = 'browser'; | ||
process.browser = true; | ||
process.env = {}; | ||
process.argv = []; | ||
process.version = ''; // empty string to avoid regexp issues | ||
process.versions = {}; | ||
function noop() {} | ||
process.on = noop; | ||
process.addListener = noop; | ||
process.once = noop; | ||
process.off = noop; | ||
process.removeListener = noop; | ||
process.removeAllListeners = noop; | ||
process.emit = noop; | ||
process.prependListener = noop; | ||
process.prependOnceListener = noop; | ||
process.listeners = function (name) { | ||
return []; | ||
}; | ||
process.binding = function (name) { | ||
throw new Error('process.binding is not supported'); | ||
}; | ||
process.cwd = function () { | ||
return '/'; | ||
}; | ||
process.chdir = function (dir) { | ||
throw new Error('process.chdir is not supported'); | ||
}; | ||
process.umask = function () { | ||
return 0; | ||
}; | ||
return exports; | ||
} | ||
const exports$1 = dew(); | ||
const addListener = exports$1.addListener, argv = exports$1.argv, binding = exports$1.binding, browser = exports$1.browser, chdir = exports$1.chdir, cwd = exports$1.cwd, emit = exports$1.emit, env = exports$1.env, listeners = exports$1.listeners, nextTick = exports$1.nextTick, off = exports$1.off, on = exports$1.on, once = exports$1.once, prependListener = exports$1.prependListener, prependOnceListener = exports$1.prependOnceListener, removeAllListeners = exports$1.removeAllListeners, removeListener = exports$1.removeListener, title = exports$1.title, umask = exports$1.umask, version = exports$1.version, versions = exports$1.versions; | ||
export default exports$1; | ||
export { addListener, argv, binding, browser, chdir, cwd, emit, env, listeners, nextTick, off, on, once, prependListener, prependOnceListener, removeAllListeners, removeListener, title, umask, version, versions }; | ||
export{a as addListener,b as argv,c as binding,d as browser,e as chdir,f as cwd,h as default,g as emit,i as env,l as listeners,n as nextTick,o as off,j as on,k as once,p as prependListener,m as prependOnceListener,r as removeAllListeners,q as removeListener,t as title,u as umask,v as version,s as versions}from'./chunk-0c2d1322.js'; |
@@ -1,479 +0,1 @@ | ||
var exports = {}, | ||
_dewExec = false; | ||
function dew() { | ||
if (_dewExec) return exports; | ||
_dewExec = true; | ||
/** Highest positive signed 32-bit float value */ | ||
const maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1 | ||
/** Bootstring parameters */ | ||
const base = 36; | ||
const tMin = 1; | ||
const tMax = 26; | ||
const skew = 38; | ||
const damp = 700; | ||
const initialBias = 72; | ||
const initialN = 128; // 0x80 | ||
const delimiter = '-'; // '\x2D' | ||
/** Regular expressions */ | ||
const regexPunycode = /^xn--/; | ||
const regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars | ||
const regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators | ||
/** Error messages */ | ||
const errors = { | ||
'overflow': 'Overflow: input needs wider integers to process', | ||
'not-basic': 'Illegal input >= 0x80 (not a basic code point)', | ||
'invalid-input': 'Invalid input' | ||
}; | ||
/** Convenience shortcuts */ | ||
const baseMinusTMin = base - tMin; | ||
const floor = Math.floor; | ||
const stringFromCharCode = String.fromCharCode; | ||
/*--------------------------------------------------------------------------*/ | ||
/** | ||
* A generic error utility function. | ||
* @private | ||
* @param {String} type The error type. | ||
* @returns {Error} Throws a `RangeError` with the applicable error message. | ||
*/ | ||
function error(type) { | ||
throw new RangeError(errors[type]); | ||
} | ||
/** | ||
* A generic `Array#map` utility function. | ||
* @private | ||
* @param {Array} array The array to iterate over. | ||
* @param {Function} callback The function that gets called for every array | ||
* item. | ||
* @returns {Array} A new array of values returned by the callback function. | ||
*/ | ||
function map(array, fn) { | ||
const result = []; | ||
let length = array.length; | ||
while (length--) { | ||
result[length] = fn(array[length]); | ||
} | ||
return result; | ||
} | ||
/** | ||
* A simple `Array#map`-like wrapper to work with domain name strings or email | ||
* addresses. | ||
* @private | ||
* @param {String} domain The domain name or email address. | ||
* @param {Function} callback The function that gets called for every | ||
* character. | ||
* @returns {Array} A new string of characters returned by the callback | ||
* function. | ||
*/ | ||
function mapDomain(string, fn) { | ||
const parts = string.split('@'); | ||
let result = ''; | ||
if (parts.length > 1) { | ||
// In email addresses, only the domain name should be punycoded. Leave | ||
// the local part (i.e. everything up to `@`) intact. | ||
result = parts[0] + '@'; | ||
string = parts[1]; | ||
} // Avoid `split(regex)` for IE8 compatibility. See #17. | ||
string = string.replace(regexSeparators, '\x2E'); | ||
const labels = string.split('.'); | ||
const encoded = map(labels, fn).join('.'); | ||
return result + encoded; | ||
} | ||
/** | ||
* Creates an array containing the numeric code points of each Unicode | ||
* character in the string. While JavaScript uses UCS-2 internally, | ||
* this function will convert a pair of surrogate halves (each of which | ||
* UCS-2 exposes as separate characters) into a single code point, | ||
* matching UTF-16. | ||
* @see `punycode.ucs2.encode` | ||
* @see <https://mathiasbynens.be/notes/javascript-encoding> | ||
* @memberOf punycode.ucs2 | ||
* @name decode | ||
* @param {String} string The Unicode input string (UCS-2). | ||
* @returns {Array} The new array of code points. | ||
*/ | ||
function ucs2decode(string) { | ||
const output = []; | ||
let counter = 0; | ||
const length = string.length; | ||
while (counter < length) { | ||
const value = string.charCodeAt(counter++); | ||
if (value >= 0xD800 && value <= 0xDBFF && counter < length) { | ||
// It's a high surrogate, and there is a next character. | ||
const extra = string.charCodeAt(counter++); | ||
if ((extra & 0xFC00) == 0xDC00) { | ||
// Low surrogate. | ||
output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); | ||
} else { | ||
// It's an unmatched surrogate; only append this code unit, in case the | ||
// next code unit is the high surrogate of a surrogate pair. | ||
output.push(value); | ||
counter--; | ||
} | ||
} else { | ||
output.push(value); | ||
} | ||
} | ||
return output; | ||
} | ||
/** | ||
* Creates a string based on an array of numeric code points. | ||
* @see `punycode.ucs2.decode` | ||
* @memberOf punycode.ucs2 | ||
* @name encode | ||
* @param {Array} codePoints The array of numeric code points. | ||
* @returns {String} The new Unicode string (UCS-2). | ||
*/ | ||
const ucs2encode = array => String.fromCodePoint(...array); | ||
/** | ||
* Converts a basic code point into a digit/integer. | ||
* @see `digitToBasic()` | ||
* @private | ||
* @param {Number} codePoint The basic numeric code point value. | ||
* @returns {Number} The numeric value of a basic code point (for use in | ||
* representing integers) in the range `0` to `base - 1`, or `base` if | ||
* the code point does not represent a value. | ||
*/ | ||
const basicToDigit = function (codePoint) { | ||
if (codePoint - 0x30 < 0x0A) { | ||
return codePoint - 0x16; | ||
} | ||
if (codePoint - 0x41 < 0x1A) { | ||
return codePoint - 0x41; | ||
} | ||
if (codePoint - 0x61 < 0x1A) { | ||
return codePoint - 0x61; | ||
} | ||
return base; | ||
}; | ||
/** | ||
* Converts a digit/integer into a basic code point. | ||
* @see `basicToDigit()` | ||
* @private | ||
* @param {Number} digit The numeric value of a basic code point. | ||
* @returns {Number} The basic code point whose value (when used for | ||
* representing integers) is `digit`, which needs to be in the range | ||
* `0` to `base - 1`. If `flag` is non-zero, the uppercase form is | ||
* used; else, the lowercase form is used. The behavior is undefined | ||
* if `flag` is non-zero and `digit` has no uppercase form. | ||
*/ | ||
const digitToBasic = function (digit, flag) { | ||
// 0..25 map to ASCII a..z or A..Z | ||
// 26..35 map to ASCII 0..9 | ||
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); | ||
}; | ||
/** | ||
* Bias adaptation function as per section 3.4 of RFC 3492. | ||
* https://tools.ietf.org/html/rfc3492#section-3.4 | ||
* @private | ||
*/ | ||
const adapt = function (delta, numPoints, firstTime) { | ||
let k = 0; | ||
delta = firstTime ? floor(delta / damp) : delta >> 1; | ||
delta += floor(delta / numPoints); | ||
for (; | ||
/* no initialization */ | ||
delta > baseMinusTMin * tMax >> 1; k += base) { | ||
delta = floor(delta / baseMinusTMin); | ||
} | ||
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); | ||
}; | ||
/** | ||
* Converts a Punycode string of ASCII-only symbols to a string of Unicode | ||
* symbols. | ||
* @memberOf punycode | ||
* @param {String} input The Punycode string of ASCII-only symbols. | ||
* @returns {String} The resulting string of Unicode symbols. | ||
*/ | ||
const decode = function (input) { | ||
// Don't use UCS-2. | ||
const output = []; | ||
const inputLength = input.length; | ||
let i = 0; | ||
let n = initialN; | ||
let bias = initialBias; // Handle the basic code points: let `basic` be the number of input code | ||
// points before the last delimiter, or `0` if there is none, then copy | ||
// the first basic code points to the output. | ||
let basic = input.lastIndexOf(delimiter); | ||
if (basic < 0) { | ||
basic = 0; | ||
} | ||
for (let j = 0; j < basic; ++j) { | ||
// if it's not a basic code point | ||
if (input.charCodeAt(j) >= 0x80) { | ||
error('not-basic'); | ||
} | ||
output.push(input.charCodeAt(j)); | ||
} // Main decoding loop: start just after the last delimiter if any basic code | ||
// points were copied; start at the beginning otherwise. | ||
for (let index = basic > 0 ? basic + 1 : 0; index < inputLength;) | ||
/* no final expression */ | ||
{ | ||
// `index` is the index of the next character to be consumed. | ||
// Decode a generalized variable-length integer into `delta`, | ||
// which gets added to `i`. The overflow checking is easier | ||
// if we increase `i` as we go, then subtract off its starting | ||
// value at the end to obtain `delta`. | ||
let oldi = i; | ||
for (let w = 1, k = base;; | ||
/* no condition */ | ||
k += base) { | ||
if (index >= inputLength) { | ||
error('invalid-input'); | ||
} | ||
const digit = basicToDigit(input.charCodeAt(index++)); | ||
if (digit >= base || digit > floor((maxInt - i) / w)) { | ||
error('overflow'); | ||
} | ||
i += digit * w; | ||
const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; | ||
if (digit < t) { | ||
break; | ||
} | ||
const baseMinusT = base - t; | ||
if (w > floor(maxInt / baseMinusT)) { | ||
error('overflow'); | ||
} | ||
w *= baseMinusT; | ||
} | ||
const out = output.length + 1; | ||
bias = adapt(i - oldi, out, oldi == 0); // `i` was supposed to wrap around from `out` to `0`, | ||
// incrementing `n` each time, so we'll fix that now: | ||
if (floor(i / out) > maxInt - n) { | ||
error('overflow'); | ||
} | ||
n += floor(i / out); | ||
i %= out; // Insert `n` at position `i` of the output. | ||
output.splice(i++, 0, n); | ||
} | ||
return String.fromCodePoint(...output); | ||
}; | ||
/** | ||
* Converts a string of Unicode symbols (e.g. a domain name label) to a | ||
* Punycode string of ASCII-only symbols. | ||
* @memberOf punycode | ||
* @param {String} input The string of Unicode symbols. | ||
* @returns {String} The resulting Punycode string of ASCII-only symbols. | ||
*/ | ||
const encode = function (input) { | ||
const output = []; // Convert the input in UCS-2 to an array of Unicode code points. | ||
input = ucs2decode(input); // Cache the length. | ||
let inputLength = input.length; // Initialize the state. | ||
let n = initialN; | ||
let delta = 0; | ||
let bias = initialBias; // Handle the basic code points. | ||
for (const currentValue of input) { | ||
if (currentValue < 0x80) { | ||
output.push(stringFromCharCode(currentValue)); | ||
} | ||
} | ||
let basicLength = output.length; | ||
let handledCPCount = basicLength; // `handledCPCount` is the number of code points that have been handled; | ||
// `basicLength` is the number of basic code points. | ||
// Finish the basic string with a delimiter unless it's empty. | ||
if (basicLength) { | ||
output.push(delimiter); | ||
} // Main encoding loop: | ||
while (handledCPCount < inputLength) { | ||
// All non-basic code points < n have been handled already. Find the next | ||
// larger one: | ||
let m = maxInt; | ||
for (const currentValue of input) { | ||
if (currentValue >= n && currentValue < m) { | ||
m = currentValue; | ||
} | ||
} // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, | ||
// but guard against overflow. | ||
const handledCPCountPlusOne = handledCPCount + 1; | ||
if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { | ||
error('overflow'); | ||
} | ||
delta += (m - n) * handledCPCountPlusOne; | ||
n = m; | ||
for (const currentValue of input) { | ||
if (currentValue < n && ++delta > maxInt) { | ||
error('overflow'); | ||
} | ||
if (currentValue == n) { | ||
// Represent delta as a generalized variable-length integer. | ||
let q = delta; | ||
for (let k = base;; | ||
/* no condition */ | ||
k += base) { | ||
const t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias; | ||
if (q < t) { | ||
break; | ||
} | ||
const qMinusT = q - t; | ||
const baseMinusT = base - t; | ||
output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))); | ||
q = floor(qMinusT / baseMinusT); | ||
} | ||
output.push(stringFromCharCode(digitToBasic(q, 0))); | ||
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); | ||
delta = 0; | ||
++handledCPCount; | ||
} | ||
} | ||
++delta; | ||
++n; | ||
} | ||
return output.join(''); | ||
}; | ||
/** | ||
* Converts a Punycode string representing a domain name or an email address | ||
* to Unicode. Only the Punycoded parts of the input will be converted, i.e. | ||
* it doesn't matter if you call it on a string that has already been | ||
* converted to Unicode. | ||
* @memberOf punycode | ||
* @param {String} input The Punycoded domain name or email address to | ||
* convert to Unicode. | ||
* @returns {String} The Unicode representation of the given Punycode | ||
* string. | ||
*/ | ||
const toUnicode = function (input) { | ||
return mapDomain(input, function (string) { | ||
return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string; | ||
}); | ||
}; | ||
/** | ||
* Converts a Unicode string representing a domain name or an email address to | ||
* Punycode. Only the non-ASCII parts of the domain name will be converted, | ||
* i.e. it doesn't matter if you call it with a domain that's already in | ||
* ASCII. | ||
* @memberOf punycode | ||
* @param {String} input The domain name or email address to convert, as a | ||
* Unicode string. | ||
* @returns {String} The Punycode representation of the given domain name or | ||
* email address. | ||
*/ | ||
const toASCII = function (input) { | ||
return mapDomain(input, function (string) { | ||
return regexNonASCII.test(string) ? 'xn--' + encode(string) : string; | ||
}); | ||
}; | ||
/*--------------------------------------------------------------------------*/ | ||
/** Define the public API */ | ||
const punycode = { | ||
/** | ||
* A string representing the current Punycode.js version number. | ||
* @memberOf punycode | ||
* @type String | ||
*/ | ||
'version': '2.1.0', | ||
/** | ||
* An object of methods to convert from JavaScript's internal character | ||
* representation (UCS-2) to Unicode code points, and back. | ||
* @see <https://mathiasbynens.be/notes/javascript-encoding> | ||
* @memberOf punycode | ||
* @type Object | ||
*/ | ||
'ucs2': { | ||
'decode': ucs2decode, | ||
'encode': ucs2encode | ||
}, | ||
'decode': decode, | ||
'encode': encode, | ||
'toASCII': toASCII, | ||
'toUnicode': toUnicode | ||
}; | ||
exports = punycode; | ||
return exports; | ||
} | ||
const exports$1 = dew(); | ||
const decode = exports$1.decode, encode = exports$1.encode, toASCII = exports$1.toASCII, toUnicode = exports$1.toUnicode, ucs2 = exports$1.ucs2, version = exports$1.version; | ||
export default exports$1; | ||
export { decode, encode, toASCII, toUnicode, ucs2, version }; | ||
const t=2147483647,o=/^xn--/,n=/[^\0-\x7E]/,e=/[\x2E\u3002\uFF0E\uFF61]/g,r={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},c=Math.floor,s=String.fromCharCode;function i(t){throw new RangeError(r[t])}function f(t,o){const n=t.split("@");let r="";n.length>1&&(r=n[0]+"@",t=n[1]);const c=function(t,o){const n=[];let e=t.length;for(;e--;)n[e]=o(t[e]);return n}((t=t.replace(e,".")).split("."),o).join(".");return r+c}function l(t){const o=[];let n=0;const e=t.length;for(;n<e;){const r=t.charCodeAt(n++);if(r>=55296&&r<=56319&&n<e){const e=t.charCodeAt(n++);56320==(64512&e)?o.push(((1023&r)<<10)+(1023&e)+65536):(o.push(r),n--);}else o.push(r);}return o}const u=function(t,o){return t+22+75*(t<26)-((0!=o)<<5)},a=function(t,o,n){let e=0;for(t=n?c(t/700):t>>1,t+=c(t/o);t>455;e+=36)t=c(t/35);return c(e+36*t/(t+38))},d=function(o){const n=[],e=o.length;let r=0,s=128,f=72,l=o.lastIndexOf("-");l<0&&(l=0);for(let t=0;t<l;++t)o.charCodeAt(t)>=128&&i("not-basic"),n.push(o.charCodeAt(t));for(let d=l>0?l+1:0;d<e;){let l=r;for(let n=1,s=36;;s+=36){d>=e&&i("invalid-input");const l=(u=o.charCodeAt(d++))-48<10?u-22:u-65<26?u-65:u-97<26?u-97:36;(l>=36||l>c((t-r)/n))&&i("overflow"),r+=l*n;const a=s<=f?1:s>=f+26?26:s-f;if(l<a)break;const h=36-a;n>c(t/h)&&i("overflow"),n*=h;}const h=n.length+1;f=a(r-l,h,0==l),c(r/h)>t-s&&i("overflow"),s+=c(r/h),r%=h,n.splice(r++,0,s);}var u;return String.fromCodePoint(...n)},h=function(o){const n=[];let e=(o=l(o)).length,r=128,f=0,d=72;for(const t of o)t<128&&n.push(s(t));let h=n.length,p=h;for(h&&n.push("-");p<e;){let e=t;for(const t of o)t>=r&&t<e&&(e=t);const l=p+1;e-r>c((t-f)/l)&&i("overflow"),f+=(e-r)*l,r=e;for(const e of o)if(e<r&&++f>t&&i("overflow"),e==r){let t=f;for(let o=36;;o+=36){const e=o<=d?1:o>=d+26?26:o-d;if(t<e)break;const r=t-e,i=36-e;n.push(s(u(e+r%i,0))),t=c(r/i);}n.push(s(u(t,0))),d=a(f,l,p==h),f=0,++p;}++f,++r;}return n.join("")};var p={version:"2.1.0",ucs2:{decode:l,encode:t=>String.fromCodePoint(...t)},decode:d,encode:h,toASCII:function(t){return f(t,(function(t){return n.test(t)?"xn--"+h(t):t}))},toUnicode:function(t){return f(t,(function(t){return o.test(t)?d(t.slice(4).toLowerCase()):t}))}};var decode=p.decode;var encode=p.encode;var toASCII=p.toASCII;var toUnicode=p.toUnicode;var ucs2=p.ucs2;var version=p.version;export default p;export{decode,encode,toASCII,toUnicode,ucs2,version}; |
@@ -1,136 +0,1 @@ | ||
var exports = {}, | ||
_dewExec = false; | ||
function dew() { | ||
if (_dewExec) return exports; | ||
_dewExec = true; | ||
// If obj.hasOwnProperty has been overridden, then calling | ||
// obj.hasOwnProperty(prop) will break. | ||
// See: https://github.com/joyent/node/issues/1707 | ||
function hasOwnProperty(obj, prop) { | ||
return Object.prototype.hasOwnProperty.call(obj, prop); | ||
} | ||
exports = function (qs, sep, eq, options) { | ||
sep = sep || '&'; | ||
eq = eq || '='; | ||
var obj = {}; | ||
if (typeof qs !== 'string' || qs.length === 0) { | ||
return obj; | ||
} | ||
var regexp = /\+/g; | ||
qs = qs.split(sep); | ||
var maxKeys = 1000; | ||
if (options && typeof options.maxKeys === 'number') { | ||
maxKeys = options.maxKeys; | ||
} | ||
var len = qs.length; // maxKeys <= 0 means that we should not limit keys count | ||
if (maxKeys > 0 && len > maxKeys) { | ||
len = maxKeys; | ||
} | ||
for (var i = 0; i < len; ++i) { | ||
var x = qs[i].replace(regexp, '%20'), | ||
idx = x.indexOf(eq), | ||
kstr, | ||
vstr, | ||
k, | ||
v; | ||
if (idx >= 0) { | ||
kstr = x.substr(0, idx); | ||
vstr = x.substr(idx + 1); | ||
} else { | ||
kstr = x; | ||
vstr = ''; | ||
} | ||
k = decodeURIComponent(kstr); | ||
v = decodeURIComponent(vstr); | ||
if (!hasOwnProperty(obj, k)) { | ||
obj[k] = v; | ||
} else if (Array.isArray(obj[k])) { | ||
obj[k].push(v); | ||
} else { | ||
obj[k] = [obj[k], v]; | ||
} | ||
} | ||
return obj; | ||
}; | ||
return exports; | ||
} | ||
var exports$1 = {}, | ||
_dewExec$1 = false; | ||
function dew$1() { | ||
if (_dewExec$1) return exports$1; | ||
_dewExec$1 = true; | ||
var stringifyPrimitive = function (v) { | ||
switch (typeof v) { | ||
case 'string': | ||
return v; | ||
case 'boolean': | ||
return v ? 'true' : 'false'; | ||
case 'number': | ||
return isFinite(v) ? v : ''; | ||
default: | ||
return ''; | ||
} | ||
}; | ||
exports$1 = function (obj, sep, eq, name) { | ||
sep = sep || '&'; | ||
eq = eq || '='; | ||
if (obj === null) { | ||
obj = undefined; | ||
} | ||
if (typeof obj === 'object') { | ||
return Object.keys(obj).map(function (k) { | ||
var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; | ||
if (Array.isArray(obj[k])) { | ||
return obj[k].map(function (v) { | ||
return ks + encodeURIComponent(stringifyPrimitive(v)); | ||
}).join(sep); | ||
} else { | ||
return ks + encodeURIComponent(stringifyPrimitive(obj[k])); | ||
} | ||
}).join(sep); | ||
} | ||
if (!name) return ''; | ||
return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj)); | ||
}; | ||
return exports$1; | ||
} | ||
var exports$2 = {}, | ||
_dewExec$2 = false; | ||
function dew$2() { | ||
if (_dewExec$2) return exports$2; | ||
_dewExec$2 = true; | ||
exports$2.decode = exports$2.parse = dew(); | ||
exports$2.encode = exports$2.stringify = dew$1(); | ||
return exports$2; | ||
} | ||
const exports$3 = dew$2(); | ||
const decode = exports$3.decode, encode = exports$3.encode, parse = exports$3.parse, stringify = exports$3.stringify; | ||
export default exports$3; | ||
export { decode, encode, parse, stringify }; | ||
function e(e,n){return Object.prototype.hasOwnProperty.call(e,n)}var n=function(n,r,t,o){r=r||"&",t=t||"=";var a={};if("string"!=typeof n||0===n.length)return a;var u=/\+/g;n=n.split(r);var c=1e3;o&&"number"==typeof o.maxKeys&&(c=o.maxKeys);var i=n.length;c>0&&i>c&&(i=c);for(var s=0;s<i;++s){var p,f,d,y,m=n[s].replace(u,"%20"),l=m.indexOf(t);l>=0?(p=m.substr(0,l),f=m.substr(l+1)):(p=m,f=""),d=decodeURIComponent(p),y=decodeURIComponent(f),e(a,d)?Array.isArray(a[d])?a[d].push(y):a[d]=[a[d],y]:a[d]=y;}return a},r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return ""}},t=function(e,n,t,o){return n=n||"&",t=t||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(o){var a=encodeURIComponent(r(o))+t;return Array.isArray(e[o])?e[o].map((function(e){return a+encodeURIComponent(r(e))})).join(n):a+encodeURIComponent(r(e[o]))})).join(n):o?encodeURIComponent(r(o))+t+encodeURIComponent(r(e)):""},o={};o.decode=o.parse=n,o.encode=o.stringify=t;var decode=o.decode;var encode=o.encode;var parse=o.parse;var stringify=o.stringify;export default o;export{decode,encode,parse,stringify}; |
@@ -1,171 +0,1 @@ | ||
import { b as dew$8 } from './util-c86b84df.js'; | ||
import './process.js'; | ||
import './buffer.js'; | ||
import './string_decoder-a044d0fd.js'; | ||
import _events from './events.js'; | ||
import { a as dew$5, b as dew$6, c as dew$7 } from './chunk-147c6ebb.js'; | ||
var exports = {}, | ||
_dewExec = false; | ||
function dew() { | ||
if (_dewExec) return exports; | ||
_dewExec = true; | ||
exports = dew$5(); | ||
return exports; | ||
} | ||
var exports$1 = {}, | ||
_dewExec$1 = false; | ||
function dew$1() { | ||
if (_dewExec$1) return exports$1; | ||
_dewExec$1 = true; | ||
exports$1 = dew$6(); | ||
return exports$1; | ||
} | ||
var exports$2 = {}, | ||
_dewExec$2 = false; | ||
function dew$2() { | ||
if (_dewExec$2) return exports$2; | ||
_dewExec$2 = true; | ||
exports$2 = dew$7().Transform; | ||
return exports$2; | ||
} | ||
var exports$3 = {}, | ||
_dewExec$3 = false; | ||
function dew$3() { | ||
if (_dewExec$3) return exports$3; | ||
_dewExec$3 = true; | ||
exports$3 = dew$7().PassThrough; | ||
return exports$3; | ||
} | ||
var exports$4 = {}, | ||
_dewExec$4 = false; | ||
var _global = typeof self !== "undefined" ? self : global; | ||
function dew$4() { | ||
if (_dewExec$4) return exports$4; | ||
_dewExec$4 = true; | ||
// Copyright Joyent, Inc. and other Node contributors. | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a | ||
// copy of this software and associated documentation files (the | ||
// "Software"), to deal in the Software without restriction, including | ||
// without limitation the rights to use, copy, modify, merge, publish, | ||
// distribute, sublicense, and/or sell copies of the Software, and to permit | ||
// persons to whom the Software is furnished to do so, subject to the | ||
// following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included | ||
// in all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN | ||
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, | ||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | ||
// USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
exports$4 = Stream; | ||
var EE = _events.EventEmitter; | ||
var inherits = dew$8(); | ||
inherits(Stream, EE); | ||
Stream.Readable = dew$7(); | ||
Stream.Writable = dew(); | ||
Stream.Duplex = dew$1(); | ||
Stream.Transform = dew$2(); | ||
Stream.PassThrough = dew$3(); // Backwards-compat with node 0.4.x | ||
Stream.Stream = Stream; // old-style streams. Note that the pipe method (the only relevant | ||
// part of this class) is overridden in the Readable class. | ||
function Stream() { | ||
EE.call(this || _global); | ||
} | ||
Stream.prototype.pipe = function (dest, options) { | ||
var source = this || _global; | ||
function ondata(chunk) { | ||
if (dest.writable) { | ||
if (false === dest.write(chunk) && source.pause) { | ||
source.pause(); | ||
} | ||
} | ||
} | ||
source.on('data', ondata); | ||
function ondrain() { | ||
if (source.readable && source.resume) { | ||
source.resume(); | ||
} | ||
} | ||
dest.on('drain', ondrain); // If the 'end' option is not supplied, dest.end() will be called when | ||
// source gets the 'end' or 'close' events. Only dest.end() once. | ||
if (!dest._isStdio && (!options || options.end !== false)) { | ||
source.on('end', onend); | ||
source.on('close', onclose); | ||
} | ||
var didOnEnd = false; | ||
function onend() { | ||
if (didOnEnd) return; | ||
didOnEnd = true; | ||
dest.end(); | ||
} | ||
function onclose() { | ||
if (didOnEnd) return; | ||
didOnEnd = true; | ||
if (typeof dest.destroy === 'function') dest.destroy(); | ||
} // don't leave dangling pipes when there are errors. | ||
function onerror(er) { | ||
cleanup(); | ||
if (EE.listenerCount(this || _global, 'error') === 0) { | ||
throw er; // Unhandled stream error in pipe. | ||
} | ||
} | ||
source.on('error', onerror); | ||
dest.on('error', onerror); // remove all the event listeners that were added. | ||
function cleanup() { | ||
source.removeListener('data', ondata); | ||
dest.removeListener('drain', ondrain); | ||
source.removeListener('end', onend); | ||
source.removeListener('close', onclose); | ||
source.removeListener('error', onerror); | ||
dest.removeListener('error', onerror); | ||
source.removeListener('end', cleanup); | ||
source.removeListener('close', cleanup); | ||
dest.removeListener('close', cleanup); | ||
} | ||
source.on('end', cleanup); | ||
source.on('close', cleanup); | ||
dest.on('close', cleanup); | ||
dest.emit('pipe', source); // Allow for unix-like usage: A.pipe(B).pipe(C) | ||
return dest; | ||
}; | ||
return exports$4; | ||
} | ||
const exports$5 = dew$4(); | ||
const Duplex = exports$5.Duplex, PassThrough = exports$5.PassThrough, Readable = exports$5.Readable, Stream = exports$5.Stream, Transform = exports$5.Transform, Writable = exports$5.Writable, super_ = exports$5.super_; | ||
export default exports$5; | ||
export { Duplex, PassThrough, Readable, Stream, Transform, Writable, super_ }; | ||
import {t}from'./chunk-dac557ba.js';import'./chunk-0c2d1322.js';import'./buffer.js';import'./util.js';import'./chunk-6e68c801.js';import r from'./events.js';import {o,s,e,t as t$1,i,r as r$1,m}from'./chunk-cffba9d4.js';var l,d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:global;l=p;var f=r.EventEmitter;function p(){f.call(this||d);}t(p,f),p.Readable=o,p.Writable=s,p.Duplex=e,p.Transform=t$1,p.PassThrough=i,p.finished=r$1,p.pipeline=m,p.Stream=p,p.prototype.pipe=function(e,r){var t=this||d;function o(r){e.writable&&!1===e.write(r)&&t.pause&&t.pause();}function i(){t.readable&&t.resume&&t.resume();}t.on("data",o),e.on("drain",i),e._isStdio||r&&!1===r.end||(t.on("end",a),t.on("close",s));var n=!1;function a(){n||(n=!0,e.end());}function s(){n||(n=!0,"function"==typeof e.destroy&&e.destroy());}function m(e){if(l(),0===f.listenerCount(this||d,"error"))throw e}function l(){t.removeListener("data",o),e.removeListener("drain",i),t.removeListener("end",a),t.removeListener("close",s),t.removeListener("error",m),e.removeListener("error",m),t.removeListener("end",l),t.removeListener("close",l),e.removeListener("close",l);}return t.on("error",m),e.on("error",m),t.on("end",l),t.on("close",l),e.on("close",l),e.emit("pipe",t),e};var b=l;var Readable=b.Readable;var Writable=b.Writable;var Duplex=b.Duplex;var Transform=b.Transform;var PassThrough=b.PassThrough;var finished=b.finished;var pipeline=b.pipeline;var Stream=b.Stream;export default b;export{Duplex,PassThrough,Readable,Stream,Transform,Writable,finished,pipeline}; |
@@ -1,2 +0,1 @@ | ||
import './buffer.js'; | ||
export { c as StringDecoder, b as default } from './string_decoder-a044d0fd.js'; | ||
import'./buffer.js';import {s as string_decoder}from'./chunk-6e68c801.js';var StringDecoder=string_decoder.StringDecoder;export default string_decoder;export{StringDecoder}; |
@@ -1,2 +0,1 @@ | ||
export { c as _extend, d as callbackify, e as debuglog, f as deprecate, g as format, h as inherits, i as inspect, j as isArray, k as isBoolean, l as isBuffer, m as isDate, n as isError, o as isFunction, p as isNull, q as isNullOrUndefined, r as isNumber, s as isObject, t as isPrimitive, u as isRegExp, v as isString, w as isSymbol, x as isUndefined, y as log, z as promisify } from './util-c86b84df.js'; | ||
import './process.js'; | ||
import'./chunk-dac557ba.js';import'./chunk-0c2d1322.js';import a from'./util.js';export{_extend,callbackify,debuglog,deprecate,format,inherits,inspect,isArray,isBoolean,isBuffer,isDate,isError,isFunction,isNull,isNullOrUndefined,isNumber,isObject,isPrimitive,isRegExp,isString,isSymbol,isUndefined,log,promisify}from'./util.js';export default a; |
@@ -1,290 +0,1 @@ | ||
import _process from './process.js'; | ||
var exports = {}, | ||
_dewExec = false; | ||
var _global = typeof self !== "undefined" ? self : global; | ||
function dew() { | ||
if (_dewExec) return exports; | ||
_dewExec = true; | ||
var process = _process; | ||
(function (global, undefined$1) { | ||
if (global.setImmediate) { | ||
return; | ||
} | ||
var nextHandle = 1; // Spec says greater than zero | ||
var tasksByHandle = {}; | ||
var currentlyRunningATask = false; | ||
var doc = global.document; | ||
var registerImmediate; | ||
function setImmediate(callback) { | ||
// Callback can either be a function or a string | ||
if (typeof callback !== "function") { | ||
callback = new Function("" + callback); | ||
} // Copy function arguments | ||
var args = new Array(arguments.length - 1); | ||
for (var i = 0; i < args.length; i++) { | ||
args[i] = arguments[i + 1]; | ||
} // Store and register the task | ||
var task = { | ||
callback: callback, | ||
args: args | ||
}; | ||
tasksByHandle[nextHandle] = task; | ||
registerImmediate(nextHandle); | ||
return nextHandle++; | ||
} | ||
function clearImmediate(handle) { | ||
delete tasksByHandle[handle]; | ||
} | ||
function run(task) { | ||
var callback = task.callback; | ||
var args = task.args; | ||
switch (args.length) { | ||
case 0: | ||
callback(); | ||
break; | ||
case 1: | ||
callback(args[0]); | ||
break; | ||
case 2: | ||
callback(args[0], args[1]); | ||
break; | ||
case 3: | ||
callback(args[0], args[1], args[2]); | ||
break; | ||
default: | ||
callback.apply(undefined$1, args); | ||
break; | ||
} | ||
} | ||
function runIfPresent(handle) { | ||
// From the spec: "Wait until any invocations of this algorithm started before this one have completed." | ||
// So if we're currently running a task, we'll need to delay this invocation. | ||
if (currentlyRunningATask) { | ||
// Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a | ||
// "too much recursion" error. | ||
setTimeout(runIfPresent, 0, handle); | ||
} else { | ||
var task = tasksByHandle[handle]; | ||
if (task) { | ||
currentlyRunningATask = true; | ||
try { | ||
run(task); | ||
} finally { | ||
clearImmediate(handle); | ||
currentlyRunningATask = false; | ||
} | ||
} | ||
} | ||
} | ||
function installNextTickImplementation() { | ||
registerImmediate = function (handle) { | ||
process.nextTick(function () { | ||
runIfPresent(handle); | ||
}); | ||
}; | ||
} | ||
function canUsePostMessage() { | ||
// The test against `importScripts` prevents this implementation from being installed inside a web worker, | ||
// where `global.postMessage` means something completely different and can't be used for this purpose. | ||
if (global.postMessage && !global.importScripts) { | ||
var postMessageIsAsynchronous = true; | ||
var oldOnMessage = global.onmessage; | ||
global.onmessage = function () { | ||
postMessageIsAsynchronous = false; | ||
}; | ||
global.postMessage("", "*"); | ||
global.onmessage = oldOnMessage; | ||
return postMessageIsAsynchronous; | ||
} | ||
} | ||
function installPostMessageImplementation() { | ||
// Installs an event handler on `global` for the `message` event: see | ||
// * https://developer.mozilla.org/en/DOM/window.postMessage | ||
// * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages | ||
var messagePrefix = "setImmediate$" + Math.random() + "$"; | ||
var onGlobalMessage = function (event) { | ||
if (event.source === global && typeof event.data === "string" && event.data.indexOf(messagePrefix) === 0) { | ||
runIfPresent(+event.data.slice(messagePrefix.length)); | ||
} | ||
}; | ||
if (global.addEventListener) { | ||
global.addEventListener("message", onGlobalMessage, false); | ||
} else { | ||
global.attachEvent("onmessage", onGlobalMessage); | ||
} | ||
registerImmediate = function (handle) { | ||
global.postMessage(messagePrefix + handle, "*"); | ||
}; | ||
} | ||
function installMessageChannelImplementation() { | ||
var channel = new MessageChannel(); | ||
channel.port1.onmessage = function (event) { | ||
var handle = event.data; | ||
runIfPresent(handle); | ||
}; | ||
registerImmediate = function (handle) { | ||
channel.port2.postMessage(handle); | ||
}; | ||
} | ||
function installReadyStateChangeImplementation() { | ||
var html = doc.documentElement; | ||
registerImmediate = function (handle) { | ||
// Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted | ||
// into the document. Do so, thus queuing up the task. Remember to clean up once it's been called. | ||
var script = doc.createElement("script"); | ||
script.onreadystatechange = function () { | ||
runIfPresent(handle); | ||
script.onreadystatechange = null; | ||
html.removeChild(script); | ||
script = null; | ||
}; | ||
html.appendChild(script); | ||
}; | ||
} | ||
function installSetTimeoutImplementation() { | ||
registerImmediate = function (handle) { | ||
setTimeout(runIfPresent, 0, handle); | ||
}; | ||
} // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live. | ||
var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global); | ||
attachTo = attachTo && attachTo.setTimeout ? attachTo : global; // Don't get fooled by e.g. browserify environments. | ||
if ({}.toString.call(global.process) === "[object process]") { | ||
// For Node.js before 0.9 | ||
installNextTickImplementation(); | ||
} else if (canUsePostMessage()) { | ||
// For non-IE10 modern browsers | ||
installPostMessageImplementation(); | ||
} else if (global.MessageChannel) { | ||
// For web workers, where supported | ||
installMessageChannelImplementation(); | ||
} else if (doc && "onreadystatechange" in doc.createElement("script")) { | ||
// For IE 6–8 | ||
installReadyStateChangeImplementation(); | ||
} else { | ||
// For older browsers | ||
installSetTimeoutImplementation(); | ||
} | ||
attachTo.setImmediate = setImmediate; | ||
attachTo.clearImmediate = clearImmediate; | ||
})(typeof self === "undefined" ? typeof _global === "undefined" ? exports : _global : self); | ||
return exports; | ||
} | ||
var exports$1 = {}, | ||
_dewExec$1 = false; | ||
var _global$1 = typeof self !== "undefined" ? self : global; | ||
function dew$1() { | ||
if (_dewExec$1) return exports$1; | ||
_dewExec$1 = true; | ||
var scope = typeof _global$1 !== "undefined" && _global$1 || typeof self !== "undefined" && self || window; | ||
var apply = Function.prototype.apply; // DOM APIs, for completeness | ||
exports$1.setTimeout = function () { | ||
return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout); | ||
}; | ||
exports$1.setInterval = function () { | ||
return new Timeout(apply.call(setInterval, scope, arguments), clearInterval); | ||
}; | ||
exports$1.clearTimeout = exports$1.clearInterval = function (timeout) { | ||
if (timeout) { | ||
timeout.close(); | ||
} | ||
}; | ||
function Timeout(id, clearFn) { | ||
(this || _global$1)._id = id; | ||
(this || _global$1)._clearFn = clearFn; | ||
} | ||
Timeout.prototype.unref = Timeout.prototype.ref = function () {}; | ||
Timeout.prototype.close = function () { | ||
(this || _global$1)._clearFn.call(scope, (this || _global$1)._id); | ||
}; // Does not start the time, just sets up the members needed. | ||
exports$1.enroll = function (item, msecs) { | ||
clearTimeout(item._idleTimeoutId); | ||
item._idleTimeout = msecs; | ||
}; | ||
exports$1.unenroll = function (item) { | ||
clearTimeout(item._idleTimeoutId); | ||
item._idleTimeout = -1; | ||
}; | ||
exports$1._unrefActive = exports$1.active = function (item) { | ||
clearTimeout(item._idleTimeoutId); | ||
var msecs = item._idleTimeout; | ||
if (msecs >= 0) { | ||
item._idleTimeoutId = setTimeout(function onTimeout() { | ||
if (item._onTimeout) item._onTimeout(); | ||
}, msecs); | ||
} | ||
}; // setimmediate attaches itself to the global object | ||
dew(); // On some exotic environments, it's not clear which object `setimmediate` was | ||
// able to install onto. Search each possibility in the same order as the | ||
// `setimmediate` library. | ||
exports$1.setImmediate = typeof self !== "undefined" && self.setImmediate || typeof _global$1 !== "undefined" && _global$1.setImmediate || exports$1 && exports$1.setImmediate; | ||
exports$1.clearImmediate = typeof self !== "undefined" && self.clearImmediate || typeof _global$1 !== "undefined" && _global$1.clearImmediate || exports$1 && exports$1.clearImmediate; | ||
return exports$1; | ||
} | ||
const exports$2 = dew$1(); | ||
const _unrefActive = exports$2._unrefActive, active = exports$2.active, clearImmediate = exports$2.clearImmediate, clearInterval$1 = exports$2.clearInterval, clearTimeout$1 = exports$2.clearTimeout, enroll = exports$2.enroll, setImmediate = exports$2.setImmediate, setInterval$1 = exports$2.setInterval, setTimeout$1 = exports$2.setTimeout, unenroll = exports$2.unenroll; | ||
export default exports$2; | ||
export { _unrefActive, active, clearImmediate, clearInterval$1 as clearInterval, clearTimeout$1 as clearTimeout, enroll, setImmediate, setInterval$1 as setInterval, setTimeout$1 as setTimeout, unenroll }; | ||
import {h}from'./chunk-0c2d1322.js';var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:global,n={},a=h;!function(e,t){if(!e.setImmediate){var n,s,o,i,c,r=1,f={},l=!1,d=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,"[object process]"==={}.toString.call(e.process)?n=function(e){a.nextTick((function(){m(e);}));}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1;},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){m(e.data);},n=function(e){o.port2.postMessage(e);}):d&&"onreadystatechange"in d.createElement("script")?(s=d.documentElement,n=function(e){var t=d.createElement("script");t.onreadystatechange=function(){m(e),t.onreadystatechange=null,s.removeChild(t),t=null;},s.appendChild(t);}):n=function(e){setTimeout(m,0,e);}:(i="setImmediate$"+Math.random()+"$",c=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(i)&&m(+t.data.slice(i.length));},e.addEventListener?e.addEventListener("message",c,!1):e.attachEvent("onmessage",c),n=function(t){e.postMessage(i+t,"*");}),u.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),a=0;a<t.length;a++)t[a]=arguments[a+1];var s={callback:e,args:t};return f[r]=s,n(r),r++},u.clearImmediate=g;}function g(e){delete f[e];}function m(e){if(l)setTimeout(m,0,e);else {var t=f[e];if(t){l=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n);}}(t);}finally{g(e),l=!1;}}}}}("undefined"==typeof self?void 0===t?n:t:self);var t$1="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:global,i={},o=void 0!==t$1&&t$1||"undefined"!=typeof self&&self||window,l=Function.prototype.apply;function n$1(e,i){(this||t$1)._id=e,(this||t$1)._clearFn=i;}i.setTimeout=function(){return new n$1(l.call(setTimeout,o,arguments),clearTimeout)},i.setInterval=function(){return new n$1(l.call(setInterval,o,arguments),clearInterval)},i.clearTimeout=i.clearInterval=function(e){e&&e.close();},n$1.prototype.unref=n$1.prototype.ref=function(){},n$1.prototype.close=function(){(this||t$1)._clearFn.call(o,(this||t$1)._id);},i.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t;},i.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1;},i._unrefActive=i.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout();}),t));},i.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t$1&&t$1.setImmediate||i&&i.setImmediate,i.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t$1&&t$1.clearImmediate||i&&i.clearImmediate;var _unrefActive=i._unrefActive;var active=i.active;var clearImmediate=i.clearImmediate;var clearInterval$1=i.clearInterval;var clearTimeout$1=i.clearTimeout;var enroll=i.enroll;var setImmediate=i.setImmediate;var setInterval$1=i.setInterval;var setTimeout$1=i.setTimeout;var unenroll=i.unenroll;export default i;export{_unrefActive,active,clearImmediate,clearInterval$1 as clearInterval,clearTimeout$1 as clearTimeout,enroll,setImmediate,setInterval$1 as setInterval,setTimeout$1 as setTimeout,unenroll}; |
@@ -1,29 +0,1 @@ | ||
var exports = {}, | ||
_dewExec = false; | ||
function dew() { | ||
if (_dewExec) return exports; | ||
_dewExec = true; | ||
exports.isatty = function () { | ||
return false; | ||
}; | ||
function ReadStream() { | ||
throw new Error('tty.ReadStream is not implemented'); | ||
} | ||
exports.ReadStream = ReadStream; | ||
function WriteStream() { | ||
throw new Error('tty.WriteStream is not implemented'); | ||
} | ||
exports.WriteStream = WriteStream; | ||
return exports; | ||
} | ||
const exports$1 = dew(); | ||
const ReadStream = exports$1.ReadStream, WriteStream = exports$1.WriteStream, isatty = exports$1.isatty; | ||
export default exports$1; | ||
export { ReadStream, WriteStream, isatty }; | ||
var t={};t.isatty=function(){return !1},t.ReadStream=function(){throw new Error("tty.ReadStream is not implemented")},t.WriteStream=function(){throw new Error("tty.WriteStream is not implemented")};var ReadStream=t.ReadStream;var WriteStream=t.WriteStream;var isatty=t.isatty;export default t;export{ReadStream,WriteStream,isatty}; |
@@ -1,744 +0,2 @@ | ||
import _punycode from './punycode.js'; | ||
import _querystring from './querystring.js'; | ||
var exports = {}, | ||
_dewExec = false; | ||
function dew() { | ||
if (_dewExec) return exports; | ||
_dewExec = true; | ||
exports = { | ||
isString: function (arg) { | ||
return typeof arg === 'string'; | ||
}, | ||
isObject: function (arg) { | ||
return typeof arg === 'object' && arg !== null; | ||
}, | ||
isNull: function (arg) { | ||
return arg === null; | ||
}, | ||
isNullOrUndefined: function (arg) { | ||
return arg == null; | ||
} | ||
}; | ||
return exports; | ||
} | ||
var exports$1 = {}, | ||
_dewExec$1 = false; | ||
function dew$1() { | ||
if (_dewExec$1) return exports$1; | ||
_dewExec$1 = true; | ||
var punycode = _punycode; | ||
var util = dew(); | ||
exports$1.parse = urlParse; | ||
exports$1.resolve = urlResolve; | ||
exports$1.resolveObject = urlResolveObject; | ||
exports$1.format = urlFormat; | ||
exports$1.Url = Url; | ||
function Url() { | ||
this.protocol = null; | ||
this.slashes = null; | ||
this.auth = null; | ||
this.host = null; | ||
this.port = null; | ||
this.hostname = null; | ||
this.hash = null; | ||
this.search = null; | ||
this.query = null; | ||
this.pathname = null; | ||
this.path = null; | ||
this.href = null; | ||
} // Reference: RFC 3986, RFC 1808, RFC 2396 | ||
// define these here so at least they only have to be | ||
// compiled once on the first module load. | ||
var protocolPattern = /^([a-z0-9.+-]+:)/i, | ||
portPattern = /:[0-9]*$/, | ||
// Special case for a simple path URL | ||
simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, | ||
// RFC 2396: characters reserved for delimiting URLs. | ||
// We actually just auto-escape these. | ||
delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'], | ||
// RFC 2396: characters not allowed for various reasons. | ||
unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims), | ||
// Allowed by RFCs, but cause of XSS attacks. Always escape these. | ||
autoEscape = ['\''].concat(unwise), | ||
// Characters that are never ever allowed in a hostname. | ||
// Note that any invalid chars are also handled, but these | ||
// are the ones that are *expected* to be seen, so we fast-path | ||
// them. | ||
nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape), | ||
hostEndingChars = ['/', '?', '#'], | ||
hostnameMaxLen = 255, | ||
hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/, | ||
hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, | ||
// protocols that can allow "unsafe" and "unwise" chars. | ||
unsafeProtocol = { | ||
'javascript': true, | ||
'javascript:': true | ||
}, | ||
// protocols that never have a hostname. | ||
hostlessProtocol = { | ||
'javascript': true, | ||
'javascript:': true | ||
}, | ||
// protocols that always contain a // bit. | ||
slashedProtocol = { | ||
'http': true, | ||
'https': true, | ||
'ftp': true, | ||
'gopher': true, | ||
'file': true, | ||
'http:': true, | ||
'https:': true, | ||
'ftp:': true, | ||
'gopher:': true, | ||
'file:': true | ||
}, | ||
querystring = _querystring; | ||
function urlParse(url, parseQueryString, slashesDenoteHost) { | ||
if (url && util.isObject(url) && url instanceof Url) return url; | ||
var u = new Url(); | ||
u.parse(url, parseQueryString, slashesDenoteHost); | ||
return u; | ||
} | ||
Url.prototype.parse = function (url, parseQueryString, slashesDenoteHost) { | ||
if (!util.isString(url)) { | ||
throw new TypeError("Parameter 'url' must be a string, not " + typeof url); | ||
} // Copy chrome, IE, opera backslash-handling behavior. | ||
// Back slashes before the query string get converted to forward slashes | ||
// See: https://code.google.com/p/chromium/issues/detail?id=25916 | ||
var queryIndex = url.indexOf('?'), | ||
splitter = queryIndex !== -1 && queryIndex < url.indexOf('#') ? '?' : '#', | ||
uSplit = url.split(splitter), | ||
slashRegex = /\\/g; | ||
uSplit[0] = uSplit[0].replace(slashRegex, '/'); | ||
url = uSplit.join(splitter); | ||
var rest = url; // trim before proceeding. | ||
// This is to support parse stuff like " http://foo.com \n" | ||
rest = rest.trim(); | ||
if (!slashesDenoteHost && url.split('#').length === 1) { | ||
// Try fast path regexp | ||
var simplePath = simplePathPattern.exec(rest); | ||
if (simplePath) { | ||
this.path = rest; | ||
this.href = rest; | ||
this.pathname = simplePath[1]; | ||
if (simplePath[2]) { | ||
this.search = simplePath[2]; | ||
if (parseQueryString) { | ||
this.query = querystring.parse(this.search.substr(1)); | ||
} else { | ||
this.query = this.search.substr(1); | ||
} | ||
} else if (parseQueryString) { | ||
this.search = ''; | ||
this.query = {}; | ||
} | ||
return this; | ||
} | ||
} | ||
var proto = protocolPattern.exec(rest); | ||
if (proto) { | ||
proto = proto[0]; | ||
var lowerProto = proto.toLowerCase(); | ||
this.protocol = lowerProto; | ||
rest = rest.substr(proto.length); | ||
} // figure out if it's got a host | ||
// user@server is *always* interpreted as a hostname, and url | ||
// resolution will treat //foo/bar as host=foo,path=bar because that's | ||
// how the browser resolves relative URLs. | ||
if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { | ||
var slashes = rest.substr(0, 2) === '//'; | ||
if (slashes && !(proto && hostlessProtocol[proto])) { | ||
rest = rest.substr(2); | ||
this.slashes = true; | ||
} | ||
} | ||
if (!hostlessProtocol[proto] && (slashes || proto && !slashedProtocol[proto])) { | ||
// there's a hostname. | ||
// the first instance of /, ?, ;, or # ends the host. | ||
// | ||
// If there is an @ in the hostname, then non-host chars *are* allowed | ||
// to the left of the last @ sign, unless some host-ending character | ||
// comes *before* the @-sign. | ||
// URLs are obnoxious. | ||
// | ||
// ex: | ||
// http://a@b@c/ => user:a@b host:c | ||
// http://a@b?@c => user:a host:c path:/?@c | ||
// v0.12 TODO(isaacs): This is not quite how Chrome does things. | ||
// Review our test case against browsers more comprehensively. | ||
// find the first instance of any hostEndingChars | ||
var hostEnd = -1; | ||
for (var i = 0; i < hostEndingChars.length; i++) { | ||
var hec = rest.indexOf(hostEndingChars[i]); | ||
if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) hostEnd = hec; | ||
} // at this point, either we have an explicit point where the | ||
// auth portion cannot go past, or the last @ char is the decider. | ||
var auth, atSign; | ||
if (hostEnd === -1) { | ||
// atSign can be anywhere. | ||
atSign = rest.lastIndexOf('@'); | ||
} else { | ||
// atSign must be in auth portion. | ||
// http://a@b/c@d => host:b auth:a path:/c@d | ||
atSign = rest.lastIndexOf('@', hostEnd); | ||
} // Now we have a portion which is definitely the auth. | ||
// Pull that off. | ||
if (atSign !== -1) { | ||
auth = rest.slice(0, atSign); | ||
rest = rest.slice(atSign + 1); | ||
this.auth = decodeURIComponent(auth); | ||
} // the host is the remaining to the left of the first non-host char | ||
hostEnd = -1; | ||
for (var i = 0; i < nonHostChars.length; i++) { | ||
var hec = rest.indexOf(nonHostChars[i]); | ||
if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) hostEnd = hec; | ||
} // if we still have not hit it, then the entire thing is a host. | ||
if (hostEnd === -1) hostEnd = rest.length; | ||
this.host = rest.slice(0, hostEnd); | ||
rest = rest.slice(hostEnd); // pull out port. | ||
this.parseHost(); // we've indicated that there is a hostname, | ||
// so even if it's empty, it has to be present. | ||
this.hostname = this.hostname || ''; // if hostname begins with [ and ends with ] | ||
// assume that it's an IPv6 address. | ||
var ipv6Hostname = this.hostname[0] === '[' && this.hostname[this.hostname.length - 1] === ']'; // validate a little. | ||
if (!ipv6Hostname) { | ||
var hostparts = this.hostname.split(/\./); | ||
for (var i = 0, l = hostparts.length; i < l; i++) { | ||
var part = hostparts[i]; | ||
if (!part) continue; | ||
if (!part.match(hostnamePartPattern)) { | ||
var newpart = ''; | ||
for (var j = 0, k = part.length; j < k; j++) { | ||
if (part.charCodeAt(j) > 127) { | ||
// we replace non-ASCII char with a temporary placeholder | ||
// we need this to make sure size of hostname is not | ||
// broken by replacing non-ASCII by nothing | ||
newpart += 'x'; | ||
} else { | ||
newpart += part[j]; | ||
} | ||
} // we test again with ASCII char only | ||
if (!newpart.match(hostnamePartPattern)) { | ||
var validParts = hostparts.slice(0, i); | ||
var notHost = hostparts.slice(i + 1); | ||
var bit = part.match(hostnamePartStart); | ||
if (bit) { | ||
validParts.push(bit[1]); | ||
notHost.unshift(bit[2]); | ||
} | ||
if (notHost.length) { | ||
rest = '/' + notHost.join('.') + rest; | ||
} | ||
this.hostname = validParts.join('.'); | ||
break; | ||
} | ||
} | ||
} | ||
} | ||
if (this.hostname.length > hostnameMaxLen) { | ||
this.hostname = ''; | ||
} else { | ||
// hostnames are always lower case. | ||
this.hostname = this.hostname.toLowerCase(); | ||
} | ||
if (!ipv6Hostname) { | ||
// IDNA Support: Returns a punycoded representation of "domain". | ||
// It only converts parts of the domain name that | ||
// have non-ASCII characters, i.e. it doesn't matter if | ||
// you call it with a domain that already is ASCII-only. | ||
this.hostname = punycode.toASCII(this.hostname); | ||
} | ||
var p = this.port ? ':' + this.port : ''; | ||
var h = this.hostname || ''; | ||
this.host = h + p; | ||
this.href += this.host; // strip [ and ] from the hostname | ||
// the host field still retains them, though | ||
if (ipv6Hostname) { | ||
this.hostname = this.hostname.substr(1, this.hostname.length - 2); | ||
if (rest[0] !== '/') { | ||
rest = '/' + rest; | ||
} | ||
} | ||
} // now rest is set to the post-host stuff. | ||
// chop off any delim chars. | ||
if (!unsafeProtocol[lowerProto]) { | ||
// First, make 100% sure that any "autoEscape" chars get | ||
// escaped, even if encodeURIComponent doesn't think they | ||
// need to be. | ||
for (var i = 0, l = autoEscape.length; i < l; i++) { | ||
var ae = autoEscape[i]; | ||
if (rest.indexOf(ae) === -1) continue; | ||
var esc = encodeURIComponent(ae); | ||
if (esc === ae) { | ||
esc = escape(ae); | ||
} | ||
rest = rest.split(ae).join(esc); | ||
} | ||
} // chop off from the tail first. | ||
var hash = rest.indexOf('#'); | ||
if (hash !== -1) { | ||
// got a fragment string. | ||
this.hash = rest.substr(hash); | ||
rest = rest.slice(0, hash); | ||
} | ||
var qm = rest.indexOf('?'); | ||
if (qm !== -1) { | ||
this.search = rest.substr(qm); | ||
this.query = rest.substr(qm + 1); | ||
if (parseQueryString) { | ||
this.query = querystring.parse(this.query); | ||
} | ||
rest = rest.slice(0, qm); | ||
} else if (parseQueryString) { | ||
// no query string, but parseQueryString still requested | ||
this.search = ''; | ||
this.query = {}; | ||
} | ||
if (rest) this.pathname = rest; | ||
if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) { | ||
this.pathname = '/'; | ||
} //to support http.request | ||
if (this.pathname || this.search) { | ||
var p = this.pathname || ''; | ||
var s = this.search || ''; | ||
this.path = p + s; | ||
} // finally, reconstruct the href based on what has been validated. | ||
this.href = this.format(); | ||
return this; | ||
}; // format a parsed object into a url string | ||
function urlFormat(obj) { | ||
// ensure it's an object, and not a string url. | ||
// If it's an obj, this is a no-op. | ||
// this way, you can call url_format() on strings | ||
// to clean up potentially wonky urls. | ||
if (util.isString(obj)) obj = urlParse(obj); | ||
if (!(obj instanceof Url)) return Url.prototype.format.call(obj); | ||
return obj.format(); | ||
} | ||
Url.prototype.format = function () { | ||
var auth = this.auth || ''; | ||
if (auth) { | ||
auth = encodeURIComponent(auth); | ||
auth = auth.replace(/%3A/i, ':'); | ||
auth += '@'; | ||
} | ||
var protocol = this.protocol || '', | ||
pathname = this.pathname || '', | ||
hash = this.hash || '', | ||
host = false, | ||
query = ''; | ||
if (this.host) { | ||
host = auth + this.host; | ||
} else if (this.hostname) { | ||
host = auth + (this.hostname.indexOf(':') === -1 ? this.hostname : '[' + this.hostname + ']'); | ||
if (this.port) { | ||
host += ':' + this.port; | ||
} | ||
} | ||
if (this.query && util.isObject(this.query) && Object.keys(this.query).length) { | ||
query = querystring.stringify(this.query); | ||
} | ||
var search = this.search || query && '?' + query || ''; | ||
if (protocol && protocol.substr(-1) !== ':') protocol += ':'; // only the slashedProtocols get the //. Not mailto:, xmpp:, etc. | ||
// unless they had them to begin with. | ||
if (this.slashes || (!protocol || slashedProtocol[protocol]) && host !== false) { | ||
host = '//' + (host || ''); | ||
if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname; | ||
} else if (!host) { | ||
host = ''; | ||
} | ||
if (hash && hash.charAt(0) !== '#') hash = '#' + hash; | ||
if (search && search.charAt(0) !== '?') search = '?' + search; | ||
pathname = pathname.replace(/[?#]/g, function (match) { | ||
return encodeURIComponent(match); | ||
}); | ||
search = search.replace('#', '%23'); | ||
return protocol + host + pathname + search + hash; | ||
}; | ||
function urlResolve(source, relative) { | ||
return urlParse(source, false, true).resolve(relative); | ||
} | ||
Url.prototype.resolve = function (relative) { | ||
return this.resolveObject(urlParse(relative, false, true)).format(); | ||
}; | ||
function urlResolveObject(source, relative) { | ||
if (!source) return relative; | ||
return urlParse(source, false, true).resolveObject(relative); | ||
} | ||
Url.prototype.resolveObject = function (relative) { | ||
if (util.isString(relative)) { | ||
var rel = new Url(); | ||
rel.parse(relative, false, true); | ||
relative = rel; | ||
} | ||
var result = new Url(); | ||
var tkeys = Object.keys(this); | ||
for (var tk = 0; tk < tkeys.length; tk++) { | ||
var tkey = tkeys[tk]; | ||
result[tkey] = this[tkey]; | ||
} // hash is always overridden, no matter what. | ||
// even href="" will remove it. | ||
result.hash = relative.hash; // if the relative url is empty, then there's nothing left to do here. | ||
if (relative.href === '') { | ||
result.href = result.format(); | ||
return result; | ||
} // hrefs like //foo/bar always cut to the protocol. | ||
if (relative.slashes && !relative.protocol) { | ||
// take everything except the protocol from relative | ||
var rkeys = Object.keys(relative); | ||
for (var rk = 0; rk < rkeys.length; rk++) { | ||
var rkey = rkeys[rk]; | ||
if (rkey !== 'protocol') result[rkey] = relative[rkey]; | ||
} //urlParse appends trailing / to urls like http://www.example.com | ||
if (slashedProtocol[result.protocol] && result.hostname && !result.pathname) { | ||
result.path = result.pathname = '/'; | ||
} | ||
result.href = result.format(); | ||
return result; | ||
} | ||
if (relative.protocol && relative.protocol !== result.protocol) { | ||
// if it's a known url protocol, then changing | ||
// the protocol does weird things | ||
// first, if it's not file:, then we MUST have a host, | ||
// and if there was a path | ||
// to begin with, then we MUST have a path. | ||
// if it is file:, then the host is dropped, | ||
// because that's known to be hostless. | ||
// anything else is assumed to be absolute. | ||
if (!slashedProtocol[relative.protocol]) { | ||
var keys = Object.keys(relative); | ||
for (var v = 0; v < keys.length; v++) { | ||
var k = keys[v]; | ||
result[k] = relative[k]; | ||
} | ||
result.href = result.format(); | ||
return result; | ||
} | ||
result.protocol = relative.protocol; | ||
if (!relative.host && !hostlessProtocol[relative.protocol]) { | ||
var relPath = (relative.pathname || '').split('/'); | ||
while (relPath.length && !(relative.host = relPath.shift())); | ||
if (!relative.host) relative.host = ''; | ||
if (!relative.hostname) relative.hostname = ''; | ||
if (relPath[0] !== '') relPath.unshift(''); | ||
if (relPath.length < 2) relPath.unshift(''); | ||
result.pathname = relPath.join('/'); | ||
} else { | ||
result.pathname = relative.pathname; | ||
} | ||
result.search = relative.search; | ||
result.query = relative.query; | ||
result.host = relative.host || ''; | ||
result.auth = relative.auth; | ||
result.hostname = relative.hostname || relative.host; | ||
result.port = relative.port; // to support http.request | ||
if (result.pathname || result.search) { | ||
var p = result.pathname || ''; | ||
var s = result.search || ''; | ||
result.path = p + s; | ||
} | ||
result.slashes = result.slashes || relative.slashes; | ||
result.href = result.format(); | ||
return result; | ||
} | ||
var isSourceAbs = result.pathname && result.pathname.charAt(0) === '/', | ||
isRelAbs = relative.host || relative.pathname && relative.pathname.charAt(0) === '/', | ||
mustEndAbs = isRelAbs || isSourceAbs || result.host && relative.pathname, | ||
removeAllDots = mustEndAbs, | ||
srcPath = result.pathname && result.pathname.split('/') || [], | ||
relPath = relative.pathname && relative.pathname.split('/') || [], | ||
psychotic = result.protocol && !slashedProtocol[result.protocol]; // if the url is a non-slashed url, then relative | ||
// links like ../.. should be able | ||
// to crawl up to the hostname, as well. This is strange. | ||
// result.protocol has already been set by now. | ||
// Later on, put the first path part into the host field. | ||
if (psychotic) { | ||
result.hostname = ''; | ||
result.port = null; | ||
if (result.host) { | ||
if (srcPath[0] === '') srcPath[0] = result.host;else srcPath.unshift(result.host); | ||
} | ||
result.host = ''; | ||
if (relative.protocol) { | ||
relative.hostname = null; | ||
relative.port = null; | ||
if (relative.host) { | ||
if (relPath[0] === '') relPath[0] = relative.host;else relPath.unshift(relative.host); | ||
} | ||
relative.host = null; | ||
} | ||
mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === ''); | ||
} | ||
if (isRelAbs) { | ||
// it's absolute. | ||
result.host = relative.host || relative.host === '' ? relative.host : result.host; | ||
result.hostname = relative.hostname || relative.hostname === '' ? relative.hostname : result.hostname; | ||
result.search = relative.search; | ||
result.query = relative.query; | ||
srcPath = relPath; // fall through to the dot-handling below. | ||
} else if (relPath.length) { | ||
// it's relative | ||
// throw away the existing file, and take the new path instead. | ||
if (!srcPath) srcPath = []; | ||
srcPath.pop(); | ||
srcPath = srcPath.concat(relPath); | ||
result.search = relative.search; | ||
result.query = relative.query; | ||
} else if (!util.isNullOrUndefined(relative.search)) { | ||
// just pull out the search. | ||
// like href='?foo'. | ||
// Put this after the other two cases because it simplifies the booleans | ||
if (psychotic) { | ||
result.hostname = result.host = srcPath.shift(); //occationaly the auth can get stuck only in host | ||
//this especially happens in cases like | ||
//url.resolveObject('mailto:local1@domain1', 'local2@domain2') | ||
var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false; | ||
if (authInHost) { | ||
result.auth = authInHost.shift(); | ||
result.host = result.hostname = authInHost.shift(); | ||
} | ||
} | ||
result.search = relative.search; | ||
result.query = relative.query; //to support http.request | ||
if (!util.isNull(result.pathname) || !util.isNull(result.search)) { | ||
result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : ''); | ||
} | ||
result.href = result.format(); | ||
return result; | ||
} | ||
if (!srcPath.length) { | ||
// no path at all. easy. | ||
// we've already handled the other stuff above. | ||
result.pathname = null; //to support http.request | ||
if (result.search) { | ||
result.path = '/' + result.search; | ||
} else { | ||
result.path = null; | ||
} | ||
result.href = result.format(); | ||
return result; | ||
} // if a url ENDs in . or .., then it must get a trailing slash. | ||
// however, if it ends in anything else non-slashy, | ||
// then it must NOT get a trailing slash. | ||
var last = srcPath.slice(-1)[0]; | ||
var hasTrailingSlash = (result.host || relative.host || srcPath.length > 1) && (last === '.' || last === '..') || last === ''; // strip single dots, resolve double dots to parent dir | ||
// if the path tries to go above the root, `up` ends up > 0 | ||
var up = 0; | ||
for (var i = srcPath.length; i >= 0; i--) { | ||
last = srcPath[i]; | ||
if (last === '.') { | ||
srcPath.splice(i, 1); | ||
} else if (last === '..') { | ||
srcPath.splice(i, 1); | ||
up++; | ||
} else if (up) { | ||
srcPath.splice(i, 1); | ||
up--; | ||
} | ||
} // if the path is allowed to go above the root, restore leading ..s | ||
if (!mustEndAbs && !removeAllDots) { | ||
for (; up--; up) { | ||
srcPath.unshift('..'); | ||
} | ||
} | ||
if (mustEndAbs && srcPath[0] !== '' && (!srcPath[0] || srcPath[0].charAt(0) !== '/')) { | ||
srcPath.unshift(''); | ||
} | ||
if (hasTrailingSlash && srcPath.join('/').substr(-1) !== '/') { | ||
srcPath.push(''); | ||
} | ||
var isAbsolute = srcPath[0] === '' || srcPath[0] && srcPath[0].charAt(0) === '/'; // put the host back | ||
if (psychotic) { | ||
result.hostname = result.host = isAbsolute ? '' : srcPath.length ? srcPath.shift() : ''; //occationaly the auth can get stuck only in host | ||
//this especially happens in cases like | ||
//url.resolveObject('mailto:local1@domain1', 'local2@domain2') | ||
var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false; | ||
if (authInHost) { | ||
result.auth = authInHost.shift(); | ||
result.host = result.hostname = authInHost.shift(); | ||
} | ||
} | ||
mustEndAbs = mustEndAbs || result.host && srcPath.length; | ||
if (mustEndAbs && !isAbsolute) { | ||
srcPath.unshift(''); | ||
} | ||
if (!srcPath.length) { | ||
result.pathname = null; | ||
result.path = null; | ||
} else { | ||
result.pathname = srcPath.join('/'); | ||
} //to support request.http | ||
if (!util.isNull(result.pathname) || !util.isNull(result.search)) { | ||
result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : ''); | ||
} | ||
result.auth = relative.auth || result.auth; | ||
result.slashes = result.slashes || relative.slashes; | ||
result.href = result.format(); | ||
return result; | ||
}; | ||
Url.prototype.parseHost = function () { | ||
var host = this.host; | ||
var port = portPattern.exec(host); | ||
if (port) { | ||
port = port[0]; | ||
if (port !== ':') { | ||
this.port = port.substr(1); | ||
} | ||
host = host.substr(0, host.length - port.length); | ||
} | ||
if (host) this.hostname = host; | ||
}; | ||
return exports$1; | ||
} | ||
const exports$2 = dew$1(); | ||
const Url = exports$2.Url, format = exports$2.format, parse = exports$2.parse, resolve = exports$2.resolve, resolveObject = exports$2.resolveObject; | ||
export default exports$2; | ||
export { Url, format, parse, resolve, resolveObject }; | ||
import t from'./punycode.js';import s from'./querystring.js';var h={},e=t,a={isString:function(t){return "string"==typeof t},isObject:function(t){return "object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}};function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null;}h.parse=O,h.resolve=function(t,s){return O(t,!1,!0).resolve(s)},h.resolveObject=function(t,s){return t?O(t,!1,!0).resolveObject(s):s},h.format=function(t){a.isString(t)&&(t=O(t));return t instanceof r?t.format():r.prototype.format.call(t)},h.Url=r;var o=/^([a-z0-9.+-]+:)/i,n=/:[0-9]*$/,i=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),p=["'"].concat(l),c=["%","/","?",";","#"].concat(p),u=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=s;function O(t,s,h){if(t&&a.isObject(t)&&t instanceof r)return t;var e=new r;return e.parse(t,s,h),e}r.prototype.parse=function(t,s,h){if(!a.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var r=t.indexOf("?"),n=-1!==r&&r<t.indexOf("#")?"?":"#",l=t.split(n);l[0]=l[0].replace(/\\/g,"/");var O=t=l.join(n);if(O=O.trim(),!h&&1===t.split("#").length){var d=i.exec(O);if(d)return this.path=O,this.href=O,this.pathname=d[1],d[2]?(this.search=d[2],this.query=s?b.parse(this.search.substr(1)):this.search.substr(1)):s&&(this.search="",this.query={}),this}var j=o.exec(O);if(j){var q=(j=j[0]).toLowerCase();this.protocol=q,O=O.substr(j.length);}if(h||j||O.match(/^\/\/[^@\/]+@[^@\/]+/)){var x="//"===O.substr(0,2);!x||j&&g[j]||(O=O.substr(2),this.slashes=!0);}if(!g[j]&&(x||j&&!y[j])){for(var A,C,I=-1,w=0;w<u.length;w++){-1!==(N=O.indexOf(u[w]))&&(-1===I||N<I)&&(I=N);}-1!==(C=-1===I?O.lastIndexOf("@"):O.lastIndexOf("@",I))&&(A=O.slice(0,C),O=O.slice(C+1),this.auth=decodeURIComponent(A)),I=-1;for(w=0;w<c.length;w++){var N;-1!==(N=O.indexOf(c[w]))&&(-1===I||N<I)&&(I=N);}-1===I&&(I=O.length),this.host=O.slice(0,I),O=O.slice(I),this.parseHost(),this.hostname=this.hostname||"";var U="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!U)for(var k=this.hostname.split(/\./),S=(w=0,k.length);w<S;w++){var R=k[w];if(R&&!R.match(f)){for(var $="",z=0,H=R.length;z<H;z++)R.charCodeAt(z)>127?$+="x":$+=R[z];if(!$.match(f)){var L=k.slice(0,w),Z=k.slice(w+1),_=R.match(m);_&&(L.push(_[1]),Z.unshift(_[2])),Z.length&&(O="/"+Z.join(".")+O),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),U||(this.hostname=e.toASCII(this.hostname));var E=this.port?":"+this.port:"",P=this.hostname||"";this.host=P+E,this.href+=this.host,U&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==O[0]&&(O="/"+O));}if(!v[q])for(w=0,S=p.length;w<S;w++){var T=p[w];if(-1!==O.indexOf(T)){var B=encodeURIComponent(T);B===T&&(B=escape(T)),O=O.split(T).join(B);}}var D=O.indexOf("#");-1!==D&&(this.hash=O.substr(D),O=O.slice(0,D));var F=O.indexOf("?");if(-1!==F?(this.search=O.substr(F),this.query=O.substr(F+1),s&&(this.query=b.parse(this.query)),O=O.slice(0,F)):s&&(this.search="",this.query={}),O&&(this.pathname=O),y[q]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){E=this.pathname||"";var G=this.search||"";this.path=E+G;}return this.href=this.format(),this},r.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var s=this.protocol||"",h=this.pathname||"",e=this.hash||"",r=!1,o="";this.host?r=t+this.host:this.hostname&&(r=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(r+=":"+this.port)),this.query&&a.isObject(this.query)&&Object.keys(this.query).length&&(o=b.stringify(this.query));var n=this.search||o&&"?"+o||"";return s&&":"!==s.substr(-1)&&(s+=":"),this.slashes||(!s||y[s])&&!1!==r?(r="//"+(r||""),h&&"/"!==h.charAt(0)&&(h="/"+h)):r||(r=""),e&&"#"!==e.charAt(0)&&(e="#"+e),n&&"?"!==n.charAt(0)&&(n="?"+n),s+r+(h=h.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(n=n.replace("#","%23"))+e},r.prototype.resolve=function(t){return this.resolveObject(O(t,!1,!0)).format()},r.prototype.resolveObject=function(t){if(a.isString(t)){var s=new r;s.parse(t,!1,!0),t=s;}for(var h=new r,e=Object.keys(this),o=0;o<e.length;o++){var n=e[o];h[n]=this[n];}if(h.hash=t.hash,""===t.href)return h.href=h.format(),h;if(t.slashes&&!t.protocol){for(var i=Object.keys(t),l=0;l<i.length;l++){var p=i[l];"protocol"!==p&&(h[p]=t[p]);}return y[h.protocol]&&h.hostname&&!h.pathname&&(h.path=h.pathname="/"),h.href=h.format(),h}if(t.protocol&&t.protocol!==h.protocol){if(!y[t.protocol]){for(var c=Object.keys(t),u=0;u<c.length;u++){var f=c[u];h[f]=t[f];}return h.href=h.format(),h}if(h.protocol=t.protocol,t.host||g[t.protocol])h.pathname=t.pathname;else {for(var m=(t.pathname||"").split("/");m.length&&!(t.host=m.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==m[0]&&m.unshift(""),m.length<2&&m.unshift(""),h.pathname=m.join("/");}if(h.search=t.search,h.query=t.query,h.host=t.host||"",h.auth=t.auth,h.hostname=t.hostname||t.host,h.port=t.port,h.pathname||h.search){var v=h.pathname||"",b=h.search||"";h.path=v+b;}return h.slashes=h.slashes||t.slashes,h.href=h.format(),h}var O=h.pathname&&"/"===h.pathname.charAt(0),d=t.host||t.pathname&&"/"===t.pathname.charAt(0),j=d||O||h.host&&t.pathname,q=j,x=h.pathname&&h.pathname.split("/")||[],A=(m=t.pathname&&t.pathname.split("/")||[],h.protocol&&!y[h.protocol]);if(A&&(h.hostname="",h.port=null,h.host&&(""===x[0]?x[0]=h.host:x.unshift(h.host)),h.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===m[0]?m[0]=t.host:m.unshift(t.host)),t.host=null),j=j&&(""===m[0]||""===x[0])),d)h.host=t.host||""===t.host?t.host:h.host,h.hostname=t.hostname||""===t.hostname?t.hostname:h.hostname,h.search=t.search,h.query=t.query,x=m;else if(m.length)x||(x=[]),x.pop(),x=x.concat(m),h.search=t.search,h.query=t.query;else if(!a.isNullOrUndefined(t.search)){if(A)h.hostname=h.host=x.shift(),(U=!!(h.host&&h.host.indexOf("@")>0)&&h.host.split("@"))&&(h.auth=U.shift(),h.host=h.hostname=U.shift());return h.search=t.search,h.query=t.query,a.isNull(h.pathname)&&a.isNull(h.search)||(h.path=(h.pathname?h.pathname:"")+(h.search?h.search:"")),h.href=h.format(),h}if(!x.length)return h.pathname=null,h.search?h.path="/"+h.search:h.path=null,h.href=h.format(),h;for(var C=x.slice(-1)[0],I=(h.host||t.host||x.length>1)&&("."===C||".."===C)||""===C,w=0,N=x.length;N>=0;N--)"."===(C=x[N])?x.splice(N,1):".."===C?(x.splice(N,1),w++):w&&(x.splice(N,1),w--);if(!j&&!q)for(;w--;w)x.unshift("..");!j||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),I&&"/"!==x.join("/").substr(-1)&&x.push("");var U,k=""===x[0]||x[0]&&"/"===x[0].charAt(0);A&&(h.hostname=h.host=k?"":x.length?x.shift():"",(U=!!(h.host&&h.host.indexOf("@")>0)&&h.host.split("@"))&&(h.auth=U.shift(),h.host=h.hostname=U.shift()));return (j=j||h.host&&x.length)&&!k&&x.unshift(""),x.length?h.pathname=x.join("/"):(h.pathname=null,h.path=null),a.isNull(h.pathname)&&a.isNull(h.search)||(h.path=(h.pathname?h.pathname:"")+(h.search?h.search:"")),h.auth=t.auth||h.auth,h.slashes=h.slashes||t.slashes,h.href=h.format(),h},r.prototype.parseHost=function(){var t=this.host,s=n.exec(t);s&&(":"!==(s=s[0])&&(this.port=s.substr(1)),t=t.substr(0,t.length-s.length)),t&&(this.hostname=t);}; | ||
var Url=h.Url;var format=h.format;var resolve=h.resolve;var resolveObject=h.resolveObject;var URL=void 0!==URL?URL:null;export default h;export{URL,Url,format,resolve,resolveObject}; |
@@ -1,2 +0,1 @@ | ||
export { c as _extend, d as callbackify, e as debuglog, a as default, f as deprecate, g as format, h as inherits, i as inspect, j as isArray, k as isBoolean, l as isBuffer, m as isDate, n as isError, o as isFunction, p as isNull, q as isNullOrUndefined, r as isNumber, s as isObject, t as isPrimitive, u as isRegExp, v as isString, w as isSymbol, x as isUndefined, y as log, z as promisify } from './util-c86b84df.js'; | ||
import './process.js'; | ||
import {u as util}from'./chunk-dac557ba.js';import'./chunk-0c2d1322.js';var _extend=util._extend;var callbackify=util.callbackify;var debuglog=util.debuglog;var deprecate=util.deprecate;var format=util.format;var inherits=util.inherits;var inspect=util.inspect;var isArray=util.isArray;var isBoolean=util.isBoolean;var isBuffer=util.isBuffer;var isDate=util.isDate;var isError=util.isError;var isFunction=util.isFunction;var isNull=util.isNull;var isNullOrUndefined=util.isNullOrUndefined;var isNumber=util.isNumber;var isObject=util.isObject;var isPrimitive=util.isPrimitive;var isRegExp=util.isRegExp;var isString=util.isString;var isSymbol=util.isSymbol;var isUndefined=util.isUndefined;var log=util.log;var promisify=util.promisify;export default util;export{_extend,callbackify,debuglog,deprecate,format,inherits,inspect,isArray,isBoolean,isBuffer,isDate,isError,isFunction,isNull,isNullOrUndefined,isNumber,isObject,isPrimitive,isRegExp,isString,isSymbol,isUndefined,log,promisify}; |
@@ -1,159 +0,1 @@ | ||
var exports = {}, | ||
_dewExec = false; | ||
var _global = typeof self !== "undefined" ? self : global; | ||
function dew() { | ||
if (_dewExec) return exports; | ||
_dewExec = true; | ||
var indexOf = function (xs, item) { | ||
if (xs.indexOf) return xs.indexOf(item);else for (var i = 0; i < xs.length; i++) { | ||
if (xs[i] === item) return i; | ||
} | ||
return -1; | ||
}; | ||
var Object_keys = function (obj) { | ||
if (Object.keys) return Object.keys(obj);else { | ||
var res = []; | ||
for (var key in obj) res.push(key); | ||
return res; | ||
} | ||
}; | ||
var forEach = function (xs, fn) { | ||
if (xs.forEach) return xs.forEach(fn);else for (var i = 0; i < xs.length; i++) { | ||
fn(xs[i], i, xs); | ||
} | ||
}; | ||
var defineProp = function () { | ||
try { | ||
Object.defineProperty({}, '_', {}); | ||
return function (obj, name, value) { | ||
Object.defineProperty(obj, name, { | ||
writable: true, | ||
enumerable: false, | ||
configurable: true, | ||
value: value | ||
}); | ||
}; | ||
} catch (e) { | ||
return function (obj, name, value) { | ||
obj[name] = value; | ||
}; | ||
} | ||
}(); | ||
var globals = ['Array', 'Boolean', 'Date', 'Error', 'EvalError', 'Function', 'Infinity', 'JSON', 'Math', 'NaN', 'Number', 'Object', 'RangeError', 'ReferenceError', 'RegExp', 'String', 'SyntaxError', 'TypeError', 'URIError', 'decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent', 'escape', 'eval', 'isFinite', 'isNaN', 'parseFloat', 'parseInt', 'undefined', 'unescape']; | ||
function Context() {} | ||
Context.prototype = {}; | ||
var Script = exports.Script = function NodeScript(code) { | ||
if (!((this || _global) instanceof Script)) return new Script(code); | ||
(this || _global).code = code; | ||
}; | ||
Script.prototype.runInContext = function (context) { | ||
if (!(context instanceof Context)) { | ||
throw new TypeError("needs a 'context' argument."); | ||
} | ||
var iframe = document.createElement('iframe'); | ||
if (!iframe.style) iframe.style = {}; | ||
iframe.style.display = 'none'; | ||
document.body.appendChild(iframe); | ||
var win = iframe.contentWindow; | ||
var wEval = win.eval, | ||
wExecScript = win.execScript; | ||
if (!wEval && wExecScript) { | ||
// win.eval() magically appears when this is called in IE: | ||
wExecScript.call(win, 'null'); | ||
wEval = win.eval; | ||
} | ||
forEach(Object_keys(context), function (key) { | ||
win[key] = context[key]; | ||
}); | ||
forEach(globals, function (key) { | ||
if (context[key]) { | ||
win[key] = context[key]; | ||
} | ||
}); | ||
var winKeys = Object_keys(win); | ||
var res = wEval.call(win, (this || _global).code); | ||
forEach(Object_keys(win), function (key) { | ||
// Avoid copying circular objects like `top` and `window` by only | ||
// updating existing context properties or new properties in the `win` | ||
// that was only introduced after the eval. | ||
if (key in context || indexOf(winKeys, key) === -1) { | ||
context[key] = win[key]; | ||
} | ||
}); | ||
forEach(globals, function (key) { | ||
if (!(key in context)) { | ||
defineProp(context, key, win[key]); | ||
} | ||
}); | ||
document.body.removeChild(iframe); | ||
return res; | ||
}; | ||
Script.prototype.runInThisContext = function () { | ||
return eval((this || _global).code); // maybe... | ||
}; | ||
Script.prototype.runInNewContext = function (context) { | ||
var ctx = Script.createContext(context); | ||
var res = this.runInContext(ctx); | ||
if (context) { | ||
forEach(Object_keys(ctx), function (key) { | ||
context[key] = ctx[key]; | ||
}); | ||
} | ||
return res; | ||
}; | ||
forEach(Object_keys(Script.prototype), function (name) { | ||
exports[name] = Script[name] = function (code) { | ||
var s = Script(code); | ||
return s[name].apply(s, [].slice.call(arguments, 1)); | ||
}; | ||
}); | ||
exports.isContext = function (context) { | ||
return context instanceof Context; | ||
}; | ||
exports.createScript = function (code) { | ||
return exports.Script(code); | ||
}; | ||
exports.createContext = Script.createContext = function (context) { | ||
var copy = new Context(); | ||
if (typeof context === 'object') { | ||
forEach(Object_keys(context), function (key) { | ||
copy[key] = context[key]; | ||
}); | ||
} | ||
return copy; | ||
}; | ||
return exports; | ||
} | ||
const exports$1 = dew(); | ||
const Script = exports$1.Script, createContext = exports$1.createContext, createScript = exports$1.createScript, isContext = exports$1.isContext, runInContext = exports$1.runInContext, runInNewContext = exports$1.runInNewContext, runInThisContext = exports$1.runInThisContext; | ||
export default exports$1; | ||
export { Script, createContext, createScript, isContext, runInContext, runInNewContext, runInThisContext }; | ||
var _global="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:global,exports={},indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n<e.length;n++)if(e[n]===t)return n;return -1},Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var n in e)t.push(n);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e);},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(e,t,n){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:n});}}catch(e){return function(e,t,n){e[t]=n;}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(e){if(!((this||_global)instanceof Script))return new Script(e);(this||_global).code=e;};Script.prototype.runInContext=function(e){if(!(e instanceof Context))throw new TypeError("needs a 'context' argument.");var t=document.createElement("iframe");t.style||(t.style={}),t.style.display="none",document.body.appendChild(t);var n=t.contentWindow,r=n.eval,o=n.execScript;!r&&o&&(o.call(n,"null"),r=n.eval),forEach(Object_keys(e),(function(t){n[t]=e[t];})),forEach(globals,(function(t){e[t]&&(n[t]=e[t]);}));var c=Object_keys(n),i=r.call(n,(this||_global).code);return forEach(Object_keys(n),(function(t){(t in e||-1===indexOf(c,t))&&(e[t]=n[t]);})),forEach(globals,(function(t){t in e||defineProp(e,t,n[t]);})),document.body.removeChild(t),i},Script.prototype.runInThisContext=function(){return eval((this||_global).code)},Script.prototype.runInNewContext=function(e){var t=Script.createContext(e),n=this.runInContext(t);return e&&forEach(Object_keys(t),(function(n){e[n]=t[n];})),n},forEach(Object_keys(Script.prototype),(function(e){exports[e]=Script[e]=function(t){var n=Script(t);return n[e].apply(n,[].slice.call(arguments,1))};})),exports.isContext=function(e){return e instanceof Context},exports.createScript=function(e){return exports.Script(e)},exports.createContext=Script.createContext=function(e){var t=new Context;return "object"==typeof e&&forEach(Object_keys(e),(function(n){t[n]=e[n];})),t};var Script$1=exports.Script;var createContext=exports.createContext;var createScript=exports.createScript;var isContext=exports.isContext;var runInContext=exports.runInContext;var runInNewContext=exports.runInNewContext;var runInThisContext=exports.runInThisContext;export default exports;export{Script$1 as Script,createContext,createScript,isContext,runInContext,runInNewContext,runInThisContext}; |
672
package.json
{ | ||
"name": "@jspm/core", | ||
"version": "1.0.4", | ||
"version": "1.1.0", | ||
"description": "jspm core libraries", | ||
"author": "Guy Bedford", | ||
"license": "Apache-2.0", | ||
"license": "Apache 2.0", | ||
"files": [ | ||
"resolve.js", | ||
"nodelibs/*.js" | ||
], | ||
"scripts": { | ||
"clean": "rm nodelibs/*.js", | ||
"build": "jspm run clean && rollup -c || rollup -c" | ||
"build": "jspm build -c -d nodelibs -o jspm.importmap src/*" | ||
}, | ||
"devDependencies": { | ||
"@jspm/core": "^1.0.2", | ||
"assert": "^1.4.1", | ||
"buffer": "^5.0.8", | ||
"console": "console-browserify@^1.1.0", | ||
"constants": "constants-browserify@^1.0.0", | ||
"crypto": "crypto-browserify@^3.12.0", | ||
"domain": "domain-browser@^1.1.7", | ||
"events": "^3.0.0", | ||
"http": "stream-http@^2.7.2", | ||
"https": "https-browserify@^1.0.0", | ||
"os": "os-browserify@~0.3.0", | ||
"path": "path-browserify@^0.0.0", | ||
"process": "~0.11.10", | ||
"punycode": "^2.1.0", | ||
"querystring": "~0.2.0", | ||
"rollup": "^1.8.0", | ||
"rollup-plugin-jspm": "github:jspm/rollup-plugin-jspm@master", | ||
"stream": "stream-browserify@^2.0.1", | ||
"string_decoder": "^1.2.0", | ||
"timers": "timers-browserify@^2.0.10", | ||
"tty": "tty-browserify@^0.0.1", | ||
"url": "~0.11.0", | ||
"util": "~0.11.0", | ||
"vm": "vm-browserify@^1.1.0", | ||
"zlib": "browserify-zlib@~0.2.0" | ||
}, | ||
"type": "module", | ||
"overrides": { | ||
"npm:assert@^1.4.1": { | ||
"namedExports": { | ||
"assert.js": [ | ||
"AssertionError", | ||
"deepEqual", | ||
"deepStrictEqual", | ||
"doesNotReject", | ||
"doesNotThrow", | ||
"equal", | ||
"fail", | ||
"ifError", | ||
"notDeepEqual", | ||
"notDeepStrictEqual", | ||
"notEqual", | ||
"notStrictEqual", | ||
"ok", | ||
"rejects", | ||
"strict", | ||
"strictEqual", | ||
"throws" | ||
] | ||
} | ||
}, | ||
"npm:browserify-zlib@~0.2.0": { | ||
"namedExports": { | ||
"lib/index.js": [ | ||
"Deflate", | ||
"DeflateRaw", | ||
"Gunzip", | ||
"Gzip", | ||
"Inflate", | ||
"InflateRaw", | ||
"Unzip", | ||
"Z_BEST_COMPRESSION", | ||
"Z_BEST_SPEED", | ||
"Z_BINARY", | ||
"Z_BLOCK", | ||
"Z_BUF_ERROR", | ||
"Z_DATA_ERROR", | ||
"Z_DEFAULT_CHUNK", | ||
"Z_DEFAULT_COMPRESSION", | ||
"Z_DEFAULT_LEVEL", | ||
"Z_DEFAULT_MEMLEVEL", | ||
"Z_DEFAULT_STRATEGY", | ||
"Z_DEFAULT_WINDOWBITS", | ||
"Z_DEFLATED", | ||
"Z_ERRNO", | ||
"Z_FILTERED", | ||
"Z_FINISH", | ||
"Z_FIXED", | ||
"Z_FULL_FLUSH", | ||
"Z_HUFFMAN_ONLY", | ||
"Z_MAX_CHUNK", | ||
"Z_MAX_LEVEL", | ||
"Z_MAX_MEMLEVEL", | ||
"Z_MAX_WINDOWBITS", | ||
"Z_MIN_CHUNK", | ||
"Z_MIN_LEVEL", | ||
"Z_MIN_MEMLEVEL", | ||
"Z_MIN_WINDOWBITS", | ||
"Z_NEED_DICT", | ||
"Z_NO_COMPRESSION", | ||
"Z_NO_FLUSH", | ||
"Z_OK", | ||
"Z_PARTIAL_FLUSH", | ||
"Z_RLE", | ||
"Z_STREAM_END", | ||
"Z_STREAM_ERROR", | ||
"Z_SYNC_FLUSH", | ||
"Z_TEXT", | ||
"Z_TREES", | ||
"Z_UNKNOWN", | ||
"Zlib", | ||
"codes", | ||
"createDeflate", | ||
"createDeflateRaw", | ||
"createGunzip", | ||
"createGzip", | ||
"createInflate", | ||
"createInflateRaw", | ||
"createUnzip", | ||
"deflate", | ||
"deflateRaw", | ||
"deflateRawSync", | ||
"deflateSync", | ||
"gunzip", | ||
"gunzipSync", | ||
"gzip", | ||
"gzipSync", | ||
"inflate", | ||
"inflateRaw", | ||
"inflateRawSync", | ||
"inflateSync", | ||
"unzip", | ||
"unzipSync" | ||
] | ||
} | ||
}, | ||
"npm:buffer@^5.0.8": { | ||
"namedExports": { | ||
"index.js": [ | ||
"Buffer", | ||
"INSPECT_MAX_BYTES", | ||
"SlowBuffer", | ||
"kMaxLength" | ||
] | ||
} | ||
}, | ||
"npm:console-browserify@^1.1.0": { | ||
"namedExports": { | ||
"index.js": [ | ||
"assert", | ||
"clear", | ||
"context", | ||
"count", | ||
"countReset", | ||
"debug", | ||
"dir", | ||
"dirxml", | ||
"error", | ||
"group", | ||
"groupCollapsed", | ||
"groupEnd", | ||
"info", | ||
"log", | ||
"memory", | ||
"profile", | ||
"profileEnd", | ||
"table", | ||
"time", | ||
"timeEnd", | ||
"timeStamp", | ||
"trace", | ||
"warn" | ||
] | ||
} | ||
}, | ||
"npm:constants-browserify@^1.0.0": { | ||
"namedExports": { | ||
"constants.json.js": [ | ||
"DH_CHECK_P_NOT_PRIME", | ||
"DH_CHECK_P_NOT_SAFE_PRIME", | ||
"DH_NOT_SUITABLE_GENERATOR", | ||
"DH_UNABLE_TO_CHECK_GENERATOR", | ||
"E2BIG", | ||
"EACCES", | ||
"EADDRINUSE", | ||
"EADDRNOTAVAIL", | ||
"EAFNOSUPPORT", | ||
"EAGAIN", | ||
"EALREADY", | ||
"EBADF", | ||
"EBADMSG", | ||
"EBUSY", | ||
"ECANCELED", | ||
"ECHILD", | ||
"ECONNABORTED", | ||
"ECONNREFUSED", | ||
"ECONNRESET", | ||
"EDEADLK", | ||
"EDESTADDRREQ", | ||
"EDOM", | ||
"EDQUOT", | ||
"EEXIST", | ||
"EFAULT", | ||
"EFBIG", | ||
"EHOSTUNREACH", | ||
"EIDRM", | ||
"EILSEQ", | ||
"EINPROGRESS", | ||
"EINTR", | ||
"EINVAL", | ||
"EIO", | ||
"EISCONN", | ||
"EISDIR", | ||
"ELOOP", | ||
"EMFILE", | ||
"EMLINK", | ||
"EMSGSIZE", | ||
"EMULTIHOP", | ||
"ENAMETOOLONG", | ||
"ENETDOWN", | ||
"ENETRESET", | ||
"ENETUNREACH", | ||
"ENFILE", | ||
"ENGINE_METHOD_ALL", | ||
"ENGINE_METHOD_CIPHERS", | ||
"ENGINE_METHOD_DH", | ||
"ENGINE_METHOD_DIGESTS", | ||
"ENGINE_METHOD_DSA", | ||
"ENGINE_METHOD_ECDH", | ||
"ENGINE_METHOD_ECDSA", | ||
"ENGINE_METHOD_NONE", | ||
"ENGINE_METHOD_PKEY_ASN1_METHS", | ||
"ENGINE_METHOD_PKEY_METHS", | ||
"ENGINE_METHOD_RAND", | ||
"ENGINE_METHOD_STORE", | ||
"ENOBUFS", | ||
"ENODATA", | ||
"ENODEV", | ||
"ENOENT", | ||
"ENOEXEC", | ||
"ENOLCK", | ||
"ENOLINK", | ||
"ENOMEM", | ||
"ENOMSG", | ||
"ENOPROTOOPT", | ||
"ENOSPC", | ||
"ENOSR", | ||
"ENOSTR", | ||
"ENOSYS", | ||
"ENOTCONN", | ||
"ENOTDIR", | ||
"ENOTEMPTY", | ||
"ENOTSOCK", | ||
"ENOTSUP", | ||
"ENOTTY", | ||
"ENXIO", | ||
"EOPNOTSUPP", | ||
"EOVERFLOW", | ||
"EPERM", | ||
"EPIPE", | ||
"EPROTO", | ||
"EPROTONOSUPPORT", | ||
"EPROTOTYPE", | ||
"ERANGE", | ||
"EROFS", | ||
"ESPIPE", | ||
"ESRCH", | ||
"ESTALE", | ||
"ETIME", | ||
"ETIMEDOUT", | ||
"ETXTBSY", | ||
"EWOULDBLOCK", | ||
"EXDEV", | ||
"F_OK", | ||
"NPN_ENABLED", | ||
"O_APPEND", | ||
"O_CREAT", | ||
"O_DIRECTORY", | ||
"O_EXCL", | ||
"O_NOCTTY", | ||
"O_NOFOLLOW", | ||
"O_NONBLOCK", | ||
"O_RDONLY", | ||
"O_RDWR", | ||
"O_SYMLINK", | ||
"O_SYNC", | ||
"O_TRUNC", | ||
"O_WRONLY", | ||
"POINT_CONVERSION_COMPRESSED", | ||
"POINT_CONVERSION_HYBRID", | ||
"POINT_CONVERSION_UNCOMPRESSED", | ||
"RSA_NO_PADDING", | ||
"RSA_PKCS1_OAEP_PADDING", | ||
"RSA_PKCS1_PADDING", | ||
"RSA_PKCS1_PSS_PADDING", | ||
"RSA_SSLV23_PADDING", | ||
"RSA_X931_PADDING", | ||
"R_OK", | ||
"SIGABRT", | ||
"SIGALRM", | ||
"SIGBUS", | ||
"SIGCHLD", | ||
"SIGCONT", | ||
"SIGFPE", | ||
"SIGHUP", | ||
"SIGILL", | ||
"SIGINT", | ||
"SIGIO", | ||
"SIGIOT", | ||
"SIGKILL", | ||
"SIGPIPE", | ||
"SIGPROF", | ||
"SIGQUIT", | ||
"SIGSEGV", | ||
"SIGSTOP", | ||
"SIGSYS", | ||
"SIGTERM", | ||
"SIGTRAP", | ||
"SIGTSTP", | ||
"SIGTTIN", | ||
"SIGTTOU", | ||
"SIGURG", | ||
"SIGUSR1", | ||
"SIGUSR2", | ||
"SIGVTALRM", | ||
"SIGWINCH", | ||
"SIGXCPU", | ||
"SIGXFSZ", | ||
"SSL_OP_ALL", | ||
"SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION", | ||
"SSL_OP_CIPHER_SERVER_PREFERENCE", | ||
"SSL_OP_CISCO_ANYCONNECT", | ||
"SSL_OP_COOKIE_EXCHANGE", | ||
"SSL_OP_CRYPTOPRO_TLSEXT_BUG", | ||
"SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS", | ||
"SSL_OP_EPHEMERAL_RSA", | ||
"SSL_OP_LEGACY_SERVER_CONNECT", | ||
"SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER", | ||
"SSL_OP_MICROSOFT_SESS_ID_BUG", | ||
"SSL_OP_MSIE_SSLV2_RSA_PADDING", | ||
"SSL_OP_NETSCAPE_CA_DN_BUG", | ||
"SSL_OP_NETSCAPE_CHALLENGE_BUG", | ||
"SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG", | ||
"SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG", | ||
"SSL_OP_NO_COMPRESSION", | ||
"SSL_OP_NO_QUERY_MTU", | ||
"SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION", | ||
"SSL_OP_NO_SSLv2", | ||
"SSL_OP_NO_SSLv3", | ||
"SSL_OP_NO_TICKET", | ||
"SSL_OP_NO_TLSv1", | ||
"SSL_OP_NO_TLSv1_1", | ||
"SSL_OP_NO_TLSv1_2", | ||
"SSL_OP_PKCS1_CHECK_1", | ||
"SSL_OP_PKCS1_CHECK_2", | ||
"SSL_OP_SINGLE_DH_USE", | ||
"SSL_OP_SINGLE_ECDH_USE", | ||
"SSL_OP_SSLEAY_080_CLIENT_DH_BUG", | ||
"SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG", | ||
"SSL_OP_TLS_BLOCK_PADDING_BUG", | ||
"SSL_OP_TLS_D5_BUG", | ||
"SSL_OP_TLS_ROLLBACK_BUG", | ||
"S_IFBLK", | ||
"S_IFCHR", | ||
"S_IFDIR", | ||
"S_IFIFO", | ||
"S_IFLNK", | ||
"S_IFMT", | ||
"S_IFREG", | ||
"S_IFSOCK", | ||
"S_IRGRP", | ||
"S_IROTH", | ||
"S_IRUSR", | ||
"S_IRWXG", | ||
"S_IRWXO", | ||
"S_IRWXU", | ||
"S_IWGRP", | ||
"S_IWOTH", | ||
"S_IWUSR", | ||
"S_IXGRP", | ||
"S_IXOTH", | ||
"S_IXUSR", | ||
"UV_UDP_REUSEADDR", | ||
"W_OK", | ||
"X_OK" | ||
] | ||
} | ||
}, | ||
"npm:crypto-browserify@^3.12.0": { | ||
"namedExports": { | ||
"index.js": [ | ||
"Cipher", | ||
"Cipheriv", | ||
"Decipher", | ||
"Decipheriv", | ||
"DiffieHellman", | ||
"DiffieHellmanGroup", | ||
"Hash", | ||
"Hmac", | ||
"Sign", | ||
"Verify", | ||
"constants", | ||
"createCipher", | ||
"createCipheriv", | ||
"createCredentials", | ||
"createDecipher", | ||
"createDecipheriv", | ||
"createDiffieHellman", | ||
"createDiffieHellmanGroup", | ||
"createECDH", | ||
"createHash", | ||
"createHmac", | ||
"createSign", | ||
"createVerify", | ||
"getCiphers", | ||
"getDiffieHellman", | ||
"getHashes", | ||
"listCiphers", | ||
"pbkdf2", | ||
"pbkdf2Sync", | ||
"privateDecrypt", | ||
"privateEncrypt", | ||
"prng", | ||
"pseudoRandomBytes", | ||
"publicDecrypt", | ||
"publicEncrypt", | ||
"randomBytes", | ||
"randomFill", | ||
"randomFillSync", | ||
"rng" | ||
] | ||
} | ||
}, | ||
"npm:domain-browser@^1.1.7": { | ||
"namedExports": { | ||
"source/index.js": [ | ||
"create", | ||
"createDomain" | ||
] | ||
} | ||
}, | ||
"npm:events@^3.0.0": { | ||
"namedExports": { | ||
"events.js": [ | ||
"EventEmitter", | ||
"defaultMaxListeners", | ||
"init", | ||
"listenerCount" | ||
] | ||
} | ||
}, | ||
"npm:https-browserify@^1.0.0": { | ||
"namedExports": { | ||
"index.js": [ | ||
"Agent", | ||
"ClientRequest", | ||
"IncomingMessage", | ||
"METHODS", | ||
"STATUS_CODES", | ||
"get", | ||
"globalAgent", | ||
"request" | ||
] | ||
} | ||
}, | ||
"npm:os-browserify@~0.3.0": { | ||
"namedExports": { | ||
"browser.js": [ | ||
"EOL", | ||
"arch", | ||
"cpus", | ||
"endianness", | ||
"freemem", | ||
"getNetworkInterfaces", | ||
"homedir", | ||
"hostname", | ||
"loadavg", | ||
"networkInterfaces", | ||
"platform", | ||
"release", | ||
"tmpDir", | ||
"tmpdir", | ||
"totalmem", | ||
"type", | ||
"uptime" | ||
] | ||
} | ||
}, | ||
"npm:path-browserify@^0.0.0": { | ||
"namedExports": { | ||
"index.js": [ | ||
"_makeLong", | ||
"basename", | ||
"delimiter", | ||
"dirname", | ||
"extname", | ||
"format", | ||
"isAbsolute", | ||
"join", | ||
"normalize", | ||
"parse", | ||
"posix", | ||
"relative", | ||
"resolve", | ||
"sep", | ||
"win32" | ||
] | ||
} | ||
}, | ||
"npm:process@~0.11.10": { | ||
"namedExports": { | ||
"browser.js": [ | ||
"addListener", | ||
"argv", | ||
"binding", | ||
"browser", | ||
"chdir", | ||
"cwd", | ||
"emit", | ||
"env", | ||
"listeners", | ||
"nextTick", | ||
"off", | ||
"on", | ||
"once", | ||
"prependListener", | ||
"prependOnceListener", | ||
"removeAllListeners", | ||
"removeListener", | ||
"title", | ||
"umask", | ||
"version", | ||
"versions" | ||
] | ||
} | ||
}, | ||
"npm:punycode@^2.1.0": { | ||
"namedExports": { | ||
"punycode.js": [ | ||
"decode", | ||
"encode", | ||
"toASCII", | ||
"toUnicode", | ||
"ucs2", | ||
"version" | ||
] | ||
} | ||
}, | ||
"npm:querystring@~0.2.0": { | ||
"namedExports": { | ||
"index.js": [ | ||
"decode", | ||
"encode", | ||
"parse", | ||
"stringify" | ||
] | ||
} | ||
}, | ||
"npm:stream-browserify@^2.0.1": { | ||
"namedExports": { | ||
"index.js": [ | ||
"Duplex", | ||
"PassThrough", | ||
"Readable", | ||
"Stream", | ||
"Transform", | ||
"Writable", | ||
"super_" | ||
] | ||
} | ||
}, | ||
"npm:stream-http@^2.7.2": { | ||
"namedExports": { | ||
"index.js": [ | ||
"Agent", | ||
"ClientRequest", | ||
"IncomingMessage", | ||
"METHODS", | ||
"STATUS_CODES", | ||
"get", | ||
"globalAgent", | ||
"request" | ||
] | ||
} | ||
}, | ||
"npm:string_decoder@^1.2.0": { | ||
"namedExports": { | ||
"lib/string_decoder.js": [ | ||
"StringDecoder" | ||
] | ||
} | ||
}, | ||
"npm:timers-browserify@^2.0.10": { | ||
"namedExports": { | ||
"main.js": [ | ||
"_unrefActive", | ||
"active", | ||
"clearImmediate", | ||
"clearInterval", | ||
"clearTimeout", | ||
"enroll", | ||
"setImmediate", | ||
"setInterval", | ||
"setTimeout", | ||
"unenroll" | ||
] | ||
} | ||
}, | ||
"npm:tty-browserify@^0.0.1": { | ||
"namedExports": { | ||
"index.js": [ | ||
"ReadStream", | ||
"WriteStream", | ||
"isatty" | ||
] | ||
} | ||
}, | ||
"npm:url@~0.11.0": { | ||
"namedExports": { | ||
"url.js": [ | ||
"Url", | ||
"format", | ||
"parse", | ||
"resolve", | ||
"resolveObject" | ||
] | ||
} | ||
}, | ||
"npm:util@~0.11.0": { | ||
"namedExports": { | ||
"util.js": [ | ||
"_extend", | ||
"callbackify", | ||
"debuglog", | ||
"deprecate", | ||
"format", | ||
"inherits", | ||
"inspect", | ||
"isArray", | ||
"isBoolean", | ||
"isBuffer", | ||
"isDate", | ||
"isError", | ||
"isFunction", | ||
"isNull", | ||
"isNullOrUndefined", | ||
"isNumber", | ||
"isObject", | ||
"isPrimitive", | ||
"isRegExp", | ||
"isString", | ||
"isSymbol", | ||
"isUndefined", | ||
"log", | ||
"promisify" | ||
] | ||
} | ||
}, | ||
"npm:vm-browserify@^1.1.0": { | ||
"namedExports": { | ||
"index.js": [ | ||
"Script", | ||
"createContext", | ||
"createScript", | ||
"isContext", | ||
"runInContext", | ||
"runInNewContext", | ||
"runInThisContext" | ||
] | ||
} | ||
} | ||
} | ||
"type": "module" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
0
33
560473
1
1176
5