axe 8.1.0 → 8.1.1

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.
package/dist/axe.min.js CHANGED
@@ -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).Axe=t()}}(function(){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?void 0:window);var t=function(t,e){var r="000000000"+t;return r.substr(r.length-e)};function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r,n="object"==("undefined"==typeof window?"undefined":e(window))?window:self,o=Object.keys(n).length,i=t(((navigator.mimeTypes?navigator.mimeTypes.length:0)+navigator.userAgent.length).toString(36)+o.toString(36),4),s=function(){return i},a="undefined"!=typeof window&&(window.crypto||window.msCrypto)||"undefined"!=typeof self&&self.crypto;if(a){var u=Math.pow(2,32)-1;r=function(){return Math.abs(a.getRandomValues(new Uint32Array(1))[0]/u)}}else r=Math.random;var c=r,l={},f=0,p=4,h=36,y=Math.pow(h,p);function d(){return t((c()*y<<0).toString(h),p)}function m(){return f=f<y?f:0,++f-1}function b(){return"c"+(new Date).getTime().toString(h)+t(m().toString(h),p)+s()+(d()+d())}b.slug=function(){var t=(new Date).getTime().toString(36),e=m().toString(36).slice(-4),r=s().slice(0,1)+s().slice(-1),n=d().slice(-2);return t.slice(-2)+e+r+n},b.isCuid=function(t){return"string"==typeof t&&!!t.startsWith("c")},b.isSlug=function(t){if("string"!=typeof t)return!1;var e=t.length;return e>=7&&e<=10},b.fingerprint=s,l=b;var v=function(t){var e=Array.prototype.slice.call(arguments,1);return e.length&&(t=t.toString().replace(/(%?)(%([jds]))/g,function(t,r,n,o){var i=e.shift();switch(o){case"s":i=""+i;break;case"d":i=Number(i);break;case"j":i=JSON.stringify(i)}return r?(e.unshift(i),t):i})),e.length&&(t=t.toString()+" "+e.join(" ")),""+t.toString().replace(/%{2,2}/g,"%")},g=["%s","%d","%i","%f","%j","%o","%O","%%"],_=function(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return t instanceof Error}},w={};(function(t){(function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r=1/0,n=9007199254740991,o="[object Arguments]",i="[object Function]",s="[object GeneratorFunction]",a="[object Symbol]",u=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,l="object"==(void 0===t?"undefined":e(t))&&t&&t.Object===Object&&t,f="object"==("undefined"==typeof self?"undefined":e(self))&&self&&self.Object===Object&&self,p=l||f||Function("return this")();function h(t,e){return!(!t||!t.length)&&function(t,e,r){if(e!=e)return function(t,e,r,n){for(var o=t.length,i=-1;++i<o;)if(e(t[i],i,t))return i;return-1}(t,m);for(var n=-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}(t,e)>-1}function y(t,e){for(var r=-1,n=t?t.length:0,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}function d(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}function m(t){return t!=t}function b(t,e){return t.has(e)}function v(t,e){return function(r){return t(e(r))}}var g,_=Array.prototype,S=Function.prototype,O=Object.prototype,T=p["__core-js_shared__"],j=(g=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",E=S.toString,A=O.hasOwnProperty,k=O.toString,x=RegExp("^"+E.call(A).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),C=p.Symbol,P=v(Object.getPrototypeOf,Object),R=O.propertyIsEnumerable,D=_.splice,N=C?C.isConcatSpreadable:void 0,I=Object.getOwnPropertySymbols,L=Math.max,H=X(p,"Map"),q=X(Object,"create");function M(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function U(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function F(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function z(t){var e=-1,r=t?t.length:0;for(this.__data__=new F;++e<r;)this.add(t[e])}function $(t,e){for(var r,n,o=t.length;o--;)if((r=t[o][0])===(n=e)||r!=r&&n!=n)return o;return-1}function B(t,r){var n,o,i=t.__data__;return("string"==(o=e(n=r))||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?i["string"==typeof r?"string":"hash"]:i.map}function X(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!et(t)||(e=t,j&&j in e))&&(tt(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(r){}return e}(t)?x:u).test(function(t){if(null!=t){try{return E.call(t)}catch(e){}try{return t+""}catch(e){}}return""}(t));var e}(r)?r:void 0}M.prototype.clear=function(){this.__data__=q?q(null):{}},M.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},M.prototype.get=function(t){var e=this.__data__;if(q){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return A.call(e,t)?e[t]:void 0},M.prototype.has=function(t){var e=this.__data__;return q?void 0!==e[t]:A.call(e,t)},M.prototype.set=function(t,e){return this.__data__[t]=q&&void 0===e?"__lodash_hash_undefined__":e,this},U.prototype.clear=function(){this.__data__=[]},U.prototype.delete=function(t){var e=this.__data__,r=$(e,t);return!(r<0||(r==e.length-1?e.pop():D.call(e,r,1),0))},U.prototype.get=function(t){var e=this.__data__,r=$(e,t);return r<0?void 0:e[r][1]},U.prototype.has=function(t){return $(this.__data__,t)>-1},U.prototype.set=function(t,e){var r=this.__data__,n=$(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},F.prototype.clear=function(){this.__data__={hash:new M,map:new(H||U),string:new M}},F.prototype.delete=function(t){return B(this,t).delete(t)},F.prototype.get=function(t){return B(this,t).get(t)},F.prototype.has=function(t){return B(this,t).has(t)},F.prototype.set=function(t,e){return B(this,t).set(t,e),this},z.prototype.add=z.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},z.prototype.has=function(t){return this.__data__.has(t)};var Q=I?v(I,Object):at,W=I?function(t){for(var e=[];t;)d(e,Q(t)),t=P(t);return e}:at;function J(t){return Y(t)||K(t)||!!(N&&t&&t[N])}function G(t,e){return!!(e=null==e?n:e)&&("number"==typeof t||c.test(t))&&t>-1&&t%1==0&&t<e}function V(t){if("string"==typeof t||function(t){return"symbol"==e(t)||rt(t)&&k.call(t)==a}(t))return t;var n=t+"";return"0"==n&&1/t==-r?"-0":n}function K(t){return function(t){return rt(t)&&Z(t)}(t)&&A.call(t,"callee")&&(!R.call(t,"callee")||k.call(t)==o)}var Y=Array.isArray;function Z(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}(t.length)&&!tt(t)}function tt(t){var e=et(t)?k.call(t):"";return e==i||e==s}function et(t){var r=e(t);return!!t&&("object"==r||"function"==r)}function rt(t){return!!t&&"object"==e(t)}function nt(t){return Z(t)?function(t,e){var r=Y(t)||K(t)?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],n=r.length,o=!!n;for(var i in t)!e&&!A.call(t,i)||o&&("length"==i||G(i,n))||r.push(i);return r}(t,!0):function(t){if(!et(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e,r,n=(r=(e=t)&&e.constructor,e===("function"==typeof r&&r.prototype||O)),o=[];for(var i in t)("constructor"!=i||!n&&A.call(t,i))&&o.push(i);return o}(t)}var ot,it,st=(ot=function(t,e){return null==t?{}:(e=y(function t(e,r,n,o,i){var s=-1,a=e.length;for(n||(n=J),i||(i=[]);++s<a;){var u=e[s];r>0&&n(u)?r>1?t(u,r-1,n,o,i):d(i,u):o||(i[i.length]=u)}return i}(e,1),V),function(t,e){return function(t,e,r){for(var n=-1,o=e.length,i={};++n<o;){var s=e[n],a=t[s];r(a,s)&&(i[s]=a)}return i}(t=Object(t),e,function(e,r){return r in t})}(t,function(t,e,r,n){var o=-1,i=h,s=!0,a=t.length,u=[],c=e.length;if(!a)return u;e.length>=200&&(i=b,s=!1,e=new z(e));t:for(;++o<a;){var l=t[o],f=l;if(l=0!==l?l:0,s&&f==f){for(var p=c;p--;)if(e[p]===f)continue t;u.push(l)}else i(e,f,void 0)||u.push(l)}return u}(function(t){return function(t,e,r){var n=nt(t);return Y(t)?n:d(n,r(t))}(t,0,W)}(t),e)))},it=L(void 0===it?ot.length-1:it,0),function(){for(var t=arguments,e=-1,r=L(t.length-it,0),n=Array(r);++e<r;)n[e]=t[it+e];e=-1;for(var o=Array(it+1);++e<it;)o[e]=t[e];return o[it]=n,function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}(ot,this,o)});function at(){return[]}w=st}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var S={},O=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!_(t))throw new Error("`err` must be an Error");if(!Array.isArray(e))throw new Error("`fields` must be an Array");var r={};return Object.getOwnPropertyNames(Object.getPrototypeOf(t)).concat(Object.getOwnPropertyNames(t)).forEach(function(e){"function"!=typeof t[e]&&(r[e]=t[e])}),!r.name&&t.constructor.name&&(r.name=t.constructor.name),Array.isArray(e)&&0!==e.length?r.filter(function(t){return e.includes(t)}):r},T={};function j(t){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}T=k,k.default=k,k.stable=C,k.stableStringify=C;var E=[],A=[];function k(t,e,r){var n;for(function t(e,r,n,o){var i;if("object"==j(e)&&null!==e){for(i=0;i<n.length;i++)if(n[i]===e){var s=Object.getOwnPropertyDescriptor(o,r);return void(void 0!==s.get?s.configurable?(Object.defineProperty(o,r,{value:"[Circular]"}),E.push([o,r,e,s])):A.push([e,r]):(o[r]="[Circular]",E.push([o,r,e])))}if(n.push(e),Array.isArray(e))for(i=0;i<e.length;i++)t(e[i],i,n,e);else{var a=Object.keys(e);for(i=0;i<a.length;i++){var u=a[i];t(e[u],u,n,e)}}n.pop()}}(t,"",[],void 0),n=0===A.length?JSON.stringify(t,e,r):JSON.stringify(t,P(e),r);0!==E.length;){var o=E.pop();4===o.length?Object.defineProperty(o[0],o[1],o[3]):o[0][o[1]]=o[2]}return n}function x(t,e){return t<e?-1:t>e?1:0}function C(t,e,r){var n,o=function t(e,r,n,o){var i;if("object"==j(e)&&null!==e){for(i=0;i<n.length;i++)if(n[i]===e){var s=Object.getOwnPropertyDescriptor(o,r);return void(void 0!==s.get?s.configurable?(Object.defineProperty(o,r,{value:"[Circular]"}),E.push([o,r,e,s])):A.push([e,r]):(o[r]="[Circular]",E.push([o,r,e])))}if("function"==typeof e.toJSON)return;if(n.push(e),Array.isArray(e))for(i=0;i<e.length;i++)t(e[i],i,n,e);else{var a={},u=Object.keys(e).sort(x);for(i=0;i<u.length;i++){var c=u[i];t(e[c],c,n,e),a[c]=e[c]}if(void 0===o)return a;E.push([o,r,e]),o[r]=a}n.pop()}}(t,"",[],void 0)||t;for(n=0===A.length?JSON.stringify(o,e,r):JSON.stringify(o,P(e),r);0!==E.length;){var i=E.pop();4===i.length?Object.defineProperty(i[0],i[1],i[3]):i[0][i[1]]=i[2]}return n}function P(t){return t=void 0!==t?t:function(t,e){return e},function(e,r){if(A.length>0)for(var n=0;n<A.length;n++){var o=A[n];if(o[1]===e&&o[0]===r){r="[Circular]",A.splice(n,1);break}}return t.call(this,e,r)}}var R={exports:{}};function D(t){if(t)return function(t){for(var e in D.prototype)t[e]=D.prototype[e];return t}(t)}R.exports=D,D.prototype.on=D.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},D.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},D.prototype.off=D.prototype.removeListener=D.prototype.removeAllListeners=D.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<n.length;o++)if((r=n[o])===e||r.fn===e){n.splice(o,1);break}return 0===n.length&&delete this._callbacks["$"+t],this},D.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){n=0;for(var o=(r=r.slice(0)).length;n<o;++n)r[n].apply(this,e)}return this},D.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},D.prototype.hasListeners=function(t){return!!this.listeners(t).length},R=R.exports;var N=String.prototype.replace,I=/%20/g,L={default:"RFC3986",formatters:{RFC1738:function(t){return N.call(t,I,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:"RFC3986"};function H(t){return(H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var q=Object.prototype.hasOwnProperty,M=Array.isArray,U=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),F={combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],r=[],n=0;n<e.length;++n)for(var o=e[n],i=o.obj[o.prop],s=Object.keys(i),a=0;a<s.length;++a){var u=s[a],c=i[u];"object"==H(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(M(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);e.obj[e.prop]=n}}}(e),t},decode:function(t,e,r){var n=t.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(o){return n}},encode:function(t,e,r,n,o){if(0===t.length)return t;var i=t;if("symbol"==H(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 u=i.charCodeAt(a);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===L.RFC1738&&(40===u||41===u)?s+=i.charAt(a):u<128?s+=U[u]:u<2048?s+=U[192|u>>6]+U[128|63&u]:u<55296||u>=57344?s+=U[224|u>>12]+U[128|u>>6&63]+U[128|63&u]:(a+=1,u=65536+((1023&u)<<10|1023&i.charCodeAt(a)),s+=U[240|u>>18]+U[128|u>>12&63]+U[128|u>>6&63]+U[128|63&u])}return s},isBuffer:function(t){return!(!t||"object"!=H(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(M(t)){for(var r=[],n=0;n<t.length;n+=1)r.push(e(t[n]));return r}return e(t)},merge:function t(e,r,n){if(!r)return e;if("object"!=H(r)){if(M(e))e.push(r);else{if(!e||"object"!=H(e))return[e,r];(n&&(n.plainObjects||n.allowPrototypes)||!q.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!=H(e))return[e].concat(r);var o=e;return M(e)&&!M(r)&&(o=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},n=0;n<t.length;++n)void 0!==t[n]&&(r[n]=t[n]);return r}(e,n)),M(e)&&M(r)?(r.forEach(function(r,o){if(q.call(e,o)){var i=e[o];i&&"object"==H(i)&&r&&"object"==H(r)?e[o]=t(i,r,n):e.push(r)}else e[o]=r}),e):Object.keys(r).reduce(function(e,o){var i=r[o];return q.call(e,o)?e[o]=t(e[o],i,n):e[o]=i,e},o)}};function z(t){return(z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var $=Object.prototype.hasOwnProperty,B={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},X=Array.isArray,Q=Array.prototype.push,W=function(t,e){Q.apply(t,X(e)?e:[e])},J=Date.prototype.toISOString,G=L.default,V={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:F.encode,encodeValuesOnly:!1,format:G,formatter:L.formatters[G],indices:!1,serializeDate:function(t){return J.call(t)},skipNulls:!1,strictNullHandling:!1},K=function t(e,r,n,o,i,s,a,u,c,l,f,p,h,y){var d,m=e;if("function"==typeof a?m=a(r,m):m instanceof Date?m=l(m):"comma"===n&&X(m)&&(m=F.maybeMap(m,function(t){return t instanceof Date?l(t):t})),null===m){if(o)return s&&!h?s(r,V.encoder,y,"key",f):r;m=""}if("string"==typeof(d=m)||"number"==typeof d||"boolean"==typeof d||"symbol"==z(d)||"bigint"==typeof d||F.isBuffer(m))return s?[p(h?r:s(r,V.encoder,y,"key",f))+"="+p(s(m,V.encoder,y,"value",f))]:[p(r)+"="+p(String(m))];var b,v=[];if(void 0===m)return v;if("comma"===n&&X(m))b=[{value:m.length>0?m.join(",")||null:void 0}];else if(X(a))b=a;else{var g=Object.keys(m);b=u?g.sort(u):g}for(var _=0;_<b.length;++_){var w=b[_],S="object"==z(w)&&void 0!==w.value?w.value:m[w];if(!i||null!==S){var O=X(m)?"function"==typeof n?n(r,w):r:r+(c?"."+w:"["+w+"]");W(v,t(S,O,n,o,i,s,a,u,c,l,f,p,h,y))}}return v},Y=(Object.prototype.hasOwnProperty,Array.isArray,{stringify:function(t,e){var r,n=t,o=function(t){if(!t)return V;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||V.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=L.default;if(void 0!==t.format){if(!$.call(L.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var n=L.formatters[r],o=V.filter;return("function"==typeof t.filter||X(t.filter))&&(o=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:V.addQueryPrefix,allowDots:void 0===t.allowDots?V.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:V.charsetSentinel,delimiter:void 0===t.delimiter?V.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:V.encode,encoder:"function"==typeof t.encoder?t.encoder:V.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:V.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:V.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:V.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:V.strictNullHandling}}(e);"function"==typeof o.filter?n=(0,o.filter)("",n):X(o.filter)&&(r=o.filter);var i,s=[];if("object"!=z(n)||null===n)return"";i=e&&e.arrayFormat in B?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var a=B[i];r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var u=0;u<r.length;++u){var c=r[u];o.skipNulls&&null===n[c]||W(s,K(n[c],c,a,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset))}var l=s.join(o.delimiter),f=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),l.length>0?f+l:""}});function Z(t){return(Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tt(t){return(tt="function"==typeof Symbol&&"symbol"==Z(Symbol.iterator)?function(t){return Z(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":Z(t)})(t)}var et=function(t){return null!==t&&"object"===tt(t)},rt={};function nt(t){return(nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ot(t){return(ot="function"==typeof Symbol&&"symbol"==nt(Symbol.iterator)?function(t){return nt(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":nt(t)})(t)}function it(t){if(t)return function(t){for(var e in it.prototype)Object.prototype.hasOwnProperty.call(it.prototype,e)&&(t[e]=it.prototype[e]);return t}(t)}rt=it,it.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},it.prototype.parse=function(t){return this._parser=t,this},it.prototype.responseType=function(t){return this._responseType=t,this},it.prototype.serialize=function(t){return this._serializer=t,this},it.prototype.timeout=function(t){if(!t||"object"!==ot(t))return this._timeout=t,this._responseTimeout=0,this._uploadTimeout=0,this;for(var e in t)if(Object.prototype.hasOwnProperty.call(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},it.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};var st=new Set(["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"]),at=new Set([408,413,429,500,502,503,504,521,522,524]);it.prototype._shouldRetry=function(t,e){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var r=this._retryCallback(t,e);if(!0===r)return!0;if(!1===r)return!1}catch(n){console.error(n)}if(e&&e.status&&at.has(e.status))return!0;if(t){if(t.code&&st.has(t.code))return!0;if(t.timeout&&"ECONNABORTED"===t.code)return!0;if(t.crossDomain)return!0}return!1},it.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()},it.prototype.then=function(t,e){var r=this;if(!this._fullfilledPromise){var n=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(function(t,e){n.on("abort",function(){if(!(r._maxRetries&&r._maxRetries>r._retries))if(r.timedout&&r.timedoutError)e(r.timedoutError);else{var t=new Error("Aborted");t.code="ABORTED",t.status=r.status,t.method=r.method,t.url=r.url,e(t)}}),n.end(function(r,n){r?e(r):t(n)})})}return this._fullfilledPromise.then(t,e)},it.prototype.catch=function(t){return this.then(void 0,t)},it.prototype.use=function(t){return t(this),this},it.prototype.ok=function(t){if("function"!=typeof t)throw new Error("Callback required");return this._okCallback=t,this},it.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},it.prototype.get=function(t){return this._header[t.toLowerCase()]},it.prototype.getHeader=it.prototype.get,it.prototype.set=function(t,e){if(et(t)){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&this.set(r,t[r]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},it.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},it.prototype.field=function(t,e){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(et(t)){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&this.field(r,t[r]);return this}if(Array.isArray(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.field(t,e[n]);return this}if(null==e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=String(e)),this._getFormData().append(t,e),this},it.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},it.prototype._auth=function(t,e,r,n){switch(r.type){case"basic":this.set("Authorization","Basic ".concat(n("".concat(t,":").concat(e))));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer ".concat(t))}return this},it.prototype.withCredentials=function(t){return void 0===t&&(t=!0),this._withCredentials=t,this},it.prototype.redirects=function(t){return this._maxRedirects=t,this},it.prototype.maxResponseSize=function(t){if("number"!=typeof t)throw new TypeError("Invalid argument");return this._maxResponseSize=t,this},it.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},it.prototype.send=function(t){var e=et(t),r=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(e&&!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(e&&et(this._data))for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(this._data[n]=t[n]);else"string"==typeof t?(r||this.type("form"),(r=this._header["content-type"])&&(r=r.toLowerCase().trim()),this._data="application/x-www-form-urlencoded"===r?this._data?"".concat(this._data,"&").concat(t):t:(this._data||"")+t):this._data=t;return!e||this._isHost(t)?this:(r||this.type("json"),this)},it.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},it.prototype._finalizeQueryString=function(){var t=this._query.join("&");if(t&&(this.url+=(this.url.includes("?")?"&":"?")+t),this._query.length=0,this._sort){var e=this.url.indexOf("?");if(e>=0){var r=this.url.slice(e+1).split("&");"function"==typeof this._sort?r.sort(this._sort):r.sort(),this.url=this.url.slice(0,e)+"?"+r.join("&")}}},it.prototype._appendQueryString=function(){console.warn("Unsupported")},it.prototype._timeoutError=function(t,e,r){if(!this._aborted){var n=new Error("".concat(t+e,"ms exceeded"));n.timeout=e,n.code="ECONNABORTED",n.errno=r,this.timedout=!0,this.timedoutError=n,this.abort(),this.callback(n)}},it.prototype._setTimeouts=function(){var t=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){t._timeoutError("Timeout of ",t._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")},this._responseTimeout))};var ut={};function ct(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return lt(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lt(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,i=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw i}}}}function lt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}ut.type=function(t){return t.split(/ *; */).shift()},ut.params=function(t){var e,r={},n=ct(t.split(/ *; */));try{for(n.s();!(e=n.n()).done;){var o=e.value.split(/ *= */),i=o.shift(),s=o.shift();i&&s&&(r[i]=s)}}catch(a){n.e(a)}finally{n.f()}return r},ut.parseLinks=function(t){var e,r={},n=ct(t.split(/ *, */));try{for(n.s();!(e=n.n()).done;){var o=e.value.split(/ *; */),i=o[0].slice(1,-1);r[o[1].split(/ *= */)[1].slice(1,-1)]=i}}catch(s){n.e(s)}finally{n.f()}return r};var ft={};function pt(t){if(t)return function(t){for(var e in pt.prototype)Object.prototype.hasOwnProperty.call(pt.prototype,e)&&(t[e]=pt.prototype[e]);return t}(t)}ft=pt,pt.prototype.get=function(t){return this.header[t.toLowerCase()]},pt.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=ut.type(e);var r=ut.params(e);for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(this[n]=r[n]);this.links={};try{t.link&&(this.links=ut.parseLinks(t.link))}catch(o){}},pt.prototype._setStatusProperties=function(t){var e=t/100|0;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 ht={};function yt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function dt(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"].forEach(function(t){dt.prototype[t]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this._defaults.push({fn:t,args:r}),this}}),dt.prototype._setDefaults=function(t){this._defaults.forEach(function(e){var r;t[e.fn].apply(t,function(t){if(Array.isArray(t))return yt(t)}(r=e.args)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(r)||function(t,e){if(t){if("string"==typeof t)return yt(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yt(t,void 0):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())})},ht=dt;var mt,bt={};function vt(t){return(vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function gt(t){return(gt="function"==typeof Symbol&&"symbol"==vt(Symbol.iterator)?function(t){return vt(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":vt(t)})(t)}function _t(){}"undefined"!=typeof window?mt=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),mt=void 0):mt=self;var wt=bt=bt=function(t,e){return"function"==typeof e?new bt.Request("GET",t).end(e):1===arguments.length?new bt.Request("GET",t):new bt.Request(t,e)};bt.Request=kt,wt.getXHR=function(){if(mt.XMLHttpRequest&&(!mt.location||"file:"!==mt.location.protocol||!mt.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(r){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(n){}throw new Error("Browser-only version of superagent could not find XHR")};var St="".trim?function(t){return t.trim()}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};function Ot(t){if(!et(t))return t;var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&Tt(e,r,t[r]);return e.join("&")}function Tt(t,e,r){if(void 0!==r)if(null!==r)if(Array.isArray(r))r.forEach(function(r){Tt(t,e,r)});else if(et(r))for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&Tt(t,"".concat(e,"[").concat(n,"]"),r[n]);else t.push(encodeURI(e)+"="+encodeURIComponent(r));else t.push(encodeURI(e))}function jt(t){for(var e,r,n={},o=t.split("&"),i=0,s=o.length;i<s;++i)-1===(r=(e=o[i]).indexOf("="))?n[decodeURIComponent(e)]="":n[decodeURIComponent(e.slice(0,r))]=decodeURIComponent(e.slice(r+1));return n}function Et(t){return/[/+]json($|[^-\w])/i.test(t)}function At(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;var e=this.xhr.status;1223===e&&(e=204),this._setStatusProperties(e),this.headers=function(t){for(var e,r,n,o,i=t.split(/\r?\n/),s={},a=0,u=i.length;a<u;++a)-1!==(e=(r=i[a]).indexOf(":"))&&(n=r.slice(0,e).toLowerCase(),o=St(r.slice(e+1)),s[n]=o);return s}(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 kt(t,e){var r=this;this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",function(){var t,e=null,n=null;try{n=new At(r)}catch(o){return(e=new Error("Parser is unable to parse the response")).parse=!0,e.original=o,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",n);try{r._isResponseOK(n)||(t=new Error(n.statusText||n.text||"Unsuccessful HTTP response"))}catch(o){t=o}t?(t.original=e,t.response=n,t.status=n.status,r.callback(t,n)):r.callback(null,n)})}function xt(t,e,r){var n=wt("DELETE",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n}wt.serializeObject=Ot,wt.parseString=jt,wt.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"},wt.serialize={"application/x-www-form-urlencoded":Y.stringify,"application/json":T},wt.parse={"application/x-www-form-urlencoded":jt,"application/json":JSON.parse},ft(At.prototype),At.prototype._parseBody=function(t){var e=wt.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&Et(this.type)&&(e=wt.parse["application/json"]),e&&t&&(t.length>0||t instanceof Object)?e(t):null)},At.prototype.toError=function(){var t=this.req,e=t.method,r=t.url,n="cannot ".concat(e," ").concat(r," (").concat(this.status,")"),o=new Error(n);return o.status=this.status,o.method=e,o.url=r,o},wt.Response=At,R(kt.prototype),rt(kt.prototype),kt.prototype.type=function(t){return this.set("Content-Type",wt.types[t]||t),this},kt.prototype.accept=function(t){return this.set("Accept",wt.types[t]||t),this},kt.prototype.auth=function(t,e,r){return 1===arguments.length&&(e=""),"object"===gt(e)&&null!==e&&(r=e,e=""),r||(r={type:"function"==typeof btoa?"basic":"auto"}),this._auth(t,e,r,function(t){if("function"==typeof btoa)return btoa(t);throw new Error("Cannot use basic auth, btoa is not a function")})},kt.prototype.query=function(t){return"string"!=typeof t&&(t=Ot(t)),t&&this._query.push(t),this},kt.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},kt.prototype._getFormData=function(){return this._formData||(this._formData=new mt.FormData),this._formData},kt.prototype.callback=function(t,e){if(this._shouldRetry(t,e))return this._retry();var r=this._callback;this.clearTimeout(),t&&(this._maxRetries&&(t.retries=this._retries-1),this.emit("error",t)),r(t,e)},kt.prototype.crossDomainError=function(){var 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)},kt.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},kt.prototype.ca=kt.prototype.agent,kt.prototype.buffer=kt.prototype.ca,kt.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},kt.prototype.pipe=kt.prototype.write,kt.prototype._isHost=function(t){return t&&"object"===gt(t)&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},kt.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||_t,this._finalizeQueryString(),this._end()},kt.prototype._setUploadTimeout=function(){var t=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout(function(){t._timeoutError("Upload timeout of ",t._uploadTimeout,"ETIMEDOUT")},this._uploadTimeout))},kt.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var t=this;this.xhr=wt.getXHR();var e=this.xhr,r=this._formData||this._data;this._setTimeouts(),e.onreadystatechange=function(){var r=e.readyState;if(r>=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4===r){var n;try{n=e.status}catch(o){n=0}if(!n){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")}};var n=function(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",n.bind(null,"download")),e.upload&&e.upload.addEventListener("progress",n.bind(null,"upload"))}catch(a){}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(u){return this.callback(u)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof r&&!this._isHost(r)){var o=this._header["content-type"],i=this._serializer||wt.serialize[o?o.split(";")[0]:""];!i&&Et(o)&&(i=wt.serialize["application/json"]),i&&(r=i(r))}for(var s in this.header)null!==this.header[s]&&Object.prototype.hasOwnProperty.call(this.header,s)&&e.setRequestHeader(s,this.header[s]);this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0===r?null:r)},wt.agent=function(){return new ht},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(t){ht.prototype[t.toLowerCase()]=function(e,r){var n=new wt.Request(t,e);return this._setDefaults(n),r&&n.end(r),n}}),ht.prototype.del=ht.prototype.delete,wt.get=function(t,e,r){var n=wt("GET",t);return"function"==typeof e&&(r=e,e=null),e&&n.query(e),r&&n.end(r),n},wt.head=function(t,e,r){var n=wt("HEAD",t);return"function"==typeof e&&(r=e,e=null),e&&n.query(e),r&&n.end(r),n},wt.options=function(t,e,r){var n=wt("OPTIONS",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},wt.del=xt,wt.delete=xt,wt.patch=function(t,e,r){var n=wt("PATCH",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},wt.post=function(t,e,r){var n=wt("POST",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},wt.put=function(t,e,r){var n=wt("PUT",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n};var Ct={};Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.boolean=void 0,Ct.boolean=function(t){return"string"==typeof t?["true","t","yes","y","on","1"].includes(t.trim().toLowerCase()):"number"==typeof t?1===t:"boolean"==typeof t&&t};var Pt,Rt,Dt,Nt="8.0.0",It=Pt={};function Lt(){throw new Error("setTimeout has not been defined")}function Ht(){throw new Error("clearTimeout has not been defined")}function qt(t){if(Rt===setTimeout)return setTimeout(t,0);if((Rt===Lt||!Rt)&&setTimeout)return Rt=setTimeout,setTimeout(t,0);try{return Rt(t,0)}catch(e){try{return Rt.call(null,t,0)}catch(e){return Rt.call(this,t,0)}}}!function(){try{Rt="function"==typeof setTimeout?setTimeout:Lt}catch(t){Rt=Lt}try{Dt="function"==typeof clearTimeout?clearTimeout:Ht}catch(t){Dt=Ht}}();var Mt,Ut=[],Ft=!1,zt=-1;function $t(){Ft&&Mt&&(Ft=!1,Mt.length?Ut=Mt.concat(Ut):zt=-1,Ut.length&&Bt())}function Bt(){if(!Ft){var t=qt($t);Ft=!0;for(var e=Ut.length;e;){for(Mt=Ut,Ut=[];++zt<e;)Mt&&Mt[zt].run();zt=-1,e=Ut.length}Mt=null,Ft=!1,function(t){if(Dt===clearTimeout)return clearTimeout(t);if((Dt===Ht||!Dt)&&clearTimeout)return Dt=clearTimeout,clearTimeout(t);try{Dt(t)}catch(e){try{return Dt.call(null,t)}catch(e){return Dt.call(this,t)}}}(t)}}function Xt(t,e){this.fun=t,this.array=e}function Qt(){}It.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];Ut.push(new Xt(t,e)),1!==Ut.length||Ft||qt(Bt)},Xt.prototype.run=function(){this.fun.apply(null,this.array)},It.title="browser",It.browser=!0,It.env={},It.argv=[],It.version="",It.versions={},It.on=Qt,It.addListener=Qt,It.once=Qt,It.off=Qt,It.removeListener=Qt,It.removeAllListeners=Qt,It.emit=Qt,It.prependListener=Qt,It.prependOnceListener=Qt,It.listeners=function(t){return[]},It.binding=function(t){throw new Error("process.binding is not supported")},It.cwd=function(){return"/"},It.chdir=function(t){throw new Error("process.chdir is not supported")},It.umask=function(){return 0};var Wt={};return function(t){(function(){"use strict";function e(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||n(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=n(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var o=0,i=function(){};return{s:i,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,u=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,s=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw s}}}}function n(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var a=Ct.boolean,u=new Set(["config","log"]),c=["trace","debug","info","warn","error","fatal"],f={warning:"warn",err:"error"},p="https://api.cabinjs.com",h="`level` invalid, must be: ".concat(c.join(", "));function y(t){return null==t||"object"==s(t)&&0===Object.keys(t).length||"string"==typeof t&&0===t.trim().length}function d(t){return void 0===t}function m(t){return"object"==s(t)&&null!==t&&!Array.isArray(t)}function b(t){return"string"==typeof t}function j(t){return"function"==typeof t}Wt=function(){function n(){var o=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),this.config=Object.assign({key:"",endpoint:p,headers:{},timeout:5e3,retry:3,showStack:!t.env.SHOW_STACK||a(t.env.SHOW_STACK),meta:{show:!t.env.SHOW_META||a(t.env.SHOW_META),showApp:!t.env.SHOW_META_APP||a(t.env.SHOW_META_APP),omittedFields:t.env.OMIT_META_FIELDS?t.env.OMIT_META_FIELDS.split(",").map(function(t){return t.trim()}):[]},silent:!1,logger:console,name:!1,level:"info",levels:["info","warn","error","fatal"],capture:!1,callback:!1,appInfo:!t.env.APP_INFO||a(t.env.APP_INFO)},i),this.config.showMeta&&(this.config.meta.show=this.config.showMeta,delete this.config.showMeta),this.appInfo=!!this.config.appInfo&&!!j(S)&&S(),this.log=this.log.bind(this);var s,l=r(Object.keys(this.config.logger).filter(function(t){return!u.has(t)}));try{for(l.s();!(s=l.n()).done;){var f=s.value;this[f]=this.config.logger[f]}}catch(m){l.e(m)}finally{l.f()}var h,y=r(c);try{var d=function(){var t=h.value;o[t]=function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return o.log.apply(o,e([t].concat([].slice.call(n))))}};for(y.s();!(h=y.n()).done;)d()}catch(m){y.e(m)}finally{y.f()}this.setLevel=this.setLevel.bind(this),this.getNormalizedLevel=this.getNormalizedLevel.bind(this),this.setName=this.setName.bind(this),this.setCallback=this.setCallback.bind(this),this.config.name&&this.setName(this.config.name),this.setLevel(this.config.level),this.err=this.error,this.warning=this.warn}var o,s,E;return o=n,(s=[{key:"setCallback",value:function(t){this.config.callback=t}},{key:"setLevel",value:function(t){if(!b(t)||!c.includes(t))throw new Error(h);b(this.config.logger.logLevel)?this.config.logger.logLevel=t:this.config.logger.level=t,this.config.levels=c.slice(c.indexOf(t))}},{key:"getNormalizedLevel",value:function(t){return b(t)?b(f[t])?f[t]:c.includes(t)?t:"info":"info"}},{key:"setName",value:function(t){if(!b(t))throw new Error("`name` must be a String");b(this.config.logger.scope)?this.config.logger.scope=t:this.config.logger.name=t}},{key:"log",value:function(r,n,o){for(var i=this,s=[],a=arguments.length,u=new Array(a>3?a-3:0),h=3;h<a;h++)u[h-3]=arguments[h];d(r)||s.push(r),d(n)||s.push(n),d(o)||s.push(o),s=s.concat([].slice.call(u));var S=this.config,E=0;b(r)&&b(f[r])?r=f[r]:_(r)?(o=n,n=r,r="error"):b(r)&&c.includes(r)||(o=n,n=r,r=this.getNormalizedLevel(r),E=-1);var A,k=!1;if((m(n)||Array.isArray(n))&&b(o)){k=!0;var x=o;o=n,n=b(x)&&s.length>=3+E?v.apply(void 0,e(s.slice(2+E))):x}d(n)&&(n=r),1!==s.slice(1+E).length||b(n)||_(n)?!k&&s.length>=4+E?(n=v.apply(void 0,e(s.slice(1+E))),o={}):!k&&s.length===3+E&&b(n)&&g.filter(function(t){return n.includes(t)}).length>0?(n=v(n,o),o={}):_(n)||(_(o)?o={err:O(o)}:m(o)||d(o)||null===o?b(n)||(n=v(n)):(n=v(n,o),o={})):(o={message:n},n=r),d(o)||m(o)?m(o)||(o={}):o={meta:o},_(n)?(A=n,m(o.err)||(o.err=O(A)),n=n.message):_(o.err)&&(A=o.err);var C=j(S.callback)&&(!("boolean"==typeof o.callback)||o.callback);(o=w(o,["callback"])).level=r,this.appInfo&&(o.app=this.appInfo);var P=T({message:n,meta:o});if(S.capture&&S.levels.includes(r)&&(!_(A)||!A._captureFailed)){if(S.endpoint===p&&!S.key)throw new Error("Cabin API key required (e.g. `{ key: 'YOUR-CABIN-API-KEY' })`)\n<https://cabinjs.com>");var R=bt.post(S.endpoint).set("X-Request-Id",l()).timeout(S.timeout);t.browser||R.set("User-Agent","axe/".concat(Nt)),S.key&&R.auth(S.key),y(S.headers)||R.set(S.headers),R.type("application/json").send(P).retry(S.retry).end(function(t){t&&(t._captureFailed=!0,i.config.logger.error(t))})}if(C&&S.callback(r,n,o),S.silent)return P;if(!S.levels.includes(r))return P;var D=r;-1===E?D="log":"fatal"===r&&(D="error");var N=["level","err"].concat(this.config.meta.omittedFields);this.config.meta.showApp||N.push("app");var I=w(o,N);return"error"===D&&_(A)&&S.showStack?!S.meta.show||y(I)?this.config.logger.error(A):this.config.logger.error(A,I):!S.meta.show||y(I)?this.config.logger[D](n):this.config.logger[D](n,I),P}}])&&i(o.prototype,s),E&&i(o,E),n}()}).call(this)}.call(this,Pt),Wt});
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).Axe=t()}}(function(){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],a="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=a.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?void 0:window);var t=function(t,e){var r="000000000"+t;return r.substr(r.length-e)};function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r,n="object"==("undefined"==typeof window?"undefined":e(window))?window:self,o=Object.keys(n).length,i=t(((navigator.mimeTypes?navigator.mimeTypes.length:0)+navigator.userAgent.length).toString(36)+o.toString(36),4),a=function(){return i},u="undefined"!=typeof window&&(window.crypto||window.msCrypto)||"undefined"!=typeof self&&self.crypto;if(u){var s=Math.pow(2,32)-1;r=function(){return Math.abs(u.getRandomValues(new Uint32Array(1))[0]/s)}}else r=Math.random;var c=r,l={},f=0,p=4,y=36,h=Math.pow(y,p);function d(){return t((c()*h<<0).toString(y),p)}function m(){return f=f<h?f:0,++f-1}function b(){return"c"+(new Date).getTime().toString(y)+t(m().toString(y),p)+a()+(d()+d())}b.slug=function(){var t=(new Date).getTime().toString(36),e=m().toString(36).slice(-4),r=a().slice(0,1)+a().slice(-1),n=d().slice(-2);return t.slice(-2)+e+r+n},b.isCuid=function(t){return"string"==typeof t&&!!t.startsWith("c")},b.isSlug=function(t){if("string"!=typeof t)return!1;var e=t.length;return e>=7&&e<=10},b.fingerprint=a,l=b;var v=function(t){var e=Array.prototype.slice.call(arguments,1);return e.length&&(t=t.toString().replace(/(%?)(%([jds]))/g,function(t,r,n,o){var i=e.shift();switch(o){case"s":i=""+i;break;case"d":i=Number(i);break;case"j":i=JSON.stringify(i)}return r?(e.unshift(i),t):i})),e.length&&(t=t.toString()+" "+e.join(" ")),""+t.toString().replace(/%{2,2}/g,"%")},g=["%s","%d","%i","%f","%j","%o","%O","%%"],S=function(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return t instanceof Error}},w={};(function(t){(function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var r=1/0,n=9007199254740991,o="[object Arguments]",i="[object Function]",a="[object GeneratorFunction]",u="[object Symbol]",s=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,l="object"==(void 0===t?"undefined":e(t))&&t&&t.Object===Object&&t,f="object"==("undefined"==typeof self?"undefined":e(self))&&self&&self.Object===Object&&self,p=l||f||Function("return this")();function y(t,e){return!(!t||!t.length)&&function(t,e,r){if(e!=e)return function(t,e,r,n){for(var o=t.length,i=-1;++i<o;)if(e(t[i],i,t))return i;return-1}(t,m);for(var n=-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}(t,e)>-1}function h(t,e){for(var r=-1,n=t?t.length:0,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}function d(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}function m(t){return t!=t}function b(t,e){return t.has(e)}function v(t,e){return function(r){return t(e(r))}}var g,S=Array.prototype,_=Function.prototype,A=Object.prototype,O=p["__core-js_shared__"],j=(g=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",E=_.toString,T=A.hasOwnProperty,P=A.toString,k=RegExp("^"+E.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),x=p.Symbol,R=v(Object.getPrototypeOf,Object),I=A.propertyIsEnumerable,C=S.splice,N=x?x.isConcatSpreadable:void 0,M=Object.getOwnPropertySymbols,F=Math.max,D=$(p,"Map"),L=$(Object,"create");function U(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function q(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function H(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function W(t){var e=-1,r=t?t.length:0;for(this.__data__=new H;++e<r;)this.add(t[e])}function B(t,e){for(var r,n,o=t.length;o--;)if((r=t[o][0])===(n=e)||r!=r&&n!=n)return o;return-1}function z(t,r){var n,o,i=t.__data__;return("string"==(o=e(n=r))||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?i["string"==typeof r?"string":"hash"]:i.map}function $(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!et(t)||(e=t,j&&j in e))&&(tt(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(r){}return e}(t)?k:s).test(function(t){if(null!=t){try{return E.call(t)}catch(e){}try{return t+""}catch(e){}}return""}(t));var e}(r)?r:void 0}U.prototype.clear=function(){this.__data__=L?L(null):{}},U.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},U.prototype.get=function(t){var e=this.__data__;if(L){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return T.call(e,t)?e[t]:void 0},U.prototype.has=function(t){var e=this.__data__;return L?void 0!==e[t]:T.call(e,t)},U.prototype.set=function(t,e){return this.__data__[t]=L&&void 0===e?"__lodash_hash_undefined__":e,this},q.prototype.clear=function(){this.__data__=[]},q.prototype.delete=function(t){var e=this.__data__,r=B(e,t);return!(r<0||(r==e.length-1?e.pop():C.call(e,r,1),0))},q.prototype.get=function(t){var e=this.__data__,r=B(e,t);return r<0?void 0:e[r][1]},q.prototype.has=function(t){return B(this.__data__,t)>-1},q.prototype.set=function(t,e){var r=this.__data__,n=B(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},H.prototype.clear=function(){this.__data__={hash:new U,map:new(D||q),string:new U}},H.prototype.delete=function(t){return z(this,t).delete(t)},H.prototype.get=function(t){return z(this,t).get(t)},H.prototype.has=function(t){return z(this,t).has(t)},H.prototype.set=function(t,e){return z(this,t).set(t,e),this},W.prototype.add=W.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},W.prototype.has=function(t){return this.__data__.has(t)};var G=M?v(M,Object):ut,J=M?function(t){for(var e=[];t;)d(e,G(t)),t=R(t);return e}:ut;function X(t){return Y(t)||K(t)||!!(N&&t&&t[N])}function V(t,e){return!!(e=null==e?n:e)&&("number"==typeof t||c.test(t))&&t>-1&&t%1==0&&t<e}function Q(t){if("string"==typeof t||function(t){return"symbol"==e(t)||rt(t)&&P.call(t)==u}(t))return t;var n=t+"";return"0"==n&&1/t==-r?"-0":n}function K(t){return function(t){return rt(t)&&Z(t)}(t)&&T.call(t,"callee")&&(!I.call(t,"callee")||P.call(t)==o)}var Y=Array.isArray;function Z(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}(t.length)&&!tt(t)}function tt(t){var e=et(t)?P.call(t):"";return e==i||e==a}function et(t){var r=e(t);return!!t&&("object"==r||"function"==r)}function rt(t){return!!t&&"object"==e(t)}function nt(t){return Z(t)?function(t,e){var r=Y(t)||K(t)?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],n=r.length,o=!!n;for(var i in t)!e&&!T.call(t,i)||o&&("length"==i||V(i,n))||r.push(i);return r}(t,!0):function(t){if(!et(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e,r,n=(r=(e=t)&&e.constructor,e===("function"==typeof r&&r.prototype||A)),o=[];for(var i in t)("constructor"!=i||!n&&T.call(t,i))&&o.push(i);return o}(t)}var ot,it,at=(ot=function(t,e){return null==t?{}:(e=h(function t(e,r,n,o,i){var a=-1,u=e.length;for(n||(n=X),i||(i=[]);++a<u;){var s=e[a];r>0&&n(s)?r>1?t(s,r-1,n,o,i):d(i,s):o||(i[i.length]=s)}return i}(e,1),Q),function(t,e){return function(t,e,r){for(var n=-1,o=e.length,i={};++n<o;){var a=e[n],u=t[a];r(u,a)&&(i[a]=u)}return i}(t=Object(t),e,function(e,r){return r in t})}(t,function(t,e,r,n){var o=-1,i=y,a=!0,u=t.length,s=[],c=e.length;if(!u)return s;e.length>=200&&(i=b,a=!1,e=new W(e));t:for(;++o<u;){var l=t[o],f=l;if(l=0!==l?l:0,a&&f==f){for(var p=c;p--;)if(e[p]===f)continue t;s.push(l)}else i(e,f,void 0)||s.push(l)}return s}(function(t){return function(t,e,r){var n=nt(t);return Y(t)?n:d(n,r(t))}(t,0,J)}(t),e)))},it=F(void 0===it?ot.length-1:it,0),function(){for(var t=arguments,e=-1,r=F(t.length-it,0),n=Array(r);++e<r;)n[e]=t[it+e];e=-1;for(var o=Array(it+1);++e<it;)o[e]=t[e];return o[it]=n,function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}(ot,this,o)});function ut(){return[]}w=at}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var _={},A=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!S(t))throw new Error("`err` must be an Error");if(!Array.isArray(e))throw new Error("`fields` must be an Array");var r={};return Object.getOwnPropertyNames(Object.getPrototypeOf(t)).concat(Object.getOwnPropertyNames(t)).forEach(function(e){"function"!=typeof t[e]&&(r[e]=t[e])}),!r.name&&t.constructor.name&&(r.name=t.constructor.name),Array.isArray(e)&&0!==e.length?r.filter(function(t){return e.includes(t)}):r},O={};function j(t){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}O=R,R.default=R,R.stable=N,R.stableStringify=N;var E="[...]",T="[Circular]",P=[],k=[];function x(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function R(t,e,r,n){var o;void 0===n&&(n=x()),function t(e,r,n,o,i,a,u){var s;if(a+=1,"object"==j(e)&&null!==e){for(s=0;s<o.length;s++)if(o[s]===e)return void I(T,e,r,i);if(void 0!==u.depthLimit&&a>u.depthLimit)return void I(E,e,r,i);if(void 0!==u.edgesLimit&&n+1>u.edgesLimit)return void I(E,e,r,i);if(o.push(e),Array.isArray(e))for(s=0;s<e.length;s++)t(e[s],s,s,o,e,a,u);else{var c=Object.keys(e);for(s=0;s<c.length;s++){var l=c[s];t(e[l],l,s,o,e,a,u)}}o.pop()}}(t,"",0,[],void 0,0,n);try{o=0===k.length?JSON.stringify(t,e,r):JSON.stringify(t,M(e),r)}catch(a){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==P.length;){var i=P.pop();4===i.length?Object.defineProperty(i[0],i[1],i[3]):i[0][i[1]]=i[2]}}return o}function I(t,e,r,n){var o=Object.getOwnPropertyDescriptor(n,r);void 0!==o.get?o.configurable?(Object.defineProperty(n,r,{value:t}),P.push([n,r,e,o])):k.push([e,r,t]):(n[r]=t,P.push([n,r,e]))}function C(t,e){return t<e?-1:t>e?1:0}function N(t,e,r,n){void 0===n&&(n=x());var o,i=function t(e,r,n,o,i,a,u){var s;if(a+=1,"object"==j(e)&&null!==e){for(s=0;s<o.length;s++)if(o[s]===e)return void I(T,e,r,i);try{if("function"==typeof e.toJSON)return}catch(p){return}if(void 0!==u.depthLimit&&a>u.depthLimit)return void I(E,e,r,i);if(void 0!==u.edgesLimit&&n+1>u.edgesLimit)return void I(E,e,r,i);if(o.push(e),Array.isArray(e))for(s=0;s<e.length;s++)t(e[s],s,s,o,e,a,u);else{var c={},l=Object.keys(e).sort(C);for(s=0;s<l.length;s++){var f=l[s];t(e[f],f,s,o,e,a,u),c[f]=e[f]}if(void 0===i)return c;P.push([i,r,e]),i[r]=c}o.pop()}}(t,"",0,[],void 0,0,n)||t;try{o=0===k.length?JSON.stringify(i,e,r):JSON.stringify(i,M(e),r)}catch(u){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==P.length;){var a=P.pop();4===a.length?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}}return o}function M(t){return t=void 0!==t?t:function(t,e){return e},function(e,r){if(k.length>0)for(var n=0;n<k.length;n++){var o=k[n];if(o[1]===e&&o[0]===r){r=o[2],k.splice(n,1);break}}return t.call(this,e,r)}}var F={exports:{}};function D(t){if(t)return function(t){for(var e in D.prototype)t[e]=D.prototype[e];return t}(t)}function L(t){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}F.exports=D,D.prototype.on=D.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},D.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},D.prototype.off=D.prototype.removeListener=D.prototype.removeAllListeners=D.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<n.length;o++)if((r=n[o])===e||r.fn===e){n.splice(o,1);break}return 0===n.length&&delete this._callbacks["$"+t],this},D.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){n=0;for(var o=(r=r.slice(0)).length;n<o;++n)r[n].apply(this,e)}return this},D.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},D.prototype.hasListeners=function(t){return!!this.listeners(t).length},F=F.exports;function U(t){return(U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var q="undefined"!=typeof Symbol&&Symbol,H=Array.prototype.slice,W=Object.prototype.toString,B=Function.prototype.bind||function(t){var e=this;if("function"!=typeof e||"[object Function]"!==W.call(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var r,n=H.call(arguments,1),o=Math.max(0,e.length-n.length),i=[],a=0;a<o;a++)i.push("$"+a);if(r=Function("binder","return function ("+i.join(",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof r){var o=e.apply(this,n.concat(H.call(arguments)));return Object(o)===o?o:this}return e.apply(t,n.concat(H.call(arguments)))}),e.prototype){var u=function(){};u.prototype=e.prototype,r.prototype=new u,u.prototype=null}return r},z=B.call(Function.call,Object.prototype.hasOwnProperty);function $(t){return($="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var G=SyntaxError,J=Function,X=TypeError,V=function(t){try{return J('"use strict"; return ('+t+").constructor;")()}catch(e){}},Q=Object.getOwnPropertyDescriptor;if(Q)try{Q({},"")}catch(Xr){Q=null}var K,Y=function(){throw new X},Z=Q?function(){try{return arguments.callee,Y}catch(t){try{return Q(arguments,"callee").get}catch(e){return Y}}}():Y,tt="function"==typeof q&&"function"==typeof Symbol&&"symbol"==U(q("foo"))&&"symbol"==U(Symbol("bar"))&&function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==L(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 n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}(),et=Object.getPrototypeOf||function(t){return t.__proto__},rt={},nt="undefined"==typeof Uint8Array?void 0:et(Uint8Array),ot={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":tt?et([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":rt,"%AsyncGenerator%":rt,"%AsyncGeneratorFunction%":rt,"%AsyncIteratorPrototype%":rt,"%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%":J,"%GeneratorFunction%":rt,"%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%":tt?et(et([][Symbol.iterator]())):void 0,"%JSON%":"object"==("undefined"==typeof JSON?"undefined":$(JSON))?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&tt?et((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&&tt?et((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":tt?et(""[Symbol.iterator]()):void 0,"%Symbol%":tt?Symbol:void 0,"%SyntaxError%":G,"%ThrowTypeError%":Z,"%TypedArray%":nt,"%TypeError%":X,"%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},it={"%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"]},at=B.call(Function.call,Array.prototype.concat),ut=B.call(Function.apply,Array.prototype.splice),st=B.call(Function.call,String.prototype.replace),ct=B.call(Function.call,String.prototype.slice),lt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ft=/\\(\\)?/g,pt=function(t,e){if("string"!=typeof t||0===t.length)throw new X("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new X('"allowMissing" argument must be a boolean');var r=function(t){var e=ct(t,0,1),r=ct(t,-1);if("%"===e&&"%"!==r)throw new G("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new G("invalid intrinsic syntax, expected opening `%`");var n=[];return st(t,lt,function(t,e,r,o){n[n.length]=r?st(o,ft,"$1"):e||t}),n}(t),n=r.length>0?r[0]:"",o=function(t,e){var r,n=t;if(z(it,n)&&(n="%"+(r=it[n])[0]+"%"),z(ot,n)){var o=ot[n];if(o===rt&&(o=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 n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&(r=et(o.prototype))}return ot[e]=r,r}(n)),void 0===o&&!e)throw new X("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new G("intrinsic "+t+" does not exist!")}("%"+n+"%",e),i=o.name,a=o.value,u=!1,s=o.alias;s&&(n=s[0],ut(r,at([0,1],s)));for(var c=1,l=!0;c<r.length;c+=1){var f=r[c],p=ct(f,0,1),y=ct(f,-1);if(('"'===p||"'"===p||"`"===p||'"'===y||"'"===y||"`"===y)&&p!==y)throw new G("property names with quotes must have matching quotes");if("constructor"!==f&&l||(u=!0),z(ot,i="%"+(n+="."+f)+"%"))a=ot[i];else if(null!=a){if(!(f in a)){if(!e)throw new X("base intrinsic for "+t+" exists, but the property is not available.");return}if(Q&&c+1>=r.length){var h=Q(a,f);a=(l=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:a[f]}else l=z(a,f),a=a[f];l&&!u&&(ot[i]=a)}}return a},yt=pt("%Function.prototype.apply%"),ht=pt("%Function.prototype.call%"),dt=pt("%Reflect.apply%",!0)||B.call(ht,yt),mt=pt("%Object.getOwnPropertyDescriptor%",!0),bt=pt("%Object.defineProperty%",!0),vt=pt("%Math.max%");if(bt)try{bt({},"a",{value:1})}catch(Xr){bt=null}K=function(t){var e=dt(B,ht,arguments);return mt&&bt&&mt(e,"length").configurable&&bt(e,"length",{value:1+vt(0,t.length-(arguments.length-1))}),e};var gt=function(){return dt(B,yt,arguments)};bt?bt(K,"apply",{value:gt}):K.apply=gt;var St=K(pt("String.prototype.indexOf")),wt=function(t,e){var r=pt(t,!!e);return"function"==typeof r&&St(t,".prototype.")>-1?K(r):r};function _t(t){return(_t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var At="function"==typeof Map&&Map.prototype,Ot=Object.getOwnPropertyDescriptor&&At?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,jt=At&&Ot&&"function"==typeof Ot.get?Ot.get:null,Et=At&&Map.prototype.forEach,Tt="function"==typeof Set&&Set.prototype,Pt=Object.getOwnPropertyDescriptor&&Tt?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,kt=Tt&&Pt&&"function"==typeof Pt.get?Pt.get:null,xt=Tt&&Set.prototype.forEach,Rt="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,It="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,Ct="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,Nt=Boolean.prototype.valueOf,Mt=Object.prototype.toString,Ft=Function.prototype.toString,Dt=String.prototype.match,Lt=String.prototype.slice,Ut=String.prototype.replace,qt=String.prototype.toUpperCase,Ht=String.prototype.toLowerCase,Wt=RegExp.prototype.test,Bt=Array.prototype.concat,zt=Array.prototype.join,$t=Array.prototype.slice,Gt=Math.floor,Jt="function"==typeof BigInt?BigInt.prototype.valueOf:null,Xt=Object.getOwnPropertySymbols,Vt="function"==typeof Symbol&&"symbol"==_t(Symbol.iterator)?Symbol.prototype.toString:null,Qt="function"==typeof Symbol&&"object"==_t(Symbol.iterator),Kt="function"==typeof Symbol&&Symbol.toStringTag&&(_t(Symbol.toStringTag),1)?Symbol.toStringTag:null,Yt=Object.prototype.propertyIsEnumerable,Zt=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function te(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||Wt.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-Gt(-t):Gt(t);if(n!==t){var o=String(n),i=Lt.call(e,o.length+1);return Ut.call(o,r,"$&_")+"."+Ut.call(Ut.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ut.call(e,r,"$&_")}var ee=_.custom,re=ee&&ae(ee)?ee:null;function ne(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function oe(t){return Ut.call(String(t),/"/g,"&quot;")}function ie(t){return!("[object Array]"!==ce(t)||Kt&&"object"==_t(t)&&Kt in t)}function ae(t){if(Qt)return t&&"object"==_t(t)&&t instanceof Symbol;if("symbol"==_t(t))return!0;if(!t||"object"!=_t(t)||!Vt)return!1;try{return Vt.call(t),!0}catch(Xr){}return!1}var ue=Object.prototype.hasOwnProperty||function(t){return t in this};function se(t,e){return ue.call(t,e)}function ce(t){return Mt.call(t)}function le(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function fe(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":"")+qt.call(e.toString(16))}function pe(t){return"Object("+t+")"}function ye(t){return t+" { ? }"}function he(t,e,r,n){return t+" ("+e+") {"+(n?de(r,n):zt.call(r,", "))+"}"}function de(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+zt.call(t,","+r)+"\n"+e.prev}function me(t,e){var r=ie(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=se(t,o)?e(t[o],t):""}var i,a="function"==typeof Xt?Xt(t):[];if(Qt){i={};for(var u=0;u<a.length;u++)i["$"+a[u]]=a[u]}for(var s in t)se(t,s)&&(r&&String(Number(s))===s&&s<t.length||Qt&&i["$"+s]instanceof Symbol||(Wt.call(/[^\w$]/,s)?n.push(e(s,t)+": "+e(t[s],t)):n.push(s+": "+e(t[s],t))));if("function"==typeof Xt)for(var c=0;c<a.length;c++)Yt.call(t,a[c])&&n.push("["+e(a[c])+"]: "+e(t[a[c]],t));return n}function be(t){return(be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var ve=pt("%TypeError%"),ge=pt("%WeakMap%",!0),Se=pt("%Map%",!0),we=wt("WeakMap.prototype.get",!0),_e=wt("WeakMap.prototype.set",!0),Ae=wt("WeakMap.prototype.has",!0),Oe=wt("Map.prototype.get",!0),je=wt("Map.prototype.set",!0),Ee=wt("Map.prototype.has",!0),Te=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r},Pe=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new ve("Side channel does not contain "+function t(e,r,n,o){var i=r||{};if(se(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(se(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=!se(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(se(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(se(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=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 n=e.length-r.maxStringLength,o="... "+n+" more character"+(n>1?"s":"");return t(Lt.call(e,0,r.maxStringLength),r)+o}return ne(Ut.call(Ut.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,fe),"single",r)}(e,i);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var s=String(e);return u?te(e,s):s}if("bigint"==typeof e){var c=String(e)+"n";return u?te(e,c):c}var l=void 0===i.depth?5:i.depth;if(void 0===n&&(n=0),n>=l&&l>0&&"object"==_t(e))return ie(e)?"[Array]":"[Object]";var f,p=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=zt.call(Array(t.indent+1)," ")}return{base:r,prev:zt.call(Array(e+1),r)}}(i,n);if(void 0===o)o=[];else if(le(o,e)>=0)return"[Circular]";function y(e,r,a){if(r&&(o=$t.call(o)).push(r),a){var u={depth:i.depth};return se(i,"quoteStyle")&&(u.quoteStyle=i.quoteStyle),t(e,u,n+1,o)}return t(e,i,n+1,o)}if("function"==typeof e){var h=function(t){if(t.name)return t.name;var e=Dt.call(Ft.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),d=me(e,y);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(d.length>0?" { "+zt.call(d,", ")+" }":"")}if(ae(e)){var m=Qt?Ut.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Vt.call(e);return"object"!=_t(e)||Qt?m:pe(m)}if((f=e)&&"object"==_t(f)&&("undefined"!=typeof HTMLElement&&f instanceof HTMLElement||"string"==typeof f.nodeName&&"function"==typeof f.getAttribute)){for(var b="<"+Ht.call(String(e.nodeName)),v=e.attributes||[],g=0;g<v.length;g++)b+=" "+v[g].name+"="+ne(oe(v[g].value),"double",i);return b+=">",e.childNodes&&e.childNodes.length&&(b+="..."),b+"</"+Ht.call(String(e.nodeName))+">"}if(ie(e)){if(0===e.length)return"[]";var S=me(e,y);return p&&!function(t){for(var e=0;e<t.length;e++)if(le(t[e],"\n")>=0)return!1;return!0}(S)?"["+de(S,p)+"]":"[ "+zt.call(S,", ")+" ]"}if(function(t){return!("[object Error]"!==ce(t)||Kt&&"object"==_t(t)&&Kt in t)}(e)){var w=me(e,y);return"cause"in e&&!Yt.call(e,"cause")?"{ ["+String(e)+"] "+zt.call(Bt.call("[cause]: "+y(e.cause),w),", ")+" }":0===w.length?"["+String(e)+"]":"{ ["+String(e)+"] "+zt.call(w,", ")+" }"}if("object"==_t(e)&&a){if(re&&"function"==typeof e[re])return e[re]();if("symbol"!==a&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!jt||!t||"object"!=_t(t))return!1;try{jt.call(t);try{kt.call(t)}catch(b){return!0}return t instanceof Map}catch(Xr){}return!1}(e)){var _=[];return Et.call(e,function(t,r){_.push(y(r,e,!0)+" => "+y(t,e))}),he("Map",jt.call(e),_,p)}if(function(t){if(!kt||!t||"object"!=_t(t))return!1;try{kt.call(t);try{jt.call(t)}catch(e){return!0}return t instanceof Set}catch(Xr){}return!1}(e)){var A=[];return xt.call(e,function(t){A.push(y(t,e))}),he("Set",kt.call(e),A,p)}if(function(t){if(!Rt||!t||"object"!=_t(t))return!1;try{Rt.call(t,Rt);try{It.call(t,It)}catch(b){return!0}return t instanceof WeakMap}catch(Xr){}return!1}(e))return ye("WeakMap");if(function(t){if(!It||!t||"object"!=_t(t))return!1;try{It.call(t,It);try{Rt.call(t,Rt)}catch(b){return!0}return t instanceof WeakSet}catch(Xr){}return!1}(e))return ye("WeakSet");if(function(t){if(!Ct||!t||"object"!=_t(t))return!1;try{return Ct.call(t),!0}catch(Xr){}return!1}(e))return ye("WeakRef");if(function(t){return!("[object Number]"!==ce(t)||Kt&&"object"==_t(t)&&Kt in t)}(e))return pe(y(Number(e)));if(function(t){if(!t||"object"!=_t(t)||!Jt)return!1;try{return Jt.call(t),!0}catch(Xr){}return!1}(e))return pe(y(Jt.call(e)));if(function(t){return!("[object Boolean]"!==ce(t)||Kt&&"object"==_t(t)&&Kt in t)}(e))return pe(Nt.call(e));if(function(t){return!("[object String]"!==ce(t)||Kt&&"object"==_t(t)&&Kt in t)}(e))return pe(y(String(e)));if(!function(t){return!("[object Date]"!==ce(t)||Kt&&"object"==_t(t)&&Kt in t)}(e)&&!function(t){return!("[object RegExp]"!==ce(t)||Kt&&"object"==_t(t)&&Kt in t)}(e)){var O=me(e,y),j=Zt?Zt(e)===Object.prototype:e instanceof Object||e.constructor===Object,E=e instanceof Object?"":"null prototype",T=!j&&Kt&&Object(e)===e&&Kt in e?Lt.call(ce(e),8,-1):E?"Object":"",P=(j||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(T||E?"["+zt.call(Bt.call([],T||[],E||[]),": ")+"] ":"");return 0===O.length?P+"{}":p?P+"{"+de(O,p)+"}":P+"{ "+zt.call(O,", ")+" }"}return String(e)}(t))},get:function(n){if(ge&&n&&("object"==be(n)||"function"==typeof n)){if(t)return we(t,n)}else if(Se){if(e)return Oe(e,n)}else if(r)return function(t,e){var n=Te(r,e);return n&&n.value}(0,n)},has:function(n){if(ge&&n&&("object"==be(n)||"function"==typeof n)){if(t)return Ae(t,n)}else if(Se){if(e)return Ee(e,n)}else if(r)return function(t,e){return!!Te(r,e)}(0,n);return!1},set:function(n,o){ge&&n&&("object"==be(n)||"function"==typeof n)?(t||(t=new ge),_e(t,n,o)):Se?(e||(e=new Se),je(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=Te(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n},ke=String.prototype.replace,xe=/%20/g,Re={default:"RFC3986",formatters:{RFC1738:function(t){return ke.call(t,xe,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:"RFC3986"};function Ie(t){return(Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Ce=Object.prototype.hasOwnProperty,Ne=Array.isArray,Me=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),Fe={combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],r=[],n=0;n<e.length;++n)for(var o=e[n],i=o.obj[o.prop],a=Object.keys(i),u=0;u<a.length;++u){var s=a[u],c=i[s];"object"==Ie(c)&&null!==c&&-1===r.indexOf(c)&&(e.push({obj:i,prop:s}),r.push(c))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(Ne(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);e.obj[e.prop]=n}}}(e),t},decode:function(t,e,r){var n=t.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(Xr){return n}},encode:function(t,e,r,n,o){if(0===t.length)return t;var i=t;if("symbol"==Ie(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="",u=0;u<i.length;++u){var s=i.charCodeAt(u);45===s||46===s||95===s||126===s||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||o===Re.RFC1738&&(40===s||41===s)?a+=i.charAt(u):s<128?a+=Me[s]:s<2048?a+=Me[192|s>>6]+Me[128|63&s]:s<55296||s>=57344?a+=Me[224|s>>12]+Me[128|s>>6&63]+Me[128|63&s]:(u+=1,s=65536+((1023&s)<<10|1023&i.charCodeAt(u)),a+=Me[240|s>>18]+Me[128|s>>12&63]+Me[128|s>>6&63]+Me[128|63&s])}return a},isBuffer:function(t){return!(!t||"object"!=Ie(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(Ne(t)){for(var r=[],n=0;n<t.length;n+=1)r.push(e(t[n]));return r}return e(t)},merge:function t(e,r,n){if(!r)return e;if("object"!=Ie(r)){if(Ne(e))e.push(r);else{if(!e||"object"!=Ie(e))return[e,r];(n&&(n.plainObjects||n.allowPrototypes)||!Ce.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!=Ie(e))return[e].concat(r);var o=e;return Ne(e)&&!Ne(r)&&(o=function(t,e){for(var r=e&&e.plainObjects?Object.create(null):{},n=0;n<t.length;++n)void 0!==t[n]&&(r[n]=t[n]);return r}(e,n)),Ne(e)&&Ne(r)?(r.forEach(function(r,o){if(Ce.call(e,o)){var i=e[o];i&&"object"==Ie(i)&&r&&"object"==Ie(r)?e[o]=t(i,r,n):e.push(r)}else e[o]=r}),e):Object.keys(r).reduce(function(e,o){var i=r[o];return Ce.call(e,o)?e[o]=t(e[o],i,n):e[o]=i,e},o)}};function De(t){return(De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Le=Object.prototype.hasOwnProperty,Ue={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},qe=Array.isArray,He=String.prototype.split,We=Array.prototype.push,Be=function(t,e){We.apply(t,qe(e)?e:[e])},ze=Date.prototype.toISOString,$e=Re.default,Ge={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Fe.encode,encodeValuesOnly:!1,format:$e,formatter:Re.formatters[$e],indices:!1,serializeDate:function(t){return ze.call(t)},skipNulls:!1,strictNullHandling:!1},Je={},Xe=function t(e,r,n,o,i,a,u,s,c,l,f,p,y,h,d){for(var m,b=e,v=d,g=0,S=!1;void 0!==(v=v.get(Je))&&!S;){var w=v.get(e);if(g+=1,void 0!==w){if(w===g)throw new RangeError("Cyclic object value");S=!0}void 0===v.get(Je)&&(g=0)}if("function"==typeof u?b=u(r,b):b instanceof Date?b=l(b):"comma"===n&&qe(b)&&(b=Fe.maybeMap(b,function(t){return t instanceof Date?l(t):t})),null===b){if(o)return a&&!y?a(r,Ge.encoder,h,"key",f):r;b=""}if("string"==typeof(m=b)||"number"==typeof m||"boolean"==typeof m||"symbol"==De(m)||"bigint"==typeof m||Fe.isBuffer(b)){if(a){var _=y?r:a(r,Ge.encoder,h,"key",f);if("comma"===n&&y){for(var A=He.call(String(b),","),O="",j=0;j<A.length;++j)O+=(0===j?"":",")+p(a(A[j],Ge.encoder,h,"value",f));return[p(_)+"="+O]}return[p(_)+"="+p(a(b,Ge.encoder,h,"value",f))]}return[p(r)+"="+p(String(b))]}var E,T=[];if(void 0===b)return T;if("comma"===n&&qe(b))E=[{value:b.length>0?b.join(",")||null:void 0}];else if(qe(u))E=u;else{var P=Object.keys(b);E=s?P.sort(s):P}for(var k=0;k<E.length;++k){var x=E[k],R="object"==De(x)&&void 0!==x.value?x.value:b[x];if(!i||null!==R){var I=qe(b)?"function"==typeof n?n(r,x):r:r+(c?"."+x:"["+x+"]");d.set(e,g);var C=Pe();C.set(Je,d),Be(T,t(R,I,n,o,i,a,u,s,c,l,f,p,y,h,C))}}return T},Ve=(Object.prototype.hasOwnProperty,Array.isArray,{stringify:function(t,e){var r,n=t,o=function(t){if(!t)return Ge;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||Ge.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=Re.default;if(void 0!==t.format){if(!Le.call(Re.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var n=Re.formatters[r],o=Ge.filter;return("function"==typeof t.filter||qe(t.filter))&&(o=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:Ge.addQueryPrefix,allowDots:void 0===t.allowDots?Ge.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:Ge.charsetSentinel,delimiter:void 0===t.delimiter?Ge.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:Ge.encode,encoder:"function"==typeof t.encoder?t.encoder:Ge.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:Ge.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:Ge.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:Ge.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:Ge.strictNullHandling}}(e);"function"==typeof o.filter?n=(0,o.filter)("",n):qe(o.filter)&&(r=o.filter);var i,a=[];if("object"!=De(n)||null===n)return"";i=e&&e.arrayFormat in Ue?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var u=Ue[i];r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var s=Pe(),c=0;c<r.length;++c){var l=r[c];o.skipNulls&&null===n[l]||Be(a,Xe(n[l],l,u,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,s))}var f=a.join(o.delimiter),p=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),f.length>0?p+f:""}});function Qe(t){return(Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ke(t){return(Ke="function"==typeof Symbol&&"symbol"==Qe(Symbol.iterator)?function(t){return Qe(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":Qe(t)})(t)}var Ye,Ze,tr,er=function(t){return null!==t&&"object"===Ke(t)},rr=Ye={};function nr(){throw new Error("setTimeout has not been defined")}function or(){throw new Error("clearTimeout has not been defined")}function ir(t){if(Ze===setTimeout)return setTimeout(t,0);if((Ze===nr||!Ze)&&setTimeout)return Ze=setTimeout,setTimeout(t,0);try{return Ze(t,0)}catch(Xr){try{return Ze.call(null,t,0)}catch(Xr){return Ze.call(this,t,0)}}}!function(){try{Ze="function"==typeof setTimeout?setTimeout:nr}catch(Xr){Ze=nr}try{tr="function"==typeof clearTimeout?clearTimeout:or}catch(Xr){tr=or}}();var ar,ur=[],sr=!1,cr=-1;function lr(){sr&&ar&&(sr=!1,ar.length?ur=ar.concat(ur):cr=-1,ur.length&&fr())}function fr(){if(!sr){var t=ir(lr);sr=!0;for(var e=ur.length;e;){for(ar=ur,ur=[];++cr<e;)ar&&ar[cr].run();cr=-1,e=ur.length}ar=null,sr=!1,function(t){if(tr===clearTimeout)return clearTimeout(t);if((tr===or||!tr)&&clearTimeout)return tr=clearTimeout,clearTimeout(t);try{tr(t)}catch(Xr){try{return tr.call(null,t)}catch(Xr){return tr.call(this,t)}}}(t)}}function pr(t,e){this.fun=t,this.array=e}function yr(){}rr.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];ur.push(new pr(t,e)),1!==ur.length||sr||ir(fr)},pr.prototype.run=function(){this.fun.apply(null,this.array)},rr.title="browser",rr.browser=!0,rr.env={},rr.argv=[],rr.version="",rr.versions={},rr.on=yr,rr.addListener=yr,rr.once=yr,rr.off=yr,rr.removeListener=yr,rr.removeAllListeners=yr,rr.emit=yr,rr.prependListener=yr,rr.prependOnceListener=yr,rr.listeners=function(t){return[]},rr.binding=function(t){throw new Error("process.binding is not supported")},rr.cwd=function(){return"/"},rr.chdir=function(t){throw new Error("process.chdir is not supported")},rr.umask=function(){return 0};var hr={};(function(t){(function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t){return(r="function"==typeof Symbol&&"symbol"==e(Symbol.iterator)?function(t){return e(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":e(t)})(t)}function n(t){if(t)return function(t){for(var e in n.prototype)Object.prototype.hasOwnProperty.call(n.prototype,e)&&(t[e]=n.prototype[e]);return t}(t)}hr=n,n.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},n.prototype.parse=function(t){return this._parser=t,this},n.prototype.responseType=function(t){return this._responseType=t,this},n.prototype.serialize=function(t){return this._serializer=t,this},n.prototype.timeout=function(t){if(!t||"object"!==r(t))return this._timeout=t,this._responseTimeout=0,this._uploadTimeout=0,this;for(var e in t)if(Object.prototype.hasOwnProperty.call(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},n.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};var o=new Set(["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"]),i=new Set([408,413,429,500,502,503,504,521,522,524]);n.prototype._shouldRetry=function(t,e){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var r=this._retryCallback(t,e);if(!0===r)return!0;if(!1===r)return!1}catch(n){console.error(n)}if(e&&e.status&&i.has(e.status))return!0;if(t){if(t.code&&o.has(t.code))return!0;if(t.timeout&&"ECONNABORTED"===t.code)return!0;if(t.crossDomain)return!0}return!1},n.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()},n.prototype.then=function(t,e){var r=this;if(!this._fullfilledPromise){var n=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(function(t,e){n.on("abort",function(){if(!(r._maxRetries&&r._maxRetries>r._retries))if(r.timedout&&r.timedoutError)e(r.timedoutError);else{var t=new Error("Aborted");t.code="ABORTED",t.status=r.status,t.method=r.method,t.url=r.url,e(t)}}),n.end(function(r,n){r?e(r):t(n)})})}return this._fullfilledPromise.then(t,e)},n.prototype.catch=function(t){return this.then(void 0,t)},n.prototype.use=function(t){return t(this),this},n.prototype.ok=function(t){if("function"!=typeof t)throw new Error("Callback required");return this._okCallback=t,this},n.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},n.prototype.get=function(t){return this._header[t.toLowerCase()]},n.prototype.getHeader=n.prototype.get,n.prototype.set=function(t,e){if(er(t)){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&this.set(r,t[r]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},n.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},n.prototype.field=function(t,e){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(er(t)){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&this.field(r,t[r]);return this}if(Array.isArray(e)){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.field(t,e[n]);return this}if(null==e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=String(e)),this._getFormData().append(t,e),this},n.prototype.abort=function(){if(this._aborted)return this;if(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req){if(_.gte(t.version,"v13.0.0")&&_.lt(t.version,"v14.0.0"))throw new Error("Superagent does not work in v13 properly with abort() due to Node.js core changes");_.gte(t.version,"v14.0.0")&&(this.req.destroyed=!0),this.req.abort()}return this.clearTimeout(),this.emit("abort"),this},n.prototype._auth=function(t,e,r,n){switch(r.type){case"basic":this.set("Authorization","Basic ".concat(n("".concat(t,":").concat(e))));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer ".concat(t))}return this},n.prototype.withCredentials=function(t){return void 0===t&&(t=!0),this._withCredentials=t,this},n.prototype.redirects=function(t){return this._maxRedirects=t,this},n.prototype.maxResponseSize=function(t){if("number"!=typeof t)throw new TypeError("Invalid argument");return this._maxResponseSize=t,this},n.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},n.prototype.send=function(t){var e=er(t),r=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(e&&!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(e&&er(this._data))for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(this._data[n]=t[n]);else"string"==typeof t?(r||this.type("form"),(r=this._header["content-type"])&&(r=r.toLowerCase().trim()),this._data="application/x-www-form-urlencoded"===r?this._data?"".concat(this._data,"&").concat(t):t:(this._data||"")+t):this._data=t;return!e||this._isHost(t)?this:(r||this.type("json"),this)},n.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},n.prototype._finalizeQueryString=function(){var t=this._query.join("&");if(t&&(this.url+=(this.url.includes("?")?"&":"?")+t),this._query.length=0,this._sort){var e=this.url.indexOf("?");if(e>=0){var r=this.url.slice(e+1).split("&");"function"==typeof this._sort?r.sort(this._sort):r.sort(),this.url=this.url.slice(0,e)+"?"+r.join("&")}}},n.prototype._appendQueryString=function(){console.warn("Unsupported")},n.prototype._timeoutError=function(t,e,r){if(!this._aborted){var n=new Error("".concat(t+e,"ms exceeded"));n.timeout=e,n.code="ECONNABORTED",n.errno=r,this.timedout=!0,this.timedoutError=n,this.abort(),this.callback(n)}},n.prototype._setTimeouts=function(){var t=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){t._timeoutError("Timeout of ",t._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}}).call(this)}).call(this,Ye);var dr={};function mr(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return br(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?br(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function br(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}dr.type=function(t){return t.split(/ *; */).shift()},dr.params=function(t){var e,r={},n=mr(t.split(/ *; */));try{for(n.s();!(e=n.n()).done;){var o=e.value.split(/ *= */),i=o.shift(),a=o.shift();i&&a&&(r[i]=a)}}catch(u){n.e(u)}finally{n.f()}return r},dr.parseLinks=function(t){var e,r={},n=mr(t.split(/ *, */));try{for(n.s();!(e=n.n()).done;){var o=e.value.split(/ *; */),i=o[0].slice(1,-1);r[o[1].split(/ *= */)[1].slice(1,-1)]=i}}catch(a){n.e(a)}finally{n.f()}return r};var vr={};function gr(t){if(t)return function(t){for(var e in gr.prototype)Object.prototype.hasOwnProperty.call(gr.prototype,e)&&(t[e]=gr.prototype[e]);return t}(t)}vr=gr,gr.prototype.get=function(t){return this.header[t.toLowerCase()]},gr.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=dr.type(e);var r=dr.params(e);for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(this[n]=r[n]);this.links={};try{t.link&&(this.links=dr.parseLinks(t.link))}catch(o){}},gr.prototype._setStatusProperties=function(t){var 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 Sr={};function wr(t,e){if(t){if("string"==typeof t)return _r(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_r(t,e):void 0}}function _r(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ar(){this._defaults=[]}for(var Or=function(){var t=Er[jr];Ar.prototype[t]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this._defaults.push({fn:t,args:r}),this}},jr=0,Er=["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"];jr<Er.length;jr++)Or();Ar.prototype._setDefaults=function(t){var e,r,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=wr(t))){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(this._defaults);try{for(n.s();!(e=n.n()).done;){var o=e.value;t[o.fn].apply(t,function(t){if(Array.isArray(t))return _r(t)}(r=o.args)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||wr(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}}catch(i){n.e(i)}finally{n.f()}},Sr=Ar;var Tr,Pr={};function kr(t){return(kr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function xr(t){return(xr="function"==typeof Symbol&&"symbol"==kr(Symbol.iterator)?function(t){return kr(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":kr(t)})(t)}function Rr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ir(){}"undefined"!=typeof window?Tr=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),Tr=void 0):Tr=self;var Cr=Pr=Pr=function(t,e){return"function"==typeof e?new Pr.Request("GET",t).end(e):1===arguments.length?new Pr.Request("GET",t):new Pr.Request(t,e)};Pr.Request=qr,Cr.getXHR=function(){if(Tr.XMLHttpRequest&&(!Tr.location||"file:"!==Tr.location.protocol||!Tr.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(r){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(n){}throw new Error("Browser-only version of superagent could not find XHR")};var Nr="".trim?function(t){return t.trim()}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};function Mr(t){if(!er(t))return t;var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&Fr(e,r,t[r]);return e.join("&")}function Fr(t,e,r){if(void 0!==r)if(null!==r)if(Array.isArray(r)){var n,o=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Rr(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Rr(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(r);try{for(o.s();!(n=o.n()).done;)Fr(t,e,n.value)}catch(a){o.e(a)}finally{o.f()}}else if(er(r))for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&Fr(t,"".concat(e,"[").concat(i,"]"),r[i]);else t.push(encodeURI(e)+"="+encodeURIComponent(r));else t.push(encodeURI(e))}function Dr(t){for(var e,r,n={},o=t.split("&"),i=0,a=o.length;i<a;++i)-1===(r=(e=o[i]).indexOf("="))?n[decodeURIComponent(e)]="":n[decodeURIComponent(e.slice(0,r))]=decodeURIComponent(e.slice(r+1));return n}function Lr(t){return/[/+]json($|[^-\w])/i.test(t)}function Ur(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;var e=this.xhr.status;1223===e&&(e=204),this._setStatusProperties(e),this.headers=function(t){for(var e,r,n,o,i=t.split(/\r?\n/),a={},u=0,s=i.length;u<s;++u)-1!==(e=(r=i[u]).indexOf(":"))&&(n=r.slice(0,e).toLowerCase(),o=Nr(r.slice(e+1)),a[n]=o);return a}(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 qr(t,e){var r=this;this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",function(){var t,e=null,n=null;try{n=new Ur(r)}catch(o){return(e=new Error("Parser is unable to parse the response")).parse=!0,e.original=o,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",n);try{r._isResponseOK(n)||(t=new Error(n.statusText||n.text||"Unsuccessful HTTP response"))}catch(i){t=i}t?(t.original=e,t.response=n,t.status=n.status,r.callback(t,n)):r.callback(null,n)})}Cr.serializeObject=Mr,Cr.parseString=Dr,Cr.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"},Cr.serialize={"application/x-www-form-urlencoded":Ve.stringify,"application/json":O},Cr.parse={"application/x-www-form-urlencoded":Dr,"application/json":JSON.parse},vr(Ur.prototype),Ur.prototype._parseBody=function(t){var e=Cr.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&Lr(this.type)&&(e=Cr.parse["application/json"]),e&&t&&(t.length>0||t instanceof Object)?e(t):null)},Ur.prototype.toError=function(){var t=this.req,e=t.method,r=t.url,n="cannot ".concat(e," ").concat(r," (").concat(this.status,")"),o=new Error(n);return o.status=this.status,o.method=e,o.url=r,o},Cr.Response=Ur,F(qr.prototype),hr(qr.prototype),qr.prototype.type=function(t){return this.set("Content-Type",Cr.types[t]||t),this},qr.prototype.accept=function(t){return this.set("Accept",Cr.types[t]||t),this},qr.prototype.auth=function(t,e,r){return 1===arguments.length&&(e=""),"object"===xr(e)&&null!==e&&(r=e,e=""),r||(r={type:"function"==typeof btoa?"basic":"auto"}),this._auth(t,e,r,function(t){if("function"==typeof btoa)return btoa(t);throw new Error("Cannot use basic auth, btoa is not a function")})},qr.prototype.query=function(t){return"string"!=typeof t&&(t=Mr(t)),t&&this._query.push(t),this},qr.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},qr.prototype._getFormData=function(){return this._formData||(this._formData=new Tr.FormData),this._formData},qr.prototype.callback=function(t,e){if(this._shouldRetry(t,e))return this._retry();var r=this._callback;this.clearTimeout(),t&&(this._maxRetries&&(t.retries=this._retries-1),this.emit("error",t)),r(t,e)},qr.prototype.crossDomainError=function(){var 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)},qr.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},qr.prototype.ca=qr.prototype.agent,qr.prototype.buffer=qr.prototype.ca,qr.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},qr.prototype.pipe=qr.prototype.write,qr.prototype._isHost=function(t){return t&&"object"===xr(t)&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},qr.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||Ir,this._finalizeQueryString(),this._end()},qr.prototype._setUploadTimeout=function(){var t=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout(function(){t._timeoutError("Upload timeout of ",t._uploadTimeout,"ETIMEDOUT")},this._uploadTimeout))},qr.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var t=this;this.xhr=Cr.getXHR();var e=this.xhr,r=this._formData||this._data;this._setTimeouts(),e.addEventListener("readystatechange",function(){var r=e.readyState;if(r>=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4===r){var n;try{n=e.status}catch(o){n=0}if(!n){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")}});var n=function(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",n.bind(null,"download")),e.upload&&e.upload.addEventListener("progress",n.bind(null,"upload"))}catch(u){}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(s){return this.callback(s)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof r&&!this._isHost(r)){var o=this._header["content-type"],i=this._serializer||Cr.serialize[o?o.split(";")[0]:""];!i&&Lr(o)&&(i=Cr.serialize["application/json"]),i&&(r=i(r))}for(var a in this.header)null!==this.header[a]&&Object.prototype.hasOwnProperty.call(this.header,a)&&e.setRequestHeader(a,this.header[a]);this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0===r?null:r)},Cr.agent=function(){return new Sr};for(var Hr=function(){var t=Br[Wr];Sr.prototype[t.toLowerCase()]=function(e,r){var n=new Cr.Request(t,e);return this._setDefaults(n),r&&n.end(r),n}},Wr=0,Br=["GET","POST","OPTIONS","PATCH","PUT","DELETE"];Wr<Br.length;Wr++)Hr();function zr(t,e,r){var n=Cr("DELETE",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n}Sr.prototype.del=Sr.prototype.delete,Cr.get=function(t,e,r){var n=Cr("GET",t);return"function"==typeof e&&(r=e,e=null),e&&n.query(e),r&&n.end(r),n},Cr.head=function(t,e,r){var n=Cr("HEAD",t);return"function"==typeof e&&(r=e,e=null),e&&n.query(e),r&&n.end(r),n},Cr.options=function(t,e,r){var n=Cr("OPTIONS",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},Cr.del=zr,Cr.delete=zr,Cr.patch=function(t,e,r){var n=Cr("PATCH",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},Cr.post=function(t,e,r){var n=Cr("POST",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},Cr.put=function(t,e,r){var n=Cr("PUT",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n};var $r={};Object.defineProperty($r,"__esModule",{value:!0}),$r.boolean=void 0,$r.boolean=function(t){switch(Object.prototype.toString.call(t)){case"[object String]":return["true","t","yes","y","on","1"].includes(t.trim().toLowerCase());case"[object Number]":return 1===t.valueOf();case"[object Boolean]":return t.valueOf();default:return!1}};var Gr="8.1.0",Jr={};return function(t){(function(){"use strict";function e(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||n(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=n(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var o=0,i=function(){};return{s:i,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){s=!0,a=t},f:function(){try{u||null==r.return||r.return()}finally{if(s)throw a}}}}function n(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var u=$r.boolean,s=new Set(["config","log"]),c=["trace","debug","info","warn","error","fatal"],f={warning:"warn",err:"error"},p="https://api.cabinjs.com",y="`level` invalid, must be: ".concat(c.join(", "));function h(t){return null==t||"object"==a(t)&&0===Object.keys(t).length||"string"==typeof t&&0===t.trim().length}function d(t){return void 0===t}function m(t){return"object"==a(t)&&null!==t&&!Array.isArray(t)}function b(t){return"string"==typeof t}function j(t){return"function"==typeof t}Jr=function(){function n(){var o=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),this.config=Object.assign({key:"",endpoint:p,headers:{},timeout:5e3,retry:3,showStack:!t.env.SHOW_STACK||u(t.env.SHOW_STACK),meta:{show:!t.env.SHOW_META||u(t.env.SHOW_META),showApp:!t.env.SHOW_META_APP||u(t.env.SHOW_META_APP),omittedFields:t.env.OMIT_META_FIELDS?t.env.OMIT_META_FIELDS.split(",").map(function(t){return t.trim()}):[]},silent:!1,logger:console,name:!1,level:"info",levels:["info","warn","error","fatal"],capture:!1,callback:!1,appInfo:!t.env.APP_INFO||u(t.env.APP_INFO)},i),this.config.showMeta&&(this.config.meta.show=this.config.showMeta,delete this.config.showMeta),this.appInfo=!!this.config.appInfo&&!!j(_)&&_(),this.log=this.log.bind(this);var a,l=r(Object.keys(this.config.logger).filter(function(t){return!s.has(t)}));try{for(l.s();!(a=l.n()).done;){var f=a.value;this[f]=this.config.logger[f]}}catch(m){l.e(m)}finally{l.f()}var y,h=r(c);try{var d=function(){var t=y.value;o[t]=function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return o.log.apply(o,e([t].concat(Array.prototype.slice.call(n))))}};for(h.s();!(y=h.n()).done;)d()}catch(m){h.e(m)}finally{h.f()}this.setLevel=this.setLevel.bind(this),this.getNormalizedLevel=this.getNormalizedLevel.bind(this),this.setName=this.setName.bind(this),this.setCallback=this.setCallback.bind(this),this.config.name&&this.setName(this.config.name),this.setLevel(this.config.level),this.err=this.error,this.warning=this.warn}var o,a,E;return o=n,(a=[{key:"setCallback",value:function(t){this.config.callback=t}},{key:"setLevel",value:function(t){if(!b(t)||!c.includes(t))throw new Error(y);b(this.config.logger.logLevel)?this.config.logger.logLevel=t:this.config.logger.level=t,this.config.levels=c.slice(c.indexOf(t))}},{key:"getNormalizedLevel",value:function(t){return b(t)?b(f[t])?f[t]:c.includes(t)?t:"info":"info"}},{key:"setName",value:function(t){if(!b(t))throw new Error("`name` must be a String");b(this.config.logger.scope)?this.config.logger.scope=t:this.config.logger.name=t}},{key:"log",value:function(r,n,o){for(var i=this,a=[],u=arguments.length,s=new Array(u>3?u-3:0),y=3;y<u;y++)s[y-3]=arguments[y];d(r)||a.push(r),d(n)||a.push(n),d(o)||a.push(o),a=a.concat(Array.prototype.slice.call(s));var _=this.config,E=0;b(r)&&b(f[r])?r=f[r]:S(r)?(o=n,n=r,r="error"):b(r)&&c.includes(r)||(o=n,n=r,r=this.getNormalizedLevel(r),E=-1);var T,P=!1;if((m(n)||Array.isArray(n))&&b(o)){P=!0;var k=o;o=n,n=b(k)&&a.length>=3+E?v.apply(void 0,e(a.slice(2+E))):k}d(n)&&(n=r),1!==a.slice(1+E).length||b(n)||S(n)?!P&&a.length>=4+E?(n=v.apply(void 0,e(a.slice(1+E))),o={}):!P&&a.length===3+E&&b(n)&&g.some(function(t){return n.includes(t)})?(n=v(n,o),o={}):S(n)||(S(o)?o={err:A(o)}:m(o)||d(o)||null===o?b(n)||(n=v(n)):(n=v(n,o),o={})):(o={message:n},n=r),d(o)||m(o)?m(o)||(o={}):o={meta:o},S(n)?(T=n,m(o.err)||(o.err=A(T)),n=n.message):S(o.err)&&(T=o.err);var x=j(_.callback)&&(!("boolean"==typeof o.callback)||o.callback);(o=w(o,["callback"])).level=r,this.appInfo&&(o.app=this.appInfo);var R=O({message:n,meta:o});if(_.capture&&_.levels.includes(r)&&(!S(T)||!T._captureFailed)){if(_.endpoint===p&&!_.key)throw new Error("Cabin API key required (e.g. `{ key: 'YOUR-CABIN-API-KEY' })`)\n<https://cabinjs.com>");var I=Pr.post(_.endpoint).set("X-Request-Id",l()).timeout(_.timeout);t.browser||I.set("User-Agent","axe/".concat(Gr)),_.key&&I.auth(_.key),h(_.headers)||I.set(_.headers),I.type("application/json").send(R).retry(_.retry).end(function(t){t&&(t._captureFailed=!0,i.config.logger.error(t))})}if(x&&_.callback(r,n,o),_.silent)return R;if(!_.levels.includes(r))return R;var C=r;-1===E?C="log":"fatal"===r&&(C="error");var N=["level","err"].concat(this.config.meta.omittedFields);this.config.meta.showApp||N.push("app");var M=w(o,N);return"error"===C&&S(T)&&_.showStack?!_.meta.show||h(M)?this.config.logger.error(T):this.config.logger.error(T,M):!_.meta.show||h(M)?this.config.logger[C](n):this.config.logger[C](n,M),R}}])&&i(o.prototype,a),E&&i(o,E),Object.defineProperty(o,"prototype",{writable:!1}),n}()}).call(this)}.call(this,Ye),Jr});
package/lib/index.js CHANGED
@@ -4,11 +4,11 @@ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableTo
4
4
 
5
5
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6
6
 
7
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
7
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
8
8
 
9
9
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
10
10
 
11
- function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
11
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
12
12
 
13
13
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
14
14
 
@@ -18,9 +18,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
18
18
 
19
19
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
20
20
 
21
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
21
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
22
22
 
23
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
23
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
24
24
 
25
25
  // eslint-disable-next-line import/no-unassigned-import
26
26
  require('console-polyfill');
@@ -157,7 +157,7 @@ var Axe = /*#__PURE__*/function () {
157
157
  args[_key] = arguments[_key];
158
158
  }
159
159
 
160
- return _this.log.apply(_this, _toConsumableArray([element].concat([].slice.call(args))));
160
+ return _this.log.apply(_this, _toConsumableArray([element].concat(Array.prototype.slice.call(args))));
161
161
  };
162
162
  };
163
163
 
@@ -229,7 +229,7 @@ var Axe = /*#__PURE__*/function () {
229
229
  args[_key2 - 3] = arguments[_key2];
230
230
  }
231
231
 
232
- originalArgs = originalArgs.concat([].slice.call(args));
232
+ originalArgs = originalArgs.concat(Array.prototype.slice.call(args));
233
233
  var config = this.config;
234
234
  var modifier = 0;
235
235
 
@@ -270,9 +270,9 @@ var Axe = /*#__PURE__*/function () {
270
270
  // then infer to use util.format on everything
271
271
  message = format.apply(void 0, _toConsumableArray(originalArgs.slice(1 + modifier)));
272
272
  meta = {};
273
- } else if (!isBunyan && originalArgs.length === 3 + modifier && isString(message) && formatSpecifiers.filter(function (t) {
273
+ } else if (!isBunyan && originalArgs.length === 3 + modifier && isString(message) && formatSpecifiers.some(function (t) {
274
274
  return message.includes(t);
275
- }).length > 0) {
275
+ })) {
276
276
  // Otherwise if there are three args and if the `message` contains
277
277
  // a placeholder token (e.g. '%s' or '%d' - see above `formatSpecifiers` variable)
278
278
  // then we can infer that the `meta` arg passed is used for formatting
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "axe",
3
3
  "description": "Logging add-on to send logs over HTTP to your server in Node and Browser environments. Works with any logger! Chop up your logs consistently! Made for Cabin and Lad.",
4
- "version": "8.1.0",
4
+ "version": "8.1.1",
5
5
  "author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com)",
6
6
  "ava": {
7
7
  "serial": true,
@@ -31,49 +31,49 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@ladjs/format-util": "^1.0.4",
34
- "boolean": "^3.0.2",
34
+ "boolean": "^3.1.4",
35
35
  "console-polyfill": "^0.3.0",
36
36
  "cuid": "^2.1.8",
37
- "fast-safe-stringify": "^2.0.7",
37
+ "fast-safe-stringify": "^2.1.1",
38
38
  "format-specifiers": "^1.0.0",
39
39
  "iserror": "^0.0.2",
40
40
  "lodash.omit": "^4.5.0",
41
41
  "parse-app-info": "^4.0.2",
42
42
  "parse-err": "^0.0.12",
43
- "superagent": "^6.1.0"
43
+ "superagent": "^7.0.2"
44
44
  },
45
45
  "devDependencies": {
46
- "@babel/cli": "^7.12.10",
47
- "@babel/core": "^7.12.10",
48
- "@babel/preset-env": "^7.12.11",
49
- "@commitlint/cli": "^11.0.0",
50
- "@commitlint/config-conventional": "^11.0.0",
51
- "ava": "^3.15.0",
46
+ "@babel/cli": "^7.16.8",
47
+ "@babel/core": "^7.16.7",
48
+ "@babel/preset-env": "^7.16.8",
49
+ "@commitlint/cli": "^16.0.2",
50
+ "@commitlint/config-conventional": "^16.0.0",
51
+ "ava": "^4.0.1",
52
52
  "babelify": "^10.0.0",
53
53
  "browserify": "^17.0.0",
54
- "codecov": "^3.8.1",
55
- "consola": "^2.15.0",
54
+ "codecov": "^3.8.2",
55
+ "consola": "^2.15.3",
56
56
  "cross-env": "^7.0.3",
57
- "eslint": "^7.17.0",
58
- "eslint-config-xo-lass": "^1.0.4",
59
- "eslint-plugin-compat": "^3.9.0",
57
+ "eslint": "^8.6.0",
58
+ "eslint-config-xo-lass": "^1.0.6",
59
+ "eslint-plugin-compat": "^4.0.1",
60
60
  "eslint-plugin-node": "^11.1.0",
61
- "express": "^4.17.1",
61
+ "express": "^4.17.2",
62
62
  "fixpack": "^4.0.0",
63
- "husky": "^4.3.7",
63
+ "husky": "^7.0.4",
64
64
  "jsdom": "15.x",
65
- "koa": "^2.13.1",
66
- "lint-staged": "^10.5.3",
67
- "lodash": "^4.17.20",
65
+ "koa": "^2.13.4",
66
+ "lint-staged": "^12.1.7",
67
+ "lodash": "^4.17.21",
68
68
  "nyc": "^15.1.0",
69
- "pino": "^6.10.0",
70
- "remark-cli": "^9.0.0",
69
+ "pino": "^7.6.3",
70
+ "remark-cli": "^10.0.1",
71
71
  "remark-preset-github": "^4.0.1",
72
72
  "rimraf": "^3.0.2",
73
73
  "signale": "^1.4.0",
74
- "sinon": "^9.2.3",
74
+ "sinon": "^12.0.1",
75
75
  "tinyify": "https://github.com/niftylettuce/tinyify",
76
- "xo": "^0.37.1"
76
+ "xo": "^0.47.0"
77
77
  },
78
78
  "engines": {
79
79
  "node": ">=7.0.0"
@@ -169,6 +169,10 @@
169
169
  ],
170
170
  "ignore": [
171
171
  "config.js"
172
- ]
172
+ ],
173
+ "rules": {
174
+ "node/prefer-global/process": "off",
175
+ "unicorn/prefer-spread": "off"
176
+ }
173
177
  }
174
178
  }