superagent 8.0.1 → 8.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  (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){
2
+ "use strict";
2
3
 
3
4
  },{}],2:[function(require,module,exports){
4
5
  'use strict';
@@ -72,6 +73,8 @@ if ($defineProperty) {
72
73
  }
73
74
 
74
75
  },{"function-bind":7,"get-intrinsic":8}],4:[function(require,module,exports){
76
+ "use strict";
77
+
75
78
  if (typeof module !== 'undefined') {
76
79
  module.exports = Emitter;
77
80
  }
@@ -171,6 +174,8 @@ Emitter.prototype.hasListeners = function (event) {
171
174
  };
172
175
 
173
176
  },{}],5:[function(require,module,exports){
177
+ "use strict";
178
+
174
179
  module.exports = stringify;
175
180
  stringify.default = stringify;
176
181
  stringify.stable = deterministicStringify;
@@ -889,6 +894,8 @@ var bind = require('function-bind');
889
894
  module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
890
895
 
891
896
  },{"function-bind":7}],12:[function(require,module,exports){
897
+ "use strict";
898
+
892
899
  var hasMap = typeof Map === 'function' && Map.prototype;
893
900
  var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
894
901
  var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
@@ -1526,6 +1533,8 @@ function arrObjKeys(obj, inspect) {
1526
1533
  }
1527
1534
 
1528
1535
  },{"./util.inspect":1}],13:[function(require,module,exports){
1536
+ "use strict";
1537
+
1529
1538
  var process = module.exports = {};
1530
1539
  var cachedSetTimeout;
1531
1540
  var cachedClearTimeout;
@@ -2658,6 +2667,8 @@ module.exports = function getSideChannel() {
2658
2667
  };
2659
2668
 
2660
2669
  },{"call-bind/callBound":2,"get-intrinsic":8,"object-inspect":12}],20:[function(require,module,exports){
2670
+ "use strict";
2671
+
2661
2672
  function Agent() {
2662
2673
  this._defaults = [];
2663
2674
  }
@@ -2686,13 +2697,15 @@ Agent.prototype._setDefaults = function (request) {
2686
2697
  module.exports = Agent;
2687
2698
 
2688
2699
  },{}],21:[function(require,module,exports){
2700
+ "use strict";
2701
+
2689
2702
  let root;
2690
2703
 
2691
2704
  if (typeof window !== 'undefined') {
2692
2705
  root = window;
2693
2706
  } else if (typeof self === 'undefined') {
2694
2707
  console.warn('Using browser-only version of superagent in non-browser environment');
2695
- root = this;
2708
+ root = void 0;
2696
2709
  } else {
2697
2710
  root = self;
2698
2711
  }
@@ -3305,6 +3318,8 @@ request.put = (url, data, fn) => {
3305
3318
 
3306
3319
  },{"./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){
3307
3320
  (function (process){(function (){
3321
+ "use strict";
3322
+
3308
3323
  const semver = require('semver');
3309
3324
 
3310
3325
  const {
@@ -3737,6 +3752,8 @@ RequestBase.prototype._setTimeouts = function () {
3737
3752
 
3738
3753
  }).call(this)}).call(this,require('_process'))
3739
3754
  },{"./utils":24,"_process":13,"semver":1}],23:[function(require,module,exports){
3755
+ "use strict";
3756
+
3740
3757
  const utils = require('./utils');
3741
3758
 
3742
3759
  module.exports = ResponseBase;
@@ -3788,6 +3805,8 @@ ResponseBase.prototype._setStatusProperties = function (status) {
3788
3805
  };
3789
3806
 
3790
3807
  },{"./utils":24}],24:[function(require,module,exports){
3808
+ "use strict";
3809
+
3791
3810
  exports.type = string_ => string_.split(/ *; */).shift();
3792
3811
 
3793
3812
  exports.params = value => {
@@ -1 +1 @@
1
- !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=s,s.default=s,s.stable=u,s.stableStringify=u;var o=[],n=[];function i(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(t,e,r,s){var p;void 0===s&&(s=i()),function t(e,r,o,n,i,s,p){var u;if(s+=1,"object"==typeof e&&null!==e){for(u=0;u<n.length;u++)if(n[u]===e)return void a("[Circular]",e,r,i);if(void 0!==p.depthLimit&&s>p.depthLimit)return void a("[...]",e,r,i);if(void 0!==p.edgesLimit&&o+1>p.edgesLimit)return void a("[...]",e,r,i);if(n.push(e),Array.isArray(e))for(u=0;u<e.length;u++)t(e[u],u,u,n,e,s,p);else{var c=Object.keys(e);for(u=0;u<c.length;u++){var l=c[u];t(e[l],l,u,n,e,s,p)}}n.pop()}}(t,"",0,[],void 0,0,s);try{p=0===n.length?JSON.stringify(t,e,r):JSON.stringify(t,c(e),r)}catch(l){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==o.length;){var u=o.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return p}function a(t,e,r,i){var s=Object.getOwnPropertyDescriptor(i,r);void 0!==s.get?s.configurable?(Object.defineProperty(i,r,{value:t}),o.push([i,r,e,s])):n.push([e,r,t]):(i[r]=t,o.push([i,r,e]))}function p(t,e){return t<e?-1:t>e?1:0}function u(t,e,r,s){void 0===s&&(s=i());var u,l=function t(e,r,n,i,s,u,c){var l;if(u+=1,"object"==typeof e&&null!==e){for(l=0;l<i.length;l++)if(i[l]===e)return void a("[Circular]",e,r,s);try{if("function"==typeof e.toJSON)return}catch(d){return}if(void 0!==c.depthLimit&&u>c.depthLimit)return void a("[...]",e,r,s);if(void 0!==c.edgesLimit&&n+1>c.edgesLimit)return void a("[...]",e,r,s);if(i.push(e),Array.isArray(e))for(l=0;l<e.length;l++)t(e[l],l,l,i,e,u,c);else{var f={},y=Object.keys(e).sort(p);for(l=0;l<y.length;l++){var h=y[l];t(e[h],h,l,i,e,u,c),f[h]=e[h]}if(void 0===s)return f;o.push([s,r,e]),s[r]=f}i.pop()}}(t,"",0,[],void 0,0,s)||t;try{u=0===n.length?JSON.stringify(l,e,r):JSON.stringify(l,c(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 u}function c(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=[],s=0;s<n;s++)i.push("$"+s);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 a=function(){};a.prototype=e.prototype,r.prototype=new a,a.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(pe){w=null}var _,A=function(){throw new g},E=w?function(){try{return A}catch(t){try{return w(arguments,"callee").get}catch(e){return A}}}():A,T="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__},P={},S="undefined"==typeof Uint8Array?void 0:O(Uint8Array),x={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":T?O([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":P,"%AsyncGenerator%":P,"%AsyncGeneratorFunction%":P,"%AsyncIteratorPrototype%":P,"%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%":P,"%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%":T?O(O([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&T?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&&T?O((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":T?O(""[Symbol.iterator]()):void 0,"%Symbol%":T?Symbol:void 0,"%SyntaxError%":m,"%ThrowTypeError%":E,"%TypedArray%":S,"%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},j={"%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),F=h.call(Function.call,String.prototype.slice),I=h.call(Function.call,RegExp.prototype.exec),D=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,U=function(t,e){var r,o=t;if(d(j,o)&&(o="%"+(r=j[o])[0]+"%"),d(x,o)){var n=x[o];if(n===P&&(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 x[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!")},q=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===I(/^%?[^%]*%?$/,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=F(t,0,1),r=F(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,D,(function(t,e,r,n){o[o.length]=r?C(n,N,"$1"):e||t})),o}(t),o=r.length>0?r[0]:"",n=U("%"+o+"%",e),i=n.name,s=n.value,a=!1,p=n.alias;p&&(o=p[0],R(r,k([0,1],p)));for(var u=1,c=!0;u<r.length;u+=1){var l=r[u],f=F(l,0,1),y=F(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&&c||(a=!0),d(x,i="%"+(o+="."+l)+"%"))s=x[i];else if(null!=s){if(!(l in s)){if(!e)throw new g("base intrinsic for "+t+" exists, but the property is not available.");return}if(w&&u+1>=r.length){var h=w(s,l);s=(c=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:s[l]}else c=d(s,l),s=s[l];c&&!a&&(x[i]=s)}}return s},L=q("%Function.prototype.apply%"),M=q("%Function.prototype.call%"),B=q("%Reflect.apply%",!0)||h.call(M,L),H=q("%Object.getOwnPropertyDescriptor%",!0),z=q("%Object.defineProperty%",!0),G=q("%Math.max%");if(z)try{z({},"a",{value:1})}catch(pe){z=null}_=function(t){var e=B(h,M,arguments);return H&&z&&H(e,"length").configurable&&z(e,"length",{value:1+G(0,t.length-(arguments.length-1))}),e};var $=function(){return B(h,L,arguments)};z?z(_,"apply",{value:$}):_.apply=$;var W=_(q("String.prototype.indexOf")),J=function(t,e){var r=q(t,!!e);return"function"==typeof r&&W(t,".prototype.")>-1?_(r):r},V=require(12),Q=q("%TypeError%"),X=q("%WeakMap%",!0),K=q("%Map%",!0),Y=J("WeakMap.prototype.get",!0),Z=J("WeakMap.prototype.set",!0),tt=J("WeakMap.prototype.has",!0),et=J("Map.prototype.get",!0),rt=J("Map.prototype.set",!0),ot=J("Map.prototype.has",!0),nt=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},it=function(){var t,e,r,o={assert:function(t){if(!o.has(t))throw new Q("Side channel does not contain "+V(t))},get:function(o){if(X&&o&&("object"==typeof o||"function"==typeof o)){if(t)return Y(t,o)}else if(K){if(e)return et(e,o)}else if(r)return function(t,e){var r=nt(t,e);return r&&r.value}(r,o)},has:function(o){if(X&&o&&("object"==typeof o||"function"==typeof o)){if(t)return tt(t,o)}else if(K){if(e)return ot(e,o)}else if(r)return function(t,e){return!!nt(t,e)}(r,o);return!1},set:function(o,n){X&&o&&("object"==typeof o||"function"==typeof o)?(t||(t=new X),Z(t,o,n)):K?(e||(e=new K),rt(e,o,n)):(r||(r={key:{},next:null}),function(t,e,r){var o=nt(t,e);o?o.value=r:t.next={key:e,next:t.next,value:r}}(r,o,n))}};return o},st=String.prototype.replace,at=/%20/g,pt={default:"RFC3986",formatters:{RFC1738:function(t){return st.call(t,at,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:"RFC3986"},ut=Object.prototype.hasOwnProperty,ct=Array.isArray,lt=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),ft={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],s=Object.keys(i),a=0;a<s.length;++a){var p=s[a],u=i[p];"object"==typeof u&&null!==u&&-1===r.indexOf(u)&&(e.push({obj:i,prop:p}),r.push(u))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(ct(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(pe){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 s="",a=0;a<i.length;++a){var p=i.charCodeAt(a);45===p||46===p||95===p||126===p||p>=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||n===pt.RFC1738&&(40===p||41===p)?s+=i.charAt(a):p<128?s+=lt[p]:p<2048?s+=lt[192|p>>6]+lt[128|63&p]:p<55296||p>=57344?s+=lt[224|p>>12]+lt[128|p>>6&63]+lt[128|63&p]:(a+=1,p=65536+((1023&p)<<10|1023&i.charCodeAt(a)),s+=lt[240|p>>18]+lt[128|p>>12&63]+lt[128|p>>6&63]+lt[128|63&p])}return s},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(ct(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(ct(e))e.push(r);else{if(!e||"object"!=typeof e)return[e,r];(o&&(o.plainObjects||o.allowPrototypes)||!ut.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(r);var n=e;return ct(e)&&!ct(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)),ct(e)&&ct(r)?(r.forEach((function(r,n){if(ut.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 ut.call(e,n)?e[n]=t(e[n],i,o):e[n]=i,e}),n)}},yt=Object.prototype.hasOwnProperty,ht={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},dt=Array.isArray,mt=String.prototype.split,bt=Array.prototype.push,gt=function(t,e){bt.apply(t,dt(e)?e:[e])},vt=Date.prototype.toISOString,wt=pt.default,_t={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:ft.encode,encodeValuesOnly:!1,format:wt,formatter:pt.formatters[wt],indices:!1,serializeDate:function(t){return vt.call(t)},skipNulls:!1,strictNullHandling:!1},At={},Et=function t(e,r,o,n,i,s,a,p,u,c,l,f,y,h,d,m){for(var b,g=e,v=m,w=0,_=!1;void 0!==(v=v.get(At))&&!_;){var A=v.get(e);if(w+=1,void 0!==A){if(A===w)throw new RangeError("Cyclic object value");_=!0}void 0===v.get(At)&&(w=0)}if("function"==typeof p?g=p(r,g):g instanceof Date?g=l(g):"comma"===o&&dt(g)&&(g=ft.maybeMap(g,(function(t){return t instanceof Date?l(t):t}))),null===g){if(i)return a&&!h?a(r,_t.encoder,d,"key",f):r;g=""}if("string"==typeof(b=g)||"number"==typeof b||"boolean"==typeof b||"symbol"==typeof b||"bigint"==typeof b||ft.isBuffer(g)){if(a){var E=h?r:a(r,_t.encoder,d,"key",f);if("comma"===o&&h){for(var T=mt.call(String(g),","),O="",P=0;P<T.length;++P)O+=(0===P?"":",")+y(a(T[P],_t.encoder,d,"value",f));return[y(E)+(n&&dt(g)&&1===T.length?"[]":"")+"="+O]}return[y(E)+"="+y(a(g,_t.encoder,d,"value",f))]}return[y(r)+"="+y(String(g))]}var S,x=[];if(void 0===g)return x;if("comma"===o&&dt(g))S=[{value:g.length>0?g.join(",")||null:void 0}];else if(dt(p))S=p;else{var j=Object.keys(g);S=u?j.sort(u):j}for(var k=n&&dt(g)&&1===g.length?r+"[]":r,R=0;R<S.length;++R){var C=S[R],F="object"==typeof C&&void 0!==C.value?C.value:g[C];if(!s||null!==F){var I=dt(g)?"function"==typeof o?o(k,C):k:k+(c?"."+C:"["+C+"]");m.set(e,w);var D=it();D.set(At,m),gt(x,t(F,I,o,n,i,s,a,p,u,c,l,f,y,h,d,D))}}return x},Tt=(Object.prototype.hasOwnProperty,Array.isArray,{stringify:function(t,e){var r,o=t,n=function(t){if(!t)return _t;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||_t.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=pt.default;if(void 0!==t.format){if(!yt.call(pt.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=pt.formatters[r],n=_t.filter;return("function"==typeof t.filter||dt(t.filter))&&(n=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:_t.addQueryPrefix,allowDots:void 0===t.allowDots?_t.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:_t.charsetSentinel,delimiter:void 0===t.delimiter?_t.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:_t.encode,encoder:"function"==typeof t.encoder?t.encoder:_t.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:_t.encodeValuesOnly,filter:n,format:r,formatter:o,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:_t.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:_t.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:_t.strictNullHandling}}(e);"function"==typeof n.filter?o=(0,n.filter)("",o):dt(n.filter)&&(r=n.filter);var i,s=[];if("object"!=typeof o||null===o)return"";i=e&&e.arrayFormat in ht?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var a=ht[i];if(e&&"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var p="comma"===a&&e&&e.commaRoundTrip;r||(r=Object.keys(o)),n.sort&&r.sort(n.sort);for(var u=it(),c=0;c<r.length;++c){var l=r[c];n.skipNulls&&null===o[l]||gt(s,Et(o[l],l,a,p,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 f=s.join(n.delimiter),y=!0===n.addQueryPrefix?"?":"";return n.charsetSentinel&&("iso-8859-1"===n.charset?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),f.length>0?y+f:""}}),Ot={},Pt={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};Pt.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)},Pt.mixin=(t,e)=>{for(const r in e)Pt.hasOwn(e,r)&&(t[r]=e[r])};var St,xt,jt,kt=St={};function Rt(){throw new Error("setTimeout has not been defined")}function Ct(){throw new Error("clearTimeout has not been defined")}function Ft(t){if(xt===setTimeout)return setTimeout(t,0);if((xt===Rt||!xt)&&setTimeout)return xt=setTimeout,setTimeout(t,0);try{return xt(t,0)}catch(pe){try{return xt.call(null,t,0)}catch(pe){return xt.call(this,t,0)}}}!function(){try{xt="function"==typeof setTimeout?setTimeout:Rt}catch(pe){xt=Rt}try{jt="function"==typeof clearTimeout?clearTimeout:Ct}catch(pe){jt=Ct}}();var It,Dt=[],Nt=!1,Ut=-1;function qt(){Nt&&It&&(Nt=!1,It.length?Dt=It.concat(Dt):Ut=-1,Dt.length&&Lt())}function Lt(){if(!Nt){var t=Ft(qt);Nt=!0;for(var e=Dt.length;e;){for(It=Dt,Dt=[];++Ut<e;)It&&It[Ut].run();Ut=-1,e=Dt.length}It=null,Nt=!1,function(t){if(jt===clearTimeout)return clearTimeout(t);if((jt===Ct||!jt)&&clearTimeout)return jt=clearTimeout,clearTimeout(t);try{jt(t)}catch(pe){try{return jt.call(null,t)}catch(pe){return jt.call(this,t)}}}(t)}}function Mt(t,e){this.fun=t,this.array=e}function Bt(){}kt.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];Dt.push(new Mt(t,e)),1!==Dt.length||Nt||Ft(Lt)},Mt.prototype.run=function(){this.fun.apply(null,this.array)},kt.title="browser",kt.browser=!0,kt.env={},kt.argv=[],kt.version="",kt.versions={},kt.on=Bt,kt.addListener=Bt,kt.once=Bt,kt.off=Bt,kt.removeListener=Bt,kt.removeAllListeners=Bt,kt.emit=Bt,kt.prependListener=Bt,kt.prependOnceListener=Bt,kt.listeners=function(t){return[]},kt.binding=function(t){throw new Error("process.binding is not supported")},kt.cwd=function(){return"/"},kt.chdir=function(t){throw new Error("process.chdir is not supported")},kt.umask=function(){return 0};var Ht={};(function(t){(function(){const{isObject:e,hasOwn:r}=Pt;function o(){}Ht=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(Ot.gte(t.version,"v13.0.0")&&Ot.lt(t.version,"v14.0.0"))throw new Error("Superagent does not work in v13 properly with abort() due to Node.js core changes");Ot.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 "+o(`${t}:${e}`));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer "+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?`${this._data}&${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(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,St);var zt;function Gt(){}zt=Gt,Gt.prototype.get=function(t){return this.header[t.toLowerCase()]},Gt.prototype._setHeaderProperties=function(t){const e=t["content-type"]||"";this.type=Pt.type(e);const r=Pt.params(e);for(const n in r)Object.prototype.hasOwnProperty.call(r,n)&&(this[n]=r[n]);this.links={};try{t.link&&(this.links=Pt.parseLinks(t.link))}catch(o){}},Gt.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 $t={};function Wt(){this._defaults=[]}for(const ue of["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"])Wt.prototype[ue]=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this._defaults.push({fn:ue,args:e}),this};Wt.prototype._setDefaults=function(t){for(const e of this._defaults)t[e.fn](...e.args)},$t=Wt;var Jt={};let Vt;"undefined"!=typeof window?Vt=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),Vt=this):Vt=self;const{isObject:Qt,mixin:Xt,hasOwn:Kt}=Pt;function Yt(){}const Zt=Jt=Jt=function(t,e){return"function"==typeof e?new Jt.Request("GET",t).end(e):1===arguments.length?new Jt.Request("GET",t):new Jt.Request(t,e)};Jt.Request=se,Zt.getXHR=()=>{if(Vt.XMLHttpRequest)return new Vt.XMLHttpRequest;throw new Error("Browser-only version of superagent could not find XHR")};const te="".trim?t=>t.trim():t=>t.replace(/(^\s*|\s*$)/g,"");function ee(t){if(!Qt(t))return t;const e=[];for(const r in t)Kt(t,r)&&re(e,r,t[r]);return e.join("&")}function re(t,e,r){if(void 0!==r)if(null!==r)if(Array.isArray(r))for(const o of r)re(t,e,o);else if(Qt(r))for(const o in r)Kt(r,o)&&re(t,`${e}[${o}]`,r[o]);else t.push(encodeURI(e)+"="+encodeURIComponent(r));else t.push(encodeURI(e))}function oe(t){const e={},r=t.split("&");let o,n;for(let i=0,s=r.length;i<s;++i)-1===(n=(o=r[i]).indexOf("="))?e[decodeURIComponent(o)]="":e[decodeURIComponent(o.slice(0,n))]=decodeURIComponent(o.slice(n+1));return e}function ne(t){return/[/+]json($|[^-\w])/i.test(t)}function ie(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,s;for(let a=0,p=e.length;a<p;++a)-1!==(o=(n=e[a]).indexOf(":"))&&(i=n.slice(0,o).toLowerCase(),s=te(n.slice(o+1)),r[i]=s);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 se(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 ie(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)})}Zt.serializeObject=ee,Zt.parseString=oe,Zt.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"},Zt.serialize={"application/x-www-form-urlencoded":Tt.stringify,"application/json":r},Zt.parse={"application/x-www-form-urlencoded":oe,"application/json":JSON.parse},Xt(ie.prototype,zt.prototype),ie.prototype._parseBody=function(t){let e=Zt.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&ne(this.type)&&(e=Zt.parse["application/json"]),e&&t&&(t.length>0||t instanceof Object)?e(t):null)},ie.prototype.toError=function(){const{req:t}=this,{method:e}=t,{url:r}=t,o=`cannot ${e} ${r} (${this.status})`,n=new Error(o);return n.status=this.status,n.method=e,n.url=r,n},Zt.Response=ie,t(se.prototype),Xt(se.prototype,Ht.prototype),se.prototype.type=function(t){return this.set("Content-Type",Zt.types[t]||t),this},se.prototype.accept=function(t){return this.set("Accept",Zt.types[t]||t),this},se.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)},se.prototype.query=function(t){return"string"!=typeof t&&(t=ee(t)),t&&this._query.push(t),this},se.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},se.prototype._getFormData=function(){return this._formData||(this._formData=new Vt.FormData),this._formData},se.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)},se.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)},se.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},se.prototype.ca=se.prototype.agent,se.prototype.buffer=se.prototype.ca,se.prototype.write=()=>{throw new Error("Streaming is not supported in browser version of superagent")},se.prototype.pipe=se.prototype.write,se.prototype._isHost=function(t){return t&&"object"==typeof t&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},se.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||Yt,this._finalizeQueryString(),this._end()},se.prototype._setUploadTimeout=function(){const t=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout(()=>{t._timeoutError("Upload timeout of ",t._uploadTimeout,"ETIMEDOUT")},this._uploadTimeout))},se.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=Zt.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||Zt.serialize[t?t.split(";")[0]:""];!e&&ne(t)&&(e=Zt.serialize["application/json"]),e&&(r=e(r))}for(const i in this.header)null!==this.header[i]&&Kt(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)},Zt.agent=()=>new $t;for(const ue of["GET","POST","OPTIONS","PATCH","PUT","DELETE"])$t.prototype[ue.toLowerCase()]=function(t,e){const r=new Zt.Request(ue,t);return this._setDefaults(r),e&&r.end(e),r};function ae(t,e,r){const o=Zt("DELETE",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o}return $t.prototype.del=$t.prototype.delete,Zt.get=(t,e,r)=>{const o=Zt("GET",t);return"function"==typeof e&&(r=e,e=null),e&&o.query(e),r&&o.end(r),o},Zt.head=(t,e,r)=>{const o=Zt("HEAD",t);return"function"==typeof e&&(r=e,e=null),e&&o.query(e),r&&o.end(r),o},Zt.options=(t,e,r)=>{const o=Zt("OPTIONS",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o},Zt.del=ae,Zt.delete=ae,Zt.patch=(t,e,r)=>{const o=Zt("PATCH",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o},Zt.post=(t,e,r)=>{const o=Zt("POST",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o},Zt.put=(t,e,r)=>{const o=Zt("PUT",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o},Jt}));
1
+ !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=s,s.default=s,s.stable=u,s.stableStringify=u;var o=[],n=[];function i(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(t,e,r,s){var p;void 0===s&&(s=i()),function t(e,r,o,n,i,s,p){var u;if(s+=1,"object"==typeof e&&null!==e){for(u=0;u<n.length;u++)if(n[u]===e)return void a("[Circular]",e,r,i);if(void 0!==p.depthLimit&&s>p.depthLimit)return void a("[...]",e,r,i);if(void 0!==p.edgesLimit&&o+1>p.edgesLimit)return void a("[...]",e,r,i);if(n.push(e),Array.isArray(e))for(u=0;u<e.length;u++)t(e[u],u,u,n,e,s,p);else{var c=Object.keys(e);for(u=0;u<c.length;u++){var l=c[u];t(e[l],l,u,n,e,s,p)}}n.pop()}}(t,"",0,[],void 0,0,s);try{p=0===n.length?JSON.stringify(t,e,r):JSON.stringify(t,c(e),r)}catch(l){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==o.length;){var u=o.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return p}function a(t,e,r,i){var s=Object.getOwnPropertyDescriptor(i,r);void 0!==s.get?s.configurable?(Object.defineProperty(i,r,{value:t}),o.push([i,r,e,s])):n.push([e,r,t]):(i[r]=t,o.push([i,r,e]))}function p(t,e){return t<e?-1:t>e?1:0}function u(t,e,r,s){void 0===s&&(s=i());var u,l=function t(e,r,n,i,s,u,c){var l;if(u+=1,"object"==typeof e&&null!==e){for(l=0;l<i.length;l++)if(i[l]===e)return void a("[Circular]",e,r,s);try{if("function"==typeof e.toJSON)return}catch(d){return}if(void 0!==c.depthLimit&&u>c.depthLimit)return void a("[...]",e,r,s);if(void 0!==c.edgesLimit&&n+1>c.edgesLimit)return void a("[...]",e,r,s);if(i.push(e),Array.isArray(e))for(l=0;l<e.length;l++)t(e[l],l,l,i,e,u,c);else{var f={},y=Object.keys(e).sort(p);for(l=0;l<y.length;l++){var h=y[l];t(e[h],h,l,i,e,u,c),f[h]=e[h]}if(void 0===s)return f;o.push([s,r,e]),s[r]=f}i.pop()}}(t,"",0,[],void 0,0,s)||t;try{u=0===n.length?JSON.stringify(l,e,r):JSON.stringify(l,c(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 u}function c(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=[],s=0;s<n;s++)i.push("$"+s);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 a=function(){};a.prototype=e.prototype,r.prototype=new a,a.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(pe){w=null}var _,A=function(){throw new g},E=w?function(){try{return A}catch(t){try{return w(arguments,"callee").get}catch(e){return A}}}():A,T="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__},P={},S="undefined"==typeof Uint8Array?void 0:O(Uint8Array),x={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":T?O([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":P,"%AsyncGenerator%":P,"%AsyncGeneratorFunction%":P,"%AsyncIteratorPrototype%":P,"%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%":P,"%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%":T?O(O([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&T?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&&T?O((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":T?O(""[Symbol.iterator]()):void 0,"%Symbol%":T?Symbol:void 0,"%SyntaxError%":m,"%ThrowTypeError%":E,"%TypedArray%":S,"%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},j={"%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),F=h.call(Function.call,String.prototype.slice),I=h.call(Function.call,RegExp.prototype.exec),D=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,U=function(t,e){var r,o=t;if(d(j,o)&&(o="%"+(r=j[o])[0]+"%"),d(x,o)){var n=x[o];if(n===P&&(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 x[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!")},q=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===I(/^%?[^%]*%?$/,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=F(t,0,1),r=F(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,D,(function(t,e,r,n){o[o.length]=r?C(n,N,"$1"):e||t})),o}(t),o=r.length>0?r[0]:"",n=U("%"+o+"%",e),i=n.name,s=n.value,a=!1,p=n.alias;p&&(o=p[0],R(r,k([0,1],p)));for(var u=1,c=!0;u<r.length;u+=1){var l=r[u],f=F(l,0,1),y=F(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&&c||(a=!0),d(x,i="%"+(o+="."+l)+"%"))s=x[i];else if(null!=s){if(!(l in s)){if(!e)throw new g("base intrinsic for "+t+" exists, but the property is not available.");return}if(w&&u+1>=r.length){var h=w(s,l);s=(c=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:s[l]}else c=d(s,l),s=s[l];c&&!a&&(x[i]=s)}}return s},L=q("%Function.prototype.apply%"),M=q("%Function.prototype.call%"),B=q("%Reflect.apply%",!0)||h.call(M,L),H=q("%Object.getOwnPropertyDescriptor%",!0),z=q("%Object.defineProperty%",!0),G=q("%Math.max%");if(z)try{z({},"a",{value:1})}catch(pe){z=null}_=function(t){var e=B(h,M,arguments);return H&&z&&H(e,"length").configurable&&z(e,"length",{value:1+G(0,t.length-(arguments.length-1))}),e};var $=function(){return B(h,L,arguments)};z?z(_,"apply",{value:$}):_.apply=$;var W=_(q("String.prototype.indexOf")),J=function(t,e){var r=q(t,!!e);return"function"==typeof r&&W(t,".prototype.")>-1?_(r):r},V=require(12),Q=q("%TypeError%"),X=q("%WeakMap%",!0),K=q("%Map%",!0),Y=J("WeakMap.prototype.get",!0),Z=J("WeakMap.prototype.set",!0),tt=J("WeakMap.prototype.has",!0),et=J("Map.prototype.get",!0),rt=J("Map.prototype.set",!0),ot=J("Map.prototype.has",!0),nt=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},it=function(){var t,e,r,o={assert:function(t){if(!o.has(t))throw new Q("Side channel does not contain "+V(t))},get:function(o){if(X&&o&&("object"==typeof o||"function"==typeof o)){if(t)return Y(t,o)}else if(K){if(e)return et(e,o)}else if(r)return function(t,e){var r=nt(t,e);return r&&r.value}(r,o)},has:function(o){if(X&&o&&("object"==typeof o||"function"==typeof o)){if(t)return tt(t,o)}else if(K){if(e)return ot(e,o)}else if(r)return function(t,e){return!!nt(t,e)}(r,o);return!1},set:function(o,n){X&&o&&("object"==typeof o||"function"==typeof o)?(t||(t=new X),Z(t,o,n)):K?(e||(e=new K),rt(e,o,n)):(r||(r={key:{},next:null}),function(t,e,r){var o=nt(t,e);o?o.value=r:t.next={key:e,next:t.next,value:r}}(r,o,n))}};return o},st=String.prototype.replace,at=/%20/g,pt={default:"RFC3986",formatters:{RFC1738:function(t){return st.call(t,at,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:"RFC3986"},ut=Object.prototype.hasOwnProperty,ct=Array.isArray,lt=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),ft={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],s=Object.keys(i),a=0;a<s.length;++a){var p=s[a],u=i[p];"object"==typeof u&&null!==u&&-1===r.indexOf(u)&&(e.push({obj:i,prop:p}),r.push(u))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(ct(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(pe){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 s="",a=0;a<i.length;++a){var p=i.charCodeAt(a);45===p||46===p||95===p||126===p||p>=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||n===pt.RFC1738&&(40===p||41===p)?s+=i.charAt(a):p<128?s+=lt[p]:p<2048?s+=lt[192|p>>6]+lt[128|63&p]:p<55296||p>=57344?s+=lt[224|p>>12]+lt[128|p>>6&63]+lt[128|63&p]:(a+=1,p=65536+((1023&p)<<10|1023&i.charCodeAt(a)),s+=lt[240|p>>18]+lt[128|p>>12&63]+lt[128|p>>6&63]+lt[128|63&p])}return s},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(ct(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(ct(e))e.push(r);else{if(!e||"object"!=typeof e)return[e,r];(o&&(o.plainObjects||o.allowPrototypes)||!ut.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(r);var n=e;return ct(e)&&!ct(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)),ct(e)&&ct(r)?(r.forEach((function(r,n){if(ut.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 ut.call(e,n)?e[n]=t(e[n],i,o):e[n]=i,e}),n)}},yt=Object.prototype.hasOwnProperty,ht={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},dt=Array.isArray,mt=String.prototype.split,bt=Array.prototype.push,gt=function(t,e){bt.apply(t,dt(e)?e:[e])},vt=Date.prototype.toISOString,wt=pt.default,_t={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:ft.encode,encodeValuesOnly:!1,format:wt,formatter:pt.formatters[wt],indices:!1,serializeDate:function(t){return vt.call(t)},skipNulls:!1,strictNullHandling:!1},At={},Et=function t(e,r,o,n,i,s,a,p,u,c,l,f,y,h,d,m){for(var b,g=e,v=m,w=0,_=!1;void 0!==(v=v.get(At))&&!_;){var A=v.get(e);if(w+=1,void 0!==A){if(A===w)throw new RangeError("Cyclic object value");_=!0}void 0===v.get(At)&&(w=0)}if("function"==typeof p?g=p(r,g):g instanceof Date?g=l(g):"comma"===o&&dt(g)&&(g=ft.maybeMap(g,(function(t){return t instanceof Date?l(t):t}))),null===g){if(i)return a&&!h?a(r,_t.encoder,d,"key",f):r;g=""}if("string"==typeof(b=g)||"number"==typeof b||"boolean"==typeof b||"symbol"==typeof b||"bigint"==typeof b||ft.isBuffer(g)){if(a){var E=h?r:a(r,_t.encoder,d,"key",f);if("comma"===o&&h){for(var T=mt.call(String(g),","),O="",P=0;P<T.length;++P)O+=(0===P?"":",")+y(a(T[P],_t.encoder,d,"value",f));return[y(E)+(n&&dt(g)&&1===T.length?"[]":"")+"="+O]}return[y(E)+"="+y(a(g,_t.encoder,d,"value",f))]}return[y(r)+"="+y(String(g))]}var S,x=[];if(void 0===g)return x;if("comma"===o&&dt(g))S=[{value:g.length>0?g.join(",")||null:void 0}];else if(dt(p))S=p;else{var j=Object.keys(g);S=u?j.sort(u):j}for(var k=n&&dt(g)&&1===g.length?r+"[]":r,R=0;R<S.length;++R){var C=S[R],F="object"==typeof C&&void 0!==C.value?C.value:g[C];if(!s||null!==F){var I=dt(g)?"function"==typeof o?o(k,C):k:k+(c?"."+C:"["+C+"]");m.set(e,w);var D=it();D.set(At,m),gt(x,t(F,I,o,n,i,s,a,p,u,c,l,f,y,h,d,D))}}return x},Tt=(Object.prototype.hasOwnProperty,Array.isArray,{stringify:function(t,e){var r,o=t,n=function(t){if(!t)return _t;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||_t.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=pt.default;if(void 0!==t.format){if(!yt.call(pt.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var o=pt.formatters[r],n=_t.filter;return("function"==typeof t.filter||dt(t.filter))&&(n=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:_t.addQueryPrefix,allowDots:void 0===t.allowDots?_t.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:_t.charsetSentinel,delimiter:void 0===t.delimiter?_t.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:_t.encode,encoder:"function"==typeof t.encoder?t.encoder:_t.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:_t.encodeValuesOnly,filter:n,format:r,formatter:o,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:_t.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:_t.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:_t.strictNullHandling}}(e);"function"==typeof n.filter?o=(0,n.filter)("",o):dt(n.filter)&&(r=n.filter);var i,s=[];if("object"!=typeof o||null===o)return"";i=e&&e.arrayFormat in ht?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var a=ht[i];if(e&&"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var p="comma"===a&&e&&e.commaRoundTrip;r||(r=Object.keys(o)),n.sort&&r.sort(n.sort);for(var u=it(),c=0;c<r.length;++c){var l=r[c];n.skipNulls&&null===o[l]||gt(s,Et(o[l],l,a,p,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 f=s.join(n.delimiter),y=!0===n.addQueryPrefix?"?":"";return n.charsetSentinel&&("iso-8859-1"===n.charset?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),f.length>0?y+f:""}}),Ot={},Pt={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};Pt.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)},Pt.mixin=(t,e)=>{for(const r in e)Pt.hasOwn(e,r)&&(t[r]=e[r])};var St,xt,jt,kt=St={};function Rt(){throw new Error("setTimeout has not been defined")}function Ct(){throw new Error("clearTimeout has not been defined")}function Ft(t){if(xt===setTimeout)return setTimeout(t,0);if((xt===Rt||!xt)&&setTimeout)return xt=setTimeout,setTimeout(t,0);try{return xt(t,0)}catch(pe){try{return xt.call(null,t,0)}catch(pe){return xt.call(this,t,0)}}}!function(){try{xt="function"==typeof setTimeout?setTimeout:Rt}catch(pe){xt=Rt}try{jt="function"==typeof clearTimeout?clearTimeout:Ct}catch(pe){jt=Ct}}();var It,Dt=[],Nt=!1,Ut=-1;function qt(){Nt&&It&&(Nt=!1,It.length?Dt=It.concat(Dt):Ut=-1,Dt.length&&Lt())}function Lt(){if(!Nt){var t=Ft(qt);Nt=!0;for(var e=Dt.length;e;){for(It=Dt,Dt=[];++Ut<e;)It&&It[Ut].run();Ut=-1,e=Dt.length}It=null,Nt=!1,function(t){if(jt===clearTimeout)return clearTimeout(t);if((jt===Ct||!jt)&&clearTimeout)return jt=clearTimeout,clearTimeout(t);try{jt(t)}catch(pe){try{return jt.call(null,t)}catch(pe){return jt.call(this,t)}}}(t)}}function Mt(t,e){this.fun=t,this.array=e}function Bt(){}kt.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];Dt.push(new Mt(t,e)),1!==Dt.length||Nt||Ft(Lt)},Mt.prototype.run=function(){this.fun.apply(null,this.array)},kt.title="browser",kt.browser=!0,kt.env={},kt.argv=[],kt.version="",kt.versions={},kt.on=Bt,kt.addListener=Bt,kt.once=Bt,kt.off=Bt,kt.removeListener=Bt,kt.removeAllListeners=Bt,kt.emit=Bt,kt.prependListener=Bt,kt.prependOnceListener=Bt,kt.listeners=function(t){return[]},kt.binding=function(t){throw new Error("process.binding is not supported")},kt.cwd=function(){return"/"},kt.chdir=function(t){throw new Error("process.chdir is not supported")},kt.umask=function(){return 0};var Ht={};(function(t){(function(){"use strict";const{isObject:e,hasOwn:r}=Pt;function o(){}Ht=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(Ot.gte(t.version,"v13.0.0")&&Ot.lt(t.version,"v14.0.0"))throw new Error("Superagent does not work in v13 properly with abort() due to Node.js core changes");Ot.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 "+o(`${t}:${e}`));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer "+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?`${this._data}&${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(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,St);var zt;function Gt(){}zt=Gt,Gt.prototype.get=function(t){return this.header[t.toLowerCase()]},Gt.prototype._setHeaderProperties=function(t){const e=t["content-type"]||"";this.type=Pt.type(e);const r=Pt.params(e);for(const n in r)Object.prototype.hasOwnProperty.call(r,n)&&(this[n]=r[n]);this.links={};try{t.link&&(this.links=Pt.parseLinks(t.link))}catch(o){}},Gt.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 $t={};function Wt(){this._defaults=[]}for(const ue of["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"])Wt.prototype[ue]=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return this._defaults.push({fn:ue,args:e}),this};Wt.prototype._setDefaults=function(t){for(const e of this._defaults)t[e.fn](...e.args)},$t=Wt;var Jt={};let Vt;"undefined"!=typeof window?Vt=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),Vt=void 0):Vt=self;const{isObject:Qt,mixin:Xt,hasOwn:Kt}=Pt;function Yt(){}const Zt=Jt=Jt=function(t,e){return"function"==typeof e?new Jt.Request("GET",t).end(e):1===arguments.length?new Jt.Request("GET",t):new Jt.Request(t,e)};Jt.Request=se,Zt.getXHR=()=>{if(Vt.XMLHttpRequest)return new Vt.XMLHttpRequest;throw new Error("Browser-only version of superagent could not find XHR")};const te="".trim?t=>t.trim():t=>t.replace(/(^\s*|\s*$)/g,"");function ee(t){if(!Qt(t))return t;const e=[];for(const r in t)Kt(t,r)&&re(e,r,t[r]);return e.join("&")}function re(t,e,r){if(void 0!==r)if(null!==r)if(Array.isArray(r))for(const o of r)re(t,e,o);else if(Qt(r))for(const o in r)Kt(r,o)&&re(t,`${e}[${o}]`,r[o]);else t.push(encodeURI(e)+"="+encodeURIComponent(r));else t.push(encodeURI(e))}function oe(t){const e={},r=t.split("&");let o,n;for(let i=0,s=r.length;i<s;++i)-1===(n=(o=r[i]).indexOf("="))?e[decodeURIComponent(o)]="":e[decodeURIComponent(o.slice(0,n))]=decodeURIComponent(o.slice(n+1));return e}function ne(t){return/[/+]json($|[^-\w])/i.test(t)}function ie(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,s;for(let a=0,p=e.length;a<p;++a)-1!==(o=(n=e[a]).indexOf(":"))&&(i=n.slice(0,o).toLowerCase(),s=te(n.slice(o+1)),r[i]=s);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 se(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 ie(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)})}Zt.serializeObject=ee,Zt.parseString=oe,Zt.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"},Zt.serialize={"application/x-www-form-urlencoded":Tt.stringify,"application/json":r},Zt.parse={"application/x-www-form-urlencoded":oe,"application/json":JSON.parse},Xt(ie.prototype,zt.prototype),ie.prototype._parseBody=function(t){let e=Zt.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&ne(this.type)&&(e=Zt.parse["application/json"]),e&&t&&(t.length>0||t instanceof Object)?e(t):null)},ie.prototype.toError=function(){const{req:t}=this,{method:e}=t,{url:r}=t,o=`cannot ${e} ${r} (${this.status})`,n=new Error(o);return n.status=this.status,n.method=e,n.url=r,n},Zt.Response=ie,t(se.prototype),Xt(se.prototype,Ht.prototype),se.prototype.type=function(t){return this.set("Content-Type",Zt.types[t]||t),this},se.prototype.accept=function(t){return this.set("Accept",Zt.types[t]||t),this},se.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)},se.prototype.query=function(t){return"string"!=typeof t&&(t=ee(t)),t&&this._query.push(t),this},se.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},se.prototype._getFormData=function(){return this._formData||(this._formData=new Vt.FormData),this._formData},se.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)},se.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)},se.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},se.prototype.ca=se.prototype.agent,se.prototype.buffer=se.prototype.ca,se.prototype.write=()=>{throw new Error("Streaming is not supported in browser version of superagent")},se.prototype.pipe=se.prototype.write,se.prototype._isHost=function(t){return t&&"object"==typeof t&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},se.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||Yt,this._finalizeQueryString(),this._end()},se.prototype._setUploadTimeout=function(){const t=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout(()=>{t._timeoutError("Upload timeout of ",t._uploadTimeout,"ETIMEDOUT")},this._uploadTimeout))},se.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=Zt.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||Zt.serialize[t?t.split(";")[0]:""];!e&&ne(t)&&(e=Zt.serialize["application/json"]),e&&(r=e(r))}for(const i in this.header)null!==this.header[i]&&Kt(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)},Zt.agent=()=>new $t;for(const ue of["GET","POST","OPTIONS","PATCH","PUT","DELETE"])$t.prototype[ue.toLowerCase()]=function(t,e){const r=new Zt.Request(ue,t);return this._setDefaults(r),e&&r.end(e),r};function ae(t,e,r){const o=Zt("DELETE",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o}return $t.prototype.del=$t.prototype.delete,Zt.get=(t,e,r)=>{const o=Zt("GET",t);return"function"==typeof e&&(r=e,e=null),e&&o.query(e),r&&o.end(r),o},Zt.head=(t,e,r)=>{const o=Zt("HEAD",t);return"function"==typeof e&&(r=e,e=null),e&&o.query(e),r&&o.end(r),o},Zt.options=(t,e,r)=>{const o=Zt("OPTIONS",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o},Zt.del=ae,Zt.delete=ae,Zt.patch=(t,e,r)=>{const o=Zt("PATCH",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o},Zt.post=(t,e,r)=>{const o=Zt("POST",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o},Zt.put=(t,e,r)=>{const o=Zt("PUT",t);return"function"==typeof e&&(r=e,e=null),e&&o.send(e),r&&o.end(r),o},Jt}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "superagent",
3
3
  "description": "elegant & feature rich browser / node HTTP with a fluent API",
4
- "version": "8.0.1",
4
+ "version": "8.0.2",
5
5
  "author": "TJ Holowaychuk <tj@vision-media.ca>",
6
6
  "browser": {
7
7
  "./src/node/index.js": "./src/client.js",
@@ -28,7 +28,6 @@
28
28
  "methods": "^1.1.2",
29
29
  "mime": "2.6.0",
30
30
  "qs": "^6.11.0",
31
- "readable-stream": "^4.2.0",
32
31
  "semver": "^7.3.7"
33
32
  },
34
33
  "devDependencies": {