Socket
Socket
Sign inDemoInstall

@pollyjs/core

Package Overview
Dependencies
Maintainers
2
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pollyjs/core - npm Package Compare versions

Comparing version 4.3.0 to 5.0.0

22

CHANGELOG.md

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

# [5.0.0](https://github.com/netflix/pollyjs/tree/master/packages/@pollyjs/core/compare/v4.3.0...v5.0.0) (2020-06-23)
### Bug Fixes
* **core:** Compute order based on id and recording name ([#342](https://github.com/netflix/pollyjs/tree/master/packages/@pollyjs/core/issues/342)) ([42004d2](https://github.com/netflix/pollyjs/tree/master/packages/@pollyjs/core/commit/42004d2))
### Features
* Remove deprecated Persister.name and Adapter.name ([#343](https://github.com/netflix/pollyjs/tree/master/packages/@pollyjs/core/issues/343)) ([1223ba0](https://github.com/netflix/pollyjs/tree/master/packages/@pollyjs/core/commit/1223ba0))
### BREAKING CHANGES
* Persister.name and Adapter.name have been replaced with Persister.id and Adapter.id
* **core:** A request's order is will now be computed based on its id and the recording name it will be persisted to.
# [4.3.0](https://github.com/netflix/pollyjs/tree/master/packages/@pollyjs/core/compare/v4.2.1...v4.3.0) (2020-05-18)

@@ -8,0 +30,0 @@

2

dist/es/pollyjs-core.min.js

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

import{ACTIONS as t,assert as e,getFactoryId as r,timeout as n,MODES as o,EXPIRY_STRATEGIES as i,URL as s,HTTP_STATUS_CODES as u,timestamp as a,buildUrl as c,HTTP_METHODS as h,PollyError as f}from"@pollyjs/utils";import l from"blueimp-md5";import p from"fast-json-stable-stringify";import d from"is-absolute-url";import v from"@sindresorhus/fnv1a";import g from"slugify";import y from"route-recognizer";var m=Object.freeze({}),_=Math.ceil,b=Math.floor,w=function(t){return isNaN(t=+t)?0:(t>0?b:_)(t)},O=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t};function j(t,e){return t(e={exports:{}},e.exports),e.exports}var S=j(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),E=j(function(t){var e=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=e)}),P=(E.version,function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}),A=function(t,e,r){if(P(t),void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}},x=function(t){return"object"==typeof t?null!==t:"function"==typeof t},T=function(t){if(!x(t))throw TypeError(t+" is not an object!");return t},R=function(t){try{return!!t()}catch(t){return!0}},k=!R(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),N=S.document,I=x(N)&&x(N.createElement),F=function(t){return I?N.createElement(t):{}},L=!k&&!R(function(){return 7!=Object.defineProperty(F("div"),"a",{get:function(){return 7}}).a}),M=function(t,e){if(!x(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!x(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!x(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!x(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},C=Object.defineProperty,$={f:k?Object.defineProperty:function(t,e,r){if(T(t),e=M(e,!0),T(r),L)try{return C(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[e]=r.value),t}},z=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},q=k?function(t,e,r){return $.f(t,e,z(1,r))}:function(t,e,r){return t[e]=r,t},H={}.hasOwnProperty,D=function(t,e){return H.call(t,e)},W=function(t,e,r){var n,o,i,s=t&W.F,u=t&W.G,a=t&W.S,c=t&W.P,h=t&W.B,f=t&W.W,l=u?E:E[e]||(E[e]={}),p=l.prototype,d=u?S:a?S[e]:(S[e]||{}).prototype;for(n in u&&(r=e),r)(o=!s&&d&&void 0!==d[n])&&D(l,n)||(i=o?d[n]:r[n],l[n]=u&&"function"!=typeof d[n]?r[n]:h&&o?A(i,S):f&&d[n]==i?function(t){var e=function(e,r,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,r)}return new t(e,r,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(i):c&&"function"==typeof i?A(Function.call,i):i,c&&((l.virtual||(l.virtual={}))[n]=i,t&W.R&&p&&!p[n]&&q(p,n,i)))};W.F=1,W.G=2,W.S=4,W.P=8,W.B=16,W.W=32,W.U=64,W.R=128;var U,B=W,G=q,J={},V={}.toString,K=function(t){return V.call(t).slice(8,-1)},Y=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==K(t)?t.split(""):Object(t)},X=function(t){return Y(O(t))},Q=Math.min,Z=function(t){return t>0?Q(w(t),9007199254740991):0},tt=Math.max,et=Math.min,rt=j(function(t){var e=S["__core-js_shared__"]||(S["__core-js_shared__"]={});(t.exports=function(t,r){return e[t]||(e[t]=void 0!==r?r:{})})("versions",[]).push({version:E.version,mode:"pure",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),nt=0,ot=Math.random(),it=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++nt+ot).toString(36))},st=rt("keys"),ut=function(t){return st[t]||(st[t]=it(t))},at=(U=!1,function(t,e,r){var n,o=X(t),i=Z(o.length),s=function(t,e){return(t=w(t))<0?tt(t+e,0):et(t,e)}(r,i);if(U&&e!=e){for(;i>s;)if((n=o[s++])!=n)return!0}else for(;i>s;s++)if((U||s in o)&&o[s]===e)return U||s||0;return!U&&-1}),ct=ut("IE_PROTO"),ht=function(t,e){var r,n=X(t),o=0,i=[];for(r in n)r!=ct&&D(n,r)&&i.push(r);for(;e.length>o;)D(n,r=e[o++])&&(~at(i,r)||i.push(r));return i},ft="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),lt=Object.keys||function(t){return ht(t,ft)},pt=k?Object.defineProperties:function(t,e){T(t);for(var r,n=lt(e),o=n.length,i=0;o>i;)$.f(t,r=n[i++],e[r]);return t},dt=S.document,vt=dt&&dt.documentElement,gt=ut("IE_PROTO"),yt=function(){},mt=function(){var t,e=F("iframe"),r=ft.length;for(e.style.display="none",vt.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),mt=t.F;r--;)delete mt.prototype[ft[r]];return mt()},_t=Object.create||function(t,e){var r;return null!==t?(yt.prototype=T(t),r=new yt,yt.prototype=null,r[gt]=t):r=mt(),void 0===e?r:pt(r,e)},bt=j(function(t){var e=rt("wks"),r=S.Symbol,n="function"==typeof r;(t.exports=function(t){return e[t]||(e[t]=n&&r[t]||(n?r:it)("Symbol."+t))}).store=e}),wt=$.f,Ot=bt("toStringTag"),jt=function(t,e,r){t&&!D(t=r?t:t.prototype,Ot)&&wt(t,Ot,{configurable:!0,value:e})},St={};q(St,bt("iterator"),function(){return this});var Et,Pt=function(t,e,r){t.prototype=_t(St,{next:z(1,r)}),jt(t,e+" Iterator")},At=function(t){return Object(O(t))},xt=ut("IE_PROTO"),Tt=Object.prototype,Rt=Object.getPrototypeOf||function(t){return t=At(t),D(t,xt)?t[xt]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Tt:null},kt=bt("iterator"),Nt=!([].keys&&"next"in[].keys()),It=function(){return this},Ft=function(t,e,r,n,o,i,s){Pt(r,e,n);var u,a,c,h=function(t){if(!Nt&&t in d)return d[t];switch(t){case"keys":case"values":return function(){return new r(this,t)}}return function(){return new r(this,t)}},f=e+" Iterator",l="values"==o,p=!1,d=t.prototype,v=d[kt]||d["@@iterator"]||o&&d[o],g=v||h(o),y=o?l?h("entries"):g:void 0,m="Array"==e&&d.entries||v;if(m&&(c=Rt(m.call(new t)))!==Object.prototype&&c.next&&jt(c,f,!0),l&&v&&"values"!==v.name&&(p=!0,g=function(){return v.call(this)}),s&&(Nt||p||!d[kt])&&q(d,kt,g),J[e]=g,J[f]=It,o)if(u={values:l?g:h("values"),keys:i?g:h("keys"),entries:y},s)for(a in u)a in d||G(d,a,u[a]);else B(B.P+B.F*(Nt||p),e,u);return u},Lt=(Et=!0,function(t,e){var r,n,o=String(O(t)),i=w(e),s=o.length;return i<0||i>=s?Et?"":void 0:(r=o.charCodeAt(i))<55296||r>56319||i+1===s||(n=o.charCodeAt(i+1))<56320||n>57343?Et?o.charAt(i):r:Et?o.slice(i,i+2):n-56320+(r-55296<<10)+65536});Ft(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,r=this._i;return r>=e.length?{value:void 0,done:!0}:(t=Lt(e,r),this._i+=t.length,{value:t,done:!1})});var Mt=function(t,e){return{value:e,done:!!t}};Ft(Array,"Array",function(t,e){this._t=X(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,Mt(1)):Mt(0,"keys"==e?r:"values"==e?t[r]:[r,t[r]])},"values");J.Arguments=J.Array;for(var Ct=bt("toStringTag"),$t="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),zt=0;zt<$t.length;zt++){var qt=$t[zt],Ht=S[qt],Dt=Ht&&Ht.prototype;Dt&&!Dt[Ct]&&q(Dt,Ct,qt),J[qt]=J.Array}var Wt,Ut,Bt,Gt=bt("toStringTag"),Jt="Arguments"==K(function(){return arguments}()),Vt=function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Gt))?r:Jt?K(e):"Object"==(n=K(e))&&"function"==typeof e.callee?"Arguments":n},Kt=function(t,e,r,n){if(!(t instanceof e)||void 0!==n&&n in t)throw TypeError(r+": incorrect invocation!");return t},Yt=function(t,e,r,n){try{return n?e(T(r)[0],r[1]):e(r)}catch(e){var o=t.return;throw void 0!==o&&T(o.call(t)),e}},Xt=bt("iterator"),Qt=Array.prototype,Zt=bt("iterator"),te=E.getIteratorMethod=function(t){if(null!=t)return t[Zt]||t["@@iterator"]||J[Vt(t)]},ee=j(function(t){var e={},r={},n=t.exports=function(t,n,o,i,s){var u,a,c,h,f,l=s?function(){return t}:te(t),p=A(o,i,n?2:1),d=0;if("function"!=typeof l)throw TypeError(t+" is not iterable!");if(void 0===(f=l)||J.Array!==f&&Qt[Xt]!==f){for(c=l.call(t);!(a=c.next()).done;)if((h=Yt(c,p,a.value,n))===e||h===r)return h}else for(u=Z(t.length);u>d;d++)if((h=n?p(T(a=t[d])[0],a[1]):p(t[d]))===e||h===r)return h};n.BREAK=e,n.RETURN=r}),re=bt("species"),ne=function(t,e){var r,n=T(t).constructor;return void 0===n||null==(r=T(n)[re])?e:P(r)},oe=S.process,ie=S.setImmediate,se=S.clearImmediate,ue=S.MessageChannel,ae=S.Dispatch,ce=0,he={},fe=function(){var t=+this;if(he.hasOwnProperty(t)){var e=he[t];delete he[t],e()}},le=function(t){fe.call(t.data)};ie&&se||(ie=function(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return he[++ce]=function(){!function(t,e,r){var n=void 0===r;switch(e.length){case 0:return n?t():t.call(r);case 1:return n?t(e[0]):t.call(r,e[0]);case 2:return n?t(e[0],e[1]):t.call(r,e[0],e[1]);case 3:return n?t(e[0],e[1],e[2]):t.call(r,e[0],e[1],e[2]);case 4:return n?t(e[0],e[1],e[2],e[3]):t.call(r,e[0],e[1],e[2],e[3])}t.apply(r,e)}("function"==typeof t?t:Function(t),e)},Wt(ce),ce},se=function(t){delete he[t]},"process"==K(oe)?Wt=function(t){oe.nextTick(A(fe,t,1))}:ae&&ae.now?Wt=function(t){ae.now(A(fe,t,1))}:ue?(Bt=(Ut=new ue).port2,Ut.port1.onmessage=le,Wt=A(Bt.postMessage,Bt,1)):S.addEventListener&&"function"==typeof postMessage&&!S.importScripts?(Wt=function(t){S.postMessage(t+"","*")},S.addEventListener("message",le,!1)):Wt="onreadystatechange"in F("script")?function(t){vt.appendChild(F("script")).onreadystatechange=function(){vt.removeChild(this),fe.call(t)}}:function(t){setTimeout(A(fe,t,1),0)});var pe={set:ie,clear:se},de=pe.set,ve=S.MutationObserver||S.WebKitMutationObserver,ge=S.process,ye=S.Promise,me="process"==K(ge);function _e(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n}),this.resolve=P(e),this.reject=P(r)}var be={f:function(t){return new _e(t)}},we=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}},Oe=S.navigator,je=Oe&&Oe.userAgent||"",Se=function(t,e){if(T(t),x(e)&&e.constructor===t)return e;var r=be.f(t);return(0,r.resolve)(e),r.promise},Ee=function(t,e,r){for(var n in e)r&&t[n]?t[n]=e[n]:q(t,n,e[n]);return t},Pe=bt("species"),Ae=function(t){var e="function"==typeof E[t]?E[t]:S[t];k&&e&&!e[Pe]&&$.f(e,Pe,{configurable:!0,get:function(){return this}})},xe=bt("iterator"),Te=!1;try{var Re=[7][xe]();Re.return=function(){Te=!0},Array.from(Re,function(){throw 2})}catch(t){}var ke,Ne,Ie,Fe,Le,Me=pe.set,Ce=function(){var t,e,r,n=function(){var n,o;for(me&&(n=ge.domain)&&n.exit();t;){o=t.fn,t=t.next;try{o()}catch(n){throw t?r():e=void 0,n}}e=void 0,n&&n.enter()};if(me)r=function(){ge.nextTick(n)};else if(!ve||S.navigator&&S.navigator.standalone)if(ye&&ye.resolve){var o=ye.resolve(void 0);r=function(){o.then(n)}}else r=function(){de.call(S,n)};else{var i=!0,s=document.createTextNode("");new ve(n).observe(s,{characterData:!0}),r=function(){s.data=i=!i}}return function(n){var o={fn:n,next:void 0};e&&(e.next=o),t||(t=o,r()),e=o}}(),$e=S.TypeError,ze=S.process,qe=ze&&ze.versions,He=qe&&qe.v8||"",De=S.Promise,We="process"==Vt(ze),Ue=function(){},Be=Ne=be.f,Ge=!!function(){try{var t=De.resolve(1),e=(t.constructor={})[bt("species")]=function(t){t(Ue,Ue)};return(We||"function"==typeof PromiseRejectionEvent)&&t.then(Ue)instanceof e&&0!==He.indexOf("6.6")&&-1===je.indexOf("Chrome/66")}catch(t){}}(),Je=function(t){var e;return!(!x(t)||"function"!=typeof(e=t.then))&&e},Ve=function(t,e){if(!t._n){t._n=!0;var r=t._c;Ce(function(){for(var n=t._v,o=1==t._s,i=0,s=function(e){var r,i,s,u=o?e.ok:e.fail,a=e.resolve,c=e.reject,h=e.domain;try{u?(o||(2==t._h&&Xe(t),t._h=1),!0===u?r=n:(h&&h.enter(),r=u(n),h&&(h.exit(),s=!0)),r===e.promise?c($e("Promise-chain cycle")):(i=Je(r))?i.call(r,a,c):a(r)):c(n)}catch(t){h&&!s&&h.exit(),c(t)}};r.length>i;)s(r[i++]);t._c=[],t._n=!1,e&&!t._h&&Ke(t)})}},Ke=function(t){Me.call(S,function(){var e,r,n,o=t._v,i=Ye(t);if(i&&(e=we(function(){We?ze.emit("unhandledRejection",o,t):(r=S.onunhandledrejection)?r({promise:t,reason:o}):(n=S.console)&&n.error&&n.error("Unhandled promise rejection",o)}),t._h=We||Ye(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},Ye=function(t){return 1!==t._h&&0===(t._a||t._c).length},Xe=function(t){Me.call(S,function(){var e;We?ze.emit("rejectionHandled",t):(e=S.onrejectionhandled)&&e({promise:t,reason:t._v})})},Qe=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),Ve(e,!0))},Ze=function(t){var e,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw $e("Promise can't be resolved itself");(e=Je(t))?Ce(function(){var n={_w:r,_d:!1};try{e.call(t,A(Ze,n,1),A(Qe,n,1))}catch(t){Qe.call(n,t)}}):(r._v=t,r._s=1,Ve(r,!1))}catch(t){Qe.call({_w:r,_d:!1},t)}}};Ge||(De=function(t){Kt(this,De,"Promise","_h"),P(t),ke.call(this);try{t(A(Ze,this,1),A(Qe,this,1))}catch(t){Qe.call(this,t)}},(ke=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=Ee(De.prototype,{then:function(t,e){var r=Be(ne(this,De));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=We?ze.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&Ve(this,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),Ie=function(){var t=new ke;this.promise=t,this.resolve=A(Ze,t,1),this.reject=A(Qe,t,1)},be.f=Be=function(t){return t===De||t===Fe?new Ie(t):Ne(t)}),B(B.G+B.W+B.F*!Ge,{Promise:De}),jt(De,"Promise"),Ae("Promise"),Fe=E.Promise,B(B.S+B.F*!Ge,"Promise",{reject:function(t){var e=Be(this);return(0,e.reject)(t),e.promise}}),B(B.S+!0*B.F,"Promise",{resolve:function(t){return Se(this===Fe?De:this,t)}}),B(B.S+B.F*!(Ge&&function(t,e){if(!e&&!Te)return!1;var r=!1;try{var n=[7],o=n[xe]();o.next=function(){return{done:r=!0}},n[xe]=function(){return o},t(n)}catch(t){}return r}(function(t){De.all(t).catch(Ue)})),"Promise",{all:function(t){var e=this,r=Be(e),n=r.resolve,o=r.reject,i=we(function(){var r=[],i=0,s=1;ee(t,!1,function(t){var u=i++,a=!1;r.push(void 0),s++,e.resolve(t).then(function(t){a||(a=!0,r[u]=t,--s||n(r))},o)}),--s||n(r)});return i.e&&o(i.v),r.promise},race:function(t){var e=this,r=Be(e),n=r.reject,o=we(function(){ee(t,!1,function(t){e.resolve(t).then(r.resolve,n)})});return o.e&&n(o.v),r.promise}}),B(B.P+B.R,"Promise",{finally:function(t){var e=ne(this,E.Promise||S.Promise),r="function"==typeof t;return this.then(r?function(r){return Se(e,t()).then(function(){return r})}:t,r?function(r){return Se(e,t()).then(function(){throw r})}:t)}}),B(B.S,"Promise",{try:function(t){var e=be.f(this),r=we(t);return(r.e?e.reject:e.resolve)(r.v),e.promise}}),(Le=m)&&Le.default;var tr,er=E.Promise,rr={f:{}.propertyIsEnumerable},nr=rr.f,or=(tr=!1,function(t){for(var e,r=X(t),n=lt(r),o=n.length,i=0,s=[];o>i;)e=n[i++],k&&!nr.call(r,e)||s.push(tr?[e,r[e]]:r[e]);return s});B(B.S,"Object",{values:function(t){return or(t)}});var ir=E.Object.values,sr=j(function(t){var e=it("meta"),r=$.f,n=0,o=Object.isExtensible||function(){return!0},i=!R(function(){return o(Object.preventExtensions({}))}),s=function(t){r(t,e,{value:{i:"O"+ ++n,w:{}}})},u=t.exports={KEY:e,NEED:!1,fastKey:function(t,r){if(!x(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!D(t,e)){if(!o(t))return"F";if(!r)return"E";s(t)}return t[e].i},getWeak:function(t,r){if(!D(t,e)){if(!o(t))return!0;if(!r)return!1;s(t)}return t[e].w},onFreeze:function(t){return i&&u.NEED&&o(t)&&!D(t,e)&&s(t),t}}}),ur=(sr.KEY,sr.NEED,sr.fastKey,sr.getWeak,sr.onFreeze,function(t,e){if(!x(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}),ar=$.f,cr=sr.fastKey,hr=k?"_s":"size",fr=function(t,e){var r,n=cr(e);if("F"!==n)return t._i[n];for(r=t._f;r;r=r.n)if(r.k==e)return r},lr={getConstructor:function(t,e,r,n){var o=t(function(t,i){Kt(t,o,e,"_i"),t._t=e,t._i=_t(null),t._f=void 0,t._l=void 0,t[hr]=0,null!=i&&ee(i,r,t[n],t)});return Ee(o.prototype,{clear:function(){for(var t=ur(this,e),r=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete r[n.i];t._f=t._l=void 0,t[hr]=0},delete:function(t){var r=ur(this,e),n=fr(r,t);if(n){var o=n.n,i=n.p;delete r._i[n.i],n.r=!0,i&&(i.n=o),o&&(o.p=i),r._f==n&&(r._f=o),r._l==n&&(r._l=i),r[hr]--}return!!n},forEach:function(t){ur(this,e);for(var r,n=A(t,arguments.length>1?arguments[1]:void 0,3);r=r?r.n:this._f;)for(n(r.v,r.k,this);r&&r.r;)r=r.p},has:function(t){return!!fr(ur(this,e),t)}}),k&&ar(o.prototype,"size",{get:function(){return ur(this,e)[hr]}}),o},def:function(t,e,r){var n,o,i=fr(t,e);return i?i.v=r:(t._l=i={i:o=cr(e,!0),k:e,v:r,p:n=t._l,n:void 0,r:!1},t._f||(t._f=i),n&&(n.n=i),t[hr]++,"F"!==o&&(t._i[o]=i)),t},getEntry:fr,setStrong:function(t,e,r){Ft(t,e,function(t,r){this._t=ur(t,e),this._k=r,this._l=void 0},function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?Mt(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,Mt(1))},r?"entries":"values",!r,!0),Ae(e)}},pr=Array.isArray||function(t){return"Array"==K(t)},dr=bt("species"),vr=function(t,e){return new(function(t){var e;return pr(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!pr(e.prototype)||(e=void 0),x(e)&&null===(e=e[dr])&&(e=void 0)),void 0===e?Array:e}(t))(e)},gr=function(t,e){var r=1==t,n=2==t,o=3==t,i=4==t,s=6==t,u=5==t||s,a=e||vr;return function(e,c,h){for(var f,l,p=At(e),d=Y(p),v=A(c,h,3),g=Z(d.length),y=0,m=r?a(e,g):n?a(e,0):void 0;g>y;y++)if((u||y in d)&&(l=v(f=d[y],y,p),t))if(r)m[y]=l;else if(l)switch(t){case 3:return!0;case 5:return f;case 6:return y;case 2:m.push(f)}else if(i)return!1;return s?-1:o||i?i:m}},yr=$.f,mr=gr(0),_r=function(t,e,r,n,o,i){var s=S[t],u=s,a=o?"set":"add",c=u&&u.prototype,h={};return k&&"function"==typeof u&&(i||c.forEach&&!R(function(){(new u).entries().next()}))?(u=e(function(e,r){Kt(e,u,t,"_c"),e._c=new s,null!=r&&ee(r,o,e[a],e)}),mr("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(t){var e="add"==t||"set"==t;t in c&&(!i||"clear"!=t)&&q(u.prototype,t,function(r,n){if(Kt(this,u,t),!e&&i&&!x(r))return"get"==t&&void 0;var o=this._c[t](0===r?0:r,n);return e?this:o})}),i||yr(u.prototype,"size",{get:function(){return this._c.size}})):(u=n.getConstructor(e,t,o,a),Ee(u.prototype,r),sr.NEED=!0),jt(u,t),h[t]=u,B(B.G+B.W+B.F,h),i||n.setStrong(u,t,o),u},br=(_r("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=lr.getEntry(ur(this,"Map"),t);return e&&e.v},set:function(t,e){return lr.def(ur(this,"Map"),0===t?0:t,e)}},lr,!0),function(t){return function(){if(Vt(this)!=t)throw TypeError(t+"#toJSON isn't generic");return function(t,e){var r=[];return ee(t,!1,r.push,r,e),r}(this)}});B(B.P+B.R,"Map",{toJSON:br("Map")});var wr=function(t){B(B.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})};wr("Map");var Or=function(t){B(B.S,t,{from:function(t){var e,r,n,o,i=arguments[1];return P(this),(e=void 0!==i)&&P(i),null==t?new this:(r=[],e?(n=0,o=A(i,arguments[2],2),ee(t,!1,function(t){r.push(o(t,n++))})):ee(t,!1,r.push,r),new this(r))}})};Or("Map");var jr=E.Map,Sr={f:Object.getOwnPropertySymbols},Er=Object.assign,Pr=!Er||R(function(){var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(t){e[t]=t}),7!=Er({},t)[r]||Object.keys(Er({},e)).join("")!=n})?function(t,e){for(var r=At(t),n=arguments.length,o=1,i=Sr.f,s=rr.f;n>o;)for(var u,a=Y(arguments[o++]),c=i?lt(a).concat(i(a)):lt(a),h=c.length,f=0;h>f;)u=c[f++],k&&!s.call(a,u)||(r[u]=a[u]);return r}:Er,Ar=sr.getWeak,xr=gr(5),Tr=gr(6),Rr=0,kr=function(t){return t._l||(t._l=new Nr)},Nr=function(){this.a=[]},Ir=function(t,e){return xr(t.a,function(t){return t[0]===e})};Nr.prototype={get:function(t){var e=Ir(this,t);if(e)return e[1]},has:function(t){return!!Ir(this,t)},set:function(t,e){var r=Ir(this,t);r?r[1]=e:this.a.push([t,e])},delete:function(t){var e=Tr(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}};var Fr={getConstructor:function(t,e,r,n){var o=t(function(t,i){Kt(t,o,e,"_i"),t._t=e,t._i=Rr++,t._l=void 0,null!=i&&ee(i,r,t[n],t)});return Ee(o.prototype,{delete:function(t){if(!x(t))return!1;var r=Ar(t);return!0===r?kr(ur(this,e)).delete(t):r&&D(r,this._i)&&delete r[this._i]},has:function(t){if(!x(t))return!1;var r=Ar(t);return!0===r?kr(ur(this,e)).has(t):r&&D(r,this._i)}}),o},def:function(t,e,r){var n=Ar(T(e),!0);return!0===n?kr(t).set(e,r):n[t._i]=r,t},ufstore:kr};j(function(t){var e,r=gr(0),n=ur,o=!S.ActiveXObject&&"ActiveXObject"in S,i=sr.getWeak,s=Object.isExtensible,u=Fr.ufstore,a=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},c={get:function(t){if(x(t)){var e=i(t);return!0===e?u(ur(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return Fr.def(ur(this,"WeakMap"),t,e)}},h=t.exports=_r("WeakMap",a,c,Fr,!0,!0);n&&o&&(e=Fr.getConstructor(a,"WeakMap"),Pr(e.prototype,c),sr.NEED=!0,r(["delete","has","get","set"],function(t){var r=h.prototype,n=r[t];G(r,t,function(r,o){if(x(r)&&!s(r)){this._f||(this._f=new e);var i=this._f[t](r,o);return"set"==t?this:i}return n.call(this,r,o)})}))});wr("WeakMap"),Or("WeakMap");var Lr=E.WeakMap,Mr={f:bt},Cr=$.f,$r=function(t){var e=E.Symbol||(E.Symbol={});"_"==t.charAt(0)||t in e||Cr(e,t,{value:Mr.f(t)})},zr=ft.concat("length","prototype"),qr={f:Object.getOwnPropertyNames||function(t){return ht(t,zr)}},Hr=qr.f,Dr={}.toString,Wr="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Ur={f:function(t){return Wr&&"[object Window]"==Dr.call(t)?function(t){try{return Hr(t)}catch(t){return Wr.slice()}}(t):Hr(X(t))}},Br=Object.getOwnPropertyDescriptor,Gr={f:k?Br:function(t,e){if(t=X(t),e=M(e,!0),L)try{return Br(t,e)}catch(t){}if(D(t,e))return z(!rr.f.call(t,e),t[e])}},Jr=sr.KEY,Vr=Gr.f,Kr=$.f,Yr=Ur.f,Xr=S.Symbol,Qr=S.JSON,Zr=Qr&&Qr.stringify,tn=bt("_hidden"),en=bt("toPrimitive"),rn={}.propertyIsEnumerable,nn=rt("symbol-registry"),on=rt("symbols"),sn=rt("op-symbols"),un=Object.prototype,an="function"==typeof Xr&&!!Sr.f,cn=S.QObject,hn=!cn||!cn.prototype||!cn.prototype.findChild,fn=k&&R(function(){return 7!=_t(Kr({},"a",{get:function(){return Kr(this,"a",{value:7}).a}})).a})?function(t,e,r){var n=Vr(un,e);n&&delete un[e],Kr(t,e,r),n&&t!==un&&Kr(un,e,n)}:Kr,ln=function(t){var e=on[t]=_t(Xr.prototype);return e._k=t,e},pn=an&&"symbol"==typeof Xr.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof Xr},dn=function(t,e,r){return t===un&&dn(sn,e,r),T(t),e=M(e,!0),T(r),D(on,e)?(r.enumerable?(D(t,tn)&&t[tn][e]&&(t[tn][e]=!1),r=_t(r,{enumerable:z(0,!1)})):(D(t,tn)||Kr(t,tn,z(1,{})),t[tn][e]=!0),fn(t,e,r)):Kr(t,e,r)},vn=function(t,e){T(t);for(var r,n=function(t){var e=lt(t),r=Sr.f;if(r)for(var n,o=r(t),i=rr.f,s=0;o.length>s;)i.call(t,n=o[s++])&&e.push(n);return e}(e=X(e)),o=0,i=n.length;i>o;)dn(t,r=n[o++],e[r]);return t},gn=function(t){var e=rn.call(this,t=M(t,!0));return!(this===un&&D(on,t)&&!D(sn,t))&&(!(e||!D(this,t)||!D(on,t)||D(this,tn)&&this[tn][t])||e)},yn=function(t,e){if(t=X(t),e=M(e,!0),t!==un||!D(on,e)||D(sn,e)){var r=Vr(t,e);return!r||!D(on,e)||D(t,tn)&&t[tn][e]||(r.enumerable=!0),r}},mn=function(t){for(var e,r=Yr(X(t)),n=[],o=0;r.length>o;)D(on,e=r[o++])||e==tn||e==Jr||n.push(e);return n},_n=function(t){for(var e,r=t===un,n=Yr(r?sn:X(t)),o=[],i=0;n.length>i;)!D(on,e=n[i++])||r&&!D(un,e)||o.push(on[e]);return o};an||(G((Xr=function(){if(this instanceof Xr)throw TypeError("Symbol is not a constructor!");var t=it(arguments.length>0?arguments[0]:void 0),e=function(r){this===un&&e.call(sn,r),D(this,tn)&&D(this[tn],t)&&(this[tn][t]=!1),fn(this,t,z(1,r))};return k&&hn&&fn(un,t,{configurable:!0,set:e}),ln(t)}).prototype,"toString",function(){return this._k}),Gr.f=yn,$.f=dn,qr.f=Ur.f=mn,rr.f=gn,Sr.f=_n,Mr.f=function(t){return ln(bt(t))}),B(B.G+B.W+B.F*!an,{Symbol:Xr});for(var bn="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),wn=0;bn.length>wn;)bt(bn[wn++]);for(var On=lt(bt.store),jn=0;On.length>jn;)$r(On[jn++]);B(B.S+B.F*!an,"Symbol",{for:function(t){return D(nn,t+="")?nn[t]:nn[t]=Xr(t)},keyFor:function(t){if(!pn(t))throw TypeError(t+" is not a symbol!");for(var e in nn)if(nn[e]===t)return e},useSetter:function(){hn=!0},useSimple:function(){hn=!1}}),B(B.S+B.F*!an,"Object",{create:function(t,e){return void 0===e?_t(t):vn(_t(t),e)},defineProperty:dn,defineProperties:vn,getOwnPropertyDescriptor:yn,getOwnPropertyNames:mn,getOwnPropertySymbols:_n});var Sn=R(function(){Sr.f(1)});B(B.S+B.F*Sn,"Object",{getOwnPropertySymbols:function(t){return Sr.f(At(t))}}),Qr&&B(B.S+B.F*(!an||R(function(){var t=Xr();return"[null]"!=Zr([t])||"{}"!=Zr({a:t})||"{}"!=Zr(Object(t))})),"JSON",{stringify:function(t){for(var e,r,n=[t],o=1;arguments.length>o;)n.push(arguments[o++]);if(r=e=n[1],(x(e)||void 0!==t)&&!pn(t))return pr(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!pn(e))return e}),n[1]=e,Zr.apply(Qr,n)}}),Xr.prototype[en]||q(Xr.prototype,en,Xr.prototype.valueOf),jt(Xr,"Symbol"),jt(Math,"Math",!0),jt(S.JSON,"JSON",!0),$r("asyncIterator"),$r("observable");var En=E.Symbol,Pn="4.3.0";const An={[t.RECORD]:"Recorded",[t.REPLAY]:"Replayed",[t.INTERCEPT]:"Intercepted",[t.PASSTHROUGH]:"Passthrough"};class xn{constructor(t){this.polly=t,this.groupName=null}connect(){this._middleware=this.polly.server.any().on("error",(...t)=>this.logError(...t)).on("response",(...t)=>this.logRequest(...t))}disconnect(){this.groupEnd(),this._middleware.off("error"),this._middleware.off("response")}groupStart(t){this.groupName&&this.groupName!==t&&(this.groupEnd(),this.groupName=null),this.groupName||(this.groupName=t,console.group(this.groupName))}groupEnd(){this.groupName&&console.groupEnd()}logRequest(t){t.config.logging&&(this.groupStart(t.recordingName),console.groupCollapsed(`${An[t.action]} ➞ ${t.method} ${t.url} ${t.response.statusCode} • ${t.responseTime}ms`),console.log("Request:",t),console.log("Response:",t.response),console.log("Identifiers:",t.identifiers),console.groupEnd())}logError(t,e){this.groupStart(t.recordingName),console.group(`Errored ➞ ${t.method} ${t.url}`),console.error(e),console.log("Request:",t),t.didRespond&&console.log("Response:",t.response),console.log("Identifiers:",t.identifiers),console.groupEnd()}}function Tn(t){return`${t.type}:${r(t)}`}class Rn{constructor(){this._registry=new jr}register(t){e(`Attempted to register ${t} but invalid factory provided. Expected function, received: "${typeof t}"`,"function"==typeof t);const{type:n}=t,o=r(t);e(`Invalid registration id provided. Expected string, received: "${typeof o}"`,"string"==typeof o),e(`Invalid registration type provided. Expected string, received: "${typeof n}"`,"string"==typeof n),this._registry.set(Tn(t),t)}unregister(t){const{_registry:e}=this,r="function"==typeof t?Tn(t):t;e.delete(r)}lookup(t){return this._registry.get(t)||null}has(t){const{_registry:e}=this,r="function"==typeof t?Tn(t):t;return e.has(r)}}var kn={fixed:t=>()=>n(t),relative:t=>e=>n(t*e)},Nn={mode:o.REPLAY,adapters:[],adapterOptions:{},persister:null,persisterOptions:{keepUnusedRequests:!1,disableSortingHarEntries:!1},logging:!1,flushRequestsOnStop:!1,recordIfMissing:!0,recordFailedRequests:!1,expiresIn:null,expiryStrategy:i.WARN,timing:kn.fixed(0),matchRequestsBy:{method:!0,headers:!0,body:!0,order:!0,url:{protocol:!0,username:!0,password:!0,hostname:!0,port:!0,pathname:!0,query:!0,hash:!1}}};function In(t){return null!=t&&"object"==typeof t}function Fn(t,...e){const r=new s(t,...e);return d(t)||(t.startsWith("//")?r.set("protocol",""):function(t){t.set("protocol",""),t.set("host",""),t.set("slashes",!1)}(r)),r}const{keys:Ln}=Object,Mn={get:(t,e)=>t["string"==typeof e?e.toLowerCase():e],set:(t,e,r)=>"string"==typeof e&&(null==r?delete t[e.toLowerCase()]:t[e.toLowerCase()]=r,!0),deleteProperty:(t,e)=>"string"==typeof e&&(delete t[e.toLowerCase()],!0)};function Cn(t){const e=new Proxy({},Mn);return In(t)&&Ln(t).forEach(r=>e[r]=t[r]),e}const{keys:$n}=Object,{isArray:zn}=Array,{parse:qn}=JSON;function Hn(t){return"function"==typeof t}var Dn={headers:function(t,e,r){const n=new Cn(t);return Hn(e)?e(n,r):(In(e)&&zn(e.exclude)&&e.exclude.forEach(t=>delete n[t]),n)},method:function(t,e,r){return Hn(e)?e(t,r):t.toUpperCase()},body:function(t,e,r){return Hn(e)?e(t,r):t},url:function(t,e,r){let n=Fn(t,!0);return Hn(e)?n=Fn(e(t,r),!0):$n(e||{}).forEach(t=>{Hn(e[t])?n.set(t,e[t](n[t],r)):e[t]||n.set(t,"")}),In(n.query)&&n.set("query",qn(p(n.query))),n.href}};function Wn(t){const e=v(t).toString();let r=g(function(t){return t.replace(/\W/g,"-")}(t));return`${r=r.substring(0,100-e.length-1)}_${e}`}function Un(t){return(t||"").split("/").map(Wn).join("/")}B(B.S,"Array",{isArray:pr});var Bn=E.Array.isArray;function Gn(t,e){return t===e||t!=t&&e!=e}function Jn(t,e){for(var r=t.length;r--;)if(Gn(t[r][0],e))return r;return-1}var Vn=Array.prototype.splice;function Kn(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Kn.prototype.clear=function(){this.__data__=[],this.size=0},Kn.prototype.delete=function(t){var e=this.__data__,r=Jn(e,t);return!(r<0||(r==e.length-1?e.pop():Vn.call(e,r,1),--this.size,0))},Kn.prototype.get=function(t){var e=this.__data__,r=Jn(e,t);return r<0?void 0:e[r][1]},Kn.prototype.has=function(t){return Jn(this.__data__,t)>-1},Kn.prototype.set=function(t,e){var r=this.__data__,n=Jn(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};var Yn="object"==typeof global&&global&&global.Object===Object&&global,Xn="object"==typeof self&&self&&self.Object===Object&&self,Qn=Yn||Xn||Function("return this")(),Zn=Qn.Symbol,to=Object.prototype,eo=to.hasOwnProperty,ro=to.toString,no=Zn?Zn.toStringTag:void 0;var oo=Object.prototype.toString;var io="[object Null]",so="[object Undefined]",uo=Zn?Zn.toStringTag:void 0;function ao(t){return null==t?void 0===t?so:io:uo&&uo in Object(t)?function(t){var e=eo.call(t,no),r=t[no];try{t[no]=void 0;var n=!0}catch(t){}var o=ro.call(t);return n&&(e?t[no]=r:delete t[no]),o}(t):function(t){return oo.call(t)}(t)}function co(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var ho="[object AsyncFunction]",fo="[object Function]",lo="[object GeneratorFunction]",po="[object Proxy]";function vo(t){if(!co(t))return!1;var e=ao(t);return e==fo||e==lo||e==ho||e==po}var go,yo=Qn["__core-js_shared__"],mo=(go=/[^.]+$/.exec(yo&&yo.keys&&yo.keys.IE_PROTO||""))?"Symbol(src)_1."+go:"";var _o=Function.prototype.toString;var bo=/^\[object .+?Constructor\]$/,wo=Function.prototype,Oo=Object.prototype,jo=wo.toString,So=Oo.hasOwnProperty,Eo=RegExp("^"+jo.call(So).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Po(t){return!(!co(t)||(e=t,mo&&mo in e))&&(vo(t)?Eo:bo).test(function(t){if(null!=t){try{return _o.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function Ao(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return Po(r)?r:void 0}var xo=Ao(Qn,"Map"),To=Ao(Object,"create");var Ro="__lodash_hash_undefined__",ko=Object.prototype.hasOwnProperty;var No=Object.prototype.hasOwnProperty;var Io="__lodash_hash_undefined__";function Fo(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Lo(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function Mo(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Fo.prototype.clear=function(){this.__data__=To?To(null):{},this.size=0},Fo.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Fo.prototype.get=function(t){var e=this.__data__;if(To){var r=e[t];return r===Ro?void 0:r}return ko.call(e,t)?e[t]:void 0},Fo.prototype.has=function(t){var e=this.__data__;return To?void 0!==e[t]:No.call(e,t)},Fo.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=To&&void 0===e?Io:e,this},Mo.prototype.clear=function(){this.size=0,this.__data__={hash:new Fo,map:new(xo||Kn),string:new Fo}},Mo.prototype.delete=function(t){var e=Lo(this,t).delete(t);return this.size-=e?1:0,e},Mo.prototype.get=function(t){return Lo(this,t).get(t)},Mo.prototype.has=function(t){return Lo(this,t).has(t)},Mo.prototype.set=function(t,e){var r=Lo(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};var Co=200;function $o(t){var e=this.__data__=new Kn(t);this.size=e.size}$o.prototype.clear=function(){this.__data__=new Kn,this.size=0},$o.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},$o.prototype.get=function(t){return this.__data__.get(t)},$o.prototype.has=function(t){return this.__data__.has(t)},$o.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Kn){var n=r.__data__;if(!xo||n.length<Co-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Mo(n)}return r.set(t,e),this.size=r.size,this};var zo=function(){try{var t=Ao(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();function qo(t,e,r){"__proto__"==e&&zo?zo(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Ho(t,e,r){(void 0===r||Gn(t[e],r))&&(void 0!==r||e in t)||qo(t,e,r)}var Do,Wo=function(t,e,r){for(var n=-1,o=Object(t),i=r(t),s=i.length;s--;){var u=i[Do?s:++n];if(!1===e(o[u],u,o))break}return t},Uo="object"==typeof exports&&exports&&!exports.nodeType&&exports,Bo=Uo&&"object"==typeof module&&module&&!module.nodeType&&module,Go=Bo&&Bo.exports===Uo?Qn.Buffer:void 0,Jo=Go?Go.allocUnsafe:void 0;var Vo=Qn.Uint8Array;function Ko(t,e){var r,n,o=e?(r=t.buffer,n=new r.constructor(r.byteLength),new Vo(n).set(new Vo(r)),n):t.buffer;return new t.constructor(o,t.byteOffset,t.length)}var Yo=Object.create,Xo=function(){function t(){}return function(e){if(!co(e))return{};if(Yo)return Yo(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var Qo,Zo,ti=(Qo=Object.getPrototypeOf,Zo=Object,function(t){return Qo(Zo(t))}),ei=Object.prototype;function ri(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||ei)}var ni="[object Arguments]";function oi(t){return In(t)&&ao(t)==ni}var ii=Object.prototype,si=ii.hasOwnProperty,ui=ii.propertyIsEnumerable,ai=oi(function(){return arguments}())?oi:function(t){return In(t)&&si.call(t,"callee")&&!ui.call(t,"callee")},ci=Array.isArray,hi=9007199254740991;function fi(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=hi}function li(t){return null!=t&&fi(t.length)&&!vo(t)}var pi="object"==typeof exports&&exports&&!exports.nodeType&&exports,di=pi&&"object"==typeof module&&module&&!module.nodeType&&module,vi=di&&di.exports===pi?Qn.Buffer:void 0,gi=(vi?vi.isBuffer:void 0)||function(){return!1},yi="[object Object]",mi=Function.prototype,_i=Object.prototype,bi=mi.toString,wi=_i.hasOwnProperty,Oi=bi.call(Object);var ji={};ji["[object Float32Array]"]=ji["[object Float64Array]"]=ji["[object Int8Array]"]=ji["[object Int16Array]"]=ji["[object Int32Array]"]=ji["[object Uint8Array]"]=ji["[object Uint8ClampedArray]"]=ji["[object Uint16Array]"]=ji["[object Uint32Array]"]=!0,ji["[object Arguments]"]=ji["[object Array]"]=ji["[object ArrayBuffer]"]=ji["[object Boolean]"]=ji["[object DataView]"]=ji["[object Date]"]=ji["[object Error]"]=ji["[object Function]"]=ji["[object Map]"]=ji["[object Number]"]=ji["[object Object]"]=ji["[object RegExp]"]=ji["[object Set]"]=ji["[object String]"]=ji["[object WeakMap]"]=!1;var Si="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ei=Si&&"object"==typeof module&&module&&!module.nodeType&&module,Pi=Ei&&Ei.exports===Si&&Yn.process,Ai=function(){try{var t=Ei&&Ei.require&&Ei.require("util").types;return t||Pi&&Pi.binding&&Pi.binding("util")}catch(t){}}(),xi=Ai&&Ai.isTypedArray,Ti=xi?function(t){return function(e){return t(e)}}(xi):function(t){return In(t)&&fi(t.length)&&!!ji[ao(t)]};function Ri(t,e){if("__proto__"!=e)return t[e]}var ki=Object.prototype.hasOwnProperty;function Ni(t,e,r){var n=t[e];ki.call(t,e)&&Gn(n,r)&&(void 0!==r||e in t)||qo(t,e,r)}var Ii=9007199254740991,Fi=/^(?:0|[1-9]\d*)$/;function Li(t,e){var r=typeof t;return!!(e=null==e?Ii:e)&&("number"==r||"symbol"!=r&&Fi.test(t))&&t>-1&&t%1==0&&t<e}var Mi=Object.prototype.hasOwnProperty;function Ci(t,e){var r=ci(t),n=!r&&ai(t),o=!r&&!n&&gi(t),i=!r&&!n&&!o&&Ti(t),s=r||n||o||i,u=s?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],a=u.length;for(var c in t)!e&&!Mi.call(t,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Li(c,a))||u.push(c);return u}var $i=Object.prototype.hasOwnProperty;function zi(t){if(!co(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=ri(t),r=[];for(var n in t)("constructor"!=n||!e&&$i.call(t,n))&&r.push(n);return r}function qi(t){return li(t)?Ci(t,!0):zi(t)}function Hi(t){return function(t,e,r,n){var o=!r;r||(r={});for(var i=-1,s=e.length;++i<s;){var u=e[i],a=n?n(r[u],t[u],u,r,t):void 0;void 0===a&&(a=t[u]),o?qo(r,u,a):Ni(r,u,a)}return r}(t,qi(t))}function Di(t,e,r,n,o,i,s){var u=Ri(t,r),a=Ri(e,r),c=s.get(a);if(c)Ho(t,r,c);else{var h,f=i?i(u,a,r+"",t,e,s):void 0,l=void 0===f;if(l){var p=ci(a),d=!p&&gi(a),v=!p&&!d&&Ti(a);f=a,p||d||v?ci(u)?f=u:In(h=u)&&li(h)?f=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}(u):d?(l=!1,f=function(t,e){if(e)return t.slice();var r=t.length,n=Jo?Jo(r):new t.constructor(r);return t.copy(n),n}(a,!0)):v?(l=!1,f=Ko(a,!0)):f=[]:function(t){if(!In(t)||ao(t)!=yi)return!1;var e=ti(t);if(null===e)return!0;var r=wi.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&bi.call(r)==Oi}(a)||ai(a)?(f=u,ai(u)?f=Hi(u):co(u)&&!vo(u)||(f=function(t){return"function"!=typeof t.constructor||ri(t)?{}:Xo(ti(t))}(a))):l=!1}l&&(s.set(a,f),o(f,a,n,i,s),s.delete(a)),Ho(t,r,f)}}function Wi(t,e,r,n,o){t!==e&&Wo(e,function(i,s){if(co(i))o||(o=new $o),Di(t,e,s,r,Wi,n,o);else{var u=n?n(Ri(t,s),i,s+"",t,e,o):void 0;void 0===u&&(u=i),Ho(t,s,u)}},qi)}function Ui(t){return t}var Bi=Math.max;var Gi=zo?function(t,e){return zo(t,"toString",{configurable:!0,enumerable:!1,value:(r=e,function(){return r}),writable:!0});var r}:Ui,Ji=800,Vi=16,Ki=Date.now;var Yi=function(t){var e=0,r=0;return function(){var n=Ki(),o=Vi-(n-r);if(r=n,o>0){if(++e>=Ji)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Gi);function Xi(t,e){return Yi(function(t,e,r){return e=Bi(void 0===e?t.length-1:e,0),function(){for(var n=arguments,o=-1,i=Bi(n.length-e,0),s=Array(i);++o<i;)s[o]=n[e+o];o=-1;for(var u=Array(e+1);++o<e;)u[o]=n[o];return u[e]=r(s),function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}(t,this,u)}}(t,e,Ui),t+"")}var Qi,Zi=(Qi=function(t,e,r,n){Wi(t,e,r,n)},Xi(function(t,e){var r=-1,n=e.length,o=n>1?e[n-1]:void 0,i=n>2?e[2]:void 0;for(o=Qi.length>3&&"function"==typeof o?(n--,o):void 0,i&&function(t,e,r){if(!co(r))return!1;var n=typeof e;return!!("number"==n?li(r)&&Li(e,r.length):"string"==n&&e in r)&&Gn(r[e],t)}(e[0],e[1],i)&&(o=n<3?void 0:o,n=1),t=Object(t);++r<n;){var s=e[r];s&&Qi(t,s,r,o)}return t}));function ts(t,e,r){if(Bn(t)||["context"].includes(r))return e}function es(...t){return Zi({},...t,ts)}function rs(t){e(`Invalid recording name provided. Expected string, received: "${typeof t}".`,"string"==typeof t),e("Invalid recording name provided. Received An empty or blank string.",t.trim().length>0)}function ns(t){e(`Invalid config provided. Expected object, received: "${typeof t}".`,In(t)&&!Bn(t)),["mode","adapters","adapterOptions","persister","persisterOptions"].forEach(r=>e(`Invalid configuration option provided. The "${r}" option cannot be overridden using the server configuration API.`,!(r in t)))}function os(t){e(`Invalid number provided. Expected number, received: "${typeof t}".`,"number"==typeof t),e(`Invalid number provided. The number must be greater than 0, received "${typeof t}".`,t>0)}const{freeze:is}=Object,{parse:ss}=JSON;class us{constructor(){this.headers=new Cn}getHeader(t){return this.headers[t]}setHeader(t,e){return this.headers[t]=e,this}setHeaders(t={}){for(const e in t)this.setHeader(e,t[e]);return this}removeHeader(t){return this.setHeader(t,null),this}removeHeaders(t=[]){for(const e of t)this.removeHeader(e);return this}hasHeader(t){return!!this.getHeader(t)}type(t){return this.setHeader("Content-Type",t)}send(t){let e=t;switch(typeof e){case"string":this.hasHeader("Content-Type")||this.type("text/html");break;case"boolean":case"number":case"object":if(null!==e)return this.json(e);e=""}if("string"==typeof e){const t=this.getHeader("Content-Type");t&&!t.includes("charset")&&this.type(`${t}; charset=utf-8`)}return this.body=e,this}json(t){return this.hasHeader("Content-Type")||this.type("application/json"),this.send(p(t))}jsonBody(){return ss(this.body)}end(){return is(this),is(this.headers),this}}var as="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff",cs="["+as+"]",hs=RegExp("^"+cs+cs+"*"),fs=RegExp(cs+cs+"*$"),ls=function(t,e,r){var n={},o=R(function(){return!!as[t]()||"​…"!="​…"[t]()}),i=n[t]=o?e(ps):as[t];r&&(n[r]=i),B(B.P+B.F*o,"String",n)},ps=ls.trim=function(t,e){return t=String(O(t)),1&e&&(t=t.replace(hs,"")),2&e&&(t=t.replace(fs,"")),t},ds=ls,vs=S.parseInt,gs=ds.trim,ys=/^[-+]?0[xX]/,ms=8!==vs(as+"08")||22!==vs(as+"0x16")?function(t,e){var r=gs(String(t),3);return vs(r,e>>>0||(ys.test(r)?16:10))}:vs;B(B.G+B.F*(parseInt!=ms),{parseInt:ms});var _s=E.parseInt;const bs=200;class ws extends us{constructor(t,e,r,n=!1){super(),this.status(t||bs),this.setHeaders(e),this.body=r,this.isBinary=n}get ok(){return this.statusCode&&this.statusCode>=200&&this.statusCode<300}get statusText(){return u[this.statusCode]||u[bs]}status(t){const r=_s(t,10);return e(`[Response] Invalid status code: ${r}`,r>=100&&r<600),this.statusCode=r,this}sendStatus(t){return this.status(t),this.type("text/plain"),this.send(this.statusText)}}var Os=function(t,e){var r=(E.Object||{})[t]||Object[t],n={};n[t]=e(r),B(B.S+B.F*R(function(){r(1)}),"Object",n)},js=Gr.f;Os("getOwnPropertyDescriptor",function(){return function(t,e){return js(X(t),e)}});var Ss=E.Object,Es=function(t,e){return Ss.getOwnPropertyDescriptor(t,e)},Ps=E.Object.getOwnPropertySymbols;Os("keys",function(){return function(t){return lt(At(t))}});var As=E.Object.keys;B(B.S+B.F*!k,"Object",{defineProperty:$.f});var xs=E.Object,Ts=function(t,e,r){return xs.defineProperty(t,e,r)};var Rs=function(t,e,r){return e in t?Ts(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t};var ks=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=As(r);"function"==typeof Ps&&(n=n.concat(Ps(r).filter(function(t){return Es(r,t).enumerable}))),n.forEach(function(e){Rs(t,e,r[e])})}return t};_r("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return lr.def(ur(this,"Set"),t=0===t?0:t,t)}},lr);B(B.P+B.R,"Set",{toJSON:br("Set")}),wr("Set"),Or("Set");var Ns=E.Set;function Is(t,e,r){let n=0;return function(...o){return++n>=e&&r(),t(...o)}}B(B.S+B.F,"Object",{assign:Pr});var Fs=E.Object.assign;const Ls=En();class Ms{constructor(t,r){e(`Invalid type provided. Expected a non-empty string, received: "${typeof t}".`,t&&"string"==typeof t),Ts(this,"type",{value:t}),Fs(this,r||{}),this[Ls]=!1}stopPropagation(){this[Ls]=!0}get shouldStopPropagating(){return this[Ls]}}const Cs=En(),$s=En();function zs(t,r){e(`Invalid event name provided. Expected string, received: "${typeof t}".`,"string"==typeof t),e(`Invalid event name provided: "${t}". Possible events: ${[...r].join(", ")}.`,r.has(t))}class qs{constructor(t={}){const{eventNames:r}=t;e("An array of supported events must be provided via the `eventNames` option.",Bn(r)&&r.length>0),this[Cs]=new jr,this[$s]=new Ns(r)}eventNames(){const t=[];return this[Cs].forEach((e,r)=>this.hasListeners(r)&&t.push(r)),t}on(t,r,n={}){zs(t,this[$s]),function(t){e(`Invalid listener provided. Expected function, received: "${typeof t}".`,"function"==typeof t)}(r);const o=this[Cs],{times:i}=n;if(o.has(t)||o.set(t,new Ns),i){os(i);const e=Is(r,i,()=>this.off(t,e));this.off(t,r),e.listener=r,r=e}return o.get(t).add(r),this}once(t,e,r={}){return this.on(t,e,ks({},r,{times:1})),this}off(t,e){zs(t,this[$s]);const r=this[Cs];return this.hasListeners(t)&&("function"==typeof e?(r.get(t).delete(e),this.listeners(t).forEach(n=>{n.listener===e&&r.get(t).delete(n)})):r.get(t).clear(t)),this}listeners(t){return zs(t,this[$s]),this.hasListeners(t)?[...this[Cs].get(t)]:[]}hasListeners(t){zs(t,this[$s]);const e=this[Cs];return e.has(t)&&e.get(t).size>0}async emit(t,...e){zs(t,this[$s]);const r=new Ms(t);for(const n of this.listeners(t))if(await n(...e,r),r.shouldStopPropagating)return!1;return!0}async emitParallel(t,...e){zs(t,this[$s]);const r=new Ms(t);return await er.all(this.listeners(t).map(t=>t(...e,r))),!r.shouldStopPropagating}emitSync(t,...r){zs(t,this[$s]);const n=new Ms(t);for(const o of this.listeners(t)){const i=o(...r,n);if(e(`Attempted to emit a synchronous event "${t}" but an asynchronous listener was called.`,!(In(i)&&"function"==typeof i.then)),n.shouldStopPropagating)return!1}return!0}}const Hs=En(),Ds=En();function Ws(t){t[Hs]=!1,t[Ds]=!1}class Us extends Ms{constructor(){super("intercept"),Ws(this)}abort(){Ws(this),this[Hs]=!0}passthrough(){Ws(this),this[Ds]=!0}get shouldAbort(){return this[Hs]}get shouldPassthrough(){return this[Ds]}get shouldIntercept(){return!this.shouldAbort&&!this.shouldPassthrough}}const{keys:Bs,freeze:Gs}=Object,Js=En(),Vs=En(),Ks=En(),Ys=En(),Xs=["identify"];class Qs extends us{constructor(t,r){super(),e("Url is required.",r.url),e("Method is required.",r.method&&"string"==typeof r.method),this.didRespond=!1,this.aborted=!1,this.url=r.url,this.method=r.method.toUpperCase(),this.body=r.body,this.setHeaders(r.headers),this.recordingName=t.recordingName,this.recordingId=t.recordingId,this.requestArguments=Gs(r.requestArguments),this.promise=function(){let t,e;const r=new er((r,n)=>{t=r,e=n});return r.catch(()=>{}),r.resolve=t,r.reject=e,r}(),this[Vs]=t,this[Ys]=new qs({eventNames:Xs}),this.action=null,this._interceptor=new Us,this[Js]=t.server.lookup(this.method,this.url),this[Js].applyFiltersWithArgs(this),this._configure(this[Js].config());const n=this[Js].recordingName();n&&this._overrideRecordingName(n)}get url(){return this[Ks].toString()}set url(t){this[Ks]=Fn(`${t}`,!0)}get absoluteUrl(){const{url:t}=this;return d(t)?t:new s(t).href}get protocol(){return this[Ks].protocol}get hostname(){return this[Ks].hostname}get port(){return this[Ks].port}get origin(){return this[Ks].origin}get pathname(){return this[Ks].pathname}get query(){return this[Ks].query}set query(t){return this[Ks].set("query",t)}get hash(){return this[Ks].hash}set hash(t){return this[Ks].set("hash",t)}get shouldPassthrough(){return this[Js].shouldPassthrough()}get shouldIntercept(){return this[Js].shouldIntercept()}on(t,e){return this[Ys].on(t,e),this}once(t,e){return this[Ys].once(t,e),this}off(t,e){return this[Ys].off(t,e),this}async init(){await this._emit("request"),this.response=new ws,this.didRespond=!1,await this._identify(),this.timestamp=a()}async respond(t){const{statusCode:r,headers:n,body:o,isBinary:i=!1}=t||{};e("Cannot respond to a request that already has a response.",!this.didRespond),this.aborted||(this.response.timestamp=a(),this.response.status(r),this.response.setHeaders(n),this.response.body=o,this.response.isBinary=i,await this._emit("beforeResponse",this.response),this.response.end(),this.responseTime=new Date(this.response.timestamp).getTime()-new Date(this.timestamp).getTime(),this.didRespond=!0,this.end(),await this._emit("response",this.response))}abort(){this.aborted=!0}_overrideRecordingName(t){rs(t),this.recordingName=t,this.recordingId=Un(t)}_configure(t){ns(t),this.config=es(this[Vs].config,this.config||{},t)}_intercept(){return this[Js].intercept(this,this.response,...arguments)}_emit(t,...e){return this[Js].emit(t,this,...e)}async _identify(){const t=this[Vs],{_requests:e}=t,{matchRequestsBy:r}=this.config;this.identifiers={},Bs(Dn).forEach(t=>{this[t]&&r[t]&&(this.identifiers[t]=Dn[t](this[t],r[t],this))}),await this[Ys].emit("identify",this),Gs(this.identifiers),this.id=l(p(this.identifiers)),this.order=!r.order||this.shouldPassthrough||this.shouldIntercept?0:e.slice(0,e.indexOf(this)).filter(t=>t.id===this.id).length}}function Zs(){if(!arguments.length)return[];var t=arguments[0];return ci(t)?t:[t]}B(B.S,"Reflect",{get:function t(e,r){var n,o,i=arguments.length<3?e:arguments[2];return T(e)===i?e[r]:(n=Gr.f(e,r))?D(n,"value")?n.value:void 0!==n.get?n.get.call(i):void 0:x(o=Rt(e))?t(o,r,i):void 0}});var tu=E.Reflect.get;const eu=En();function ru(t,{params:e}){return new Proxy(t,{set:(t,e,r)=>(t[e]=r,!0),get:(t,r)=>"params"===r?ks({},e):tu(t,r)})}class nu{constructor(t,e){const r=t&&t[0];this.params={},this.queryParams={},this.handlers=[],this.middleware=e||[],r&&(this.handlers=r.handler,this.params=ks({},r.params),this.queryParams=t.queryParams),this[eu]=this._orderedHandlers()}shouldPassthrough(){return Boolean(this._valueFor("passthrough"))}shouldIntercept(){return Boolean(this._valueFor("intercept"))}recordingName(){return this._valueFor("recordingName")||null}config(){return es(...this[eu].map(({handler:t})=>t.get("config")))}applyFiltersWithArgs(t,...e){this[eu]=this[eu].filter(({route:r,handler:n})=>[...n.get("filters")].every(n=>n(ru(t,r),...e)))}async intercept(t,e,r){for(const n of this[eu]){const{route:o,handler:i}=n;if(!r.shouldIntercept||r.shouldStopPropagating)return;i.has("intercept")&&await i.get("intercept")(ru(t,o),e,r)}}async emit(t,e,...r){for(const n of this[eu]){const{route:o,handler:i}=n;if(!await i._eventEmitter.emit(t,ru(e,o),...r))return}}_orderedHandlers(){return[...this.middleware,this].reduce((t,e)=>(t.push(...e.handlers.map(t=>({route:e,handler:t}))),t),[])}_valueFor(t){let e;for(const r of this[eu]){const{handler:n}=r;n.has(t)&&(e=n.get(t))}return e}}class ou extends jr{constructor(){super(),this.set("config",{}),this.set("defaultOptions",{}),this.set("filters",new Ns),this._eventEmitter=new qs({eventNames:["error","abort","request","beforeReplay","beforePersist","beforeResponse","response"]})}on(t,e,r={}){return this._eventEmitter.on(t,e,ks({},this.get("defaultOptions"),r)),this}once(t,e){return this._eventEmitter.once(t,e),this}off(t,e){return this._eventEmitter.off(t,e),this}passthrough(t=!0){return this.set("passthrough",Boolean(t)),this.get("passthrough")&&this.delete("intercept"),this}intercept(t,r={}){return e(`Invalid intercept handler provided. Expected function, received: "${typeof t}".`,"function"==typeof t),"times"in(r=ks({},this.get("defaultOptions"),r))&&(os(r.times),t=Is(t,r.times,()=>this.delete("intercept"))),this.set("intercept",t),this.passthrough(!1),this}recordingName(t){return t&&rs(t),this.set("recordingName",t),this}configure(t){return ns(t),this.set("config",t),this}filter(t){return e(`Invalid filter callback provided. Expected function, received: "${typeof t}".`,"function"==typeof t),this.get("filters").add(t),this}times(t){return t||"number"==typeof t?(os(t),this.get("defaultOptions").times=t):delete this.get("defaultOptions").times,this}}const iu="__GLOBAL__";class su{constructor({host:t,paths:e,global:r,handler:n}){this.global=Boolean(r),this.handler=n,this.host=t,this.paths=this.global?[iu]:e,this._routeRecognizer=new y,this.paths.forEach(t=>this._routeRecognizer.add([{path:t,handler:[n]}]))}match(t,e){if(this.global)return new nu(this._routeRecognizer.recognize(iu));if(this.host===t){const t=this._routeRecognizer.recognize(e);return t&&new nu(t)}}}const uu=En(),au=En(),cu=En(),hu=En(),fu=En(),lu={SLASH:"/",STAR:"*",COLON:":"},{keys:pu}=Object;function du(t){const e=new s(t);return{host:e.host?e.origin:lu.SLASH,path:e.pathname||lu.SLASH}}class vu{constructor(){this[uu]="",this[cu]={},this[au]=[],this[hu]=[]}host(t,r){const n=this[uu];e("[Server] A host cannot be specified within another host.",!n),this[uu]=t,r(this),this[uu]=n}namespace(t,e){const r=this[au];this[au]=[...r,t],e(this),this[au]=r}timeout(){return n(...arguments)}get(){return this._register("GET",...arguments)}put(){return this._register("PUT",...arguments)}post(){return this._register("POST",...arguments)}delete(){return this._register("DELETE",...arguments)}patch(){return this._register("PATCH",...arguments)}merge(){return this._register("MERGE",...arguments)}head(){return this._register("HEAD",...arguments)}options(){return this._register("OPTIONS",...arguments)}any(){return this._registerMiddleware(...arguments)}lookup(t,e){return new nu(this._recognize(t,e),this._lookupMiddleware(e))}_lookupMiddleware(t){const{host:e,path:r}=du(t);return this[hu].map(t=>t.match(e,r)).filter(Boolean)}_register(t,e){const r=new ou;return Zs(e).forEach(e=>{const{host:n,path:o}=du(this._buildUrl(e)),i=this._registryForHost(n),s=this._nameForPath(o),u=i[t.toUpperCase()];u[fu].has(s)?u[fu].get(s).push(r):(u[fu].set(s,[r]),u.add([{path:o,handler:u[fu].get(s)}]))}),r}_registerMiddleware(t){const e=new ou,r={};return Zs(t).forEach(t=>{if(t&&t!==lu.STAR||this[uu]||0!==this[au].length){const{host:e,path:n}=du(this._buildUrl(t));r[e]=r[e]||[],r[e].push(n)}else this[hu].push(new su({global:!0,handler:e}))}),pu(r).forEach(t=>{this[hu].push(new su({host:t,paths:r[t],handler:e}))}),e}_recognize(t,e){const{host:r,path:n}=du(e);return this._registryForHost(r)[t.toUpperCase()].recognize(n)}_buildUrl(t){return c(this[uu],...this[au],t)}_nameForPath(t=""){return t.split(lu.SLASH).map(t=>{switch(t.charAt(0)){case lu.COLON:return lu.COLON;case lu.STAR:return lu.STAR;default:return t}}).join(lu.SLASH).replace(/\/$/,"")||lu.SLASH}_registryForHost(t){return this[cu][t]||(this[cu][t]=h.reduce((t,e)=>(t[e]=new y,t[e][fu]=new jr,t),{})),this[cu][t]}}const gu=En(),yu=En(),mu=En(),_u=new Lr,bu=new qs({eventNames:["register","create","stop"]});class wu{constructor(t,e){this.recordingName=t,this.logger=new xn(this),this.server=new vu,this.config={},this.container=new Rn,bu.emitSync("register",this.container),this.adapters=new jr,this.persister=null,this._requests=[],this.logger.connect(),bu.emitSync("create",this),this.configure(e)}static get VERSION(){return Pn}get recordingName(){return this[gu]}set recordingName(t){rs(t),this[gu]=t,this[yu]=Un(t)}get recordingId(){return this[yu]}get mode(){return this.config.mode}set mode(t){const r=ir(o);e(`Invalid mode provided: "${t}". Possible modes: ${r.join(", ")}.`,r.includes(t)),this.config.mode=t}static on(t,e){return bu.on(t,e),this}static once(t,e){return bu.once(t,e),this}static off(t,e){return bu.off(t,e),this}static register(t){return _u.has(t)||_u.set(t,e=>e.register(t)),this.on("register",_u.get(t)),this}static unregister(t){return _u.has(t)&&this.off("register",_u.get(t)),this}configure(t={}){const{container:n}=this;e("Cannot call `configure` once requests have been handled.",0===this._requests.length),e("Cannot call `configure` on an instance of Polly that is not running.",this.mode!==o.STOPPED),this.disconnect(),this.config=es(Nn,this.config,t),this.config.adapters.forEach(t=>this.connectTo(t));let{persister:i}=this.config;i&&("function"==typeof i&&(n.register(i),i=r(i)),e(`Persister matching the name \`${i}\` was not registered.`,n.has(`persister:${i}`)),this.persister=new(n.lookup(`persister:${i}`))(this))}record(){this.mode=o.RECORD}replay(){this.mode=o.REPLAY}passthrough(){this.mode=o.PASSTHROUGH}pause(){this[mu]=[...this.adapters.keys()],this.disconnect()}play(){this[mu]&&(this[mu].forEach(t=>this.connectTo(t)),delete this[mu])}async stop(){this.mode!==o.STOPPED&&(this.config.flushRequestsOnStop&&await this.flush(),this.disconnect(),this.logger.disconnect(),await(this.persister&&this.persister.persist()),this.mode=o.STOPPED,await bu.emit("stop",this))}async flush(){const t=()=>{};await er.all(this._requests.map(e=>er.resolve(e.promise).then(t,t)))}connectTo(t){const{container:n,adapters:o}=this;let i=t;"function"==typeof t&&(n.register(t),i=r(t)),e(`Adapter matching the name \`${i}\` was not registered.`,n.has(`adapter:${i}`)),this.disconnectFrom(i);const s=new(n.lookup(`adapter:${i}`))(this);s.connect(),o.set(i,s)}disconnectFrom(t){const{adapters:e}=this;let n=t;"function"==typeof t&&(n=r(t)),e.has(n)&&(e.get(n).disconnect(),e.delete(n))}disconnect(){for(const t of this.adapters.keys())this.disconnectFrom(t)}registerRequest(t={}){const e=new Qs(this,t);return this._requests.push(e),e}}const{defineProperty:Ou}=Object;function ju(t,e,r){Ou(t,"polly",{writable:!0,enumerable:!0,configurable:!0,value:new wu(e,r)})}async function Su(t,e){await t.polly.stop(),Ou(t,"polly",{enumerable:!0,configurable:!0,get(){throw new f("You are trying to access an instance of Polly that is no longer available.\n"+`See: https://netflix.github.io/pollyjs/#/test-frameworks/${e}?id=test-hook-ordering`)}})}function Eu(t,e={}){Eu.beforeEach(t,e),Eu.afterEach(t)}function Pu(t={},e=global){Pu.beforeEach(t,e),Pu.afterEach(e)}Eu.beforeEach=function(t,e={}){t.beforeEach(function(){return ju(this,function(t){return t.test.testReport.fullName.join("/")}(...arguments),e)})},Eu.afterEach=function(t){t.afterEach(function(){return Su(this,"qunit")})},Pu.beforeEach=function(t,e=global){e.beforeEach(function(){return ju(this,function(t){const{currentTest:e}=t,r=[e.title];let n=e.parent;for(;n&&n.title;)r.push(n.title),n=n.parent;return r.reverse().join("/")}(this),t)})},Pu.afterEach=function(t=global){t.afterEach(function(){return Su(this,"mocha")})};export{wu as Polly,kn as Timing,Pu as setupMocha,Eu as setupQunit};
import{ACTIONS as t,assert as e,timeout as r,MODES as n,EXPIRY_STRATEGIES as o,URL as i,HTTP_STATUS_CODES as s,timestamp as u,buildUrl as a,HTTP_METHODS as c,PollyError as h}from"@pollyjs/utils";import f from"blueimp-md5";import l from"fast-json-stable-stringify";import p from"is-absolute-url";import d from"@sindresorhus/fnv1a";import v from"slugify";import g from"route-recognizer";var y=Object.freeze({}),m=Math.ceil,_=Math.floor,b=function(t){return isNaN(t=+t)?0:(t>0?_:m)(t)},w=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t};function O(t,e){return t(e={exports:{}},e.exports),e.exports}var j=O(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),S=O(function(t){var e=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=e)}),E=(S.version,function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}),P=function(t,e,r){if(E(t),void 0===e)return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}},A=function(t){return"object"==typeof t?null!==t:"function"==typeof t},x=function(t){if(!A(t))throw TypeError(t+" is not an object!");return t},T=function(t){try{return!!t()}catch(t){return!0}},R=!T(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),k=j.document,N=A(k)&&A(k.createElement),I=function(t){return N?k.createElement(t):{}},F=!R&&!T(function(){return 7!=Object.defineProperty(I("div"),"a",{get:function(){return 7}}).a}),L=function(t,e){if(!A(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!A(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!A(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!A(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},M=Object.defineProperty,C={f:R?Object.defineProperty:function(t,e,r){if(x(t),e=L(e,!0),x(r),F)try{return M(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(t[e]=r.value),t}},$=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},z=R?function(t,e,r){return C.f(t,e,$(1,r))}:function(t,e,r){return t[e]=r,t},q={}.hasOwnProperty,H=function(t,e){return q.call(t,e)},D=function(t,e,r){var n,o,i,s=t&D.F,u=t&D.G,a=t&D.S,c=t&D.P,h=t&D.B,f=t&D.W,l=u?S:S[e]||(S[e]={}),p=l.prototype,d=u?j:a?j[e]:(j[e]||{}).prototype;for(n in u&&(r=e),r)(o=!s&&d&&void 0!==d[n])&&H(l,n)||(i=o?d[n]:r[n],l[n]=u&&"function"!=typeof d[n]?r[n]:h&&o?P(i,j):f&&d[n]==i?function(t){var e=function(e,r,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,r)}return new t(e,r,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(i):c&&"function"==typeof i?P(Function.call,i):i,c&&((l.virtual||(l.virtual={}))[n]=i,t&D.R&&p&&!p[n]&&z(p,n,i)))};D.F=1,D.G=2,D.S=4,D.P=8,D.B=16,D.W=32,D.U=64,D.R=128;var W,U=D,B=z,G={},J={}.toString,V=function(t){return J.call(t).slice(8,-1)},K=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==V(t)?t.split(""):Object(t)},Y=function(t){return K(w(t))},X=Math.min,Q=function(t){return t>0?X(b(t),9007199254740991):0},Z=Math.max,tt=Math.min,et=O(function(t){var e=j["__core-js_shared__"]||(j["__core-js_shared__"]={});(t.exports=function(t,r){return e[t]||(e[t]=void 0!==r?r:{})})("versions",[]).push({version:S.version,mode:"pure",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),rt=0,nt=Math.random(),ot=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++rt+nt).toString(36))},it=et("keys"),st=function(t){return it[t]||(it[t]=ot(t))},ut=(W=!1,function(t,e,r){var n,o=Y(t),i=Q(o.length),s=function(t,e){return(t=b(t))<0?Z(t+e,0):tt(t,e)}(r,i);if(W&&e!=e){for(;i>s;)if((n=o[s++])!=n)return!0}else for(;i>s;s++)if((W||s in o)&&o[s]===e)return W||s||0;return!W&&-1}),at=st("IE_PROTO"),ct=function(t,e){var r,n=Y(t),o=0,i=[];for(r in n)r!=at&&H(n,r)&&i.push(r);for(;e.length>o;)H(n,r=e[o++])&&(~ut(i,r)||i.push(r));return i},ht="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),ft=Object.keys||function(t){return ct(t,ht)},lt=R?Object.defineProperties:function(t,e){x(t);for(var r,n=ft(e),o=n.length,i=0;o>i;)C.f(t,r=n[i++],e[r]);return t},pt=j.document,dt=pt&&pt.documentElement,vt=st("IE_PROTO"),gt=function(){},yt=function(){var t,e=I("iframe"),r=ht.length;for(e.style.display="none",dt.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),yt=t.F;r--;)delete yt.prototype[ht[r]];return yt()},mt=Object.create||function(t,e){var r;return null!==t?(gt.prototype=x(t),r=new gt,gt.prototype=null,r[vt]=t):r=yt(),void 0===e?r:lt(r,e)},_t=O(function(t){var e=et("wks"),r=j.Symbol,n="function"==typeof r;(t.exports=function(t){return e[t]||(e[t]=n&&r[t]||(n?r:ot)("Symbol."+t))}).store=e}),bt=C.f,wt=_t("toStringTag"),Ot=function(t,e,r){t&&!H(t=r?t:t.prototype,wt)&&bt(t,wt,{configurable:!0,value:e})},jt={};z(jt,_t("iterator"),function(){return this});var St,Et=function(t,e,r){t.prototype=mt(jt,{next:$(1,r)}),Ot(t,e+" Iterator")},Pt=function(t){return Object(w(t))},At=st("IE_PROTO"),xt=Object.prototype,Tt=Object.getPrototypeOf||function(t){return t=Pt(t),H(t,At)?t[At]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?xt:null},Rt=_t("iterator"),kt=!([].keys&&"next"in[].keys()),Nt=function(){return this},It=function(t,e,r,n,o,i,s){Et(r,e,n);var u,a,c,h=function(t){if(!kt&&t in d)return d[t];switch(t){case"keys":case"values":return function(){return new r(this,t)}}return function(){return new r(this,t)}},f=e+" Iterator",l="values"==o,p=!1,d=t.prototype,v=d[Rt]||d["@@iterator"]||o&&d[o],g=v||h(o),y=o?l?h("entries"):g:void 0,m="Array"==e&&d.entries||v;if(m&&(c=Tt(m.call(new t)))!==Object.prototype&&c.next&&Ot(c,f,!0),l&&v&&"values"!==v.name&&(p=!0,g=function(){return v.call(this)}),s&&(kt||p||!d[Rt])&&z(d,Rt,g),G[e]=g,G[f]=Nt,o)if(u={values:l?g:h("values"),keys:i?g:h("keys"),entries:y},s)for(a in u)a in d||B(d,a,u[a]);else U(U.P+U.F*(kt||p),e,u);return u},Ft=(St=!0,function(t,e){var r,n,o=String(w(t)),i=b(e),s=o.length;return i<0||i>=s?St?"":void 0:(r=o.charCodeAt(i))<55296||r>56319||i+1===s||(n=o.charCodeAt(i+1))<56320||n>57343?St?o.charAt(i):r:St?o.slice(i,i+2):n-56320+(r-55296<<10)+65536});It(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,r=this._i;return r>=e.length?{value:void 0,done:!0}:(t=Ft(e,r),this._i+=t.length,{value:t,done:!1})});var Lt=function(t,e){return{value:e,done:!!t}};It(Array,"Array",function(t,e){this._t=Y(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,Lt(1)):Lt(0,"keys"==e?r:"values"==e?t[r]:[r,t[r]])},"values");G.Arguments=G.Array;for(var Mt=_t("toStringTag"),Ct="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),$t=0;$t<Ct.length;$t++){var zt=Ct[$t],qt=j[zt],Ht=qt&&qt.prototype;Ht&&!Ht[Mt]&&z(Ht,Mt,zt),G[zt]=G.Array}var Dt,Wt,Ut,Bt=_t("toStringTag"),Gt="Arguments"==V(function(){return arguments}()),Jt=function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Bt))?r:Gt?V(e):"Object"==(n=V(e))&&"function"==typeof e.callee?"Arguments":n},Vt=function(t,e,r,n){if(!(t instanceof e)||void 0!==n&&n in t)throw TypeError(r+": incorrect invocation!");return t},Kt=function(t,e,r,n){try{return n?e(x(r)[0],r[1]):e(r)}catch(e){var o=t.return;throw void 0!==o&&x(o.call(t)),e}},Yt=_t("iterator"),Xt=Array.prototype,Qt=_t("iterator"),Zt=S.getIteratorMethod=function(t){if(null!=t)return t[Qt]||t["@@iterator"]||G[Jt(t)]},te=O(function(t){var e={},r={},n=t.exports=function(t,n,o,i,s){var u,a,c,h,f,l=s?function(){return t}:Zt(t),p=P(o,i,n?2:1),d=0;if("function"!=typeof l)throw TypeError(t+" is not iterable!");if(void 0===(f=l)||G.Array!==f&&Xt[Yt]!==f){for(c=l.call(t);!(a=c.next()).done;)if((h=Kt(c,p,a.value,n))===e||h===r)return h}else for(u=Q(t.length);u>d;d++)if((h=n?p(x(a=t[d])[0],a[1]):p(t[d]))===e||h===r)return h};n.BREAK=e,n.RETURN=r}),ee=_t("species"),re=function(t,e){var r,n=x(t).constructor;return void 0===n||null==(r=x(n)[ee])?e:E(r)},ne=j.process,oe=j.setImmediate,ie=j.clearImmediate,se=j.MessageChannel,ue=j.Dispatch,ae=0,ce={},he=function(){var t=+this;if(ce.hasOwnProperty(t)){var e=ce[t];delete ce[t],e()}},fe=function(t){he.call(t.data)};oe&&ie||(oe=function(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return ce[++ae]=function(){!function(t,e,r){var n=void 0===r;switch(e.length){case 0:return n?t():t.call(r);case 1:return n?t(e[0]):t.call(r,e[0]);case 2:return n?t(e[0],e[1]):t.call(r,e[0],e[1]);case 3:return n?t(e[0],e[1],e[2]):t.call(r,e[0],e[1],e[2]);case 4:return n?t(e[0],e[1],e[2],e[3]):t.call(r,e[0],e[1],e[2],e[3])}t.apply(r,e)}("function"==typeof t?t:Function(t),e)},Dt(ae),ae},ie=function(t){delete ce[t]},"process"==V(ne)?Dt=function(t){ne.nextTick(P(he,t,1))}:ue&&ue.now?Dt=function(t){ue.now(P(he,t,1))}:se?(Ut=(Wt=new se).port2,Wt.port1.onmessage=fe,Dt=P(Ut.postMessage,Ut,1)):j.addEventListener&&"function"==typeof postMessage&&!j.importScripts?(Dt=function(t){j.postMessage(t+"","*")},j.addEventListener("message",fe,!1)):Dt="onreadystatechange"in I("script")?function(t){dt.appendChild(I("script")).onreadystatechange=function(){dt.removeChild(this),he.call(t)}}:function(t){setTimeout(P(he,t,1),0)});var le={set:oe,clear:ie},pe=le.set,de=j.MutationObserver||j.WebKitMutationObserver,ve=j.process,ge=j.Promise,ye="process"==V(ve);function me(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n}),this.resolve=E(e),this.reject=E(r)}var _e={f:function(t){return new me(t)}},be=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}},we=j.navigator,Oe=we&&we.userAgent||"",je=function(t,e){if(x(t),A(e)&&e.constructor===t)return e;var r=_e.f(t);return(0,r.resolve)(e),r.promise},Se=function(t,e,r){for(var n in e)r&&t[n]?t[n]=e[n]:z(t,n,e[n]);return t},Ee=_t("species"),Pe=function(t){var e="function"==typeof S[t]?S[t]:j[t];R&&e&&!e[Ee]&&C.f(e,Ee,{configurable:!0,get:function(){return this}})},Ae=_t("iterator"),xe=!1;try{var Te=[7][Ae]();Te.return=function(){xe=!0},Array.from(Te,function(){throw 2})}catch(t){}var Re,ke,Ne,Ie,Fe,Le=le.set,Me=function(){var t,e,r,n=function(){var n,o;for(ye&&(n=ve.domain)&&n.exit();t;){o=t.fn,t=t.next;try{o()}catch(n){throw t?r():e=void 0,n}}e=void 0,n&&n.enter()};if(ye)r=function(){ve.nextTick(n)};else if(!de||j.navigator&&j.navigator.standalone)if(ge&&ge.resolve){var o=ge.resolve(void 0);r=function(){o.then(n)}}else r=function(){pe.call(j,n)};else{var i=!0,s=document.createTextNode("");new de(n).observe(s,{characterData:!0}),r=function(){s.data=i=!i}}return function(n){var o={fn:n,next:void 0};e&&(e.next=o),t||(t=o,r()),e=o}}(),Ce=j.TypeError,$e=j.process,ze=$e&&$e.versions,qe=ze&&ze.v8||"",He=j.Promise,De="process"==Jt($e),We=function(){},Ue=ke=_e.f,Be=!!function(){try{var t=He.resolve(1),e=(t.constructor={})[_t("species")]=function(t){t(We,We)};return(De||"function"==typeof PromiseRejectionEvent)&&t.then(We)instanceof e&&0!==qe.indexOf("6.6")&&-1===Oe.indexOf("Chrome/66")}catch(t){}}(),Ge=function(t){var e;return!(!A(t)||"function"!=typeof(e=t.then))&&e},Je=function(t,e){if(!t._n){t._n=!0;var r=t._c;Me(function(){for(var n=t._v,o=1==t._s,i=0,s=function(e){var r,i,s,u=o?e.ok:e.fail,a=e.resolve,c=e.reject,h=e.domain;try{u?(o||(2==t._h&&Ye(t),t._h=1),!0===u?r=n:(h&&h.enter(),r=u(n),h&&(h.exit(),s=!0)),r===e.promise?c(Ce("Promise-chain cycle")):(i=Ge(r))?i.call(r,a,c):a(r)):c(n)}catch(t){h&&!s&&h.exit(),c(t)}};r.length>i;)s(r[i++]);t._c=[],t._n=!1,e&&!t._h&&Ve(t)})}},Ve=function(t){Le.call(j,function(){var e,r,n,o=t._v,i=Ke(t);if(i&&(e=be(function(){De?$e.emit("unhandledRejection",o,t):(r=j.onunhandledrejection)?r({promise:t,reason:o}):(n=j.console)&&n.error&&n.error("Unhandled promise rejection",o)}),t._h=De||Ke(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},Ke=function(t){return 1!==t._h&&0===(t._a||t._c).length},Ye=function(t){Le.call(j,function(){var e;De?$e.emit("rejectionHandled",t):(e=j.onrejectionhandled)&&e({promise:t,reason:t._v})})},Xe=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),Je(e,!0))},Qe=function(t){var e,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw Ce("Promise can't be resolved itself");(e=Ge(t))?Me(function(){var n={_w:r,_d:!1};try{e.call(t,P(Qe,n,1),P(Xe,n,1))}catch(t){Xe.call(n,t)}}):(r._v=t,r._s=1,Je(r,!1))}catch(t){Xe.call({_w:r,_d:!1},t)}}};Be||(He=function(t){Vt(this,He,"Promise","_h"),E(t),Re.call(this);try{t(P(Qe,this,1),P(Xe,this,1))}catch(t){Xe.call(this,t)}},(Re=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=Se(He.prototype,{then:function(t,e){var r=Ue(re(this,He));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=De?$e.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&Je(this,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),Ne=function(){var t=new Re;this.promise=t,this.resolve=P(Qe,t,1),this.reject=P(Xe,t,1)},_e.f=Ue=function(t){return t===He||t===Ie?new Ne(t):ke(t)}),U(U.G+U.W+U.F*!Be,{Promise:He}),Ot(He,"Promise"),Pe("Promise"),Ie=S.Promise,U(U.S+U.F*!Be,"Promise",{reject:function(t){var e=Ue(this);return(0,e.reject)(t),e.promise}}),U(U.S+!0*U.F,"Promise",{resolve:function(t){return je(this===Ie?He:this,t)}}),U(U.S+U.F*!(Be&&function(t,e){if(!e&&!xe)return!1;var r=!1;try{var n=[7],o=n[Ae]();o.next=function(){return{done:r=!0}},n[Ae]=function(){return o},t(n)}catch(t){}return r}(function(t){He.all(t).catch(We)})),"Promise",{all:function(t){var e=this,r=Ue(e),n=r.resolve,o=r.reject,i=be(function(){var r=[],i=0,s=1;te(t,!1,function(t){var u=i++,a=!1;r.push(void 0),s++,e.resolve(t).then(function(t){a||(a=!0,r[u]=t,--s||n(r))},o)}),--s||n(r)});return i.e&&o(i.v),r.promise},race:function(t){var e=this,r=Ue(e),n=r.reject,o=be(function(){te(t,!1,function(t){e.resolve(t).then(r.resolve,n)})});return o.e&&n(o.v),r.promise}}),U(U.P+U.R,"Promise",{finally:function(t){var e=re(this,S.Promise||j.Promise),r="function"==typeof t;return this.then(r?function(r){return je(e,t()).then(function(){return r})}:t,r?function(r){return je(e,t()).then(function(){throw r})}:t)}}),U(U.S,"Promise",{try:function(t){var e=_e.f(this),r=be(t);return(r.e?e.reject:e.resolve)(r.v),e.promise}}),(Fe=y)&&Fe.default;var Ze,tr=S.Promise,er={f:{}.propertyIsEnumerable},rr=er.f,nr=(Ze=!1,function(t){for(var e,r=Y(t),n=ft(r),o=n.length,i=0,s=[];o>i;)e=n[i++],R&&!rr.call(r,e)||s.push(Ze?[e,r[e]]:r[e]);return s});U(U.S,"Object",{values:function(t){return nr(t)}});var or=S.Object.values,ir=O(function(t){var e=ot("meta"),r=C.f,n=0,o=Object.isExtensible||function(){return!0},i=!T(function(){return o(Object.preventExtensions({}))}),s=function(t){r(t,e,{value:{i:"O"+ ++n,w:{}}})},u=t.exports={KEY:e,NEED:!1,fastKey:function(t,r){if(!A(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!H(t,e)){if(!o(t))return"F";if(!r)return"E";s(t)}return t[e].i},getWeak:function(t,r){if(!H(t,e)){if(!o(t))return!0;if(!r)return!1;s(t)}return t[e].w},onFreeze:function(t){return i&&u.NEED&&o(t)&&!H(t,e)&&s(t),t}}}),sr=(ir.KEY,ir.NEED,ir.fastKey,ir.getWeak,ir.onFreeze,function(t,e){if(!A(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}),ur=C.f,ar=ir.fastKey,cr=R?"_s":"size",hr=function(t,e){var r,n=ar(e);if("F"!==n)return t._i[n];for(r=t._f;r;r=r.n)if(r.k==e)return r},fr={getConstructor:function(t,e,r,n){var o=t(function(t,i){Vt(t,o,e,"_i"),t._t=e,t._i=mt(null),t._f=void 0,t._l=void 0,t[cr]=0,null!=i&&te(i,r,t[n],t)});return Se(o.prototype,{clear:function(){for(var t=sr(this,e),r=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete r[n.i];t._f=t._l=void 0,t[cr]=0},delete:function(t){var r=sr(this,e),n=hr(r,t);if(n){var o=n.n,i=n.p;delete r._i[n.i],n.r=!0,i&&(i.n=o),o&&(o.p=i),r._f==n&&(r._f=o),r._l==n&&(r._l=i),r[cr]--}return!!n},forEach:function(t){sr(this,e);for(var r,n=P(t,arguments.length>1?arguments[1]:void 0,3);r=r?r.n:this._f;)for(n(r.v,r.k,this);r&&r.r;)r=r.p},has:function(t){return!!hr(sr(this,e),t)}}),R&&ur(o.prototype,"size",{get:function(){return sr(this,e)[cr]}}),o},def:function(t,e,r){var n,o,i=hr(t,e);return i?i.v=r:(t._l=i={i:o=ar(e,!0),k:e,v:r,p:n=t._l,n:void 0,r:!1},t._f||(t._f=i),n&&(n.n=i),t[cr]++,"F"!==o&&(t._i[o]=i)),t},getEntry:hr,setStrong:function(t,e,r){It(t,e,function(t,r){this._t=sr(t,e),this._k=r,this._l=void 0},function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?Lt(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,Lt(1))},r?"entries":"values",!r,!0),Pe(e)}},lr=Array.isArray||function(t){return"Array"==V(t)},pr=_t("species"),dr=function(t,e){return new(function(t){var e;return lr(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!lr(e.prototype)||(e=void 0),A(e)&&null===(e=e[pr])&&(e=void 0)),void 0===e?Array:e}(t))(e)},vr=function(t,e){var r=1==t,n=2==t,o=3==t,i=4==t,s=6==t,u=5==t||s,a=e||dr;return function(e,c,h){for(var f,l,p=Pt(e),d=K(p),v=P(c,h,3),g=Q(d.length),y=0,m=r?a(e,g):n?a(e,0):void 0;g>y;y++)if((u||y in d)&&(l=v(f=d[y],y,p),t))if(r)m[y]=l;else if(l)switch(t){case 3:return!0;case 5:return f;case 6:return y;case 2:m.push(f)}else if(i)return!1;return s?-1:o||i?i:m}},gr=C.f,yr=vr(0),mr=function(t,e,r,n,o,i){var s=j[t],u=s,a=o?"set":"add",c=u&&u.prototype,h={};return R&&"function"==typeof u&&(i||c.forEach&&!T(function(){(new u).entries().next()}))?(u=e(function(e,r){Vt(e,u,t,"_c"),e._c=new s,null!=r&&te(r,o,e[a],e)}),yr("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(t){var e="add"==t||"set"==t;t in c&&(!i||"clear"!=t)&&z(u.prototype,t,function(r,n){if(Vt(this,u,t),!e&&i&&!A(r))return"get"==t&&void 0;var o=this._c[t](0===r?0:r,n);return e?this:o})}),i||gr(u.prototype,"size",{get:function(){return this._c.size}})):(u=n.getConstructor(e,t,o,a),Se(u.prototype,r),ir.NEED=!0),Ot(u,t),h[t]=u,U(U.G+U.W+U.F,h),i||n.setStrong(u,t,o),u},_r=(mr("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=fr.getEntry(sr(this,"Map"),t);return e&&e.v},set:function(t,e){return fr.def(sr(this,"Map"),0===t?0:t,e)}},fr,!0),function(t){return function(){if(Jt(this)!=t)throw TypeError(t+"#toJSON isn't generic");return function(t,e){var r=[];return te(t,!1,r.push,r,e),r}(this)}});U(U.P+U.R,"Map",{toJSON:_r("Map")});var br=function(t){U(U.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})};br("Map");var wr=function(t){U(U.S,t,{from:function(t){var e,r,n,o,i=arguments[1];return E(this),(e=void 0!==i)&&E(i),null==t?new this:(r=[],e?(n=0,o=P(i,arguments[2],2),te(t,!1,function(t){r.push(o(t,n++))})):te(t,!1,r.push,r),new this(r))}})};wr("Map");var Or=S.Map,jr={f:Object.getOwnPropertySymbols},Sr=Object.assign,Er=!Sr||T(function(){var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(t){e[t]=t}),7!=Sr({},t)[r]||Object.keys(Sr({},e)).join("")!=n})?function(t,e){for(var r=Pt(t),n=arguments.length,o=1,i=jr.f,s=er.f;n>o;)for(var u,a=K(arguments[o++]),c=i?ft(a).concat(i(a)):ft(a),h=c.length,f=0;h>f;)u=c[f++],R&&!s.call(a,u)||(r[u]=a[u]);return r}:Sr,Pr=ir.getWeak,Ar=vr(5),xr=vr(6),Tr=0,Rr=function(t){return t._l||(t._l=new kr)},kr=function(){this.a=[]},Nr=function(t,e){return Ar(t.a,function(t){return t[0]===e})};kr.prototype={get:function(t){var e=Nr(this,t);if(e)return e[1]},has:function(t){return!!Nr(this,t)},set:function(t,e){var r=Nr(this,t);r?r[1]=e:this.a.push([t,e])},delete:function(t){var e=xr(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}};var Ir={getConstructor:function(t,e,r,n){var o=t(function(t,i){Vt(t,o,e,"_i"),t._t=e,t._i=Tr++,t._l=void 0,null!=i&&te(i,r,t[n],t)});return Se(o.prototype,{delete:function(t){if(!A(t))return!1;var r=Pr(t);return!0===r?Rr(sr(this,e)).delete(t):r&&H(r,this._i)&&delete r[this._i]},has:function(t){if(!A(t))return!1;var r=Pr(t);return!0===r?Rr(sr(this,e)).has(t):r&&H(r,this._i)}}),o},def:function(t,e,r){var n=Pr(x(e),!0);return!0===n?Rr(t).set(e,r):n[t._i]=r,t},ufstore:Rr};O(function(t){var e,r=vr(0),n=sr,o=!j.ActiveXObject&&"ActiveXObject"in j,i=ir.getWeak,s=Object.isExtensible,u=Ir.ufstore,a=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},c={get:function(t){if(A(t)){var e=i(t);return!0===e?u(sr(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return Ir.def(sr(this,"WeakMap"),t,e)}},h=t.exports=mr("WeakMap",a,c,Ir,!0,!0);n&&o&&(e=Ir.getConstructor(a,"WeakMap"),Er(e.prototype,c),ir.NEED=!0,r(["delete","has","get","set"],function(t){var r=h.prototype,n=r[t];B(r,t,function(r,o){if(A(r)&&!s(r)){this._f||(this._f=new e);var i=this._f[t](r,o);return"set"==t?this:i}return n.call(this,r,o)})}))});br("WeakMap"),wr("WeakMap");var Fr=S.WeakMap,Lr={f:_t},Mr=C.f,Cr=function(t){var e=S.Symbol||(S.Symbol={});"_"==t.charAt(0)||t in e||Mr(e,t,{value:Lr.f(t)})},$r=ht.concat("length","prototype"),zr={f:Object.getOwnPropertyNames||function(t){return ct(t,$r)}},qr=zr.f,Hr={}.toString,Dr="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Wr={f:function(t){return Dr&&"[object Window]"==Hr.call(t)?function(t){try{return qr(t)}catch(t){return Dr.slice()}}(t):qr(Y(t))}},Ur=Object.getOwnPropertyDescriptor,Br={f:R?Ur:function(t,e){if(t=Y(t),e=L(e,!0),F)try{return Ur(t,e)}catch(t){}if(H(t,e))return $(!er.f.call(t,e),t[e])}},Gr=ir.KEY,Jr=Br.f,Vr=C.f,Kr=Wr.f,Yr=j.Symbol,Xr=j.JSON,Qr=Xr&&Xr.stringify,Zr=_t("_hidden"),tn=_t("toPrimitive"),en={}.propertyIsEnumerable,rn=et("symbol-registry"),nn=et("symbols"),on=et("op-symbols"),sn=Object.prototype,un="function"==typeof Yr&&!!jr.f,an=j.QObject,cn=!an||!an.prototype||!an.prototype.findChild,hn=R&&T(function(){return 7!=mt(Vr({},"a",{get:function(){return Vr(this,"a",{value:7}).a}})).a})?function(t,e,r){var n=Jr(sn,e);n&&delete sn[e],Vr(t,e,r),n&&t!==sn&&Vr(sn,e,n)}:Vr,fn=function(t){var e=nn[t]=mt(Yr.prototype);return e._k=t,e},ln=un&&"symbol"==typeof Yr.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof Yr},pn=function(t,e,r){return t===sn&&pn(on,e,r),x(t),e=L(e,!0),x(r),H(nn,e)?(r.enumerable?(H(t,Zr)&&t[Zr][e]&&(t[Zr][e]=!1),r=mt(r,{enumerable:$(0,!1)})):(H(t,Zr)||Vr(t,Zr,$(1,{})),t[Zr][e]=!0),hn(t,e,r)):Vr(t,e,r)},dn=function(t,e){x(t);for(var r,n=function(t){var e=ft(t),r=jr.f;if(r)for(var n,o=r(t),i=er.f,s=0;o.length>s;)i.call(t,n=o[s++])&&e.push(n);return e}(e=Y(e)),o=0,i=n.length;i>o;)pn(t,r=n[o++],e[r]);return t},vn=function(t){var e=en.call(this,t=L(t,!0));return!(this===sn&&H(nn,t)&&!H(on,t))&&(!(e||!H(this,t)||!H(nn,t)||H(this,Zr)&&this[Zr][t])||e)},gn=function(t,e){if(t=Y(t),e=L(e,!0),t!==sn||!H(nn,e)||H(on,e)){var r=Jr(t,e);return!r||!H(nn,e)||H(t,Zr)&&t[Zr][e]||(r.enumerable=!0),r}},yn=function(t){for(var e,r=Kr(Y(t)),n=[],o=0;r.length>o;)H(nn,e=r[o++])||e==Zr||e==Gr||n.push(e);return n},mn=function(t){for(var e,r=t===sn,n=Kr(r?on:Y(t)),o=[],i=0;n.length>i;)!H(nn,e=n[i++])||r&&!H(sn,e)||o.push(nn[e]);return o};un||(B((Yr=function(){if(this instanceof Yr)throw TypeError("Symbol is not a constructor!");var t=ot(arguments.length>0?arguments[0]:void 0),e=function(r){this===sn&&e.call(on,r),H(this,Zr)&&H(this[Zr],t)&&(this[Zr][t]=!1),hn(this,t,$(1,r))};return R&&cn&&hn(sn,t,{configurable:!0,set:e}),fn(t)}).prototype,"toString",function(){return this._k}),Br.f=gn,C.f=pn,zr.f=Wr.f=yn,er.f=vn,jr.f=mn,Lr.f=function(t){return fn(_t(t))}),U(U.G+U.W+U.F*!un,{Symbol:Yr});for(var _n="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),bn=0;_n.length>bn;)_t(_n[bn++]);for(var wn=ft(_t.store),On=0;wn.length>On;)Cr(wn[On++]);U(U.S+U.F*!un,"Symbol",{for:function(t){return H(rn,t+="")?rn[t]:rn[t]=Yr(t)},keyFor:function(t){if(!ln(t))throw TypeError(t+" is not a symbol!");for(var e in rn)if(rn[e]===t)return e},useSetter:function(){cn=!0},useSimple:function(){cn=!1}}),U(U.S+U.F*!un,"Object",{create:function(t,e){return void 0===e?mt(t):dn(mt(t),e)},defineProperty:pn,defineProperties:dn,getOwnPropertyDescriptor:gn,getOwnPropertyNames:yn,getOwnPropertySymbols:mn});var jn=T(function(){jr.f(1)});U(U.S+U.F*jn,"Object",{getOwnPropertySymbols:function(t){return jr.f(Pt(t))}}),Xr&&U(U.S+U.F*(!un||T(function(){var t=Yr();return"[null]"!=Qr([t])||"{}"!=Qr({a:t})||"{}"!=Qr(Object(t))})),"JSON",{stringify:function(t){for(var e,r,n=[t],o=1;arguments.length>o;)n.push(arguments[o++]);if(r=e=n[1],(A(e)||void 0!==t)&&!ln(t))return lr(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!ln(e))return e}),n[1]=e,Qr.apply(Xr,n)}}),Yr.prototype[tn]||z(Yr.prototype,tn,Yr.prototype.valueOf),Ot(Yr,"Symbol"),Ot(Math,"Math",!0),Ot(j.JSON,"JSON",!0),Cr("asyncIterator"),Cr("observable");var Sn=S.Symbol,En="5.0.0";const Pn={[t.RECORD]:"Recorded",[t.REPLAY]:"Replayed",[t.INTERCEPT]:"Intercepted",[t.PASSTHROUGH]:"Passthrough"};class An{constructor(t){this.polly=t,this.groupName=null}connect(){this._middleware=this.polly.server.any().on("error",(...t)=>this.logError(...t)).on("response",(...t)=>this.logRequest(...t))}disconnect(){this.groupEnd(),this._middleware.off("error"),this._middleware.off("response")}groupStart(t){this.groupName&&this.groupName!==t&&(this.groupEnd(),this.groupName=null),this.groupName||(this.groupName=t,console.group(this.groupName))}groupEnd(){this.groupName&&console.groupEnd()}logRequest(t){t.config.logging&&(this.groupStart(t.recordingName),console.groupCollapsed(`${Pn[t.action]} ➞ ${t.method} ${t.url} ${t.response.statusCode} • ${t.responseTime}ms`),console.log("Request:",t),console.log("Response:",t.response),console.log("Identifiers:",t.identifiers),console.groupEnd())}logError(t,e){this.groupStart(t.recordingName),console.group(`Errored ➞ ${t.method} ${t.url}`),console.error(e),console.log("Request:",t),t.didRespond&&console.log("Response:",t.response),console.log("Identifiers:",t.identifiers),console.groupEnd()}}function xn(t){return`${t.type}:${t.id}`}class Tn{constructor(){this._registry=new Or}register(t){e(`Attempted to register ${t} but invalid factory provided. Expected function, received: "${typeof t}"`,"function"==typeof t);const{type:r}=t,n=t.id;e(`Invalid registration id provided. Expected string, received: "${typeof n}"`,"string"==typeof n),e(`Invalid registration type provided. Expected string, received: "${typeof r}"`,"string"==typeof r),this._registry.set(xn(t),t)}unregister(t){const{_registry:e}=this,r="function"==typeof t?xn(t):t;e.delete(r)}lookup(t){return this._registry.get(t)||null}has(t){const{_registry:e}=this,r="function"==typeof t?xn(t):t;return e.has(r)}}var Rn={fixed:t=>()=>r(t),relative:t=>e=>r(t*e)},kn={mode:n.REPLAY,adapters:[],adapterOptions:{},persister:null,persisterOptions:{keepUnusedRequests:!1,disableSortingHarEntries:!1},logging:!1,flushRequestsOnStop:!1,recordIfMissing:!0,recordFailedRequests:!1,expiresIn:null,expiryStrategy:o.WARN,timing:Rn.fixed(0),matchRequestsBy:{method:!0,headers:!0,body:!0,order:!0,url:{protocol:!0,username:!0,password:!0,hostname:!0,port:!0,pathname:!0,query:!0,hash:!1}}};function Nn(t){return null!=t&&"object"==typeof t}function In(t,...e){const r=new i(t,...e);return p(t)||(t.startsWith("//")?r.set("protocol",""):function(t){t.set("protocol",""),t.set("host",""),t.set("slashes",!1)}(r)),r}const{keys:Fn}=Object,Ln={get:(t,e)=>t["string"==typeof e?e.toLowerCase():e],set:(t,e,r)=>"string"==typeof e&&(null==r?delete t[e.toLowerCase()]:t[e.toLowerCase()]=r,!0),deleteProperty:(t,e)=>"string"==typeof e&&(delete t[e.toLowerCase()],!0)};function Mn(t){const e=new Proxy({},Ln);return Nn(t)&&Fn(t).forEach(r=>e[r]=t[r]),e}const{keys:Cn}=Object,{isArray:$n}=Array,{parse:zn}=JSON;function qn(t){return"function"==typeof t}var Hn={headers:function(t,e,r){const n=new Mn(t);return qn(e)?e(n,r):(Nn(e)&&$n(e.exclude)&&e.exclude.forEach(t=>delete n[t]),n)},method:function(t,e,r){return qn(e)?e(t,r):t.toUpperCase()},body:function(t,e,r){return qn(e)?e(t,r):t},url:function(t,e,r){let n=In(t,!0);return qn(e)?n=In(e(t,r),!0):Cn(e||{}).forEach(t=>{qn(e[t])?n.set(t,e[t](n[t],r)):e[t]||n.set(t,"")}),Nn(n.query)&&n.set("query",zn(l(n.query))),n.href}};function Dn(t){const e=d(t).toString();let r=v(function(t){return t.replace(/\W/g,"-")}(t));return`${r=r.substring(0,100-e.length-1)}_${e}`}function Wn(t){return(t||"").split("/").map(Dn).join("/")}U(U.S,"Array",{isArray:lr});var Un=S.Array.isArray;function Bn(t,e){return t===e||t!=t&&e!=e}function Gn(t,e){for(var r=t.length;r--;)if(Bn(t[r][0],e))return r;return-1}var Jn=Array.prototype.splice;function Vn(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Vn.prototype.clear=function(){this.__data__=[],this.size=0},Vn.prototype.delete=function(t){var e=this.__data__,r=Gn(e,t);return!(r<0||(r==e.length-1?e.pop():Jn.call(e,r,1),--this.size,0))},Vn.prototype.get=function(t){var e=this.__data__,r=Gn(e,t);return r<0?void 0:e[r][1]},Vn.prototype.has=function(t){return Gn(this.__data__,t)>-1},Vn.prototype.set=function(t,e){var r=this.__data__,n=Gn(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};var Kn="object"==typeof global&&global&&global.Object===Object&&global,Yn="object"==typeof self&&self&&self.Object===Object&&self,Xn=Kn||Yn||Function("return this")(),Qn=Xn.Symbol,Zn=Object.prototype,to=Zn.hasOwnProperty,eo=Zn.toString,ro=Qn?Qn.toStringTag:void 0;var no=Object.prototype.toString;var oo="[object Null]",io="[object Undefined]",so=Qn?Qn.toStringTag:void 0;function uo(t){return null==t?void 0===t?io:oo:so&&so in Object(t)?function(t){var e=to.call(t,ro),r=t[ro];try{t[ro]=void 0;var n=!0}catch(t){}var o=eo.call(t);return n&&(e?t[ro]=r:delete t[ro]),o}(t):function(t){return no.call(t)}(t)}function ao(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var co="[object AsyncFunction]",ho="[object Function]",fo="[object GeneratorFunction]",lo="[object Proxy]";function po(t){if(!ao(t))return!1;var e=uo(t);return e==ho||e==fo||e==co||e==lo}var vo,go=Xn["__core-js_shared__"],yo=(vo=/[^.]+$/.exec(go&&go.keys&&go.keys.IE_PROTO||""))?"Symbol(src)_1."+vo:"";var mo=Function.prototype.toString;var _o=/^\[object .+?Constructor\]$/,bo=Function.prototype,wo=Object.prototype,Oo=bo.toString,jo=wo.hasOwnProperty,So=RegExp("^"+Oo.call(jo).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Eo(t){return!(!ao(t)||(e=t,yo&&yo in e))&&(po(t)?So:_o).test(function(t){if(null!=t){try{return mo.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function Po(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return Eo(r)?r:void 0}var Ao=Po(Xn,"Map"),xo=Po(Object,"create");var To="__lodash_hash_undefined__",Ro=Object.prototype.hasOwnProperty;var ko=Object.prototype.hasOwnProperty;var No="__lodash_hash_undefined__";function Io(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Fo(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function Lo(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Io.prototype.clear=function(){this.__data__=xo?xo(null):{},this.size=0},Io.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Io.prototype.get=function(t){var e=this.__data__;if(xo){var r=e[t];return r===To?void 0:r}return Ro.call(e,t)?e[t]:void 0},Io.prototype.has=function(t){var e=this.__data__;return xo?void 0!==e[t]:ko.call(e,t)},Io.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=xo&&void 0===e?No:e,this},Lo.prototype.clear=function(){this.size=0,this.__data__={hash:new Io,map:new(Ao||Vn),string:new Io}},Lo.prototype.delete=function(t){var e=Fo(this,t).delete(t);return this.size-=e?1:0,e},Lo.prototype.get=function(t){return Fo(this,t).get(t)},Lo.prototype.has=function(t){return Fo(this,t).has(t)},Lo.prototype.set=function(t,e){var r=Fo(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};var Mo=200;function Co(t){var e=this.__data__=new Vn(t);this.size=e.size}Co.prototype.clear=function(){this.__data__=new Vn,this.size=0},Co.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Co.prototype.get=function(t){return this.__data__.get(t)},Co.prototype.has=function(t){return this.__data__.has(t)},Co.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Vn){var n=r.__data__;if(!Ao||n.length<Mo-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Lo(n)}return r.set(t,e),this.size=r.size,this};var $o=function(){try{var t=Po(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();function zo(t,e,r){"__proto__"==e&&$o?$o(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function qo(t,e,r){(void 0===r||Bn(t[e],r))&&(void 0!==r||e in t)||zo(t,e,r)}var Ho,Do=function(t,e,r){for(var n=-1,o=Object(t),i=r(t),s=i.length;s--;){var u=i[Ho?s:++n];if(!1===e(o[u],u,o))break}return t},Wo="object"==typeof exports&&exports&&!exports.nodeType&&exports,Uo=Wo&&"object"==typeof module&&module&&!module.nodeType&&module,Bo=Uo&&Uo.exports===Wo?Xn.Buffer:void 0,Go=Bo?Bo.allocUnsafe:void 0;var Jo=Xn.Uint8Array;function Vo(t,e){var r,n,o=e?(r=t.buffer,n=new r.constructor(r.byteLength),new Jo(n).set(new Jo(r)),n):t.buffer;return new t.constructor(o,t.byteOffset,t.length)}var Ko=Object.create,Yo=function(){function t(){}return function(e){if(!ao(e))return{};if(Ko)return Ko(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var Xo,Qo,Zo=(Xo=Object.getPrototypeOf,Qo=Object,function(t){return Xo(Qo(t))}),ti=Object.prototype;function ei(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||ti)}var ri="[object Arguments]";function ni(t){return Nn(t)&&uo(t)==ri}var oi=Object.prototype,ii=oi.hasOwnProperty,si=oi.propertyIsEnumerable,ui=ni(function(){return arguments}())?ni:function(t){return Nn(t)&&ii.call(t,"callee")&&!si.call(t,"callee")},ai=Array.isArray,ci=9007199254740991;function hi(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=ci}function fi(t){return null!=t&&hi(t.length)&&!po(t)}var li="object"==typeof exports&&exports&&!exports.nodeType&&exports,pi=li&&"object"==typeof module&&module&&!module.nodeType&&module,di=pi&&pi.exports===li?Xn.Buffer:void 0,vi=(di?di.isBuffer:void 0)||function(){return!1},gi="[object Object]",yi=Function.prototype,mi=Object.prototype,_i=yi.toString,bi=mi.hasOwnProperty,wi=_i.call(Object);var Oi={};Oi["[object Float32Array]"]=Oi["[object Float64Array]"]=Oi["[object Int8Array]"]=Oi["[object Int16Array]"]=Oi["[object Int32Array]"]=Oi["[object Uint8Array]"]=Oi["[object Uint8ClampedArray]"]=Oi["[object Uint16Array]"]=Oi["[object Uint32Array]"]=!0,Oi["[object Arguments]"]=Oi["[object Array]"]=Oi["[object ArrayBuffer]"]=Oi["[object Boolean]"]=Oi["[object DataView]"]=Oi["[object Date]"]=Oi["[object Error]"]=Oi["[object Function]"]=Oi["[object Map]"]=Oi["[object Number]"]=Oi["[object Object]"]=Oi["[object RegExp]"]=Oi["[object Set]"]=Oi["[object String]"]=Oi["[object WeakMap]"]=!1;var ji="object"==typeof exports&&exports&&!exports.nodeType&&exports,Si=ji&&"object"==typeof module&&module&&!module.nodeType&&module,Ei=Si&&Si.exports===ji&&Kn.process,Pi=function(){try{var t=Si&&Si.require&&Si.require("util").types;return t||Ei&&Ei.binding&&Ei.binding("util")}catch(t){}}(),Ai=Pi&&Pi.isTypedArray,xi=Ai?function(t){return function(e){return t(e)}}(Ai):function(t){return Nn(t)&&hi(t.length)&&!!Oi[uo(t)]};function Ti(t,e){if("__proto__"!=e)return t[e]}var Ri=Object.prototype.hasOwnProperty;function ki(t,e,r){var n=t[e];Ri.call(t,e)&&Bn(n,r)&&(void 0!==r||e in t)||zo(t,e,r)}var Ni=9007199254740991,Ii=/^(?:0|[1-9]\d*)$/;function Fi(t,e){var r=typeof t;return!!(e=null==e?Ni:e)&&("number"==r||"symbol"!=r&&Ii.test(t))&&t>-1&&t%1==0&&t<e}var Li=Object.prototype.hasOwnProperty;function Mi(t,e){var r=ai(t),n=!r&&ui(t),o=!r&&!n&&vi(t),i=!r&&!n&&!o&&xi(t),s=r||n||o||i,u=s?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],a=u.length;for(var c in t)!e&&!Li.call(t,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Fi(c,a))||u.push(c);return u}var Ci=Object.prototype.hasOwnProperty;function $i(t){if(!ao(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=ei(t),r=[];for(var n in t)("constructor"!=n||!e&&Ci.call(t,n))&&r.push(n);return r}function zi(t){return fi(t)?Mi(t,!0):$i(t)}function qi(t){return function(t,e,r,n){var o=!r;r||(r={});for(var i=-1,s=e.length;++i<s;){var u=e[i],a=n?n(r[u],t[u],u,r,t):void 0;void 0===a&&(a=t[u]),o?zo(r,u,a):ki(r,u,a)}return r}(t,zi(t))}function Hi(t,e,r,n,o,i,s){var u=Ti(t,r),a=Ti(e,r),c=s.get(a);if(c)qo(t,r,c);else{var h,f=i?i(u,a,r+"",t,e,s):void 0,l=void 0===f;if(l){var p=ai(a),d=!p&&vi(a),v=!p&&!d&&xi(a);f=a,p||d||v?ai(u)?f=u:Nn(h=u)&&fi(h)?f=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}(u):d?(l=!1,f=function(t,e){if(e)return t.slice();var r=t.length,n=Go?Go(r):new t.constructor(r);return t.copy(n),n}(a,!0)):v?(l=!1,f=Vo(a,!0)):f=[]:function(t){if(!Nn(t)||uo(t)!=gi)return!1;var e=Zo(t);if(null===e)return!0;var r=bi.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&_i.call(r)==wi}(a)||ui(a)?(f=u,ui(u)?f=qi(u):ao(u)&&!po(u)||(f=function(t){return"function"!=typeof t.constructor||ei(t)?{}:Yo(Zo(t))}(a))):l=!1}l&&(s.set(a,f),o(f,a,n,i,s),s.delete(a)),qo(t,r,f)}}function Di(t,e,r,n,o){t!==e&&Do(e,function(i,s){if(ao(i))o||(o=new Co),Hi(t,e,s,r,Di,n,o);else{var u=n?n(Ti(t,s),i,s+"",t,e,o):void 0;void 0===u&&(u=i),qo(t,s,u)}},zi)}function Wi(t){return t}var Ui=Math.max;var Bi=$o?function(t,e){return $o(t,"toString",{configurable:!0,enumerable:!1,value:(r=e,function(){return r}),writable:!0});var r}:Wi,Gi=800,Ji=16,Vi=Date.now;var Ki=function(t){var e=0,r=0;return function(){var n=Vi(),o=Ji-(n-r);if(r=n,o>0){if(++e>=Gi)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Bi);function Yi(t,e){return Ki(function(t,e,r){return e=Ui(void 0===e?t.length-1:e,0),function(){for(var n=arguments,o=-1,i=Ui(n.length-e,0),s=Array(i);++o<i;)s[o]=n[e+o];o=-1;for(var u=Array(e+1);++o<e;)u[o]=n[o];return u[e]=r(s),function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}(t,this,u)}}(t,e,Wi),t+"")}var Xi,Qi=(Xi=function(t,e,r,n){Di(t,e,r,n)},Yi(function(t,e){var r=-1,n=e.length,o=n>1?e[n-1]:void 0,i=n>2?e[2]:void 0;for(o=Xi.length>3&&"function"==typeof o?(n--,o):void 0,i&&function(t,e,r){if(!ao(r))return!1;var n=typeof e;return!!("number"==n?fi(r)&&Fi(e,r.length):"string"==n&&e in r)&&Bn(r[e],t)}(e[0],e[1],i)&&(o=n<3?void 0:o,n=1),t=Object(t);++r<n;){var s=e[r];s&&Xi(t,s,r,o)}return t}));function Zi(t,e,r){if(Un(t)||["context"].includes(r))return e}function ts(...t){return Qi({},...t,Zi)}function es(t){e(`Invalid recording name provided. Expected string, received: "${typeof t}".`,"string"==typeof t),e("Invalid recording name provided. Received An empty or blank string.",t.trim().length>0)}function rs(t){e(`Invalid config provided. Expected object, received: "${typeof t}".`,Nn(t)&&!Un(t)),["mode","adapters","adapterOptions","persister","persisterOptions"].forEach(r=>e(`Invalid configuration option provided. The "${r}" option cannot be overridden using the server configuration API.`,!(r in t)))}function ns(t){e(`Invalid number provided. Expected number, received: "${typeof t}".`,"number"==typeof t),e(`Invalid number provided. The number must be greater than 0, received "${typeof t}".`,t>0)}const{freeze:os}=Object,{parse:is}=JSON;class ss{constructor(){this.headers=new Mn}getHeader(t){return this.headers[t]}setHeader(t,e){return this.headers[t]=e,this}setHeaders(t={}){for(const e in t)this.setHeader(e,t[e]);return this}removeHeader(t){return this.setHeader(t,null),this}removeHeaders(t=[]){for(const e of t)this.removeHeader(e);return this}hasHeader(t){return!!this.getHeader(t)}type(t){return this.setHeader("Content-Type",t)}send(t){let e=t;switch(typeof e){case"string":this.hasHeader("Content-Type")||this.type("text/html");break;case"boolean":case"number":case"object":if(null!==e)return this.json(e);e=""}if("string"==typeof e){const t=this.getHeader("Content-Type");t&&!t.includes("charset")&&this.type(`${t}; charset=utf-8`)}return this.body=e,this}json(t){return this.hasHeader("Content-Type")||this.type("application/json"),this.send(l(t))}jsonBody(){return is(this.body)}end(){return os(this),os(this.headers),this}}var us="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff",as="["+us+"]",cs=RegExp("^"+as+as+"*"),hs=RegExp(as+as+"*$"),fs=function(t,e,r){var n={},o=T(function(){return!!us[t]()||"​…"!="​…"[t]()}),i=n[t]=o?e(ls):us[t];r&&(n[r]=i),U(U.P+U.F*o,"String",n)},ls=fs.trim=function(t,e){return t=String(w(t)),1&e&&(t=t.replace(cs,"")),2&e&&(t=t.replace(hs,"")),t},ps=fs,ds=j.parseInt,vs=ps.trim,gs=/^[-+]?0[xX]/,ys=8!==ds(us+"08")||22!==ds(us+"0x16")?function(t,e){var r=vs(String(t),3);return ds(r,e>>>0||(gs.test(r)?16:10))}:ds;U(U.G+U.F*(parseInt!=ys),{parseInt:ys});var ms=S.parseInt;const _s=200;class bs extends ss{constructor(t,e,r,n=!1){super(),this.status(t||_s),this.setHeaders(e),this.body=r,this.isBinary=n}get ok(){return this.statusCode&&this.statusCode>=200&&this.statusCode<300}get statusText(){return s[this.statusCode]||s[_s]}status(t){const r=ms(t,10);return e(`[Response] Invalid status code: ${r}`,r>=100&&r<600),this.statusCode=r,this}sendStatus(t){return this.status(t),this.type("text/plain"),this.send(this.statusText)}}var ws=function(t,e){var r=(S.Object||{})[t]||Object[t],n={};n[t]=e(r),U(U.S+U.F*T(function(){r(1)}),"Object",n)},Os=Br.f;ws("getOwnPropertyDescriptor",function(){return function(t,e){return Os(Y(t),e)}});var js=S.Object,Ss=function(t,e){return js.getOwnPropertyDescriptor(t,e)},Es=S.Object.getOwnPropertySymbols;ws("keys",function(){return function(t){return ft(Pt(t))}});var Ps=S.Object.keys;U(U.S+U.F*!R,"Object",{defineProperty:C.f});var As=S.Object,xs=function(t,e,r){return As.defineProperty(t,e,r)};var Ts=function(t,e,r){return e in t?xs(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t};var Rs=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Ps(r);"function"==typeof Es&&(n=n.concat(Es(r).filter(function(t){return Ss(r,t).enumerable}))),n.forEach(function(e){Ts(t,e,r[e])})}return t};mr("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return fr.def(sr(this,"Set"),t=0===t?0:t,t)}},fr);U(U.P+U.R,"Set",{toJSON:_r("Set")}),br("Set"),wr("Set");var ks=S.Set;function Ns(t,e,r){let n=0;return function(...o){return++n>=e&&r(),t(...o)}}U(U.S+U.F,"Object",{assign:Er});var Is=S.Object.assign;const Fs=Sn();class Ls{constructor(t,r){e(`Invalid type provided. Expected a non-empty string, received: "${typeof t}".`,t&&"string"==typeof t),xs(this,"type",{value:t}),Is(this,r||{}),this[Fs]=!1}stopPropagation(){this[Fs]=!0}get shouldStopPropagating(){return this[Fs]}}const Ms=Sn(),Cs=Sn();function $s(t,r){e(`Invalid event name provided. Expected string, received: "${typeof t}".`,"string"==typeof t),e(`Invalid event name provided: "${t}". Possible events: ${[...r].join(", ")}.`,r.has(t))}class zs{constructor(t={}){const{eventNames:r}=t;e("An array of supported events must be provided via the `eventNames` option.",Un(r)&&r.length>0),this[Ms]=new Or,this[Cs]=new ks(r)}eventNames(){const t=[];return this[Ms].forEach((e,r)=>this.hasListeners(r)&&t.push(r)),t}on(t,r,n={}){$s(t,this[Cs]),function(t){e(`Invalid listener provided. Expected function, received: "${typeof t}".`,"function"==typeof t)}(r);const o=this[Ms],{times:i}=n;if(o.has(t)||o.set(t,new ks),i){ns(i);const e=Ns(r,i,()=>this.off(t,e));this.off(t,r),e.listener=r,r=e}return o.get(t).add(r),this}once(t,e,r={}){return this.on(t,e,Rs({},r,{times:1})),this}off(t,e){$s(t,this[Cs]);const r=this[Ms];return this.hasListeners(t)&&("function"==typeof e?(r.get(t).delete(e),this.listeners(t).forEach(n=>{n.listener===e&&r.get(t).delete(n)})):r.get(t).clear(t)),this}listeners(t){return $s(t,this[Cs]),this.hasListeners(t)?[...this[Ms].get(t)]:[]}hasListeners(t){$s(t,this[Cs]);const e=this[Ms];return e.has(t)&&e.get(t).size>0}async emit(t,...e){$s(t,this[Cs]);const r=new Ls(t);for(const n of this.listeners(t))if(await n(...e,r),r.shouldStopPropagating)return!1;return!0}async emitParallel(t,...e){$s(t,this[Cs]);const r=new Ls(t);return await tr.all(this.listeners(t).map(t=>t(...e,r))),!r.shouldStopPropagating}emitSync(t,...r){$s(t,this[Cs]);const n=new Ls(t);for(const o of this.listeners(t)){const i=o(...r,n);if(e(`Attempted to emit a synchronous event "${t}" but an asynchronous listener was called.`,!(Nn(i)&&"function"==typeof i.then)),n.shouldStopPropagating)return!1}return!0}}const qs=Sn(),Hs=Sn();function Ds(t){t[qs]=!1,t[Hs]=!1}class Ws extends Ls{constructor(){super("intercept"),Ds(this)}abort(){Ds(this),this[qs]=!0}passthrough(){Ds(this),this[Hs]=!0}get shouldAbort(){return this[qs]}get shouldPassthrough(){return this[Hs]}get shouldIntercept(){return!this.shouldAbort&&!this.shouldPassthrough}}const{keys:Us,freeze:Bs}=Object,Gs=Sn(),Js=Sn(),Vs=Sn(),Ks=Sn(),Ys=["identify"];class Xs extends ss{constructor(t,r){super(),e("Url is required.",r.url),e("Method is required.",r.method&&"string"==typeof r.method),this.didRespond=!1,this.aborted=!1,this.url=r.url,this.method=r.method.toUpperCase(),this.body=r.body,this.setHeaders(r.headers),this.recordingName=t.recordingName,this.recordingId=t.recordingId,this.requestArguments=Bs(r.requestArguments),this.promise=function(){let t,e;const r=new tr((r,n)=>{t=r,e=n});return r.catch(()=>{}),r.resolve=t,r.reject=e,r}(),this[Js]=t,this[Ks]=new zs({eventNames:Ys}),this.action=null,this._interceptor=new Ws,this[Gs]=t.server.lookup(this.method,this.url),this[Gs].applyFiltersWithArgs(this),this._configure(this[Gs].config());const n=this[Gs].recordingName();n&&this._overrideRecordingName(n)}get url(){return this[Vs].toString()}set url(t){this[Vs]=In(`${t}`,!0)}get absoluteUrl(){const{url:t}=this;return p(t)?t:new i(t).href}get protocol(){return this[Vs].protocol}get hostname(){return this[Vs].hostname}get port(){return this[Vs].port}get origin(){return this[Vs].origin}get pathname(){return this[Vs].pathname}get query(){return this[Vs].query}set query(t){return this[Vs].set("query",t)}get hash(){return this[Vs].hash}set hash(t){return this[Vs].set("hash",t)}get shouldPassthrough(){return this[Gs].shouldPassthrough()}get shouldIntercept(){return this[Gs].shouldIntercept()}on(t,e){return this[Ks].on(t,e),this}once(t,e){return this[Ks].once(t,e),this}off(t,e){return this[Ks].off(t,e),this}async init(){await this._emit("request"),this.response=new bs,this.didRespond=!1,await this._identify(),this.timestamp=u()}async respond(t){const{statusCode:r,headers:n,body:o,isBinary:i=!1}=t||{};e("Cannot respond to a request that already has a response.",!this.didRespond),this.aborted||(this.response.timestamp=u(),this.response.status(r),this.response.setHeaders(n),this.response.body=o,this.response.isBinary=i,await this._emit("beforeResponse",this.response),this.response.end(),this.responseTime=new Date(this.response.timestamp).getTime()-new Date(this.timestamp).getTime(),this.didRespond=!0,this.end(),await this._emit("response",this.response))}abort(){this.aborted=!0}_overrideRecordingName(t){es(t),this.recordingName=t,this.recordingId=Wn(t)}_configure(t){rs(t),this.config=ts(this[Js].config,this.config||{},t)}_intercept(){return this[Gs].intercept(this,this.response,...arguments)}_emit(t,...e){return this[Gs].emit(t,this,...e)}async _identify(){const t=this[Js],{_requests:e}=t,{matchRequestsBy:r}=this.config;this.identifiers={},Us(Hn).forEach(t=>{this[t]&&r[t]&&(this.identifiers[t]=Hn[t](this[t],r[t],this))}),await this[Ks].emit("identify",this),Bs(this.identifiers),this.id=f(l(this.identifiers)),this.order=!r.order||this.shouldPassthrough||this.shouldIntercept?0:e.slice(0,e.indexOf(this)).filter(t=>t.id===this.id&&t.recordingId===this.recordingId).length}}function Qs(){if(!arguments.length)return[];var t=arguments[0];return ai(t)?t:[t]}U(U.S,"Reflect",{get:function t(e,r){var n,o,i=arguments.length<3?e:arguments[2];return x(e)===i?e[r]:(n=Br.f(e,r))?H(n,"value")?n.value:void 0!==n.get?n.get.call(i):void 0:A(o=Tt(e))?t(o,r,i):void 0}});var Zs=S.Reflect.get;const tu=Sn();function eu(t,{params:e}){return new Proxy(t,{set:(t,e,r)=>(t[e]=r,!0),get:(t,r)=>"params"===r?Rs({},e):Zs(t,r)})}class ru{constructor(t,e){const r=t&&t[0];this.params={},this.queryParams={},this.handlers=[],this.middleware=e||[],r&&(this.handlers=r.handler,this.params=Rs({},r.params),this.queryParams=t.queryParams),this[tu]=this._orderedHandlers()}shouldPassthrough(){return Boolean(this._valueFor("passthrough"))}shouldIntercept(){return Boolean(this._valueFor("intercept"))}recordingName(){return this._valueFor("recordingName")||null}config(){return ts(...this[tu].map(({handler:t})=>t.get("config")))}applyFiltersWithArgs(t,...e){this[tu]=this[tu].filter(({route:r,handler:n})=>[...n.get("filters")].every(n=>n(eu(t,r),...e)))}async intercept(t,e,r){for(const n of this[tu]){const{route:o,handler:i}=n;if(!r.shouldIntercept||r.shouldStopPropagating)return;i.has("intercept")&&await i.get("intercept")(eu(t,o),e,r)}}async emit(t,e,...r){for(const n of this[tu]){const{route:o,handler:i}=n;if(!await i._eventEmitter.emit(t,eu(e,o),...r))return}}_orderedHandlers(){return[...this.middleware,this].reduce((t,e)=>(t.push(...e.handlers.map(t=>({route:e,handler:t}))),t),[])}_valueFor(t){let e;for(const r of this[tu]){const{handler:n}=r;n.has(t)&&(e=n.get(t))}return e}}class nu extends Or{constructor(){super(),this.set("config",{}),this.set("defaultOptions",{}),this.set("filters",new ks),this._eventEmitter=new zs({eventNames:["error","abort","request","beforeReplay","beforePersist","beforeResponse","response"]})}on(t,e,r={}){return this._eventEmitter.on(t,e,Rs({},this.get("defaultOptions"),r)),this}once(t,e){return this._eventEmitter.once(t,e),this}off(t,e){return this._eventEmitter.off(t,e),this}passthrough(t=!0){return this.set("passthrough",Boolean(t)),this.get("passthrough")&&this.delete("intercept"),this}intercept(t,r={}){return e(`Invalid intercept handler provided. Expected function, received: "${typeof t}".`,"function"==typeof t),"times"in(r=Rs({},this.get("defaultOptions"),r))&&(ns(r.times),t=Ns(t,r.times,()=>this.delete("intercept"))),this.set("intercept",t),this.passthrough(!1),this}recordingName(t){return t&&es(t),this.set("recordingName",t),this}configure(t){return rs(t),this.set("config",t),this}filter(t){return e(`Invalid filter callback provided. Expected function, received: "${typeof t}".`,"function"==typeof t),this.get("filters").add(t),this}times(t){return t||"number"==typeof t?(ns(t),this.get("defaultOptions").times=t):delete this.get("defaultOptions").times,this}}const ou="__GLOBAL__";class iu{constructor({host:t,paths:e,global:r,handler:n}){this.global=Boolean(r),this.handler=n,this.host=t,this.paths=this.global?[ou]:e,this._routeRecognizer=new g,this.paths.forEach(t=>this._routeRecognizer.add([{path:t,handler:[n]}]))}match(t,e){if(this.global)return new ru(this._routeRecognizer.recognize(ou));if(this.host===t){const t=this._routeRecognizer.recognize(e);return t&&new ru(t)}}}const su=Sn(),uu=Sn(),au=Sn(),cu=Sn(),hu=Sn(),fu={SLASH:"/",STAR:"*",COLON:":"},{keys:lu}=Object;function pu(t){const e=new i(t);return{host:e.host?e.origin:fu.SLASH,path:e.pathname||fu.SLASH}}class du{constructor(){this[su]="",this[au]={},this[uu]=[],this[cu]=[]}host(t,r){const n=this[su];e("[Server] A host cannot be specified within another host.",!n),this[su]=t,r(this),this[su]=n}namespace(t,e){const r=this[uu];this[uu]=[...r,t],e(this),this[uu]=r}timeout(){return r(...arguments)}get(){return this._register("GET",...arguments)}put(){return this._register("PUT",...arguments)}post(){return this._register("POST",...arguments)}delete(){return this._register("DELETE",...arguments)}patch(){return this._register("PATCH",...arguments)}merge(){return this._register("MERGE",...arguments)}head(){return this._register("HEAD",...arguments)}options(){return this._register("OPTIONS",...arguments)}any(){return this._registerMiddleware(...arguments)}lookup(t,e){return new ru(this._recognize(t,e),this._lookupMiddleware(e))}_lookupMiddleware(t){const{host:e,path:r}=pu(t);return this[cu].map(t=>t.match(e,r)).filter(Boolean)}_register(t,e){const r=new nu;return Qs(e).forEach(e=>{const{host:n,path:o}=pu(this._buildUrl(e)),i=this._registryForHost(n),s=this._nameForPath(o),u=i[t.toUpperCase()];u[hu].has(s)?u[hu].get(s).push(r):(u[hu].set(s,[r]),u.add([{path:o,handler:u[hu].get(s)}]))}),r}_registerMiddleware(t){const e=new nu,r={};return Qs(t).forEach(t=>{if(t&&t!==fu.STAR||this[su]||0!==this[uu].length){const{host:e,path:n}=pu(this._buildUrl(t));r[e]=r[e]||[],r[e].push(n)}else this[cu].push(new iu({global:!0,handler:e}))}),lu(r).forEach(t=>{this[cu].push(new iu({host:t,paths:r[t],handler:e}))}),e}_recognize(t,e){const{host:r,path:n}=pu(e);return this._registryForHost(r)[t.toUpperCase()].recognize(n)}_buildUrl(t){return a(this[su],...this[uu],t)}_nameForPath(t=""){return t.split(fu.SLASH).map(t=>{switch(t.charAt(0)){case fu.COLON:return fu.COLON;case fu.STAR:return fu.STAR;default:return t}}).join(fu.SLASH).replace(/\/$/,"")||fu.SLASH}_registryForHost(t){return this[au][t]||(this[au][t]=c.reduce((t,e)=>(t[e]=new g,t[e][hu]=new Or,t),{})),this[au][t]}}const vu=Sn(),gu=Sn(),yu=Sn(),mu=new Fr,_u=new zs({eventNames:["register","create","stop"]});class bu{constructor(t,e){this.recordingName=t,this.logger=new An(this),this.server=new du,this.config={},this.container=new Tn,_u.emitSync("register",this.container),this.adapters=new Or,this.persister=null,this._requests=[],this.logger.connect(),_u.emitSync("create",this),this.configure(e)}static get VERSION(){return En}get recordingName(){return this[vu]}set recordingName(t){es(t),this[vu]=t,this[gu]=Wn(t)}get recordingId(){return this[gu]}get mode(){return this.config.mode}set mode(t){const r=or(n);e(`Invalid mode provided: "${t}". Possible modes: ${r.join(", ")}.`,r.includes(t)),this.config.mode=t}static on(t,e){return _u.on(t,e),this}static once(t,e){return _u.once(t,e),this}static off(t,e){return _u.off(t,e),this}static register(t){return mu.has(t)||mu.set(t,e=>e.register(t)),this.on("register",mu.get(t)),this}static unregister(t){return mu.has(t)&&this.off("register",mu.get(t)),this}configure(t={}){const{container:r}=this;e("Cannot call `configure` once requests have been handled.",0===this._requests.length),e("Cannot call `configure` on an instance of Polly that is not running.",this.mode!==n.STOPPED),this.disconnect(),this.config=ts(kn,this.config,t),this.config.adapters.forEach(t=>this.connectTo(t));let{persister:o}=this.config;o&&("function"==typeof o&&(r.register(o),o=o.id),e(`Persister matching the name \`${o}\` was not registered.`,r.has(`persister:${o}`)),this.persister=new(r.lookup(`persister:${o}`))(this))}record(){this.mode=n.RECORD}replay(){this.mode=n.REPLAY}passthrough(){this.mode=n.PASSTHROUGH}pause(){this[yu]=[...this.adapters.keys()],this.disconnect()}play(){this[yu]&&(this[yu].forEach(t=>this.connectTo(t)),delete this[yu])}async stop(){this.mode!==n.STOPPED&&(this.config.flushRequestsOnStop&&await this.flush(),this.disconnect(),this.logger.disconnect(),await(this.persister&&this.persister.persist()),this.mode=n.STOPPED,await _u.emit("stop",this))}async flush(){const t=()=>{};await tr.all(this._requests.map(e=>tr.resolve(e.promise).then(t,t)))}connectTo(t){const{container:r,adapters:n}=this;let o=t;"function"==typeof t&&(r.register(t),o=t.id),e(`Adapter matching the name \`${o}\` was not registered.`,r.has(`adapter:${o}`)),this.disconnectFrom(o);const i=new(r.lookup(`adapter:${o}`))(this);i.connect(),n.set(o,i)}disconnectFrom(t){const{adapters:e}=this;let r=t;"function"==typeof t&&(r=t.id),e.has(r)&&(e.get(r).disconnect(),e.delete(r))}disconnect(){for(const t of this.adapters.keys())this.disconnectFrom(t)}registerRequest(t={}){const e=new Xs(this,t);return this._requests.push(e),e}}const{defineProperty:wu}=Object;function Ou(t,e,r){wu(t,"polly",{writable:!0,enumerable:!0,configurable:!0,value:new bu(e,r)})}async function ju(t,e){await t.polly.stop(),wu(t,"polly",{enumerable:!0,configurable:!0,get(){throw new h("You are trying to access an instance of Polly that is no longer available.\n"+`See: https://netflix.github.io/pollyjs/#/test-frameworks/${e}?id=test-hook-ordering`)}})}function Su(t,e={}){Su.beforeEach(t,e),Su.afterEach(t)}function Eu(t={},e=global){Eu.beforeEach(t,e),Eu.afterEach(e)}Su.beforeEach=function(t,e={}){t.beforeEach(function(){return Ou(this,function(t){return t.test.testReport.fullName.join("/")}(...arguments),e)})},Su.afterEach=function(t){t.afterEach(function(){return ju(this,"qunit")})},Eu.beforeEach=function(t,e=global){e.beforeEach(function(){return Ou(this,function(t){const{currentTest:e}=t,r=[e.title];let n=e.parent;for(;n&&n.title;)r.push(n.title),n=n.parent;return r.reverse().join("/")}(this),t)})},Eu.afterEach=function(t=global){t.afterEach(function(){return ju(this,"mocha")})};export{bu as Polly,Rn as Timing,Eu as setupMocha,Su as setupQunit};
//# sourceMappingURL=pollyjs-core.min.js.map
{
"name": "@pollyjs/core",
"version": "4.3.0",
"version": "5.0.0",
"description": "Record, replay, and stub HTTP Interactions",

@@ -45,3 +45,3 @@ "main": "dist/cjs/pollyjs-core.js",

"dependencies": {
"@pollyjs/utils": "^4.3.0",
"@pollyjs/utils": "^5.0.0",
"@sindresorhus/fnv1a": "^1.2.0",

@@ -56,7 +56,7 @@ "blueimp-md5": "^2.10.0",

"devDependencies": {
"@pollyjs/adapter": "^4.3.0",
"@pollyjs/persister": "^4.3.0",
"@pollyjs/adapter": "^5.0.0",
"@pollyjs/persister": "^5.0.0",
"rollup": "^1.14.6"
},
"gitHead": "52e32182edf0e2e5e81b530bdad814387d4f9c17"
"gitHead": "97b50be2d94ad6e4cf9b74ca1483212a78c5bafe"
}

@@ -17,3 +17,3 @@ <p align="center">

Keeping fixtures and factories in parity with your APIs can be a time consuming process.
Polly alleviates this by recording and maintaining actual server responses without foregoing flexibility.
Polly alleviates this process by recording and maintaining actual server responses while also staying flexible.

@@ -52,3 +52,3 @@ - Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests.

Lets take a look at what an example test case would look like using Polly.
Let's take a look at what an example test case would look like using Polly.

@@ -55,0 +55,0 @@ ```js

@@ -1,5 +0,5 @@

import { assert, getFactoryId } from '@pollyjs/utils';
import { assert } from '@pollyjs/utils';
function keyFor(Factory) {
return `${Factory.type}:${getFactoryId(Factory)}`;
return `${Factory.type}:${Factory.id}`;
}

@@ -24,3 +24,3 @@

const { type } = Factory;
const name = getFactoryId(Factory);
const name = Factory.id;

@@ -27,0 +27,0 @@ assert(

@@ -268,3 +268,3 @@ import md5 from 'blueimp-md5';

// Order is calculated on other requests with the same id
// Order is calculated on other requests with the same id and recording id
// Only requests before this current one are taken into account.

@@ -275,5 +275,6 @@ this.order =

.slice(0, requests.indexOf(this))
.filter(r => r.id === this.id).length
.filter(r => r.id === this.id && r.recordingId === this.recordingId)
.length
: 0;
}
}

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

import { MODES, getFactoryId, assert } from '@pollyjs/utils';
import { MODES, assert } from '@pollyjs/utils';

@@ -173,3 +173,3 @@ import { version } from '../package.json';

container.register(persister);
persister = getFactoryId(persister);
persister = persister.id;
}

@@ -264,9 +264,9 @@

*/
connectTo(idOrFactoryIdGetter) {
connectTo(idOrAdapter) {
const { container, adapters } = this;
let adapterId = idOrFactoryIdGetter;
let adapterId = idOrAdapter;
if (typeof idOrFactoryIdGetter === 'function') {
container.register(idOrFactoryIdGetter);
adapterId = getFactoryId(idOrFactoryIdGetter);
if (typeof idOrAdapter === 'function') {
container.register(idOrAdapter);
adapterId = idOrAdapter.id;
}

@@ -288,12 +288,12 @@

/**
* @param {String|Function} idOrFactoryIdGetter
* @param {String|Function} idOrAdapter
* @public
* @memberof Polly
*/
disconnectFrom(idOrFactoryIdGetter) {
disconnectFrom(idOrAdapter) {
const { adapters } = this;
let adapterId = idOrFactoryIdGetter;
let adapterId = idOrAdapter;
if (typeof idOrFactoryIdGetter === 'function') {
adapterId = getFactoryId(idOrFactoryIdGetter);
if (typeof idOrAdapter === 'function') {
adapterId = idOrAdapter.id;
}

@@ -300,0 +300,0 @@

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 too big to display

Sorry, the diff of this file is not supported yet

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

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 too big to display

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