Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

opossum

Package Overview
Dependencies
Maintainers
9
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opossum - npm Package Compare versions

Comparing version 7.0.0 to 7.0.1

13

dist/opossum.min.js

@@ -1,13 +0,2 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.circuitBreaker=t():e.circuitBreaker=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){(function(t){var r=n(2),o=n(9);function i(){return(new Date).getTime()}var u,c=Array.prototype.slice,s={};u=void 0!==t&&t.console?t.console:"undefined"!=typeof window&&window.console?window.console:{};for(var a=[[function(){},"log"],[function(){u.log.apply(u,arguments)},"info"],[function(){u.log.apply(u,arguments)},"warn"],[function(){u.warn.apply(u,arguments)},"error"],[function(e){s[e]=i()},"time"],[function(e){var t=s[e];if(!t)throw new Error("No such label: "+e);delete s[e];var n=i()-t;u.log(e+": "+n+"ms")},"timeEnd"],[function(){var e=new Error;e.name="Trace",e.message=r.format.apply(null,arguments),u.error(e.stack)},"trace"],[function(e){u.log(r.inspect(e)+"\n")},"dir"],[function(e){if(!e){var t=c.call(arguments,1);o.ok(!1,r.format.apply(null,t))}},"assert"]],f=0;f<a.length;f++){var l=a[f],p=l[0],y=l[1];u[y]||(u[y]=p)}e.exports=u}).call(this,n(1))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){(function(e,r){var o=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},i=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(s(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,o=r.length,u=String(e).replace(i,(function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),c=r[n];n<o;c=r[++n])v(c)||!O(c)?u+=" "+c:u+=" "+s(c);return u},t.deprecate=function(n,o){if(void 0!==e&&!0===e.noDeprecation)return n;if(void 0===e)return function(){return t.deprecate(n,o).apply(this,arguments)};var i=!1;return function(){if(!i){if(e.throwDeprecation)throw new Error(o);e.traceDeprecation?r.trace(o):r.error(o),i=!0}return n.apply(this,arguments)}};var u,c={};function s(e,n){var r={seen:[],stylize:f};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(n)?r.showHidden=n:n&&t._extend(r,n),g(r.showHidden)&&(r.showHidden=!1),g(r.depth)&&(r.depth=2),g(r.colors)&&(r.colors=!1),g(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=a),l(r,e,r.depth)}function a(e,t){var n=s.styles[t];return n?"["+s.colors[n][0]+"m"+e+"["+s.colors[n][1]+"m":e}function f(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&x(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return b(o)||(o=l(e,o,r)),o}var i=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(d(t))return e.stylize(""+t,"number");if(m(t))return e.stylize(""+t,"boolean");if(v(t))return e.stylize("null","null")}(e,n);if(i)return i;var u=Object.keys(n),c=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(u);if(e.showHidden&&(u=Object.getOwnPropertyNames(n)),E(n)&&(u.indexOf("message")>=0||u.indexOf("description")>=0))return p(n);if(0===u.length){if(x(n)){var s=n.name?": "+n.name:"";return e.stylize("[Function"+s+"]","special")}if(w(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(j(n))return e.stylize(Date.prototype.toString.call(n),"date");if(E(n))return p(n)}var a,f="",O=!1,S=["{","}"];(h(n)&&(O=!0,S=["[","]"]),x(n))&&(f=" [Function"+(n.name?": "+n.name:"")+"]");return w(n)&&(f=" "+RegExp.prototype.toString.call(n)),j(n)&&(f=" "+Date.prototype.toUTCString.call(n)),E(n)&&(f=" "+p(n)),0!==u.length||O&&0!=n.length?r<0?w(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),a=O?function(e,t,n,r,o){for(var i=[],u=0,c=t.length;u<c;++u)_(t,String(u))?i.push(y(e,t,n,r,String(u),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(y(e,t,n,r,o,!0))})),i}(e,n,r,c,u):u.map((function(t){return y(e,n,r,c,t,O)})),e.seen.pop(),function(e,t,n){if(e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(a,f,S)):S[0]+f+S[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function y(e,t,n,r,o,i){var u,c,s;if((s=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?c=s.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):s.set&&(c=e.stylize("[Setter]","special")),_(r,o)||(u="["+o+"]"),c||(e.seen.indexOf(s.value)<0?(c=v(n)?l(e,s.value,null):l(e,s.value,n-1)).indexOf("\n")>-1&&(c=i?c.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+c.split("\n").map((function(e){return" "+e})).join("\n")):c=e.stylize("[Circular]","special")),g(u)){if(i&&o.match(/^\d+$/))return c;(u=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=e.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=e.stylize(u,"string"))}return u+": "+c}function h(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function v(e){return null===e}function d(e){return"number"==typeof e}function b(e){return"string"==typeof e}function g(e){return void 0===e}function w(e){return O(e)&&"[object RegExp]"===S(e)}function O(e){return"object"==typeof e&&null!==e}function j(e){return O(e)&&"[object Date]"===S(e)}function E(e){return O(e)&&("[object Error]"===S(e)||e instanceof Error)}function x(e){return"function"==typeof e}function S(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(g(u)&&(u=Object({WEB:"web"}).NODE_DEBUG||""),n=n.toUpperCase(),!c[n])if(new RegExp("\\b"+n+"\\b","i").test(u)){var o=e.pid;c[n]=function(){var e=t.format.apply(t,arguments);r.error("%s %d: %s",n,o,e)}}else c[n]=function(){};return c[n]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=m,t.isNull=v,t.isNullOrUndefined=function(e){return null==e},t.isNumber=d,t.isString=b,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=g,t.isRegExp=w,t.isObject=O,t.isDate=j,t.isError=E,t.isFunction=x,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(7);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function P(){var e=new Date,t=[T(e.getHours()),T(e.getMinutes()),T(e.getSeconds())].join(":");return[e.getDate(),k[e.getMonth()],t].join(" ")}function _(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){r.log("%s - %s",P(),t.format.apply(t,arguments))},t.inherits=n(8),t._extend=function(e,t){if(!t||!O(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var L="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function A(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(L&&e[L]){var t;if("function"!=typeof(t=e[L]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,L,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(e,r){e?n(e):t(r)}));try{e.apply(this,o)}catch(e){n(e)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),L&&Object.defineProperty(t,L,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,o(e))},t.promisify.custom=L,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var o=n.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,u=function(){return o.apply(i,arguments)};t.apply(this,n).then((function(t){e.nextTick(u,null,t)}),(function(t){e.nextTick(A,t,u)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(t)),Object.defineProperties(n,o(t)),n}}).call(this,n(6),n(0))},function(e,t,n){"use strict";(function(t){var n,r="object"==typeof Reflect?Reflect:null,o=r&&"function"==typeof r.apply?r.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};n=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function u(){u.init.call(this)}e.exports=u,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}v(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&v(e,"error",t,n)}(e,o,{once:!0})}))},u.EventEmitter=u,u.prototype._events=void 0,u.prototype._eventsCount=0,u.prototype._maxListeners=void 0;var c=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function a(e){return void 0===e._maxListeners?u.defaultMaxListeners:e._maxListeners}function f(e,n,r,o){var i,u,c,f;if(s(r),void 0===(u=e._events)?(u=e._events=Object.create(null),e._eventsCount=0):(void 0!==u.newListener&&(e.emit("newListener",n,r.listener?r.listener:r),u=e._events),c=u[n]),void 0===c)c=u[n]=r,++e._eventsCount;else if("function"==typeof c?c=u[n]=o?[r,c]:[c,r]:o?c.unshift(r):c.push(r),(i=a(e))>0&&c.length>i&&!c.warned){c.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+c.length+" "+String(n)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=n,l.count=c.length,f=l,t&&t.warn&&t.warn(f)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=l.bind(r);return o.listener=n,r.wrapFn=o,o}function y(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):m(o,o.length)}function h(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function v(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){r.once&&e.removeEventListener(t,o),n(i)}))}}Object.defineProperty(u,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),u.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},u.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},u.prototype.getMaxListeners=function(){return a(this)},u.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var u;if(t.length>0&&(u=t[0]),u instanceof Error)throw u;var c=new Error("Unhandled error."+(u?" ("+u.message+")":""));throw c.context=u,c}var s=i[e];if(void 0===s)return!1;if("function"==typeof s)o(s,this,t);else{var a=s.length,f=m(s,a);for(n=0;n<a;++n)o(f[n],this,t)}return!0},u.prototype.addListener=function(e,t){return f(this,e,t,!1)},u.prototype.on=u.prototype.addListener,u.prototype.prependListener=function(e,t){return f(this,e,t,!0)},u.prototype.once=function(e,t){return s(t),this.on(e,p(this,e,t)),this},u.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,p(this,e,t)),this},u.prototype.removeListener=function(e,t){var n,r,o,i,u;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){u=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,u||t)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},u.prototype.listeners=function(e){return y(this,e,!0)},u.prototype.rawListeners=function(e){return y(this,e,!1)},u.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},u.prototype.listenerCount=h,u.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}}).call(this,n(0))},function(e,t,n){"use strict";e.exports=n(5)},function(e,t,n){"use strict";(function(t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e)||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 i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var y=n(3),h=n(11),m=n(12),v=Symbol("state"),d=Symbol("open"),b=Symbol("closed"),g=Symbol("half-open"),w=Symbol("pending-close"),O=Symbol("shutdown"),j=Symbol("fallback"),E=Symbol("status"),x=Symbol("name"),S=Symbol("group"),T=new WeakMap,k=Symbol("Enabled"),P=Symbol("warming-up"),_=Symbol("volume-threshold"),L=Symbol("our-error"),A=Symbol("reset-timeout"),C=Symbol("warmup-timeout"),D="options.maxFailures is deprecated. Please use options.errorThresholdPercentage",M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(f,e);var n,r,o,i=a(f);function f(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(u(this,f),(n=i.call(this)).options=r,n.options.timeout=!1!==r.timeout&&(r.timeout||1e4),n.options.resetTimeout=r.resetTimeout||3e4,n.options.errorThresholdPercentage=r.errorThresholdPercentage||50,n.options.rollingCountTimeout=r.rollingCountTimeout||1e4,n.options.rollingCountBuckets=r.rollingCountBuckets||10,n.options.rollingPercentilesEnabled=!1!==r.rollingPercentilesEnabled,n.options.capacity=Number.isInteger(r.capacity)?r.capacity:Number.MAX_SAFE_INTEGER,n.options.errorFilter=r.errorFilter||function(e){return!1},n.semaphore=new m(n.options.capacity),!e)throw new TypeError("No action provided. Cannot construct a CircuitBreaker without an invocable action.");if(r.abortController&&"function"!=typeof r.abortController.abort)throw new TypeError("AbortController does not contain `abort()` method");if(n[_]=Number.isInteger(r.volumeThreshold)?r.volumeThreshold:0,n[P]=!0===r.allowWarmUp,n.options.status?n.options.status instanceof h?n[E]=n.options.status:n[E]=new h({stats:n.options.status}):n[E]=new h(n.options),n[v]=b,r.state?(n[k]=!1!==r.state.enabled,n[P]=r.state.warmUp||n[P],n[b]=!1!==r.state.closed,n[g]=n[w]=r.state.halfOpen||!1,n[d]=!n[b]&&!n[g],n[O]=r.state.shutdown||!1):(n[w]=!1,n[k]=!1!==r.enabled),n[j]=null,n[x]=r.name||e.name||B(),n[S]=r.group||n[x],n[P]){var o=n[C]=setTimeout((function(e){return n[P]=!1}),n.options.rollingCountTimeout);"function"==typeof o.unref&&o.unref()}n.action="function"!=typeof e?function(t){return Promise.resolve(e)}:e,r.maxFailures&&t.error(D);var c=function(e){return function(t,r){return n[E].increment(e,r)}};function s(e){return function(t){var n=e[A]=setTimeout((function(){e[v]=g,e[w]=!0,e.emit("halfOpen",e.options.resetTimeout)}),e.options.resetTimeout);"function"==typeof n.unref&&n.unref()}}return n.on("success",c("successes")),n.on("failure",c("failures")),n.on("fallback",c("fallbacks")),n.on("timeout",c("timeouts")),n.on("fire",c("fires")),n.on("reject",c("rejects")),n.on("cacheHit",c("cacheHits")),n.on("cacheMiss",c("cacheMisses")),n.on("open",(function(e){return n[E].open()})),n.on("close",(function(e){return n[E].close()})),n.on("semaphoreLocked",c("semaphoreRejections")),n.on("open",s(l(n))),n.on("success",(function(e){n.halfOpen&&n.close()})),n.options.cache&&T.set(l(n),void 0),n[O]?(n[v]=O,n.shutdown()):n[b]?n.close():n[d]?n.open():n[g]&&(n[v]=g),n}return n=f,o=[{key:"isOurError",value:function(e){return!!e[L]}},{key:"newStatus",value:function(e){return new h(e)}}],(r=[{key:"close",value:function(){this[v]!==b&&(this[A]&&clearTimeout(this[A]),this[v]=b,this[w]=!1,this.emit("close"))}},{key:"open",value:function(){this[v]!==d&&(this[v]=d,this[w]=!1,this.emit("open"))}},{key:"shutdown",value:function(){this.emit("shutdown"),this.disable(),this.removeAllListeners(),this[A]&&clearTimeout(this[A]),this[C]&&clearTimeout(this[C]),this.status.shutdown(),this[v]=O}},{key:"isShutdown",get:function(){return this[v]===O}},{key:"name",get:function(){return this[x]}},{key:"group",get:function(){return this[S]}},{key:"pendingClose",get:function(){return this[w]}},{key:"closed",get:function(){return this[v]===b}},{key:"opened",get:function(){return this[v]===d}},{key:"halfOpen",get:function(){return this[v]===g}},{key:"status",get:function(){return this[E]}},{key:"stats",get:function(){return this[E].stats}},{key:"toJSON",value:function(){return{state:{name:this.name,enabled:this.enabled,closed:this.closed,open:this.opened,halfOpen:this.halfOpen,warmUp:this.warmUp,shutdown:this.isShutdown},status:this.status.stats}}},{key:"enabled",get:function(){return this[k]}},{key:"warmUp",get:function(){return this[P]}},{key:"volumeThreshold",get:function(){return this[_]}},{key:"fallback",value:function(e){var t=e;return e instanceof f&&(t=function(){return e.fire.apply(e,arguments)}),this[j]=t,this}},{key:"fire",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.call.apply(this,[this.action].concat(t))}},{key:"call",value:function(e){var t=this;if(this.isShutdown){var n=q("The circuit has been shutdown.","ESHUTDOWN");return Promise.reject(n)}for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];var u,c=Array.prototype.slice.call(o);if(this.emit("fire",c),void 0!==T.get(this))return this.emit("cacheHit"),T.get(this);if(this.options.cache&&this.emit("cacheMiss"),!this[k]){var s=this.action.apply(e,c);return"function"==typeof s.then?s:Promise.resolve(s)}if(!this.closed&&!this.pendingClose){var a=q("Breaker is open","EOPENBREAKER");return this.emit("reject",a),N(this,a,c)||Promise.reject(a)}this[w]=!1;var f=!1;return new Promise((function(n,r){var o=Date.now();if(t.semaphore.test()){t.options.timeout&&(u=setTimeout((function(){f=!0;var e=q("Timed out after ".concat(t.options.timeout,"ms"),"ETIMEDOUT"),i=Date.now()-o;t.semaphore.release(),t.emit("timeout",e,i,c),R(e,t,u,c,i,n,r),t.options.abortController&&t.options.abortController.abort()}),t.options.timeout));try{var i=t.action.apply(e,c),s="function"==typeof i.then?i:Promise.resolve(i);s.then((function(e){f||(clearTimeout(u),t.emit("success",e,Date.now()-o),t.semaphore.release(),n(e),t.options.cache&&T.set(t,s))})).catch((function(e){if(!f){t.semaphore.release();var i=Date.now()-o;R(e,t,u,c,i,n,r)}}))}catch(e){t.semaphore.release();var a=Date.now()-o;R(e,t,u,c,a,n,r)}}else{var l=Date.now()-o,p=q("Semaphore locked","ESEMLOCKED");t.emit("semaphoreLocked",p,l),R(p,t,u,c,l,n,r)}}))}},{key:"clearCache",value:function(){T.set(this,void 0)}},{key:"healthCheck",value:function(e,t){var n=this;if(t=t||5e3,"function"!=typeof e)throw new TypeError("Health check function must be a function");if(isNaN(t))throw new TypeError("Health check interval must be a number");var r=function(t){e.apply(n).catch((function(e){n.emit("healthCheckFailed",e),n.open()}))},o=setInterval(r,t);"function"==typeof o.unref&&o.unref(),r()}},{key:"enable",value:function(){this[k]=!0}},{key:"disable",value:function(){this[k]=!1}}])&&c(n.prototype,r),o&&c(n,o),Object.defineProperty(n,"prototype",{writable:!1}),f}(y);function R(e,t,n,r,i,u,c){var s;if(clearTimeout(n),(s=t.options).errorFilter.apply(s,[e].concat(o(r))))t.emit("success",e,i);else{!function(e,t,n,r){if(e.emit("failure",t,r,n),e.warmUp)return;var o=e.stats;if(o.fires<e.volumeThreshold&&!e.halfOpen)return;(o.failures/o.fires*100>e.options.errorThresholdPercentage||e.halfOpen)&&e.open()}(t,e,r,i);var a=N(t,e,r);if(a)return u(a)}c(e)}function N(e,t,n){if(e[j])try{var r=e[j].apply(e[j],[].concat(o(n),[t]));return e.emit("fallback",r,t),r instanceof Promise?r:Promise.resolve(r)}catch(e){return Promise.reject(e)}}function q(e,t){var n=new Error(e);return n.code=t,n[L]=!0,n}var B=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))};e.exports=M}).call(this,n(0))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}}();var s,a=[],f=!1,l=-1;function p(){f&&s&&(f=!1,s.length?a=s.concat(a):l=-1,a.length&&y())}function y(){if(!f){var e=c(p);f=!0;for(var t=a.length;t;){for(s=a,a=[];++l<t;)s&&s[l].run();l=-1,t=a.length}s=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];a.push(new h(e,t)),1!==a.length||f||c(y)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){"use strict";(function(t){var r=n(10);
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/function o(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0}function i(e){return t.Buffer&&"function"==typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var u=n(2),c=Object.prototype.hasOwnProperty,s=Array.prototype.slice,a="foo"===function(){}.name;function f(e){return Object.prototype.toString.call(e)}function l(e){return!i(e)&&("function"==typeof t.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}var p=e.exports=b,y=/\s*function\s+([^\(\s]*)\s*/;function h(e){if(u.isFunction(e)){if(a)return e.name;var t=e.toString().match(y);return t&&t[1]}}function m(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function v(e){if(a||!u.isFunction(e))return u.inspect(e);var t=h(e);return"[Function"+(t?": "+t:"")+"]"}function d(e,t,n,r,o){throw new p.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:o})}function b(e,t){e||d(e,!0,t,"==",p.ok)}function g(e,t,n,r){if(e===t)return!0;if(i(e)&&i(t))return 0===o(e,t);if(u.isDate(e)&&u.isDate(t))return e.getTime()===t.getTime();if(u.isRegExp(e)&&u.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(l(e)&&l(t)&&f(e)===f(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===o(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(i(e)!==i(t))return!1;var c=(r=r||{actual:[],expected:[]}).actual.indexOf(e);return-1!==c&&c===r.expected.indexOf(t)||(r.actual.push(e),r.expected.push(t),function(e,t,n,r){if(null==e||null==t)return!1;if(u.isPrimitive(e)||u.isPrimitive(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var o=w(e),i=w(t);if(o&&!i||!o&&i)return!1;if(o)return e=s.call(e),t=s.call(t),g(e,t,n);var c,a,f=E(e),l=E(t);if(f.length!==l.length)return!1;for(f.sort(),l.sort(),a=f.length-1;a>=0;a--)if(f[a]!==l[a])return!1;for(a=f.length-1;a>=0;a--)if(c=f[a],!g(e[c],t[c],n,r))return!1;return!0}(e,t,n,r))}return n?e===t:e==t}function w(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function O(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function j(e,t,n,r){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!o&&d(o,n,"Missing expected exception"+r);var i="string"==typeof r,c=!e&&o&&!n;if((!e&&u.isError(o)&&i&&O(o,n)||c)&&d(o,n,"Got unwanted exception"+r),e&&o&&n&&!O(o,n)||!e&&o)throw o}p.AssertionError=function(e){var t;this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=m(v((t=this).actual),128)+" "+t.operator+" "+m(v(t.expected),128),this.generatedMessage=!0);var n=e.stackStartFunction||d;if(Error.captureStackTrace)Error.captureStackTrace(this,n);else{var r=new Error;if(r.stack){var o=r.stack,i=h(n),u=o.indexOf("\n"+i);if(u>=0){var c=o.indexOf("\n",u+1);o=o.substring(c+1)}this.stack=o}}},u.inherits(p.AssertionError,Error),p.fail=d,p.ok=b,p.equal=function(e,t,n){e!=t&&d(e,t,n,"==",p.equal)},p.notEqual=function(e,t,n){e==t&&d(e,t,n,"!=",p.notEqual)},p.deepEqual=function(e,t,n){g(e,t,!1)||d(e,t,n,"deepEqual",p.deepEqual)},p.deepStrictEqual=function(e,t,n){g(e,t,!0)||d(e,t,n,"deepStrictEqual",p.deepStrictEqual)},p.notDeepEqual=function(e,t,n){g(e,t,!1)&&d(e,t,n,"notDeepEqual",p.notDeepEqual)},p.notDeepStrictEqual=function e(t,n,r){g(t,n,!0)&&d(t,n,r,"notDeepStrictEqual",e)},p.strictEqual=function(e,t,n){e!==t&&d(e,t,n,"===",p.strictEqual)},p.notStrictEqual=function(e,t,n){e===t&&d(e,t,n,"!==",p.notStrictEqual)},p.throws=function(e,t,n){j(!0,e,t,n)},p.doesNotThrow=function(e,t,n){j(!1,e,t,n)},p.ifError=function(e){if(e)throw e},p.strict=r((function e(t,n){t||d(t,!0,n,"==",e)}),p,{equal:p.strictEqual,deepEqual:p.deepStrictEqual,notEqual:p.notStrictEqual,notDeepEqual:p.notDeepStrictEqual}),p.strict.strict=p.strict;var E=Object.keys||function(e){var t=[];for(var n in e)c.call(e,n)&&t.push(n);return t}}).call(this,n(1))},function(e,t,n){"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function u(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,c,s=u(e),a=1;a<arguments.length;a++){for(var f in n=Object(arguments[a]))o.call(n,f)&&(s[f]=n[f]);if(r){c=r(n);for(var l=0;l<c.length;l++)i.call(n,c[l])&&(s[c[l]]=n[c[l]])}}return s}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=Symbol("window"),y=Symbol("buckets"),h=Symbol("timeout"),m=Symbol("percentiles"),v=Symbol("bucket-interval"),d=Symbol("snapshot-interval"),b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(u,e);var t,n,r,o=a(u);function u(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=o.call(this))[y]=e.rollingCountBuckets||10,t[h]=e.rollingCountTimeout||1e4,t[p]=new Array(t[y]),t[m]=[0,.25,.5,.75,.9,.95,.99,.995,1],t.rollingPercentilesEnabled=!1!==e.rollingPercentilesEnabled;for(var n=0;n<t[y];n++)t[p][n]=w();var r=Math.floor(t[h]/t[y]);return t[v]=setInterval(g(t[p]),r),"function"==typeof t[v].unref&&t[v].unref(),t[d]=setInterval((function(e){return t.emit("snapshot",t.stats)}),r),"function"==typeof t[d].unref&&t[d].unref(),e.stats&&(t[p][0]=i(i({},w()),e.stats)),t}return t=u,(n=[{key:"stats",get:function(){var e=this,t=this[p].reduce((function(t,n){return n?(Object.keys(t).forEach((function(e){"latencyTimes"!==e&&"percentiles"!==e&&(t[e]+=n[e]||0)})),e.rollingPercentilesEnabled&&t.latencyTimes.push.apply(t.latencyTimes,n.latencyTimes||[]),t):t}),w());return this.rollingPercentilesEnabled?(t.latencyTimes.sort((function(e,t){return e-t})),t.latencyTimes.length?t.latencyMean=t.latencyTimes.reduce((function(e,t){return e+t}),0)/t.latencyTimes.length:t.latencyMean=0,this[m].forEach((function(e){t.percentiles[e]=function(e,t){if(0===e)return t[0]||0;var n=Math.ceil(e*t.length);return t[n-1]||0}(e,t.latencyTimes)}))):(t.latencyMean=-1,this[m].forEach((function(e){t.percentiles[e]=-1}))),t}},{key:"window",get:function(){return this[p].slice()}},{key:"increment",value:function(e,t){this[p][0][e]++,"successes"!==e&&"failures"!==e&&"timeouts"!==e||this[p][0].latencyTimes.push(t||0)}},{key:"open",value:function(){this[p][0].isCircuitBreakerOpen=!0}},{key:"close",value:function(){this[p][0].isCircuitBreakerOpen=!1}},{key:"shutdown",value:function(){this.removeAllListeners(),clearInterval(this[v]),clearInterval(this[d])}}])&&c(t.prototype,n),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),u}(n(3).EventEmitter),g=function(e){return function(t){e.pop(),e.unshift(w())}},w=function(e){return{failures:0,fallbacks:0,successes:0,rejects:0,fires:0,timeouts:0,cacheHits:0,cacheMisses:0,semaphoreRejections:0,percentiles:{},latencyTimes:[]}};e.exports=b},function(e,t,n){"use strict";e.exports=function(e){var t=[],n=e,r={take:o,release:i,test:function(){return!(n<1)&&(o()&&!0)}};return Object.defineProperty(r,"count",{get:function(e){return n},enumerable:!0}),r;function o(e){return n>0?(--n,Promise.resolve(i)):new Promise((function(r,o){t.push((function(e){--n,r(i)})),e&&setTimeout((function(n){t.shift();var r=new Error("Timed out after ".concat(e,"ms"));r.code="ETIMEDOUT",o(r)}),e)}))}function i(){n++,t.length>0&&t.shift()()}}}])}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.circuitBreaker=t():e.circuitBreaker=t()}(self,(()=>(()=>{"use strict";var e={497:(e,t,n)=>{e.exports=n(638)},638:(e,t,n)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e)||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 i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function a(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}var p=n(187),h=n(361),y=n(125),m=Symbol("state"),v=Symbol("open"),b=Symbol("closed"),d=Symbol("half-open"),w=Symbol("pending-close"),g=Symbol("shutdown"),O=Symbol("fallback"),x=Symbol("status"),j=Symbol("name"),k=Symbol("group"),E=new WeakMap,T=Symbol("Enabled"),P=Symbol("warming-up"),S=Symbol("volume-threshold"),_=Symbol("our-error"),L=Symbol("reset-timeout"),C=Symbol("warmup-timeout"),R="options.maxFailures is deprecated. Please use options.errorThresholdPercentage",M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(M,e);var t,n,r,o,i,p=(o=M,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(o);if(i){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function M(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(s(this,M),(t=p.call(this)).options=n,t.options.timeout=!1!==n.timeout&&(n.timeout||1e4),t.options.resetTimeout=n.resetTimeout||3e4,t.options.errorThresholdPercentage=n.errorThresholdPercentage||50,t.options.rollingCountTimeout=n.rollingCountTimeout||1e4,t.options.rollingCountBuckets=n.rollingCountBuckets||10,t.options.rollingPercentilesEnabled=!1!==n.rollingPercentilesEnabled,t.options.capacity=Number.isInteger(n.capacity)?n.capacity:Number.MAX_SAFE_INTEGER,t.options.errorFilter=n.errorFilter||function(e){return!1},t.semaphore=new y(t.options.capacity),!e)throw new TypeError("No action provided. Cannot construct a CircuitBreaker without an invocable action.");if(n.abortController&&"function"!=typeof n.abortController.abort)throw new TypeError("AbortController does not contain `abort()` method");if(t[S]=Number.isInteger(n.volumeThreshold)?n.volumeThreshold:0,t[P]=!0===n.allowWarmUp,t.options.status?t.options.status instanceof h?t[x]=t.options.status:t[x]=new h({stats:t.options.status}):t[x]=new h(t.options),t[m]=b,n.state?(t[T]=!1!==n.state.enabled,t[P]=n.state.warmUp||t[P],t[b]=!1!==n.state.closed,t[d]=t[w]=n.state.halfOpen||!1,t[v]=!t[b]&&!t[d],t[g]=n.state.shutdown||!1):(t[w]=!1,t[T]=!1!==n.enabled),t[O]=null,t[j]=n.name||e.name||I(),t[k]=n.group||t[j],t[P]){var r=t[C]=setTimeout((function(e){return t[P]=!1}),t.options.rollingCountTimeout);"function"==typeof r.unref&&r.unref()}t.action="function"!=typeof e?function(t){return Promise.resolve(e)}:e,n.maxFailures&&console.error(R);var o=function(e){return function(n,r){return t[x].increment(e,r)}};function i(e){return function(t){var n=e[L]=setTimeout((function(){e[m]=d,e[w]=!0,e.emit("halfOpen",e.options.resetTimeout)}),e.options.resetTimeout);"function"==typeof n.unref&&n.unref()}}return t.on("success",o("successes")),t.on("failure",o("failures")),t.on("fallback",o("fallbacks")),t.on("timeout",o("timeouts")),t.on("fire",o("fires")),t.on("reject",o("rejects")),t.on("cacheHit",o("cacheHits")),t.on("cacheMiss",o("cacheMisses")),t.on("open",(function(e){return t[x].open()})),t.on("close",(function(e){return t[x].close()})),t.on("semaphoreLocked",o("semaphoreRejections")),t.on("open",i(l(t))),t.on("success",(function(e){t.halfOpen&&t.close()})),t.options.cache&&E.set(l(t),void 0),t[g]?(t[m]=g,t.shutdown()):t[b]?t.close():t[v]?t.open():t[d]&&(t[m]=d),t}return t=M,n=[{key:"close",value:function(){this[m]!==b&&(this[L]&&clearTimeout(this[L]),this[m]=b,this[w]=!1,this.emit("close"))}},{key:"open",value:function(){this[m]!==v&&(this[m]=v,this[w]=!1,this.emit("open"))}},{key:"shutdown",value:function(){this.emit("shutdown"),this.disable(),this.removeAllListeners(),this[L]&&clearTimeout(this[L]),this[C]&&clearTimeout(this[C]),this.status.shutdown(),this[m]=g}},{key:"isShutdown",get:function(){return this[m]===g}},{key:"name",get:function(){return this[j]}},{key:"group",get:function(){return this[k]}},{key:"pendingClose",get:function(){return this[w]}},{key:"closed",get:function(){return this[m]===b}},{key:"opened",get:function(){return this[m]===v}},{key:"halfOpen",get:function(){return this[m]===d}},{key:"status",get:function(){return this[x]}},{key:"stats",get:function(){return this[x].stats}},{key:"toJSON",value:function(){return{state:{name:this.name,enabled:this.enabled,closed:this.closed,open:this.opened,halfOpen:this.halfOpen,warmUp:this.warmUp,shutdown:this.isShutdown},status:this.status.stats}}},{key:"enabled",get:function(){return this[T]}},{key:"warmUp",get:function(){return this[P]}},{key:"volumeThreshold",get:function(){return this[S]}},{key:"fallback",value:function(e){var t=e;return e instanceof M&&(t=function(){return e.fire.apply(e,arguments)}),this[O]=t,this}},{key:"fire",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.call.apply(this,[this.action].concat(t))}},{key:"call",value:function(e){var t=this;if(this.isShutdown){var n=N("The circuit has been shutdown.","ESHUTDOWN");return Promise.reject(n)}for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];var s,u=Array.prototype.slice.call(o);if(this.emit("fire",u),void 0!==E.get(this))return this.emit("cacheHit"),E.get(this);if(this.options.cache&&this.emit("cacheMiss"),!this[T]){var c=this.action.apply(e,u);return"function"==typeof c.then?c:Promise.resolve(c)}if(!this.closed&&!this.pendingClose){var a=N("Breaker is open","EOPENBREAKER");return this.emit("reject",a),D(this,a,u)||Promise.reject(a)}this[w]=!1;var l=!1;return new Promise((function(n,r){var o=Date.now();if(t.semaphore.test()){t.options.timeout&&(s=setTimeout((function(){l=!0;var e=N("Timed out after ".concat(t.options.timeout,"ms"),"ETIMEDOUT"),i=Date.now()-o;t.semaphore.release(),t.emit("timeout",e,i,u),A(e,t,s,u,i,n,r),t.options.abortController&&t.options.abortController.abort()}),t.options.timeout));try{var i=t.action.apply(e,u),c="function"==typeof i.then?i:Promise.resolve(i);c.then((function(e){l||(clearTimeout(s),t.emit("success",e,Date.now()-o),t.semaphore.release(),n(e),t.options.cache&&E.set(t,c))})).catch((function(e){if(!l){t.semaphore.release();var i=Date.now()-o;A(e,t,s,u,i,n,r)}}))}catch(e){t.semaphore.release();var a=Date.now()-o;A(e,t,s,u,a,n,r)}}else{var f=Date.now()-o,p=N("Semaphore locked","ESEMLOCKED");t.emit("semaphoreLocked",p,f),A(p,t,s,u,f,n,r)}}))}},{key:"clearCache",value:function(){E.set(this,void 0)}},{key:"healthCheck",value:function(e,t){var n=this;if(t=t||5e3,"function"!=typeof e)throw new TypeError("Health check function must be a function");if(isNaN(t))throw new TypeError("Health check interval must be a number");var r=function(t){e.apply(n).catch((function(e){n.emit("healthCheckFailed",e),n.open()}))},o=setInterval(r,t);"function"==typeof o.unref&&o.unref(),r()}},{key:"enable",value:function(){this[T]=!0}},{key:"disable",value:function(){this[T]=!1}}],r=[{key:"isOurError",value:function(e){return!!e[_]}},{key:"newStatus",value:function(e){return new h(e)}}],n&&u(t.prototype,n),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),M}(p);function A(e,t,n,r,i,s,u){var c;if(clearTimeout(n),(c=t.options).errorFilter.apply(c,[e].concat(o(r))))t.emit("success",e,i);else{!function(e,t,n,r){if(e.emit("failure",t,r,n),!e.warmUp){var o=e.stats;o.fires<e.volumeThreshold&&!e.halfOpen||(o.failures/o.fires*100>e.options.errorThresholdPercentage||e.halfOpen)&&e.open()}}(t,e,r,i);var a=D(t,e,r);if(a)return s(a)}u(e)}function D(e,t,n){if(e[O])try{var r=e[O].apply(e[O],[].concat(o(n),[t]));return e.emit("fallback",r,t),r instanceof Promise?r:Promise.resolve(r)}catch(e){return Promise.reject(e)}}function N(e,t){var n=new Error(e);return n.code=t,n[_]=!0,n}var I=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))};e.exports=M},125:(e,t)=>{e.exports=function(e){var t=[],n=e,r={take:o,release:i,test:function(){return!(n<1)&&o()&&!0}};return Object.defineProperty(r,"count",{get:function(e){return n},enumerable:!0}),r;function o(e){return n>0?(--n,Promise.resolve(i)):new Promise((function(r,o){t.push((function(e){--n,r(i)})),e&&setTimeout((function(n){t.shift();var r=new Error("Timed out after ".concat(e,"ms"));r.code="ETIMEDOUT",o(r)}),e)}))}function i(){n++,t.length>0&&t.shift()()}}},361:(e,t,n)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function a(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}var f=Symbol("window"),p=Symbol("buckets"),h=Symbol("timeout"),y=Symbol("percentiles"),m=Symbol("bucket-interval"),v=Symbol("snapshot-interval"),b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(b,e);var t,n,r,o,s=(r=b,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=l(r);if(o){var n=l(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function b(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),(t=s.call(this))[p]=e.rollingCountBuckets||10,t[h]=e.rollingCountTimeout||1e4,t[f]=new Array(t[p]),t[y]=[0,.25,.5,.75,.9,.95,.99,.995,1],t.rollingPercentilesEnabled=!1!==e.rollingPercentilesEnabled;for(var n=0;n<t[p];n++)t[f][n]=w();var r=Math.floor(t[h]/t[p]);return t[m]=setInterval(d(t[f]),r),"function"==typeof t[m].unref&&t[m].unref(),t[v]=setInterval((function(e){return t.emit("snapshot",t.stats)}),r),"function"==typeof t[v].unref&&t[v].unref(),e.stats&&(t[f][0]=i(i({},w()),e.stats)),t}return t=b,(n=[{key:"stats",get:function(){var e=this,t=this[f].reduce((function(t,n){return n?(Object.keys(t).forEach((function(e){"latencyTimes"!==e&&"percentiles"!==e&&(t[e]+=n[e]||0)})),e.rollingPercentilesEnabled&&t.latencyTimes.push.apply(t.latencyTimes,n.latencyTimes||[]),t):t}),w());return this.rollingPercentilesEnabled?(t.latencyTimes.sort((function(e,t){return e-t})),t.latencyTimes.length?t.latencyMean=t.latencyTimes.reduce((function(e,t){return e+t}),0)/t.latencyTimes.length:t.latencyMean=0,this[y].forEach((function(e){t.percentiles[e]=function(e,t){return 0===e?t[0]||0:t[Math.ceil(e*t.length)-1]||0}(e,t.latencyTimes)}))):(t.latencyMean=-1,this[y].forEach((function(e){t.percentiles[e]=-1}))),t}},{key:"window",get:function(){return this[f].slice()}},{key:"increment",value:function(e,t){this[f][0][e]++,"successes"!==e&&"failures"!==e&&"timeouts"!==e||this[f][0].latencyTimes.push(t||0)}},{key:"open",value:function(){this[f][0].isCircuitBreakerOpen=!0}},{key:"close",value:function(){this[f][0].isCircuitBreakerOpen=!1}},{key:"shutdown",value:function(){this.removeAllListeners(),clearInterval(this[m]),clearInterval(this[v])}}])&&u(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),b}(n(187).EventEmitter),d=function(e){return function(t){e.pop(),e.unshift(w())}},w=function(e){return{failures:0,fallbacks:0,successes:0,rejects:0,fires:0,timeouts:0,cacheHits:0,cacheMisses:0,semaphoreRejections:0,percentiles:{},latencyTimes:[]}};e.exports=b},187:e=>{var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}m(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,o)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function a(e,t,n,r){var o,i,s,a;if(u(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),s=i[t]),void 0===s)s=i[t]=n,++e._eventsCount;else if("function"==typeof s?s=i[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(o=c(e))>0&&s.length>o&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,a=l,console&&console.warn&&console.warn(a)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=l.bind(r);return o.listener=n,r.wrapFn=o,o}function p(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):y(o,o.length)}function h(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function y(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function m(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){r.once&&e.removeEventListener(t,o),n(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var u=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw u.context=s,u}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var a=c.length,l=y(c,a);for(n=0;n<a;++n)r(l[n],this,t)}return!0},i.prototype.addListener=function(e,t){return a(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return a(this,e,t,!0)},i.prototype.once=function(e,t){return u(t),this.on(e,f(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,f(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,o,i,s;if(u(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){s=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return p(this,e,!0)},i.prototype.rawListeners=function(e){return p(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},i.prototype.listenerCount=h,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}}},t={};return function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}(497)})()));
//# sourceMappingURL=opossum.min.map

3

lib/circuit.js

@@ -796,3 +796,4 @@ 'use strict';

const errorRate = stats.failures / stats.fires * 100;
if (errorRate > circuit.options.errorThresholdPercentage || circuit.halfOpen) {
if (errorRate > circuit.options.errorThresholdPercentage ||
circuit.halfOpen) {
circuit.open();

@@ -799,0 +800,0 @@ }

{
"name": "opossum",
"version": "7.0.0",
"version": "7.0.1",
"author": "Red Hat, Inc.",

@@ -14,8 +14,8 @@ "license": "Apache-2.0",

"build:docs:markdown": "documentation build index.js -f md -o docs/opossum.md",
"pretest": "eslint --ignore-path .gitignore .",
"test": "nyc tape test/*.js | tap-spec",
"pretest": "npm run lint",
"test": "nyc tape test/*.js | faucet",
"test:headless": "node test/browser/webpack-test.js",
"test:browser": "opener http://localhost:9007/test/browser/index.html && serve . -p 9007",
"ci": "npm run build && npm run test && npm run test:headless",
"lint": "standardx test/*.js index.js lib/*.js test/*/*.js",
"test:all": "npm run build && npm run test && npm run test:headless",
"lint": "eslint --ignore-path .gitignore .",
"clean": "rm -rf node_modules dist/*.js test/browser/webpack-test.js",

@@ -39,16 +39,16 @@ "prepublishOnly": "npm run build"

"devDependencies": {
"@babel/core": "^7.17.7",
"@babel/preset-env": "^7.16.11",
"@babel/core": "^7.19.3",
"@babel/preset-env": "^7.19.4",
"babel-loader": "^8.2.4",
"codacy-coverage": "^3.4.0",
"coveralls": "^3.1.1",
"buffer": "^6.0.3",
"documentation": "^14.0.0",
"eslint": "^8.6.0",
"eslint": "^8.25.0",
"eslint-config-semistandard": "^17.0.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.2.0",
"eslint-plugin-n": "^15.3.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.1",
"eslint-plugin-promise": "^6.1.0",
"eslint-plugin-standard": "^5.0.0",
"faucet": "^0.0.3",
"husky": "^8.0.1",

@@ -58,6 +58,7 @@ "nyc": "~15.1.0",

"serve": "^14.0.1",
"tap-spec": "~5.0.0",
"stream-browserify": "^3.0.0",
"tape": "~5.6.1",
"webpack": "~4.46.0",
"webpack-cli": "~4.9.2"
"util": "^0.12.5",
"webpack": "~5.74.0",
"webpack-cli": "~4.10.0"
},

@@ -75,5 +76,5 @@ "description": "A fail-fast circuit breaker for promises and callbacks",

"engines": {
"node": "^18 || ^16 || ^14"
"node": "^19 || ^18 || ^16 || ^14"
},
"support": true
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc