Socket
Socket
Sign inDemoInstall

@twilio/operation-retrier

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twilio/operation-retrier - npm Package Compare versions

Comparing version 4.0.8-rc.5 to 4.0.9-rc.1

2

builds/operation-retrier.min.js

@@ -18,2 +18,2 @@ /*

*/
var Retrier=function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=function(t){return t&&t.Math==Math&&t},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")(),o={},i=function(t){try{return!!t()}catch(t){return!0}},u=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c={},a={}.propertyIsEnumerable,f=Object.getOwnPropertyDescriptor,s=f&&!a.call({1:2},1);c.f=s?function(t){var e=f(this,t);return!!e&&e.enumerable}:a;var l,h,p=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},y={}.toString,v=function(t){return y.call(t).slice(8,-1)},m=v,d="".split,b=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},g=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==m(t)?d.call(t,""):Object(t)}:Object,w=b,j=function(t){return g(w(t))},x=function(t){return"object"==typeof t?null!==t:"function"==typeof t},O=r,E=function(t){return"function"==typeof t?t:void 0},D=function(t,e){return arguments.length<2?E(O[t]):O[t]&&O[t][e]},_=D("navigator","userAgent")||"",k=r,T=_,S=k.process,P=k.Deno,L=S&&S.versions||P&&P.version,R=L&&L.v8;R?h=(l=R.split("."))[0]<4?1:l[0]+l[1]:T&&(!(l=T.match(/Edge\/(\d+)/))||l[1]>=74)&&(l=T.match(/Chrome\/(\d+)/))&&(h=l[1]);var M=h&&+h,A=M,C=i,N=!!Object.getOwnPropertySymbols&&!C((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&A&&A<41})),I=N&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,F=D,B=I?function(t){return"symbol"==typeof t}:function(t){var e=F("Symbol");return"function"==typeof e&&Object(t)instanceof e},z=x,U={exports:{}},W=r,q=function(t,e){try{Object.defineProperty(W,t,{value:e,configurable:!0,writable:!0})}catch(n){W[t]=e}return e},K=q,G="__core-js_shared__",H=r[G]||K(G,{}),V=H;(U.exports=function(t,e){return V[t]||(V[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.17.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var X=b,Y=function(t){return Object(X(t))},J={}.hasOwnProperty,Q=Object.hasOwn||function(t,e){return J.call(Y(t),e)},Z=0,$=Math.random(),tt=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++Z+$).toString(36)},et=r,nt=U.exports,rt=Q,ot=tt,it=N,ut=I,ct=nt("wks"),at=et.Symbol,ft=ut?at:at&&at.withoutSetter||ot,st=function(t){return rt(ct,t)&&(it||"string"==typeof ct[t])||(it&&rt(at,t)?ct[t]=at[t]:ct[t]=ft("Symbol."+t)),ct[t]},lt=x,ht=B,pt=function(t,e){var n,r;if("string"===e&&"function"==typeof(n=t.toString)&&!z(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!z(r=n.call(t)))return r;if("string"!==e&&"function"==typeof(n=t.toString)&&!z(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},yt=st("toPrimitive"),vt=function(t,e){if(!lt(t)||ht(t))return t;var n,r=t[yt];if(void 0!==r){if(void 0===e&&(e="default"),n=r.call(t,e),!lt(n)||ht(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),pt(t,e)},mt=B,dt=function(t){var e=vt(t,"string");return mt(e)?e:String(e)},bt=x,gt=r.document,wt=bt(gt)&&bt(gt.createElement),jt=function(t){return wt?gt.createElement(t):{}},xt=jt,Ot=!u&&!i((function(){return 7!=Object.defineProperty(xt("div"),"a",{get:function(){return 7}}).a})),Et=u,Dt=c,_t=p,kt=j,Tt=dt,St=Q,Pt=Ot,Lt=Object.getOwnPropertyDescriptor;o.f=Et?Lt:function(t,e){if(t=kt(t),e=Tt(e),Pt)try{return Lt(t,e)}catch(t){}if(St(t,e))return _t(!Dt.f.call(t,e),t[e])};var Rt={},Mt=x,At=function(t){if(!Mt(t))throw TypeError(String(t)+" is not an object");return t},Ct=u,Nt=Ot,It=At,Ft=dt,Bt=Object.defineProperty;Rt.f=Ct?Bt:function(t,e,n){if(It(t),e=Ft(e),It(n),Nt)try{return Bt(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var zt=Rt,Ut=p,Wt=u?function(t,e,n){return zt.f(t,e,Ut(1,n))}:function(t,e,n){return t[e]=n,t},qt={exports:{}},Kt=H,Gt=Function.toString;"function"!=typeof Kt.inspectSource&&(Kt.inspectSource=function(t){return Gt.call(t)});var Ht,Vt,Xt,Yt=Kt.inspectSource,Jt=Yt,Qt=r.WeakMap,Zt="function"==typeof Qt&&/native code/.test(Jt(Qt)),$t=U.exports,te=tt,ee=$t("keys"),ne=function(t){return ee[t]||(ee[t]=te(t))},re={},oe=Zt,ie=x,ue=Wt,ce=Q,ae=H,fe=ne,se=re,le="Object already initialized",he=r.WeakMap;if(oe||ae.state){var pe=ae.state||(ae.state=new he),ye=pe.get,ve=pe.has,me=pe.set;Ht=function(t,e){if(ve.call(pe,t))throw new TypeError(le);return e.facade=t,me.call(pe,t,e),e},Vt=function(t){return ye.call(pe,t)||{}},Xt=function(t){return ve.call(pe,t)}}else{var de=fe("state");se[de]=!0,Ht=function(t,e){if(ce(t,de))throw new TypeError(le);return e.facade=t,ue(t,de,e),e},Vt=function(t){return ce(t,de)?t[de]:{}},Xt=function(t){return ce(t,de)}}var be={set:Ht,get:Vt,has:Xt,enforce:function(t){return Xt(t)?Vt(t):Ht(t,{})},getterFor:function(t){return function(e){var n;if(!ie(e)||(n=Vt(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},ge=r,we=Wt,je=Q,xe=q,Oe=Yt,Ee=be.get,De=be.enforce,_e=String(String).split("String");(qt.exports=function(t,e,n,r){var o,i=!!r&&!!r.unsafe,u=!!r&&!!r.enumerable,c=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof e||je(n,"name")||we(n,"name",e),(o=De(n)).source||(o.source=_e.join("string"==typeof e?e:""))),t!==ge?(i?!c&&t[e]&&(u=!0):delete t[e],u?t[e]=n:we(t,e,n)):u?t[e]=n:xe(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&Ee(this).source||Oe(this)}));var ke={},Te=Math.ceil,Se=Math.floor,Pe=function(t){return isNaN(t=+t)?0:(t>0?Se:Te)(t)},Le=Pe,Re=Math.min,Me=function(t){return t>0?Re(Le(t),9007199254740991):0},Ae=Pe,Ce=Math.max,Ne=Math.min,Ie=j,Fe=Me,Be=function(t,e){var n=Ae(t);return n<0?Ce(n+e,0):Ne(n,e)},ze=function(t){return function(e,n,r){var o,i=Ie(e),u=Fe(i.length),c=Be(r,u);if(t&&n!=n){for(;u>c;)if((o=i[c++])!=o)return!0}else for(;u>c;c++)if((t||c in i)&&i[c]===n)return t||c||0;return!t&&-1}},Ue={includes:ze(!0),indexOf:ze(!1)},We=Q,qe=j,Ke=Ue.indexOf,Ge=re,He=function(t,e){var n,r=qe(t),o=0,i=[];for(n in r)!We(Ge,n)&&We(r,n)&&i.push(n);for(;e.length>o;)We(r,n=e[o++])&&(~Ke(i,n)||i.push(n));return i},Ve=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Xe=He,Ye=Ve.concat("length","prototype");ke.f=Object.getOwnPropertyNames||function(t){return Xe(t,Ye)};var Je={};Je.f=Object.getOwnPropertySymbols;var Qe=ke,Ze=Je,$e=At,tn=D("Reflect","ownKeys")||function(t){var e=Qe.f($e(t)),n=Ze.f;return n?e.concat(n(t)):e},en=Q,nn=tn,rn=o,on=Rt,un=i,cn=/#|\.prototype\./,an=function(t,e){var n=sn[fn(t)];return n==hn||n!=ln&&("function"==typeof e?un(e):!!e)},fn=an.normalize=function(t){return String(t).replace(cn,".").toLowerCase()},sn=an.data={},ln=an.NATIVE="N",hn=an.POLYFILL="P",pn=an,yn=r,vn=o.f,mn=Wt,dn=qt.exports,bn=q,gn=function(t,e){for(var n=nn(e),r=on.f,o=rn.f,i=0;i<n.length;i++){var u=n[i];en(t,u)||r(t,u,o(e,u))}},wn=pn,jn=function(t,e){var n,r,o,i,u,c=t.target,a=t.global,f=t.stat;if(n=a?yn:f?yn[c]||bn(c,{}):(yn[c]||{}).prototype)for(r in e){if(i=e[r],o=t.noTargetGet?(u=vn(n,r))&&u.value:n[r],!wn(a?r:c+(f?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;gn(i,o)}(t.sham||o&&o.sham)&&mn(i,"sham",!0),dn(n,r,i,t)}},xn=Rt.f,On=Q,En=st("toStringTag"),Dn=function(t,e,n){t&&!On(t=n?t:t.prototype,En)&&xn(t,En,{configurable:!0,value:e})},_n=r,kn=Dn;jn({global:!0},{Reflect:{}}),kn(_n.Reflect,"Reflect",!0);var Tn,Sn=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},Pn=He,Ln=Ve,Rn=Object.keys||function(t){return Pn(t,Ln)},Mn=Rt,An=At,Cn=Rn,Nn=u?Object.defineProperties:function(t,e){An(t);for(var n,r=Cn(e),o=r.length,i=0;o>i;)Mn.f(t,n=r[i++],e[n]);return t},In=D("document","documentElement"),Fn=At,Bn=Nn,zn=Ve,Un=re,Wn=In,qn=jt,Kn=ne("IE_PROTO"),Gn=function(){},Hn=function(t){return"<script>"+t+"</"+"script>"},Vn=function(t){t.write(Hn("")),t.close();var e=t.parentWindow.Object;return t=null,e},Xn=function(){try{Tn=new ActiveXObject("htmlfile")}catch(t){}var t,e;Xn="undefined"!=typeof document?document.domain&&Tn?Vn(Tn):((e=qn("iframe")).style.display="none",Wn.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Hn("document.F=Object")),t.close(),t.F):Vn(Tn);for(var n=zn.length;n--;)delete Xn.prototype[zn[n]];return Xn()};Un[Kn]=!0;var Yn=Object.create||function(t,e){var n;return null!==t?(Gn.prototype=Fn(t),n=new Gn,Gn.prototype=null,n[Kn]=t):n=Xn(),void 0===e?n:Bn(n,e)},Jn=Sn,Qn=x,Zn=[].slice,$n={},tr=function(t,e,n){if(!(e in $n)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";$n[e]=Function("C,a","return new C("+r.join(",")+")")}return $n[e](t,n)},er=Function.bind||function(t){var e=Jn(this),n=Zn.call(arguments,1),r=function(){var o=n.concat(Zn.call(arguments));return this instanceof r?tr(e,o.length,o):e.apply(t,o)};return Qn(e.prototype)&&(r.prototype=e.prototype),r},nr=jn,rr=Sn,or=At,ir=x,ur=Yn,cr=er,ar=i,fr=D("Reflect","construct"),sr=ar((function(){function t(){}return!(fr((function(){}),[],t)instanceof t)})),lr=!ar((function(){fr((function(){}))})),hr=sr||lr;function pr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function vr(t,e,n){return e&&yr(t.prototype,e),n&&yr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function mr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dr(t,e){return(dr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function br(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dr(t,e)}function gr(t){return(gr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function wr(t,e){if(e&&("object"===gr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return mr(t)}function jr(t){return(jr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function xr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}nr({target:"Reflect",stat:!0,forced:hr,sham:hr},{construct:function(t,e){rr(t),or(e);var n=arguments.length<3?t:rr(arguments[2]);if(lr&&!sr)return fr(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(cr.apply(t,r))}var o=n.prototype,i=ur(ir(o)?o:Object.prototype),u=Function.apply.call(t,i,e);return ir(u)?u:i}});var Or={};Or[st("toStringTag")]="z";var Er="[object z]"===String(Or),Dr=Er,_r=v,kr=st("toStringTag"),Tr="Arguments"==_r(function(){return arguments}()),Sr=Dr?_r:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),kr))?n:Tr?_r(e):"Object"==(r=_r(e))&&"function"==typeof e.callee?"Arguments":r},Pr=Sr,Lr=Er?{}.toString:function(){return"[object "+Pr(this)+"]"},Rr=Er,Mr=qt.exports,Ar=Lr;Rr||Mr(Object.prototype,"toString",Ar,{unsafe:!0});var Cr=r.Promise,Nr=qt.exports,Ir=x,Fr=At,Br=function(t){if(!Ir(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t},zr=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return Fr(n),Br(r),e?t.call(n,r):n.__proto__=r,n}}():void 0),Ur=D,Wr=Rt,qr=u,Kr=st("species"),Gr={},Hr=Gr,Vr=st("iterator"),Xr=Array.prototype,Yr=Sn,Jr=function(t,e,n){if(Yr(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},Qr=Sr,Zr=Gr,$r=st("iterator"),to=function(t){if(null!=t)return t[$r]||t["@@iterator"]||Zr[Qr(t)]},eo=At,no=to,ro=At,oo=At,io=function(t){return void 0!==t&&(Hr.Array===t||Xr[Vr]===t)},uo=Me,co=Jr,ao=function(t,e){var n=arguments.length<2?no(t):e;if("function"!=typeof n)throw TypeError(String(t)+" is not iterable");return eo(n.call(t))},fo=to,so=function(t,e,n){var r,o;ro(t);try{if(void 0===(r=t.return)){if("throw"===e)throw n;return n}r=r.call(t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return ro(r),n},lo=function(t,e){this.stopped=t,this.result=e},ho=st("iterator"),po=!1;try{var yo=0,vo={next:function(){return{done:!!yo++}},return:function(){po=!0}};vo[ho]=function(){return this},Array.from(vo,(function(){throw 2}))}catch(t){}var mo,bo,go,wo,jo=At,xo=Sn,Oo=st("species"),Eo=/(?:ipad|iphone|ipod).*applewebkit/i.test(_),Do="process"==v(r.process),_o=r,ko=i,To=Jr,So=In,Po=jt,Lo=Eo,Ro=Do,Mo=_o.setImmediate,Ao=_o.clearImmediate,Co=_o.process,No=_o.MessageChannel,Io=_o.Dispatch,Fo=0,Bo={},zo="onreadystatechange";try{mo=_o.location}catch(t){}var Uo=function(t){if(Bo.hasOwnProperty(t)){var e=Bo[t];delete Bo[t],e()}},Wo=function(t){return function(){Uo(t)}},qo=function(t){Uo(t.data)},Ko=function(t){_o.postMessage(String(t),mo.protocol+"//"+mo.host)};Mo&&Ao||(Mo=function(t){for(var e=[],n=arguments.length,r=1;n>r;)e.push(arguments[r++]);return Bo[++Fo]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},bo(Fo),Fo},Ao=function(t){delete Bo[t]},Ro?bo=function(t){Co.nextTick(Wo(t))}:Io&&Io.now?bo=function(t){Io.now(Wo(t))}:No&&!Lo?(wo=(go=new No).port2,go.port1.onmessage=qo,bo=To(wo.postMessage,wo,1)):_o.addEventListener&&"function"==typeof postMessage&&!_o.importScripts&&mo&&"file:"!==mo.protocol&&!ko(Ko)?(bo=Ko,_o.addEventListener("message",qo,!1)):bo=zo in Po("script")?function(t){So.appendChild(Po("script")).onreadystatechange=function(){So.removeChild(this),Uo(t)}}:function(t){setTimeout(Wo(t),0)});var Go,Ho,Vo,Xo,Yo,Jo,Qo,Zo,$o={set:Mo,clear:Ao},ti=r,ei=/ipad|iphone|ipod/i.test(_)&&void 0!==ti.Pebble,ni=/web0s(?!.*chrome)/i.test(_),ri=r,oi=o.f,ii=$o.set,ui=Eo,ci=ei,ai=ni,fi=Do,si=ri.MutationObserver||ri.WebKitMutationObserver,li=ri.document,hi=ri.process,pi=ri.Promise,yi=oi(ri,"queueMicrotask"),vi=yi&&yi.value;vi||(Go=function(){var t,e;for(fi&&(t=hi.domain)&&t.exit();Ho;){e=Ho.fn,Ho=Ho.next;try{e()}catch(t){throw Ho?Xo():Vo=void 0,t}}Vo=void 0,t&&t.enter()},ui||fi||ai||!si||!li?!ci&&pi&&pi.resolve?((Qo=pi.resolve(void 0)).constructor=pi,Zo=Qo.then,Xo=function(){Zo.call(Qo,Go)}):Xo=fi?function(){hi.nextTick(Go)}:function(){ii.call(ri,Go)}:(Yo=!0,Jo=li.createTextNode(""),new si(Go).observe(Jo,{characterData:!0}),Xo=function(){Jo.data=Yo=!Yo}));var mi=vi||function(t){var e={fn:t,next:void 0};Vo&&(Vo.next=e),Ho||(Ho=e,Xo()),Vo=e},di={},bi=Sn,gi=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=bi(e),this.reject=bi(n)};di.f=function(t){return new gi(t)};var wi,ji,xi,Oi,Ei=At,Di=x,_i=di,ki=r,Ti="object"==typeof window,Si=jn,Pi=r,Li=D,Ri=Cr,Mi=qt.exports,Ai=function(t,e,n){for(var r in e)Nr(t,r,e[r],n);return t},Ci=zr,Ni=Dn,Ii=function(t){var e=Ur(t),n=Wr.f;qr&&e&&!e[Kr]&&n(e,Kr,{configurable:!0,get:function(){return this}})},Fi=x,Bi=Sn,zi=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t},Ui=Yt,Wi=function(t,e,n){var r,o,i,u,c,a,f,s=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),y=co(e,s,1+l+p),v=function(t){return r&&so(r,"normal",t),new lo(!0,t)},m=function(t){return l?(oo(t),p?y(t[0],t[1],v):y(t[0],t[1])):p?y(t,v):y(t)};if(h)r=t;else{if("function"!=typeof(o=fo(t)))throw TypeError("Target is not iterable");if(io(o)){for(i=0,u=uo(t.length);u>i;i++)if((c=m(t[i]))&&c instanceof lo)return c;return new lo(!1)}r=ao(t,o)}for(a=r.next;!(f=a.call(r)).done;){try{c=m(f.value)}catch(t){so(r,"throw",t)}if("object"==typeof c&&c&&c instanceof lo)return c}return new lo(!1)},qi=function(t,e){if(!e&&!po)return!1;var n=!1;try{var r={};r[ho]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},Ki=function(t,e){var n,r=jo(t).constructor;return void 0===r||null==(n=jo(r)[Oo])?e:xo(n)},Gi=$o.set,Hi=mi,Vi=function(t,e){if(Ei(t),Di(e)&&e.constructor===t)return e;var n=_i.f(t);return(0,n.resolve)(e),n.promise},Xi=function(t,e){var n=ki.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))},Yi=di,Ji=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Qi=be,Zi=pn,$i=Ti,tu=Do,eu=M,nu=st("species"),ru="Promise",ou=Qi.get,iu=Qi.set,uu=Qi.getterFor(ru),cu=Ri&&Ri.prototype,au=Ri,fu=cu,su=Pi.TypeError,lu=Pi.document,hu=Pi.process,pu=Yi.f,yu=pu,vu=!!(lu&&lu.createEvent&&Pi.dispatchEvent),mu="function"==typeof PromiseRejectionEvent,du="unhandledrejection",bu=!1,gu=Zi(ru,(function(){var t=Ui(au),e=t!==String(au);if(!e&&66===eu)return!0;if(eu>=51&&/native code/.test(t))return!1;var n=new au((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[nu]=r,!(bu=n.then((function(){}))instanceof r)||!e&&$i&&!mu})),wu=gu||!qi((function(t){au.all(t).catch((function(){}))})),ju=function(t){var e;return!(!Fi(t)||"function"!=typeof(e=t.then))&&e},xu=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;Hi((function(){for(var r=t.value,o=1==t.state,i=0;n.length>i;){var u,c,a,f=n[i++],s=o?f.ok:f.fail,l=f.resolve,h=f.reject,p=f.domain;try{s?(o||(2===t.rejection&&_u(t),t.rejection=1),!0===s?u=r:(p&&p.enter(),u=s(r),p&&(p.exit(),a=!0)),u===f.promise?h(su("Promise-chain cycle")):(c=ju(u))?c.call(u,l,h):l(u)):h(r)}catch(t){p&&!a&&p.exit(),h(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&Eu(t)}))}},Ou=function(t,e,n){var r,o;vu?((r=lu.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),Pi.dispatchEvent(r)):r={promise:e,reason:n},!mu&&(o=Pi["on"+t])?o(r):t===du&&Xi("Unhandled promise rejection",n)},Eu=function(t){Gi.call(Pi,(function(){var e,n=t.facade,r=t.value;if(Du(t)&&(e=Ji((function(){tu?hu.emit("unhandledRejection",r,n):Ou(du,n,r)})),t.rejection=tu||Du(t)?2:1,e.error))throw e.value}))},Du=function(t){return 1!==t.rejection&&!t.parent},_u=function(t){Gi.call(Pi,(function(){var e=t.facade;tu?hu.emit("rejectionHandled",e):Ou("rejectionhandled",e,t.value)}))},ku=function(t,e,n){return function(r){t(e,r,n)}},Tu=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,xu(t,!0))},Su=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw su("Promise can't be resolved itself");var r=ju(e);r?Hi((function(){var n={done:!1};try{r.call(e,ku(Su,n,t),ku(Tu,n,t))}catch(e){Tu(n,e,t)}})):(t.value=e,t.state=1,xu(t,!1))}catch(e){Tu({done:!1},e,t)}}};if(gu&&(fu=(au=function(t){zi(this,au,ru),Bi(t),wi.call(this);var e=ou(this);try{t(ku(Su,e),ku(Tu,e))}catch(t){Tu(e,t)}}).prototype,(wi=function(t){iu(this,{type:ru,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=Ai(fu,{then:function(t,e){var n=uu(this),r=pu(Ki(this,au));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=tu?hu.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&xu(n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),ji=function(){var t=new wi,e=ou(t);this.promise=t,this.resolve=ku(Su,e),this.reject=ku(Tu,e)},Yi.f=pu=function(t){return t===au||t===xi?new ji(t):yu(t)},"function"==typeof Ri&&cu!==Object.prototype)){Oi=cu.then,bu||(Mi(cu,"then",(function(t,e){var n=this;return new au((function(t,e){Oi.call(n,t,e)})).then(t,e)}),{unsafe:!0}),Mi(cu,"catch",fu.catch,{unsafe:!0}));try{delete cu.constructor}catch(t){}Ci&&Ci(cu,fu)}function Pu(){}function Lu(){Lu.init.call(this)}function Ru(t){return void 0===t._maxListeners?Lu.defaultMaxListeners:t._maxListeners}function Mu(t,e,n){if(e)t.call(n);else for(var r=t.length,o=Uu(t,r),i=0;i<r;++i)o[i].call(n)}function Au(t,e,n,r){if(e)t.call(n,r);else for(var o=t.length,i=Uu(t,o),u=0;u<o;++u)i[u].call(n,r)}function Cu(t,e,n,r,o){if(e)t.call(n,r,o);else for(var i=t.length,u=Uu(t,i),c=0;c<i;++c)u[c].call(n,r,o)}function Nu(t,e,n,r,o,i){if(e)t.call(n,r,o,i);else for(var u=t.length,c=Uu(t,u),a=0;a<u;++a)c[a].call(n,r,o,i)}function Iu(t,e,n,r){if(e)t.apply(n,r);else for(var o=t.length,i=Uu(t,o),u=0;u<o;++u)i[u].apply(n,r)}function Fu(t,e,n,r){var o,i,u,c;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((i=t._events)?(i.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),i=t._events),u=i[e]):(i=t._events=new Pu,t._eventsCount=0),u){if("function"==typeof u?u=i[e]=r?[n,u]:[u,n]:r?u.unshift(n):u.push(n),!u.warned&&(o=Ru(t))&&o>0&&u.length>o){u.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+e+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=e,a.count=u.length,c=a,"function"==typeof console.warn?console.warn(c):console.log(c)}}else u=i[e]=n,++t._eventsCount;return t}function Bu(t,e,n){var r=!1;function o(){t.removeListener(e,o),r||(r=!0,n.apply(t,arguments))}return o.listener=n,o}function zu(t){var e=this._events;if(e){var n=e[t];if("function"==typeof n)return 1;if(n)return n.length}return 0}function Uu(t,e){for(var n=new Array(e);e--;)n[e]=t[e];return n}function Wu(t){var e=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(t){return!1}}();return function(){var n,r=jr(t);if(e){var o=jr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return wr(this,n)}}Si({global:!0,wrap:!0,forced:gu},{Promise:au}),Ni(au,ru,!1),Ii(ru),xi=Li(ru),Si({target:ru,stat:!0,forced:gu},{reject:function(t){var e=pu(this);return e.reject.call(void 0,t),e.promise}}),Si({target:ru,stat:!0,forced:gu},{resolve:function(t){return Vi(this,t)}}),Si({target:ru,stat:!0,forced:wu},{all:function(t){var e=this,n=pu(e),r=n.resolve,o=n.reject,i=Ji((function(){var n=Bi(e.resolve),i=[],u=0,c=1;Wi(t,(function(t){var a=u++,f=!1;i.push(void 0),c++,n.call(e,t).then((function(t){f||(f=!0,i[a]=t,--c||r(i))}),o)})),--c||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=pu(e),r=n.reject,o=Ji((function(){var o=Bi(e.resolve);Wi(t,(function(t){o.call(e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}}),Pu.prototype=Object.create(null),Lu.EventEmitter=Lu,Lu.usingDomains=!1,Lu.prototype.domain=void 0,Lu.prototype._events=void 0,Lu.prototype._maxListeners=void 0,Lu.defaultMaxListeners=10,Lu.init=function(){this.domain=null,Lu.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Pu,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Lu.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},Lu.prototype.getMaxListeners=function(){return Ru(this)},Lu.prototype.emit=function(t){var e,n,r,o,i,u,c,a="error"===t;if(u=this._events)a=a&&null==u.error;else if(!a)return!1;if(c=this.domain,a){if(e=arguments[1],!c){if(e instanceof Error)throw e;var f=new Error('Uncaught, unspecified "error" event. ('+e+")");throw f.context=e,f}return e||(e=new Error('Uncaught, unspecified "error" event')),e.domainEmitter=this,e.domain=c,e.domainThrown=!1,c.emit("error",e),!1}if(!(n=u[t]))return!1;var s="function"==typeof n;switch(r=arguments.length){case 1:Mu(n,s,this);break;case 2:Au(n,s,this,arguments[1]);break;case 3:Cu(n,s,this,arguments[1],arguments[2]);break;case 4:Nu(n,s,this,arguments[1],arguments[2],arguments[3]);break;default:for(o=new Array(r-1),i=1;i<r;i++)o[i-1]=arguments[i];Iu(n,s,this,o)}return!0},Lu.prototype.addListener=function(t,e){return Fu(this,t,e,!1)},Lu.prototype.on=Lu.prototype.addListener,Lu.prototype.prependListener=function(t,e){return Fu(this,t,e,!0)},Lu.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,Bu(this,t,e)),this},Lu.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,Bu(this,t,e)),this},Lu.prototype.removeListener=function(t,e){var n,r,o,i,u;if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(n=r[t]))return this;if(n===e||n.listener&&n.listener===e)0==--this._eventsCount?this._events=new Pu:(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(o=-1,i=n.length;i-- >0;)if(n[i]===e||n[i].listener&&n[i].listener===e){u=n[i].listener,o=i;break}if(o<0)return this;if(1===n.length){if(n[0]=void 0,0==--this._eventsCount)return this._events=new Pu,this;delete r[t]}else!function(t,e){for(var n=e,r=n+1,o=t.length;r<o;n+=1,r+=1)t[n]=t[r];t.pop()}(n,o);r.removeListener&&this.emit("removeListener",t,u||e)}return this},Lu.prototype.off=function(t,e){return this.removeListener(t,e)},Lu.prototype.removeAllListeners=function(t){var e,n;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=new Pu,this._eventsCount=0):n[t]&&(0==--this._eventsCount?this._events=new Pu:delete n[t]),this;if(0===arguments.length){for(var r,o=Object.keys(n),i=0;i<o.length;++i)"removeListener"!==(r=o[i])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new Pu,this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(e)do{this.removeListener(t,e[e.length-1])}while(e[0]);return this},Lu.prototype.listeners=function(t){var e,n=this._events;return n&&(e=n[t])?"function"==typeof e?[e.listener||e]:function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(e):[]},Lu.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):zu.call(t,e)},Lu.prototype.listenerCount=zu,Lu.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var qu=function(t){br(n,t);var e=Wu(n);function n(t){var r;return pr(this,n),xr(mr(r=e.call(this)),"timeout",null),xr(mr(r),"startTimestamp",-1),r.minDelay=t.min,r.maxDelay=t.max,r.initialDelay=t.initial||0,r.maxAttemptsCount=t.maxAttemptsCount||0,r.maxAttemptsTime=t.maxAttemptsTime||0,r.randomness=t.randomness||0,r.inProgress=!1,r.attemptNum=0,r.prevDelay=0,r.currDelay=0,r}return vr(n,[{key:"attempt",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.attemptNum++,this.emit("attempt",this)}},{key:"nextDelay",value:function(t){if("number"==typeof t)return this.prevDelay=0,this.currDelay=t,t;if(0==this.attemptNum)return this.initialDelay;if(1==this.attemptNum)return this.currDelay=this.minDelay,this.currDelay;this.prevDelay=this.currDelay;var e=this.currDelay+this.prevDelay;return this.maxDelay&&e>this.maxDelay&&(this.currDelay=this.maxDelay,e=this.maxDelay),this.currDelay=e,e}},{key:"randomize",value:function(t){var e=t*this.randomness,n=Math.round(Math.random()*e*2-e);return Math.max(0,t+n)}},{key:"scheduleAttempt",value:function(t){var e=this;if(this.maxAttemptsCount&&this.attemptNum>=this.maxAttemptsCount)return this.cleanup(),void this.emit("failed",new Error("Maximum attempt count limit reached"));var n=this.nextDelay(t);if(n=this.randomize(n),this.maxAttemptsTime&&this.startTimestamp+this.maxAttemptsTime<Date.now()+n)return this.cleanup(),void this.emit("failed",new Error("Maximum attempt time limit reached"));this.timeout=setTimeout((function(){return e.attempt()}),n)}},{key:"cleanup",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.inProgress=!1,this.attemptNum=0,this.prevDelay=0,this.currDelay=0}},{key:"start",value:function(){if(this.inProgress)throw new Error("Retrier is already in progress");this.inProgress=!0,this.startTimestamp=Date.now(),this.scheduleAttempt(this.initialDelay)}},{key:"cancel",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null,this.inProgress=!1,this.emit("cancelled"))}},{key:"succeeded",value:function(t){this.emit("succeeded",t)}},{key:"failed",value:function(t,e){if(this.timeout)throw new Error("Retrier attempt is already in progress");this.scheduleAttempt(e)}}]),n}(Lu),Ku=function(t){br(n,t);var e=Wu(n);function n(t){var r;return pr(this,n),xr(mr(r=e.call(this)),"resolve",(function(){})),xr(mr(r),"reject",(function(){})),r.retrier=new qu(t),r}return vr(n,[{key:"run",value:function(t){var e=this;return this.retrier.on("attempt",(function(){t().then((function(t){return e.retrier.succeeded(t)})).catch((function(t){return e.retrier.failed(t)}))})),this.retrier.on("succeeded",(function(t){return e.resolve(t)})),this.retrier.on("cancelled",(function(){return e.reject(new Error("Cancelled"))})),this.retrier.on("failed",(function(t){return e.reject(t)})),new Promise((function(t,n){e.resolve=t,e.reject=n,e.retrier.start()}))}},{key:"cancel",value:function(){this.retrier.cancel()}}]),n}(Lu);function Gu(t){var e=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(t){return!1}}();return function(){var n,r=jr(t);if(e){var o=jr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return wr(this,n)}}function Hu(t){return null!=t}var Vu=function(t){br(n,t);var e=Gu(n);function n(t){var r;pr(this,n),xr(mr(r=e.call(this)),"backoffDelay",0),xr(mr(r),"nextBackoffDelay",0),xr(mr(r),"backoffNumber",0),xr(mr(r),"timeoutID",null),xr(mr(r),"maxNumberOfRetry",-1);var o=t=t||{},i=o.initialDelay,u=o.maxDelay,c=o.randomisationFactor,a=o.factor;if(Hu(i)&&i<1)throw new Error("The initial timeout must be equal to or greater than 1.");if(Hu(u)&&u<=1)throw new Error("The maximal timeout must be greater than 1.");if(Hu(c)&&(c<0||c>1))throw new Error("The randomisation factor must be between 0 and 1.");if(Hu(a)&&a<=1)throw new Error("Exponential factor should be greater than 1.");if(r.initialDelay=i||100,r.maxDelay=u||1e4,r.maxDelay<=r.initialDelay)throw new Error("The maximal backoff delay must be greater than the initial backoff delay.");return r.randomisationFactor=c||0,r.factor=a||2,r.reset(),r}return vr(n,[{key:"backoff",value:function(t){null==this.timeoutID&&(this.backoffNumber===this.maxNumberOfRetry?(this.emit("fail",t),this.reset()):(this.backoffDelay=this.next(),this.timeoutID=setTimeout(this.onBackoff.bind(this),this.backoffDelay),this.emit("backoff",this.backoffNumber,this.backoffDelay,t)))}},{key:"reset",value:function(){this.backoffDelay=0,this.nextBackoffDelay=this.initialDelay,this.backoffNumber=0,this.timeoutID&&clearTimeout(this.timeoutID),this.timeoutID=null}},{key:"failAfter",value:function(t){if(t<=0)throw new Error("Expected a maximum number of retry greater than 0 but got ".concat(t));this.maxNumberOfRetry=t}},{key:"next",value:function(){this.backoffDelay=Math.min(this.nextBackoffDelay,this.maxDelay),this.nextBackoffDelay=this.backoffDelay*this.factor;var t=1+Math.random()*this.randomisationFactor;return Math.min(this.maxDelay,Math.round(this.backoffDelay*t))}},{key:"onBackoff",value:function(){this.timeoutID=null,this.emit("ready",this.backoffNumber,this.backoffDelay),this.backoffNumber++}}],[{key:"exponential",value:function(t){return new n(t)}}]),n}(Lu);return t.AsyncRetrier=Ku,t.Backoff=Vu,t.Retrier=qu,Object.defineProperty(t,"__esModule",{value:!0}),t}({});
var Retrier=function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=function(t){return t&&t.Math==Math&&t},r=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")(),o={},i=function(t){try{return!!t()}catch(t){return!0}},u=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c={},a={}.propertyIsEnumerable,f=Object.getOwnPropertyDescriptor,s=f&&!a.call({1:2},1);c.f=s?function(t){var e=f(this,t);return!!e&&e.enumerable}:a;var l,h,p=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},y={}.toString,v=function(t){return y.call(t).slice(8,-1)},m=v,d="".split,b=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},g=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==m(t)?d.call(t,""):Object(t)}:Object,w=b,j=function(t){return g(w(t))},x=function(t){return"object"==typeof t?null!==t:"function"==typeof t},O=r,E=function(t){return"function"==typeof t?t:void 0},D=function(t,e){return arguments.length<2?E(O[t]):O[t]&&O[t][e]},_=D("navigator","userAgent")||"",k=r,T=_,S=k.process,P=k.Deno,L=S&&S.versions||P&&P.version,R=L&&L.v8;R?h=(l=R.split("."))[0]<4?1:l[0]+l[1]:T&&(!(l=T.match(/Edge\/(\d+)/))||l[1]>=74)&&(l=T.match(/Chrome\/(\d+)/))&&(h=l[1]);var M=h&&+h,A=M,C=i,N=!!Object.getOwnPropertySymbols&&!C((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&A&&A<41})),I=N&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,F=D,B=I?function(t){return"symbol"==typeof t}:function(t){var e=F("Symbol");return"function"==typeof e&&Object(t)instanceof e},z=x,U={exports:{}},W=r,q=function(t,e){try{Object.defineProperty(W,t,{value:e,configurable:!0,writable:!0})}catch(n){W[t]=e}return e},K=q,G="__core-js_shared__",H=r[G]||K(G,{}),V=H;(U.exports=function(t,e){return V[t]||(V[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.17.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var X=b,Y=function(t){return Object(X(t))},J={}.hasOwnProperty,Q=Object.hasOwn||function(t,e){return J.call(Y(t),e)},Z=0,$=Math.random(),tt=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++Z+$).toString(36)},et=r,nt=U.exports,rt=Q,ot=tt,it=N,ut=I,ct=nt("wks"),at=et.Symbol,ft=ut?at:at&&at.withoutSetter||ot,st=function(t){return rt(ct,t)&&(it||"string"==typeof ct[t])||(it&&rt(at,t)?ct[t]=at[t]:ct[t]=ft("Symbol."+t)),ct[t]},lt=x,ht=B,pt=function(t,e){var n,r;if("string"===e&&"function"==typeof(n=t.toString)&&!z(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!z(r=n.call(t)))return r;if("string"!==e&&"function"==typeof(n=t.toString)&&!z(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},yt=st("toPrimitive"),vt=function(t,e){if(!lt(t)||ht(t))return t;var n,r=t[yt];if(void 0!==r){if(void 0===e&&(e="default"),n=r.call(t,e),!lt(n)||ht(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),pt(t,e)},mt=B,dt=function(t){var e=vt(t,"string");return mt(e)?e:String(e)},bt=x,gt=r.document,wt=bt(gt)&&bt(gt.createElement),jt=function(t){return wt?gt.createElement(t):{}},xt=jt,Ot=!u&&!i((function(){return 7!=Object.defineProperty(xt("div"),"a",{get:function(){return 7}}).a})),Et=u,Dt=c,_t=p,kt=j,Tt=dt,St=Q,Pt=Ot,Lt=Object.getOwnPropertyDescriptor;o.f=Et?Lt:function(t,e){if(t=kt(t),e=Tt(e),Pt)try{return Lt(t,e)}catch(t){}if(St(t,e))return _t(!Dt.f.call(t,e),t[e])};var Rt={},Mt=x,At=function(t){if(!Mt(t))throw TypeError(String(t)+" is not an object");return t},Ct=u,Nt=Ot,It=At,Ft=dt,Bt=Object.defineProperty;Rt.f=Ct?Bt:function(t,e,n){if(It(t),e=Ft(e),It(n),Nt)try{return Bt(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t};var zt=Rt,Ut=p,Wt=u?function(t,e,n){return zt.f(t,e,Ut(1,n))}:function(t,e,n){return t[e]=n,t},qt={exports:{}},Kt=H,Gt=Function.toString;"function"!=typeof Kt.inspectSource&&(Kt.inspectSource=function(t){return Gt.call(t)});var Ht,Vt,Xt,Yt=Kt.inspectSource,Jt=Yt,Qt=r.WeakMap,Zt="function"==typeof Qt&&/native code/.test(Jt(Qt)),$t=U.exports,te=tt,ee=$t("keys"),ne=function(t){return ee[t]||(ee[t]=te(t))},re={},oe=Zt,ie=x,ue=Wt,ce=Q,ae=H,fe=ne,se=re,le="Object already initialized",he=r.WeakMap;if(oe||ae.state){var pe=ae.state||(ae.state=new he),ye=pe.get,ve=pe.has,me=pe.set;Ht=function(t,e){if(ve.call(pe,t))throw new TypeError(le);return e.facade=t,me.call(pe,t,e),e},Vt=function(t){return ye.call(pe,t)||{}},Xt=function(t){return ve.call(pe,t)}}else{var de=fe("state");se[de]=!0,Ht=function(t,e){if(ce(t,de))throw new TypeError(le);return e.facade=t,ue(t,de,e),e},Vt=function(t){return ce(t,de)?t[de]:{}},Xt=function(t){return ce(t,de)}}var be={set:Ht,get:Vt,has:Xt,enforce:function(t){return Xt(t)?Vt(t):Ht(t,{})},getterFor:function(t){return function(e){var n;if(!ie(e)||(n=Vt(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},ge=r,we=Wt,je=Q,xe=q,Oe=Yt,Ee=be.get,De=be.enforce,_e=String(String).split("String");(qt.exports=function(t,e,n,r){var o,i=!!r&&!!r.unsafe,u=!!r&&!!r.enumerable,c=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof e||je(n,"name")||we(n,"name",e),(o=De(n)).source||(o.source=_e.join("string"==typeof e?e:""))),t!==ge?(i?!c&&t[e]&&(u=!0):delete t[e],u?t[e]=n:we(t,e,n)):u?t[e]=n:xe(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&Ee(this).source||Oe(this)}));var ke={},Te=Math.ceil,Se=Math.floor,Pe=function(t){return isNaN(t=+t)?0:(t>0?Se:Te)(t)},Le=Pe,Re=Math.min,Me=function(t){return t>0?Re(Le(t),9007199254740991):0},Ae=Pe,Ce=Math.max,Ne=Math.min,Ie=j,Fe=Me,Be=function(t,e){var n=Ae(t);return n<0?Ce(n+e,0):Ne(n,e)},ze=function(t){return function(e,n,r){var o,i=Ie(e),u=Fe(i.length),c=Be(r,u);if(t&&n!=n){for(;u>c;)if((o=i[c++])!=o)return!0}else for(;u>c;c++)if((t||c in i)&&i[c]===n)return t||c||0;return!t&&-1}},Ue={includes:ze(!0),indexOf:ze(!1)},We=Q,qe=j,Ke=Ue.indexOf,Ge=re,He=function(t,e){var n,r=qe(t),o=0,i=[];for(n in r)!We(Ge,n)&&We(r,n)&&i.push(n);for(;e.length>o;)We(r,n=e[o++])&&(~Ke(i,n)||i.push(n));return i},Ve=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Xe=He,Ye=Ve.concat("length","prototype");ke.f=Object.getOwnPropertyNames||function(t){return Xe(t,Ye)};var Je={};Je.f=Object.getOwnPropertySymbols;var Qe=ke,Ze=Je,$e=At,tn=D("Reflect","ownKeys")||function(t){var e=Qe.f($e(t)),n=Ze.f;return n?e.concat(n(t)):e},en=Q,nn=tn,rn=o,on=Rt,un=i,cn=/#|\.prototype\./,an=function(t,e){var n=sn[fn(t)];return n==hn||n!=ln&&("function"==typeof e?un(e):!!e)},fn=an.normalize=function(t){return String(t).replace(cn,".").toLowerCase()},sn=an.data={},ln=an.NATIVE="N",hn=an.POLYFILL="P",pn=an,yn=r,vn=o.f,mn=Wt,dn=qt.exports,bn=q,gn=function(t,e){for(var n=nn(e),r=on.f,o=rn.f,i=0;i<n.length;i++){var u=n[i];en(t,u)||r(t,u,o(e,u))}},wn=pn,jn=function(t,e){var n,r,o,i,u,c=t.target,a=t.global,f=t.stat;if(n=a?yn:f?yn[c]||bn(c,{}):(yn[c]||{}).prototype)for(r in e){if(i=e[r],o=t.noTargetGet?(u=vn(n,r))&&u.value:n[r],!wn(a?r:c+(f?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;gn(i,o)}(t.sham||o&&o.sham)&&mn(i,"sham",!0),dn(n,r,i,t)}},xn=Rt.f,On=Q,En=st("toStringTag"),Dn=function(t,e,n){t&&!On(t=n?t:t.prototype,En)&&xn(t,En,{configurable:!0,value:e})},_n=r,kn=Dn;jn({global:!0},{Reflect:{}}),kn(_n.Reflect,"Reflect",!0);var Tn,Sn=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},Pn=He,Ln=Ve,Rn=Object.keys||function(t){return Pn(t,Ln)},Mn=Rt,An=At,Cn=Rn,Nn=u?Object.defineProperties:function(t,e){An(t);for(var n,r=Cn(e),o=r.length,i=0;o>i;)Mn.f(t,n=r[i++],e[n]);return t},In=D("document","documentElement"),Fn=At,Bn=Nn,zn=Ve,Un=re,Wn=In,qn=jt,Kn=ne("IE_PROTO"),Gn=function(){},Hn=function(t){return"<script>"+t+"</"+"script>"},Vn=function(t){t.write(Hn("")),t.close();var e=t.parentWindow.Object;return t=null,e},Xn=function(){try{Tn=new ActiveXObject("htmlfile")}catch(t){}var t,e;Xn="undefined"!=typeof document?document.domain&&Tn?Vn(Tn):((e=qn("iframe")).style.display="none",Wn.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Hn("document.F=Object")),t.close(),t.F):Vn(Tn);for(var n=zn.length;n--;)delete Xn.prototype[zn[n]];return Xn()};Un[Kn]=!0;var Yn=Object.create||function(t,e){var n;return null!==t?(Gn.prototype=Fn(t),n=new Gn,Gn.prototype=null,n[Kn]=t):n=Xn(),void 0===e?n:Bn(n,e)},Jn=Sn,Qn=x,Zn=[].slice,$n={},tr=function(t,e,n){if(!(e in $n)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";$n[e]=Function("C,a","return new C("+r.join(",")+")")}return $n[e](t,n)},er=Function.bind||function(t){var e=Jn(this),n=Zn.call(arguments,1),r=function(){var o=n.concat(Zn.call(arguments));return this instanceof r?tr(e,o.length,o):e.apply(t,o)};return Qn(e.prototype)&&(r.prototype=e.prototype),r},nr=jn,rr=Sn,or=At,ir=x,ur=Yn,cr=er,ar=i,fr=D("Reflect","construct"),sr=ar((function(){function t(){}return!(fr((function(){}),[],t)instanceof t)})),lr=!ar((function(){fr((function(){}))})),hr=sr||lr;function pr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function vr(t,e,n){return e&&yr(t.prototype,e),n&&yr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function mr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dr(t,e){return dr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},dr(t,e)}function br(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dr(t,e)}function gr(t){return gr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gr(t)}function wr(t,e){if(e&&("object"===gr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return mr(t)}function jr(t){return jr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},jr(t)}function xr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}nr({target:"Reflect",stat:!0,forced:hr,sham:hr},{construct:function(t,e){rr(t),or(e);var n=arguments.length<3?t:rr(arguments[2]);if(lr&&!sr)return fr(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(cr.apply(t,r))}var o=n.prototype,i=ur(ir(o)?o:Object.prototype),u=Function.apply.call(t,i,e);return ir(u)?u:i}});var Or={};Or[st("toStringTag")]="z";var Er="[object z]"===String(Or),Dr=Er,_r=v,kr=st("toStringTag"),Tr="Arguments"==_r(function(){return arguments}()),Sr=Dr?_r:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),kr))?n:Tr?_r(e):"Object"==(r=_r(e))&&"function"==typeof e.callee?"Arguments":r},Pr=Sr,Lr=Er?{}.toString:function(){return"[object "+Pr(this)+"]"},Rr=Er,Mr=qt.exports,Ar=Lr;Rr||Mr(Object.prototype,"toString",Ar,{unsafe:!0});var Cr=r.Promise,Nr=qt.exports,Ir=x,Fr=At,Br=function(t){if(!Ir(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t},zr=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return Fr(n),Br(r),e?t.call(n,r):n.__proto__=r,n}}():void 0),Ur=D,Wr=Rt,qr=u,Kr=st("species"),Gr={},Hr=Gr,Vr=st("iterator"),Xr=Array.prototype,Yr=Sn,Jr=function(t,e,n){if(Yr(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},Qr=Sr,Zr=Gr,$r=st("iterator"),to=function(t){if(null!=t)return t[$r]||t["@@iterator"]||Zr[Qr(t)]},eo=At,no=to,ro=At,oo=At,io=function(t){return void 0!==t&&(Hr.Array===t||Xr[Vr]===t)},uo=Me,co=Jr,ao=function(t,e){var n=arguments.length<2?no(t):e;if("function"!=typeof n)throw TypeError(String(t)+" is not iterable");return eo(n.call(t))},fo=to,so=function(t,e,n){var r,o;ro(t);try{if(void 0===(r=t.return)){if("throw"===e)throw n;return n}r=r.call(t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return ro(r),n},lo=function(t,e){this.stopped=t,this.result=e},ho=st("iterator"),po=!1;try{var yo=0,vo={next:function(){return{done:!!yo++}},return:function(){po=!0}};vo[ho]=function(){return this},Array.from(vo,(function(){throw 2}))}catch(t){}var mo,bo,go,wo,jo=At,xo=Sn,Oo=st("species"),Eo=/(?:ipad|iphone|ipod).*applewebkit/i.test(_),Do="process"==v(r.process),_o=r,ko=i,To=Jr,So=In,Po=jt,Lo=Eo,Ro=Do,Mo=_o.setImmediate,Ao=_o.clearImmediate,Co=_o.process,No=_o.MessageChannel,Io=_o.Dispatch,Fo=0,Bo={},zo="onreadystatechange";try{mo=_o.location}catch(t){}var Uo=function(t){if(Bo.hasOwnProperty(t)){var e=Bo[t];delete Bo[t],e()}},Wo=function(t){return function(){Uo(t)}},qo=function(t){Uo(t.data)},Ko=function(t){_o.postMessage(String(t),mo.protocol+"//"+mo.host)};Mo&&Ao||(Mo=function(t){for(var e=[],n=arguments.length,r=1;n>r;)e.push(arguments[r++]);return Bo[++Fo]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},bo(Fo),Fo},Ao=function(t){delete Bo[t]},Ro?bo=function(t){Co.nextTick(Wo(t))}:Io&&Io.now?bo=function(t){Io.now(Wo(t))}:No&&!Lo?(wo=(go=new No).port2,go.port1.onmessage=qo,bo=To(wo.postMessage,wo,1)):_o.addEventListener&&"function"==typeof postMessage&&!_o.importScripts&&mo&&"file:"!==mo.protocol&&!ko(Ko)?(bo=Ko,_o.addEventListener("message",qo,!1)):bo=zo in Po("script")?function(t){So.appendChild(Po("script")).onreadystatechange=function(){So.removeChild(this),Uo(t)}}:function(t){setTimeout(Wo(t),0)});var Go,Ho,Vo,Xo,Yo,Jo,Qo,Zo,$o={set:Mo,clear:Ao},ti=r,ei=/ipad|iphone|ipod/i.test(_)&&void 0!==ti.Pebble,ni=/web0s(?!.*chrome)/i.test(_),ri=r,oi=o.f,ii=$o.set,ui=Eo,ci=ei,ai=ni,fi=Do,si=ri.MutationObserver||ri.WebKitMutationObserver,li=ri.document,hi=ri.process,pi=ri.Promise,yi=oi(ri,"queueMicrotask"),vi=yi&&yi.value;vi||(Go=function(){var t,e;for(fi&&(t=hi.domain)&&t.exit();Ho;){e=Ho.fn,Ho=Ho.next;try{e()}catch(t){throw Ho?Xo():Vo=void 0,t}}Vo=void 0,t&&t.enter()},ui||fi||ai||!si||!li?!ci&&pi&&pi.resolve?((Qo=pi.resolve(void 0)).constructor=pi,Zo=Qo.then,Xo=function(){Zo.call(Qo,Go)}):Xo=fi?function(){hi.nextTick(Go)}:function(){ii.call(ri,Go)}:(Yo=!0,Jo=li.createTextNode(""),new si(Go).observe(Jo,{characterData:!0}),Xo=function(){Jo.data=Yo=!Yo}));var mi=vi||function(t){var e={fn:t,next:void 0};Vo&&(Vo.next=e),Ho||(Ho=e,Xo()),Vo=e},di={},bi=Sn,gi=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=bi(e),this.reject=bi(n)};di.f=function(t){return new gi(t)};var wi,ji,xi,Oi,Ei=At,Di=x,_i=di,ki=r,Ti="object"==typeof window,Si=jn,Pi=r,Li=D,Ri=Cr,Mi=qt.exports,Ai=function(t,e,n){for(var r in e)Nr(t,r,e[r],n);return t},Ci=zr,Ni=Dn,Ii=function(t){var e=Ur(t),n=Wr.f;qr&&e&&!e[Kr]&&n(e,Kr,{configurable:!0,get:function(){return this}})},Fi=x,Bi=Sn,zi=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t},Ui=Yt,Wi=function(t,e,n){var r,o,i,u,c,a,f,s=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),y=co(e,s,1+l+p),v=function(t){return r&&so(r,"normal",t),new lo(!0,t)},m=function(t){return l?(oo(t),p?y(t[0],t[1],v):y(t[0],t[1])):p?y(t,v):y(t)};if(h)r=t;else{if("function"!=typeof(o=fo(t)))throw TypeError("Target is not iterable");if(io(o)){for(i=0,u=uo(t.length);u>i;i++)if((c=m(t[i]))&&c instanceof lo)return c;return new lo(!1)}r=ao(t,o)}for(a=r.next;!(f=a.call(r)).done;){try{c=m(f.value)}catch(t){so(r,"throw",t)}if("object"==typeof c&&c&&c instanceof lo)return c}return new lo(!1)},qi=function(t,e){if(!e&&!po)return!1;var n=!1;try{var r={};r[ho]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},Ki=function(t,e){var n,r=jo(t).constructor;return void 0===r||null==(n=jo(r)[Oo])?e:xo(n)},Gi=$o.set,Hi=mi,Vi=function(t,e){if(Ei(t),Di(e)&&e.constructor===t)return e;var n=_i.f(t);return(0,n.resolve)(e),n.promise},Xi=function(t,e){var n=ki.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))},Yi=di,Ji=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Qi=be,Zi=pn,$i=Ti,tu=Do,eu=M,nu=st("species"),ru="Promise",ou=Qi.get,iu=Qi.set,uu=Qi.getterFor(ru),cu=Ri&&Ri.prototype,au=Ri,fu=cu,su=Pi.TypeError,lu=Pi.document,hu=Pi.process,pu=Yi.f,yu=pu,vu=!!(lu&&lu.createEvent&&Pi.dispatchEvent),mu="function"==typeof PromiseRejectionEvent,du="unhandledrejection",bu=!1,gu=Zi(ru,(function(){var t=Ui(au),e=t!==String(au);if(!e&&66===eu)return!0;if(eu>=51&&/native code/.test(t))return!1;var n=new au((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[nu]=r,!(bu=n.then((function(){}))instanceof r)||!e&&$i&&!mu})),wu=gu||!qi((function(t){au.all(t).catch((function(){}))})),ju=function(t){var e;return!(!Fi(t)||"function"!=typeof(e=t.then))&&e},xu=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;Hi((function(){for(var r=t.value,o=1==t.state,i=0;n.length>i;){var u,c,a,f=n[i++],s=o?f.ok:f.fail,l=f.resolve,h=f.reject,p=f.domain;try{s?(o||(2===t.rejection&&_u(t),t.rejection=1),!0===s?u=r:(p&&p.enter(),u=s(r),p&&(p.exit(),a=!0)),u===f.promise?h(su("Promise-chain cycle")):(c=ju(u))?c.call(u,l,h):l(u)):h(r)}catch(t){p&&!a&&p.exit(),h(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&Eu(t)}))}},Ou=function(t,e,n){var r,o;vu?((r=lu.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),Pi.dispatchEvent(r)):r={promise:e,reason:n},!mu&&(o=Pi["on"+t])?o(r):t===du&&Xi("Unhandled promise rejection",n)},Eu=function(t){Gi.call(Pi,(function(){var e,n=t.facade,r=t.value;if(Du(t)&&(e=Ji((function(){tu?hu.emit("unhandledRejection",r,n):Ou(du,n,r)})),t.rejection=tu||Du(t)?2:1,e.error))throw e.value}))},Du=function(t){return 1!==t.rejection&&!t.parent},_u=function(t){Gi.call(Pi,(function(){var e=t.facade;tu?hu.emit("rejectionHandled",e):Ou("rejectionhandled",e,t.value)}))},ku=function(t,e,n){return function(r){t(e,r,n)}},Tu=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,xu(t,!0))},Su=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw su("Promise can't be resolved itself");var r=ju(e);r?Hi((function(){var n={done:!1};try{r.call(e,ku(Su,n,t),ku(Tu,n,t))}catch(e){Tu(n,e,t)}})):(t.value=e,t.state=1,xu(t,!1))}catch(e){Tu({done:!1},e,t)}}};if(gu&&(fu=(au=function(t){zi(this,au,ru),Bi(t),wi.call(this);var e=ou(this);try{t(ku(Su,e),ku(Tu,e))}catch(t){Tu(e,t)}}).prototype,(wi=function(t){iu(this,{type:ru,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=Ai(fu,{then:function(t,e){var n=uu(this),r=pu(Ki(this,au));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=tu?hu.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&xu(n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),ji=function(){var t=new wi,e=ou(t);this.promise=t,this.resolve=ku(Su,e),this.reject=ku(Tu,e)},Yi.f=pu=function(t){return t===au||t===xi?new ji(t):yu(t)},"function"==typeof Ri&&cu!==Object.prototype)){Oi=cu.then,bu||(Mi(cu,"then",(function(t,e){var n=this;return new au((function(t,e){Oi.call(n,t,e)})).then(t,e)}),{unsafe:!0}),Mi(cu,"catch",fu.catch,{unsafe:!0}));try{delete cu.constructor}catch(t){}Ci&&Ci(cu,fu)}function Pu(){}function Lu(){Lu.init.call(this)}function Ru(t){return void 0===t._maxListeners?Lu.defaultMaxListeners:t._maxListeners}function Mu(t,e,n){if(e)t.call(n);else for(var r=t.length,o=Uu(t,r),i=0;i<r;++i)o[i].call(n)}function Au(t,e,n,r){if(e)t.call(n,r);else for(var o=t.length,i=Uu(t,o),u=0;u<o;++u)i[u].call(n,r)}function Cu(t,e,n,r,o){if(e)t.call(n,r,o);else for(var i=t.length,u=Uu(t,i),c=0;c<i;++c)u[c].call(n,r,o)}function Nu(t,e,n,r,o,i){if(e)t.call(n,r,o,i);else for(var u=t.length,c=Uu(t,u),a=0;a<u;++a)c[a].call(n,r,o,i)}function Iu(t,e,n,r){if(e)t.apply(n,r);else for(var o=t.length,i=Uu(t,o),u=0;u<o;++u)i[u].apply(n,r)}function Fu(t,e,n,r){var o,i,u,c;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((i=t._events)?(i.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),i=t._events),u=i[e]):(i=t._events=new Pu,t._eventsCount=0),u){if("function"==typeof u?u=i[e]=r?[n,u]:[u,n]:r?u.unshift(n):u.push(n),!u.warned&&(o=Ru(t))&&o>0&&u.length>o){u.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+e+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=e,a.count=u.length,c=a,"function"==typeof console.warn?console.warn(c):console.log(c)}}else u=i[e]=n,++t._eventsCount;return t}function Bu(t,e,n){var r=!1;function o(){t.removeListener(e,o),r||(r=!0,n.apply(t,arguments))}return o.listener=n,o}function zu(t){var e=this._events;if(e){var n=e[t];if("function"==typeof n)return 1;if(n)return n.length}return 0}function Uu(t,e){for(var n=new Array(e);e--;)n[e]=t[e];return n}function Wu(t){var e=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(t){return!1}}();return function(){var n,r=jr(t);if(e){var o=jr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return wr(this,n)}}Si({global:!0,wrap:!0,forced:gu},{Promise:au}),Ni(au,ru,!1),Ii(ru),xi=Li(ru),Si({target:ru,stat:!0,forced:gu},{reject:function(t){var e=pu(this);return e.reject.call(void 0,t),e.promise}}),Si({target:ru,stat:!0,forced:gu},{resolve:function(t){return Vi(this,t)}}),Si({target:ru,stat:!0,forced:wu},{all:function(t){var e=this,n=pu(e),r=n.resolve,o=n.reject,i=Ji((function(){var n=Bi(e.resolve),i=[],u=0,c=1;Wi(t,(function(t){var a=u++,f=!1;i.push(void 0),c++,n.call(e,t).then((function(t){f||(f=!0,i[a]=t,--c||r(i))}),o)})),--c||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=pu(e),r=n.reject,o=Ji((function(){var o=Bi(e.resolve);Wi(t,(function(t){o.call(e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}}),Pu.prototype=Object.create(null),Lu.EventEmitter=Lu,Lu.usingDomains=!1,Lu.prototype.domain=void 0,Lu.prototype._events=void 0,Lu.prototype._maxListeners=void 0,Lu.defaultMaxListeners=10,Lu.init=function(){this.domain=null,Lu.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Pu,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Lu.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},Lu.prototype.getMaxListeners=function(){return Ru(this)},Lu.prototype.emit=function(t){var e,n,r,o,i,u,c,a="error"===t;if(u=this._events)a=a&&null==u.error;else if(!a)return!1;if(c=this.domain,a){if(e=arguments[1],!c){if(e instanceof Error)throw e;var f=new Error('Uncaught, unspecified "error" event. ('+e+")");throw f.context=e,f}return e||(e=new Error('Uncaught, unspecified "error" event')),e.domainEmitter=this,e.domain=c,e.domainThrown=!1,c.emit("error",e),!1}if(!(n=u[t]))return!1;var s="function"==typeof n;switch(r=arguments.length){case 1:Mu(n,s,this);break;case 2:Au(n,s,this,arguments[1]);break;case 3:Cu(n,s,this,arguments[1],arguments[2]);break;case 4:Nu(n,s,this,arguments[1],arguments[2],arguments[3]);break;default:for(o=new Array(r-1),i=1;i<r;i++)o[i-1]=arguments[i];Iu(n,s,this,o)}return!0},Lu.prototype.addListener=function(t,e){return Fu(this,t,e,!1)},Lu.prototype.on=Lu.prototype.addListener,Lu.prototype.prependListener=function(t,e){return Fu(this,t,e,!0)},Lu.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,Bu(this,t,e)),this},Lu.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,Bu(this,t,e)),this},Lu.prototype.removeListener=function(t,e){var n,r,o,i,u;if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(n=r[t]))return this;if(n===e||n.listener&&n.listener===e)0==--this._eventsCount?this._events=new Pu:(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(o=-1,i=n.length;i-- >0;)if(n[i]===e||n[i].listener&&n[i].listener===e){u=n[i].listener,o=i;break}if(o<0)return this;if(1===n.length){if(n[0]=void 0,0==--this._eventsCount)return this._events=new Pu,this;delete r[t]}else!function(t,e){for(var n=e,r=n+1,o=t.length;r<o;n+=1,r+=1)t[n]=t[r];t.pop()}(n,o);r.removeListener&&this.emit("removeListener",t,u||e)}return this},Lu.prototype.off=function(t,e){return this.removeListener(t,e)},Lu.prototype.removeAllListeners=function(t){var e,n;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=new Pu,this._eventsCount=0):n[t]&&(0==--this._eventsCount?this._events=new Pu:delete n[t]),this;if(0===arguments.length){for(var r,o=Object.keys(n),i=0;i<o.length;++i)"removeListener"!==(r=o[i])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=new Pu,this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(e)do{this.removeListener(t,e[e.length-1])}while(e[0]);return this},Lu.prototype.listeners=function(t){var e,n=this._events;return n&&(e=n[t])?"function"==typeof e?[e.listener||e]:function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(e):[]},Lu.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):zu.call(t,e)},Lu.prototype.listenerCount=zu,Lu.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var qu=function(t){br(n,t);var e=Wu(n);function n(t){var r;return pr(this,n),xr(mr(r=e.call(this)),"timeout",null),xr(mr(r),"startTimestamp",-1),r.minDelay=t.min,r.maxDelay=t.max,r.initialDelay=t.initial||0,r.maxAttemptsCount=t.maxAttemptsCount||0,r.maxAttemptsTime=t.maxAttemptsTime||0,r.randomness=t.randomness||0,r.inProgress=!1,r.attemptNum=0,r.prevDelay=0,r.currDelay=0,r}return vr(n,[{key:"attempt",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.attemptNum++,this.emit("attempt",this)}},{key:"nextDelay",value:function(t){if("number"==typeof t)return this.prevDelay=0,this.currDelay=t,t;if(0==this.attemptNum)return this.initialDelay;if(1==this.attemptNum)return this.currDelay=this.minDelay,this.currDelay;this.prevDelay=this.currDelay;var e=this.currDelay+this.prevDelay;return this.maxDelay&&e>this.maxDelay&&(this.currDelay=this.maxDelay,e=this.maxDelay),this.currDelay=e,e}},{key:"randomize",value:function(t){var e=t*this.randomness,n=Math.round(Math.random()*e*2-e);return Math.max(0,t+n)}},{key:"scheduleAttempt",value:function(t){var e=this;if(this.maxAttemptsCount&&this.attemptNum>=this.maxAttemptsCount)return this.cleanup(),void this.emit("failed",new Error("Maximum attempt count limit reached"));var n=this.nextDelay(t);if(n=this.randomize(n),this.maxAttemptsTime&&this.startTimestamp+this.maxAttemptsTime<Date.now()+n)return this.cleanup(),void this.emit("failed",new Error("Maximum attempt time limit reached"));this.timeout=setTimeout((function(){return e.attempt()}),n)}},{key:"cleanup",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.inProgress=!1,this.attemptNum=0,this.prevDelay=0,this.currDelay=0}},{key:"start",value:function(){if(this.inProgress)throw new Error("Retrier is already in progress");this.inProgress=!0,this.startTimestamp=Date.now(),this.scheduleAttempt(this.initialDelay)}},{key:"cancel",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null,this.inProgress=!1,this.emit("cancelled"))}},{key:"succeeded",value:function(t){this.emit("succeeded",t)}},{key:"failed",value:function(t,e){if(this.timeout)throw new Error("Retrier attempt is already in progress");this.scheduleAttempt(e)}}]),n}(Lu),Ku=function(t){br(n,t);var e=Wu(n);function n(t){var r;return pr(this,n),xr(mr(r=e.call(this)),"resolve",(function(){})),xr(mr(r),"reject",(function(){})),r.retrier=new qu(t),r}return vr(n,[{key:"run",value:function(t){var e=this;return this.retrier.on("attempt",(function(){t().then((function(t){return e.retrier.succeeded(t)})).catch((function(t){return e.retrier.failed(t)}))})),this.retrier.on("succeeded",(function(t){return e.resolve(t)})),this.retrier.on("cancelled",(function(){return e.reject(new Error("Cancelled"))})),this.retrier.on("failed",(function(t){return e.reject(t)})),new Promise((function(t,n){e.resolve=t,e.reject=n,e.retrier.start()}))}},{key:"cancel",value:function(){this.retrier.cancel()}}]),n}(Lu);function Gu(t){var e=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(t){return!1}}();return function(){var n,r=jr(t);if(e){var o=jr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return wr(this,n)}}function Hu(t){return null!=t}var Vu=function(t){br(n,t);var e=Gu(n);function n(t){var r;pr(this,n),xr(mr(r=e.call(this)),"backoffDelay",0),xr(mr(r),"nextBackoffDelay",0),xr(mr(r),"backoffNumber",0),xr(mr(r),"timeoutID",null),xr(mr(r),"maxNumberOfRetry",-1);var o=t=t||{},i=o.initialDelay,u=o.maxDelay,c=o.randomisationFactor,a=o.factor;if(Hu(i)&&i<1)throw new Error("The initial timeout must be equal to or greater than 1.");if(Hu(u)&&u<=1)throw new Error("The maximal timeout must be greater than 1.");if(Hu(c)&&(c<0||c>1))throw new Error("The randomisation factor must be between 0 and 1.");if(Hu(a)&&a<=1)throw new Error("Exponential factor should be greater than 1.");if(r.initialDelay=i||100,r.maxDelay=u||1e4,r.maxDelay<=r.initialDelay)throw new Error("The maximal backoff delay must be greater than the initial backoff delay.");return r.randomisationFactor=c||0,r.factor=a||2,r.reset(),r}return vr(n,[{key:"backoff",value:function(t){null==this.timeoutID&&(this.backoffNumber===this.maxNumberOfRetry?(this.emit("fail",t),this.reset()):(this.backoffDelay=this.next(),this.timeoutID=setTimeout(this.onBackoff.bind(this),this.backoffDelay),this.emit("backoff",this.backoffNumber,this.backoffDelay,t)))}},{key:"reset",value:function(){this.backoffDelay=0,this.nextBackoffDelay=this.initialDelay,this.backoffNumber=0,this.timeoutID&&clearTimeout(this.timeoutID),this.timeoutID=null}},{key:"failAfter",value:function(t){if(t<=0)throw new Error("Expected a maximum number of retry greater than 0 but got ".concat(t));this.maxNumberOfRetry=t}},{key:"next",value:function(){this.backoffDelay=Math.min(this.nextBackoffDelay,this.maxDelay),this.nextBackoffDelay=this.backoffDelay*this.factor;var t=1+Math.random()*this.randomisationFactor;return Math.min(this.maxDelay,Math.round(this.backoffDelay*t))}},{key:"onBackoff",value:function(){this.timeoutID=null,this.emit("ready",this.backoffNumber,this.backoffDelay),this.backoffNumber++}}],[{key:"exponential",value:function(t){return new n(t)}}]),n}(Lu);return t.AsyncRetrier=Ku,t.Backoff=Vu,t.Retrier=qu,Object.defineProperty(t,"__esModule",{value:!0}),t}({});

@@ -6,2 +6,10 @@ # Change Log

### [4.0.9-rc.1](https://github.com/twilio/operation-retrier.ts/compare/@twilio/operation-retrier@4.0.8-rc.2...@twilio/operation-retrier@4.0.9-rc.1) (2022-09-21)
**Note:** Version bump only for package @twilio/operation-retrier
### [4.0.8-rc.5](https://github.com/twilio/operation-retrier.ts/compare/@twilio/operation-retrier@4.0.8-rc.4...@twilio/operation-retrier@4.0.8-rc.5) (2022-08-23)

@@ -8,0 +16,0 @@

{
"name": "@twilio/operation-retrier",
"version": "4.0.8-rc.5",
"version": "4.0.9-rc.1",
"description": "RTD retrier",

@@ -5,0 +5,0 @@ "author": "Sergei Chertkov",

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