axe 9.0.0 → 10.0.0
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/README.md +723 -179
- package/dist/axe.js +1151 -6809
- package/dist/axe.min.js +1 -1
- package/lib/index.js +253 -115
- package/package.json +20 -15
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"],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,e=function(t,e){var r="000000000"+t;return r.substr(r.length-e)},r="object"==typeof window?window:self,n=Object.keys(r).length,o=e(((navigator.mimeTypes?navigator.mimeTypes.length:0)+navigator.userAgent.length).toString(36)+n.toString(36),4),i=function(){return o},a="undefined"!=typeof window&&(window.crypto||window.msCrypto)||"undefined"!=typeof self&&self.crypto;if(a){var s=Math.pow(2,32)-1;t=function(){return Math.abs(a.getRandomValues(new Uint32Array(1))[0]/s)}}else t=Math.random;var c=t,u={},l=0,p=Math.pow(36,4);function f(){return e((c()*p<<0).toString(36),4)}function y(){return l=l<p?l:0,++l-1}function h(){return"c"+(new Date).getTime().toString(36)+e(y().toString(36),4)+i()+(f()+f())}h.slug=function(){var t=(new Date).getTime().toString(36),e=y().toString(36).slice(-4),r=i().slice(0,1)+i().slice(-1),n=f().slice(-2);return t.slice(-2)+e+r+n},h.isCuid=function(t){return"string"==typeof t&&!!t.startsWith("c")},h.isSlug=function(t){if("string"!=typeof t)return!1;var e=t.length;return e>=7&&e<=10},h.fingerprint=i,u=h;var d=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","%%"],m=function(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return t instanceof Error}},b={};(function(t){(function(){"use strict";var e=/^\[object .+?Constructor\]$/,r=/^(?:0|[1-9]\d*)$/,n="object"==typeof t&&t&&t.Object===Object&&t,o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();function a(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,u);for(var n=-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}(t,e)>-1}function s(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 c(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}function u(t){return t!=t}function l(t,e){return t.has(e)}function p(t,e){return function(r){return t(e(r))}}var f,y=Array.prototype,h=Function.prototype,d=Object.prototype,g=i["__core-js_shared__"],m=(f=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||""))?"Symbol(src)_1."+f:"",v=h.toString,w=d.hasOwnProperty,_=d.toString,S=RegExp("^"+v.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),A=i.Symbol,O=p(Object.getPrototypeOf,Object),j=d.propertyIsEnumerable,E=y.splice,T=A?A.isConcatSpreadable:void 0,P=Object.getOwnPropertySymbols,k=Math.max,x=U(i,"Map"),R=U(Object,"create");function I(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 C(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 N(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.__data__=new N;++e<r;)this.add(t[e])}function M(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 D(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function U(t,r){var n=function(t,e){return null==t?void 0:t[e]}(t,r);return function(t){return!(!V(t)||(r=t,m&&m in r))&&(J(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(r){}return e}(t)?S:e).test(function(t){if(null!=t){try{return v.call(t)}catch(e){}try{return t+""}catch(e){}}return""}(t));var r}(n)?n:void 0}I.prototype.clear=function(){this.__data__=R?R(null):{}},I.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},I.prototype.get=function(t){var e=this.__data__;if(R){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return w.call(e,t)?e[t]:void 0},I.prototype.has=function(t){var e=this.__data__;return R?void 0!==e[t]:w.call(e,t)},I.prototype.set=function(t,e){return this.__data__[t]=R&&void 0===e?"__lodash_hash_undefined__":e,this},C.prototype.clear=function(){this.__data__=[]},C.prototype.delete=function(t){var e=this.__data__,r=M(e,t);return!(r<0||(r==e.length-1?e.pop():E.call(e,r,1),0))},C.prototype.get=function(t){var e=this.__data__,r=M(e,t);return r<0?void 0:e[r][1]},C.prototype.has=function(t){return M(this.__data__,t)>-1},C.prototype.set=function(t,e){var r=this.__data__,n=M(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},N.prototype.clear=function(){this.__data__={hash:new I,map:new(x||C),string:new I}},N.prototype.delete=function(t){return D(this,t).delete(t)},N.prototype.get=function(t){return D(this,t).get(t)},N.prototype.has=function(t){return D(this,t).has(t)},N.prototype.set=function(t,e){return D(this,t).set(t,e),this},F.prototype.add=F.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},F.prototype.has=function(t){return this.__data__.has(t)};var L=P?p(P,Object):tt,q=P?function(t){for(var e=[];t;)c(e,L(t)),t=O(t);return e}:tt;function B(t){return $(t)||z(t)||!!(T&&t&&t[T])}function W(t,e){return!!(e=null==e?9007199254740991:e)&&("number"==typeof t||r.test(t))&&t>-1&&t%1==0&&t<e}function H(t){if("string"==typeof t||function(t){return"symbol"==typeof t||Q(t)&&"[object Symbol]"==_.call(t)}(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function z(t){return function(t){return Q(t)&&G(t)}(t)&&w.call(t,"callee")&&(!j.call(t,"callee")||"[object Arguments]"==_.call(t))}var $=Array.isArray;function G(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}(t.length)&&!J(t)}function J(t){var e=V(t)?_.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}function V(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Q(t){return!!t&&"object"==typeof t}function X(t){return G(t)?function(t,e){var r=$(t)||z(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&&!w.call(t,i)||o&&("length"==i||W(i,n))||r.push(i);return r}(t,!0):function(t){if(!V(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||d)),o=[];for(var i in t)("constructor"!=i||!n&&w.call(t,i))&&o.push(i);return o}(t)}var K,Y,Z=(K=function(t,e){return null==t?{}:(e=s(function t(e,r,n,o,i){var a=-1,s=e.length;for(n||(n=B),i||(i=[]);++a<s;){var u=e[a];r>0&&n(u)?r>1?t(u,r-1,n,o,i):c(i,u):o||(i[i.length]=u)}return i}(e,1),H),function(t,e){return function(t,e,r){for(var n=-1,o=e.length,i={};++n<o;){var a=e[n],s=t[a];r(s,a)&&(i[a]=s)}return i}(t=Object(t),e,(function(e,r){return r in t}))}(t,function(t,e,r,n){var o=-1,i=a,s=!0,c=t.length,u=[],p=e.length;if(!c)return u;e.length>=200&&(i=l,s=!1,e=new F(e));t:for(;++o<c;){var f=t[o],y=f;if(f=0!==f?f:0,s&&y==y){for(var h=p;h--;)if(e[h]===y)continue t;u.push(f)}else i(e,y,void 0)||u.push(f)}return u}(function(t){return function(t,e,r){var n=e(t);return $(t)?n:c(n,r(t))}(t,X,q)}(t),e)))},Y=k(void 0===Y?K.length-1:Y,0),function(){for(var t=arguments,e=-1,r=k(t.length-Y,0),n=Array(r);++e<r;)n[e]=t[Y+e];e=-1;for(var o=Array(Y+1);++e<Y;)o[e]=t[e];return o[Y]=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)}(K,this,o)});function tt(){return[]}b=Z}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var v={},w=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!m(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},_={};_=j,j.default=j,j.stable=P,j.stableStringify=P;var S=[],A=[];function O(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function j(t,e,r,n){var o;void 0===n&&(n=O()),function t(e,r,n,o,i,a,s){var c;if(a+=1,"object"==typeof e&&null!==e){for(c=0;c<o.length;c++)if(o[c]===e)return void E("[Circular]",e,r,i);if(void 0!==s.depthLimit&&a>s.depthLimit)return void E("[...]",e,r,i);if(void 0!==s.edgesLimit&&n+1>s.edgesLimit)return void E("[...]",e,r,i);if(o.push(e),Array.isArray(e))for(c=0;c<e.length;c++)t(e[c],c,c,o,e,a,s);else{var u=Object.keys(e);for(c=0;c<u.length;c++){var l=u[c];t(e[l],l,c,o,e,a,s)}}o.pop()}}(t,"",0,[],void 0,0,n);try{o=0===A.length?JSON.stringify(t,e,r):JSON.stringify(t,k(e),r)}catch(a){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==S.length;){var i=S.pop();4===i.length?Object.defineProperty(i[0],i[1],i[3]):i[0][i[1]]=i[2]}}return o}function E(t,e,r,n){var o=Object.getOwnPropertyDescriptor(n,r);void 0!==o.get?o.configurable?(Object.defineProperty(n,r,{value:t}),S.push([n,r,e,o])):A.push([e,r,t]):(n[r]=t,S.push([n,r,e]))}function T(t,e){return t<e?-1:t>e?1:0}function P(t,e,r,n){void 0===n&&(n=O());var o,i=function t(e,r,n,o,i,a,s){var c;if(a+=1,"object"==typeof e&&null!==e){for(c=0;c<o.length;c++)if(o[c]===e)return void E("[Circular]",e,r,i);try{if("function"==typeof e.toJSON)return}catch(f){return}if(void 0!==s.depthLimit&&a>s.depthLimit)return void E("[...]",e,r,i);if(void 0!==s.edgesLimit&&n+1>s.edgesLimit)return void E("[...]",e,r,i);if(o.push(e),Array.isArray(e))for(c=0;c<e.length;c++)t(e[c],c,c,o,e,a,s);else{var u={},l=Object.keys(e).sort(T);for(c=0;c<l.length;c++){var p=l[c];t(e[p],p,c,o,e,a,s),u[p]=e[p]}if(void 0===i)return u;S.push([i,r,e]),i[r]=u}o.pop()}}(t,"",0,[],void 0,0,n)||t;try{o=0===A.length?JSON.stringify(i,e,r):JSON.stringify(i,k(e),r)}catch(s){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==S.length;){var a=S.pop();4===a.length?Object.defineProperty(a[0],a[1],a[3]):a[0][a[1]]=a[2]}}return o}function k(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=o[2],A.splice(n,1);break}}return t.call(this,e,r)}}var x={exports:{}};function R(t){if(t)return function(t){for(var e in R.prototype)t[e]=R.prototype[e];return t}(t)}x.exports=R,R.prototype.on=R.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},R.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},R.prototype.off=R.prototype.removeListener=R.prototype.removeAllListeners=R.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},R.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},R.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},R.prototype.hasListeners=function(t){return!!this.listeners(t).length},x=x.exports;var I="undefined"!=typeof Symbol&&Symbol,C=Array.prototype.slice,N=Object.prototype.toString,F=Function.prototype.bind||function(t){var e=this;if("function"!=typeof e||"[object Function]"!==N.call(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var r,n=C.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(C.call(arguments)));return Object(o)===o?o:this}return e.apply(t,n.concat(C.call(arguments)))})),e.prototype){var s=function(){};s.prototype=e.prototype,r.prototype=new s,s.prototype=null}return r},M=F.call(Function.call,Object.prototype.hasOwnProperty),D=SyntaxError,U=Function,L=TypeError,q=function(t){try{return U('"use strict"; return ('+t+").constructor;")()}catch(e){}},B=Object.getOwnPropertyDescriptor;if(B)try{B({},"")}catch(Fr){B=null}var W,H=function(){throw new L},z=B?function(){try{return H}catch(t){try{return B(arguments,"callee").get}catch(e){return H}}}():H,$="function"==typeof I&&"function"==typeof Symbol&&"symbol"==typeof I("foo")&&"symbol"==typeof Symbol("bar")&&function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var 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}(),G=Object.getPrototypeOf||function(t){return t.__proto__},J={},V="undefined"==typeof Uint8Array?void 0:G(Uint8Array),Q={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":$?G([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":J,"%AsyncGenerator%":J,"%AsyncGeneratorFunction%":J,"%AsyncIteratorPrototype%":J,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":U,"%GeneratorFunction%":J,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":$?G(G([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&$?G((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&&$?G((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":$?G(""[Symbol.iterator]()):void 0,"%Symbol%":$?Symbol:void 0,"%SyntaxError%":D,"%ThrowTypeError%":z,"%TypedArray%":V,"%TypeError%":L,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet},X={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},K=F.call(Function.call,Array.prototype.concat),Y=F.call(Function.apply,Array.prototype.splice),Z=F.call(Function.call,String.prototype.replace),tt=F.call(Function.call,String.prototype.slice),et=F.call(Function.call,RegExp.prototype.exec),rt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,nt=/\\(\\)?/g,ot=function(t,e){var r,n=t;if(M(X,n)&&(n="%"+(r=X[n])[0]+"%"),M(Q,n)){var o=Q[n];if(o===J&&(o=function t(e){var r;if("%AsyncFunction%"===e)r=q("async function () {}");else if("%GeneratorFunction%"===e)r=q("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=q("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&(r=G(o.prototype))}return Q[e]=r,r}(n)),void 0===o&&!e)throw new L("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new D("intrinsic "+t+" does not exist!")},it=function(t,e){if("string"!=typeof t||0===t.length)throw new L("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new L('"allowMissing" argument must be a boolean');if(null===et(/^%?[^%]*%?$/g,t))throw new D("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=tt(t,0,1),r=tt(t,-1);if("%"===e&&"%"!==r)throw new D("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new D("invalid intrinsic syntax, expected opening `%`");var n=[];return Z(t,rt,(function(t,e,r,o){n[n.length]=r?Z(o,nt,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",o=ot("%"+n+"%",e),i=o.name,a=o.value,s=!1,c=o.alias;c&&(n=c[0],Y(r,K([0,1],c)));for(var u=1,l=!0;u<r.length;u+=1){var p=r[u],f=tt(p,0,1),y=tt(p,-1);if(('"'===f||"'"===f||"`"===f||'"'===y||"'"===y||"`"===y)&&f!==y)throw new D("property names with quotes must have matching quotes");if("constructor"!==p&&l||(s=!0),M(Q,i="%"+(n+="."+p)+"%"))a=Q[i];else if(null!=a){if(!(p in a)){if(!e)throw new L("base intrinsic for "+t+" exists, but the property is not available.");return}if(B&&u+1>=r.length){var h=B(a,p);a=(l=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:a[p]}else l=M(a,p),a=a[p];l&&!s&&(Q[i]=a)}}return a},at=it("%Function.prototype.apply%"),st=it("%Function.prototype.call%"),ct=it("%Reflect.apply%",!0)||F.call(st,at),ut=it("%Object.getOwnPropertyDescriptor%",!0),lt=it("%Object.defineProperty%",!0),pt=it("%Math.max%");if(lt)try{lt({},"a",{value:1})}catch(Fr){lt=null}W=function(t){var e=ct(F,st,arguments);return ut&<&&ut(e,"length").configurable&<(e,"length",{value:1+pt(0,t.length-(arguments.length-1))}),e};var ft=function(){return ct(F,at,arguments)};lt?lt(W,"apply",{value:ft}):W.apply=ft;var yt=W(it("String.prototype.indexOf")),ht=function(t,e){var r=it(t,!!e);return"function"==typeof r&&yt(t,".prototype.")>-1?W(r):r},dt="function"==typeof Map&&Map.prototype,gt=Object.getOwnPropertyDescriptor&&dt?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,mt=dt&>&&"function"==typeof gt.get?gt.get:null,bt=dt&&Map.prototype.forEach,vt="function"==typeof Set&&Set.prototype,wt=Object.getOwnPropertyDescriptor&&vt?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,_t=vt&&wt&&"function"==typeof wt.get?wt.get:null,St=vt&&Set.prototype.forEach,At="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,Ot="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,jt="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,Et=Boolean.prototype.valueOf,Tt=Object.prototype.toString,Pt=Function.prototype.toString,kt=String.prototype.match,xt=String.prototype.slice,Rt=String.prototype.replace,It=String.prototype.toUpperCase,Ct=String.prototype.toLowerCase,Nt=RegExp.prototype.test,Ft=Array.prototype.concat,Mt=Array.prototype.join,Dt=Array.prototype.slice,Ut=Math.floor,Lt="function"==typeof BigInt?BigInt.prototype.valueOf:null,qt=Object.getOwnPropertySymbols,Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,Wt="function"==typeof Symbol&&"object"==typeof Symbol.iterator,Ht="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,zt=Object.prototype.propertyIsEnumerable,$t=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Gt(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||Nt.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-Ut(-t):Ut(t);if(n!==t){var o=String(n),i=xt.call(e,o.length+1);return Rt.call(o,r,"$&_")+"."+Rt.call(Rt.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Rt.call(e,r,"$&_")}var Jt=v.custom,Vt=Zt(Jt)?Jt:null;function Qt(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function Xt(t){return Rt.call(String(t),/"/g,""")}function Kt(t){return!("[object Array]"!==re(t)||Ht&&"object"==typeof t&&Ht in t)}function Yt(t){return!("[object RegExp]"!==re(t)||Ht&&"object"==typeof t&&Ht in t)}function Zt(t){if(Wt)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!Bt)return!1;try{return Bt.call(t),!0}catch(Fr){}return!1}var te=Object.prototype.hasOwnProperty||function(t){return t in this};function ee(t,e){return te.call(t,e)}function re(t){return Tt.call(t)}function ne(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 oe(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":"")+It.call(e.toString(16))}function ie(t){return"Object("+t+")"}function ae(t){return t+" { ? }"}function se(t,e,r,n){return t+" ("+e+") {"+(n?ce(r,n):Mt.call(r,", "))+"}"}function ce(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+Mt.call(t,","+r)+"\n"+e.prev}function ue(t,e){var r=Kt(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=ee(t,o)?e(t[o],t):""}var i,a="function"==typeof qt?qt(t):[];if(Wt){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var c in t)ee(t,c)&&(r&&String(Number(c))===c&&c<t.length||Wt&&i["$"+c]instanceof Symbol||(Nt.call(/[^\w$]/,c)?n.push(e(c,t)+": "+e(t[c],t)):n.push(c+": "+e(t[c],t))));if("function"==typeof qt)for(var u=0;u<a.length;u++)zt.call(t,a[u])&&n.push("["+e(a[u])+"]: "+e(t[a[u]],t));return n}var le=it("%TypeError%"),pe=it("%WeakMap%",!0),fe=it("%Map%",!0),ye=ht("WeakMap.prototype.get",!0),he=ht("WeakMap.prototype.set",!0),de=ht("WeakMap.prototype.has",!0),ge=ht("Map.prototype.get",!0),me=ht("Map.prototype.set",!0),be=ht("Map.prototype.has",!0),ve=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},we=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new le("Side channel does not contain "+function t(e,r,n,o){var i=r||{};if(ee(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ee(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=!ee(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ee(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(ee(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=i.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return function t(e,r){if(e.length>r.maxStringLength){var n=e.length-r.maxStringLength,o="... "+n+" more character"+(n>1?"s":"");return t(xt.call(e,0,r.maxStringLength),r)+o}return Qt(Rt.call(Rt.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,oe),"single",r)}(e,i);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var c=String(e);return s?Gt(e,c):c}if("bigint"==typeof e){var u=String(e)+"n";return s?Gt(e,u):u}var l=void 0===i.depth?5:i.depth;if(void 0===n&&(n=0),n>=l&&l>0&&"object"==typeof e)return Kt(e)?"[Array]":"[Object]";var p,f=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=Mt.call(Array(t.indent+1)," ")}return{base:r,prev:Mt.call(Array(e+1),r)}}(i,n);if(void 0===o)o=[];else if(ne(o,e)>=0)return"[Circular]";function y(e,r,a){if(r&&(o=Dt.call(o)).push(r),a){var s={depth:i.depth};return ee(i,"quoteStyle")&&(s.quoteStyle=i.quoteStyle),t(e,s,n+1,o)}return t(e,i,n+1,o)}if("function"==typeof e&&!Yt(e)){var h=function(t){if(t.name)return t.name;var e=kt.call(Pt.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),d=ue(e,y);return"[Function"+(h?": "+h:" (anonymous)")+"]"+(d.length>0?" { "+Mt.call(d,", ")+" }":"")}if(Zt(e)){var g=Wt?Rt.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Bt.call(e);return"object"!=typeof e||Wt?g:ie(g)}if((p=e)&&"object"==typeof p&&("undefined"!=typeof HTMLElement&&p instanceof HTMLElement||"string"==typeof p.nodeName&&"function"==typeof p.getAttribute)){for(var m="<"+Ct.call(String(e.nodeName)),b=e.attributes||[],w=0;w<b.length;w++)m+=" "+b[w].name+"="+Qt(Xt(b[w].value),"double",i);return m+=">",e.childNodes&&e.childNodes.length&&(m+="..."),m+"</"+Ct.call(String(e.nodeName))+">"}if(Kt(e)){if(0===e.length)return"[]";var _=ue(e,y);return f&&!function(t){for(var e=0;e<t.length;e++)if(ne(t[e],"\n")>=0)return!1;return!0}(_)?"["+ce(_,f)+"]":"[ "+Mt.call(_,", ")+" ]"}if(function(t){return!("[object Error]"!==re(t)||Ht&&"object"==typeof t&&Ht in t)}(e)){var S=ue(e,y);return"cause"in Error.prototype||!("cause"in e)||zt.call(e,"cause")?0===S.length?"["+String(e)+"]":"{ ["+String(e)+"] "+Mt.call(S,", ")+" }":"{ ["+String(e)+"] "+Mt.call(Ft.call("[cause]: "+y(e.cause),S),", ")+" }"}if("object"==typeof e&&a){if(Vt&&"function"==typeof e[Vt]&&v)return v(e,{depth:l-n});if("symbol"!==a&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!mt||!t||"object"!=typeof t)return!1;try{mt.call(t);try{_t.call(t)}catch(m){return!0}return t instanceof Map}catch(Fr){}return!1}(e)){var A=[];return bt.call(e,(function(t,r){A.push(y(r,e,!0)+" => "+y(t,e))})),se("Map",mt.call(e),A,f)}if(function(t){if(!_t||!t||"object"!=typeof t)return!1;try{_t.call(t);try{mt.call(t)}catch(e){return!0}return t instanceof Set}catch(Fr){}return!1}(e)){var O=[];return St.call(e,(function(t){O.push(y(t,e))})),se("Set",_t.call(e),O,f)}if(function(t){if(!At||!t||"object"!=typeof t)return!1;try{At.call(t,At);try{Ot.call(t,Ot)}catch(m){return!0}return t instanceof WeakMap}catch(Fr){}return!1}(e))return ae("WeakMap");if(function(t){if(!Ot||!t||"object"!=typeof t)return!1;try{Ot.call(t,Ot);try{At.call(t,At)}catch(m){return!0}return t instanceof WeakSet}catch(Fr){}return!1}(e))return ae("WeakSet");if(function(t){if(!jt||!t||"object"!=typeof t)return!1;try{return jt.call(t),!0}catch(Fr){}return!1}(e))return ae("WeakRef");if(function(t){return!("[object Number]"!==re(t)||Ht&&"object"==typeof t&&Ht in t)}(e))return ie(y(Number(e)));if(function(t){if(!t||"object"!=typeof t||!Lt)return!1;try{return Lt.call(t),!0}catch(Fr){}return!1}(e))return ie(y(Lt.call(e)));if(function(t){return!("[object Boolean]"!==re(t)||Ht&&"object"==typeof t&&Ht in t)}(e))return ie(Et.call(e));if(function(t){return!("[object String]"!==re(t)||Ht&&"object"==typeof t&&Ht in t)}(e))return ie(y(String(e)));if(!function(t){return!("[object Date]"!==re(t)||Ht&&"object"==typeof t&&Ht in t)}(e)&&!Yt(e)){var j=ue(e,y),E=$t?$t(e)===Object.prototype:e instanceof Object||e.constructor===Object,T=e instanceof Object?"":"null prototype",P=!E&&Ht&&Object(e)===e&&Ht in e?xt.call(re(e),8,-1):T?"Object":"",k=(E||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(P||T?"["+Mt.call(Ft.call([],P||[],T||[]),": ")+"] ":"");return 0===j.length?k+"{}":f?k+"{"+ce(j,f)+"}":k+"{ "+Mt.call(j,", ")+" }"}return String(e)}(t))},get:function(n){if(pe&&n&&("object"==typeof n||"function"==typeof n)){if(t)return ye(t,n)}else if(fe){if(e)return ge(e,n)}else if(r)return function(t,e){var r=ve(t,e);return r&&r.value}(r,n)},has:function(n){if(pe&&n&&("object"==typeof n||"function"==typeof n)){if(t)return de(t,n)}else if(fe){if(e)return be(e,n)}else if(r)return function(t,e){return!!ve(t,e)}(r,n);return!1},set:function(n,o){pe&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new pe),he(t,n,o)):fe?(e||(e=new fe),me(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=ve(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n},_e=String.prototype.replace,Se=/%20/g,Ae={default:"RFC3986",formatters:{RFC1738:function(t){return _e.call(t,Se,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:"RFC3986"},Oe=Object.prototype.hasOwnProperty,je=Array.isArray,Ee=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),Te={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),s=0;s<a.length;++s){var c=a[s],u=i[c];"object"==typeof u&&null!==u&&-1===r.indexOf(u)&&(e.push({obj:i,prop:c}),r.push(u))}return function(t){for(;t.length>1;){var e=t.pop(),r=e.obj[e.prop];if(je(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(Fr){return n}},encode:function(t,e,r,n,o){if(0===t.length)return t;var i=t;if("symbol"==typeof t?i=Symbol.prototype.toString.call(t):"string"!=typeof t&&(i=String(t)),"iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var a="",s=0;s<i.length;++s){var c=i.charCodeAt(s);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===Ae.RFC1738&&(40===c||41===c)?a+=i.charAt(s):c<128?a+=Ee[c]:c<2048?a+=Ee[192|c>>6]+Ee[128|63&c]:c<55296||c>=57344?a+=Ee[224|c>>12]+Ee[128|c>>6&63]+Ee[128|63&c]:(s+=1,c=65536+((1023&c)<<10|1023&i.charCodeAt(s)),a+=Ee[240|c>>18]+Ee[128|c>>12&63]+Ee[128|c>>6&63]+Ee[128|63&c])}return a},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(je(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"!=typeof r){if(je(e))e.push(r);else{if(!e||"object"!=typeof e)return[e,r];(n&&(n.plainObjects||n.allowPrototypes)||!Oe.call(Object.prototype,r))&&(e[r]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(r);var o=e;return je(e)&&!je(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)),je(e)&&je(r)?(r.forEach((function(r,o){if(Oe.call(e,o)){var i=e[o];i&&"object"==typeof i&&r&&"object"==typeof 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 Oe.call(e,o)?e[o]=t(e[o],i,n):e[o]=i,e}),o)}},Pe=Object.prototype.hasOwnProperty,ke={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},xe=Array.isArray,Re=String.prototype.split,Ie=Array.prototype.push,Ce=function(t,e){Ie.apply(t,xe(e)?e:[e])},Ne=Date.prototype.toISOString,Fe=Ae.default,Me={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Te.encode,encodeValuesOnly:!1,format:Fe,formatter:Ae.formatters[Fe],indices:!1,serializeDate:function(t){return Ne.call(t)},skipNulls:!1,strictNullHandling:!1},De={},Ue=function t(e,r,n,o,i,a,s,c,u,l,p,f,y,h,d){for(var g,m=e,b=d,v=0,w=!1;void 0!==(b=b.get(De))&&!w;){var _=b.get(e);if(v+=1,void 0!==_){if(_===v)throw new RangeError("Cyclic object value");w=!0}void 0===b.get(De)&&(v=0)}if("function"==typeof s?m=s(r,m):m instanceof Date?m=l(m):"comma"===n&&xe(m)&&(m=Te.maybeMap(m,(function(t){return t instanceof Date?l(t):t}))),null===m){if(o)return a&&!y?a(r,Me.encoder,h,"key",p):r;m=""}if("string"==typeof(g=m)||"number"==typeof g||"boolean"==typeof g||"symbol"==typeof g||"bigint"==typeof g||Te.isBuffer(m)){if(a){var S=y?r:a(r,Me.encoder,h,"key",p);if("comma"===n&&y){for(var A=Re.call(String(m),","),O="",j=0;j<A.length;++j)O+=(0===j?"":",")+f(a(A[j],Me.encoder,h,"value",p));return[f(S)+"="+O]}return[f(S)+"="+f(a(m,Me.encoder,h,"value",p))]}return[f(r)+"="+f(String(m))]}var E,T=[];if(void 0===m)return T;if("comma"===n&&xe(m))E=[{value:m.length>0?m.join(",")||null:void 0}];else if(xe(s))E=s;else{var P=Object.keys(m);E=c?P.sort(c):P}for(var k=0;k<E.length;++k){var x=E[k],R="object"==typeof x&&void 0!==x.value?x.value:m[x];if(!i||null!==R){var I=xe(m)?"function"==typeof n?n(r,x):r:r+(u?"."+x:"["+x+"]");d.set(e,v);var C=we();C.set(De,d),Ce(T,t(R,I,n,o,i,a,s,c,u,l,p,f,y,h,C))}}return T},Le=(Object.prototype.hasOwnProperty,Array.isArray,{stringify:function(t,e){var r,n=t,o=function(t){if(!t)return Me;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||Me.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Ae.default;if(void 0!==t.format){if(!Pe.call(Ae.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var n=Ae.formatters[r],o=Me.filter;return("function"==typeof t.filter||xe(t.filter))&&(o=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:Me.addQueryPrefix,allowDots:void 0===t.allowDots?Me.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:Me.charsetSentinel,delimiter:void 0===t.delimiter?Me.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:Me.encode,encoder:"function"==typeof t.encoder?t.encoder:Me.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:Me.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:Me.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:Me.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:Me.strictNullHandling}}(e);"function"==typeof o.filter?n=(0,o.filter)("",n):xe(o.filter)&&(r=o.filter);var i,a=[];if("object"!=typeof n||null===n)return"";i=e&&e.arrayFormat in ke?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var s=ke[i];r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var c=we(),u=0;u<r.length;++u){var l=r[u];o.skipNulls&&null===n[l]||Ce(a,Ue(n[l],l,s,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,c))}var p=a.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&"),p.length>0?f+p:""}}),qe={};function Be(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 We(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)?We(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,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function We(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}qe.type=t=>t.split(/ *; */).shift(),qe.params=t=>{const e={};var r,n=Be(t.split(/ *; */));try{for(n.s();!(r=n.n()).done;){const t=r.value.split(/ *= */),n=t.shift(),o=t.shift();n&&o&&(e[n]=o)}}catch(o){n.e(o)}finally{n.f()}return e},qe.parseLinks=t=>{const e={};var r,n=Be(t.split(/ *, */));try{for(n.s();!(r=n.n()).done;){const t=r.value.split(/ *; */),n=t[0].slice(1,-1);e[t[1].split(/ *= */)[1].slice(1,-1)]=n}}catch(o){n.e(o)}finally{n.f()}return e},qe.isObject=t=>null!==t&&"object"==typeof t,qe.hasOwn=Object.hasOwn||function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(new Object(t),e)},qe.mixin=(t,e)=>{for(const r in e)qe.hasOwn(e,r)&&(t[r]=e[r])};var He,ze,$e,Ge=He={};function Je(){throw new Error("setTimeout has not been defined")}function Ve(){throw new Error("clearTimeout has not been defined")}function Qe(t){if(ze===setTimeout)return setTimeout(t,0);if((ze===Je||!ze)&&setTimeout)return ze=setTimeout,setTimeout(t,0);try{return ze(t,0)}catch(Fr){try{return ze.call(null,t,0)}catch(Fr){return ze.call(this,t,0)}}}!function(){try{ze="function"==typeof setTimeout?setTimeout:Je}catch(Fr){ze=Je}try{$e="function"==typeof clearTimeout?clearTimeout:Ve}catch(Fr){$e=Ve}}();var Xe,Ke=[],Ye=!1,Ze=-1;function tr(){Ye&&Xe&&(Ye=!1,Xe.length?Ke=Xe.concat(Ke):Ze=-1,Ke.length&&er())}function er(){if(!Ye){var t=Qe(tr);Ye=!0;for(var e=Ke.length;e;){for(Xe=Ke,Ke=[];++Ze<e;)Xe&&Xe[Ze].run();Ze=-1,e=Ke.length}Xe=null,Ye=!1,function(t){if($e===clearTimeout)return clearTimeout(t);if(($e===Ve||!$e)&&clearTimeout)return $e=clearTimeout,clearTimeout(t);try{$e(t)}catch(Fr){try{return $e.call(null,t)}catch(Fr){return $e.call(this,t)}}}(t)}}function rr(t,e){this.fun=t,this.array=e}function nr(){}Ge.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];Ke.push(new rr(t,e)),1!==Ke.length||Ye||Qe(er)},rr.prototype.run=function(){this.fun.apply(null,this.array)},Ge.title="browser",Ge.browser=!0,Ge.env={},Ge.argv=[],Ge.version="",Ge.versions={},Ge.on=nr,Ge.addListener=nr,Ge.once=nr,Ge.off=nr,Ge.removeListener=nr,Ge.removeAllListeners=nr,Ge.emit=nr,Ge.prependListener=nr,Ge.prependOnceListener=nr,Ge.listeners=function(t){return[]},Ge.binding=function(t){throw new Error("process.binding is not supported")},Ge.cwd=function(){return"/"},Ge.chdir=function(t){throw new Error("process.chdir is not supported")},Ge.umask=function(){return 0};var or={};(function(t){(function(){"use strict";const e=qe.isObject,r=qe.hasOwn;function n(){}or=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"!=typeof t)return this._timeout=t,this._responseTimeout=0,this._uploadTimeout=0,this;for(const e in t)if(r(t,e))switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;case"upload":this._uploadTimeout=t.upload;break;default:console.warn("Unknown timeout option",e)}return this},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};const 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{const r=this._retryCallback(t,e);if(!0===r)return!0;if(!1===r)return!1}catch(r){console.error(r)}if(e&&e.status&&i.has(e.status))return!0;if(t){if(t.code&&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){if(!this._fullfilledPromise){const t=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((e,r)=>{t.on("abort",()=>{if(this._maxRetries&&this._maxRetries>this._retries)return;if(this.timedout&&this.timedoutError)return void r(this.timedoutError);const t=new Error("Aborted");t.code="ABORTED",t.status=this.status,t.method=this.method,t.url=this.url,r(t)}),t.end((t,n)=>{t?r(t):e(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,n){if(e(t)){for(const e in t)r(t,e)&&this.set(e,t[e]);return this}return this._header[t.toLowerCase()]=n,this.header[t]=n,this},n.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},n.prototype.field=function(t,n,o){if(null==t)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(e(t)){for(const e in t)r(t,e)&&this.field(e,t[e]);return this}if(Array.isArray(n)){for(const e in n)r(n,e)&&this.field(t,n[e]);return this}if(null==n)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof n&&(n=String(n)),o?this._getFormData().append(t,n,o):this._getFormData().append(t,n),this},n.prototype.abort=function(){if(this._aborted)return this;if(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req){if(v.gte(t.version,"v13.0.0")&&v.lt(t.version,"v14.0.0"))throw new Error("Superagent does not work in v13 properly with abort() due to Node.js core changes");v.gte(t.version,"v14.0.0")&&(this.req.destroyed=!0),this.req.abort()}return this.clearTimeout(),this.emit("abort"),this},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){const n=e(t);let o=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(n&&!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(n&&e(this._data))for(const e in t)r(t,e)&&(this._data[e]=t[e]);else"string"==typeof t?(o||this.type("form"),(o=this._header["content-type"])&&(o=o.toLowerCase().trim()),this._data="application/x-www-form-urlencoded"===o?this._data?"".concat(this._data,"&").concat(t):t:(this._data||"")+t):this._data=t;return!n||this._isHost(t)||o||this.type("json"),this},n.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},n.prototype._finalizeQueryString=function(){const t=this._query.join("&");if(t&&(this.url+=(this.url.includes("?")?"&":"?")+t),this._query.length=0,this._sort){const t=this.url.indexOf("?");if(t>=0){const e=this.url.slice(t+1).split("&");"function"==typeof this._sort?e.sort(this._sort):e.sort(),this.url=this.url.slice(0,t)+"?"+e.join("&")}}},n.prototype._appendQueryString=()=>{console.warn("Unsupported")},n.prototype._timeoutError=function(t,e,r){if(this._aborted)return;const 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(){const t=this;this._timeout&&!this._timer&&(this._timer=setTimeout(()=>{t._timeoutError("Timeout of ",t._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(()=>{t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}}).call(this)}).call(this,He);var ir;function ar(){}ir=ar,ar.prototype.get=function(t){return this.header[t.toLowerCase()]},ar.prototype._setHeaderProperties=function(t){const e=t["content-type"]||"";this.type=qe.type(e);const r=qe.params(e);for(const o in r)Object.prototype.hasOwnProperty.call(r,o)&&(this[o]=r[o]);this.links={};try{t.link&&(this.links=qe.parseLinks(t.link))}catch(n){}},ar.prototype._setStatusProperties=function(t){const e=Math.trunc(t/100);this.statusCode=t,this.status=this.statusCode,this.statusType=e,this.info=1===e,this.ok=2===e,this.redirect=3===e,this.clientError=4===e,this.serverError=5===e,this.error=(4===e||5===e)&&this.toError(),this.created=201===t,this.accepted=202===t,this.noContent=204===t,this.badRequest=400===t,this.unauthorized=401===t,this.notAcceptable=406===t,this.forbidden=403===t,this.notFound=404===t,this.unprocessableEntity=422===t};var sr={};function cr(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 ur(){this._defaults=[]}for(var lr=0,pr=["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"];lr<pr.length;lr++){const t=pr[lr];ur.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}}ur.prototype._setDefaults=function(t){var e,r=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 cr(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)?cr(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,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}(this._defaults);try{for(r.s();!(e=r.n()).done;){const r=e.value;t[r.fn](...r.args)}}catch(n){r.e(n)}finally{r.f()}},sr=ur;var fr={};function yr(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}let hr;"undefined"!=typeof window?hr=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),hr=void 0):hr=self;const dr=qe.isObject,gr=qe.mixin,mr=qe.hasOwn;function br(){}const vr=fr=fr=function(t,e){return"function"==typeof e?new fr.Request("GET",t).end(e):1===arguments.length?new fr.Request("GET",t):new fr.Request(t,e)};fr.Request=Er,vr.getXHR=()=>{if(hr.XMLHttpRequest)return new hr.XMLHttpRequest;throw new Error("Browser-only version of superagent could not find XHR")};const wr="".trim?t=>t.trim():t=>t.replace(/(^\s*|\s*$)/g,"");function _r(t){if(!dr(t))return t;const e=[];for(const r in t)mr(t,r)&&Sr(e,r,t[r]);return e.join("&")}function Sr(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 yr(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)?yr(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,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}(r);try{for(o.s();!(n=o.n()).done;)Sr(t,e,n.value)}catch(i){o.e(i)}finally{o.f()}}else if(dr(r))for(const a in r)mr(r,a)&&Sr(t,"".concat(e,"[").concat(a,"]"),r[a]);else t.push(encodeURI(e)+"="+encodeURIComponent(r));else t.push(encodeURI(e))}function Ar(t){const e={},r=t.split("&");let n,o;for(let i=0,a=r.length;i<a;++i)-1===(o=(n=r[i]).indexOf("="))?e[decodeURIComponent(n)]="":e[decodeURIComponent(n.slice(0,o))]=decodeURIComponent(n.slice(o+1));return e}function Or(t){return/[/+]json($|[^-\w])/i.test(t)}function jr(t){this.req=t,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;let e=this.xhr.status;1223===e&&(e=204),this._setStatusProperties(e),this.headers=function(t){const e=t.split(/\r?\n/),r={};let n,o,i,a;for(let s=0,c=e.length;s<c;++s)-1!==(n=(o=e[s]).indexOf(":"))&&(i=o.slice(0,n).toLowerCase(),a=wr(o.slice(n+1)),r[i]=a);return r}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&t._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function Er(t,e){const r=this;this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",()=>{let t,e=null,n=null;try{n=new jr(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=t.status||n.status,r.callback(t,n)):r.callback(null,n)})}vr.serializeObject=_r,vr.parseString=Ar,vr.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"},vr.serialize={"application/x-www-form-urlencoded":Le.stringify,"application/json":_},vr.parse={"application/x-www-form-urlencoded":Ar,"application/json":JSON.parse},gr(jr.prototype,ir.prototype),jr.prototype._parseBody=function(t){let e=vr.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&Or(this.type)&&(e=vr.parse["application/json"]),e&&t&&(t.length>0||t instanceof Object)?e(t):null)},jr.prototype.toError=function(){const 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},vr.Response=jr,x(Er.prototype),gr(Er.prototype,or.prototype),Er.prototype.type=function(t){return this.set("Content-Type",vr.types[t]||t),this},Er.prototype.accept=function(t){return this.set("Accept",vr.types[t]||t),this},Er.prototype.auth=function(t,e,r){1===arguments.length&&(e=""),"object"==typeof e&&null!==e&&(r=e,e=""),r||(r={type:"function"==typeof btoa?"basic":"auto"});const n=r.encoder?r.encoder:t=>{if("function"==typeof btoa)return btoa(t);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(t,e,r,n)},Er.prototype.query=function(t){return"string"!=typeof t&&(t=_r(t)),t&&this._query.push(t),this},Er.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},Er.prototype._getFormData=function(){return this._formData||(this._formData=new hr.FormData),this._formData},Er.prototype.callback=function(t,e){if(this._shouldRetry(t,e))return this._retry();const r=this._callback;this.clearTimeout(),t&&(this._maxRetries&&(t.retries=this._retries-1),this.emit("error",t)),r(t,e)},Er.prototype.crossDomainError=function(){const t=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");t.crossDomain=!0,t.status=this.status,t.method=this.method,t.url=this.url,this.callback(t)},Er.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},Er.prototype.ca=Er.prototype.agent,Er.prototype.buffer=Er.prototype.ca,Er.prototype.write=()=>{throw new Error("Streaming is not supported in browser version of superagent")},Er.prototype.pipe=Er.prototype.write,Er.prototype._isHost=function(t){return t&&"object"==typeof t&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},Er.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||br,this._finalizeQueryString(),this._end()},Er.prototype._setUploadTimeout=function(){const t=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout(()=>{t._timeoutError("Upload timeout of ",t._uploadTimeout,"ETIMEDOUT")},this._uploadTimeout))},Er.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));const t=this;this.xhr=vr.getXHR();const e=this.xhr;let r=this._formData||this._data;this._setTimeouts(),e.addEventListener("readystatechange",()=>{const r=e.readyState;if(r>=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4!==r)return;let n;try{n=e.status}catch(o){n=0}if(!n){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")});const n=(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(o){}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(o){return this.callback(o)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof r&&!this._isHost(r)){const t=this._header["content-type"];let e=this._serializer||vr.serialize[t?t.split(";")[0]:""];!e&&Or(t)&&(e=vr.serialize["application/json"]),e&&(r=e(r))}for(const i in this.header)null!==this.header[i]&&mr(this.header,i)&&e.setRequestHeader(i,this.header[i]);this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0===r?null:r)},vr.agent=()=>new sr;for(var Tr=0,Pr=["GET","POST","OPTIONS","PATCH","PUT","DELETE"];Tr<Pr.length;Tr++){const t=Pr[Tr];sr.prototype[t.toLowerCase()]=function(e,r){const n=new vr.Request(t,e);return this._setDefaults(n),r&&n.end(r),n}}function kr(t,e,r){const n=vr("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,vr.get=(t,e,r)=>{const n=vr("GET",t);return"function"==typeof e&&(r=e,e=null),e&&n.query(e),r&&n.end(r),n},vr.head=(t,e,r)=>{const n=vr("HEAD",t);return"function"==typeof e&&(r=e,e=null),e&&n.query(e),r&&n.end(r),n},vr.options=(t,e,r)=>{const n=vr("OPTIONS",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},vr.del=kr,vr.delete=kr,vr.patch=(t,e,r)=>{const n=vr("PATCH",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},vr.post=(t,e,r)=>{const n=vr("POST",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},vr.put=(t,e,r)=>{const n=vr("PUT",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n};var xr={};Object.defineProperty(xr,"__esModule",{value:!0}),xr.boolean=void 0,xr.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 Rr={};Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.isBooleanable=void 0,Rr.isBooleanable=function(t){switch(Object.prototype.toString.call(t)){case"[object String]":return["true","t","yes","y","on","1","false","f","no","n","off","0"].includes(t.trim().toLowerCase());case"[object Number]":return[0,1].includes(t.valueOf());case"[object Boolean]":return!0;default:return!1}};var Ir={};Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.boolean=void 0,Object.defineProperty(Ir,"boolean",{enumerable:!0,get:function(){return xr.boolean}}),Object.defineProperty(Ir,"isBooleanable",{enumerable:!0,get:function(){return Rr.isBooleanable}});var Cr="9.0.0",Nr={};return function(t){(function(){"use strict";const{boolean:e}=Ir,r=new Set(["config","log"]),n=["trace","debug","info","warn","error","fatal"],o={warning:"warn",err:"error"},i="`level` invalid, must be: ".concat(n.join(", "));function a(t){return null==t||"object"==typeof t&&0===Object.keys(t).length||"string"==typeof t&&0===t.trim().length}function s(t){return void 0===t}function c(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function l(t){return"string"==typeof t}function p(t){return"function"==typeof t}Nr=class{constructor(){var o=this;let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=Object.assign({key:"",endpoint:"https://api.cabinjs.com",headers:{},timeout:5e3,retry:3,showStack:!t.env.SHOW_STACK||e(t.env.SHOW_STACK),meta:{show:!t.env.SHOW_META||e(t.env.SHOW_META),showApp:!!t.env.SHOW_META_APP&&e(t.env.SHOW_META_APP),omittedFields:t.env.OMIT_META_FIELDS?t.env.OMIT_META_FIELDS.split(",").map(t=>t.trim()):[]},silent:!1,logger:console,name:!1,level:"info",levels:["info","warn","error","fatal"],capture:!1,callback:!1,appInfo:!t.env.APP_INFO||e(t.env.APP_INFO)},i),this.config.showMeta&&(this.config.meta.show=this.config.showMeta,delete this.config.showMeta),this.appInfo=!!this.config.appInfo&&!!p(v)&&v(),this.log=this.log.bind(this);const a=Object.keys(this.config.logger).filter(t=>!r.has(t));for(const t of a)this[t]=this.config.logger[t];for(const t of n)this[t]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return o.log(t,...Array.prototype.slice.call(r))};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}setCallback(t){this.config.callback=t}setLevel(t){if(!l(t)||!n.includes(t))throw new Error(i);l(this.config.logger.logLevel)?this.config.logger.logLevel=t:this.config.logger.level=t,this.config.levels=n.slice(n.indexOf(t))}getNormalizedLevel(t){return l(t)?l(o[t])?o[t]:n.includes(t)?t:"info":"info"}setName(t){if(!l(t))throw new Error("`name` must be a String");l(this.config.logger.scope)?this.config.logger.scope=t:this.config.logger.name=t}log(e,r,i){const f=[];s(e)||f.push(e),s(r)||f.push(r),s(i)||f.push(i);for(var y=arguments.length,h=new Array(y>3?y-3:0),v=3;v<y;v++)h[v-3]=arguments[v];for(const t of Array.prototype.slice.call(h))f.push(t);const{config:S}=this;let A=0;l(e)&&l(o[e])?e=o[e]:m(e)?(i=r,r=e,e="error"):l(e)&&n.includes(e)||(i=r,r=e,e=this.getNormalizedLevel(e),A=-1);let O=!1;if((c(r)||Array.isArray(r))&&l(i)){O=!0;const t=i;i=r,r=l(t)&&f.length>=3+A?d(...f.slice(2+A)):t}s(r)&&(r=e),1!==f.slice(1+A).length||l(r)||m(r)?!O&&f.length>=4+A?(r=d(...f.slice(1+A)),i={}):!O&&f.length===3+A&&l(r)&&g.some(t=>r.includes(t))?(r=d(r,i),i={}):m(r)||(m(i)?i={err:w(i)}:c(i)||s(i)||null===i?l(r)||(r=d(r)):(r=d(r,i),i={})):(i={message:r},r=e),s(i)||c(i)?c(i)||(i={}):i={meta:i};const j=c(i.err);let E;m(r)?(E=r,j||(i.err=w(E)),({message:r}=r)):m(i.err)&&(E=i.err);const T=p(S.callback)&&(!("boolean"==typeof i.callback)||i.callback);(i=b(i,["callback"])).level=e,this.appInfo&&(i.app=this.appInfo);const P=_({message:r,meta:i});if(S.capture&&S.levels.includes(e)&&(!m(E)||!E._captureFailed)){if("https://api.cabinjs.com"===S.endpoint&&!S.key)throw new Error("Cabin API key required (e.g. `{ key: 'YOUR-CABIN-API-KEY' })`)\n<https://cabinjs.com>");const e=fr.post(S.endpoint).set("X-Request-Id",u()).timeout(S.timeout);t.browser||e.set("User-Agent","axe/".concat(Cr)),S.key&&e.auth(S.key),a(S.headers)||e.set(S.headers),e.type("application/json").send(P).retry(S.retry).end(t=>{t&&(t._captureFailed=!0,this.config.logger.error(t))})}if(T&&S.callback(e,r,i),S.silent)return P;if(!S.levels.includes(e))return P;let k=e;-1===A?k="log":"fatal"===e&&(k="error");const x=[...this.config.meta.omittedFields];x.push("level"),j||x.push("err"),this.config.meta.showApp||x.push("app");const R=b(i,x);return m(E)&&S.showStack?!S.meta.show||a(R)?this.config.logger[k](E):this.config.logger[k](E,R):!S.meta.show||a(R)?this.config.logger[k](r):this.config.logger[k](r,R),P}}}).call(this)}.call(this,He),Nr}));
|
|
1
|
+
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Axe=e()}}((function(){!function(e){"use strict";e.console||(e.console={});for(var t,r,n=e.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(",");t=i.pop();)n[t]||(n[t]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window);const e=Symbol("kErrors");class t extends Error{constructor(t){const o=new Set(t.map(i).filter(Boolean));super(Array.from(o).join("; ")),r(this,"name","CombinedError"),r(this,e,t),n(this,"stack",()=>t.map(s).join("\n\n")),n(this,"transient",()=>t.length>0&&t.every(c)),n(this,"expected",()=>t.length>0&&t.every(a))}[Symbol.iterator](){return this[e][Symbol.iterator]()}}function r(e,t,r){Object.defineProperty(e,t,{value:r})}function n(e,t,r){Object.defineProperty(e,t,{get:r})}function o(e){return null!=e}function i(e){return e.message}function s(e){return e.stack}function c(e){return!0===e.transient}function a(e){return!0===e.expected}var f=function(e){var t=Array.prototype.slice.call(arguments,1);return t.length&&(e=e.toString().replace(/(%?)(%([jds]))/g,(function(e,r,n,o){var i=t.shift();switch(o){case"s":i=""+i;break;case"d":i=Number(i);break;case"j":i=JSON.stringify(i)}return r?(t.unshift(i),e):i}))),t.length&&(e=e.toString()+" "+t.join(" ")),""+e.toString().replace(/%{2,2}/g,"%")},l=["%s","%d","%i","%f","%j","%o","%O","%%"],u=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(n=e,"[object Object]"!==Object.prototype.toString.call(n)||!t)return e;var n;const o=Array.isArray(t)?t:String(t).split(r),{length:i}=o;return i<2?e[o[0]]:((e,t,r)=>{for(let n=0;n<r;n++){if(null===e)return;const r=e[t[n]];if(void 0===r)return;e=r}return e})(e,o,i)},g=function(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return e instanceof Error}},p=e=>{if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype};const{hasOwnProperty:h}=Object.prototype,{propertyIsEnumerable:y}=Object,d=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0}),b=this,m={concatArrays:!1,ignoreUndefined:!1},v=e=>{const t=[];for(const r in e)h.call(e,r)&&t.push(r);if(Object.getOwnPropertySymbols){const r=Object.getOwnPropertySymbols(e);for(const n of r)y.call(e,n)&&t.push(n)}return t};function A(e){return Array.isArray(e)?function(e){const t=e.slice(0,0);return v(e).forEach(r=>{d(t,r,A(e[r]))}),t}(e):p(e)?function(e){const t=null===Object.getPrototypeOf(e)?Object.create(null):{};return v(e).forEach(r=>{d(t,r,A(e[r]))}),t}(e):e}const j=(e,t,r,n)=>(r.forEach(r=>{void 0===t[r]&&n.ignoreUndefined||(r in e&&e[r]!==Object.getPrototypeOf(e)?d(e,r,O(e[r],t[r],n)):d(e,r,A(t[r])))}),e);function O(e,t,r){return r.concatArrays&&Array.isArray(e)&&Array.isArray(t)?((e,t,r)=>{let n=e.slice(0,0),o=0;return[e,t].forEach(t=>{const i=[];for(let r=0;r<t.length;r++)h.call(t,r)&&(i.push(String(r)),d(n,o++,t===e?t[r]:A(t[r])));n=j(n,t,v(t).filter(e=>!i.includes(e)),r)}),n})(e,t,r):p(t)&&p(e)?j(e,t,v(t),r):A(t)}var w={};const E=async(e,t)=>{const r=[];let n=0;for(const o of e)r.push(await t(await o,n++));return r};(w=E).default=E;var S={},_=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!g(e))throw new Error("`err` must be an Error");if(!Array.isArray(t))throw new Error("`fields` must be an Array");var r={};return Object.getOwnPropertyNames(Object.getPrototypeOf(e)).concat(Object.getOwnPropertyNames(e)).forEach((function(t){"function"!=typeof e[t]&&(r[t]=e[t])})),!r.name&&e.constructor.name&&(r.name=e.constructor.name),Array.isArray(t)&&0!==t.length?r.filter((function(e){return t.includes(e)})):r};const T=e=>"object"==typeof e||"function"==typeof e,k=(e,t)=>"__proto__"==e||"constructor"==e&&"function"==typeof t.constructor;var P=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".";if(!T(e)||!t||!t.length)return e;const o=Array.isArray(t)?t:String(t).split(n);if(k(o[0],e))return e;const{length:i}=o;return 1===i?(e[o[0]]=r,e):((e,t,r,n)=>{let o=e,i=0;for(;i<r-1;i++){const e=t[i];k(e,o)||(o=T(o[e])?o[e]:o[e]={})}return o[t[i]]=n,e})(e,o,i,r)},x=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)};function I(e,t,r){return"function"==typeof r.join?r.join(e):e[0]+t+e[1]}function L(e,t,r){return"function"!=typeof r.isValid||r.isValid(e,t)}function F(e){return x(e)||Array.isArray(e)||"function"==typeof e}var M=Object.prototype.toString;function N(e){return"function"==typeof e.constructor?e.constructor.name:null}var C=function e(t){switch(function(e){if(void 0===e)return"undefined";if(null===e)return"null";var t=typeof e;if("boolean"===t)return"boolean";if("string"===t)return"string";if("number"===t)return"number";if("symbol"===t)return"symbol";if("function"===t)return"GeneratorFunction"===N(e)?"generatorfunction":"function";if(function(e){return Array.isArray?Array.isArray(e):e instanceof Array}(e))return"array";if(function(e){return!(!e.constructor||"function"!=typeof e.constructor.isBuffer)&&e.constructor.isBuffer(e)}(e))return"buffer";if(function(e){try{if("number"==typeof e.length&&"function"==typeof e.callee)return!0}catch(t){if(-1!==t.message.indexOf("callee"))return!0}return!1}(e))return"arguments";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";if(function(e){return e instanceof RegExp||"string"==typeof e.flags&&"boolean"==typeof e.ignoreCase&&"boolean"==typeof e.multiline&&"boolean"==typeof e.global}(e))return"regexp";switch(N(e)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(e){return"function"==typeof e.throw&&"function"==typeof e.return&&"function"==typeof e.next}(e))return"generator";switch(t=M.call(e)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}(t)){case"boolean":case"date":case"function":case"null":case"number":return!0;case"undefined":return!1;case"regexp":return"(?:)"!==t.source&&""!==t.source;case"buffer":return""!==t.toString();case"error":return""!==t.message;case"string":case"arguments":return 0!==t.length;case"file":case"map":case"set":return 0!==t.size;case"array":case"object":for(const r of Object.keys(t))if(e(t[r]))return!0;return!1;default:return!0}},D=function(e,t,r){return!(null==(n=e)||"object"!=typeof n&&"function"!=typeof n&&!Array.isArray(n)||"string"!=typeof t&&!Array.isArray(t))&&C(function(e,t,r){if(x(r)||(r={default:r}),!F(e))return void 0!==r.default?r.default:e;"number"==typeof t&&(t=String(t));const n=Array.isArray(t),o="string"==typeof t,i=r.separator||".",s=r.joinChar||("string"==typeof i?i:".");if(!o&&!n)return e;if(o&&t in e)return L(t,e,r)?e[t]:r.default;let c=n?t:function(e,t,r){return"function"==typeof r.split?r.split(e):e.split(t)}(t,i,r),a=c.length,f=0;do{let t=c[f];for("number"==typeof t&&(t=String(t));t&&"\\"===t.slice(-1);)t=I([t.slice(0,-1),c[++f]||""],s,r);if(t in e){if(!L(t,e,r))return r.default;e=e[t]}else{let n=!1,o=f+1;for(;o<a;)if(n=(t=I([t,c[o++]],s,r))in e){if(!L(t,e,r))return r.default;e=e[t],f=o-1;break}if(!n)return r.default}}while(++f<a&&F(e));return f===a?e:r.default}(e,t,r));var n};const X=e=>{if((e=>"__proto__"===e||"constructor"===e||"prototype"===e)(e))throw new Error(`Cannot set unsafe key: "${e}"`)};var B=function(e,t){if(null==(r=e)||"object"!=typeof r||!1!==Array.isArray(r))throw new TypeError("expected an object.");var r,n=Array.isArray(t);if(!n&&e.hasOwnProperty(t))return delete e[t],!0;if(D(e,t)){for(var o=n?t.slice():t.split("."),i=o.pop();o.length&&"\\"===o[o.length-1].slice(-1);)i=o.pop().slice(0,-1)+"."+i;for(;o.length;)t=o.shift(),X(t),e=e[t];return delete e[i]}return!0},U={};Object.defineProperty(U,"__esModule",{value:!0}),U.boolean=void 0,U.boolean=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return["true","t","yes","y","on","1"].includes(e.trim().toLowerCase());case"[object Number]":return 1===e.valueOf();case"[object Boolean]":return e.valueOf();default:return!1}};var W={};Object.defineProperty(W,"__esModule",{value:!0}),W.isBooleanable=void 0,W.isBooleanable=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return["true","t","yes","y","on","1","false","f","no","n","off","0"].includes(e.trim().toLowerCase());case"[object Number]":return[0,1].includes(e.valueOf());case"[object Boolean]":return!0;default:return!1}};var z={};Object.defineProperty(z,"__esModule",{value:!0}),z.boolean=void 0,Object.defineProperty(z,"boolean",{enumerable:!0,get:function(){return U.boolean}}),Object.defineProperty(z,"isBooleanable",{enumerable:!0,get:function(){return W.isBooleanable}});var R,H,K,V="10.0.0",G=R={};function J(){throw new Error("setTimeout has not been defined")}function $(){throw new Error("clearTimeout has not been defined")}function q(e){if(H===setTimeout)return setTimeout(e,0);if((H===J||!H)&&setTimeout)return H=setTimeout,setTimeout(e,0);try{return H(e,0)}catch(t){try{return H.call(null,e,0)}catch(t){return H.call(this,e,0)}}}!function(){try{H="function"==typeof setTimeout?setTimeout:J}catch(e){H=J}try{K="function"==typeof clearTimeout?clearTimeout:$}catch(e){K=$}}();var Q,Y=[],Z=!1,ee=-1;function te(){Z&&Q&&(Z=!1,Q.length?Y=Q.concat(Y):ee=-1,Y.length&&re())}function re(){if(!Z){var e=q(te);Z=!0;for(var t=Y.length;t;){for(Q=Y,Y=[];++ee<t;)Q&&Q[ee].run();ee=-1,t=Y.length}Q=null,Z=!1,function(e){if(K===clearTimeout)return clearTimeout(e);if((K===$||!K)&&clearTimeout)return K=clearTimeout,clearTimeout(e);try{K(e)}catch(t){try{return K.call(null,e)}catch(t){return K.call(this,e)}}}(e)}}function ne(e,t){this.fun=e,this.array=t}function oe(){}G.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];Y.push(new ne(e,t)),1!==Y.length||Z||q(re)},ne.prototype.run=function(){this.fun.apply(null,this.array)},G.title="browser",G.browser=!0,G.env={},G.argv=[],G.version="",G.versions={},G.on=oe,G.addListener=oe,G.once=oe,G.off=oe,G.removeListener=oe,G.removeAllListeners=oe,G.emit=oe,G.prependListener=oe,G.prependOnceListener=oe,G.listeners=function(e){return[]},G.binding=function(e){throw new Error("process.binding is not supported")},G.cwd=function(){return"/"},G.chdir=function(e){throw new Error("process.chdir is not supported")},G.umask=function(){return 0};var ie={};return function(e){(function(){const{boolean:r}=z,n=new Set(["config","log"]),i=["trace","debug","info","warn","error","fatal"],s={warning:"warn",err:"error"},c="`level` invalid, must be: "+i.join(", ");function a(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function h(e){return null==e||"object"==typeof e&&0===Object.keys(e).length||"string"==typeof e&&0===e.trim().length}function y(e){return void 0===e}function d(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function v(e){return"string"==typeof e}ie=class{constructor(){var t=this;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s={};if(e.env.AXE_REMAPPED_META_FIELDS){const t=e.env.AXE_REMAPPED_META_FIELDS.split(",").map(e=>e.split(":"));for(const[e,r]of t)s[e]=r}this.config=function(){const e=O(A(m),this!==b&&this||{},m);let t={_:{}};for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];for(const i of n)if(void 0!==i){if(!p(i))throw new TypeError("`"+i+"` is not an Option Object");t=O(t,{_:i},e)}return t._}({showStack:!e.env.AXE_SHOW_STACK||r(e.env.AXE_SHOW_STACK),meta:Object.assign({show:!e.env.AXE_SHOW_META||r(e.env.AXE_SHOW_META),remappedFields:s,omittedFields:e.env.AXE_OMIT_META_FIELDS?e.env.AXE_OMIT_META_FIELDS.split(",").map(e=>e.trim()):["level","err","app","args"],pickedFields:e.env.AXE_PICK_META_FIELDS?e.env.AXE_PICK_META_FIELDS.split(",").map(e=>e.trim()):[],cleanupRemapping:!0},"object"==typeof o.meta?o.meta:{}),version:V,silent:!1,logger:console,name:!1,level:"info",levels:["info","warn","error","fatal"],appInfo:!e.env.AXE_APP_INFO||r(e.env.AXE_APP_INFO),hooks:Object.assign({pre:[],post:[]},"object"==typeof o.hooks?o.hooks:{})},o),this.appInfo=!!this.config.appInfo&&"function"==typeof S&&S(),this.log=this.log.bind(this);const c=Object.keys(this.config.logger).filter(e=>!n.has(e));for(const e of c)this[e]=this.config.logger[e];for(const e of i)"function"!=typeof this.config.logger[e]&&("fatal"===e?this.config.logger.fatal=this.config.logger.error||this.config.logger.info||this.config.logger.log:this.config.logger[e]=this.config.logger.info||this.config.logger.log),this[e]=function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.log(e,...Array.prototype.slice.call(n))};this.setLevel=this.setLevel.bind(this),this.getNormalizedLevel=this.getNormalizedLevel.bind(this),this.setName=this.setName.bind(this),this.config.name&&this.setName(this.config.name),this.setLevel(this.config.level),this.err=this.error,this.warning=this.warn,this.pre=function(e,t){this.config.hooks.pre.push((function(r){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return e!==r?[...o]:t(...o)}))},this.post=function(e,t){this.config.hooks.post.push((function(r){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return e!==r?[...o]:t(...o)}))}}setLevel(e){if(!v(e)||-1===i.indexOf(e))throw new Error(c);v(this.config.logger.logLevel)?this.config.logger.logLevel=e:this.config.logger.level=e,this.config.levels=i.slice(i.indexOf(e))}getNormalizedLevel(e){return v(e)?v(s[e])?s[e]:-1===i.indexOf(e)?"info":e:"info"}setName(e){if(!v(e))throw new Error("`name` must be a String");v(this.config.logger.scope)?this.config.logger.scope=e:this.config.logger.name=e}log(e,r,n){const c=[],p=[];y(e)||c.push(e),y(r)||c.push(r),y(n)||c.push(n);for(var b=arguments.length,m=new Array(b>3?b-3:0),A=3;A<b;A++)m[A-3]=arguments[A];for(const t of Array.prototype.slice.call(m))c.push(t);const{config:j}=this;let O=0;if(v(e)&&v(s[e])?e=s[e]:g(e)?(n=r,r=e,e="error"):v(e)&&-1!==i.indexOf(e)||(n=r,r=e,e=this.getNormalizedLevel(e),O=-1),-1===j.levels.indexOf(e))return;let E,S=!1;if((d(r)||Array.isArray(r))&&v(n)){S=!0;const e=n;n=r,r=v(e)&&c.length>=3+O?f(...c.slice(2+O)):e}if(y(r)&&(r=e),1!==c.slice(1+O).length||v(r)||g(r))if(!S&&c.length>=4+O){r=void 0,n={};const t=[];for(const e of c)g(e)?p.push(e):v(e)&&t.push(e);0===p.length&&t.length>0?r=f(...t):p.length>0&&"log"===e&&(e="error")}else if(!S&&c.length===3+O&&v(r)&&l.some(e=>-1!==r.indexOf(e)))r=f(r,n),n={};else if(g(r)){if(g(n)){p.push(n);for(const e of c.slice(2+O))n!==e&&g(e)&&p.push(e);n={}}}else g(n)?(p.push(n),n={}):d(n)||y(n)||null===n?v(r)||(r=f(r)):(r=f(r,n),n={});else n={message:r},r=e;y(n)||d(n)?d(n)||(n={}):n={original_meta:n},g(r)&&(p.unshift(r),r=void 0),d(n.err)&&(g(n.err)&&p.push(n.err),n.original_err=g(n.err)?_(n.err):n.err),p.length>0&&(E=function(e){if(0!==(e=e.filter(o)).length)return 1===e.length?e[0]:new t(e)}(p),n.err=_(E),v(r)||(r=E.message)),n.args=c,n.level=e,this.appInfo&&(n.app=this.appInfo);const T=-1===O?"log":e;if(!h(this.config.meta.remappedFields))for(const t of Object.keys(this.config.meta.remappedFields))if(P(n,this.config.meta.remappedFields[t],u(n,t)),B(n,t),this.config.meta.cleanupRemapping){const e=t.lastIndexOf(".");if(-1===e)continue;const r=t.slice(0,e);h(u(n,r))&&B(n,r)}if(!h(this.config.meta.omittedFields)||!h(this.config.meta.pickedFields)){const e=function(e){const t=[];return function e(r,n){for(const o of Object.keys(r)){const i=r[o],s=n?n+"."+o:o;a(i)?e(i,s):t.push(s)}}(e),t}(n);if(!h(this.config.meta.omittedFields))for(const t of this.config.meta.omittedFields){let r=e.length;for(;r--;)e[r]!==t&&0!==e[r].indexOf(t+".")||e.splice(r,1)}if(!h(this.config.meta.pickedFields))for(const t of this.config.meta.pickedFields){const r=t.indexOf("."),n=t.slice(0,r+1);if(-1!==r){let t=e.length;for(;t--;)0===e[t].indexOf(n)&&e.splice(t,1)}-1===e.indexOf(t)&&e.push(t)}n=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(n=e,"[object Object]"!==Object.prototype.toString.call(n)||!t||!Array.isArray(t)&&"string"!=typeof t)return{};var n;const{length:o}=t;if("string"==typeof t||o<2){const n="string"==typeof t?t:t[0],o=u(e,n,r);return void 0!==o?P({},n,o,r):{}}return((e,t,r,n)=>{const o={};for(let i=0;i<r;i++){const r=t[i],s=u(e,r,n);void 0!==s&&P(o,r,s,n)}return o})(e,t,o,r)}(n,e)}for(const t of this.config.hooks.pre)[E,r,n]=t(T,E,r,n);j.silent||(g(E)&&j.showStack?!j.meta.show||h(n)?this.config.logger[T](E):this.config.logger[T](E,n):!j.meta.show||h(n)?this.config.logger[T](r):this.config.logger[T](r,n)),w(this.config.hooks.post,e=>e(T,E,r,n)).then().catch(e=>{this.config.logger.error(e)})}}}).call(this)}.call(this,R),ie}));
|