summaryrefslogtreecommitdiff
path: root/together/node_modules/superagent/dist
diff options
context:
space:
mode:
Diffstat (limited to 'together/node_modules/superagent/dist')
-rw-r--r--together/node_modules/superagent/dist/superagent.js3867
-rw-r--r--together/node_modules/superagent/dist/superagent.min.js1
2 files changed, 0 insertions, 3868 deletions
diff --git a/together/node_modules/superagent/dist/superagent.js b/together/node_modules/superagent/dist/superagent.js
deleted file mode 100644
index 5e62aac..0000000
--- a/together/node_modules/superagent/dist/superagent.js
+++ /dev/null
@@ -1,3867 +0,0 @@
-(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.superagent = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
-"use strict";
-
-},{}],2:[function(require,module,exports){
-'use strict';
-
-var GetIntrinsic = require('get-intrinsic');
-
-var callBind = require('./');
-
-var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
-
-module.exports = function callBoundIntrinsic(name, allowMissing) {
- var intrinsic = GetIntrinsic(name, !!allowMissing);
-
- if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
- return callBind(intrinsic);
- }
-
- return intrinsic;
-};
-
-},{"./":3,"get-intrinsic":8}],3:[function(require,module,exports){
-'use strict';
-
-var bind = require('function-bind');
-
-var GetIntrinsic = require('get-intrinsic');
-
-var $apply = GetIntrinsic('%Function.prototype.apply%');
-var $call = GetIntrinsic('%Function.prototype.call%');
-var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
-var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
-var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
-var $max = GetIntrinsic('%Math.max%');
-
-if ($defineProperty) {
- try {
- $defineProperty({}, 'a', {
- value: 1
- });
- } catch (e) {
- $defineProperty = null;
- }
-}
-
-module.exports = function callBind(originalFunction) {
- var func = $reflectApply(bind, $call, arguments);
-
- if ($gOPD && $defineProperty) {
- var desc = $gOPD(func, 'length');
-
- if (desc.configurable) {
- $defineProperty(func, 'length', {
- value: 1 + $max(0, originalFunction.length - (arguments.length - 1))
- });
- }
- }
-
- return func;
-};
-
-var applyBind = function applyBind() {
- return $reflectApply(bind, $apply, arguments);
-};
-
-if ($defineProperty) {
- $defineProperty(module.exports, 'apply', {
- value: applyBind
- });
-} else {
- module.exports.apply = applyBind;
-}
-
-},{"function-bind":7,"get-intrinsic":8}],4:[function(require,module,exports){
-"use strict";
-
-if (typeof module !== 'undefined') {
- module.exports = Emitter;
-}
-
-function Emitter(obj) {
- if (obj) return mixin(obj);
-}
-
-;
-
-function mixin(obj) {
- for (var key in Emitter.prototype) {
- obj[key] = Emitter.prototype[key];
- }
-
- return obj;
-}
-
-Emitter.prototype.on = Emitter.prototype.addEventListener = function (event, fn) {
- this._callbacks = this._callbacks || {};
- (this._callbacks['$' + event] = this._callbacks['$' + event] || []).push(fn);
- return this;
-};
-
-Emitter.prototype.once = function (event, fn) {
- function on() {
- this.off(event, on);
- fn.apply(this, arguments);
- }
-
- on.fn = fn;
- this.on(event, on);
- return this;
-};
-
-Emitter.prototype.off = Emitter.prototype.removeListener = Emitter.prototype.removeAllListeners = Emitter.prototype.removeEventListener = function (event, fn) {
- this._callbacks = this._callbacks || {};
-
- if (0 == arguments.length) {
- this._callbacks = {};
- return this;
- }
-
- var callbacks = this._callbacks['$' + event];
- if (!callbacks) return this;
-
- if (1 == arguments.length) {
- delete this._callbacks['$' + event];
- return this;
- }
-
- var cb;
-
- for (var i = 0; i < callbacks.length; i++) {
- cb = callbacks[i];
-
- if (cb === fn || cb.fn === fn) {
- callbacks.splice(i, 1);
- break;
- }
- }
-
- if (callbacks.length === 0) {
- delete this._callbacks['$' + event];
- }
-
- return this;
-};
-
-Emitter.prototype.emit = function (event) {
- this._callbacks = this._callbacks || {};
- var args = new Array(arguments.length - 1),
- callbacks = this._callbacks['$' + event];
-
- for (var i = 1; i < arguments.length; i++) {
- args[i - 1] = arguments[i];
- }
-
- if (callbacks) {
- callbacks = callbacks.slice(0);
-
- for (var i = 0, len = callbacks.length; i < len; ++i) {
- callbacks[i].apply(this, args);
- }
- }
-
- return this;
-};
-
-Emitter.prototype.listeners = function (event) {
- this._callbacks = this._callbacks || {};
- return this._callbacks['$' + event] || [];
-};
-
-Emitter.prototype.hasListeners = function (event) {
- return !!this.listeners(event).length;
-};
-
-},{}],5:[function(require,module,exports){
-"use strict";
-
-module.exports = stringify;
-stringify.default = stringify;
-stringify.stable = deterministicStringify;
-stringify.stableStringify = deterministicStringify;
-var LIMIT_REPLACE_NODE = '[...]';
-var CIRCULAR_REPLACE_NODE = '[Circular]';
-var arr = [];
-var replacerStack = [];
-
-function defaultOptions() {
- return {
- depthLimit: Number.MAX_SAFE_INTEGER,
- edgesLimit: Number.MAX_SAFE_INTEGER
- };
-}
-
-function stringify(obj, replacer, spacer, options) {
- if (typeof options === 'undefined') {
- options = defaultOptions();
- }
-
- decirc(obj, '', 0, [], undefined, 0, options);
- var res;
-
- try {
- if (replacerStack.length === 0) {
- res = JSON.stringify(obj, replacer, spacer);
- } else {
- res = JSON.stringify(obj, replaceGetterValues(replacer), spacer);
- }
- } catch (_) {
- return JSON.stringify('[unable to serialize, circular reference is too complex to analyze]');
- } finally {
- while (arr.length !== 0) {
- var part = arr.pop();
-
- if (part.length === 4) {
- Object.defineProperty(part[0], part[1], part[3]);
- } else {
- part[0][part[1]] = part[2];
- }
- }
- }
-
- return res;
-}
-
-function setReplace(replace, val, k, parent) {
- var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k);
-
- if (propertyDescriptor.get !== undefined) {
- if (propertyDescriptor.configurable) {
- Object.defineProperty(parent, k, {
- value: replace
- });
- arr.push([parent, k, val, propertyDescriptor]);
- } else {
- replacerStack.push([val, k, replace]);
- }
- } else {
- parent[k] = replace;
- arr.push([parent, k, val]);
- }
-}
-
-function decirc(val, k, edgeIndex, stack, parent, depth, options) {
- depth += 1;
- var i;
-
- if (typeof val === 'object' && val !== null) {
- for (i = 0; i < stack.length; i++) {
- if (stack[i] === val) {
- setReplace(CIRCULAR_REPLACE_NODE, val, k, parent);
- return;
- }
- }
-
- if (typeof options.depthLimit !== 'undefined' && depth > options.depthLimit) {
- setReplace(LIMIT_REPLACE_NODE, val, k, parent);
- return;
- }
-
- if (typeof options.edgesLimit !== 'undefined' && edgeIndex + 1 > options.edgesLimit) {
- setReplace(LIMIT_REPLACE_NODE, val, k, parent);
- return;
- }
-
- stack.push(val);
-
- if (Array.isArray(val)) {
- for (i = 0; i < val.length; i++) {
- decirc(val[i], i, i, stack, val, depth, options);
- }
- } else {
- var keys = Object.keys(val);
-
- for (i = 0; i < keys.length; i++) {
- var key = keys[i];
- decirc(val[key], key, i, stack, val, depth, options);
- }
- }
-
- stack.pop();
- }
-}
-
-function compareFunction(a, b) {
- if (a < b) {
- return -1;
- }
-
- if (a > b) {
- return 1;
- }
-
- return 0;
-}
-
-function deterministicStringify(obj, replacer, spacer, options) {
- if (typeof options === 'undefined') {
- options = defaultOptions();
- }
-
- var tmp = deterministicDecirc(obj, '', 0, [], undefined, 0, options) || obj;
- var res;
-
- try {
- if (replacerStack.length === 0) {
- res = JSON.stringify(tmp, replacer, spacer);
- } else {
- res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer);
- }
- } catch (_) {
- return JSON.stringify('[unable to serialize, circular reference is too complex to analyze]');
- } finally {
- while (arr.length !== 0) {
- var part = arr.pop();
-
- if (part.length === 4) {
- Object.defineProperty(part[0], part[1], part[3]);
- } else {
- part[0][part[1]] = part[2];
- }
- }
- }
-
- return res;
-}
-
-function deterministicDecirc(val, k, edgeIndex, stack, parent, depth, options) {
- depth += 1;
- var i;
-
- if (typeof val === 'object' && val !== null) {
- for (i = 0; i < stack.length; i++) {
- if (stack[i] === val) {
- setReplace(CIRCULAR_REPLACE_NODE, val, k, parent);
- return;
- }
- }
-
- try {
- if (typeof val.toJSON === 'function') {
- return;
- }
- } catch (_) {
- return;
- }
-
- if (typeof options.depthLimit !== 'undefined' && depth > options.depthLimit) {
- setReplace(LIMIT_REPLACE_NODE, val, k, parent);
- return;
- }
-
- if (typeof options.edgesLimit !== 'undefined' && edgeIndex + 1 > options.edgesLimit) {
- setReplace(LIMIT_REPLACE_NODE, val, k, parent);
- return;
- }
-
- stack.push(val);
-
- if (Array.isArray(val)) {
- for (i = 0; i < val.length; i++) {
- deterministicDecirc(val[i], i, i, stack, val, depth, options);
- }
- } else {
- var tmp = {};
- var keys = Object.keys(val).sort(compareFunction);
-
- for (i = 0; i < keys.length; i++) {
- var key = keys[i];
- deterministicDecirc(val[key], key, i, stack, val, depth, options);
- tmp[key] = val[key];
- }
-
- if (typeof parent !== 'undefined') {
- arr.push([parent, k, val]);
- parent[k] = tmp;
- } else {
- return tmp;
- }
- }
-
- stack.pop();
- }
-}
-
-function replaceGetterValues(replacer) {
- replacer = typeof replacer !== 'undefined' ? replacer : function (k, v) {
- return v;
- };
- return function (key, val) {
- if (replacerStack.length > 0) {
- for (var i = 0; i < replacerStack.length; i++) {
- var part = replacerStack[i];
-
- if (part[1] === key && part[0] === val) {
- val = part[2];
- replacerStack.splice(i, 1);
- break;
- }
- }
- }
-
- return replacer.call(this, key, val);
- };
-}
-
-},{}],6:[function(require,module,exports){
-'use strict';
-
-var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
-var slice = Array.prototype.slice;
-var toStr = Object.prototype.toString;
-var funcType = '[object Function]';
-
-module.exports = function bind(that) {
- var target = this;
-
- if (typeof target !== 'function' || toStr.call(target) !== funcType) {
- throw new TypeError(ERROR_MESSAGE + target);
- }
-
- var args = slice.call(arguments, 1);
- var bound;
-
- var binder = function () {
- if (this instanceof bound) {
- var result = target.apply(this, args.concat(slice.call(arguments)));
-
- if (Object(result) === result) {
- return result;
- }
-
- return this;
- } else {
- return target.apply(that, args.concat(slice.call(arguments)));
- }
- };
-
- var boundLength = Math.max(0, target.length - args.length);
- var boundArgs = [];
-
- for (var i = 0; i < boundLength; i++) {
- boundArgs.push('$' + i);
- }
-
- bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
-
- if (target.prototype) {
- var Empty = function Empty() {};
-
- Empty.prototype = target.prototype;
- bound.prototype = new Empty();
- Empty.prototype = null;
- }
-
- return bound;
-};
-
-},{}],7:[function(require,module,exports){
-'use strict';
-
-var implementation = require('./implementation');
-
-module.exports = Function.prototype.bind || implementation;
-
-},{"./implementation":6}],8:[function(require,module,exports){
-'use strict';
-
-var undefined;
-var $SyntaxError = SyntaxError;
-var $Function = Function;
-var $TypeError = TypeError;
-
-var getEvalledConstructor = function (expressionSyntax) {
- try {
- return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
- } catch (e) {}
-};
-
-var $gOPD = Object.getOwnPropertyDescriptor;
-
-if ($gOPD) {
- try {
- $gOPD({}, '');
- } catch (e) {
- $gOPD = null;
- }
-}
-
-var throwTypeError = function () {
- throw new $TypeError();
-};
-
-var ThrowTypeError = $gOPD ? function () {
- try {
- arguments.callee;
- return throwTypeError;
- } catch (calleeThrows) {
- try {
- return $gOPD(arguments, 'callee').get;
- } catch (gOPDthrows) {
- return throwTypeError;
- }
- }
-}() : throwTypeError;
-
-var hasSymbols = require('has-symbols')();
-
-var getProto = Object.getPrototypeOf || function (x) {
- return x.__proto__;
-};
-
-var needsEval = {};
-var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
-var INTRINSICS = {
- '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
- '%Array%': Array,
- '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
- '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
- '%AsyncFromSyncIteratorPrototype%': undefined,
- '%AsyncFunction%': needsEval,
- '%AsyncGenerator%': needsEval,
- '%AsyncGeneratorFunction%': needsEval,
- '%AsyncIteratorPrototype%': needsEval,
- '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
- '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
- '%Boolean%': Boolean,
- '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
- '%Date%': Date,
- '%decodeURI%': decodeURI,
- '%decodeURIComponent%': decodeURIComponent,
- '%encodeURI%': encodeURI,
- '%encodeURIComponent%': encodeURIComponent,
- '%Error%': Error,
- '%eval%': eval,
- '%EvalError%': EvalError,
- '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
- '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
- '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
- '%Function%': $Function,
- '%GeneratorFunction%': needsEval,
- '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
- '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
- '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
- '%isFinite%': isFinite,
- '%isNaN%': isNaN,
- '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
- '%JSON%': typeof JSON === 'object' ? JSON : undefined,
- '%Map%': typeof Map === 'undefined' ? undefined : Map,
- '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
- '%Math%': Math,
- '%Number%': Number,
- '%Object%': Object,
- '%parseFloat%': parseFloat,
- '%parseInt%': parseInt,
- '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
- '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
- '%RangeError%': RangeError,
- '%ReferenceError%': ReferenceError,
- '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
- '%RegExp%': RegExp,
- '%Set%': typeof Set === 'undefined' ? undefined : Set,
- '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
- '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
- '%String%': String,
- '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
- '%Symbol%': hasSymbols ? Symbol : undefined,
- '%SyntaxError%': $SyntaxError,
- '%ThrowTypeError%': ThrowTypeError,
- '%TypedArray%': TypedArray,
- '%TypeError%': $TypeError,
- '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
- '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
- '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
- '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
- '%URIError%': URIError,
- '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
- '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
- '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
-};
-
-var doEval = function doEval(name) {
- var value;
-
- if (name === '%AsyncFunction%') {
- value = getEvalledConstructor('async function () {}');
- } else if (name === '%GeneratorFunction%') {
- value = getEvalledConstructor('function* () {}');
- } else if (name === '%AsyncGeneratorFunction%') {
- value = getEvalledConstructor('async function* () {}');
- } else if (name === '%AsyncGenerator%') {
- var fn = doEval('%AsyncGeneratorFunction%');
-
- if (fn) {
- value = fn.prototype;
- }
- } else if (name === '%AsyncIteratorPrototype%') {
- var gen = doEval('%AsyncGenerator%');
-
- if (gen) {
- value = getProto(gen.prototype);
- }
- }
-
- INTRINSICS[name] = value;
- return value;
-};
-
-var LEGACY_ALIASES = {
- '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
- '%ArrayPrototype%': ['Array', 'prototype'],
- '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
- '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
- '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
- '%ArrayProto_values%': ['Array', 'prototype', 'values'],
- '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
- '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
- '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
- '%BooleanPrototype%': ['Boolean', 'prototype'],
- '%DataViewPrototype%': ['DataView', 'prototype'],
- '%DatePrototype%': ['Date', 'prototype'],
- '%ErrorPrototype%': ['Error', 'prototype'],
- '%EvalErrorPrototype%': ['EvalError', 'prototype'],
- '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
- '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
- '%FunctionPrototype%': ['Function', 'prototype'],
- '%Generator%': ['GeneratorFunction', 'prototype'],
- '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
- '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
- '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
- '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
- '%JSONParse%': ['JSON', 'parse'],
- '%JSONStringify%': ['JSON', 'stringify'],
- '%MapPrototype%': ['Map', 'prototype'],
- '%NumberPrototype%': ['Number', 'prototype'],
- '%ObjectPrototype%': ['Object', 'prototype'],
- '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
- '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
- '%PromisePrototype%': ['Promise', 'prototype'],
- '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
- '%Promise_all%': ['Promise', 'all'],
- '%Promise_reject%': ['Promise', 'reject'],
- '%Promise_resolve%': ['Promise', 'resolve'],
- '%RangeErrorPrototype%': ['RangeError', 'prototype'],
- '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
- '%RegExpPrototype%': ['RegExp', 'prototype'],
- '%SetPrototype%': ['Set', 'prototype'],
- '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
- '%StringPrototype%': ['String', 'prototype'],
- '%SymbolPrototype%': ['Symbol', 'prototype'],
- '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
- '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
- '%TypeErrorPrototype%': ['TypeError', 'prototype'],
- '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
- '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
- '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
- '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
- '%URIErrorPrototype%': ['URIError', 'prototype'],
- '%WeakMapPrototype%': ['WeakMap', 'prototype'],
- '%WeakSetPrototype%': ['WeakSet', 'prototype']
-};
-
-var bind = require('function-bind');
-
-var hasOwn = require('has');
-
-var $concat = bind.call(Function.call, Array.prototype.concat);
-var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
-var $replace = bind.call(Function.call, String.prototype.replace);
-var $strSlice = bind.call(Function.call, String.prototype.slice);
-var $exec = bind.call(Function.call, RegExp.prototype.exec);
-var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
-var reEscapeChar = /\\(\\)?/g;
-
-var stringToPath = function stringToPath(string) {
- var first = $strSlice(string, 0, 1);
- var last = $strSlice(string, -1);
-
- if (first === '%' && last !== '%') {
- throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
- } else if (last === '%' && first !== '%') {
- throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
- }
-
- var result = [];
- $replace(string, rePropName, function (match, number, quote, subString) {
- result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
- });
- return result;
-};
-
-var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
- var intrinsicName = name;
- var alias;
-
- if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
- alias = LEGACY_ALIASES[intrinsicName];
- intrinsicName = '%' + alias[0] + '%';
- }
-
- if (hasOwn(INTRINSICS, intrinsicName)) {
- var value = INTRINSICS[intrinsicName];
-
- if (value === needsEval) {
- value = doEval(intrinsicName);
- }
-
- if (typeof value === 'undefined' && !allowMissing) {
- throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
- }
-
- return {
- alias: alias,
- name: intrinsicName,
- value: value
- };
- }
-
- throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
-};
-
-module.exports = function GetIntrinsic(name, allowMissing) {
- if (typeof name !== 'string' || name.length === 0) {
- throw new $TypeError('intrinsic name must be a non-empty string');
- }
-
- if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
- throw new $TypeError('"allowMissing" argument must be a boolean');
- }
-
- if ($exec(/^%?[^%]*%?$/g, name) === null) {
- throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
- }
-
- var parts = stringToPath(name);
- var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
- var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
- var intrinsicRealName = intrinsic.name;
- var value = intrinsic.value;
- var skipFurtherCaching = false;
- var alias = intrinsic.alias;
-
- if (alias) {
- intrinsicBaseName = alias[0];
- $spliceApply(parts, $concat([0, 1], alias));
- }
-
- for (var i = 1, isOwn = true; i < parts.length; i += 1) {
- var part = parts[i];
- var first = $strSlice(part, 0, 1);
- var last = $strSlice(part, -1);
-
- if ((first === '"' || first === "'" || first === '`' || last === '"' || last === "'" || last === '`') && first !== last) {
- throw new $SyntaxError('property names with quotes must have matching quotes');
- }
-
- if (part === 'constructor' || !isOwn) {
- skipFurtherCaching = true;
- }
-
- intrinsicBaseName += '.' + part;
- intrinsicRealName = '%' + intrinsicBaseName + '%';
-
- if (hasOwn(INTRINSICS, intrinsicRealName)) {
- value = INTRINSICS[intrinsicRealName];
- } else if (value != null) {
- if (!(part in value)) {
- if (!allowMissing) {
- throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
- }
-
- return void undefined;
- }
-
- if ($gOPD && i + 1 >= parts.length) {
- var desc = $gOPD(value, part);
- isOwn = !!desc;
-
- if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
- value = desc.get;
- } else {
- value = value[part];
- }
- } else {
- isOwn = hasOwn(value, part);
- value = value[part];
- }
-
- if (isOwn && !skipFurtherCaching) {
- INTRINSICS[intrinsicRealName] = value;
- }
- }
- }
-
- return value;
-};
-
-},{"function-bind":7,"has":11,"has-symbols":9}],9:[function(require,module,exports){
-'use strict';
-
-var origSymbol = typeof Symbol !== 'undefined' && Symbol;
-
-var hasSymbolSham = require('./shams');
-
-module.exports = function hasNativeSymbols() {
- if (typeof origSymbol !== 'function') {
- return false;
- }
-
- if (typeof Symbol !== 'function') {
- return false;
- }
-
- if (typeof origSymbol('foo') !== 'symbol') {
- return false;
- }
-
- if (typeof Symbol('bar') !== 'symbol') {
- return false;
- }
-
- return hasSymbolSham();
-};
-
-},{"./shams":10}],10:[function(require,module,exports){
-'use strict';
-
-module.exports = function hasSymbols() {
- if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') {
- return false;
- }
-
- if (typeof Symbol.iterator === 'symbol') {
- return true;
- }
-
- var obj = {};
- var sym = Symbol('test');
- var symObj = Object(sym);
-
- if (typeof sym === 'string') {
- return false;
- }
-
- if (Object.prototype.toString.call(sym) !== '[object Symbol]') {
- return false;
- }
-
- if (Object.prototype.toString.call(symObj) !== '[object Symbol]') {
- return false;
- }
-
- var symVal = 42;
- obj[sym] = symVal;
-
- for (sym in obj) {
- return false;
- }
-
- if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) {
- return false;
- }
-
- if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) {
- return false;
- }
-
- var syms = Object.getOwnPropertySymbols(obj);
-
- if (syms.length !== 1 || syms[0] !== sym) {
- return false;
- }
-
- if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
- return false;
- }
-
- if (typeof Object.getOwnPropertyDescriptor === 'function') {
- var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
-
- if (descriptor.value !== symVal || descriptor.enumerable !== true) {
- return false;
- }
- }
-
- return true;
-};
-
-},{}],11:[function(require,module,exports){
-'use strict';
-
-var bind = require('function-bind');
-
-module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
-
-},{"function-bind":7}],12:[function(require,module,exports){
-"use strict";
-
-var hasMap = typeof Map === 'function' && Map.prototype;
-var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
-var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
-var mapForEach = hasMap && Map.prototype.forEach;
-var hasSet = typeof Set === 'function' && Set.prototype;
-var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
-var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
-var setForEach = hasSet && Set.prototype.forEach;
-var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
-var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
-var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
-var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
-var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
-var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
-var booleanValueOf = Boolean.prototype.valueOf;
-var objectToString = Object.prototype.toString;
-var functionToString = Function.prototype.toString;
-var $match = String.prototype.match;
-var $slice = String.prototype.slice;
-var $replace = String.prototype.replace;
-var $toUpperCase = String.prototype.toUpperCase;
-var $toLowerCase = String.prototype.toLowerCase;
-var $test = RegExp.prototype.test;
-var $concat = Array.prototype.concat;
-var $join = Array.prototype.join;
-var $arrSlice = Array.prototype.slice;
-var $floor = Math.floor;
-var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
-var gOPS = Object.getOwnPropertySymbols;
-var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
-var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
-var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') ? Symbol.toStringTag : null;
-var isEnumerable = Object.prototype.propertyIsEnumerable;
-var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function (O) {
- return O.__proto__;
-} : null);
-
-function addNumericSeparator(num, str) {
- if (num === Infinity || num === -Infinity || num !== num || num && num > -1000 && num < 1000 || $test.call(/e/, str)) {
- return str;
- }
-
- var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
-
- if (typeof num === 'number') {
- var int = num < 0 ? -$floor(-num) : $floor(num);
-
- if (int !== num) {
- var intStr = String(int);
- var dec = $slice.call(str, intStr.length + 1);
- return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
- }
- }
-
- return $replace.call(str, sepRegex, '$&_');
-}
-
-var utilInspect = require('./util.inspect');
-
-var inspectCustom = utilInspect.custom;
-var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
-
-module.exports = function inspect_(obj, options, depth, seen) {
- var opts = options || {};
-
- if (has(opts, 'quoteStyle') && opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double') {
- throw new TypeError('option "quoteStyle" must be "single" or "double"');
- }
-
- if (has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
- throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
- }
-
- var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;
-
- if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
- throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
- }
-
- if (has(opts, 'indent') && opts.indent !== null && opts.indent !== '\t' && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
- throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
- }
-
- if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
- throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
- }
-
- var numericSeparator = opts.numericSeparator;
-
- if (typeof obj === 'undefined') {
- return 'undefined';
- }
-
- if (obj === null) {
- return 'null';
- }
-
- if (typeof obj === 'boolean') {
- return obj ? 'true' : 'false';
- }
-
- if (typeof obj === 'string') {
- return inspectString(obj, opts);
- }
-
- if (typeof obj === 'number') {
- if (obj === 0) {
- return Infinity / obj > 0 ? '0' : '-0';
- }
-
- var str = String(obj);
- return numericSeparator ? addNumericSeparator(obj, str) : str;
- }
-
- if (typeof obj === 'bigint') {
- var bigIntStr = String(obj) + 'n';
- return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
- }
-
- var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
-
- if (typeof depth === 'undefined') {
- depth = 0;
- }
-
- if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
- return isArray(obj) ? '[Array]' : '[Object]';
- }
-
- var indent = getIndent(opts, depth);
-
- if (typeof seen === 'undefined') {
- seen = [];
- } else if (indexOf(seen, obj) >= 0) {
- return '[Circular]';
- }
-
- function inspect(value, from, noIndent) {
- if (from) {
- seen = $arrSlice.call(seen);
- seen.push(from);
- }
-
- if (noIndent) {
- var newOpts = {
- depth: opts.depth
- };
-
- if (has(opts, 'quoteStyle')) {
- newOpts.quoteStyle = opts.quoteStyle;
- }
-
- return inspect_(value, newOpts, depth + 1, seen);
- }
-
- return inspect_(value, opts, depth + 1, seen);
- }
-
- if (typeof obj === 'function' && !isRegExp(obj)) {
- var name = nameOf(obj);
- var keys = arrObjKeys(obj, inspect);
- return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
- }
-
- if (isSymbol(obj)) {
- var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
- return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
- }
-
- if (isElement(obj)) {
- var s = '<' + $toLowerCase.call(String(obj.nodeName));
- var attrs = obj.attributes || [];
-
- for (var i = 0; i < attrs.length; i++) {
- s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
- }
-
- s += '>';
-
- if (obj.childNodes && obj.childNodes.length) {
- s += '...';
- }
-
- s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
- return s;
- }
-
- if (isArray(obj)) {
- if (obj.length === 0) {
- return '[]';
- }
-
- var xs = arrObjKeys(obj, inspect);
-
- if (indent && !singleLineValues(xs)) {
- return '[' + indentedJoin(xs, indent) + ']';
- }
-
- return '[ ' + $join.call(xs, ', ') + ' ]';
- }
-
- if (isError(obj)) {
- var parts = arrObjKeys(obj, inspect);
-
- if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
- return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
- }
-
- if (parts.length === 0) {
- return '[' + String(obj) + ']';
- }
-
- return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
- }
-
- if (typeof obj === 'object' && customInspect) {
- if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
- return utilInspect(obj, {
- depth: maxDepth - depth
- });
- } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
- return obj.inspect();
- }
- }
-
- if (isMap(obj)) {
- var mapParts = [];
- mapForEach.call(obj, function (value, key) {
- mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
- });
- return collectionOf('Map', mapSize.call(obj), mapParts, indent);
- }
-
- if (isSet(obj)) {
- var setParts = [];
- setForEach.call(obj, function (value) {
- setParts.push(inspect(value, obj));
- });
- return collectionOf('Set', setSize.call(obj), setParts, indent);
- }
-
- if (isWeakMap(obj)) {
- return weakCollectionOf('WeakMap');
- }
-
- if (isWeakSet(obj)) {
- return weakCollectionOf('WeakSet');
- }
-
- if (isWeakRef(obj)) {
- return weakCollectionOf('WeakRef');
- }
-
- if (isNumber(obj)) {
- return markBoxed(inspect(Number(obj)));
- }
-
- if (isBigInt(obj)) {
- return markBoxed(inspect(bigIntValueOf.call(obj)));
- }
-
- if (isBoolean(obj)) {
- return markBoxed(booleanValueOf.call(obj));
- }
-
- if (isString(obj)) {
- return markBoxed(inspect(String(obj)));
- }
-
- if (!isDate(obj) && !isRegExp(obj)) {
- var ys = arrObjKeys(obj, inspect);
- var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
- var protoTag = obj instanceof Object ? '' : 'null prototype';
- var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
- var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
- var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
-
- if (ys.length === 0) {
- return tag + '{}';
- }
-
- if (indent) {
- return tag + '{' + indentedJoin(ys, indent) + '}';
- }
-
- return tag + '{ ' + $join.call(ys, ', ') + ' }';
- }
-
- return String(obj);
-};
-
-function wrapQuotes(s, defaultStyle, opts) {
- var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
- return quoteChar + s + quoteChar;
-}
-
-function quote(s) {
- return $replace.call(String(s), /"/g, '&quot;');
-}
-
-function isArray(obj) {
- return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj));
-}
-
-function isDate(obj) {
- return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj));
-}
-
-function isRegExp(obj) {
- return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj));
-}
-
-function isError(obj) {
- return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj));
-}
-
-function isString(obj) {
- return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj));
-}
-
-function isNumber(obj) {
- return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj));
-}
-
-function isBoolean(obj) {
- return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj));
-}
-
-function isSymbol(obj) {
- if (hasShammedSymbols) {
- return obj && typeof obj === 'object' && obj instanceof Symbol;
- }
-
- if (typeof obj === 'symbol') {
- return true;
- }
-
- if (!obj || typeof obj !== 'object' || !symToString) {
- return false;
- }
-
- try {
- symToString.call(obj);
- return true;
- } catch (e) {}
-
- return false;
-}
-
-function isBigInt(obj) {
- if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
- return false;
- }
-
- try {
- bigIntValueOf.call(obj);
- return true;
- } catch (e) {}
-
- return false;
-}
-
-var hasOwn = Object.prototype.hasOwnProperty || function (key) {
- return key in this;
-};
-
-function has(obj, key) {
- return hasOwn.call(obj, key);
-}
-
-function toStr(obj) {
- return objectToString.call(obj);
-}
-
-function nameOf(f) {
- if (f.name) {
- return f.name;
- }
-
- var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
-
- if (m) {
- return m[1];
- }
-
- return null;
-}
-
-function indexOf(xs, x) {
- if (xs.indexOf) {
- return xs.indexOf(x);
- }
-
- for (var i = 0, l = xs.length; i < l; i++) {
- if (xs[i] === x) {
- return i;
- }
- }
-
- return -1;
-}
-
-function isMap(x) {
- if (!mapSize || !x || typeof x !== 'object') {
- return false;
- }
-
- try {
- mapSize.call(x);
-
- try {
- setSize.call(x);
- } catch (s) {
- return true;
- }
-
- return x instanceof Map;
- } catch (e) {}
-
- return false;
-}
-
-function isWeakMap(x) {
- if (!weakMapHas || !x || typeof x !== 'object') {
- return false;
- }
-
- try {
- weakMapHas.call(x, weakMapHas);
-
- try {
- weakSetHas.call(x, weakSetHas);
- } catch (s) {
- return true;
- }
-
- return x instanceof WeakMap;
- } catch (e) {}
-
- return false;
-}
-
-function isWeakRef(x) {
- if (!weakRefDeref || !x || typeof x !== 'object') {
- return false;
- }
-
- try {
- weakRefDeref.call(x);
- return true;
- } catch (e) {}
-
- return false;
-}
-
-function isSet(x) {
- if (!setSize || !x || typeof x !== 'object') {
- return false;
- }
-
- try {
- setSize.call(x);
-
- try {
- mapSize.call(x);
- } catch (m) {
- return true;
- }
-
- return x instanceof Set;
- } catch (e) {}
-
- return false;
-}
-
-function isWeakSet(x) {
- if (!weakSetHas || !x || typeof x !== 'object') {
- return false;
- }
-
- try {
- weakSetHas.call(x, weakSetHas);
-
- try {
- weakMapHas.call(x, weakMapHas);
- } catch (s) {
- return true;
- }
-
- return x instanceof WeakSet;
- } catch (e) {}
-
- return false;
-}
-
-function isElement(x) {
- if (!x || typeof x !== 'object') {
- return false;
- }
-
- if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
- return true;
- }
-
- return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
-}
-
-function inspectString(str, opts) {
- if (str.length > opts.maxStringLength) {
- var remaining = str.length - opts.maxStringLength;
- var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
- return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
- }
-
- var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
- return wrapQuotes(s, 'single', opts);
-}
-
-function lowbyte(c) {
- var n = c.charCodeAt(0);
- var x = {
- 8: 'b',
- 9: 't',
- 10: 'n',
- 12: 'f',
- 13: 'r'
- }[n];
-
- if (x) {
- return '\\' + x;
- }
-
- return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
-}
-
-function markBoxed(str) {
- return 'Object(' + str + ')';
-}
-
-function weakCollectionOf(type) {
- return type + ' { ? }';
-}
-
-function collectionOf(type, size, entries, indent) {
- var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
- return type + ' (' + size + ') {' + joinedEntries + '}';
-}
-
-function singleLineValues(xs) {
- for (var i = 0; i < xs.length; i++) {
- if (indexOf(xs[i], '\n') >= 0) {
- return false;
- }
- }
-
- return true;
-}
-
-function getIndent(opts, depth) {
- var baseIndent;
-
- if (opts.indent === '\t') {
- baseIndent = '\t';
- } else if (typeof opts.indent === 'number' && opts.indent > 0) {
- baseIndent = $join.call(Array(opts.indent + 1), ' ');
- } else {
- return null;
- }
-
- return {
- base: baseIndent,
- prev: $join.call(Array(depth + 1), baseIndent)
- };
-}
-
-function indentedJoin(xs, indent) {
- if (xs.length === 0) {
- return '';
- }
-
- var lineJoiner = '\n' + indent.prev + indent.base;
- return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
-}
-
-function arrObjKeys(obj, inspect) {
- var isArr = isArray(obj);
- var xs = [];
-
- if (isArr) {
- xs.length = obj.length;
-
- for (var i = 0; i < obj.length; i++) {
- xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
- }
- }
-
- var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
- var symMap;
-
- if (hasShammedSymbols) {
- symMap = {};
-
- for (var k = 0; k < syms.length; k++) {
- symMap['$' + syms[k]] = syms[k];
- }
- }
-
- for (var key in obj) {
- if (!has(obj, key)) {
- continue;
- }
-
- if (isArr && String(Number(key)) === key && key < obj.length) {
- continue;
- }
-
- if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
- continue;
- } else if ($test.call(/[^\w$]/, key)) {
- xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
- } else {
- xs.push(key + ': ' + inspect(obj[key], obj));
- }
- }
-
- if (typeof gOPS === 'function') {
- for (var j = 0; j < syms.length; j++) {
- if (isEnumerable.call(obj, syms[j])) {
- xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
- }
- }
- }
-
- return xs;
-}
-
-},{"./util.inspect":1}],13:[function(require,module,exports){
-"use strict";
-
-var process = module.exports = {};
-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) {
- return setTimeout(fun, 0);
- }
-
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
- cachedSetTimeout = setTimeout;
- return setTimeout(fun, 0);
- }
-
- try {
- return cachedSetTimeout(fun, 0);
- } catch (e) {
- try {
- return cachedSetTimeout.call(null, fun, 0);
- } catch (e) {
- return cachedSetTimeout.call(this, fun, 0);
- }
- }
-}
-
-function runClearTimeout(marker) {
- if (cachedClearTimeout === clearTimeout) {
- return clearTimeout(marker);
- }
-
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
- cachedClearTimeout = clearTimeout;
- return clearTimeout(marker);
- }
-
- try {
- return cachedClearTimeout(marker);
- } catch (e) {
- try {
- return cachedClearTimeout.call(null, marker);
- } catch (e) {
- return cachedClearTimeout.call(this, 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);
- }
-};
-
-function Item(fun, array) {
- this.fun = fun;
- this.array = array;
-}
-
-Item.prototype.run = function () {
- this.fun.apply(null, this.array);
-};
-
-process.title = 'browser';
-process.browser = true;
-process.env = {};
-process.argv = [];
-process.version = '';
-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;
-};
-
-},{}],14:[function(require,module,exports){
-'use strict';
-
-var replace = String.prototype.replace;
-var percentTwenties = /%20/g;
-var Format = {
- RFC1738: 'RFC1738',
- RFC3986: 'RFC3986'
-};
-module.exports = {
- 'default': Format.RFC3986,
- formatters: {
- RFC1738: function (value) {
- return replace.call(value, percentTwenties, '+');
- },
- RFC3986: function (value) {
- return String(value);
- }
- },
- RFC1738: Format.RFC1738,
- RFC3986: Format.RFC3986
-};
-
-},{}],15:[function(require,module,exports){
-'use strict';
-
-var stringify = require('./stringify');
-
-var parse = require('./parse');
-
-var formats = require('./formats');
-
-module.exports = {
- formats: formats,
- parse: parse,
- stringify: stringify
-};
-
-},{"./formats":14,"./parse":16,"./stringify":17}],16:[function(require,module,exports){
-'use strict';
-
-var utils = require('./utils');
-
-var has = Object.prototype.hasOwnProperty;
-var isArray = Array.isArray;
-var defaults = {
- allowDots: false,
- allowPrototypes: false,
- allowSparse: false,
- arrayLimit: 20,
- charset: 'utf-8',
- charsetSentinel: false,
- comma: false,
- decoder: utils.decode,
- delimiter: '&',
- depth: 5,
- ignoreQueryPrefix: false,
- interpretNumericEntities: false,
- parameterLimit: 1000,
- parseArrays: true,
- plainObjects: false,
- strictNullHandling: false
-};
-
-var interpretNumericEntities = function (str) {
- return str.replace(/&#(\d+);/g, function ($0, numberStr) {
- return String.fromCharCode(parseInt(numberStr, 10));
- });
-};
-
-var parseArrayValue = function (val, options) {
- if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
- return val.split(',');
- }
-
- return val;
-};
-
-var isoSentinel = 'utf8=%26%2310003%3B';
-var charsetSentinel = 'utf8=%E2%9C%93';
-
-var parseValues = function parseQueryStringValues(str, options) {
- var obj = {};
- var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
- var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
- var parts = cleanStr.split(options.delimiter, limit);
- var skipIndex = -1;
- var i;
- var charset = options.charset;
-
- if (options.charsetSentinel) {
- for (i = 0; i < parts.length; ++i) {
- if (parts[i].indexOf('utf8=') === 0) {
- if (parts[i] === charsetSentinel) {
- charset = 'utf-8';
- } else if (parts[i] === isoSentinel) {
- charset = 'iso-8859-1';
- }
-
- skipIndex = i;
- i = parts.length;
- }
- }
- }
-
- for (i = 0; i < parts.length; ++i) {
- if (i === skipIndex) {
- continue;
- }
-
- var part = parts[i];
- var bracketEqualsPos = part.indexOf(']=');
- var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
- var key, val;
-
- if (pos === -1) {
- key = options.decoder(part, defaults.decoder, charset, 'key');
- val = options.strictNullHandling ? null : '';
- } else {
- key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
- val = utils.maybeMap(parseArrayValue(part.slice(pos + 1), options), function (encodedVal) {
- return options.decoder(encodedVal, defaults.decoder, charset, 'value');
- });
- }
-
- if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
- val = interpretNumericEntities(val);
- }
-
- if (part.indexOf('[]=') > -1) {
- val = isArray(val) ? [val] : val;
- }
-
- if (has.call(obj, key)) {
- obj[key] = utils.combine(obj[key], val);
- } else {
- obj[key] = val;
- }
- }
-
- return obj;
-};
-
-var parseObject = function (chain, val, options, valuesParsed) {
- var leaf = valuesParsed ? val : parseArrayValue(val, options);
-
- for (var i = chain.length - 1; i >= 0; --i) {
- var obj;
- var root = chain[i];
-
- if (root === '[]' && options.parseArrays) {
- obj = [].concat(leaf);
- } else {
- obj = options.plainObjects ? Object.create(null) : {};
- var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
- var index = parseInt(cleanRoot, 10);
-
- if (!options.parseArrays && cleanRoot === '') {
- obj = {
- 0: leaf
- };
- } else if (!isNaN(index) && root !== cleanRoot && String(index) === cleanRoot && index >= 0 && options.parseArrays && index <= options.arrayLimit) {
- obj = [];
- obj[index] = leaf;
- } else if (cleanRoot !== '__proto__') {
- obj[cleanRoot] = leaf;
- }
- }
-
- leaf = obj;
- }
-
- return leaf;
-};
-
-var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
- if (!givenKey) {
- return;
- }
-
- var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
- var brackets = /(\[[^[\]]*])/;
- var child = /(\[[^[\]]*])/g;
- var segment = options.depth > 0 && brackets.exec(key);
- var parent = segment ? key.slice(0, segment.index) : key;
- var keys = [];
-
- if (parent) {
- if (!options.plainObjects && has.call(Object.prototype, parent)) {
- if (!options.allowPrototypes) {
- return;
- }
- }
-
- keys.push(parent);
- }
-
- var i = 0;
-
- while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
- i += 1;
-
- if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
- if (!options.allowPrototypes) {
- return;
- }
- }
-
- keys.push(segment[1]);
- }
-
- if (segment) {
- keys.push('[' + key.slice(segment.index) + ']');
- }
-
- return parseObject(keys, val, options, valuesParsed);
-};
-
-var normalizeParseOptions = function normalizeParseOptions(opts) {
- if (!opts) {
- return defaults;
- }
-
- if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
- throw new TypeError('Decoder has to be a function.');
- }
-
- if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
- throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
- }
-
- var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
- return {
- allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
- allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
- allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
- arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
- charset: charset,
- charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
- comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
- decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
- delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
- depth: typeof opts.depth === 'number' || opts.depth === false ? +opts.depth : defaults.depth,
- ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
- interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
- parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
- parseArrays: opts.parseArrays !== false,
- plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
- strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
- };
-};
-
-module.exports = function (str, opts) {
- var options = normalizeParseOptions(opts);
-
- if (str === '' || str === null || typeof str === 'undefined') {
- return options.plainObjects ? Object.create(null) : {};
- }
-
- var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
- var obj = options.plainObjects ? Object.create(null) : {};
- var keys = Object.keys(tempObj);
-
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
- obj = utils.merge(obj, newObj, options);
- }
-
- if (options.allowSparse === true) {
- return obj;
- }
-
- return utils.compact(obj);
-};
-
-},{"./utils":18}],17:[function(require,module,exports){
-'use strict';
-
-var getSideChannel = require('side-channel');
-
-var utils = require('./utils');
-
-var formats = require('./formats');
-
-var has = Object.prototype.hasOwnProperty;
-var arrayPrefixGenerators = {
- brackets: function brackets(prefix) {
- return prefix + '[]';
- },
- comma: 'comma',
- indices: function indices(prefix, key) {
- return prefix + '[' + key + ']';
- },
- repeat: function repeat(prefix) {
- return prefix;
- }
-};
-var isArray = Array.isArray;
-var split = String.prototype.split;
-var push = Array.prototype.push;
-
-var pushToArray = function (arr, valueOrArray) {
- push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
-};
-
-var toISO = Date.prototype.toISOString;
-var defaultFormat = formats['default'];
-var defaults = {
- addQueryPrefix: false,
- allowDots: false,
- charset: 'utf-8',
- charsetSentinel: false,
- delimiter: '&',
- encode: true,
- encoder: utils.encode,
- encodeValuesOnly: false,
- format: defaultFormat,
- formatter: formats.formatters[defaultFormat],
- indices: false,
- serializeDate: function serializeDate(date) {
- return toISO.call(date);
- },
- skipNulls: false,
- strictNullHandling: false
-};
-
-var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
- return typeof v === 'string' || typeof v === 'number' || typeof v === 'boolean' || typeof v === 'symbol' || typeof v === 'bigint';
-};
-
-var sentinel = {};
-
-var stringify = function stringify(object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) {
- var obj = object;
- var tmpSc = sideChannel;
- var step = 0;
- var findFlag = false;
-
- while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
- var pos = tmpSc.get(object);
- step += 1;
-
- if (typeof pos !== 'undefined') {
- if (pos === step) {
- throw new RangeError('Cyclic object value');
- } else {
- findFlag = true;
- }
- }
-
- if (typeof tmpSc.get(sentinel) === 'undefined') {
- step = 0;
- }
- }
-
- if (typeof filter === 'function') {
- obj = filter(prefix, obj);
- } else if (obj instanceof Date) {
- obj = serializeDate(obj);
- } else if (generateArrayPrefix === 'comma' && isArray(obj)) {
- obj = utils.maybeMap(obj, function (value) {
- if (value instanceof Date) {
- return serializeDate(value);
- }
-
- return value;
- });
- }
-
- if (obj === null) {
- if (strictNullHandling) {
- return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;
- }
-
- obj = '';
- }
-
- if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
- if (encoder) {
- var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);
-
- if (generateArrayPrefix === 'comma' && encodeValuesOnly) {
- var valuesArray = split.call(String(obj), ',');
- var valuesJoined = '';
-
- for (var i = 0; i < valuesArray.length; ++i) {
- valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults.encoder, charset, 'value', format));
- }
-
- return [formatter(keyValue) + (isArray(obj) && valuesArray.length === 1 ? '[]' : '') + '=' + valuesJoined];
- }
-
- return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
- }
-
- return [formatter(prefix) + '=' + formatter(String(obj))];
- }
-
- var values = [];
-
- if (typeof obj === 'undefined') {
- return values;
- }
-
- var objKeys;
-
- if (generateArrayPrefix === 'comma' && isArray(obj)) {
- objKeys = [{
- value: obj.length > 0 ? obj.join(',') || null : void undefined
- }];
- } else if (isArray(filter)) {
- objKeys = filter;
- } else {
- var keys = Object.keys(obj);
- objKeys = sort ? keys.sort(sort) : keys;
- }
-
- var adjustedPrefix = generateArrayPrefix === 'comma' && isArray(obj) && obj.length === 1 ? prefix + '[]' : prefix;
-
- for (var j = 0; j < objKeys.length; ++j) {
- var key = objKeys[j];
- var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
-
- if (skipNulls && value === null) {
- continue;
- }
-
- var keyPrefix = isArray(obj) ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');
- sideChannel.set(object, step);
- var valueSideChannel = getSideChannel();
- valueSideChannel.set(sentinel, sideChannel);
- pushToArray(values, stringify(value, keyPrefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, valueSideChannel));
- }
-
- return values;
-};
-
-var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
- if (!opts) {
- return defaults;
- }
-
- if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
- throw new TypeError('Encoder has to be a function.');
- }
-
- var charset = opts.charset || defaults.charset;
-
- if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
- throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
- }
-
- var format = formats['default'];
-
- if (typeof opts.format !== 'undefined') {
- if (!has.call(formats.formatters, opts.format)) {
- throw new TypeError('Unknown format option provided.');
- }
-
- format = opts.format;
- }
-
- var formatter = formats.formatters[format];
- var filter = defaults.filter;
-
- if (typeof opts.filter === 'function' || isArray(opts.filter)) {
- filter = opts.filter;
- }
-
- return {
- addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,
- allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
- charset: charset,
- charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
- delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
- encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
- encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
- encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
- filter: filter,
- format: format,
- formatter: formatter,
- serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
- skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
- sort: typeof opts.sort === 'function' ? opts.sort : null,
- strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
- };
-};
-
-module.exports = function (object, opts) {
- var obj = object;
- var options = normalizeStringifyOptions(opts);
- var objKeys;
- var filter;
-
- if (typeof options.filter === 'function') {
- filter = options.filter;
- obj = filter('', obj);
- } else if (isArray(options.filter)) {
- filter = options.filter;
- objKeys = filter;
- }
-
- var keys = [];
-
- if (typeof obj !== 'object' || obj === null) {
- return '';
- }
-
- var arrayFormat;
-
- if (opts && opts.arrayFormat in arrayPrefixGenerators) {
- arrayFormat = opts.arrayFormat;
- } else if (opts && 'indices' in opts) {
- arrayFormat = opts.indices ? 'indices' : 'repeat';
- } else {
- arrayFormat = 'indices';
- }
-
- var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
-
- if (!objKeys) {
- objKeys = Object.keys(obj);
- }
-
- if (options.sort) {
- objKeys.sort(options.sort);
- }
-
- var sideChannel = getSideChannel();
-
- for (var i = 0; i < objKeys.length; ++i) {
- var key = objKeys[i];
-
- if (options.skipNulls && obj[key] === null) {
- continue;
- }
-
- pushToArray(keys, stringify(obj[key], key, generateArrayPrefix, options.strictNullHandling, options.skipNulls, options.encode ? options.encoder : null, options.filter, options.sort, options.allowDots, options.serializeDate, options.format, options.formatter, options.encodeValuesOnly, options.charset, sideChannel));
- }
-
- var joined = keys.join(options.delimiter);
- var prefix = options.addQueryPrefix === true ? '?' : '';
-
- if (options.charsetSentinel) {
- if (options.charset === 'iso-8859-1') {
- prefix += 'utf8=%26%2310003%3B&';
- } else {
- prefix += 'utf8=%E2%9C%93&';
- }
- }
-
- return joined.length > 0 ? prefix + joined : '';
-};
-
-},{"./formats":14,"./utils":18,"side-channel":19}],18:[function(require,module,exports){
-'use strict';
-
-var formats = require('./formats');
-
-var has = Object.prototype.hasOwnProperty;
-var isArray = Array.isArray;
-
-var hexTable = function () {
- var array = [];
-
- for (var i = 0; i < 256; ++i) {
- array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
- }
-
- return array;
-}();
-
-var compactQueue = function compactQueue(queue) {
- while (queue.length > 1) {
- var item = queue.pop();
- var obj = item.obj[item.prop];
-
- if (isArray(obj)) {
- var compacted = [];
-
- for (var j = 0; j < obj.length; ++j) {
- if (typeof obj[j] !== 'undefined') {
- compacted.push(obj[j]);
- }
- }
-
- item.obj[item.prop] = compacted;
- }
- }
-};
-
-var arrayToObject = function arrayToObject(source, options) {
- var obj = options && options.plainObjects ? Object.create(null) : {};
-
- for (var i = 0; i < source.length; ++i) {
- if (typeof source[i] !== 'undefined') {
- obj[i] = source[i];
- }
- }
-
- return obj;
-};
-
-var merge = function merge(target, source, options) {
- if (!source) {
- return target;
- }
-
- if (typeof source !== 'object') {
- if (isArray(target)) {
- target.push(source);
- } else if (target && typeof target === 'object') {
- if (options && (options.plainObjects || options.allowPrototypes) || !has.call(Object.prototype, source)) {
- target[source] = true;
- }
- } else {
- return [target, source];
- }
-
- return target;
- }
-
- if (!target || typeof target !== 'object') {
- return [target].concat(source);
- }
-
- var mergeTarget = target;
-
- if (isArray(target) && !isArray(source)) {
- mergeTarget = arrayToObject(target, options);
- }
-
- if (isArray(target) && isArray(source)) {
- source.forEach(function (item, i) {
- if (has.call(target, i)) {
- var targetItem = target[i];
-
- if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
- target[i] = merge(targetItem, item, options);
- } else {
- target.push(item);
- }
- } else {
- target[i] = item;
- }
- });
- return target;
- }
-
- return Object.keys(source).reduce(function (acc, key) {
- var value = source[key];
-
- if (has.call(acc, key)) {
- acc[key] = merge(acc[key], value, options);
- } else {
- acc[key] = value;
- }
-
- return acc;
- }, mergeTarget);
-};
-
-var assign = function assignSingleSource(target, source) {
- return Object.keys(source).reduce(function (acc, key) {
- acc[key] = source[key];
- return acc;
- }, target);
-};
-
-var decode = function (str, decoder, charset) {
- var strWithoutPlus = str.replace(/\+/g, ' ');
-
- if (charset === 'iso-8859-1') {
- return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
- }
-
- try {
- return decodeURIComponent(strWithoutPlus);
- } catch (e) {
- return strWithoutPlus;
- }
-};
-
-var encode = function encode(str, defaultEncoder, charset, kind, format) {
- if (str.length === 0) {
- return str;
- }
-
- var string = str;
-
- if (typeof str === 'symbol') {
- string = Symbol.prototype.toString.call(str);
- } else if (typeof str !== 'string') {
- string = String(str);
- }
-
- if (charset === 'iso-8859-1') {
- return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
- return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
- });
- }
-
- var out = '';
-
- for (var i = 0; i < string.length; ++i) {
- var c = string.charCodeAt(i);
-
- if (c === 0x2D || c === 0x2E || c === 0x5F || c === 0x7E || c >= 0x30 && c <= 0x39 || c >= 0x41 && c <= 0x5A || c >= 0x61 && c <= 0x7A || format === formats.RFC1738 && (c === 0x28 || c === 0x29)) {
- out += string.charAt(i);
- continue;
- }
-
- if (c < 0x80) {
- out = out + hexTable[c];
- continue;
- }
-
- if (c < 0x800) {
- out = out + (hexTable[0xC0 | c >> 6] + hexTable[0x80 | c & 0x3F]);
- continue;
- }
-
- if (c < 0xD800 || c >= 0xE000) {
- out = out + (hexTable[0xE0 | c >> 12] + hexTable[0x80 | c >> 6 & 0x3F] + hexTable[0x80 | c & 0x3F]);
- continue;
- }
-
- i += 1;
- c = 0x10000 + ((c & 0x3FF) << 10 | string.charCodeAt(i) & 0x3FF);
- out += hexTable[0xF0 | c >> 18] + hexTable[0x80 | c >> 12 & 0x3F] + hexTable[0x80 | c >> 6 & 0x3F] + hexTable[0x80 | c & 0x3F];
- }
-
- return out;
-};
-
-var compact = function compact(value) {
- var queue = [{
- obj: {
- o: value
- },
- prop: 'o'
- }];
- var refs = [];
-
- for (var i = 0; i < queue.length; ++i) {
- var item = queue[i];
- var obj = item.obj[item.prop];
- var keys = Object.keys(obj);
-
- for (var j = 0; j < keys.length; ++j) {
- var key = keys[j];
- var val = obj[key];
-
- if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
- queue.push({
- obj: obj,
- prop: key
- });
- refs.push(val);
- }
- }
- }
-
- compactQueue(queue);
- return value;
-};
-
-var isRegExp = function isRegExp(obj) {
- return Object.prototype.toString.call(obj) === '[object RegExp]';
-};
-
-var isBuffer = function isBuffer(obj) {
- if (!obj || typeof obj !== 'object') {
- return false;
- }
-
- return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
-};
-
-var combine = function combine(a, b) {
- return [].concat(a, b);
-};
-
-var maybeMap = function maybeMap(val, fn) {
- if (isArray(val)) {
- var mapped = [];
-
- for (var i = 0; i < val.length; i += 1) {
- mapped.push(fn(val[i]));
- }
-
- return mapped;
- }
-
- return fn(val);
-};
-
-module.exports = {
- arrayToObject: arrayToObject,
- assign: assign,
- combine: combine,
- compact: compact,
- decode: decode,
- encode: encode,
- isBuffer: isBuffer,
- isRegExp: isRegExp,
- maybeMap: maybeMap,
- merge: merge
-};
-
-},{"./formats":14}],19:[function(require,module,exports){
-'use strict';
-
-var GetIntrinsic = require('get-intrinsic');
-
-var callBound = require('call-bind/callBound');
-
-var inspect = require('object-inspect');
-
-var $TypeError = GetIntrinsic('%TypeError%');
-var $WeakMap = GetIntrinsic('%WeakMap%', true);
-var $Map = GetIntrinsic('%Map%', true);
-var $weakMapGet = callBound('WeakMap.prototype.get', true);
-var $weakMapSet = callBound('WeakMap.prototype.set', true);
-var $weakMapHas = callBound('WeakMap.prototype.has', true);
-var $mapGet = callBound('Map.prototype.get', true);
-var $mapSet = callBound('Map.prototype.set', true);
-var $mapHas = callBound('Map.prototype.has', true);
-
-var listGetNode = function (list, key) {
- for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
- if (curr.key === key) {
- prev.next = curr.next;
- curr.next = list.next;
- list.next = curr;
- return curr;
- }
- }
-};
-
-var listGet = function (objects, key) {
- var node = listGetNode(objects, key);
- return node && node.value;
-};
-
-var listSet = function (objects, key, value) {
- var node = listGetNode(objects, key);
-
- if (node) {
- node.value = value;
- } else {
- objects.next = {
- key: key,
- next: objects.next,
- value: value
- };
- }
-};
-
-var listHas = function (objects, key) {
- return !!listGetNode(objects, key);
-};
-
-module.exports = function getSideChannel() {
- var $wm;
- var $m;
- var $o;
- var channel = {
- assert: function (key) {
- if (!channel.has(key)) {
- throw new $TypeError('Side channel does not contain ' + inspect(key));
- }
- },
- get: function (key) {
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
- if ($wm) {
- return $weakMapGet($wm, key);
- }
- } else if ($Map) {
- if ($m) {
- return $mapGet($m, key);
- }
- } else {
- if ($o) {
- return listGet($o, key);
- }
- }
- },
- has: function (key) {
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
- if ($wm) {
- return $weakMapHas($wm, key);
- }
- } else if ($Map) {
- if ($m) {
- return $mapHas($m, key);
- }
- } else {
- if ($o) {
- return listHas($o, key);
- }
- }
-
- return false;
- },
- set: function (key, value) {
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
- if (!$wm) {
- $wm = new $WeakMap();
- }
-
- $weakMapSet($wm, key, value);
- } else if ($Map) {
- if (!$m) {
- $m = new $Map();
- }
-
- $mapSet($m, key, value);
- } else {
- if (!$o) {
- $o = {
- key: {},
- next: null
- };
- }
-
- listSet($o, key, value);
- }
- }
- };
- return channel;
-};
-
-},{"call-bind/callBound":2,"get-intrinsic":8,"object-inspect":12}],20:[function(require,module,exports){
-"use strict";
-
-function Agent() {
- this._defaults = [];
-}
-
-for (const fn of ['use', 'on', 'once', 'set', 'query', 'type', 'accept', 'auth', 'withCredentials', 'sortQuery', 'retry', 'ok', 'redirects', 'timeout', 'buffer', 'serialize', 'parse', 'ca', 'key', 'pfx', 'cert', 'disableTLSCerts']) {
- Agent.prototype[fn] = function () {
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
-
- this._defaults.push({
- fn,
- args
- });
-
- return this;
- };
-}
-
-Agent.prototype._setDefaults = function (request) {
- for (const def of this._defaults) {
- request[def.fn](...def.args);
- }
-};
-
-module.exports = Agent;
-
-},{}],21:[function(require,module,exports){
-"use strict";
-
-let root;
-
-if (typeof window !== 'undefined') {
- root = window;
-} else if (typeof self === 'undefined') {
- console.warn('Using browser-only version of superagent in non-browser environment');
- root = void 0;
-} else {
- root = self;
-}
-
-const Emitter = require('component-emitter');
-
-const safeStringify = require('fast-safe-stringify');
-
-const qs = require('qs');
-
-const RequestBase = require('./request-base');
-
-const {
- isObject,
- mixin,
- hasOwn
-} = require('./utils');
-
-const ResponseBase = require('./response-base');
-
-const Agent = require('./agent-base');
-
-function noop() {}
-
-module.exports = function (method, url) {
- if (typeof url === 'function') {
- return new exports.Request('GET', method).end(url);
- }
-
- if (arguments.length === 1) {
- return new exports.Request('GET', method);
- }
-
- return new exports.Request(method, url);
-};
-
-exports = module.exports;
-const request = exports;
-exports.Request = Request;
-
-request.getXHR = () => {
- if (root.XMLHttpRequest) {
- return new root.XMLHttpRequest();
- }
-
- throw new Error('Browser-only version of superagent could not find XHR');
-};
-
-const trim = ''.trim ? s => s.trim() : s => s.replace(/(^\s*|\s*$)/g, '');
-
-function serialize(object) {
- if (!isObject(object)) return object;
- const pairs = [];
-
- for (const key in object) {
- if (hasOwn(object, key)) pushEncodedKeyValuePair(pairs, key, object[key]);
- }
-
- return pairs.join('&');
-}
-
-function pushEncodedKeyValuePair(pairs, key, value) {
- if (value === undefined) return;
-
- if (value === null) {
- pairs.push(encodeURI(key));
- return;
- }
-
- if (Array.isArray(value)) {
- for (const v of value) {
- pushEncodedKeyValuePair(pairs, key, v);
- }
- } else if (isObject(value)) {
- for (const subkey in value) {
- if (hasOwn(value, subkey)) pushEncodedKeyValuePair(pairs, "".concat(key, "[").concat(subkey, "]"), value[subkey]);
- }
- } else {
- pairs.push(encodeURI(key) + '=' + encodeURIComponent(value));
- }
-}
-
-request.serializeObject = serialize;
-
-function parseString(string_) {
- const object = {};
- const pairs = string_.split('&');
- let pair;
- let pos;
-
- for (let i = 0, length_ = pairs.length; i < length_; ++i) {
- pair = pairs[i];
- pos = pair.indexOf('=');
-
- if (pos === -1) {
- object[decodeURIComponent(pair)] = '';
- } else {
- object[decodeURIComponent(pair.slice(0, pos))] = decodeURIComponent(pair.slice(pos + 1));
- }
- }
-
- return object;
-}
-
-request.parseString = parseString;
-request.types = {
- html: 'text/html',
- json: 'application/json',
- xml: 'text/xml',
- urlencoded: 'application/x-www-form-urlencoded',
- form: 'application/x-www-form-urlencoded',
- 'form-data': 'application/x-www-form-urlencoded'
-};
-request.serialize = {
- 'application/x-www-form-urlencoded': qs.stringify,
- 'application/json': safeStringify
-};
-request.parse = {
- 'application/x-www-form-urlencoded': parseString,
- 'application/json': JSON.parse
-};
-
-function parseHeader(string_) {
- const lines = string_.split(/\r?\n/);
- const fields = {};
- let index;
- let line;
- let field;
- let value;
-
- for (let i = 0, length_ = lines.length; i < length_; ++i) {
- line = lines[i];
- index = line.indexOf(':');
-
- if (index === -1) {
- continue;
- }
-
- field = line.slice(0, index).toLowerCase();
- value = trim(line.slice(index + 1));
- fields[field] = value;
- }
-
- return fields;
-}
-
-function isJSON(mime) {
- return /[/+]json($|[^-\w])/i.test(mime);
-}
-
-function Response(request_) {
- this.req = request_;
- this.xhr = this.req.xhr;
- this.text = this.req.method !== 'HEAD' && (this.xhr.responseType === '' || this.xhr.responseType === 'text') || typeof this.xhr.responseType === 'undefined' ? this.xhr.responseText : null;
- this.statusText = this.req.xhr.statusText;
- let {
- status
- } = this.xhr;
-
- if (status === 1223) {
- status = 204;
- }
-
- this._setStatusProperties(status);
-
- this.headers = parseHeader(this.xhr.getAllResponseHeaders());
- this.header = this.headers;
- this.header['content-type'] = this.xhr.getResponseHeader('content-type');
-
- this._setHeaderProperties(this.header);
-
- if (this.text === null && request_._responseType) {
- this.body = this.xhr.response;
- } else {
- this.body = this.req.method === 'HEAD' ? null : this._parseBody(this.text ? this.text : this.xhr.response);
- }
-}
-
-mixin(Response.prototype, ResponseBase.prototype);
-
-Response.prototype._parseBody = function (string_) {
- let parse = request.parse[this.type];
-
- if (this.req._parser) {
- return this.req._parser(this, string_);
- }
-
- if (!parse && isJSON(this.type)) {
- parse = request.parse['application/json'];
- }
-
- return parse && string_ && (string_.length > 0 || string_ instanceof Object) ? parse(string_) : null;
-};
-
-Response.prototype.toError = function () {
- const {
- req
- } = this;
- const {
- method
- } = req;
- const {
- url
- } = req;
- const message = "cannot ".concat(method, " ").concat(url, " (").concat(this.status, ")");
- const error = new Error(message);
- error.status = this.status;
- error.method = method;
- error.url = url;
- return error;
-};
-
-request.Response = Response;
-
-function Request(method, url) {
- const self = this;
- this._query = this._query || [];
- this.method = method;
- this.url = url;
- this.header = {};
- this._header = {};
- this.on('end', () => {
- let error = null;
- let res = null;
-
- try {
- res = new Response(self);
- } catch (err) {
- error = new Error('Parser is unable to parse the response');
- error.parse = true;
- error.original = err;
-
- if (self.xhr) {
- error.rawResponse = typeof self.xhr.responseType === 'undefined' ? self.xhr.responseText : self.xhr.response;
- error.status = self.xhr.status ? self.xhr.status : null;
- error.statusCode = error.status;
- } else {
- error.rawResponse = null;
- error.status = null;
- }
-
- return self.callback(error);
- }
-
- self.emit('response', res);
- let new_error;
-
- try {
- if (!self._isResponseOK(res)) {
- new_error = new Error(res.statusText || res.text || 'Unsuccessful HTTP response');
- }
- } catch (err) {
- new_error = err;
- }
-
- if (new_error) {
- new_error.original = error;
- new_error.response = res;
- new_error.status = new_error.status || res.status;
- self.callback(new_error, res);
- } else {
- self.callback(null, res);
- }
- });
-}
-
-Emitter(Request.prototype);
-mixin(Request.prototype, RequestBase.prototype);
-
-Request.prototype.type = function (type) {
- this.set('Content-Type', request.types[type] || type);
- return this;
-};
-
-Request.prototype.accept = function (type) {
- this.set('Accept', request.types[type] || type);
- return this;
-};
-
-Request.prototype.auth = function (user, pass, options) {
- if (arguments.length === 1) pass = '';
-
- if (typeof pass === 'object' && pass !== null) {
- options = pass;
- pass = '';
- }
-
- if (!options) {
- options = {
- type: typeof btoa === 'function' ? 'basic' : 'auto'
- };
- }
-
- const encoder = options.encoder ? options.encoder : string => {
- if (typeof btoa === 'function') {
- return btoa(string);
- }
-
- throw new Error('Cannot use basic auth, btoa is not a function');
- };
- return this._auth(user, pass, options, encoder);
-};
-
-Request.prototype.query = function (value) {
- if (typeof value !== 'string') value = serialize(value);
- if (value) this._query.push(value);
- return this;
-};
-
-Request.prototype.attach = function (field, file, options) {
- if (file) {
- if (this._data) {
- throw new Error("superagent can't mix .send() and .attach()");
- }
-
- this._getFormData().append(field, file, options || file.name);
- }
-
- return this;
-};
-
-Request.prototype._getFormData = function () {
- if (!this._formData) {
- this._formData = new root.FormData();
- }
-
- return this._formData;
-};
-
-Request.prototype.callback = function (error, res) {
- if (this._shouldRetry(error, res)) {
- return this._retry();
- }
-
- const fn = this._callback;
- this.clearTimeout();
-
- if (error) {
- if (this._maxRetries) error.retries = this._retries - 1;
- this.emit('error', error);
- }
-
- fn(error, res);
-};
-
-Request.prototype.crossDomainError = function () {
- const error = new Error('Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.');
- error.crossDomain = true;
- error.status = this.status;
- error.method = this.method;
- error.url = this.url;
- this.callback(error);
-};
-
-Request.prototype.agent = function () {
- console.warn('This is not supported in browser version of superagent');
- return this;
-};
-
-Request.prototype.ca = Request.prototype.agent;
-Request.prototype.buffer = Request.prototype.ca;
-
-Request.prototype.write = () => {
- throw new Error('Streaming is not supported in browser version of superagent');
-};
-
-Request.prototype.pipe = Request.prototype.write;
-
-Request.prototype._isHost = function (object) {
- return object && typeof object === 'object' && !Array.isArray(object) && Object.prototype.toString.call(object) !== '[object Object]';
-};
-
-Request.prototype.end = function (fn) {
- if (this._endCalled) {
- console.warn('Warning: .end() was called twice. This is not supported in superagent');
- }
-
- this._endCalled = true;
- this._callback = fn || noop;
-
- this._finalizeQueryString();
-
- this._end();
-};
-
-Request.prototype._setUploadTimeout = function () {
- const self = this;
-
- if (this._uploadTimeout && !this._uploadTimeoutTimer) {
- this._uploadTimeoutTimer = setTimeout(() => {
- self._timeoutError('Upload timeout of ', self._uploadTimeout, 'ETIMEDOUT');
- }, this._uploadTimeout);
- }
-};
-
-Request.prototype._end = function () {
- if (this._aborted) return this.callback(new Error('The request has been aborted even before .end() was called'));
- const self = this;
- this.xhr = request.getXHR();
- const {
- xhr
- } = this;
- let data = this._formData || this._data;
-
- this._setTimeouts();
-
- xhr.addEventListener('readystatechange', () => {
- const {
- readyState
- } = xhr;
-
- if (readyState >= 2 && self._responseTimeoutTimer) {
- clearTimeout(self._responseTimeoutTimer);
- }
-
- if (readyState !== 4) {
- return;
- }
-
- let status;
-
- try {
- status = xhr.status;
- } catch (err) {
- status = 0;
- }
-
- if (!status) {
- if (self.timedout || self._aborted) return;
- return self.crossDomainError();
- }
-
- self.emit('end');
- });
-
- const handleProgress = (direction, e) => {
- if (e.total > 0) {
- e.percent = e.loaded / e.total * 100;
-
- if (e.percent === 100) {
- clearTimeout(self._uploadTimeoutTimer);
- }
- }
-
- e.direction = direction;
- self.emit('progress', e);
- };
-
- if (this.hasListeners('progress')) {
- try {
- xhr.addEventListener('progress', handleProgress.bind(null, 'download'));
-
- if (xhr.upload) {
- xhr.upload.addEventListener('progress', handleProgress.bind(null, 'upload'));
- }
- } catch (err) {}
- }
-
- if (xhr.upload) {
- this._setUploadTimeout();
- }
-
- try {
- if (this.username && this.password) {
- xhr.open(this.method, this.url, true, this.username, this.password);
- } else {
- xhr.open(this.method, this.url, true);
- }
- } catch (err) {
- return this.callback(err);
- }
-
- if (this._withCredentials) xhr.withCredentials = true;
-
- if (!this._formData && this.method !== 'GET' && this.method !== 'HEAD' && typeof data !== 'string' && !this._isHost(data)) {
- const contentType = this._header['content-type'];
- let serialize = this._serializer || request.serialize[contentType ? contentType.split(';')[0] : ''];
-
- if (!serialize && isJSON(contentType)) {
- serialize = request.serialize['application/json'];
- }
-
- if (serialize) data = serialize(data);
- }
-
- for (const field in this.header) {
- if (this.header[field] === null) continue;
- if (hasOwn(this.header, field)) xhr.setRequestHeader(field, this.header[field]);
- }
-
- if (this._responseType) {
- xhr.responseType = this._responseType;
- }
-
- this.emit('request', this);
- xhr.send(typeof data === 'undefined' ? null : data);
-};
-
-request.agent = () => new Agent();
-
-for (const method of ['GET', 'POST', 'OPTIONS', 'PATCH', 'PUT', 'DELETE']) {
- Agent.prototype[method.toLowerCase()] = function (url, fn) {
- const request_ = new request.Request(method, url);
-
- this._setDefaults(request_);
-
- if (fn) {
- request_.end(fn);
- }
-
- return request_;
- };
-}
-
-Agent.prototype.del = Agent.prototype.delete;
-
-request.get = (url, data, fn) => {
- const request_ = request('GET', url);
-
- if (typeof data === 'function') {
- fn = data;
- data = null;
- }
-
- if (data) request_.query(data);
- if (fn) request_.end(fn);
- return request_;
-};
-
-request.head = (url, data, fn) => {
- const request_ = request('HEAD', url);
-
- if (typeof data === 'function') {
- fn = data;
- data = null;
- }
-
- if (data) request_.query(data);
- if (fn) request_.end(fn);
- return request_;
-};
-
-request.options = (url, data, fn) => {
- const request_ = request('OPTIONS', url);
-
- if (typeof data === 'function') {
- fn = data;
- data = null;
- }
-
- if (data) request_.send(data);
- if (fn) request_.end(fn);
- return request_;
-};
-
-function del(url, data, fn) {
- const request_ = request('DELETE', url);
-
- if (typeof data === 'function') {
- fn = data;
- data = null;
- }
-
- if (data) request_.send(data);
- if (fn) request_.end(fn);
- return request_;
-}
-
-request.del = del;
-request.delete = del;
-
-request.patch = (url, data, fn) => {
- const request_ = request('PATCH', url);
-
- if (typeof data === 'function') {
- fn = data;
- data = null;
- }
-
- if (data) request_.send(data);
- if (fn) request_.end(fn);
- return request_;
-};
-
-request.post = (url, data, fn) => {
- const request_ = request('POST', url);
-
- if (typeof data === 'function') {
- fn = data;
- data = null;
- }
-
- if (data) request_.send(data);
- if (fn) request_.end(fn);
- return request_;
-};
-
-request.put = (url, data, fn) => {
- const request_ = request('PUT', url);
-
- if (typeof data === 'function') {
- fn = data;
- data = null;
- }
-
- if (data) request_.send(data);
- if (fn) request_.end(fn);
- return request_;
-};
-
-},{"./agent-base":20,"./request-base":22,"./response-base":23,"./utils":24,"component-emitter":4,"fast-safe-stringify":5,"qs":15}],22:[function(require,module,exports){
-(function (process){(function (){
-"use strict";
-
-const semver = require('semver');
-
-const {
- isObject,
- hasOwn
-} = require('./utils');
-
-module.exports = RequestBase;
-
-function RequestBase() {}
-
-RequestBase.prototype.clearTimeout = function () {
- clearTimeout(this._timer);
- clearTimeout(this._responseTimeoutTimer);
- clearTimeout(this._uploadTimeoutTimer);
- delete this._timer;
- delete this._responseTimeoutTimer;
- delete this._uploadTimeoutTimer;
- return this;
-};
-
-RequestBase.prototype.parse = function (fn) {
- this._parser = fn;
- return this;
-};
-
-RequestBase.prototype.responseType = function (value) {
- this._responseType = value;
- return this;
-};
-
-RequestBase.prototype.serialize = function (fn) {
- this._serializer = fn;
- return this;
-};
-
-RequestBase.prototype.timeout = function (options) {
- if (!options || typeof options !== 'object') {
- this._timeout = options;
- this._responseTimeout = 0;
- this._uploadTimeout = 0;
- return this;
- }
-
- for (const option in options) {
- if (hasOwn(options, option)) {
- switch (option) {
- case 'deadline':
- this._timeout = options.deadline;
- break;
-
- case 'response':
- this._responseTimeout = options.response;
- break;
-
- case 'upload':
- this._uploadTimeout = options.upload;
- break;
-
- default:
- console.warn('Unknown timeout option', option);
- }
- }
- }
-
- return this;
-};
-
-RequestBase.prototype.retry = function (count, fn) {
- if (arguments.length === 0 || count === true) count = 1;
- if (count <= 0) count = 0;
- this._maxRetries = count;
- this._retries = 0;
- this._retryCallback = fn;
- return this;
-};
-
-const ERROR_CODES = new Set(['ETIMEDOUT', 'ECONNRESET', 'EADDRINUSE', 'ECONNREFUSED', 'EPIPE', 'ENOTFOUND', 'ENETUNREACH', 'EAI_AGAIN']);
-const STATUS_CODES = new Set([408, 413, 429, 500, 502, 503, 504, 521, 522, 524]);
-
-RequestBase.prototype._shouldRetry = function (error, res) {
- if (!this._maxRetries || this._retries++ >= this._maxRetries) {
- return false;
- }
-
- if (this._retryCallback) {
- try {
- const override = this._retryCallback(error, res);
-
- if (override === true) return true;
- if (override === false) return false;
- } catch (err) {
- console.error(err);
- }
- }
-
- if (res && res.status && STATUS_CODES.has(res.status)) return true;
-
- if (error) {
- if (error.code && ERROR_CODES.has(error.code)) return true;
- if (error.timeout && error.code === 'ECONNABORTED') return true;
- if (error.crossDomain) return true;
- }
-
- return false;
-};
-
-RequestBase.prototype._retry = function () {
- this.clearTimeout();
-
- if (this.req) {
- this.req = null;
- this.req = this.request();
- }
-
- this._aborted = false;
- this.timedout = false;
- this.timedoutError = null;
- return this._end();
-};
-
-RequestBase.prototype.then = function (resolve, reject) {
- if (!this._fullfilledPromise) {
- const self = this;
-
- if (this._endCalled) {
- console.warn('Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises');
- }
-
- this._fullfilledPromise = new Promise((resolve, reject) => {
- self.on('abort', () => {
- if (this._maxRetries && this._maxRetries > this._retries) {
- return;
- }
-
- if (this.timedout && this.timedoutError) {
- reject(this.timedoutError);
- return;
- }
-
- const error = new Error('Aborted');
- error.code = 'ABORTED';
- error.status = this.status;
- error.method = this.method;
- error.url = this.url;
- reject(error);
- });
- self.end((error, res) => {
- if (error) reject(error);else resolve(res);
- });
- });
- }
-
- return this._fullfilledPromise.then(resolve, reject);
-};
-
-RequestBase.prototype.catch = function (callback) {
- return this.then(undefined, callback);
-};
-
-RequestBase.prototype.use = function (fn) {
- fn(this);
- return this;
-};
-
-RequestBase.prototype.ok = function (callback) {
- if (typeof callback !== 'function') throw new Error('Callback required');
- this._okCallback = callback;
- return this;
-};
-
-RequestBase.prototype._isResponseOK = function (res) {
- if (!res) {
- return false;
- }
-
- if (this._okCallback) {
- return this._okCallback(res);
- }
-
- return res.status >= 200 && res.status < 300;
-};
-
-RequestBase.prototype.get = function (field) {
- return this._header[field.toLowerCase()];
-};
-
-RequestBase.prototype.getHeader = RequestBase.prototype.get;
-
-RequestBase.prototype.set = function (field, value) {
- if (isObject(field)) {
- for (const key in field) {
- if (hasOwn(field, key)) this.set(key, field[key]);
- }
-
- return this;
- }
-
- this._header[field.toLowerCase()] = value;
- this.header[field] = value;
- return this;
-};
-
-RequestBase.prototype.unset = function (field) {
- delete this._header[field.toLowerCase()];
- delete this.header[field];
- return this;
-};
-
-RequestBase.prototype.field = function (name, value, options) {
- if (name === null || undefined === name) {
- throw new Error('.field(name, val) name can not be empty');
- }
-
- if (this._data) {
- throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");
- }
-
- if (isObject(name)) {
- for (const key in name) {
- if (hasOwn(name, key)) this.field(key, name[key]);
- }
-
- return this;
- }
-
- if (Array.isArray(value)) {
- for (const i in value) {
- if (hasOwn(value, i)) this.field(name, value[i]);
- }
-
- return this;
- }
-
- if (value === null || undefined === value) {
- throw new Error('.field(name, val) val can not be empty');
- }
-
- if (typeof value === 'boolean') {
- value = String(value);
- }
-
- if (options) this._getFormData().append(name, value, options);else this._getFormData().append(name, value);
- return this;
-};
-
-RequestBase.prototype.abort = function () {
- if (this._aborted) {
- return this;
- }
-
- this._aborted = true;
- if (this.xhr) this.xhr.abort();
-
- if (this.req) {
- if (semver.gte(process.version, 'v13.0.0') && semver.lt(process.version, 'v14.0.0')) {
- throw new Error('Superagent does not work in v13 properly with abort() due to Node.js core changes');
- } else if (semver.gte(process.version, 'v14.0.0')) {
- this.req.destroyed = true;
- }
-
- this.req.abort();
- }
-
- this.clearTimeout();
- this.emit('abort');
- return this;
-};
-
-RequestBase.prototype._auth = function (user, pass, options, base64Encoder) {
- switch (options.type) {
- case 'basic':
- this.set('Authorization', "Basic ".concat(base64Encoder("".concat(user, ":").concat(pass))));
- break;
-
- case 'auto':
- this.username = user;
- this.password = pass;
- break;
-
- case 'bearer':
- this.set('Authorization', "Bearer ".concat(user));
- break;
-
- default:
- break;
- }
-
- return this;
-};
-
-RequestBase.prototype.withCredentials = function (on) {
- if (on === undefined) on = true;
- this._withCredentials = on;
- return this;
-};
-
-RequestBase.prototype.redirects = function (n) {
- this._maxRedirects = n;
- return this;
-};
-
-RequestBase.prototype.maxResponseSize = function (n) {
- if (typeof n !== 'number') {
- throw new TypeError('Invalid argument');
- }
-
- this._maxResponseSize = n;
- return this;
-};
-
-RequestBase.prototype.toJSON = function () {
- return {
- method: this.method,
- url: this.url,
- data: this._data,
- headers: this._header
- };
-};
-
-RequestBase.prototype.send = function (data) {
- const isObject_ = isObject(data);
- let type = this._header['content-type'];
-
- if (this._formData) {
- throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");
- }
-
- if (isObject_ && !this._data) {
- if (Array.isArray(data)) {
- this._data = [];
- } else if (!this._isHost(data)) {
- this._data = {};
- }
- } else if (data && this._data && this._isHost(this._data)) {
- throw new Error("Can't merge these send calls");
- }
-
- if (isObject_ && isObject(this._data)) {
- for (const key in data) {
- if (hasOwn(data, key)) this._data[key] = data[key];
- }
- } else if (typeof data === 'string') {
- if (!type) this.type('form');
- type = this._header['content-type'];
- if (type) type = type.toLowerCase().trim();
-
- if (type === 'application/x-www-form-urlencoded') {
- this._data = this._data ? "".concat(this._data, "&").concat(data) : data;
- } else {
- this._data = (this._data || '') + data;
- }
- } else {
- this._data = data;
- }
-
- if (!isObject_ || this._isHost(data)) {
- return this;
- }
-
- if (!type) this.type('json');
- return this;
-};
-
-RequestBase.prototype.sortQuery = function (sort) {
- this._sort = typeof sort === 'undefined' ? true : sort;
- return this;
-};
-
-RequestBase.prototype._finalizeQueryString = function () {
- const query = this._query.join('&');
-
- if (query) {
- this.url += (this.url.includes('?') ? '&' : '?') + query;
- }
-
- this._query.length = 0;
-
- if (this._sort) {
- const index = this.url.indexOf('?');
-
- if (index >= 0) {
- const queryArray = this.url.slice(index + 1).split('&');
-
- if (typeof this._sort === 'function') {
- queryArray.sort(this._sort);
- } else {
- queryArray.sort();
- }
-
- this.url = this.url.slice(0, index) + '?' + queryArray.join('&');
- }
- }
-};
-
-RequestBase.prototype._appendQueryString = () => {
- console.warn('Unsupported');
-};
-
-RequestBase.prototype._timeoutError = function (reason, timeout, errno) {
- if (this._aborted) {
- return;
- }
-
- const error = new Error("".concat(reason + timeout, "ms exceeded"));
- error.timeout = timeout;
- error.code = 'ECONNABORTED';
- error.errno = errno;
- this.timedout = true;
- this.timedoutError = error;
- this.abort();
- this.callback(error);
-};
-
-RequestBase.prototype._setTimeouts = function () {
- const self = this;
-
- if (this._timeout && !this._timer) {
- this._timer = setTimeout(() => {
- self._timeoutError('Timeout of ', self._timeout, 'ETIME');
- }, this._timeout);
- }
-
- if (this._responseTimeout && !this._responseTimeoutTimer) {
- this._responseTimeoutTimer = setTimeout(() => {
- self._timeoutError('Response timeout of ', self._responseTimeout, 'ETIMEDOUT');
- }, this._responseTimeout);
- }
-};
-
-}).call(this)}).call(this,require('_process'))
-},{"./utils":24,"_process":13,"semver":1}],23:[function(require,module,exports){
-"use strict";
-
-const utils = require('./utils');
-
-module.exports = ResponseBase;
-
-function ResponseBase() {}
-
-ResponseBase.prototype.get = function (field) {
- return this.header[field.toLowerCase()];
-};
-
-ResponseBase.prototype._setHeaderProperties = function (header) {
- const ct = header['content-type'] || '';
- this.type = utils.type(ct);
- const parameters = utils.params(ct);
-
- for (const key in parameters) {
- if (Object.prototype.hasOwnProperty.call(parameters, key)) this[key] = parameters[key];
- }
-
- this.links = {};
-
- try {
- if (header.link) {
- this.links = utils.parseLinks(header.link);
- }
- } catch (err) {}
-};
-
-ResponseBase.prototype._setStatusProperties = function (status) {
- const type = Math.trunc(status / 100);
- this.statusCode = status;
- this.status = this.statusCode;
- this.statusType = type;
- this.info = type === 1;
- this.ok = type === 2;
- this.redirect = type === 3;
- this.clientError = type === 4;
- this.serverError = type === 5;
- this.error = type === 4 || type === 5 ? this.toError() : false;
- this.created = status === 201;
- this.accepted = status === 202;
- this.noContent = status === 204;
- this.badRequest = status === 400;
- this.unauthorized = status === 401;
- this.notAcceptable = status === 406;
- this.forbidden = status === 403;
- this.notFound = status === 404;
- this.unprocessableEntity = status === 422;
-};
-
-},{"./utils":24}],24:[function(require,module,exports){
-"use strict";
-
-exports.type = string_ => string_.split(/ *; */).shift();
-
-exports.params = value => {
- const object = {};
-
- for (const string_ of value.split(/ *; */)) {
- const parts = string_.split(/ *= */);
- const key = parts.shift();
- const value = parts.shift();
- if (key && value) object[key] = value;
- }
-
- return object;
-};
-
-exports.parseLinks = value => {
- const object = {};
-
- for (const string_ of value.split(/ *, */)) {
- const parts = string_.split(/ *; */);
- const url = parts[0].slice(1, -1);
- const rel = parts[1].split(/ *= */)[1].slice(1, -1);
- object[rel] = url;
- }
-
- return object;
-};
-
-exports.cleanHeader = (header, changesOrigin) => {
- delete header['content-type'];
- delete header['content-length'];
- delete header['transfer-encoding'];
- delete header.host;
-
- if (changesOrigin) {
- delete header.authorization;
- delete header.cookie;
- }
-
- return header;
-};
-
-exports.isObject = object => {
- return object !== null && typeof object === 'object';
-};
-
-exports.hasOwn = Object.hasOwn || function (object, property) {
- if (object == null) {
- throw new TypeError('Cannot convert undefined or null to object');
- }
-
- return Object.prototype.hasOwnProperty.call(new Object(object), property);
-};
-
-exports.mixin = (target, source) => {
- for (const key in source) {
- if (exports.hasOwn(source, key)) {
- target[key] = source[key];
- }
- }
-};
-
-},{}]},{},[21])(21)
-});
diff --git a/together/node_modules/superagent/dist/superagent.min.js b/together/node_modules/superagent/dist/superagent.min.js
deleted file mode 100644
index adf6802..0000000
--- a/together/node_modules/superagent/dist/superagent.min.js
+++ /dev/null
@@ -1 +0,0 @@
-!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).superagent=t()}}((function(){var t={exports:{}};function e(t){if(t)return function(t){for(var r in e.prototype)t[r]=e.prototype[r];return t}(t)}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,o=this._callbacks["$"+t];if(!o)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var n=0;n<o.length;n++)if((r=o[n])===e||r.fn===e){o.splice(n,1);break}return 0===o.length&&delete this._callbacks["$"+t],this},e.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],o=1;o<arguments.length;o++)e[o-1]=arguments[o];if(r){o=0;for(var n=(r=r.slice(0)).length;o<n;++o)r[o].apply(this,e)}return this},e.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},e.prototype.hasListeners=function(t){return!!this.listeners(t).length},t=t.exports;var r;r=a,a.default=a,a.stable=c,a.stableStringify=c;var o=[],n=[];function i(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function a(t,e,r,a){var u;void 0===a&&(a=i()),function t(e,r,o,n,i,a,u){var c;if(a+=1,"object"==typeof e&&null!==e){for(c=0;c<n.length;c++)if(n[c]===e)return void s("[Circular]",e,r,i);if(void 0!==u.depthLimit&&a>u.depthLimit)return void s("[...]",e,r,i);if(void 0!==u.edgesLimit&&o+1>u.edgesLimit)return void s("[...]",e,r,i);if(n.push(e),Array.isArray(e))for(c=0;c<e.length;c++)t(e[c],c,c,n,e,a,u);else{var p=Object.keys(e);for(c=0;c<p.length;c++){var l=p[c];t(e[l],l,c,n,e,a,u)}}n.pop()}}(t,"",0,[],void 0,0,a);try{u=0===n.length?JSON.stringify(t,e,r):JSON.stringify(t,p(e),r)}catch(l){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==o.length;){var c=o.pop();4===c.length?Object.defineProperty(c[0],c[1],c[3]):c[0][c[1]]=c[2]}}return u}function s(t,e,r,i){var a=Object.getOwnPropertyDescriptor(i,r);void 0!==a.get?a.configurable?(Object.defineProperty(i,r,{value:t}),o.push([i,r,e,a])):n.push([e,r,t]):(i[r]=t,o.push([i,r,e]))}function u(t,e){return t<e?-1:t>e?1:0}function c(t,e,r,a){void 0===a&&(a=i());var c,l=function t(e,r,n,i,a,c,p){var l;if(c+=1,"object"==typeof e&&null!==e){for(l=0;l<i.length;l++)if(i[l]===e)return void s("[Circular]",e,r,a);try{if("function"==typeof e.toJSON)return}catch(d){return}if(void 0!==p.depthLimit&&c>p.depthLimit)return void s("[...]",e,r,a);if(void 0!==p.edgesLimit&&n+1>p.edgesLimit)return void s("[...]",e,r,a);if(i.push(e),Array.isArray(e))for(l=0;l<e.length;l++)t(e[l],l,l,i,e,c,p);else{var f={},y=Object.keys(e).sort(u);for(l=0;l<y.length;l++){var h=y[l];t(e[h],h,l,i,e,c,p),f[h]=e[h]}if(void 0===a)return f;o.push([a,r,e]),a[r]=f}i.pop()}}(t,"",0,[],void 0,0,a)||t;try{c=0===n.length?JSON.stringify(l,e,r):JSON.stringify(l,p(e),r)}catch(y){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==o.length;){var f=o.pop();4===f.length?Object.defineProperty(f[0],f[1],f[3]):f[0][f[1]]=f[2]}}return c}function p(t){return t=void 0!==t?t:function(t,e){return e},function(e,r){if(n.length>0)for(var o=0;o<n.length;o++){var i=n[o];if(i[1]===e&&i[0]===r){r=i[2],n.splice(o,1);break}}return t.call(this,e,r)}}var l="undefined"!=typeof Symbol&&Symbol,f=Array.prototype.slice,y=Object.prototype.toString,h=Function.prototype.bind||function(t){var e=this;if("function"!=typeof e||"[object Function]"!==y.call(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var r,o=f.call(arguments,1),n=Math.max(0,e.length-o.length),i=[],a=0;a<n;a++)i.push("$"+a);if(r=Function("binder","return function ("+i.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof r){var n=e.apply(this,o.concat(f.call(arguments)));return Object(n)===n?n:this}return e.apply(t,o.concat(f.call(arguments)))})),e.prototype){var s=function(){};s.prototype=e.prototype,r.prototype=new s,s.prototype=null}return r},d=h.call(Function.call,Object.prototype.hasOwnProperty),m=SyntaxError,b=Function,g=TypeError,v=function(t){try{return b('"use strict"; return ('+t+").constructor;")()}catch(e){}},w=Object.getOwnPropertyDescriptor;if(w)try{w({},"")}catch(rr){w=null}var _,S=function(){throw new g},A=w?function(){try{return S}catch(t){try{return w(arguments,"callee").get}catch(e){return S}}}():S,E="function"==typeof l&&"function"==typeof Symbol&&"symbol"==typeof l("foo")&&"symbol"==typeof Symbol("bar")&&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}(),O=Object.getPrototypeOf||function(t){return t.__proto__},j={},T="undefined"==typeof Uint8Array?void 0:O(Uint8Array),P={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":E?O([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":j,"%AsyncGenerator%":j,"%AsyncGeneratorFunction%":j,"%AsyncIteratorPrototype%":j,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":b,"%GeneratorFunction%":j,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":E?O(O([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&E?O((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&E?O((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E?O(""[Symbol.iterator]()):void 0,"%Symbol%":E?Symbol:void 0,"%SyntaxError%":m,"%ThrowTypeError%":A,"%TypedArray%":T,"%TypeError%":g,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet},x={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},k=h.call(Function.call,Array.prototype.concat),R=h.call(Function.apply,Array.prototype.splice),C=h.call(Function.call,String.prototype.replace),I=h.call(Function.call,String.prototype.slice),F=h.call(Function.call,RegExp.prototype.exec),N=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D=/\\(\\)?/g,U=function(t,e){var r,o=t;if(d(x,o)&&(o="%"+(r=x[o])[0]+"%"),d(P,o)){var n=P[o];if(n===j&&(n=function t(e){var r;if("%AsyncFunction%"===e)r=v("async function () {}");else if("%GeneratorFunction%"===e)r=v("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=v("async function* () {}");else if("%AsyncGenerator%"===e){var o=t("%AsyncGeneratorFunction%");o&&(r=o.prototype)}else if("%AsyncIteratorPrototype%"===e){var n=t("%AsyncGenerator%");n&&(r=O(n.prototype))}return P[e]=r,r}(o)),void 0===n&&!e)throw new g("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:o,value:n}}throw new m("intrinsic "+t+" does not exist!")},M=function(t,e){if("string"!=typeof t||0===t.length)throw new g("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new g('"allowMissing" argument must be a boolean');if(null===F(/^%?[^%]*%?$/g,t))throw new m("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=I(t,0,1),r=I(t,-1);if("%"===e&&"%"!==r)throw new m("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new m("invalid intrinsic syntax, expected opening `%`");var o=[];return C(t,N,(function(t,e,r,n){o[o.length]=r?C(n,D,"$1"):e||t})),o}(t),o=r.length>0?r[0]:"",n=U("%"+o+"%",e),i=n.name,a=n.value,s=!1,u=n.alias;u&&(o=u[0],R(r,k([0,1],u)));for(var c=1,p=!0;c<r.length;c+=1){var l=r[c],f=I(l,0,1),y=I(l,-1);if(('"'===f||"'"===f||"`"===f||'"'===y||"'"===y||"`"===y)&&f!==y)throw new m("property names with quotes must have matching quotes");if("constructor"!==l&&p||(s=!0),d(P,i="%"+(o+="."+l)+"%"))a=P[i];else if(null!=a){if(!(l in a)){if(!e)throw new g("base intrinsic for "+t+" exists, but the property is not available.");return}if(w&&c+1>=r.length){var h=w(a,l);a=(p=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:a[l]}else p=d(a,l),a=a[l];p&&!s&&(P[i]=a)}}return a},L=M("%Function.prototype.apply%"),q=M("%Function.prototype.call%"),B=M("%Reflect.apply%",!0)||h.call(q,L),W=M("%Object.getOwnPropertyDescriptor%",!0),H=M("%Object.defineProperty%",!0),z=M("%Math.max%");if(H)try{H({},"a",{value:1})}catch(rr){H=null}_=function(t){var e=B(h,q,arguments);return W&&H&&W(e,"length").configurable&&H(e,"length",{value:1+z(0,t.length-(arguments.length-1))}),e};var G=function(){return B(h,L,arguments)};H?H(_,"apply",{value:G}):_.apply=G;var $=_(M("String.prototype.indexOf")),J=function(t,e){var r=M(t,!!e);return"function"==typeof r&&$(t,".prototype.")>-1?_(r):r},V={},Q="function"==typeof Map&&Map.prototype,X=Object.getOwnPropertyDescriptor&&Q?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,K=Q&&X&&"function"==typeof X.get?X.get:null,Y=Q&&Map.prototype.forEach,Z="function"==typeof Set&&Set.prototype,tt=Object.getOwnPropertyDescriptor&&Z?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,et=Z&&tt&&"function"==typeof tt.get?tt.get:null,rt=Z&&Set.prototype.forEach,ot="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,nt="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,it="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,at=Boolean.prototype.valueOf,st=Object.prototype.toString,ut=Function.prototype.toString,ct=String.prototype.match,pt=String.prototype.slice,lt=String.prototype.replace,ft=String.prototype.toUpperCase,yt=String.prototype.toLowerCase,ht=RegExp.prototype.test,dt=Array.prototype.concat,mt=Array.prototype.join,bt=Array.prototype.slice,gt=Math.floor,vt="function"==typeof BigInt?BigInt.prototype.valueOf:null,wt=Object.getOwnPropertySymbols,_t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,St="function"==typeof Symbol&&"object"==typeof Symbol.iterator,At="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,Et=Object.prototype.propertyIsEnumerable,Ot=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function jt(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||ht.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var o=t<0?-gt(-t):gt(t);if(o!==t){var n=String(o),i=pt.call(e,n.length+1);return lt.call(n,r,"$&_")+"."+lt.call(lt.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return lt.call(e,r,"$&_")}var Tt=V.custom,Pt=It(Tt)?Tt:null;function xt(t,e,r){var o="double"===(r.quoteStyle||e)?'"':"'";return o+t+o}function kt(t){return lt.call(String(t),/"/g,"&quot;")}function Rt(t){return!("[object Array]"!==Dt(t)||At&&"object"==typeof t&&At in t)}function Ct(t){return!("[object RegExp]"!==Dt(t)||At&&"object"==typeof t&&At in t)}function It(t){if(St)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!_t)return!1;try{return _t.call(t),!0}catch(rr){}return!1}var Ft=Object.prototype.hasOwnProperty||function(t){return t in this};function Nt(t,e){return Ft.call(t,e)}function Dt(t){return st.call(t)}function Ut(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,o=t.length;r<o;r++)if(t[r]===e)return r;return-1}function Mt(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+ft.call(e.toString(16))}function Lt(t){return"Object("+t+")"}function qt(t){return t+" { ? }"}function Bt(t,e,r,o){return t+" ("+e+") {"+(o?Wt(r,o):mt.call(r,", "))+"}"}function Wt(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+mt.call(t,","+r)+"\n"+e.prev}function Ht(t,e){var r=Rt(t),o=[];if(r){o.length=t.length;for(var n=0;n<t.length;n++)o[n]=Nt(t,n)?e(t[n],t):""}var i,a="function"==typeof wt?wt(t):[];if(St){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var u in t)Nt(t,u)&&(r&&String(Number(u))===u&&u<t.length||St&&i["$"+u]instanceof Symbol||(ht.call(/[^\w$]/,u)?o.push(e(u,t)+": "+e(t[u],t)):o.push(u+": "+e(t[u],t))));if("function"==typeof wt)for(var c=0;c<a.length;c++)Et.call(t,a[c])&&o.push("["+e(a[c])+"]: "+e(t[a[c]],t));return o}var zt=M("%TypeError%"),Gt=M("%WeakMap%",!0),$t=M("%Map%",!0),Jt=J("WeakMap.prototype.get",!0),Vt=J("WeakMap.prototype.set",!0),Qt=J("WeakMap.prototype.has",!0),Xt=J("Map.prototype.get",!0),Kt=J("Map.prototype.set",!0),Yt=J("Map.prototype.has",!0),Zt=function(t,e){for(var r,o=t;null!==(r=o.next);o=r)if(r.key===e)return o.next=r.next,r.next=t.next,t.next=r,r},te=function(){var t,e,r,o={assert:function(t){if(!o.has(t))throw new zt("Side channel does not contain "+function t(e,r,o,n){var i=r||{};if(Nt(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Nt(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!Nt(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Nt(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Nt(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=i.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return function t(e,r){if(e.length>r.maxStringLength){var o=e.length-r.maxStringLength,n="... "+o+" more character"+(o>1?"s":"");return t(pt.call(e,0,r.maxStringLength),r)+n}return xt(lt.call(lt.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Mt),"single",r)}(e,i);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var u=String(e);return s?jt(e,u):u}if("bigint"==typeof e){var c=String(e)+"n";return s?jt(e,c):c}var p=void 0===i.depth?5:i.depth;if(void 0===o&&(o=0),o>=p&&p>0&&"object"==typeof e)return Rt(e)?"[Array]":"[Object]";var l,f=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=mt.call(Array(t.indent+1)," ")}return{base:r,prev:mt.call(Array(e+1),r)}}(i,o);if(void 0===n)n=[];else if(Ut(n,e)>=0)return"[Circular]";function y(e,r,a){if(r&&(n=bt.call(n)).push(r),a){var s={depth:i.depth};return Nt(i,"quoteStyle")&&(s.quoteStyle=i.quoteStyle),t(e,s,o+1,n)}return t(e,i,o+1,n)}if("function"==typeof e&&!Ct(e)){var h=function(t){if(t.name)return t.name;var e=ct.call(ut.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),d=Ht(e,y);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(d.length>0?" { "+mt.call(d,", ")+" }":"")}if(It(e)){var m=St?lt.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):_t.call(e);return"object"!=typeof e||St?m:Lt(m)}if((l=e)&&"object"==typeof l&&("undefined"!=typeof HTMLElement&&l instanceof HTMLElement||"string"==typeof l.nodeName&&"function"==typeof l.getAttribute)){for(var b="<"+yt.call(String(e.nodeName)),g=e.attributes||[],v=0;v<g.length;v++)b+=" "+g[v].name+"="+xt(kt(g[v].value),"double",i);return b+=">",e.childNodes&&e.childNodes.length&&(b+="..."),b+"</"+yt.call(String(e.nodeName))+">"}if(Rt(e)){if(0===e.length)return"[]";var w=Ht(e,y);return f&&!function(t){for(var e=0;e<t.length;e++)if(Ut(t[e],"\n")>=0)return!1;return!0}(w)?"["+Wt(w,f)+"]":"[ "+mt.call(w,", ")+" ]"}if(function(t){return!("[object Error]"!==Dt(t)||At&&"object"==typeof t&&At in t)}(e)){var _=Ht(e,y);return"cause"in Error.prototype||!("cause"in e)||Et.call(e,"cause")?0===_.length?"["+String(e)+"]":"{ ["+String(e)+"] "+mt.call(_,", ")+" }":"{ ["+String(e)+"] "+mt.call(dt.call("[cause]: "+y(e.cause),_),", ")+" }"}if("object"==typeof e&&a){if(Pt&&"function"==typeof e[Pt]&&V)return V(e,{depth:p-o});if("symbol"!==a&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!K||!t||"object"!=typeof t)return!1;try{K.call(t);try{et.call(t)}catch(b){return!0}return t instanceof Map}catch(rr){}return!1}(e)){var S=[];return Y.call(e,(function(t,r){S.push(y(r,e,!0)+" => "+y(t,e))})),Bt("Map",K.call(e),S,f)}if(function(t){if(!et||!t||"object"!=typeof t)return!1;try{et.call(t);try{K.call(t)}catch(e){return!0}return t instanceof Set}catch(rr){}return!1}(e)){var A=[];return rt.call(e,(function(t){A.push(y(t,e))})),Bt("Set",et.call(e),A,f)}if(function(t){if(!ot||!t||"object"!=typeof t)return!1;try{ot.call(t,ot);try{nt.call(t,nt)}catch(b){return!0}return t instanceof WeakMap}catch(rr){}return!1}(e))return qt("WeakMap");if(function(t){if(!nt||!t||"object"!=typeof t)return!1;try{nt.call(t,nt);try{ot.call(t,ot)}catch(b){return!0}return t instanceof WeakSet}catch(rr){}return!1}(e))return qt("WeakSet");if(function(t){if(!it||!t||"object"!=typeof t)return!1;try{return it.call(t),!0}catch(rr){}return!1}(e))return qt("WeakRef");if(function(t){return!("[object Number]"!==Dt(t)||At&&"object"==typeof t&&At in t)}(e))return Lt(y(Number(e)));if(function(t){if(!t||"object"!=typeof t||!vt)return!1;try{return vt.call(t),!0}catch(rr){}return!1}(e))return Lt(y(vt.call(e)));if(function(t){return!("[object Boolean]"!==Dt(t)||At&&"object"==typeof t&&At in t)}(e))return Lt(at.call(e));if(function(t){return!("[object String]"!==Dt(t)||At&&"object"==typeof t&&At in t)}(e))return Lt(y(String(e)));if(!function(t){return!("[object Date]"!==Dt(t)||At&&"object"==typeof t&&At in t)}(e)&&!Ct(e)){var E=Ht(e,y),O=Ot?Ot(e)===Object.prototype:e instanceof Object||e.constructor===Object,j=e instanceof Object?"":"null prototype",T=!O&&At&&Object(e)===e&&At in e?pt.call(Dt(e),8,-1):j?"Object":"",P=(O||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(T||j?"["+mt.call(dt.call([],T||[],j||[]),": ")+"] ":"");return 0===E.length?P+"{}":f?P+"{"+Wt(E,f)+"}":P+"{ "+mt.call(E,", ")+" }"}return String(e)}(t))},get:function(o){if(Gt&&o&&("object"==typeof o||"function"==typeof o)){if(t)return Jt(t,o)}else if($t){if(e)return Xt(e,o)}else if(r)return function(t,e){var r=Zt(t,e);return r&&r.value}(r,o)},has:function(o){if(Gt&&o&&("object"==typeof o||"function"==typeof o)){if(t)return Qt(t,o)}else if($t){if(e)return Yt(e,o)}else if(r)return function(t,e){return!!Zt(t,e)}(r,o);return!1},set:function(o,n){Gt&&o&&("object"==typeof o||"function"==typeof o)?(t||(t=new Gt),Vt(t,o,n)):$t?(e||(e=new $t),Kt(e,o,n)):(r||(r={key:{},next:null}),function(t,e,r){var o=Zt(t,e);o?o.value=r:t.next={key:e,next:t.next,value:r}}(r,o,n))}};return o},ee=String.prototype.replace,re=/%20/g,oe={default:"RFC3986",formatters:{RFC1738:function(t){return ee.call(t,re,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:"RFC3986"},ne=Object.prototype.hasOwnProperty,ie=Array.isArray,ae=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),se={combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],r=[],o=0;o<e.length;++o)for(var n=e[o],i=n.obj[n.prop],a=Object.keys(i),s=0;s<a.length;++s){var u=a[s],c=i[u];"object"==typeof c&&null!==c&&-1===r.indexOf(c)&&(e.push({obj:i,prop:u}),r.push(c))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(ie(r)){for(var o=[],n=0;n<r.length;++n)void 0!==r[n]&&o.push(r[n]);e.obj[e.prop]=o}}}(e),t},decode:function(t,e,r){var o=t.replace(/\+/g," ");if("iso-8859-1"===r)return o.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(o)}catch(rr){return o}},encode:function(t,e,r,o,n){if(0===t.length)return t;var i=t;if("symbol"==typeof t?i=Symbol.prototype.toString.call(t):"string"!=typeof t&&(i=String(t)),"iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var a="",s=0;s<i.length;++s){var u=i.charCodeAt(s);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||n===oe.RFC1738&&(40===u||41===u)?a+=i.charAt(s):u<128?a+=ae[u]:u<2048?a+=ae[192|u>>6]+ae[128|63&u]:u<55296||u>=57344?a+=ae[224|u>>12]+ae[128|u>>6&63]+ae[128|63&u]:(s+=1,u=65536+((1023&u)<<10|1023&i.charCodeAt(s)),a+=ae[240|u>>18]+ae[128|u>>12&63]+ae[128|u>>6&63]+ae[128|63&u])}return a},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(ie(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(e(t[o]));return r}return e(t)},merge:function t(e,r,o){if(!r)return e;if("object"!=typeof r){if(ie(e))e.push(r);else{if(!e||"object"!=typeof e)return[e,r];(o&&(o.plainObjects||o.allowPrototypes)||!ne.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(r);var n=e;return ie(e)&&!ie(r)&&(n=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},o=0;o<t.length;++o)void 0!==t[o]&&(r[o]=t[o]);return r}(e,o)),ie(e)&&ie(r)?(r.forEach((function(r,n){if(ne.call(e,n)){var i=e[n];i&&"object"==typeof i&&r&&"object"==typeof r?e[n]=t(i,r,o):e.push(r)}else e[n]=r})),e):Object.keys(r).reduce((function(e,n){var i=r[n];return ne.call(e,n)?e[n]=t(e[n],i,o):e[n]=i,e}),n)}},ue=Object.prototype.hasOwnProperty,ce={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},pe=Array.isArray,le=String.prototype.split,fe=Array.prototype.push,ye=function(t,e){fe.apply(t,pe(e)?e:[e])},he=Date.prototype.toISOString,de=oe.default,me={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:se.encode,encodeValuesOnly:!1,format:de,formatter:oe.formatters[de],indices:!1,serializeDate:function(t){return he.call(t)},skipNulls:!1,strictNullHandling:!1},be={},ge=function t(e,r,o,n,i,a,s,u,c,p,l,f,y,h,d){for(var m,b=e,g=d,v=0,w=!1;void 0!==(g=g.get(be))&&!w;){var _=g.get(e);if(v+=1,void 0!==_){if(_===v)throw new RangeError("Cyclic object value");w=!0}void 0===g.get(be)&&(v=0)}if("function"==typeof s?b=s(r,b):b instanceof Date?b=p(b):"comma"===o&&pe(b)&&(b=se.maybeMap(b,(function(t){return t instanceof Date?p(t):t}))),null===b){if(n)return a&&!y?a(r,me.encoder,h,"key",l):r;b=""}if("string"==typeof(m=b)||"number"==typeof m||"boolean"==typeof m||"symbol"==typeof m||"bigint"==typeof m||se.isBuffer(b)){if(a){var S=y?r:a(r,me.encoder,h,"key",l);if("comma"===o&&y){for(var A=le.call(String(b),","),E="",O=0;O<A.length;++O)E+=(0===O?"":",")+f(a(A[O],me.encoder,h,"value",l));return[f(S)+(pe(b)&&1===A.length?"[]":"")+"="+E]}return[f(S)+"="+f(a(b,me.encoder,h,"value",l))]}return[f(r)+"="+f(String(b))]}var j,T=[];if(void 0===b)return T;if("comma"===o&&pe(b))j=[{value:b.length>0?b.join(",")||null:void 0}];else if(pe(s))j=s;else{var P=Object.keys(b);j=u?P.sort(u):P}for(var x="comma"===o&&pe(b)&&1===b.length?r+"[]":r,k=0;k<j.length;++k){var R=j[k],C="object"==typeof R&&void 0!==R.value?R.value:b[R];if(!i||null!==C){var I=pe(b)?"function"==typeof o?o(x,R):x:x+(c?"."+R:"["+R+"]");d.set(e,v);var F=te();F.set(be,d),ye(T,t(C,I,o,n,i,a,s,u,c,p,l,f,y,h,F))}}return T},ve=(Object.prototype.hasOwnProperty,Array.isArray,{stringify:function(t,e){var r,o=t,n=function(t){if(!t)return me;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||me.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=oe.default;if(void 0!==t.format){if(!ue.call(oe.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=oe.formatters[r],n=me.filter;return("function"==typeof t.filter||pe(t.filter))&&(n=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:me.addQueryPrefix,allowDots:void 0===t.allowDots?me.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:me.charsetSentinel,delimiter:void 0===t.delimiter?me.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:me.encode,encoder:"function"==typeof t.encoder?t.encoder:me.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:me.encodeValuesOnly,filter:n,format:r,formatter:o,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:me.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:me.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:me.strictNullHandling}}(e);"function"==typeof n.filter?o=(0,n.filter)("",o):pe(n.filter)&&(r=n.filter);var i,a=[];if("object"!=typeof o||null===o)return"";i=e&&e.arrayFormat in ce?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var s=ce[i];r||(r=Object.keys(o)),n.sort&&r.sort(n.sort);for(var u=te(),c=0;c<r.length;++c){var p=r[c];n.skipNulls&&null===o[p]||ye(a,ge(o[p],p,s,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,u))}var l=a.join(n.delimiter),f=!0===n.addQueryPrefix?"?":"";return n.charsetSentinel&&("iso-8859-1"===n.charset?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),l.length>0?f+l:""}}),we={type:t=>t.split(/ *; */).shift(),params:t=>{const e={};for(const r of t.split(/ *; */)){const t=r.split(/ *= */),o=t.shift(),n=t.shift();o&&n&&(e[o]=n)}return e},parseLinks:t=>{const e={};for(const r of t.split(/ *, */)){const t=r.split(/ *; */),o=t[0].slice(1,-1);e[t[1].split(/ *= */)[1].slice(1,-1)]=o}return e},isObject:t=>null!==t&&"object"==typeof t};we.hasOwn=Object.hasOwn||function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(new Object(t),e)},we.mixin=(t,e)=>{for(const r in e)we.hasOwn(e,r)&&(t[r]=e[r])};var _e,Se,Ae,Ee=_e={};function Oe(){throw new Error("setTimeout has not been defined")}function je(){throw new Error("clearTimeout has not been defined")}function Te(t){if(Se===setTimeout)return setTimeout(t,0);if((Se===Oe||!Se)&&setTimeout)return Se=setTimeout,setTimeout(t,0);try{return Se(t,0)}catch(rr){try{return Se.call(null,t,0)}catch(rr){return Se.call(this,t,0)}}}!function(){try{Se="function"==typeof setTimeout?setTimeout:Oe}catch(rr){Se=Oe}try{Ae="function"==typeof clearTimeout?clearTimeout:je}catch(rr){Ae=je}}();var Pe,xe=[],ke=!1,Re=-1;function Ce(){ke&&Pe&&(ke=!1,Pe.length?xe=Pe.concat(xe):Re=-1,xe.length&&Ie())}function Ie(){if(!ke){var t=Te(Ce);ke=!0;for(var e=xe.length;e;){for(Pe=xe,xe=[];++Re<e;)Pe&&Pe[Re].run();Re=-1,e=xe.length}Pe=null,ke=!1,function(t){if(Ae===clearTimeout)return clearTimeout(t);if((Ae===je||!Ae)&&clearTimeout)return Ae=clearTimeout,clearTimeout(t);try{Ae(t)}catch(rr){try{return Ae.call(null,t)}catch(rr){return Ae.call(this,t)}}}(t)}}function Fe(t,e){this.fun=t,this.array=e}function Ne(){}Ee.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];xe.push(new Fe(t,e)),1!==xe.length||ke||Te(Ie)},Fe.prototype.run=function(){this.fun.apply(null,this.array)},Ee.title="browser",Ee.browser=!0,Ee.env={},Ee.argv=[],Ee.version="",Ee.versions={},Ee.on=Ne,Ee.addListener=Ne,Ee.once=Ne,Ee.off=Ne,Ee.removeListener=Ne,Ee.removeAllListeners=Ne,Ee.emit=Ne,Ee.prependListener=Ne,Ee.prependOnceListener=Ne,Ee.listeners=function(t){return[]},Ee.binding=function(t){throw new Error("process.binding is not supported")},Ee.cwd=function(){return"/"},Ee.chdir=function(t){throw new Error("process.chdir is not supported")},Ee.umask=function(){return 0};var De={};(function(t){(function(){"use strict";const{isObject:e,hasOwn:r}=we;function o(){}De=o,o.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},o.prototype.parse=function(t){return this._parser=t,this},o.prototype.responseType=function(t){return this._responseType=t,this},o.prototype.serialize=function(t){return this._serializer=t,this},o.prototype.timeout=function(t){if(!t||"object"!=typeof t)return this._timeout=t,this._responseTimeout=0,this._uploadTimeout=0,this;for(const e in t)if(r(t,e))switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;case"upload":this._uploadTimeout=t.upload;break;default:console.warn("Unknown timeout option",e)}return this},o.prototype.retry=function(t,e){return 0!==arguments.length&&!0!==t||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=e,this};const n=new Set(["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"]),i=new Set([408,413,429,500,502,503,504,521,522,524]);o.prototype._shouldRetry=function(t,e){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{const r=this._retryCallback(t,e);if(!0===r)return!0;if(!1===r)return!1}catch(r){console.error(r)}if(e&&e.status&&i.has(e.status))return!0;if(t){if(t.code&&n.has(t.code))return!0;if(t.timeout&&"ECONNABORTED"===t.code)return!0;if(t.crossDomain)return!0}return!1},o.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},o.prototype.then=function(t,e){if(!this._fullfilledPromise){const t=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((e,r)=>{t.on("abort",()=>{if(this._maxRetries&&this._maxRetries>this._retries)return;if(this.timedout&&this.timedoutError)return void r(this.timedoutError);const t=new Error("Aborted");t.code="ABORTED",t.status=this.status,t.method=this.method,t.url=this.url,r(t)}),t.end((t,o)=>{t?r(t):e(o)})})}return this._fullfilledPromise.then(t,e)},o.prototype.catch=function(t){return this.then(void 0,t)},o.prototype.use=function(t){return t(this),this},o.prototype.ok=function(t){if("function"!=typeof t)throw new Error("Callback required");return this._okCallback=t,this},o.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},o.prototype.get=function(t){return this._header[t.toLowerCase()]},o.prototype.getHeader=o.prototype.get,o.prototype.set=function(t,o){if(e(t)){for(const e in t)r(t,e)&&this.set(e,t[e]);return this}return this._header[t.toLowerCase()]=o,this.header[t]=o,this},o.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},o.prototype.field=function(t,o,n){if(null==t)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(e(t)){for(const e in t)r(t,e)&&this.field(e,t[e]);return this}if(Array.isArray(o)){for(const e in o)r(o,e)&&this.field(t,o[e]);return this}if(null==o)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof o&&(o=String(o)),n?this._getFormData().append(t,o,n):this._getFormData().append(t,o),this},o.prototype.abort=function(){if(this._aborted)return this;if(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req){if(V.gte(t.version,"v13.0.0")&&V.lt(t.version,"v14.0.0"))throw new Error("Superagent does not work in v13 properly with abort() due to Node.js core changes");V.gte(t.version,"v14.0.0")&&(this.req.destroyed=!0),this.req.abort()}return this.clearTimeout(),this.emit("abort"),this},o.prototype._auth=function(t,e,r,o){switch(r.type){case"basic":this.set("Authorization","Basic ".concat(o("".concat(t,":").concat(e))));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer ".concat(t))}return this},o.prototype.withCredentials=function(t){return void 0===t&&(t=!0),this._withCredentials=t,this},o.prototype.redirects=function(t){return this._maxRedirects=t,this},o.prototype.maxResponseSize=function(t){if("number"!=typeof t)throw new TypeError("Invalid argument");return this._maxResponseSize=t,this},o.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},o.prototype.send=function(t){const o=e(t);let n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(o&&!this._data)Array.isArray(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(o&&e(this._data))for(const e in t)r(t,e)&&(this._data[e]=t[e]);else"string"==typeof t?(n||this.type("form"),(n=this._header["content-type"])&&(n=n.toLowerCase().trim()),this._data="application/x-www-form-urlencoded"===n?this._data?"".concat(this._data,"&").concat(t):t:(this._data||"")+t):this._data=t;return!o||this._isHost(t)||n||this.type("json"),this},o.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},o.prototype._finalizeQueryString=function(){const t=this._query.join("&");if(t&&(this.url+=(this.url.includes("?")?"&":"?")+t),this._query.length=0,this._sort){const t=this.url.indexOf("?");if(t>=0){const e=this.url.slice(t+1).split("&");"function"==typeof this._sort?e.sort(this._sort):e.sort(),this.url=this.url.slice(0,t)+"?"+e.join("&")}}},o.prototype._appendQueryString=()=>{console.warn("Unsupported")},o.prototype._timeoutError=function(t,e,r){if(this._aborted)return;const o=new Error("".concat(t+e,"ms exceeded"));o.timeout=e,o.code="ECONNABORTED",o.errno=r,this.timedout=!0,this.timedoutError=o,this.abort(),this.callback(o)},o.prototype._setTimeouts=function(){const t=this;this._timeout&&!this._timer&&(this._timer=setTimeout(()=>{t._timeoutError("Timeout of ",t._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(()=>{t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}}).call(this)}).call(this,_e);var Ue;function Me(){}Ue=Me,Me.prototype.get=function(t){return this.header[t.toLowerCase()]},Me.prototype._setHeaderProperties=function(t){const e=t["content-type"]||"";this.type=we.type(e);const r=we.params(e);for(const n in r)Object.prototype.hasOwnProperty.call(r,n)&&(this[n]=r[n]);this.links={};try{t.link&&(this.links=we.parseLinks(t.link))}catch(o){}},Me.prototype._setStatusProperties=function(t){const e=Math.trunc(t/100);this.statusCode=t,this.status=this.statusCode,this.statusType=e,this.info=1===e,this.ok=2===e,this.redirect=3===e,this.clientError=4===e,this.serverError=5===e,this.error=(4===e||5===e)&&this.toError(),this.created=201===t,this.accepted=202===t,this.noContent=204===t,this.badRequest=400===t,this.unauthorized=401===t,this.notAcceptable=406===t,this.forbidden=403===t,this.notFound=404===t,this.unprocessableEntity=422===t};var Le={};function qe(){this._defaults=[]}for(const or of["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"])qe.prototype[or]=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this._defaults.push({fn:or,args:e}),this};qe.prototype._setDefaults=function(t){for(const e of this._defaults)t[e.fn](...e.args)},Le=qe;var Be={};let We;"undefined"!=typeof window?We=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),We=void 0):We=self;const{isObject:He,mixin:ze,hasOwn:Ge}=we;function $e(){}const Je=Be=Be=function(t,e){return"function"==typeof e?new Be.Request("GET",t).end(e):1===arguments.length?new Be.Request("GET",t):new Be.Request(t,e)};Be.Request=tr,Je.getXHR=()=>{if(We.XMLHttpRequest)return new We.XMLHttpRequest;throw new Error("Browser-only version of superagent could not find XHR")};const Ve="".trim?t=>t.trim():t=>t.replace(/(^\s*|\s*$)/g,"");function Qe(t){if(!He(t))return t;const e=[];for(const r in t)Ge(t,r)&&Xe(e,r,t[r]);return e.join("&")}function Xe(t,e,r){if(void 0!==r)if(null!==r)if(Array.isArray(r))for(const o of r)Xe(t,e,o);else if(He(r))for(const o in r)Ge(r,o)&&Xe(t,"".concat(e,"[").concat(o,"]"),r[o]);else t.push(encodeURI(e)+"="+encodeURIComponent(r));else t.push(encodeURI(e))}function Ke(t){const e={},r=t.split("&");let o,n;for(let i=0,a=r.length;i<a;++i)-1===(n=(o=r[i]).indexOf("="))?e[decodeURIComponent(o)]="":e[decodeURIComponent(o.slice(0,n))]=decodeURIComponent(o.slice(n+1));return e}function Ye(t){return/[/+]json($|[^-\w])/i.test(t)}function Ze(t){this.req=t,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;let{status:e}=this.xhr;1223===e&&(e=204),this._setStatusProperties(e),this.headers=function(t){const e=t.split(/\r?\n/),r={};let o,n,i,a;for(let s=0,u=e.length;s<u;++s)-1!==(o=(n=e[s]).indexOf(":"))&&(i=n.slice(0,o).toLowerCase(),a=Ve(n.slice(o+1)),r[i]=a);return r}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&t._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function tr(t,e){const r=this;this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",()=>{let t,e=null,o=null;try{o=new Ze(r)}catch(n){return(e=new Error("Parser is unable to parse the response")).parse=!0,e.original=n,r.xhr?(e.rawResponse=void 0===r.xhr.responseType?r.xhr.responseText:r.xhr.response,e.status=r.xhr.status?r.xhr.status:null,e.statusCode=e.status):(e.rawResponse=null,e.status=null),r.callback(e)}r.emit("response",o);try{r._isResponseOK(o)||(t=new Error(o.statusText||o.text||"Unsuccessful HTTP response"))}catch(n){t=n}t?(t.original=e,t.response=o,t.status=t.status||o.status,r.callback(t,o)):r.callback(null,o)})}Je.serializeObject=Qe,Je.parseString=Ke,Je.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},Je.serialize={"application/x-www-form-urlencoded":ve.stringify,"application/json":r},Je.parse={"application/x-www-form-urlencoded":Ke,"application/json":JSON.parse},ze(Ze.prototype,Ue.prototype),Ze.prototype._parseBody=function(t){let e=Je.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&Ye(this.type)&&(e=Je.parse["application/json"]),e&&t&&(t.length>0||t instanceof Object)?e(t):null)},Ze.prototype.toError=function(){const{req:t}=this,{method:e}=t,{url:r}=t,o="cannot ".concat(e," ").concat(r," (").concat(this.status,")"),n=new Error(o);return n.status=this.status,n.method=e,n.url=r,n},Je.Response=Ze,t(tr.prototype),ze(tr.prototype,De.prototype),tr.prototype.type=function(t){return this.set("Content-Type",Je.types[t]||t),this},tr.prototype.accept=function(t){return this.set("Accept",Je.types[t]||t),this},tr.prototype.auth=function(t,e,r){1===arguments.length&&(e=""),"object"==typeof e&&null!==e&&(r=e,e=""),r||(r={type:"function"==typeof btoa?"basic":"auto"});const o=r.encoder?r.encoder:t=>{if("function"==typeof btoa)return btoa(t);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(t,e,r,o)},tr.prototype.query=function(t){return"string"!=typeof t&&(t=Qe(t)),t&&this._query.push(t),this},tr.prototype.attach=function(t,e,r){if(e){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(t,e,r||e.name)}return this},tr.prototype._getFormData=function(){return this._formData||(this._formData=new We.FormData),this._formData},tr.prototype.callback=function(t,e){if(this._shouldRetry(t,e))return this._retry();const r=this._callback;this.clearTimeout(),t&&(this._maxRetries&&(t.retries=this._retries-1),this.emit("error",t)),r(t,e)},tr.prototype.crossDomainError=function(){const t=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");t.crossDomain=!0,t.status=this.status,t.method=this.method,t.url=this.url,this.callback(t)},tr.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},tr.prototype.ca=tr.prototype.agent,tr.prototype.buffer=tr.prototype.ca,tr.prototype.write=()=>{throw new Error("Streaming is not supported in browser version of superagent")},tr.prototype.pipe=tr.prototype.write,tr.prototype._isHost=function(t){return t&&"object"==typeof t&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},tr.prototype.end=function(t){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=t||$e,this._finalizeQueryString(),this._end()},tr.prototype._setUploadTimeout=function(){const t=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout(()=>{t._timeoutError("Upload timeout of ",t._uploadTimeout,"ETIMEDOUT")},this._uploadTimeout))},tr.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));const t=this;this.xhr=Je.getXHR();const{xhr:e}=this;let r=this._formData||this._data;this._setTimeouts(),e.addEventListener("readystatechange",()=>{const{readyState:r}=e;if(r>=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4!==r)return;let o;try{o=e.status}catch(n){o=0}if(!o){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")});const o=(e,r)=>{r.total>0&&(r.percent=r.loaded/r.total*100,100===r.percent&&clearTimeout(t._uploadTimeoutTimer)),r.direction=e,t.emit("progress",r)};if(this.hasListeners("progress"))try{e.addEventListener("progress",o.bind(null,"download")),e.upload&&e.upload.addEventListener("progress",o.bind(null,"upload"))}catch(n){}e.upload&&this._setUploadTimeout();try{this.username&&this.password?e.open(this.method,this.url,!0,this.username,this.password):e.open(this.method,this.url,!0)}catch(n){return this.callback(n)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof r&&!this._isHost(r)){const t=this._header["content-type"];let e=this._serializer||Je.serialize[t?t.split(";")[0]:""];!e&&Ye(t)&&(e=Je.serialize["application/json"]),e&&(r=e(r))}for(const i in this.header)null!==this.header[i]&&Ge(this.header,i)&&e.setRequestHeader(i,this.header[i]);this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0===r?null:r)},Je.agent=()=>new Le;for(const or of["GET","POST","OPTIONS","PATCH","PUT","DELETE"])Le.prototype[or.toLowerCase()]=function(t,e){const r=new Je.Request(or,t);return this._setDefaults(r),e&&r.end(e),r};function er(t,e,r){const o=Je("DELETE",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o}return Le.prototype.del=Le.prototype.delete,Je.get=(t,e,r)=>{const o=Je("GET",t);return"function"==typeof e&&(r=e,e=null),e&&o.query(e),r&&o.end(r),o},Je.head=(t,e,r)=>{const o=Je("HEAD",t);return"function"==typeof e&&(r=e,e=null),e&&o.query(e),r&&o.end(r),o},Je.options=(t,e,r)=>{const o=Je("OPTIONS",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o},Je.del=er,Je.delete=er,Je.patch=(t,e,r)=>{const o=Je("PATCH",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o},Je.post=(t,e,r)=>{const o=Je("POST",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o},Je.put=(t,e,r)=>{const o=Je("PUT",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o},Be})); \ No newline at end of file