@auth0/auth0-spa-js 1.22.1 → 1.22.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).createAuth0Client=t()}(this,(function(){"use strict";var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};function t(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var n=function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};function r(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function o(e,t,n,r){return new(n||(n=Promise))((function(o,i){function c(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(c,a)}s((r=r.apply(e,t||[])).next())}))}function i(e,t){var n,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=c.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=t.call(e,c)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function c(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)c.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return c}function a(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function u(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function l(e,t){return e(t={exports:{}},t.exports),t.exports}var f,d,h=function(e){return e&&e.Math==Math&&e},p=h("object"==typeof globalThis&&globalThis)||h("object"==typeof window&&window)||h("object"==typeof self&&self)||h("object"==typeof s&&s)||function(){return this}()||Function("return this")(),y=function(e){try{return!!e()}catch(e){return!0}},v=!y((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),m=!y((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),b=Function.prototype.call,g=m?b.bind(b):function(){return b.apply(b,arguments)},w={}.propertyIsEnumerable,S=Object.getOwnPropertyDescriptor,k=S&&!w.call({1:2},1)?function(e){var t=S(this,e);return!!t&&t.enumerable}:w,_={f:k},I=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},O=Function.prototype,x=O.bind,T=O.call,C=m&&x.bind(T,T),j=m?function(e){return e&&C(e)}:function(e){return e&&function(){return T.apply(e,arguments)}},R=j({}.toString),E=j("".slice),L=function(e){return E(R(e),8,-1)},W=p.Object,Z=j("".split),A=y((function(){return!W("z").propertyIsEnumerable(0)}))?function(e){return"String"==L(e)?Z(e,""):W(e)}:W,G=p.TypeError,P=function(e){if(null==e)throw G("Can't call method on "+e);return e},X=function(e){return A(P(e))},F=function(e){return"function"==typeof e},K=function(e){return"object"==typeof e?null!==e:F(e)},N=function(e){return F(e)?e:void 0},U=function(e,t){return arguments.length<2?N(p[e]):p[e]&&p[e][t]},Y=j({}.isPrototypeOf),H=U("navigator","userAgent")||"",D=p.process,J=p.Deno,V=D&&D.versions||J&&J.version,z=V&&V.v8;z&&(d=(f=z.split("."))[0]>0&&f[0]<4?1:+(f[0]+f[1])),!d&&H&&(!(f=H.match(/Edge\/(\d+)/))||f[1]>=74)&&(f=H.match(/Chrome\/(\d+)/))&&(d=+f[1]);var M=d,B=!!Object.getOwnPropertySymbols&&!y((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&M&&M<41})),Q=B&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,q=p.Object,$=Q?function(e){return"symbol"==typeof e}:function(e){var t=U("Symbol");return F(t)&&Y(t.prototype,q(e))},ee=p.String,te=function(e){try{return ee(e)}catch(e){return"Object"}},ne=p.TypeError,re=function(e){if(F(e))return e;throw ne(te(e)+" is not a function")},oe=function(e,t){var n=e[t];return null==n?void 0:re(n)},ie=p.TypeError,ce=Object.defineProperty,ae=function(e,t){try{ce(p,e,{value:t,configurable:!0,writable:!0})}catch(n){p[e]=t}return t},se="__core-js_shared__",ue=p[se]||ae(se,{}),le=l((function(e){(e.exports=function(e,t){return ue[e]||(ue[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.22.6",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.6/LICENSE",source:"https://github.com/zloirock/core-js"})})),fe=p.Object,de=function(e){return fe(P(e))},he=j({}.hasOwnProperty),pe=Object.hasOwn||function(e,t){return he(de(e),t)},ye=0,ve=Math.random(),me=j(1..toString),be=function(e){return"Symbol("+(void 0===e?"":e)+")_"+me(++ye+ve,36)},ge=le("wks"),we=p.Symbol,Se=we&&we.for,ke=Q?we:we&&we.withoutSetter||be,_e=function(e){if(!pe(ge,e)||!B&&"string"!=typeof ge[e]){var t="Symbol."+e;B&&pe(we,e)?ge[e]=we[e]:ge[e]=Q&&Se?Se(t):ke(t)}return ge[e]},Ie=p.TypeError,Oe=_e("toPrimitive"),xe=function(e,t){if(!K(e)||$(e))return e;var n,r=oe(e,Oe);if(r){if(void 0===t&&(t="default"),n=g(r,e,t),!K(n)||$(n))return n;throw Ie("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var n,r;if("string"===t&&F(n=e.toString)&&!K(r=g(n,e)))return r;if(F(n=e.valueOf)&&!K(r=g(n,e)))return r;if("string"!==t&&F(n=e.toString)&&!K(r=g(n,e)))return r;throw ie("Can't convert object to primitive value")}(e,t)},Te=function(e){var t=xe(e,"string");return $(t)?t:t+""},Ce=p.document,je=K(Ce)&&K(Ce.createElement),Re=function(e){return je?Ce.createElement(e):{}},Ee=!v&&!y((function(){return 7!=Object.defineProperty(Re("div"),"a",{get:function(){return 7}}).a})),Le=Object.getOwnPropertyDescriptor,We={f:v?Le:function(e,t){if(e=X(e),t=Te(t),Ee)try{return Le(e,t)}catch(e){}if(pe(e,t))return I(!g(_.f,e,t),e[t])}},Ze=v&&y((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ae=p.String,Ge=p.TypeError,Pe=function(e){if(K(e))return e;throw Ge(Ae(e)+" is not an object")},Xe=p.TypeError,Fe=Object.defineProperty,Ke=Object.getOwnPropertyDescriptor,Ne="enumerable",Ue="configurable",Ye="writable",He={f:v?Ze?function(e,t,n){if(Pe(e),t=Te(t),Pe(n),"function"==typeof e&&"prototype"===t&&"value"in n&&Ye in n&&!n.writable){var r=Ke(e,t);r&&r.writable&&(e[t]=n.value,n={configurable:Ue in n?n.configurable:r.configurable,enumerable:Ne in n?n.enumerable:r.enumerable,writable:!1})}return Fe(e,t,n)}:Fe:function(e,t,n){if(Pe(e),t=Te(t),Pe(n),Ee)try{return Fe(e,t,n)}catch(e){}if("get"in n||"set"in n)throw Xe("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},De=v?function(e,t,n){return He.f(e,t,I(1,n))}:function(e,t,n){return e[t]=n,e},Je=Function.prototype,Ve=v&&Object.getOwnPropertyDescriptor,ze=pe(Je,"name"),Me={EXISTS:ze,PROPER:ze&&"something"===function(){}.name,CONFIGURABLE:ze&&(!v||v&&Ve(Je,"name").configurable)},Be=j(Function.toString);F(ue.inspectSource)||(ue.inspectSource=function(e){return Be(e)});var Qe,qe,$e,et=ue.inspectSource,tt=p.WeakMap,nt=F(tt)&&/native code/.test(et(tt)),rt=le("keys"),ot=function(e){return rt[e]||(rt[e]=be(e))},it={},ct="Object already initialized",at=p.TypeError,st=p.WeakMap;if(nt||ue.state){var ut=ue.state||(ue.state=new st),lt=j(ut.get),ft=j(ut.has),dt=j(ut.set);Qe=function(e,t){if(ft(ut,e))throw new at(ct);return t.facade=e,dt(ut,e,t),t},qe=function(e){return lt(ut,e)||{}},$e=function(e){return ft(ut,e)}}else{var ht=ot("state");it[ht]=!0,Qe=function(e,t){if(pe(e,ht))throw new at(ct);return t.facade=e,De(e,ht,t),t},qe=function(e){return pe(e,ht)?e[ht]:{}},$e=function(e){return pe(e,ht)}}var pt={set:Qe,get:qe,has:$e,enforce:function(e){return $e(e)?qe(e):Qe(e,{})},getterFor:function(e){return function(t){var n;if(!K(t)||(n=qe(t)).type!==e)throw at("Incompatible receiver, "+e+" required");return n}}},yt=l((function(e){var t=Me.CONFIGURABLE,n=pt.enforce,r=pt.get,o=Object.defineProperty,i=v&&!y((function(){return 8!==o((function(){}),"length",{value:8}).length})),c=String(String).split("String"),a=e.exports=function(e,r,a){if("Symbol("===String(r).slice(0,7)&&(r="["+String(r).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),a&&a.getter&&(r="get "+r),a&&a.setter&&(r="set "+r),(!pe(e,"name")||t&&e.name!==r)&&o(e,"name",{value:r,configurable:!0}),i&&a&&pe(a,"arity")&&e.length!==a.arity&&o(e,"length",{value:a.arity}),a&&pe(a,"constructor")&&a.constructor){if(v)try{o(e,"prototype",{writable:!1})}catch(e){}}else e.prototype=void 0;var s=n(e);return pe(s,"source")||(s.source=c.join("string"==typeof r?r:"")),e};Function.prototype.toString=a((function(){return F(this)&&r(this).source||et(this)}),"toString")})),vt=function(e,t,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:t;return F(n)&&yt(n,i,r),r.global?o?e[t]=n:ae(t,n):(r.unsafe?e[t]&&(o=!0):delete e[t],o?e[t]=n:De(e,t,n)),e},mt=Math.ceil,bt=Math.floor,gt=Math.trunc||function(e){var t=+e;return(t>0?bt:mt)(t)},wt=function(e){var t=+e;return t!=t||0===t?0:gt(t)},St=Math.max,kt=Math.min,_t=function(e,t){var n=wt(e);return n<0?St(n+t,0):kt(n,t)},It=Math.min,Ot=function(e){return e>0?It(wt(e),9007199254740991):0},xt=function(e){return Ot(e.length)},Tt=function(e){return function(t,n,r){var o,i=X(t),c=xt(i),a=_t(r,c);if(e&&n!=n){for(;c>a;)if((o=i[a++])!=o)return!0}else for(;c>a;a++)if((e||a in i)&&i[a]===n)return e||a||0;return!e&&-1}},Ct={includes:Tt(!0),indexOf:Tt(!1)},jt=Ct.indexOf,Rt=j([].push),Et=function(e,t){var n,r=X(e),o=0,i=[];for(n in r)!pe(it,n)&&pe(r,n)&&Rt(i,n);for(;t.length>o;)pe(r,n=t[o++])&&(~jt(i,n)||Rt(i,n));return i},Lt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Wt=Lt.concat("length","prototype"),Zt={f:Object.getOwnPropertyNames||function(e){return Et(e,Wt)}},At={f:Object.getOwnPropertySymbols},Gt=j([].concat),Pt=U("Reflect","ownKeys")||function(e){var t=Zt.f(Pe(e)),n=At.f;return n?Gt(t,n(e)):t},Xt=function(e,t,n){for(var r=Pt(t),o=He.f,i=We.f,c=0;c<r.length;c++){var a=r[c];pe(e,a)||n&&pe(n,a)||o(e,a,i(t,a))}},Ft=/#|\.prototype\./,Kt=function(e,t){var n=Ut[Nt(e)];return n==Ht||n!=Yt&&(F(t)?y(t):!!t)},Nt=Kt.normalize=function(e){return String(e).replace(Ft,".").toLowerCase()},Ut=Kt.data={},Yt=Kt.NATIVE="N",Ht=Kt.POLYFILL="P",Dt=Kt,Jt=We.f,Vt=function(e,t){var n,r,o,i,c,a=e.target,s=e.global,u=e.stat;if(n=s?p:u?p[a]||ae(a,{}):(p[a]||{}).prototype)for(r in t){if(i=t[r],o=e.dontCallGetSet?(c=Jt(n,r))&&c.value:n[r],!Dt(s?r:a+(u?".":"#")+r,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;Xt(i,o)}(e.sham||o&&o.sham)&&De(i,"sham",!0),vt(n,r,i,e)}},zt={};zt[_e("toStringTag")]="z";var Mt,Bt="[object z]"===String(zt),Qt=_e("toStringTag"),qt=p.Object,$t="Arguments"==L(function(){return arguments}()),en=Bt?L:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=qt(e),Qt))?n:$t?L(t):"Object"==(r=L(t))&&F(t.callee)?"Arguments":r},tn=p.String,nn=function(e){if("Symbol"===en(e))throw TypeError("Cannot convert a Symbol value to a string");return tn(e)},rn=_e("match"),on=p.TypeError,cn=function(e){if(function(e){var t;return K(e)&&(void 0!==(t=e[rn])?!!t:"RegExp"==L(e))}(e))throw on("The method doesn't accept regular expressions");return e},an=_e("match"),sn=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[an]=!1,"/./"[e](t)}catch(e){}}return!1},un=We.f,ln=j("".startsWith),fn=j("".slice),dn=Math.min,hn=sn("startsWith"),pn=!(hn||(Mt=un(String.prototype,"startsWith"),!Mt||Mt.writable));Vt({target:"String",proto:!0,forced:!pn&&!hn},{startsWith:function(e){var t=nn(P(this));cn(e);var n=Ot(dn(arguments.length>1?arguments[1]:void 0,t.length)),r=nn(e);return ln?ln(t,r,n):fn(t,n,n+r.length)===r}});var yn=function(e,t){return j(p[e].prototype[t])};yn("String","startsWith");var vn=Array.isArray||function(e){return"Array"==L(e)},mn=function(e,t,n){var r=Te(t);r in e?He.f(e,r,I(0,n)):e[r]=n},bn=function(){},gn=[],wn=U("Reflect","construct"),Sn=/^\s*(?:class|function)\b/,kn=j(Sn.exec),_n=!Sn.exec(bn),In=function(e){if(!F(e))return!1;try{return wn(bn,gn,e),!0}catch(e){return!1}},On=function(e){if(!F(e))return!1;switch(en(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return _n||!!kn(Sn,et(e))}catch(e){return!0}};On.sham=!0;var xn,Tn=!wn||y((function(){var e;return In(In.call)||!In(Object)||!In((function(){e=!0}))||e}))?On:In,Cn=_e("species"),jn=p.Array,Rn=function(e,t){return new(function(e){var t;return vn(e)&&(t=e.constructor,(Tn(t)&&(t===jn||vn(t.prototype))||K(t)&&null===(t=t[Cn]))&&(t=void 0)),void 0===t?jn:t}(e))(0===t?0:t)},En=_e("species"),Ln=_e("isConcatSpreadable"),Wn=9007199254740991,Zn="Maximum allowed index exceeded",An=p.TypeError,Gn=M>=51||!y((function(){var e=[];return e[Ln]=!1,e.concat()[0]!==e})),Pn=(xn="concat",M>=51||!y((function(){var e=[];return(e.constructor={})[En]=function(){return{foo:1}},1!==e[xn](Boolean).foo}))),Xn=function(e){if(!K(e))return!1;var t=e[Ln];return void 0!==t?!!t:vn(e)};Vt({target:"Array",proto:!0,arity:1,forced:!Gn||!Pn},{concat:function(e){var t,n,r,o,i,c=de(this),a=Rn(c,0),s=0;for(t=-1,r=arguments.length;t<r;t++)if(Xn(i=-1===t?c:arguments[t])){if(s+(o=xt(i))>Wn)throw An(Zn);for(n=0;n<o;n++,s++)n in i&&mn(a,s,i[n])}else{if(s>=Wn)throw An(Zn);mn(a,s++,i)}return a.length=s,a}});var Fn=Bt?{}.toString:function(){return"[object "+en(this)+"]"};Bt||vt(Object.prototype,"toString",Fn,{unsafe:!0});var Kn,Nn=Object.keys||function(e){return Et(e,Lt)},Un=v&&!Ze?Object.defineProperties:function(e,t){Pe(e);for(var n,r=X(t),o=Nn(t),i=o.length,c=0;i>c;)He.f(e,n=o[c++],r[n]);return e},Yn={f:Un},Hn=U("document","documentElement"),Dn=ot("IE_PROTO"),Jn=function(){},Vn=function(e){return"<script>"+e+"</"+"script>"},zn=function(e){e.write(Vn("")),e.close();var t=e.parentWindow.Object;return e=null,t},Mn=function(){try{Kn=new ActiveXObject("htmlfile")}catch(e){}var e,t;Mn="undefined"!=typeof document?document.domain&&Kn?zn(Kn):((t=Re("iframe")).style.display="none",Hn.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Vn("document.F=Object")),e.close(),e.F):zn(Kn);for(var n=Lt.length;n--;)delete Mn.prototype[Lt[n]];return Mn()};it[Dn]=!0;var Bn=Object.create||function(e,t){var n;return null!==e?(Jn.prototype=Pe(e),n=new Jn,Jn.prototype=null,n[Dn]=e):n=Mn(),void 0===t?n:Yn.f(n,t)},Qn=p.Array,qn=Math.max,$n=Zt.f,er="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],tr=function(e){try{return $n(e)}catch(e){return function(e,t,n){for(var r=xt(e),o=_t(t,r),i=_t(void 0===n?r:n,r),c=Qn(qn(i-o,0)),a=0;o<i;o++,a++)mn(c,a,e[o]);return c.length=a,c}(er)}},nr={f:function(e){return er&&"Window"==L(e)?tr(e):$n(X(e))}},rr={f:_e},or=p,ir=He.f,cr=function(e){var t=or.Symbol||(or.Symbol={});pe(t,e)||ir(t,e,{value:rr.f(e)})},ar=function(){var e=U("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=_e("toPrimitive");t&&!t[r]&&vt(t,r,(function(e){return g(n,this)}),{arity:1})},sr=He.f,ur=_e("toStringTag"),lr=function(e,t,n){e&&!n&&(e=e.prototype),e&&!pe(e,ur)&&sr(e,ur,{configurable:!0,value:t})},fr=j(j.bind),dr=function(e,t){return re(e),void 0===t?e:m?fr(e,t):function(){return e.apply(t,arguments)}},hr=j([].push),pr=function(e){var t=1==e,n=2==e,r=3==e,o=4==e,i=6==e,c=7==e,a=5==e||i;return function(s,u,l,f){for(var d,h,p=de(s),y=A(p),v=dr(u,l),m=xt(y),b=0,g=f||Rn,w=t?g(s,m):n||c?g(s,0):void 0;m>b;b++)if((a||b in y)&&(h=v(d=y[b],b,p),e))if(t)w[b]=h;else if(h)switch(e){case 3:return!0;case 5:return d;case 6:return b;case 2:hr(w,d)}else switch(e){case 4:return!1;case 7:hr(w,d)}return i?-1:r||o?o:w}},yr={forEach:pr(0),map:pr(1),filter:pr(2),some:pr(3),every:pr(4),find:pr(5),findIndex:pr(6),filterReject:pr(7)}.forEach,vr=ot("hidden"),mr="Symbol",br=pt.set,gr=pt.getterFor(mr),wr=Object.prototype,Sr=p.Symbol,kr=Sr&&Sr.prototype,_r=p.TypeError,Ir=p.QObject,Or=We.f,xr=He.f,Tr=nr.f,Cr=_.f,jr=j([].push),Rr=le("symbols"),Er=le("op-symbols"),Lr=le("wks"),Wr=!Ir||!Ir.prototype||!Ir.prototype.findChild,Zr=v&&y((function(){return 7!=Bn(xr({},"a",{get:function(){return xr(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Or(wr,t);r&&delete wr[t],xr(e,t,n),r&&e!==wr&&xr(wr,t,r)}:xr,Ar=function(e,t){var n=Rr[e]=Bn(kr);return br(n,{type:mr,tag:e,description:t}),v||(n.description=t),n},Gr=function(e,t,n){e===wr&&Gr(Er,t,n),Pe(e);var r=Te(t);return Pe(n),pe(Rr,r)?(n.enumerable?(pe(e,vr)&&e[vr][r]&&(e[vr][r]=!1),n=Bn(n,{enumerable:I(0,!1)})):(pe(e,vr)||xr(e,vr,I(1,{})),e[vr][r]=!0),Zr(e,r,n)):xr(e,r,n)},Pr=function(e,t){Pe(e);var n=X(t),r=Nn(n).concat(Nr(n));return yr(r,(function(t){v&&!g(Xr,n,t)||Gr(e,t,n[t])})),e},Xr=function(e){var t=Te(e),n=g(Cr,this,t);return!(this===wr&&pe(Rr,t)&&!pe(Er,t))&&(!(n||!pe(this,t)||!pe(Rr,t)||pe(this,vr)&&this[vr][t])||n)},Fr=function(e,t){var n=X(e),r=Te(t);if(n!==wr||!pe(Rr,r)||pe(Er,r)){var o=Or(n,r);return!o||!pe(Rr,r)||pe(n,vr)&&n[vr][r]||(o.enumerable=!0),o}},Kr=function(e){var t=Tr(X(e)),n=[];return yr(t,(function(e){pe(Rr,e)||pe(it,e)||jr(n,e)})),n},Nr=function(e){var t=e===wr,n=Tr(t?Er:X(e)),r=[];return yr(n,(function(e){!pe(Rr,e)||t&&!pe(wr,e)||jr(r,Rr[e])})),r};B||(Sr=function(){if(Y(kr,this))throw _r("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?nn(arguments[0]):void 0,t=be(e),n=function(e){this===wr&&g(n,Er,e),pe(this,vr)&&pe(this[vr],t)&&(this[vr][t]=!1),Zr(this,t,I(1,e))};return v&&Wr&&Zr(wr,t,{configurable:!0,set:n}),Ar(t,e)},kr=Sr.prototype,vt(kr,"toString",(function(){return gr(this).tag})),vt(Sr,"withoutSetter",(function(e){return Ar(be(e),e)})),_.f=Xr,He.f=Gr,Yn.f=Pr,We.f=Fr,Zt.f=nr.f=Kr,At.f=Nr,rr.f=function(e){return Ar(_e(e),e)},v&&(xr(kr,"description",{configurable:!0,get:function(){return gr(this).description}}),vt(wr,"propertyIsEnumerable",Xr,{unsafe:!0}))),Vt({global:!0,constructor:!0,wrap:!0,forced:!B,sham:!B},{Symbol:Sr}),yr(Nn(Lr),(function(e){cr(e)})),Vt({target:mr,stat:!0,forced:!B},{useSetter:function(){Wr=!0},useSimple:function(){Wr=!1}}),Vt({target:"Object",stat:!0,forced:!B,sham:!v},{create:function(e,t){return void 0===t?Bn(e):Pr(Bn(e),t)},defineProperty:Gr,defineProperties:Pr,getOwnPropertyDescriptor:Fr}),Vt({target:"Object",stat:!0,forced:!B},{getOwnPropertyNames:Kr}),ar(),lr(Sr,mr),it[vr]=!0;var Ur=B&&!!Symbol.for&&!!Symbol.keyFor,Yr=le("string-to-symbol-registry"),Hr=le("symbol-to-string-registry");Vt({target:"Symbol",stat:!0,forced:!Ur},{for:function(e){var t=nn(e);if(pe(Yr,t))return Yr[t];var n=U("Symbol")(t);return Yr[t]=n,Hr[n]=t,n}});var Dr=le("symbol-to-string-registry");Vt({target:"Symbol",stat:!0,forced:!Ur},{keyFor:function(e){if(!$(e))throw TypeError(te(e)+" is not a symbol");if(pe(Dr,e))return Dr[e]}});var Jr=Function.prototype,Vr=Jr.apply,zr=Jr.call,Mr="object"==typeof Reflect&&Reflect.apply||(m?zr.bind(Vr):function(){return zr.apply(Vr,arguments)}),Br=j([].slice),Qr=U("JSON","stringify"),qr=j(/./.exec),$r=j("".charAt),eo=j("".charCodeAt),to=j("".replace),no=j(1..toString),ro=/[\uD800-\uDFFF]/g,oo=/^[\uD800-\uDBFF]$/,io=/^[\uDC00-\uDFFF]$/,co=!B||y((function(){var e=U("Symbol")();return"[null]"!=Qr([e])||"{}"!=Qr({a:e})||"{}"!=Qr(Object(e))})),ao=y((function(){return'"\\udf06\\ud834"'!==Qr("\udf06\ud834")||'"\\udead"'!==Qr("\udead")})),so=function(e,t){var n=Br(arguments),r=t;if((K(t)||void 0!==e)&&!$(e))return vn(t)||(t=function(e,t){if(F(r)&&(t=g(r,this,e,t)),!$(t))return t}),n[1]=t,Mr(Qr,null,n)},uo=function(e,t,n){var r=$r(n,t-1),o=$r(n,t+1);return qr(oo,e)&&!qr(io,o)||qr(io,e)&&!qr(oo,r)?"\\u"+no(eo(e,0),16):e};Qr&&Vt({target:"JSON",stat:!0,arity:3,forced:co||ao},{stringify:function(e,t,n){var r=Br(arguments),o=Mr(co?so:Qr,null,r);return ao&&"string"==typeof o?to(o,ro,uo):o}});var lo=!B||y((function(){At.f(1)}));Vt({target:"Object",stat:!0,forced:lo},{getOwnPropertySymbols:function(e){var t=At.f;return t?t(de(e)):[]}}),cr("asyncIterator");var fo=He.f,ho=p.Symbol,po=ho&&ho.prototype;if(v&&F(ho)&&(!("description"in po)||void 0!==ho().description)){var yo={},vo=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:nn(arguments[0]),t=Y(po,this)?new ho(e):void 0===e?ho():ho(e);return""===e&&(yo[t]=!0),t};Xt(vo,ho),vo.prototype=po,po.constructor=vo;var mo="Symbol(test)"==String(ho("test")),bo=j(po.toString),go=j(po.valueOf),wo=/^Symbol\((.*)\)[^)]+$/,So=j("".replace),ko=j("".slice);fo(po,"description",{configurable:!0,get:function(){var e=go(this),t=bo(e);if(pe(yo,e))return"";var n=mo?ko(t,7,-1):So(t,wo,"$1");return""===n?void 0:n}}),Vt({global:!0,constructor:!0,forced:!0},{Symbol:vo})}cr("hasInstance"),cr("isConcatSpreadable"),cr("iterator"),cr("match"),cr("matchAll"),cr("replace"),cr("search"),cr("species"),cr("split"),cr("toPrimitive"),ar(),cr("toStringTag"),lr(U("Symbol"),"Symbol"),cr("unscopables"),lr(p.JSON,"JSON",!0),lr(Math,"Math",!0),Vt({global:!0},{Reflect:{}}),lr(p.Reflect,"Reflect",!0),or.Symbol;var _o,Io,Oo,xo=j("".charAt),To=j("".charCodeAt),Co=j("".slice),jo=function(e){return function(t,n){var r,o,i=nn(P(t)),c=wt(n),a=i.length;return c<0||c>=a?e?"":void 0:(r=To(i,c))<55296||r>56319||c+1===a||(o=To(i,c+1))<56320||o>57343?e?xo(i,c):r:e?Co(i,c,c+2):o-56320+(r-55296<<10)+65536}},Ro={codeAt:jo(!1),charAt:jo(!0)},Eo=!y((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Lo=ot("IE_PROTO"),Wo=p.Object,Zo=Wo.prototype,Ao=Eo?Wo.getPrototypeOf:function(e){var t=de(e);if(pe(t,Lo))return t[Lo];var n=t.constructor;return F(n)&&t instanceof n?n.prototype:t instanceof Wo?Zo:null},Go=_e("iterator"),Po=!1;[].keys&&("next"in(Oo=[].keys())?(Io=Ao(Ao(Oo)))!==Object.prototype&&(_o=Io):Po=!0);var Xo=null==_o||y((function(){var e={};return _o[Go].call(e)!==e}));Xo&&(_o={}),F(_o[Go])||vt(_o,Go,(function(){return this}));var Fo={IteratorPrototype:_o,BUGGY_SAFARI_ITERATORS:Po},Ko={},No=Fo.IteratorPrototype,Uo=function(){return this},Yo=p.String,Ho=p.TypeError,Do=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=j(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Pe(n),function(e){if("object"==typeof e||F(e))return e;throw Ho("Can't set "+Yo(e)+" as a prototype")}(r),t?e(n,r):n.__proto__=r,n}}():void 0),Jo=Me.PROPER,Vo=Me.CONFIGURABLE,zo=Fo.IteratorPrototype,Mo=Fo.BUGGY_SAFARI_ITERATORS,Bo=_e("iterator"),Qo="keys",qo="values",$o="entries",ei=function(){return this},ti=function(e,t,n,r,o,i,c){!function(e,t,n,r){var o=t+" Iterator";e.prototype=Bn(No,{next:I(+!r,n)}),lr(e,o,!1),Ko[o]=Uo}(n,t,r);var a,s,u,l=function(e){if(e===o&&y)return y;if(!Mo&&e in h)return h[e];switch(e){case Qo:case qo:case $o:return function(){return new n(this,e)}}return function(){return new n(this)}},f=t+" Iterator",d=!1,h=e.prototype,p=h[Bo]||h["@@iterator"]||o&&h[o],y=!Mo&&p||l(o),v="Array"==t&&h.entries||p;if(v&&(a=Ao(v.call(new e)))!==Object.prototype&&a.next&&(Ao(a)!==zo&&(Do?Do(a,zo):F(a[Bo])||vt(a,Bo,ei)),lr(a,f,!0)),Jo&&o==qo&&p&&p.name!==qo&&(Vo?De(h,"name",qo):(d=!0,y=function(){return g(p,this)})),o)if(s={values:l(qo),keys:i?y:l(Qo),entries:l($o)},c)for(u in s)(Mo||d||!(u in h))&&vt(h,u,s[u]);else Vt({target:t,proto:!0,forced:Mo||d},s);return h[Bo]!==y&&vt(h,Bo,y,{name:o}),Ko[t]=y,s},ni=Ro.charAt,ri="String Iterator",oi=pt.set,ii=pt.getterFor(ri);ti(String,"String",(function(e){oi(this,{type:ri,string:nn(e),index:0})}),(function(){var e,t=ii(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=ni(n,r),t.index+=e.length,{value:e,done:!1})}));var ci=function(e,t,n){var r,o;Pe(e);try{if(!(r=oe(e,"return"))){if("throw"===t)throw n;return n}r=g(r,e)}catch(e){o=!0,r=e}if("throw"===t)throw n;if(o)throw r;return Pe(r),n},ai=function(e,t,n,r){try{return r?t(Pe(n)[0],n[1]):t(n)}catch(t){ci(e,"throw",t)}},si=_e("iterator"),ui=Array.prototype,li=function(e){return void 0!==e&&(Ko.Array===e||ui[si]===e)},fi=_e("iterator"),di=function(e){if(null!=e)return oe(e,fi)||oe(e,"@@iterator")||Ko[en(e)]},hi=p.TypeError,pi=function(e,t){var n=arguments.length<2?di(e):t;if(re(n))return Pe(g(n,e));throw hi(te(e)+" is not iterable")},yi=p.Array,vi=_e("iterator"),mi=!1;try{var bi=0,gi={next:function(){return{done:!!bi++}},return:function(){mi=!0}};gi[vi]=function(){return this},Array.from(gi,(function(){throw 2}))}catch(e){}var wi=function(e,t){if(!t&&!mi)return!1;var n=!1;try{var r={};r[vi]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Si=!wi((function(e){Array.from(e)}));Vt({target:"Array",stat:!0,forced:Si},{from:function(e){var t=de(e),n=Tn(this),r=arguments.length,o=r>1?arguments[1]:void 0,i=void 0!==o;i&&(o=dr(o,r>2?arguments[2]:void 0));var c,a,s,u,l,f,d=di(t),h=0;if(!d||this==yi&&li(d))for(c=xt(t),a=n?new this(c):yi(c);c>h;h++)f=i?o(t[h],h):t[h],mn(a,h,f);else for(l=(u=pi(t,d)).next,a=n?new this:[];!(s=g(l,u)).done;h++)f=i?ai(u,o,[s.value,h],!0):s.value,mn(a,h,f);return a.length=h,a}}),or.Array.from;var ki,_i,Ii,Oi="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,xi=He.f,Ti=p.Int8Array,Ci=Ti&&Ti.prototype,ji=p.Uint8ClampedArray,Ri=ji&&ji.prototype,Ei=Ti&&Ao(Ti),Li=Ci&&Ao(Ci),Wi=Object.prototype,Zi=p.TypeError,Ai=_e("toStringTag"),Gi=be("TYPED_ARRAY_TAG"),Pi=be("TYPED_ARRAY_CONSTRUCTOR"),Xi=Oi&&!!Do&&"Opera"!==en(p.opera),Fi=!1,Ki={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Ni={BigInt64Array:8,BigUint64Array:8},Ui=function(e){if(!K(e))return!1;var t=en(e);return pe(Ki,t)||pe(Ni,t)};for(ki in Ki)(Ii=(_i=p[ki])&&_i.prototype)?De(Ii,Pi,_i):Xi=!1;for(ki in Ni)(Ii=(_i=p[ki])&&_i.prototype)&&De(Ii,Pi,_i);if((!Xi||!F(Ei)||Ei===Function.prototype)&&(Ei=function(){throw Zi("Incorrect invocation")},Xi))for(ki in Ki)p[ki]&&Do(p[ki],Ei);if((!Xi||!Li||Li===Wi)&&(Li=Ei.prototype,Xi))for(ki in Ki)p[ki]&&Do(p[ki].prototype,Li);if(Xi&&Ao(Ri)!==Li&&Do(Ri,Li),v&&!pe(Li,Ai))for(ki in Fi=!0,xi(Li,Ai,{get:function(){return K(this)?this[Gi]:void 0}}),Ki)p[ki]&&De(p[ki],Gi,ki);var Yi={NATIVE_ARRAY_BUFFER_VIEWS:Xi,TYPED_ARRAY_CONSTRUCTOR:Pi,TYPED_ARRAY_TAG:Fi&&Gi,aTypedArray:function(e){if(Ui(e))return e;throw Zi("Target is not a typed array")},aTypedArrayConstructor:function(e){if(F(e)&&(!Do||Y(Ei,e)))return e;throw Zi(te(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(v){if(n)for(var o in Ki){var i=p[o];if(i&&pe(i.prototype,e))try{delete i.prototype[e]}catch(n){try{i.prototype[e]=t}catch(e){}}}Li[e]&&!n||vt(Li,e,n?t:Xi&&Ci[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,o;if(v){if(Do){if(n)for(r in Ki)if((o=p[r])&&pe(o,e))try{delete o[e]}catch(e){}if(Ei[e]&&!n)return;try{return vt(Ei,e,n?t:Xi&&Ei[e]||t)}catch(e){}}for(r in Ki)!(o=p[r])||o[e]&&!n||vt(o,e,t)}},isView:function(e){if(!K(e))return!1;var t=en(e);return"DataView"===t||pe(Ki,t)||pe(Ni,t)},isTypedArray:Ui,TypedArray:Ei,TypedArrayPrototype:Li},Hi=p.TypeError,Di=_e("species"),Ji=function(e,t){var n,r=Pe(e).constructor;return void 0===r||null==(n=Pe(r)[Di])?t:function(e){if(Tn(e))return e;throw Hi(te(e)+" is not a constructor")}(n)},Vi=Yi.TYPED_ARRAY_CONSTRUCTOR,zi=Yi.aTypedArrayConstructor,Mi=Yi.aTypedArray;(0,Yi.exportTypedArrayMethod)("slice",(function(e,t){for(var n,r=Br(Mi(this),e,t),o=zi(Ji(n=this,n[Vi])),i=0,c=r.length,a=new o(c);c>i;)a[i]=r[i++];return a}),y((function(){new Int8Array(1).slice()})));var Bi=He.f,Qi=_e("unscopables"),qi=Array.prototype;null==qi[Qi]&&Bi(qi,Qi,{configurable:!0,value:Bn(null)});var $i=function(e){qi[Qi][e]=!0},ec=Ct.includes,tc=y((function(){return!Array(1).includes()}));Vt({target:"Array",proto:!0,forced:tc},{includes:function(e){return ec(this,e,arguments.length>1?arguments[1]:void 0)}}),$i("includes"),yn("Array","includes");var nc=j("".indexOf);Vt({target:"String",proto:!0,forced:!sn("includes")},{includes:function(e){return!!~nc(nn(P(this)),nn(cn(e)),arguments.length>1?arguments[1]:void 0)}}),yn("String","includes");var rc=He.f,oc="Array Iterator",ic=pt.set,cc=pt.getterFor(oc);ti(Array,"Array",(function(e,t){ic(this,{type:oc,target:X(e),index:0,kind:t})}),(function(){var e=cc(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values");var ac=Ko.Arguments=Ko.Array;if($i("keys"),$i("values"),$i("entries"),v&&"values"!==ac.name)try{rc(ac,"name",{value:"values"})}catch(e){}var sc=y((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),uc=Object.isExtensible,lc=y((function(){uc(1)}))||sc?function(e){return!!K(e)&&((!sc||"ArrayBuffer"!=L(e))&&(!uc||uc(e)))}:uc,fc=!y((function(){return Object.isExtensible(Object.preventExtensions({}))})),dc=l((function(e){var t=He.f,n=!1,r=be("meta"),o=0,i=function(e){t(e,r,{value:{objectID:"O"+o++,weakData:{}}})},c=e.exports={enable:function(){c.enable=function(){},n=!0;var e=Zt.f,t=j([].splice),o={};o[r]=1,e(o).length&&(Zt.f=function(n){for(var o=e(n),i=0,c=o.length;i<c;i++)if(o[i]===r){t(o,i,1);break}return o},Vt({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:nr.f}))},fastKey:function(e,t){if(!K(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!pe(e,r)){if(!lc(e))return"F";if(!t)return"E";i(e)}return e[r].objectID},getWeakData:function(e,t){if(!pe(e,r)){if(!lc(e))return!0;if(!t)return!1;i(e)}return e[r].weakData},onFreeze:function(e){return fc&&n&&lc(e)&&!pe(e,r)&&i(e),e}};it[r]=!0}));dc.enable,dc.fastKey,dc.getWeakData,dc.onFreeze;var hc=p.TypeError,pc=function(e,t){this.stopped=e,this.result=t},yc=pc.prototype,vc=function(e,t,n){var r,o,i,c,a,s,u,l=n&&n.that,f=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_ITERATOR),h=!(!n||!n.INTERRUPTED),p=dr(t,l),y=function(e){return r&&ci(r,"normal",e),new pc(!0,e)},v=function(e){return f?(Pe(e),h?p(e[0],e[1],y):p(e[0],e[1])):h?p(e,y):p(e)};if(d)r=e;else{if(!(o=di(e)))throw hc(te(e)+" is not iterable");if(li(o)){for(i=0,c=xt(e);c>i;i++)if((a=v(e[i]))&&Y(yc,a))return a;return new pc(!1)}r=pi(e,o)}for(s=r.next;!(u=g(s,r)).done;){try{a=v(u.value)}catch(e){ci(r,"throw",e)}if("object"==typeof a&&a&&Y(yc,a))return a}return new pc(!1)},mc=p.TypeError,bc=function(e,t){if(Y(t,e))return e;throw mc("Incorrect invocation")},gc=function(e,t,n){for(var r in t)vt(e,r,t[r],n);return e},wc=_e("species"),Sc=He.f,kc=dc.fastKey,_c=pt.set,Ic=pt.getterFor,Oc={getConstructor:function(e,t,n,r){var o=e((function(e,o){bc(e,i),_c(e,{type:t,index:Bn(null),first:void 0,last:void 0,size:0}),v||(e.size=0),null!=o&&vc(o,e[r],{that:e,AS_ENTRIES:n})})),i=o.prototype,c=Ic(t),a=function(e,t,n){var r,o,i=c(e),a=s(e,t);return a?a.value=n:(i.last=a={index:o=kc(t,!0),key:t,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=a),r&&(r.next=a),v?i.size++:e.size++,"F"!==o&&(i.index[o]=a)),e},s=function(e,t){var n,r=c(e),o=kc(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==t)return n};return gc(i,{clear:function(){for(var e=c(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,v?e.size=0:this.size=0},delete:function(e){var t=this,n=c(t),r=s(t,e);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first==r&&(n.first=o),n.last==r&&(n.last=i),v?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=c(this),r=dr(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!s(this,e)}}),gc(i,n?{get:function(e){var t=s(this,e);return t&&t.value},set:function(e,t){return a(this,0===e?0:e,t)}}:{add:function(e){return a(this,e=0===e?0:e,e)}}),v&&Sc(i,"size",{get:function(){return c(this).size}}),o},setStrong:function(e,t,n){var r=t+" Iterator",o=Ic(t),i=Ic(r);ti(e,t,(function(e,t){_c(this,{type:r,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),function(e){var t=U(e),n=He.f;v&&t&&!t[wc]&&n(t,wc,{configurable:!0,get:function(){return this}})}(t)}};function xc(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))}function Tc(e){return new this((function(t,n){if(!e||void 0===e.length)return n(new TypeError(typeof e+" "+e+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var r=Array.prototype.slice.call(e);if(0===r.length)return t([]);var o=r.length;function i(e,n){if(n&&("object"==typeof n||"function"==typeof n)){var c=n.then;if("function"==typeof c)return void c.call(n,(function(t){i(e,t)}),(function(n){r[e]={status:"rejected",reason:n},0==--o&&t(r)}))}r[e]={status:"fulfilled",value:n},0==--o&&t(r)}for(var c=0;c<r.length;c++)i(c,r[c])}))}!function(e,t,n){var r=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),i=r?"set":"add",c=p[e],a=c&&c.prototype,s=c,u={},l=function(e){var t=j(a[e]);vt(a,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(o&&!K(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return o&&!K(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(o&&!K(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(Dt(e,!F(c)||!(o||a.forEach&&!y((function(){(new c).entries().next()})))))s=n.getConstructor(t,e,r,i),dc.enable();else if(Dt(e,!0)){var f=new s,d=f[i](o?{}:-0,1)!=f,h=y((function(){f.has(1)})),v=wi((function(e){new c(e)})),m=!o&&y((function(){for(var e=new c,t=5;t--;)e[i](t,t);return!e.has(-0)}));v||((s=t((function(e,t){bc(e,a);var n=function(e,t,n){var r,o;return Do&&F(r=t.constructor)&&r!==n&&K(o=r.prototype)&&o!==n.prototype&&Do(e,o),e}(new c,e,s);return null!=t&&vc(t,n[i],{that:n,AS_ENTRIES:r}),n}))).prototype=a,a.constructor=s),(h||m)&&(l("delete"),l("has"),r&&l("get")),(m||d)&&l(i),o&&a.clear&&delete a.clear}u[e]=s,Vt({global:!0,constructor:!0,forced:s!=c},u),lr(s,e),o||n.setStrong(s,e,r)}("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),Oc),or.Set;var Cc=setTimeout;function jc(e){return Boolean(e&&void 0!==e.length)}function Rc(){}function Ec(e){if(!(this instanceof Ec))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],Pc(e,this)}function Lc(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,Ec._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(e){return void Zc(t.promise,e)}Wc(t.promise,r)}else(1===e._state?Wc:Zc)(t.promise,e._value)}))):e._deferreds.push(t)}function Wc(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof Ec)return e._state=3,e._value=t,void Ac(e);if("function"==typeof n)return void Pc((r=n,o=t,function(){r.apply(o,arguments)}),e)}e._state=1,e._value=t,Ac(e)}catch(t){Zc(e,t)}var r,o}function Zc(e,t){e._state=2,e._value=t,Ac(e)}function Ac(e){2===e._state&&0===e._deferreds.length&&Ec._immediateFn((function(){e._handled||Ec._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t<n;t++)Lc(e,e._deferreds[t]);e._deferreds=null}function Gc(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function Pc(e,t){var n=!1;try{e((function(e){n||(n=!0,Wc(t,e))}),(function(e){n||(n=!0,Zc(t,e))}))}catch(e){if(n)return;n=!0,Zc(t,e)}}Ec.prototype.catch=function(e){return this.then(null,e)},Ec.prototype.then=function(e,t){var n=new this.constructor(Rc);return Lc(this,new Gc(e,t,n)),n},Ec.prototype.finally=xc,Ec.all=function(e){return new Ec((function(t,n){if(!jc(e))return n(new TypeError("Promise.all accepts an array"));var r=Array.prototype.slice.call(e);if(0===r.length)return t([]);var o=r.length;function i(e,c){try{if(c&&("object"==typeof c||"function"==typeof c)){var a=c.then;if("function"==typeof a)return void a.call(c,(function(t){i(e,t)}),n)}r[e]=c,0==--o&&t(r)}catch(e){n(e)}}for(var c=0;c<r.length;c++)i(c,r[c])}))},Ec.allSettled=Tc,Ec.resolve=function(e){return e&&"object"==typeof e&&e.constructor===Ec?e:new Ec((function(t){t(e)}))},Ec.reject=function(e){return new Ec((function(t,n){n(e)}))},Ec.race=function(e){return new Ec((function(t,n){if(!jc(e))return n(new TypeError("Promise.race accepts an array"));for(var r=0,o=e.length;r<o;r++)Ec.resolve(e[r]).then(t,n)}))},Ec._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){Cc(e,0)},Ec._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var Xc=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}();"function"!=typeof Xc.Promise?Xc.Promise=Ec:(Xc.Promise.prototype.finally||(Xc.Promise.prototype.finally=xc),Xc.Promise.allSettled||(Xc.Promise.allSettled=Tc)),function(e){function t(){}function n(e,t){if(e=void 0===e?"utf-8":e,t=void 0===t?{fatal:!1}:t,-1===o.indexOf(e.toLowerCase()))throw new RangeError("Failed to construct 'TextDecoder': The encoding label provided ('"+e+"') is invalid.");if(t.fatal)throw Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}function r(e){for(var t=0,n=Math.min(65536,e.length+1),r=new Uint16Array(n),o=[],i=0;;){var c=t<e.length;if(!c||i>=n-1){if(o.push(String.fromCharCode.apply(null,r.subarray(0,i))),!c)return o.join("");e=e.subarray(t),i=t=0}if(0==(128&(c=e[t++])))r[i++]=c;else if(192==(224&c)){var a=63&e[t++];r[i++]=(31&c)<<6|a}else if(224==(240&c)){a=63&e[t++];var s=63&e[t++];r[i++]=(31&c)<<12|a<<6|s}else if(240==(248&c)){65535<(c=(7&c)<<18|(a=63&e[t++])<<12|(s=63&e[t++])<<6|63&e[t++])&&(c-=65536,r[i++]=c>>>10&1023|55296,c=56320|1023&c),r[i++]=c}}}if(e.TextEncoder&&e.TextDecoder)return!1;var o=["utf-8","utf8","unicode-1-1-utf-8"];Object.defineProperty(t.prototype,"encoding",{value:"utf-8"}),t.prototype.encode=function(e,t){if((t=void 0===t?{stream:!1}:t).stream)throw Error("Failed to encode: the 'stream' option is unsupported.");t=0;for(var n=e.length,r=0,o=Math.max(32,n+(n>>>1)+7),i=new Uint8Array(o>>>3<<3);t<n;){var c=e.charCodeAt(t++);if(55296<=c&&56319>=c){if(t<n){var a=e.charCodeAt(t);56320==(64512&a)&&(++t,c=((1023&c)<<10)+(1023&a)+65536)}if(55296<=c&&56319>=c)continue}if(r+4>i.length&&(o+=8,o=(o*=1+t/e.length*2)>>>3<<3,(a=new Uint8Array(o)).set(i),i=a),0==(4294967168&c))i[r++]=c;else{if(0==(4294965248&c))i[r++]=c>>>6&31|192;else if(0==(4294901760&c))i[r++]=c>>>12&15|224,i[r++]=c>>>6&63|128;else{if(0!=(4292870144&c))continue;i[r++]=c>>>18&7|240,i[r++]=c>>>12&63|128,i[r++]=c>>>6&63|128}i[r++]=63&c|128}}return i.slice?i.slice(0,r):i.subarray(0,r)},Object.defineProperty(n.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(n.prototype,"fatal",{value:!1}),Object.defineProperty(n.prototype,"ignoreBOM",{value:!1});var i=r;"function"==typeof Buffer&&Buffer.from?i=function(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf-8")}:"function"==typeof Blob&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&(i=function(e){var t=URL.createObjectURL(new Blob([e],{type:"text/plain;charset=UTF-8"}));try{var n=new XMLHttpRequest;return n.open("GET",t,!1),n.send(),n.responseText}catch(t){return r(e)}finally{URL.revokeObjectURL(t)}}),n.prototype.decode=function(e,t){if((t=void 0===t?{stream:!1}:t).stream)throw Error("Failed to decode: the 'stream' option is unsupported.");return e=e instanceof Uint8Array?e:e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer):new Uint8Array(e),i(e)},e.TextEncoder=t,e.TextDecoder=n}("undefined"!=typeof window?window:s),function(){function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function n(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?a(e):t}function l(e){var t=c();return function(){var n,r=o(e);if(t){var i=o(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return u(this,n)}}function f(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=o(e)););return e}function d(e,t,n){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=f(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}},d(e,t,n||e)}var h=function(){function t(){e(this,t),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return n(t,[{key:"addEventListener",value:function(e,t,n){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:n})}},{key:"removeEventListener",value:function(e,t){if(e in this.listeners)for(var n=this.listeners[e],r=0,o=n.length;r<o;r++)if(n[r].callback===t)return void n.splice(r,1)}},{key:"dispatchEvent",value:function(e){if(e.type in this.listeners){for(var t=this.listeners[e.type].slice(),n=0,r=t.length;n<r;n++){var o=t[n];try{o.callback.call(this,e)}catch(e){Promise.resolve().then((function(){throw e}))}o.options&&o.options.once&&this.removeEventListener(e.type,o.callback)}return!e.defaultPrevented}}}]),t}(),p=function(t){r(c,t);var i=l(c);function c(){var t;return e(this,c),(t=i.call(this)).listeners||h.call(a(t)),Object.defineProperty(a(t),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(a(t),"onabort",{value:null,writable:!0,configurable:!0}),t}return n(c,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(e){"abort"===e.type&&(this.aborted=!0,"function"==typeof this.onabort&&this.onabort.call(this,e)),d(o(c.prototype),"dispatchEvent",this).call(this,e)}}]),c}(h),y=function(){function t(){e(this,t),Object.defineProperty(this,"signal",{value:new p,writable:!0,configurable:!0})}return n(t,[{key:"abort",value:function(){var e;try{e=new Event("abort")}catch(t){"undefined"!=typeof document?document.createEvent?(e=document.createEvent("Event")).initEvent("abort",!1,!1):(e=document.createEventObject()).type="abort":e={type:"abort",bubbles:!1,cancelable:!1}}this.signal.dispatchEvent(e)}},{key:"toString",value:function(){return"[object AbortController]"}}]),t}();function v(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):"function"==typeof e.Request&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}"undefined"!=typeof Symbol&&Symbol.toStringTag&&(y.prototype[Symbol.toStringTag]="AbortController",p.prototype[Symbol.toStringTag]="AbortSignal"),function(e){v(e)&&(e.AbortController=y,e.AbortSignal=p)}("undefined"!=typeof self?self:s)}();var Fc=l((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){var e=this;this.locked=new Map,this.addToLocked=function(t,n){var r=e.locked.get(t);void 0===r?void 0===n?e.locked.set(t,[]):e.locked.set(t,[n]):void 0!==n&&(r.unshift(n),e.locked.set(t,r))},this.isLocked=function(t){return e.locked.has(t)},this.lock=function(t){return new Promise((function(n,r){e.isLocked(t)?e.addToLocked(t,n):(e.addToLocked(t),n())}))},this.unlock=function(t){var n=e.locked.get(t);if(void 0!==n&&0!==n.length){var r=n.pop();e.locked.set(t,n),void 0!==r&&setTimeout(r,0)}else e.locked.delete(t)}}return e.getInstance=function(){return void 0===e.instance&&(e.instance=new e),e.instance},e}();t.default=function(){return n.getInstance()}}));u(Fc);var Kc=l((function(e,t){var n=s&&s.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function c(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(c,a)}s((r=r.apply(e,t||[])).next())}))},r=s&&s.__generator||function(e,t){var n,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=c.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=t.call(e,c)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0});var o="browser-tabs-lock-key";function i(e){return new Promise((function(t){return setTimeout(t,e)}))}function c(e){for(var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",n="",r=0;r<e;r++){n+=t[Math.floor(Math.random()*t.length)]}return n}var a=function(){function e(){this.acquiredIatSet=new Set,this.id=Date.now().toString()+c(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),void 0===e.waiters&&(e.waiters=[])}return e.prototype.acquireLock=function(t,a){return void 0===a&&(a=5e3),n(this,void 0,void 0,(function(){var n,s,u,l,f,d;return r(this,(function(r){switch(r.label){case 0:n=Date.now()+c(4),s=Date.now()+a,u=o+"-"+t,l=window.localStorage,r.label=1;case 1:return Date.now()<s?[4,i(30)]:[3,8];case 2:return r.sent(),null!==l.getItem(u)?[3,5]:(f=this.id+"-"+t+"-"+n,[4,i(Math.floor(25*Math.random()))]);case 3:return r.sent(),l.setItem(u,JSON.stringify({id:this.id,iat:n,timeoutKey:f,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,i(30)];case 4:return r.sent(),null!==(d=l.getItem(u))&&(d=JSON.parse(d)).id===this.id&&d.iat===n?(this.acquiredIatSet.add(n),this.refreshLockWhileAcquired(u,n),[2,!0]):[3,7];case 5:return e.lockCorrector(),[4,this.waitForSomethingToChange(s)];case 6:r.sent(),r.label=7;case 7:return n=Date.now()+c(4),[3,1];case 8:return[2,!1]}}))}))},e.prototype.refreshLockWhileAcquired=function(e,t){return n(this,void 0,void 0,(function(){var o=this;return r(this,(function(i){return setTimeout((function(){return n(o,void 0,void 0,(function(){var n,o;return r(this,(function(r){switch(r.label){case 0:return[4,Fc.default().lock(t)];case 1:return r.sent(),this.acquiredIatSet.has(t)?(n=window.localStorage,null===(o=n.getItem(e))?(Fc.default().unlock(t),[2]):((o=JSON.parse(o)).timeRefreshed=Date.now(),n.setItem(e,JSON.stringify(o)),Fc.default().unlock(t),this.refreshLockWhileAcquired(e,t),[2])):(Fc.default().unlock(t),[2])}}))}))}),1e3),[2]}))}))},e.prototype.waitForSomethingToChange=function(t){return n(this,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:return[4,new Promise((function(n){var r=!1,o=Date.now(),i=!1;function c(){if(i||(window.removeEventListener("storage",c),e.removeFromWaiting(c),clearTimeout(a),i=!0),!r){r=!0;var t=50-(Date.now()-o);t>0?setTimeout(n,t):n()}}window.addEventListener("storage",c),e.addToWaiting(c);var a=setTimeout(c,Math.max(0,t-Date.now()))}))];case 1:return n.sent(),[2]}}))}))},e.addToWaiting=function(t){this.removeFromWaiting(t),void 0!==e.waiters&&e.waiters.push(t)},e.removeFromWaiting=function(t){void 0!==e.waiters&&(e.waiters=e.waiters.filter((function(e){return e!==t})))},e.notifyWaiters=function(){void 0!==e.waiters&&e.waiters.slice().forEach((function(e){return e()}))},e.prototype.releaseLock=function(e){return n(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,this.releaseLock__private__(e)];case 1:return[2,t.sent()]}}))}))},e.prototype.releaseLock__private__=function(t){return n(this,void 0,void 0,(function(){var n,i,c;return r(this,(function(r){switch(r.label){case 0:return n=window.localStorage,i=o+"-"+t,null===(c=n.getItem(i))?[2]:(c=JSON.parse(c)).id!==this.id?[3,2]:[4,Fc.default().lock(c.iat)];case 1:r.sent(),this.acquiredIatSet.delete(c.iat),n.removeItem(i),Fc.default().unlock(c.iat),e.notifyWaiters(),r.label=2;case 2:return[2]}}))}))},e.lockCorrector=function(){for(var t=Date.now()-5e3,n=window.localStorage,r=Object.keys(n),i=!1,c=0;c<r.length;c++){var a=r[c];if(a.includes(o)){var s=n.getItem(a);null!==s&&(void 0===(s=JSON.parse(s)).timeRefreshed&&s.timeAcquired<t||void 0!==s.timeRefreshed&&s.timeRefreshed<t)&&(n.removeItem(a),i=!0)}}i&&e.notifyWaiters()},e.waiters=void 0,e}();t.default=a})),Nc=u(Kc),Uc={timeoutInSeconds:60},Yc="memory",Hc=["login_required","consent_required","interaction_required","account_selection_required","access_denied"],Dc={name:"auth0-spa-js",version:"1.22.1"},Jc=function(){return Date.now()},Vc=function(e){function n(t,r){var o=e.call(this,r)||this;return o.error=t,o.error_description=r,Object.setPrototypeOf(o,n.prototype),o}return t(n,e),n.fromPayload=function(e){return new n(e.error,e.error_description)},n}(Error),zc=function(e){function n(t,r,o,i){void 0===i&&(i=null);var c=e.call(this,t,r)||this;return c.state=o,c.appState=i,Object.setPrototypeOf(c,n.prototype),c}return t(n,e),n}(Vc),Mc=function(e){function n(){var t=e.call(this,"timeout","Timeout")||this;return Object.setPrototypeOf(t,n.prototype),t}return t(n,e),n}(Vc),Bc=function(e){function n(t){var r=e.call(this)||this;return r.popup=t,Object.setPrototypeOf(r,n.prototype),r}return t(n,e),n}(Mc),Qc=function(e){function n(t){var r=e.call(this,"cancelled","Popup closed")||this;return r.popup=t,Object.setPrototypeOf(r,n.prototype),r}return t(n,e),n}(Vc),qc=function(e){function n(t,r,o){var i=e.call(this,t,r)||this;return i.mfa_token=o,Object.setPrototypeOf(i,n.prototype),i}return t(n,e),n}(Vc),$c=function(e){function n(t,r){var o=e.call(this,"missing_refresh_token","Missing Refresh Token (audience: '".concat(ua(t,["default"]),"', scope: '").concat(ua(r),"')"))||this;return o.audience=t,o.scope=r,Object.setPrototypeOf(o,n.prototype),o}return t(n,e),n}(Vc),ea=function(e){return new Promise((function(t,n){var r,o=setInterval((function(){e.popup&&e.popup.closed&&(clearInterval(o),clearTimeout(i),window.removeEventListener("message",r,!1),n(new Qc(e.popup)))}),1e3),i=setTimeout((function(){clearInterval(o),n(new Bc(e.popup)),window.removeEventListener("message",r,!1)}),1e3*(e.timeoutInSeconds||60));r=function(c){if(c.data&&"authorization_response"===c.data.type){if(clearTimeout(i),clearInterval(o),window.removeEventListener("message",r,!1),e.popup.close(),c.data.response.error)return n(Vc.fromPayload(c.data.response));t(c.data.response)}},window.addEventListener("message",r)}))},ta=function(){return window.crypto||window.msCrypto},na=function(){var e=ta();return e.subtle||e.webkitSubtle},ra=function(){var e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.",t="";return Array.from(ta().getRandomValues(new Uint8Array(43))).forEach((function(n){return t+=e[n%e.length]})),t},oa=function(e){return btoa(e)},ia=function(e){return Object.keys(e).filter((function(t){return void 0!==e[t]})).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")},ca=function(e){return o(void 0,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return t=na().digest({name:"SHA-256"},(new TextEncoder).encode(e)),window.msCrypto?[2,new Promise((function(e,n){t.oncomplete=function(t){e(t.target.result)},t.onerror=function(e){n(e.error)},t.onabort=function(){n("The digest operation was aborted")}}))]:[4,t];case 1:return[2,n.sent()]}}))}))},aa=function(e){return function(e){return decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}(e.replace(/_/g,"/").replace(/-/g,"+"))},sa=function(e){var t=new Uint8Array(e);return function(e){var t={"+":"-","/":"_","=":""};return e.replace(/[+/=]/g,(function(e){return t[e]}))}(window.btoa(String.fromCharCode.apply(String,a([],c(Array.from(t)),!1))))};function ua(e,t){return void 0===t&&(t=[]),e&&!t.includes(e)?e:""}var la=function(e,t){return o(void 0,void 0,void 0,(function(){var n,r;return i(this,(function(o){switch(o.label){case 0:return[4,(i=e,c=t,c=c||{},new Promise((function(e,t){var n=new XMLHttpRequest,r=[],o=[],a={},s=function(){return{ok:2==(n.status/100|0),statusText:n.statusText,status:n.status,url:n.responseURL,text:function(){return Promise.resolve(n.responseText)},json:function(){return Promise.resolve(n.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([n.response]))},clone:s,headers:{keys:function(){return r},entries:function(){return o},get:function(e){return a[e.toLowerCase()]},has:function(e){return e.toLowerCase()in a}}}};for(var u in n.open(c.method||"get",i,!0),n.onload=function(){n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){r.push(t=t.toLowerCase()),o.push([t,n]),a[t]=a[t]?a[t]+","+n:n})),e(s())},n.onerror=t,n.withCredentials="include"==c.credentials,c.headers)n.setRequestHeader(u,c.headers[u]);n.send(c.body||null)})))];case 1:return n=o.sent(),r={ok:n.ok},[4,n.json()];case 2:return[2,(r.json=o.sent(),r)]}var i,c}))}))},fa=function(e,t,n){return o(void 0,void 0,void 0,(function(){var r,o;return i(this,(function(i){return r=new AbortController,t.signal=r.signal,[2,Promise.race([la(e,t),new Promise((function(e,t){o=setTimeout((function(){r.abort(),t(new Error("Timeout when executing 'fetch'"))}),n)}))]).finally((function(){clearTimeout(o)}))]}))}))},da=function(e,t,n,r,c,a,s){return o(void 0,void 0,void 0,(function(){return i(this,(function(o){return[2,(i={auth:{audience:t,scope:n},timeout:c,fetchUrl:e,fetchOptions:r,useFormData:s},u=a,new Promise((function(e,t){var n=new MessageChannel;n.port1.onmessage=function(n){n.data.error?t(new Error(n.data.error)):e(n.data)},u.postMessage(i,[n.port2])})))];var i,u}))}))},ha=function(e,t,n,r,c,a,s){return void 0===s&&(s=1e4),o(void 0,void 0,void 0,(function(){return i(this,(function(o){return c?[2,da(e,t,n,r,s,c,a)]:[2,fa(e,r,s)]}))}))};function pa(e,t,n,c,a,s,u){return o(this,void 0,void 0,(function(){var o,l,f,d,h,p,y,v,m;return i(this,(function(i){switch(i.label){case 0:o=null,f=0,i.label=1;case 1:if(!(f<3))return[3,6];i.label=2;case 2:return i.trys.push([2,4,,5]),[4,ha(e,n,c,a,s,u,t)];case 3:return l=i.sent(),o=null,[3,6];case 4:return d=i.sent(),o=d,[3,5];case 5:return f++,[3,1];case 6:if(o)throw o.message=o.message||"Failed to fetch",o;if(h=l.json,p=h.error,y=h.error_description,v=r(h,["error","error_description"]),!l.ok){if(m=y||"HTTP error. Unable to fetch ".concat(e),"mfa_required"===p)throw new qc(p,m,v.mfa_token);throw new Vc(p||"request_error",m)}return[2,v]}}))}))}function ya(e,t){var n=e.baseUrl,c=e.timeout,a=e.audience,s=e.scope,u=e.auth0Client,l=e.useFormData,f=r(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData"]);return o(this,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=l?ia(f):JSON.stringify(f),[4,pa("".concat(n,"/oauth/token"),c,a||"default",s,{method:"POST",body:e,headers:{"Content-Type":l?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(u||Dc))}},t,l)];case 1:return[2,r.sent()]}}))}))}var va=function(e){return Array.from(new Set(e))},ma=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return va(e.join(" ").trim().split(/\s+/)).join(" ")},ba="@@auth0spajs@@",ga=function(){function e(e,t){void 0===t&&(t=ba),this.prefix=t,this.client_id=e.client_id,this.scope=e.scope,this.audience=e.audience}return e.prototype.toKey=function(){return"".concat(this.prefix,"::").concat(this.client_id,"::").concat(this.audience,"::").concat(this.scope)},e.fromKey=function(t){var n=c(t.split("::"),4),r=n[0],o=n[1],i=n[2];return new e({client_id:o,scope:n[3],audience:i},r)},e.fromCacheEntry=function(t){return new e({scope:t.scope,audience:t.audience,client_id:t.client_id})},e}(),wa=function(){function e(){}return e.prototype.set=function(e,t){localStorage.setItem(e,JSON.stringify(t))},e.prototype.get=function(e){var t=window.localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(e){return}},e.prototype.remove=function(e){localStorage.removeItem(e)},e.prototype.allKeys=function(){return Object.keys(window.localStorage).filter((function(e){return e.startsWith(ba)}))},e}(),Sa=function(){var e;this.enclosedCache=(e={},{set:function(t,n){e[t]=n},get:function(t){var n=e[t];if(n)return n},remove:function(t){delete e[t]},allKeys:function(){return Object.keys(e)}})},ka=function(){function e(e,t,n){this.cache=e,this.keyManifest=t,this.nowProvider=n,this.nowProvider=this.nowProvider||Jc}return e.prototype.get=function(e,t){var n;return void 0===t&&(t=0),o(this,void 0,void 0,(function(){var r,o,c,a,s;return i(this,(function(i){switch(i.label){case 0:return[4,this.cache.get(e.toKey())];case 1:return(r=i.sent())?[3,4]:[4,this.getCacheKeys()];case 2:return(o=i.sent())?(c=this.matchExistingCacheKey(e,o))?[4,this.cache.get(c)]:[3,4]:[2];case 3:r=i.sent(),i.label=4;case 4:return r?[4,this.nowProvider()]:[2];case 5:return a=i.sent(),s=Math.floor(a/1e3),r.expiresAt-t<s?r.body.refresh_token?(r.body={refresh_token:r.body.refresh_token},[4,this.cache.set(e.toKey(),r)]):[3,7]:[3,10];case 6:return i.sent(),[2,r.body];case 7:return[4,this.cache.remove(e.toKey())];case 8:return i.sent(),[4,null===(n=this.keyManifest)||void 0===n?void 0:n.remove(e.toKey())];case 9:return i.sent(),[2];case 10:return[2,r.body]}}))}))},e.prototype.set=function(e){var t;return o(this,void 0,void 0,(function(){var n,r;return i(this,(function(o){switch(o.label){case 0:return n=new ga({client_id:e.client_id,scope:e.scope,audience:e.audience}),[4,this.wrapCacheEntry(e)];case 1:return r=o.sent(),[4,this.cache.set(n.toKey(),r)];case 2:return o.sent(),[4,null===(t=this.keyManifest)||void 0===t?void 0:t.add(n.toKey())];case 3:return o.sent(),[2]}}))}))},e.prototype.clear=function(e){var t;return o(this,void 0,void 0,(function(){var n,r=this;return i(this,(function(c){switch(c.label){case 0:return[4,this.getCacheKeys()];case 1:return(n=c.sent())?[4,n.filter((function(t){return!e||t.includes(e)})).reduce((function(e,t){return o(r,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,e];case 1:return n.sent(),[4,this.cache.remove(t)];case 2:return n.sent(),[2]}}))}))}),Promise.resolve())]:[2];case 2:return c.sent(),[4,null===(t=this.keyManifest)||void 0===t?void 0:t.clear()];case 3:return c.sent(),[2]}}))}))},e.prototype.clearSync=function(e){var t=this,n=this.cache.allKeys();n&&n.filter((function(t){return!e||t.includes(e)})).forEach((function(e){t.cache.remove(e)}))},e.prototype.wrapCacheEntry=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return i(this,(function(o){switch(o.label){case 0:return[4,this.nowProvider()];case 1:return t=o.sent(),n=Math.floor(t/1e3)+e.expires_in,r=Math.min(n,e.decodedToken.claims.exp),[2,{body:e,expiresAt:r}]}}))}))},e.prototype.getCacheKeys=function(){var e;return o(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return this.keyManifest?[4,this.keyManifest.get()]:[3,2];case 1:return t=null===(e=n.sent())||void 0===e?void 0:e.keys,[3,4];case 2:return[4,this.cache.allKeys()];case 3:t=n.sent(),n.label=4;case 4:return[2,t]}}))}))},e.prototype.matchExistingCacheKey=function(e,t){return t.filter((function(t){var n=ga.fromKey(t),r=new Set(n.scope&&n.scope.split(" ")),o=e.scope.split(" "),i=n.scope&&o.reduce((function(e,t){return e&&r.has(t)}),!0);return n.prefix===ba&&n.client_id===e.client_id&&n.audience===e.audience&&i}))[0]},e}(),_a=function(){function e(e,t){this.storage=e,this.clientId=t,this.storageKey="".concat("a0.spajs.txs",".").concat(this.clientId),this.transaction=this.storage.get(this.storageKey)}return e.prototype.create=function(e){this.transaction=e,this.storage.save(this.storageKey,e,{daysUntilExpire:1})},e.prototype.get=function(){return this.transaction},e.prototype.remove=function(){delete this.transaction,this.storage.remove(this.storageKey)},e}(),Ia=function(e){return"number"==typeof e},Oa=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"],xa=function(e){if(!e.id_token)throw new Error("ID token is required but missing");var t=function(e){var t=e.split("."),n=c(t,3),r=n[0],o=n[1],i=n[2];if(3!==t.length||!r||!o||!i)throw new Error("ID token could not be decoded");var a=JSON.parse(aa(o)),s={__raw:e},u={};return Object.keys(a).forEach((function(e){s[e]=a[e],Oa.includes(e)||(u[e]=a[e])})),{encoded:{header:r,payload:o,signature:i},header:JSON.parse(aa(r)),claims:s,user:u}}(e.id_token);if(!t.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(t.claims.iss!==e.iss)throw new Error('Issuer (iss) claim mismatch in the ID token; expected "'.concat(e.iss,'", found "').concat(t.claims.iss,'"'));if(!t.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if("RS256"!==t.header.alg)throw new Error('Signature algorithm of "'.concat(t.header.alg,'" is not supported. Expected the ID token to be signed with "RS256".'));if(!t.claims.aud||"string"!=typeof t.claims.aud&&!Array.isArray(t.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e.aud))throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but was not one of "').concat(t.claims.aud.join(", "),'"'));if(t.claims.aud.length>1){if(!t.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(t.claims.azp!==e.aud)throw new Error('Authorized Party (azp) claim mismatch in the ID token; expected "'.concat(e.aud,'", found "').concat(t.claims.azp,'"'))}}else if(t.claims.aud!==e.aud)throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but found "').concat(t.claims.aud,'"'));if(e.nonce){if(!t.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(t.claims.nonce!==e.nonce)throw new Error('Nonce (nonce) claim mismatch in the ID token; expected "'.concat(e.nonce,'", found "').concat(t.claims.nonce,'"'))}if(e.max_age&&!Ia(t.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(!Ia(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!Ia(t.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");var n=e.leeway||60,r=new Date(e.now||Date.now()),o=new Date(0),i=new Date(0),a=new Date(0);if(a.setUTCSeconds(parseInt(t.claims.auth_time)+e.max_age+n),o.setUTCSeconds(t.claims.exp+n),i.setUTCSeconds(t.claims.nbf-n),r>o)throw new Error("Expiration Time (exp) claim error in the ID token; current time (".concat(r,") is after expiration time (").concat(o,")"));if(Ia(t.claims.nbf)&&r<i)throw new Error("Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Currrent time (".concat(r,") is before ").concat(i));if(Ia(t.claims.auth_time)&&r>a)throw new Error("Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Currrent time (".concat(r,") is after last auth at ").concat(a));if(e.organizationId){if(!t.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(e.organizationId!==t.claims.org_id)throw new Error('Organization ID (org_id) claim mismatch in the ID token; expected "'.concat(e.organizationId,'", found "').concat(t.claims.org_id,'"'))}return t},Ta=l((function(e,t){var n=s&&s.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};function r(e,t){if(!t)return"";var n="; "+e;return!0===t?n:n+"="+t}function o(e,t,n){return encodeURIComponent(e).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(t).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(e){if("number"==typeof e.expires){var t=new Date;t.setMilliseconds(t.getMilliseconds()+864e5*e.expires),e.expires=t}return r("Expires",e.expires?e.expires.toUTCString():"")+r("Domain",e.domain)+r("Path",e.path)+r("Secure",e.secure)+r("SameSite",e.sameSite)}(n)}function i(e){for(var t={},n=e?e.split("; "):[],r=/(%[\dA-F]{2})+/gi,o=0;o<n.length;o++){var i=n[o].split("="),c=i.slice(1).join("=");'"'===c.charAt(0)&&(c=c.slice(1,-1));try{t[i[0].replace(r,decodeURIComponent)]=c.replace(r,decodeURIComponent)}catch(e){}}return t}function c(){return i(document.cookie)}function a(e,t,r){document.cookie=o(e,t,n({path:"/"},r))}t.__esModule=!0,t.encode=o,t.parse=i,t.getAll=c,t.get=function(e){return c()[e]},t.set=a,t.remove=function(e,t){a(e,"",n(n({},t),{expires:-1}))}}));u(Ta),Ta.encode,Ta.parse,Ta.getAll;var Ca=Ta.get,ja=Ta.set,Ra=Ta.remove,Ea={get:function(e){var t=Ca(e);if(void 0!==t)return JSON.parse(t)},save:function(e,t,n){var r={};"https:"===window.location.protocol&&(r={secure:!0,sameSite:"none"}),(null==n?void 0:n.daysUntilExpire)&&(r.expires=n.daysUntilExpire),(null==n?void 0:n.cookieDomain)&&(r.domain=n.cookieDomain),ja(e,JSON.stringify(t),r)},remove:function(e){Ra(e)}},La="_legacy_",Wa={get:function(e){var t=Ea.get(e);return t||Ea.get("".concat(La).concat(e))},save:function(e,t,n){var r={};"https:"===window.location.protocol&&(r={secure:!0}),(null==n?void 0:n.daysUntilExpire)&&(r.expires=n.daysUntilExpire),ja("".concat(La).concat(e),JSON.stringify(t),r),Ea.save(e,t,n)},remove:function(e){Ea.remove(e),Ea.remove("".concat(La).concat(e))}},Za={get:function(e){if("undefined"!=typeof sessionStorage){var t=sessionStorage.getItem(e);if(void 0!==t)return JSON.parse(t)}},save:function(e,t){sessionStorage.setItem(e,JSON.stringify(t))},remove:function(e){sessionStorage.removeItem(e)}};function Aa(e,t,n){var r=void 0===t?null:t,o=function(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),o=0,i=n.length;o<i;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}(e,void 0!==n&&n),i=o.indexOf("\n",10)+1,c=o.substring(i)+(r?"//# sourceMappingURL="+r:""),a=new Blob([c],{type:"application/javascript"});return URL.createObjectURL(a)}var Ga,Pa,Xa,Fa,Ka=(Ga="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7dmFyIHQ9ZnVuY3Rpb24oZSxyKXtyZXR1cm4gdD1PYmplY3Quc2V0UHJvdG90eXBlT2Z8fHtfX3Byb3RvX186W119aW5zdGFuY2VvZiBBcnJheSYmZnVuY3Rpb24odCxlKXt0Ll9fcHJvdG9fXz1lfXx8ZnVuY3Rpb24odCxlKXtmb3IodmFyIHIgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxyKSYmKHRbcl09ZVtyXSl9LHQoZSxyKX07ZnVuY3Rpb24gZShlLHIpe2lmKCJmdW5jdGlvbiIhPXR5cGVvZiByJiZudWxsIT09cil0aHJvdyBuZXcgVHlwZUVycm9yKCJDbGFzcyBleHRlbmRzIHZhbHVlICIrU3RyaW5nKHIpKyIgaXMgbm90IGEgY29uc3RydWN0b3Igb3IgbnVsbCIpO2Z1bmN0aW9uIG4oKXt0aGlzLmNvbnN0cnVjdG9yPWV9dChlLHIpLGUucHJvdG90eXBlPW51bGw9PT1yP09iamVjdC5jcmVhdGUocik6KG4ucHJvdG90eXBlPXIucHJvdG90eXBlLG5ldyBuKX12YXIgcj1mdW5jdGlvbigpe3JldHVybiByPU9iamVjdC5hc3NpZ258fGZ1bmN0aW9uKHQpe2Zvcih2YXIgZSxyPTEsbj1hcmd1bWVudHMubGVuZ3RoO3I8bjtyKyspZm9yKHZhciBvIGluIGU9YXJndW1lbnRzW3JdKU9iamVjdC5wcm90b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Qsdy5qc29uKCldOihkJiZkLmFib3J0KCksaC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KSxbMl0pO2Nhc2UgNjpyZXR1cm4odD1vLnNlbnQoKSkucmVmcmVzaF90b2tlbj8oZnVuY3Rpb24odCxlLHIpe3NbdShlLHIpXT10fSh0LnJlZnJlc2hfdG9rZW4sbix5KSxkZWxldGUgdC5yZWZyZXNoX3Rva2VuKTpmdW5jdGlvbih0LGUpe2RlbGV0ZSBzW3UodCxlKV19KG4seSksaC5wb3N0TWVzc2FnZSh7b2s6dy5vayxqc29uOnR9KSxbMyw4XTtjYXNlIDc6cmV0dXJuIF89by5zZW50KCksaC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3JfZGVzY3JpcHRpb246Xy5tZXNzYWdlfX0pLFszLDhdO2Nhc2UgODpyZXR1cm5bMl19dmFyIGcsbSxrLFB9KSl9KSl9KSl9KCk7Cgo=",Pa=null,Xa=!1,function(e){return Fa=Fa||Aa(Ga,Pa,Xa),new Worker(Fa,e)}),Na={},Ua=function(){function e(e,t){this.cache=e,this.clientId=t,this.manifestKey=this.createManifestKeyFrom(this.clientId)}return e.prototype.add=function(e){var t;return o(this,void 0,void 0,(function(){var n,r;return i(this,(function(o){switch(o.label){case 0:return r=Set.bind,[4,this.cache.get(this.manifestKey)];case 1:return(n=new(r.apply(Set,[void 0,(null===(t=o.sent())||void 0===t?void 0:t.keys)||[]]))).add(e),[4,this.cache.set(this.manifestKey,{keys:a([],c(n),!1)})];case 2:return o.sent(),[2]}}))}))},e.prototype.remove=function(e){return o(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.cache.get(this.manifestKey)];case 1:return(t=r.sent())?((n=new Set(t.keys)).delete(e),n.size>0?[4,this.cache.set(this.manifestKey,{keys:a([],c(n),!1)})]:[3,3]):[3,5];case 2:case 4:return[2,r.sent()];case 3:return[4,this.cache.remove(this.manifestKey)];case 5:return[2]}}))}))},e.prototype.get=function(){return this.cache.get(this.manifestKey)},e.prototype.clear=function(){return this.cache.remove(this.manifestKey)},e.prototype.createManifestKeyFrom=function(e){return"".concat(ba,"::").concat(e)},e}(),Ya=new Nc,Ha="auth0.lock.getTokenSilently",Da="auth0.is.authenticated",Ja={memory:function(){return(new Sa).enclosedCache},localstorage:function(){return new wa}},Va=function(e){return Ja[e]},za=function(){return!/Trident.*rv:11\.0/.test(navigator.userAgent)},Ma=function(){function e(e){var t,n,o,i;if(this.options=e,"undefined"!=typeof window&&function(){if(!ta())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(void 0===na())throw new Error("\n auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/master/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.\n ")}(),e.cache&&e.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),e.cache)o=e.cache;else{if(this.cacheLocation=e.cacheLocation||Yc,!Va(this.cacheLocation))throw new Error('Invalid cache location "'.concat(this.cacheLocation,'"'));o=Va(this.cacheLocation)()}this.httpTimeoutMs=e.httpTimeoutInSeconds?1e3*e.httpTimeoutInSeconds:1e4,this.cookieStorage=!1===e.legacySameSiteCookie?Ea:Wa,this.orgHintCookieName=(i=this.options.client_id,"auth0.".concat(i,".organization_hint")),this.isAuthenticatedCookieName=function(e){return"auth0.".concat(e,".is.authenticated")}(this.options.client_id),this.sessionCheckExpiryDays=e.sessionCheckExpiryDays||1;var c,a=e.useCookiesForTransactions?this.cookieStorage:Za;this.scope=this.options.scope,this.transactionManager=new _a(a,this.options.client_id),this.nowProvider=this.options.nowProvider||Jc,this.cacheManager=new ka(o,o.allKeys?null:new Ua(o,this.options.client_id),this.nowProvider),this.domainUrl=(c=this.options.domain,/^https?:\/\//.test(c)?c:"https://".concat(c)),this.tokenIssuer=function(e,t){return e?e.startsWith("https://")?e:"https://".concat(e,"/"):"".concat(t,"/")}(this.options.issuer,this.domainUrl),this.defaultScope=ma("openid",void 0!==(null===(n=null===(t=this.options)||void 0===t?void 0:t.advancedOptions)||void 0===n?void 0:n.defaultScope)?this.options.advancedOptions.defaultScope:"openid profile email"),this.options.useRefreshTokens&&(this.scope=ma(this.scope,"offline_access")),"undefined"!=typeof window&&window.Worker&&this.options.useRefreshTokens&&this.cacheLocation===Yc&&za()&&(this.worker=new Ka),this.customOptions=function(e){return e.advancedOptions,e.audience,e.auth0Client,e.authorizeTimeoutInSeconds,e.cacheLocation,e.client_id,e.domain,e.issuer,e.leeway,e.max_age,e.redirect_uri,e.scope,e.useRefreshTokens,e.useCookiesForTransactions,e.useFormData,r(e,["advancedOptions","audience","auth0Client","authorizeTimeoutInSeconds","cacheLocation","client_id","domain","issuer","leeway","max_age","redirect_uri","scope","useRefreshTokens","useCookiesForTransactions","useFormData"])}(e),this.useRefreshTokensFallback=!1!==this.options.useRefreshTokensFallback}return e.prototype._url=function(e){var t=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||Dc)));return"".concat(this.domainUrl).concat(e,"&auth0Client=").concat(t)},e.prototype._getParams=function(e,t,o,i,c){var a=this.options;a.useRefreshTokens,a.useCookiesForTransactions,a.useFormData,a.auth0Client,a.cacheLocation,a.advancedOptions,a.detailedResponse,a.nowProvider,a.authorizeTimeoutInSeconds,a.legacySameSiteCookie,a.sessionCheckExpiryDays,a.domain,a.leeway,a.httpTimeoutInSeconds;var s=r(a,["useRefreshTokens","useCookiesForTransactions","useFormData","auth0Client","cacheLocation","advancedOptions","detailedResponse","nowProvider","authorizeTimeoutInSeconds","legacySameSiteCookie","sessionCheckExpiryDays","domain","leeway","httpTimeoutInSeconds"]);return n(n(n({},s),e),{scope:ma(this.defaultScope,this.scope,e.scope),response_type:"code",response_mode:"query",state:t,nonce:o,redirect_uri:c||this.options.redirect_uri,code_challenge:i,code_challenge_method:"S256"})},e.prototype._authorizeUrl=function(e){return this._url("/authorize?".concat(ia(e)))},e.prototype._verifyIdToken=function(e,t,n){return o(this,void 0,void 0,(function(){var r;return i(this,(function(o){switch(o.label){case 0:return[4,this.nowProvider()];case 1:return r=o.sent(),[2,xa({iss:this.tokenIssuer,aud:this.options.client_id,id_token:e,nonce:t,organizationId:n,leeway:this.options.leeway,max_age:this._parseNumber(this.options.max_age),now:r})]}}))}))},e.prototype._parseNumber=function(e){return"string"!=typeof e?e:parseInt(e,10)||void 0},e.prototype._processOrgIdHint=function(e){e?this.cookieStorage.save(this.orgHintCookieName,e,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName)},e.prototype.buildAuthorizeUrl=function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){var t,o,c,a,s,u,l,f,d,h,p,y;return i(this,(function(i){switch(i.label){case 0:return t=e.redirect_uri,o=e.appState,c=r(e,["redirect_uri","appState"]),a=oa(ra()),s=oa(ra()),u=ra(),[4,ca(u)];case 1:return l=i.sent(),f=sa(l),d=e.fragment?"#".concat(e.fragment):"",h=this._getParams(c,a,s,f,t),p=this._authorizeUrl(h),y=e.organization||this.options.organization,this.transactionManager.create(n({nonce:s,code_verifier:u,appState:o,scope:h.scope,audience:h.audience||"default",redirect_uri:h.redirect_uri,state:a},y&&{organizationId:y})),[2,p+d]}}))}))},e.prototype.loginWithPopup=function(e,t){return o(this,void 0,void 0,(function(){var o,c,a,s,u,l,f,d,h,p,y,v,m;return i(this,(function(i){switch(i.label){case 0:if(e=e||{},!(t=t||{}).popup&&(t.popup=function(e){var t=window.screenX+(window.innerWidth-400)/2,n=window.screenY+(window.innerHeight-600)/2;return window.open(e,"auth0:authorize:popup","left=".concat(t,",top=").concat(n,",width=").concat(400,",height=").concat(600,",resizable,scrollbars=yes,status=1"))}(""),!t.popup))throw new Error("Unable to open a popup for loginWithPopup - window.open returned `null`");return o=r(e,[]),c=oa(ra()),a=oa(ra()),s=ra(),[4,ca(s)];case 1:return u=i.sent(),l=sa(u),f=this._getParams(o,c,a,l,this.options.redirect_uri||window.location.origin),d=this._authorizeUrl(n(n({},f),{response_mode:"web_message"})),t.popup.location.href=d,[4,ea(n(n({},t),{timeoutInSeconds:t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}))];case 2:if(h=i.sent(),c!==h.state)throw new Error("Invalid state");return[4,ya({audience:f.audience,scope:f.scope,baseUrl:this.domainUrl,client_id:this.options.client_id,code_verifier:s,code:h.code,grant_type:"authorization_code",redirect_uri:f.redirect_uri,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},this.worker)];case 3:return p=i.sent(),y=e.organization||this.options.organization,[4,this._verifyIdToken(p.id_token,a,y)];case 4:return v=i.sent(),m=n(n({},p),{decodedToken:v,scope:f.scope,audience:f.audience||"default",client_id:this.options.client_id}),[4,this.cacheManager.set(m)];case 5:return i.sent(),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgIdHint(v.claims.org_id),[2]}}))}))},e.prototype.getUser=function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){var t,n,r;return i(this,(function(o){switch(o.label){case 0:return t=e.audience||this.options.audience||"default",n=ma(this.defaultScope,this.scope,e.scope),[4,this.cacheManager.get(new ga({client_id:this.options.client_id,audience:t,scope:n}))];case 1:return[2,(r=o.sent())&&r.decodedToken&&r.decodedToken.user]}}))}))},e.prototype.getIdTokenClaims=function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){var t,n,r;return i(this,(function(o){switch(o.label){case 0:return t=e.audience||this.options.audience||"default",n=ma(this.defaultScope,this.scope,e.scope),[4,this.cacheManager.get(new ga({client_id:this.options.client_id,audience:t,scope:n}))];case 1:return[2,(r=o.sent())&&r.decodedToken&&r.decodedToken.claims]}}))}))},e.prototype.loginWithRedirect=function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){var t,n,o;return i(this,(function(i){switch(i.label){case 0:return t=e.redirectMethod,n=r(e,["redirectMethod"]),[4,this.buildAuthorizeUrl(n)];case 1:return o=i.sent(),window.location[t||"assign"](o),[2]}}))}))},e.prototype.handleRedirectCallback=function(e){return void 0===e&&(e=window.location.href),o(this,void 0,void 0,(function(){var t,r,o,a,s,u,l,f,d,h;return i(this,(function(i){switch(i.label){case 0:if(0===(t=e.split("?").slice(1)).length)throw new Error("There are no query params available for parsing.");if(r=function(e){e.indexOf("#")>-1&&(e=e.substr(0,e.indexOf("#")));var t=e.split("&"),n={};return t.forEach((function(e){var t=c(e.split("="),2),r=t[0],o=t[1];n[r]=decodeURIComponent(o)})),n.expires_in&&(n.expires_in=parseInt(n.expires_in)),n}(t.join("")),o=r.state,a=r.code,s=r.error,u=r.error_description,!(l=this.transactionManager.get()))throw new Error("Invalid state");if(this.transactionManager.remove(),s)throw new zc(s,u,o,l.appState);if(!l.code_verifier||l.state&&l.state!==o)throw new Error("Invalid state");return f={audience:l.audience,scope:l.scope,baseUrl:this.domainUrl,client_id:this.options.client_id,code_verifier:l.code_verifier,grant_type:"authorization_code",code:a,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},void 0!==l.redirect_uri&&(f.redirect_uri=l.redirect_uri),[4,ya(f,this.worker)];case 1:return d=i.sent(),[4,this._verifyIdToken(d.id_token,l.nonce,l.organizationId)];case 2:return h=i.sent(),[4,this.cacheManager.set(n(n(n(n({},d),{decodedToken:h,audience:l.audience,scope:l.scope}),d.scope?{oauthTokenScope:d.scope}:null),{client_id:this.options.client_id}))];case 3:return i.sent(),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgIdHint(h.claims.org_id),[2,{appState:l.appState}]}}))}))},e.prototype.checkSession=function(e){return o(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get(Da))return[2];this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(Da)}n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.getTokenSilently(e)];case 2:return n.sent(),[3,4];case 3:if(t=n.sent(),!Hc.includes(t.error))throw t;return[3,4];case 4:return[2]}}))}))},e.prototype.getTokenSilently=function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){var t,o,c,a=this;return i(this,(function(i){return t=n(n({audience:this.options.audience,ignoreCache:!1},e),{scope:ma(this.defaultScope,this.scope,e.scope)}),o=t.ignoreCache,c=r(t,["ignoreCache"]),[2,(s=function(){return a._getTokenSilently(n({ignoreCache:o},c))},u="".concat(this.options.client_id,"::").concat(c.audience,"::").concat(c.scope),l=Na[u],l||(l=s().finally((function(){delete Na[u],l=null})),Na[u]=l),l)];var s,u,l}))}))},e.prototype._getTokenSilently=function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){var t,c,a,s,u,l,f,d,h;return i(this,(function(p){switch(p.label){case 0:return t=e.ignoreCache,c=r(e,["ignoreCache"]),t?[3,2]:[4,this._getEntryFromCache({scope:c.scope,audience:c.audience||"default",client_id:this.options.client_id,getDetailedEntry:e.detailedResponse})];case 1:if(a=p.sent())return[2,a];p.label=2;case 2:return[4,(y=function(){return Ya.acquireLock(Ha,5e3)},v=10,void 0===v&&(v=3),o(void 0,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:e=0,t.label=1;case 1:return e<v?[4,y()]:[3,4];case 2:if(t.sent())return[2,!0];t.label=3;case 3:return e++,[3,1];case 4:return[2,!1]}}))})))];case 3:if(!p.sent())return[3,15];p.label=4;case 4:return p.trys.push([4,,12,14]),t?[3,6]:[4,this._getEntryFromCache({scope:c.scope,audience:c.audience||"default",client_id:this.options.client_id,getDetailedEntry:e.detailedResponse})];case 5:if(a=p.sent())return[2,a];p.label=6;case 6:return this.options.useRefreshTokens?[4,this._getTokenUsingRefreshToken(c)]:[3,8];case 7:return u=p.sent(),[3,10];case 8:return[4,this._getTokenFromIFrame(c)];case 9:u=p.sent(),p.label=10;case 10:return s=u,[4,this.cacheManager.set(n({client_id:this.options.client_id},s))];case 11:return p.sent(),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),e.detailedResponse?(l=s.id_token,f=s.access_token,d=s.oauthTokenScope,h=s.expires_in,[2,n(n({id_token:l,access_token:f},d?{scope:d}:null),{expires_in:h})]):[2,s.access_token];case 12:return[4,Ya.releaseLock(Ha)];case 13:return p.sent(),[7];case 14:return[3,16];case 15:throw new Mc;case 16:return[2]}var y,v}))}))},e.prototype.getTokenWithPopup=function(e,t){return void 0===e&&(e={}),void 0===t&&(t={}),o(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return e.audience=e.audience||this.options.audience,e.scope=ma(this.defaultScope,this.scope,e.scope),t=n(n({},Uc),t),[4,this.loginWithPopup(e,t)];case 1:return r.sent(),[4,this.cacheManager.get(new ga({scope:e.scope,audience:e.audience||"default",client_id:this.options.client_id}))];case 2:return[2,r.sent().access_token]}}))}))},e.prototype.isAuthenticated=function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.getUser()];case 1:return[2,!!e.sent()]}}))}))},e.prototype.buildLogoutUrl=function(e){void 0===e&&(e={}),null!==e.client_id?e.client_id=e.client_id||this.options.client_id:delete e.client_id;var t=e.federated,n=r(e,["federated"]),o=t?"&federated":"";return this._url("/v2/logout?".concat(ia(n)))+o},e.prototype.logout=function(e){var t=this;void 0===e&&(e={});var n=e.localOnly,o=r(e,["localOnly"]);if(n&&o.federated)throw new Error("It is invalid to set both the `federated` and `localOnly` options to `true`");var i=function(){if(t.cookieStorage.remove(t.orgHintCookieName),t.cookieStorage.remove(t.isAuthenticatedCookieName),!n){var e=t.buildLogoutUrl(o);window.location.assign(e)}};if(this.options.cache)return this.cacheManager.clear().then((function(){return i()}));this.cacheManager.clearSync(),i()},e.prototype._getTokenFromIFrame=function(e){return o(this,void 0,void 0,(function(){var t,o,c,a,s,u,l,f,d,h,p,y,v,m,b,g,w;return i(this,(function(i){switch(i.label){case 0:return t=oa(ra()),o=oa(ra()),c=ra(),[4,ca(c)];case 1:a=i.sent(),s=sa(a),u=r(e,["detailedResponse"]),l=this._getParams(u,t,o,s,e.redirect_uri||this.options.redirect_uri||window.location.origin),(f=this.cookieStorage.get(this.orgHintCookieName))&&!l.organization&&(l.organization=f),d=this._authorizeUrl(n(n({},l),{prompt:"none",response_mode:"web_message"})),i.label=2;case 2:if(i.trys.push([2,6,,7]),window.crossOriginIsolated)throw new Vc("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");return h=e.timeoutInSeconds||this.options.authorizeTimeoutInSeconds,[4,(S=d,k=this.domainUrl,_=h,void 0===_&&(_=60),new Promise((function(e,t){var n=window.document.createElement("iframe");n.setAttribute("width","0"),n.setAttribute("height","0"),n.style.display="none";var r,o=function(){window.document.body.contains(n)&&(window.document.body.removeChild(n),window.removeEventListener("message",r,!1))},i=setTimeout((function(){t(new Mc),o()}),1e3*_);r=function(n){if(n.origin==k&&n.data&&"authorization_response"===n.data.type){var c=n.source;c&&c.close(),n.data.response.error?t(Vc.fromPayload(n.data.response)):e(n.data.response),clearTimeout(i),window.removeEventListener("message",r,!1),setTimeout(o,2e3)}},window.addEventListener("message",r,!1),window.document.body.appendChild(n),n.setAttribute("src",S)})))];case 3:if(p=i.sent(),t!==p.state)throw new Error("Invalid state");return y=e.scope,v=e.audience,m=r(e,["scope","audience","redirect_uri","ignoreCache","timeoutInSeconds","detailedResponse"]),[4,ya(n(n(n({},this.customOptions),m),{scope:y,audience:v,baseUrl:this.domainUrl,client_id:this.options.client_id,code_verifier:c,code:p.code,grant_type:"authorization_code",redirect_uri:l.redirect_uri,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:m.timeout||this.httpTimeoutMs}),this.worker)];case 4:return b=i.sent(),[4,this._verifyIdToken(b.id_token,o)];case 5:return g=i.sent(),this._processOrgIdHint(g.claims.org_id),[2,n(n({},b),{decodedToken:g,scope:l.scope,oauthTokenScope:b.scope,audience:l.audience||"default"})];case 6:throw"login_required"===(w=i.sent()).error&&this.logout({localOnly:!0}),w;case 7:return[2]}var S,k,_}))}))},e.prototype._getTokenUsingRefreshToken=function(e){return o(this,void 0,void 0,(function(){var t,o,c,a,s,u,l,f,d;return i(this,(function(i){switch(i.label){case 0:return e.scope=ma(this.defaultScope,this.options.scope,e.scope),[4,this.cacheManager.get(new ga({scope:e.scope,audience:e.audience||"default",client_id:this.options.client_id}))];case 1:return(t=i.sent())&&t.refresh_token||this.worker?[3,4]:this.useRefreshTokensFallback?[4,this._getTokenFromIFrame(e)]:[3,3];case 2:return[2,i.sent()];case 3:throw new $c(e.audience||"default",e.scope);case 4:o=e.redirect_uri||this.options.redirect_uri||window.location.origin,a=e.scope,s=e.audience,u=r(e,["scope","audience","ignoreCache","timeoutInSeconds","detailedResponse"]),l="number"==typeof e.timeoutInSeconds?1e3*e.timeoutInSeconds:null,i.label=5;case 5:return i.trys.push([5,7,,10]),[4,ya(n(n(n(n(n({},this.customOptions),u),{audience:s,scope:a,baseUrl:this.domainUrl,client_id:this.options.client_id,grant_type:"refresh_token",refresh_token:t&&t.refresh_token,redirect_uri:o}),l&&{timeout:l}),{auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs}),this.worker)];case 6:return c=i.sent(),[3,10];case 7:return((f=i.sent()).message.indexOf("Missing Refresh Token")>-1||f.message&&f.message.indexOf("invalid refresh token")>-1)&&this.useRefreshTokensFallback?[4,this._getTokenFromIFrame(e)]:[3,9];case 8:return[2,i.sent()];case 9:throw f;case 10:return[4,this._verifyIdToken(c.id_token)];case 11:return d=i.sent(),[2,n(n({},c),{decodedToken:d,scope:e.scope,oauthTokenScope:c.scope,audience:e.audience||"default"})]}}))}))},e.prototype._getEntryFromCache=function(e){var t=e.scope,r=e.audience,c=e.client_id,a=e.getDetailedEntry,s=void 0!==a&&a;return o(this,void 0,void 0,(function(){var e,o,a,u,l;return i(this,(function(i){switch(i.label){case 0:return[4,this.cacheManager.get(new ga({scope:t,audience:r,client_id:c}),60)];case 1:return(e=i.sent())&&e.access_token?s?(o=e.id_token,a=e.access_token,u=e.oauthTokenScope,l=e.expires_in,[2,n(n({id_token:o,access_token:a},u?{scope:u}:null),{expires_in:l})]):[2,e.access_token]:[2]}}))}))},e}();function Ba(e){return o(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,(t=new Ma(e)).checkSession()];case 1:return n.sent(),[2,t]}}))}))}var Qa=Ba;return Qa.Auth0Client=Ma,Qa.createAuth0Client=Ba,Qa.GenericError=Vc,Qa.AuthenticationError=zc,Qa.TimeoutError=Mc,Qa.PopupTimeoutError=Bc,Qa.MfaRequiredError=qc,Qa})),"Auth0Client"in this&&this.console&&this.console.warn&&this.console.warn("Auth0Client already declared on the global namespace"),this&&this.createAuth0Client&&(this.Auth0Client=this.Auth0Client||this.createAuth0Client.Auth0Client);
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).createAuth0Client=t()}(this,(function(){"use strict";var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};function t(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var n=function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};function r(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function o(e,t,n,r){return new(n||(n=Promise))((function(o,i){function c(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(c,a)}s((r=r.apply(e,t||[])).next())}))}function i(e,t){var n,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=c.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=t.call(e,c)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function c(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)c.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return c}function a(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function u(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function l(e,t){return e(t={exports:{}},t.exports),t.exports}var f,d,h=function(e){return e&&e.Math==Math&&e},p=h("object"==typeof globalThis&&globalThis)||h("object"==typeof window&&window)||h("object"==typeof self&&self)||h("object"==typeof s&&s)||function(){return this}()||Function("return this")(),y=function(e){try{return!!e()}catch(e){return!0}},v=!y((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),m=!y((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),b=Function.prototype.call,g=m?b.bind(b):function(){return b.apply(b,arguments)},w={}.propertyIsEnumerable,S=Object.getOwnPropertyDescriptor,k=S&&!w.call({1:2},1)?function(e){var t=S(this,e);return!!t&&t.enumerable}:w,_={f:k},I=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},x=Function.prototype,O=x.bind,T=x.call,C=m&&O.bind(T,T),j=m?function(e){return e&&C(e)}:function(e){return e&&function(){return T.apply(e,arguments)}},R=j({}.toString),E=j("".slice),L=function(e){return E(R(e),8,-1)},W=Object,Z=j("".split),A=y((function(){return!W("z").propertyIsEnumerable(0)}))?function(e){return"String"==L(e)?Z(e,""):W(e)}:W,G=TypeError,P=function(e){if(null==e)throw G("Can't call method on "+e);return e},F=function(e){return A(P(e))},X=function(e){return"function"==typeof e},K=function(e){return"object"==typeof e?null!==e:X(e)},N=function(e){return X(e)?e:void 0},U=function(e,t){return arguments.length<2?N(p[e]):p[e]&&p[e][t]},Y=j({}.isPrototypeOf),H=U("navigator","userAgent")||"",J=p.process,V=p.Deno,D=J&&J.versions||V&&V.version,z=D&&D.v8;z&&(d=(f=z.split("."))[0]>0&&f[0]<4?1:+(f[0]+f[1])),!d&&H&&(!(f=H.match(/Edge\/(\d+)/))||f[1]>=74)&&(f=H.match(/Chrome\/(\d+)/))&&(d=+f[1]);var M=d,B=!!Object.getOwnPropertySymbols&&!y((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&M&&M<41})),Q=B&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,q=Object,$=Q?function(e){return"symbol"==typeof e}:function(e){var t=U("Symbol");return X(t)&&Y(t.prototype,q(e))},ee=String,te=function(e){try{return ee(e)}catch(e){return"Object"}},ne=TypeError,re=function(e){if(X(e))return e;throw ne(te(e)+" is not a function")},oe=function(e,t){var n=e[t];return null==n?void 0:re(n)},ie=TypeError,ce=Object.defineProperty,ae=function(e,t){try{ce(p,e,{value:t,configurable:!0,writable:!0})}catch(n){p[e]=t}return t},se="__core-js_shared__",ue=p[se]||ae(se,{}),le=l((function(e){(e.exports=function(e,t){return ue[e]||(ue[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.23.2",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.2/LICENSE",source:"https://github.com/zloirock/core-js"})})),fe=Object,de=function(e){return fe(P(e))},he=j({}.hasOwnProperty),pe=Object.hasOwn||function(e,t){return he(de(e),t)},ye=0,ve=Math.random(),me=j(1..toString),be=function(e){return"Symbol("+(void 0===e?"":e)+")_"+me(++ye+ve,36)},ge=le("wks"),we=p.Symbol,Se=we&&we.for,ke=Q?we:we&&we.withoutSetter||be,_e=function(e){if(!pe(ge,e)||!B&&"string"!=typeof ge[e]){var t="Symbol."+e;B&&pe(we,e)?ge[e]=we[e]:ge[e]=Q&&Se?Se(t):ke(t)}return ge[e]},Ie=TypeError,xe=_e("toPrimitive"),Oe=function(e,t){if(!K(e)||$(e))return e;var n,r=oe(e,xe);if(r){if(void 0===t&&(t="default"),n=g(r,e,t),!K(n)||$(n))return n;throw Ie("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var n,r;if("string"===t&&X(n=e.toString)&&!K(r=g(n,e)))return r;if(X(n=e.valueOf)&&!K(r=g(n,e)))return r;if("string"!==t&&X(n=e.toString)&&!K(r=g(n,e)))return r;throw ie("Can't convert object to primitive value")}(e,t)},Te=function(e){var t=Oe(e,"string");return $(t)?t:t+""},Ce=p.document,je=K(Ce)&&K(Ce.createElement),Re=function(e){return je?Ce.createElement(e):{}},Ee=!v&&!y((function(){return 7!=Object.defineProperty(Re("div"),"a",{get:function(){return 7}}).a})),Le=Object.getOwnPropertyDescriptor,We={f:v?Le:function(e,t){if(e=F(e),t=Te(t),Ee)try{return Le(e,t)}catch(e){}if(pe(e,t))return I(!g(_.f,e,t),e[t])}},Ze=v&&y((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ae=String,Ge=TypeError,Pe=function(e){if(K(e))return e;throw Ge(Ae(e)+" is not an object")},Fe=TypeError,Xe=Object.defineProperty,Ke=Object.getOwnPropertyDescriptor,Ne="enumerable",Ue="configurable",Ye="writable",He={f:v?Ze?function(e,t,n){if(Pe(e),t=Te(t),Pe(n),"function"==typeof e&&"prototype"===t&&"value"in n&&Ye in n&&!n.writable){var r=Ke(e,t);r&&r.writable&&(e[t]=n.value,n={configurable:Ue in n?n.configurable:r.configurable,enumerable:Ne in n?n.enumerable:r.enumerable,writable:!1})}return Xe(e,t,n)}:Xe:function(e,t,n){if(Pe(e),t=Te(t),Pe(n),Ee)try{return Xe(e,t,n)}catch(e){}if("get"in n||"set"in n)throw Fe("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},Je=v?function(e,t,n){return He.f(e,t,I(1,n))}:function(e,t,n){return e[t]=n,e},Ve=Function.prototype,De=v&&Object.getOwnPropertyDescriptor,ze=pe(Ve,"name"),Me={EXISTS:ze,PROPER:ze&&"something"===function(){}.name,CONFIGURABLE:ze&&(!v||v&&De(Ve,"name").configurable)},Be=j(Function.toString);X(ue.inspectSource)||(ue.inspectSource=function(e){return Be(e)});var Qe,qe,$e,et=ue.inspectSource,tt=p.WeakMap,nt=X(tt)&&/native code/.test(et(tt)),rt=le("keys"),ot=function(e){return rt[e]||(rt[e]=be(e))},it={},ct="Object already initialized",at=p.TypeError,st=p.WeakMap;if(nt||ue.state){var ut=ue.state||(ue.state=new st),lt=j(ut.get),ft=j(ut.has),dt=j(ut.set);Qe=function(e,t){if(ft(ut,e))throw new at(ct);return t.facade=e,dt(ut,e,t),t},qe=function(e){return lt(ut,e)||{}},$e=function(e){return ft(ut,e)}}else{var ht=ot("state");it[ht]=!0,Qe=function(e,t){if(pe(e,ht))throw new at(ct);return t.facade=e,Je(e,ht,t),t},qe=function(e){return pe(e,ht)?e[ht]:{}},$e=function(e){return pe(e,ht)}}var pt={set:Qe,get:qe,has:$e,enforce:function(e){return $e(e)?qe(e):Qe(e,{})},getterFor:function(e){return function(t){var n;if(!K(t)||(n=qe(t)).type!==e)throw at("Incompatible receiver, "+e+" required");return n}}},yt=l((function(e){var t=Me.CONFIGURABLE,n=pt.enforce,r=pt.get,o=Object.defineProperty,i=v&&!y((function(){return 8!==o((function(){}),"length",{value:8}).length})),c=String(String).split("String"),a=e.exports=function(e,r,a){"Symbol("===String(r).slice(0,7)&&(r="["+String(r).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),a&&a.getter&&(r="get "+r),a&&a.setter&&(r="set "+r),(!pe(e,"name")||t&&e.name!==r)&&o(e,"name",{value:r,configurable:!0}),i&&a&&pe(a,"arity")&&e.length!==a.arity&&o(e,"length",{value:a.arity});try{a&&pe(a,"constructor")&&a.constructor?v&&o(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var s=n(e);return pe(s,"source")||(s.source=c.join("string"==typeof r?r:"")),e};Function.prototype.toString=a((function(){return X(this)&&r(this).source||et(this)}),"toString")})),vt=function(e,t,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:t;return X(n)&&yt(n,i,r),r.global?o?e[t]=n:ae(t,n):(r.unsafe?e[t]&&(o=!0):delete e[t],o?e[t]=n:He.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})),e},mt=Math.ceil,bt=Math.floor,gt=Math.trunc||function(e){var t=+e;return(t>0?bt:mt)(t)},wt=function(e){var t=+e;return t!=t||0===t?0:gt(t)},St=Math.max,kt=Math.min,_t=function(e,t){var n=wt(e);return n<0?St(n+t,0):kt(n,t)},It=Math.min,xt=function(e){return e>0?It(wt(e),9007199254740991):0},Ot=function(e){return xt(e.length)},Tt=function(e){return function(t,n,r){var o,i=F(t),c=Ot(i),a=_t(r,c);if(e&&n!=n){for(;c>a;)if((o=i[a++])!=o)return!0}else for(;c>a;a++)if((e||a in i)&&i[a]===n)return e||a||0;return!e&&-1}},Ct={includes:Tt(!0),indexOf:Tt(!1)},jt=Ct.indexOf,Rt=j([].push),Et=function(e,t){var n,r=F(e),o=0,i=[];for(n in r)!pe(it,n)&&pe(r,n)&&Rt(i,n);for(;t.length>o;)pe(r,n=t[o++])&&(~jt(i,n)||Rt(i,n));return i},Lt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Wt=Lt.concat("length","prototype"),Zt={f:Object.getOwnPropertyNames||function(e){return Et(e,Wt)}},At={f:Object.getOwnPropertySymbols},Gt=j([].concat),Pt=U("Reflect","ownKeys")||function(e){var t=Zt.f(Pe(e)),n=At.f;return n?Gt(t,n(e)):t},Ft=function(e,t,n){for(var r=Pt(t),o=He.f,i=We.f,c=0;c<r.length;c++){var a=r[c];pe(e,a)||n&&pe(n,a)||o(e,a,i(t,a))}},Xt=/#|\.prototype\./,Kt=function(e,t){var n=Ut[Nt(e)];return n==Ht||n!=Yt&&(X(t)?y(t):!!t)},Nt=Kt.normalize=function(e){return String(e).replace(Xt,".").toLowerCase()},Ut=Kt.data={},Yt=Kt.NATIVE="N",Ht=Kt.POLYFILL="P",Jt=Kt,Vt=We.f,Dt=function(e,t){var n,r,o,i,c,a=e.target,s=e.global,u=e.stat;if(n=s?p:u?p[a]||ae(a,{}):(p[a]||{}).prototype)for(r in t){if(i=t[r],o=e.dontCallGetSet?(c=Vt(n,r))&&c.value:n[r],!Jt(s?r:a+(u?".":"#")+r,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;Ft(i,o)}(e.sham||o&&o.sham)&&Je(i,"sham",!0),vt(n,r,i,e)}},zt={};zt[_e("toStringTag")]="z";var Mt,Bt="[object z]"===String(zt),Qt=_e("toStringTag"),qt=Object,$t="Arguments"==L(function(){return arguments}()),en=Bt?L:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=qt(e),Qt))?n:$t?L(t):"Object"==(r=L(t))&&X(t.callee)?"Arguments":r},tn=String,nn=function(e){if("Symbol"===en(e))throw TypeError("Cannot convert a Symbol value to a string");return tn(e)},rn=_e("match"),on=TypeError,cn=function(e){if(function(e){var t;return K(e)&&(void 0!==(t=e[rn])?!!t:"RegExp"==L(e))}(e))throw on("The method doesn't accept regular expressions");return e},an=_e("match"),sn=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[an]=!1,"/./"[e](t)}catch(e){}}return!1},un=We.f,ln=j("".startsWith),fn=j("".slice),dn=Math.min,hn=sn("startsWith"),pn=!(hn||(Mt=un(String.prototype,"startsWith"),!Mt||Mt.writable));Dt({target:"String",proto:!0,forced:!pn&&!hn},{startsWith:function(e){var t=nn(P(this));cn(e);var n=xt(dn(arguments.length>1?arguments[1]:void 0,t.length)),r=nn(e);return ln?ln(t,r,n):fn(t,n,n+r.length)===r}});var yn=function(e,t){return j(p[e].prototype[t])};yn("String","startsWith");var vn=Array.isArray||function(e){return"Array"==L(e)},mn=TypeError,bn=function(e){if(e>9007199254740991)throw mn("Maximum allowed index exceeded");return e},gn=function(e,t,n){var r=Te(t);r in e?He.f(e,r,I(0,n)):e[r]=n},wn=function(){},Sn=[],kn=U("Reflect","construct"),_n=/^\s*(?:class|function)\b/,In=j(_n.exec),xn=!_n.exec(wn),On=function(e){if(!X(e))return!1;try{return kn(wn,Sn,e),!0}catch(e){return!1}},Tn=function(e){if(!X(e))return!1;switch(en(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return xn||!!In(_n,et(e))}catch(e){return!0}};Tn.sham=!0;var Cn,jn=!kn||y((function(){var e;return On(On.call)||!On(Object)||!On((function(){e=!0}))||e}))?Tn:On,Rn=_e("species"),En=Array,Ln=function(e,t){return new(function(e){var t;return vn(e)&&(t=e.constructor,(jn(t)&&(t===En||vn(t.prototype))||K(t)&&null===(t=t[Rn]))&&(t=void 0)),void 0===t?En:t}(e))(0===t?0:t)},Wn=_e("species"),Zn=_e("isConcatSpreadable"),An=M>=51||!y((function(){var e=[];return e[Zn]=!1,e.concat()[0]!==e})),Gn=(Cn="concat",M>=51||!y((function(){var e=[];return(e.constructor={})[Wn]=function(){return{foo:1}},1!==e[Cn](Boolean).foo}))),Pn=function(e){if(!K(e))return!1;var t=e[Zn];return void 0!==t?!!t:vn(e)};Dt({target:"Array",proto:!0,arity:1,forced:!An||!Gn},{concat:function(e){var t,n,r,o,i,c=de(this),a=Ln(c,0),s=0;for(t=-1,r=arguments.length;t<r;t++)if(Pn(i=-1===t?c:arguments[t]))for(o=Ot(i),bn(s+o),n=0;n<o;n++,s++)n in i&&gn(a,s,i[n]);else bn(s+1),gn(a,s++,i);return a.length=s,a}});var Fn=Bt?{}.toString:function(){return"[object "+en(this)+"]"};Bt||vt(Object.prototype,"toString",Fn,{unsafe:!0});var Xn,Kn=Object.keys||function(e){return Et(e,Lt)},Nn=v&&!Ze?Object.defineProperties:function(e,t){Pe(e);for(var n,r=F(t),o=Kn(t),i=o.length,c=0;i>c;)He.f(e,n=o[c++],r[n]);return e},Un={f:Nn},Yn=U("document","documentElement"),Hn=ot("IE_PROTO"),Jn=function(){},Vn=function(e){return"<script>"+e+"</"+"script>"},Dn=function(e){e.write(Vn("")),e.close();var t=e.parentWindow.Object;return e=null,t},zn=function(){try{Xn=new ActiveXObject("htmlfile")}catch(e){}var e,t;zn="undefined"!=typeof document?document.domain&&Xn?Dn(Xn):((t=Re("iframe")).style.display="none",Yn.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Vn("document.F=Object")),e.close(),e.F):Dn(Xn);for(var n=Lt.length;n--;)delete zn.prototype[Lt[n]];return zn()};it[Hn]=!0;var Mn=Object.create||function(e,t){var n;return null!==e?(Jn.prototype=Pe(e),n=new Jn,Jn.prototype=null,n[Hn]=e):n=zn(),void 0===t?n:Un.f(n,t)},Bn=Array,Qn=Math.max,qn=Zt.f,$n="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],er=function(e){try{return qn(e)}catch(e){return function(e,t,n){for(var r=Ot(e),o=_t(t,r),i=_t(void 0===n?r:n,r),c=Bn(Qn(i-o,0)),a=0;o<i;o++,a++)gn(c,a,e[o]);return c.length=a,c}($n)}},tr={f:function(e){return $n&&"Window"==L(e)?er(e):qn(F(e))}},nr={f:_e},rr=p,or=He.f,ir=function(e){var t=rr.Symbol||(rr.Symbol={});pe(t,e)||or(t,e,{value:nr.f(e)})},cr=function(){var e=U("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=_e("toPrimitive");t&&!t[r]&&vt(t,r,(function(e){return g(n,this)}),{arity:1})},ar=He.f,sr=_e("toStringTag"),ur=function(e,t,n){e&&!n&&(e=e.prototype),e&&!pe(e,sr)&&ar(e,sr,{configurable:!0,value:t})},lr=j(j.bind),fr=function(e,t){return re(e),void 0===t?e:m?lr(e,t):function(){return e.apply(t,arguments)}},dr=j([].push),hr=function(e){var t=1==e,n=2==e,r=3==e,o=4==e,i=6==e,c=7==e,a=5==e||i;return function(s,u,l,f){for(var d,h,p=de(s),y=A(p),v=fr(u,l),m=Ot(y),b=0,g=f||Ln,w=t?g(s,m):n||c?g(s,0):void 0;m>b;b++)if((a||b in y)&&(h=v(d=y[b],b,p),e))if(t)w[b]=h;else if(h)switch(e){case 3:return!0;case 5:return d;case 6:return b;case 2:dr(w,d)}else switch(e){case 4:return!1;case 7:dr(w,d)}return i?-1:r||o?o:w}},pr={forEach:hr(0),map:hr(1),filter:hr(2),some:hr(3),every:hr(4),find:hr(5),findIndex:hr(6),filterReject:hr(7)}.forEach,yr=ot("hidden"),vr="Symbol",mr=pt.set,br=pt.getterFor(vr),gr=Object.prototype,wr=p.Symbol,Sr=wr&&wr.prototype,kr=p.TypeError,_r=p.QObject,Ir=We.f,xr=He.f,Or=tr.f,Tr=_.f,Cr=j([].push),jr=le("symbols"),Rr=le("op-symbols"),Er=le("wks"),Lr=!_r||!_r.prototype||!_r.prototype.findChild,Wr=v&&y((function(){return 7!=Mn(xr({},"a",{get:function(){return xr(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=Ir(gr,t);r&&delete gr[t],xr(e,t,n),r&&e!==gr&&xr(gr,t,r)}:xr,Zr=function(e,t){var n=jr[e]=Mn(Sr);return mr(n,{type:vr,tag:e,description:t}),v||(n.description=t),n},Ar=function(e,t,n){e===gr&&Ar(Rr,t,n),Pe(e);var r=Te(t);return Pe(n),pe(jr,r)?(n.enumerable?(pe(e,yr)&&e[yr][r]&&(e[yr][r]=!1),n=Mn(n,{enumerable:I(0,!1)})):(pe(e,yr)||xr(e,yr,I(1,{})),e[yr][r]=!0),Wr(e,r,n)):xr(e,r,n)},Gr=function(e,t){Pe(e);var n=F(t),r=Kn(n).concat(Kr(n));return pr(r,(function(t){v&&!g(Pr,n,t)||Ar(e,t,n[t])})),e},Pr=function(e){var t=Te(e),n=g(Tr,this,t);return!(this===gr&&pe(jr,t)&&!pe(Rr,t))&&(!(n||!pe(this,t)||!pe(jr,t)||pe(this,yr)&&this[yr][t])||n)},Fr=function(e,t){var n=F(e),r=Te(t);if(n!==gr||!pe(jr,r)||pe(Rr,r)){var o=Ir(n,r);return!o||!pe(jr,r)||pe(n,yr)&&n[yr][r]||(o.enumerable=!0),o}},Xr=function(e){var t=Or(F(e)),n=[];return pr(t,(function(e){pe(jr,e)||pe(it,e)||Cr(n,e)})),n},Kr=function(e){var t=e===gr,n=Or(t?Rr:F(e)),r=[];return pr(n,(function(e){!pe(jr,e)||t&&!pe(gr,e)||Cr(r,jr[e])})),r};B||(wr=function(){if(Y(Sr,this))throw kr("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?nn(arguments[0]):void 0,t=be(e),n=function(e){this===gr&&g(n,Rr,e),pe(this,yr)&&pe(this[yr],t)&&(this[yr][t]=!1),Wr(this,t,I(1,e))};return v&&Lr&&Wr(gr,t,{configurable:!0,set:n}),Zr(t,e)},Sr=wr.prototype,vt(Sr,"toString",(function(){return br(this).tag})),vt(wr,"withoutSetter",(function(e){return Zr(be(e),e)})),_.f=Pr,He.f=Ar,Un.f=Gr,We.f=Fr,Zt.f=tr.f=Xr,At.f=Kr,nr.f=function(e){return Zr(_e(e),e)},v&&(xr(Sr,"description",{configurable:!0,get:function(){return br(this).description}}),vt(gr,"propertyIsEnumerable",Pr,{unsafe:!0}))),Dt({global:!0,constructor:!0,wrap:!0,forced:!B,sham:!B},{Symbol:wr}),pr(Kn(Er),(function(e){ir(e)})),Dt({target:vr,stat:!0,forced:!B},{useSetter:function(){Lr=!0},useSimple:function(){Lr=!1}}),Dt({target:"Object",stat:!0,forced:!B,sham:!v},{create:function(e,t){return void 0===t?Mn(e):Gr(Mn(e),t)},defineProperty:Ar,defineProperties:Gr,getOwnPropertyDescriptor:Fr}),Dt({target:"Object",stat:!0,forced:!B},{getOwnPropertyNames:Xr}),cr(),ur(wr,vr),it[yr]=!0;var Nr=B&&!!Symbol.for&&!!Symbol.keyFor,Ur=le("string-to-symbol-registry"),Yr=le("symbol-to-string-registry");Dt({target:"Symbol",stat:!0,forced:!Nr},{for:function(e){var t=nn(e);if(pe(Ur,t))return Ur[t];var n=U("Symbol")(t);return Ur[t]=n,Yr[n]=t,n}});var Hr=le("symbol-to-string-registry");Dt({target:"Symbol",stat:!0,forced:!Nr},{keyFor:function(e){if(!$(e))throw TypeError(te(e)+" is not a symbol");if(pe(Hr,e))return Hr[e]}});var Jr=Function.prototype,Vr=Jr.apply,Dr=Jr.call,zr="object"==typeof Reflect&&Reflect.apply||(m?Dr.bind(Vr):function(){return Dr.apply(Vr,arguments)}),Mr=j([].slice),Br=U("JSON","stringify"),Qr=j(/./.exec),qr=j("".charAt),$r=j("".charCodeAt),eo=j("".replace),to=j(1..toString),no=/[\uD800-\uDFFF]/g,ro=/^[\uD800-\uDBFF]$/,oo=/^[\uDC00-\uDFFF]$/,io=!B||y((function(){var e=U("Symbol")();return"[null]"!=Br([e])||"{}"!=Br({a:e})||"{}"!=Br(Object(e))})),co=y((function(){return'"\\udf06\\ud834"'!==Br("\udf06\ud834")||'"\\udead"'!==Br("\udead")})),ao=function(e,t){var n=Mr(arguments),r=t;if((K(t)||void 0!==e)&&!$(e))return vn(t)||(t=function(e,t){if(X(r)&&(t=g(r,this,e,t)),!$(t))return t}),n[1]=t,zr(Br,null,n)},so=function(e,t,n){var r=qr(n,t-1),o=qr(n,t+1);return Qr(ro,e)&&!Qr(oo,o)||Qr(oo,e)&&!Qr(ro,r)?"\\u"+to($r(e,0),16):e};Br&&Dt({target:"JSON",stat:!0,arity:3,forced:io||co},{stringify:function(e,t,n){var r=Mr(arguments),o=zr(io?ao:Br,null,r);return co&&"string"==typeof o?eo(o,no,so):o}});var uo=!B||y((function(){At.f(1)}));Dt({target:"Object",stat:!0,forced:uo},{getOwnPropertySymbols:function(e){var t=At.f;return t?t(de(e)):[]}}),ir("asyncIterator");var lo=He.f,fo=p.Symbol,ho=fo&&fo.prototype;if(v&&X(fo)&&(!("description"in ho)||void 0!==fo().description)){var po={},yo=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:nn(arguments[0]),t=Y(ho,this)?new fo(e):void 0===e?fo():fo(e);return""===e&&(po[t]=!0),t};Ft(yo,fo),yo.prototype=ho,ho.constructor=yo;var vo="Symbol(test)"==String(fo("test")),mo=j(ho.toString),bo=j(ho.valueOf),go=/^Symbol\((.*)\)[^)]+$/,wo=j("".replace),So=j("".slice);lo(ho,"description",{configurable:!0,get:function(){var e=bo(this),t=mo(e);if(pe(po,e))return"";var n=vo?So(t,7,-1):wo(t,go,"$1");return""===n?void 0:n}}),Dt({global:!0,constructor:!0,forced:!0},{Symbol:yo})}ir("hasInstance"),ir("isConcatSpreadable"),ir("iterator"),ir("match"),ir("matchAll"),ir("replace"),ir("search"),ir("species"),ir("split"),ir("toPrimitive"),cr(),ir("toStringTag"),ur(U("Symbol"),"Symbol"),ir("unscopables"),ur(p.JSON,"JSON",!0),ur(Math,"Math",!0),Dt({global:!0},{Reflect:{}}),ur(p.Reflect,"Reflect",!0),rr.Symbol;var ko,_o,Io,xo=j("".charAt),Oo=j("".charCodeAt),To=j("".slice),Co=function(e){return function(t,n){var r,o,i=nn(P(t)),c=wt(n),a=i.length;return c<0||c>=a?e?"":void 0:(r=Oo(i,c))<55296||r>56319||c+1===a||(o=Oo(i,c+1))<56320||o>57343?e?xo(i,c):r:e?To(i,c,c+2):o-56320+(r-55296<<10)+65536}},jo={codeAt:Co(!1),charAt:Co(!0)},Ro=!y((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Eo=ot("IE_PROTO"),Lo=Object,Wo=Lo.prototype,Zo=Ro?Lo.getPrototypeOf:function(e){var t=de(e);if(pe(t,Eo))return t[Eo];var n=t.constructor;return X(n)&&t instanceof n?n.prototype:t instanceof Lo?Wo:null},Ao=_e("iterator"),Go=!1;[].keys&&("next"in(Io=[].keys())?(_o=Zo(Zo(Io)))!==Object.prototype&&(ko=_o):Go=!0);var Po=null==ko||y((function(){var e={};return ko[Ao].call(e)!==e}));Po&&(ko={}),X(ko[Ao])||vt(ko,Ao,(function(){return this}));var Fo={IteratorPrototype:ko,BUGGY_SAFARI_ITERATORS:Go},Xo={},Ko=Fo.IteratorPrototype,No=function(){return this},Uo=String,Yo=TypeError,Ho=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=j(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Pe(n),function(e){if("object"==typeof e||X(e))return e;throw Yo("Can't set "+Uo(e)+" as a prototype")}(r),t?e(n,r):n.__proto__=r,n}}():void 0),Jo=Me.PROPER,Vo=Me.CONFIGURABLE,Do=Fo.IteratorPrototype,zo=Fo.BUGGY_SAFARI_ITERATORS,Mo=_e("iterator"),Bo="keys",Qo="values",qo="entries",$o=function(){return this},ei=function(e,t,n,r,o,i,c){!function(e,t,n,r){var o=t+" Iterator";e.prototype=Mn(Ko,{next:I(+!r,n)}),ur(e,o,!1),Xo[o]=No}(n,t,r);var a,s,u,l=function(e){if(e===o&&y)return y;if(!zo&&e in h)return h[e];switch(e){case Bo:case Qo:case qo:return function(){return new n(this,e)}}return function(){return new n(this)}},f=t+" Iterator",d=!1,h=e.prototype,p=h[Mo]||h["@@iterator"]||o&&h[o],y=!zo&&p||l(o),v="Array"==t&&h.entries||p;if(v&&(a=Zo(v.call(new e)))!==Object.prototype&&a.next&&(Zo(a)!==Do&&(Ho?Ho(a,Do):X(a[Mo])||vt(a,Mo,$o)),ur(a,f,!0)),Jo&&o==Qo&&p&&p.name!==Qo&&(Vo?Je(h,"name",Qo):(d=!0,y=function(){return g(p,this)})),o)if(s={values:l(Qo),keys:i?y:l(Bo),entries:l(qo)},c)for(u in s)(zo||d||!(u in h))&&vt(h,u,s[u]);else Dt({target:t,proto:!0,forced:zo||d},s);return h[Mo]!==y&&vt(h,Mo,y,{name:o}),Xo[t]=y,s},ti=jo.charAt,ni="String Iterator",ri=pt.set,oi=pt.getterFor(ni);ei(String,"String",(function(e){ri(this,{type:ni,string:nn(e),index:0})}),(function(){var e,t=oi(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=ti(n,r),t.index+=e.length,{value:e,done:!1})}));var ii=function(e,t,n){var r,o;Pe(e);try{if(!(r=oe(e,"return"))){if("throw"===t)throw n;return n}r=g(r,e)}catch(e){o=!0,r=e}if("throw"===t)throw n;if(o)throw r;return Pe(r),n},ci=function(e,t,n,r){try{return r?t(Pe(n)[0],n[1]):t(n)}catch(t){ii(e,"throw",t)}},ai=_e("iterator"),si=Array.prototype,ui=function(e){return void 0!==e&&(Xo.Array===e||si[ai]===e)},li=_e("iterator"),fi=function(e){if(null!=e)return oe(e,li)||oe(e,"@@iterator")||Xo[en(e)]},di=TypeError,hi=function(e,t){var n=arguments.length<2?fi(e):t;if(re(n))return Pe(g(n,e));throw di(te(e)+" is not iterable")},pi=Array,yi=_e("iterator"),vi=!1;try{var mi=0,bi={next:function(){return{done:!!mi++}},return:function(){vi=!0}};bi[yi]=function(){return this},Array.from(bi,(function(){throw 2}))}catch(e){}var gi=function(e,t){if(!t&&!vi)return!1;var n=!1;try{var r={};r[yi]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},wi=!gi((function(e){Array.from(e)}));Dt({target:"Array",stat:!0,forced:wi},{from:function(e){var t=de(e),n=jn(this),r=arguments.length,o=r>1?arguments[1]:void 0,i=void 0!==o;i&&(o=fr(o,r>2?arguments[2]:void 0));var c,a,s,u,l,f,d=fi(t),h=0;if(!d||this===pi&&ui(d))for(c=Ot(t),a=n?new this(c):pi(c);c>h;h++)f=i?o(t[h],h):t[h],gn(a,h,f);else for(l=(u=hi(t,d)).next,a=n?new this:[];!(s=g(l,u)).done;h++)f=i?ci(u,o,[s.value,h],!0):s.value,gn(a,h,f);return a.length=h,a}}),rr.Array.from;var Si,ki,_i,Ii="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,xi=He.f,Oi=pt.enforce,Ti=pt.get,Ci=p.Int8Array,ji=Ci&&Ci.prototype,Ri=p.Uint8ClampedArray,Ei=Ri&&Ri.prototype,Li=Ci&&Zo(Ci),Wi=ji&&Zo(ji),Zi=Object.prototype,Ai=p.TypeError,Gi=_e("toStringTag"),Pi=be("TYPED_ARRAY_TAG"),Fi="TypedArrayConstructor",Xi=Ii&&!!Ho&&"Opera"!==en(p.opera),Ki=!1,Ni={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Ui={BigInt64Array:8,BigUint64Array:8},Yi=function(e){var t=Zo(e);if(K(t)){var n=Ti(t);return n&&pe(n,Fi)?n.TypedArrayConstructor:Yi(t)}},Hi=function(e){if(!K(e))return!1;var t=en(e);return pe(Ni,t)||pe(Ui,t)};for(Si in Ni)(_i=(ki=p[Si])&&ki.prototype)?Oi(_i).TypedArrayConstructor=ki:Xi=!1;for(Si in Ui)(_i=(ki=p[Si])&&ki.prototype)&&(Oi(_i).TypedArrayConstructor=ki);if((!Xi||!X(Li)||Li===Function.prototype)&&(Li=function(){throw Ai("Incorrect invocation")},Xi))for(Si in Ni)p[Si]&&Ho(p[Si],Li);if((!Xi||!Wi||Wi===Zi)&&(Wi=Li.prototype,Xi))for(Si in Ni)p[Si]&&Ho(p[Si].prototype,Wi);if(Xi&&Zo(Ei)!==Wi&&Ho(Ei,Wi),v&&!pe(Wi,Gi))for(Si in Ki=!0,xi(Wi,Gi,{get:function(){return K(this)?this[Pi]:void 0}}),Ni)p[Si]&&Je(p[Si],Pi,Si);var Ji={NATIVE_ARRAY_BUFFER_VIEWS:Xi,TYPED_ARRAY_TAG:Ki&&Pi,aTypedArray:function(e){if(Hi(e))return e;throw Ai("Target is not a typed array")},aTypedArrayConstructor:function(e){if(X(e)&&(!Ho||Y(Li,e)))return e;throw Ai(te(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(v){if(n)for(var o in Ni){var i=p[o];if(i&&pe(i.prototype,e))try{delete i.prototype[e]}catch(n){try{i.prototype[e]=t}catch(e){}}}Wi[e]&&!n||vt(Wi,e,n?t:Xi&&ji[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,o;if(v){if(Ho){if(n)for(r in Ni)if((o=p[r])&&pe(o,e))try{delete o[e]}catch(e){}if(Li[e]&&!n)return;try{return vt(Li,e,n?t:Xi&&Li[e]||t)}catch(e){}}for(r in Ni)!(o=p[r])||o[e]&&!n||vt(o,e,t)}},getTypedArrayConstructor:Yi,isView:function(e){if(!K(e))return!1;var t=en(e);return"DataView"===t||pe(Ni,t)||pe(Ui,t)},isTypedArray:Hi,TypedArray:Li,TypedArrayPrototype:Wi},Vi=TypeError,Di=_e("species"),zi=function(e,t){var n,r=Pe(e).constructor;return void 0===r||null==(n=Pe(r)[Di])?t:function(e){if(jn(e))return e;throw Vi(te(e)+" is not a constructor")}(n)},Mi=Ji.aTypedArrayConstructor,Bi=Ji.getTypedArrayConstructor,Qi=Ji.aTypedArray;(0,Ji.exportTypedArrayMethod)("slice",(function(e,t){for(var n,r=Mr(Qi(this),e,t),o=Mi(zi(n=this,Bi(n))),i=0,c=r.length,a=new o(c);c>i;)a[i]=r[i++];return a}),y((function(){new Int8Array(1).slice()})));var qi=He.f,$i=_e("unscopables"),ec=Array.prototype;null==ec[$i]&&qi(ec,$i,{configurable:!0,value:Mn(null)});var tc=function(e){ec[$i][e]=!0},nc=Ct.includes,rc=y((function(){return!Array(1).includes()}));Dt({target:"Array",proto:!0,forced:rc},{includes:function(e){return nc(this,e,arguments.length>1?arguments[1]:void 0)}}),tc("includes"),yn("Array","includes");var oc=j("".indexOf);Dt({target:"String",proto:!0,forced:!sn("includes")},{includes:function(e){return!!~oc(nn(P(this)),nn(cn(e)),arguments.length>1?arguments[1]:void 0)}}),yn("String","includes");var ic=He.f,cc="Array Iterator",ac=pt.set,sc=pt.getterFor(cc);ei(Array,"Array",(function(e,t){ac(this,{type:cc,target:F(e),index:0,kind:t})}),(function(){var e=sc(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values");var uc=Xo.Arguments=Xo.Array;if(tc("keys"),tc("values"),tc("entries"),v&&"values"!==uc.name)try{ic(uc,"name",{value:"values"})}catch(e){}var lc=y((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),fc=Object.isExtensible,dc=y((function(){fc(1)}))||lc?function(e){return!!K(e)&&((!lc||"ArrayBuffer"!=L(e))&&(!fc||fc(e)))}:fc,hc=!y((function(){return Object.isExtensible(Object.preventExtensions({}))})),pc=l((function(e){var t=He.f,n=!1,r=be("meta"),o=0,i=function(e){t(e,r,{value:{objectID:"O"+o++,weakData:{}}})},c=e.exports={enable:function(){c.enable=function(){},n=!0;var e=Zt.f,t=j([].splice),o={};o[r]=1,e(o).length&&(Zt.f=function(n){for(var o=e(n),i=0,c=o.length;i<c;i++)if(o[i]===r){t(o,i,1);break}return o},Dt({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:tr.f}))},fastKey:function(e,t){if(!K(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!pe(e,r)){if(!dc(e))return"F";if(!t)return"E";i(e)}return e[r].objectID},getWeakData:function(e,t){if(!pe(e,r)){if(!dc(e))return!0;if(!t)return!1;i(e)}return e[r].weakData},onFreeze:function(e){return hc&&n&&dc(e)&&!pe(e,r)&&i(e),e}};it[r]=!0}));pc.enable,pc.fastKey,pc.getWeakData,pc.onFreeze;var yc=TypeError,vc=function(e,t){this.stopped=e,this.result=t},mc=vc.prototype,bc=function(e,t,n){var r,o,i,c,a,s,u,l=n&&n.that,f=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_ITERATOR),h=!(!n||!n.INTERRUPTED),p=fr(t,l),y=function(e){return r&&ii(r,"normal",e),new vc(!0,e)},v=function(e){return f?(Pe(e),h?p(e[0],e[1],y):p(e[0],e[1])):h?p(e,y):p(e)};if(d)r=e;else{if(!(o=fi(e)))throw yc(te(e)+" is not iterable");if(ui(o)){for(i=0,c=Ot(e);c>i;i++)if((a=v(e[i]))&&Y(mc,a))return a;return new vc(!1)}r=hi(e,o)}for(s=r.next;!(u=g(s,r)).done;){try{a=v(u.value)}catch(e){ii(r,"throw",e)}if("object"==typeof a&&a&&Y(mc,a))return a}return new vc(!1)},gc=TypeError,wc=function(e,t){if(Y(t,e))return e;throw gc("Incorrect invocation")},Sc=function(e,t,n){for(var r in t)vt(e,r,t[r],n);return e},kc=_e("species"),_c=He.f,Ic=pc.fastKey,xc=pt.set,Oc=pt.getterFor,Tc={getConstructor:function(e,t,n,r){var o=e((function(e,o){wc(e,i),xc(e,{type:t,index:Mn(null),first:void 0,last:void 0,size:0}),v||(e.size=0),null!=o&&bc(o,e[r],{that:e,AS_ENTRIES:n})})),i=o.prototype,c=Oc(t),a=function(e,t,n){var r,o,i=c(e),a=s(e,t);return a?a.value=n:(i.last=a={index:o=Ic(t,!0),key:t,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=a),r&&(r.next=a),v?i.size++:e.size++,"F"!==o&&(i.index[o]=a)),e},s=function(e,t){var n,r=c(e),o=Ic(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==t)return n};return Sc(i,{clear:function(){for(var e=c(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,v?e.size=0:this.size=0},delete:function(e){var t=this,n=c(t),r=s(t,e);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first==r&&(n.first=o),n.last==r&&(n.last=i),v?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=c(this),r=fr(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!s(this,e)}}),Sc(i,n?{get:function(e){var t=s(this,e);return t&&t.value},set:function(e,t){return a(this,0===e?0:e,t)}}:{add:function(e){return a(this,e=0===e?0:e,e)}}),v&&_c(i,"size",{get:function(){return c(this).size}}),o},setStrong:function(e,t,n){var r=t+" Iterator",o=Oc(t),i=Oc(r);ei(e,t,(function(e,t){xc(this,{type:r,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),function(e){var t=U(e),n=He.f;v&&t&&!t[kc]&&n(t,kc,{configurable:!0,get:function(){return this}})}(t)}};function Cc(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))}function jc(e){return new this((function(t,n){if(!e||void 0===e.length)return n(new TypeError(typeof e+" "+e+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var r=Array.prototype.slice.call(e);if(0===r.length)return t([]);var o=r.length;function i(e,n){if(n&&("object"==typeof n||"function"==typeof n)){var c=n.then;if("function"==typeof c)return void c.call(n,(function(t){i(e,t)}),(function(n){r[e]={status:"rejected",reason:n},0==--o&&t(r)}))}r[e]={status:"fulfilled",value:n},0==--o&&t(r)}for(var c=0;c<r.length;c++)i(c,r[c])}))}!function(e,t,n){var r=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),i=r?"set":"add",c=p[e],a=c&&c.prototype,s=c,u={},l=function(e){var t=j(a[e]);vt(a,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(o&&!K(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return o&&!K(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(o&&!K(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(Jt(e,!X(c)||!(o||a.forEach&&!y((function(){(new c).entries().next()})))))s=n.getConstructor(t,e,r,i),pc.enable();else if(Jt(e,!0)){var f=new s,d=f[i](o?{}:-0,1)!=f,h=y((function(){f.has(1)})),v=gi((function(e){new c(e)})),m=!o&&y((function(){for(var e=new c,t=5;t--;)e[i](t,t);return!e.has(-0)}));v||((s=t((function(e,t){wc(e,a);var n=function(e,t,n){var r,o;return Ho&&X(r=t.constructor)&&r!==n&&K(o=r.prototype)&&o!==n.prototype&&Ho(e,o),e}(new c,e,s);return null!=t&&bc(t,n[i],{that:n,AS_ENTRIES:r}),n}))).prototype=a,a.constructor=s),(h||m)&&(l("delete"),l("has"),r&&l("get")),(m||d)&&l(i),o&&a.clear&&delete a.clear}u[e]=s,Dt({global:!0,constructor:!0,forced:s!=c},u),ur(s,e),o||n.setStrong(s,e,r)}("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),Tc),rr.Set;var Rc=setTimeout;function Ec(e){return Boolean(e&&void 0!==e.length)}function Lc(){}function Wc(e){if(!(this instanceof Wc))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],Xc(e,this)}function Zc(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,Wc._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(e){return void Gc(t.promise,e)}Ac(t.promise,r)}else(1===e._state?Ac:Gc)(t.promise,e._value)}))):e._deferreds.push(t)}function Ac(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof Wc)return e._state=3,e._value=t,void Pc(e);if("function"==typeof n)return void Xc((r=n,o=t,function(){r.apply(o,arguments)}),e)}e._state=1,e._value=t,Pc(e)}catch(t){Gc(e,t)}var r,o}function Gc(e,t){e._state=2,e._value=t,Pc(e)}function Pc(e){2===e._state&&0===e._deferreds.length&&Wc._immediateFn((function(){e._handled||Wc._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t<n;t++)Zc(e,e._deferreds[t]);e._deferreds=null}function Fc(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function Xc(e,t){var n=!1;try{e((function(e){n||(n=!0,Ac(t,e))}),(function(e){n||(n=!0,Gc(t,e))}))}catch(e){if(n)return;n=!0,Gc(t,e)}}Wc.prototype.catch=function(e){return this.then(null,e)},Wc.prototype.then=function(e,t){var n=new this.constructor(Lc);return Zc(this,new Fc(e,t,n)),n},Wc.prototype.finally=Cc,Wc.all=function(e){return new Wc((function(t,n){if(!Ec(e))return n(new TypeError("Promise.all accepts an array"));var r=Array.prototype.slice.call(e);if(0===r.length)return t([]);var o=r.length;function i(e,c){try{if(c&&("object"==typeof c||"function"==typeof c)){var a=c.then;if("function"==typeof a)return void a.call(c,(function(t){i(e,t)}),n)}r[e]=c,0==--o&&t(r)}catch(e){n(e)}}for(var c=0;c<r.length;c++)i(c,r[c])}))},Wc.allSettled=jc,Wc.resolve=function(e){return e&&"object"==typeof e&&e.constructor===Wc?e:new Wc((function(t){t(e)}))},Wc.reject=function(e){return new Wc((function(t,n){n(e)}))},Wc.race=function(e){return new Wc((function(t,n){if(!Ec(e))return n(new TypeError("Promise.race accepts an array"));for(var r=0,o=e.length;r<o;r++)Wc.resolve(e[r]).then(t,n)}))},Wc._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){Rc(e,0)},Wc._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var Kc=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}();"function"!=typeof Kc.Promise?Kc.Promise=Wc:(Kc.Promise.prototype.finally||(Kc.Promise.prototype.finally=Cc),Kc.Promise.allSettled||(Kc.Promise.allSettled=jc)),function(e){function t(){}function n(e,t){if(e=void 0===e?"utf-8":e,t=void 0===t?{fatal:!1}:t,-1===o.indexOf(e.toLowerCase()))throw new RangeError("Failed to construct 'TextDecoder': The encoding label provided ('"+e+"') is invalid.");if(t.fatal)throw Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.")}function r(e){for(var t=0,n=Math.min(65536,e.length+1),r=new Uint16Array(n),o=[],i=0;;){var c=t<e.length;if(!c||i>=n-1){if(o.push(String.fromCharCode.apply(null,r.subarray(0,i))),!c)return o.join("");e=e.subarray(t),i=t=0}if(0==(128&(c=e[t++])))r[i++]=c;else if(192==(224&c)){var a=63&e[t++];r[i++]=(31&c)<<6|a}else if(224==(240&c)){a=63&e[t++];var s=63&e[t++];r[i++]=(31&c)<<12|a<<6|s}else if(240==(248&c)){65535<(c=(7&c)<<18|(a=63&e[t++])<<12|(s=63&e[t++])<<6|63&e[t++])&&(c-=65536,r[i++]=c>>>10&1023|55296,c=56320|1023&c),r[i++]=c}}}if(e.TextEncoder&&e.TextDecoder)return!1;var o=["utf-8","utf8","unicode-1-1-utf-8"];Object.defineProperty(t.prototype,"encoding",{value:"utf-8"}),t.prototype.encode=function(e,t){if((t=void 0===t?{stream:!1}:t).stream)throw Error("Failed to encode: the 'stream' option is unsupported.");t=0;for(var n=e.length,r=0,o=Math.max(32,n+(n>>>1)+7),i=new Uint8Array(o>>>3<<3);t<n;){var c=e.charCodeAt(t++);if(55296<=c&&56319>=c){if(t<n){var a=e.charCodeAt(t);56320==(64512&a)&&(++t,c=((1023&c)<<10)+(1023&a)+65536)}if(55296<=c&&56319>=c)continue}if(r+4>i.length&&(o+=8,o=(o*=1+t/e.length*2)>>>3<<3,(a=new Uint8Array(o)).set(i),i=a),0==(4294967168&c))i[r++]=c;else{if(0==(4294965248&c))i[r++]=c>>>6&31|192;else if(0==(4294901760&c))i[r++]=c>>>12&15|224,i[r++]=c>>>6&63|128;else{if(0!=(4292870144&c))continue;i[r++]=c>>>18&7|240,i[r++]=c>>>12&63|128,i[r++]=c>>>6&63|128}i[r++]=63&c|128}}return i.slice?i.slice(0,r):i.subarray(0,r)},Object.defineProperty(n.prototype,"encoding",{value:"utf-8"}),Object.defineProperty(n.prototype,"fatal",{value:!1}),Object.defineProperty(n.prototype,"ignoreBOM",{value:!1});var i=r;"function"==typeof Buffer&&Buffer.from?i=function(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf-8")}:"function"==typeof Blob&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&(i=function(e){try{var t=URL.createObjectURL(new Blob([e],{type:"text/plain;charset=UTF-8"})),n=new XMLHttpRequest;return n.open("GET",t,!1),n.send(),n.responseText}catch(t){return r(e)}finally{t&&URL.revokeObjectURL(t)}}),n.prototype.decode=function(e,t){if((t=void 0===t?{stream:!1}:t).stream)throw Error("Failed to decode: the 'stream' option is unsupported.");return e=e instanceof Uint8Array?e:e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer):new Uint8Array(e),i(e)},e.TextEncoder=t,e.TextDecoder=n}("undefined"!=typeof window?window:s),function(){function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function n(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?a(e):t}function l(e){var t=c();return function(){var n,r=o(e);if(t){var i=o(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return u(this,n)}}function f(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=o(e)););return e}function d(e,t,n){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=f(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}},d(e,t,n||e)}var h=function(){function t(){e(this,t),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return n(t,[{key:"addEventListener",value:function(e,t,n){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:n})}},{key:"removeEventListener",value:function(e,t){if(e in this.listeners)for(var n=this.listeners[e],r=0,o=n.length;r<o;r++)if(n[r].callback===t)return void n.splice(r,1)}},{key:"dispatchEvent",value:function(e){if(e.type in this.listeners){for(var t=this.listeners[e.type].slice(),n=0,r=t.length;n<r;n++){var o=t[n];try{o.callback.call(this,e)}catch(e){Promise.resolve().then((function(){throw e}))}o.options&&o.options.once&&this.removeEventListener(e.type,o.callback)}return!e.defaultPrevented}}}]),t}(),p=function(t){r(c,t);var i=l(c);function c(){var t;return e(this,c),(t=i.call(this)).listeners||h.call(a(t)),Object.defineProperty(a(t),"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(a(t),"onabort",{value:null,writable:!0,configurable:!0}),t}return n(c,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(e){"abort"===e.type&&(this.aborted=!0,"function"==typeof this.onabort&&this.onabort.call(this,e)),d(o(c.prototype),"dispatchEvent",this).call(this,e)}}]),c}(h),y=function(){function t(){e(this,t),Object.defineProperty(this,"signal",{value:new p,writable:!0,configurable:!0})}return n(t,[{key:"abort",value:function(){var e;try{e=new Event("abort")}catch(t){"undefined"!=typeof document?document.createEvent?(e=document.createEvent("Event")).initEvent("abort",!1,!1):(e=document.createEventObject()).type="abort":e={type:"abort",bubbles:!1,cancelable:!1}}this.signal.dispatchEvent(e)}},{key:"toString",value:function(){return"[object AbortController]"}}]),t}();function v(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):"function"==typeof e.Request&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}"undefined"!=typeof Symbol&&Symbol.toStringTag&&(y.prototype[Symbol.toStringTag]="AbortController",p.prototype[Symbol.toStringTag]="AbortSignal"),function(e){v(e)&&(e.AbortController=y,e.AbortSignal=p)}("undefined"!=typeof self?self:s)}();var Nc=l((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){var e=this;this.locked=new Map,this.addToLocked=function(t,n){var r=e.locked.get(t);void 0===r?void 0===n?e.locked.set(t,[]):e.locked.set(t,[n]):void 0!==n&&(r.unshift(n),e.locked.set(t,r))},this.isLocked=function(t){return e.locked.has(t)},this.lock=function(t){return new Promise((function(n,r){e.isLocked(t)?e.addToLocked(t,n):(e.addToLocked(t),n())}))},this.unlock=function(t){var n=e.locked.get(t);if(void 0!==n&&0!==n.length){var r=n.pop();e.locked.set(t,n),void 0!==r&&setTimeout(r,0)}else e.locked.delete(t)}}return e.getInstance=function(){return void 0===e.instance&&(e.instance=new e),e.instance},e}();t.default=function(){return n.getInstance()}}));u(Nc);var Uc=l((function(e,t){var n=s&&s.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function c(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(c,a)}s((r=r.apply(e,t||[])).next())}))},r=s&&s.__generator||function(e,t){var n,r,o,i,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;c;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return c.label++,{value:i[1],done:!1};case 5:c.label++,r=i[1],i=[0];continue;case 7:i=c.ops.pop(),c.trys.pop();continue;default:if(!(o=c.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){c=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){c.label=i[1];break}if(6===i[0]&&c.label<o[1]){c.label=o[1],o=i;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(i);break}o[2]&&c.ops.pop(),c.trys.pop();continue}i=t.call(e,c)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0});var o="browser-tabs-lock-key";function i(e){return new Promise((function(t){return setTimeout(t,e)}))}function c(e){for(var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",n="",r=0;r<e;r++){n+=t[Math.floor(Math.random()*t.length)]}return n}var a=function(){function e(){this.acquiredIatSet=new Set,this.id=Date.now().toString()+c(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),void 0===e.waiters&&(e.waiters=[])}return e.prototype.acquireLock=function(t,a){return void 0===a&&(a=5e3),n(this,void 0,void 0,(function(){var n,s,u,l,f,d;return r(this,(function(r){switch(r.label){case 0:n=Date.now()+c(4),s=Date.now()+a,u=o+"-"+t,l=window.localStorage,r.label=1;case 1:return Date.now()<s?[4,i(30)]:[3,8];case 2:return r.sent(),null!==l.getItem(u)?[3,5]:(f=this.id+"-"+t+"-"+n,[4,i(Math.floor(25*Math.random()))]);case 3:return r.sent(),l.setItem(u,JSON.stringify({id:this.id,iat:n,timeoutKey:f,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,i(30)];case 4:return r.sent(),null!==(d=l.getItem(u))&&(d=JSON.parse(d)).id===this.id&&d.iat===n?(this.acquiredIatSet.add(n),this.refreshLockWhileAcquired(u,n),[2,!0]):[3,7];case 5:return e.lockCorrector(),[4,this.waitForSomethingToChange(s)];case 6:r.sent(),r.label=7;case 7:return n=Date.now()+c(4),[3,1];case 8:return[2,!1]}}))}))},e.prototype.refreshLockWhileAcquired=function(e,t){return n(this,void 0,void 0,(function(){var o=this;return r(this,(function(i){return setTimeout((function(){return n(o,void 0,void 0,(function(){var n,o;return r(this,(function(r){switch(r.label){case 0:return[4,Nc.default().lock(t)];case 1:return r.sent(),this.acquiredIatSet.has(t)?(n=window.localStorage,null===(o=n.getItem(e))?(Nc.default().unlock(t),[2]):((o=JSON.parse(o)).timeRefreshed=Date.now(),n.setItem(e,JSON.stringify(o)),Nc.default().unlock(t),this.refreshLockWhileAcquired(e,t),[2])):(Nc.default().unlock(t),[2])}}))}))}),1e3),[2]}))}))},e.prototype.waitForSomethingToChange=function(t){return n(this,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:return[4,new Promise((function(n){var r=!1,o=Date.now(),i=!1;function c(){if(i||(window.removeEventListener("storage",c),e.removeFromWaiting(c),clearTimeout(a),i=!0),!r){r=!0;var t=50-(Date.now()-o);t>0?setTimeout(n,t):n()}}window.addEventListener("storage",c),e.addToWaiting(c);var a=setTimeout(c,Math.max(0,t-Date.now()))}))];case 1:return n.sent(),[2]}}))}))},e.addToWaiting=function(t){this.removeFromWaiting(t),void 0!==e.waiters&&e.waiters.push(t)},e.removeFromWaiting=function(t){void 0!==e.waiters&&(e.waiters=e.waiters.filter((function(e){return e!==t})))},e.notifyWaiters=function(){void 0!==e.waiters&&e.waiters.slice().forEach((function(e){return e()}))},e.prototype.releaseLock=function(e){return n(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,this.releaseLock__private__(e)];case 1:return[2,t.sent()]}}))}))},e.prototype.releaseLock__private__=function(t){return n(this,void 0,void 0,(function(){var n,i,c;return r(this,(function(r){switch(r.label){case 0:return n=window.localStorage,i=o+"-"+t,null===(c=n.getItem(i))?[2]:(c=JSON.parse(c)).id!==this.id?[3,2]:[4,Nc.default().lock(c.iat)];case 1:r.sent(),this.acquiredIatSet.delete(c.iat),n.removeItem(i),Nc.default().unlock(c.iat),e.notifyWaiters(),r.label=2;case 2:return[2]}}))}))},e.lockCorrector=function(){for(var t=Date.now()-5e3,n=window.localStorage,r=Object.keys(n),i=!1,c=0;c<r.length;c++){var a=r[c];if(a.includes(o)){var s=n.getItem(a);null!==s&&(void 0===(s=JSON.parse(s)).timeRefreshed&&s.timeAcquired<t||void 0!==s.timeRefreshed&&s.timeRefreshed<t)&&(n.removeItem(a),i=!0)}}i&&e.notifyWaiters()},e.waiters=void 0,e}();t.default=a})),Yc=u(Uc),Hc={timeoutInSeconds:60},Jc="memory",Vc=["login_required","consent_required","interaction_required","account_selection_required","access_denied"],Dc={name:"auth0-spa-js",version:"1.22.2"},zc=function(){return Date.now()},Mc=function(e){function n(t,r){var o=e.call(this,r)||this;return o.error=t,o.error_description=r,Object.setPrototypeOf(o,n.prototype),o}return t(n,e),n.fromPayload=function(e){return new n(e.error,e.error_description)},n}(Error),Bc=function(e){function n(t,r,o,i){void 0===i&&(i=null);var c=e.call(this,t,r)||this;return c.state=o,c.appState=i,Object.setPrototypeOf(c,n.prototype),c}return t(n,e),n}(Mc),Qc=function(e){function n(){var t=e.call(this,"timeout","Timeout")||this;return Object.setPrototypeOf(t,n.prototype),t}return t(n,e),n}(Mc),qc=function(e){function n(t){var r=e.call(this)||this;return r.popup=t,Object.setPrototypeOf(r,n.prototype),r}return t(n,e),n}(Qc),$c=function(e){function n(t){var r=e.call(this,"cancelled","Popup closed")||this;return r.popup=t,Object.setPrototypeOf(r,n.prototype),r}return t(n,e),n}(Mc),ea=function(e){function n(t,r,o){var i=e.call(this,t,r)||this;return i.mfa_token=o,Object.setPrototypeOf(i,n.prototype),i}return t(n,e),n}(Mc),ta=function(e){function n(t,r){var o=e.call(this,"missing_refresh_token","Missing Refresh Token (audience: '".concat(fa(t,["default"]),"', scope: '").concat(fa(r),"')"))||this;return o.audience=t,o.scope=r,Object.setPrototypeOf(o,n.prototype),o}return t(n,e),n}(Mc),na=function(e){return new Promise((function(t,n){var r,o=setInterval((function(){e.popup&&e.popup.closed&&(clearInterval(o),clearTimeout(i),window.removeEventListener("message",r,!1),n(new $c(e.popup)))}),1e3),i=setTimeout((function(){clearInterval(o),n(new qc(e.popup)),window.removeEventListener("message",r,!1)}),1e3*(e.timeoutInSeconds||60));r=function(c){if(c.data&&"authorization_response"===c.data.type){if(clearTimeout(i),clearInterval(o),window.removeEventListener("message",r,!1),e.popup.close(),c.data.response.error)return n(Mc.fromPayload(c.data.response));t(c.data.response)}},window.addEventListener("message",r)}))},ra=function(){return window.crypto||window.msCrypto},oa=function(){var e=ra();return e.subtle||e.webkitSubtle},ia=function(){var e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.",t="";return Array.from(ra().getRandomValues(new Uint8Array(43))).forEach((function(n){return t+=e[n%e.length]})),t},ca=function(e){return btoa(e)},aa=function(e){return Object.keys(e).filter((function(t){return void 0!==e[t]})).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")},sa=function(e){return o(void 0,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return t=oa().digest({name:"SHA-256"},(new TextEncoder).encode(e)),window.msCrypto?[2,new Promise((function(e,n){t.oncomplete=function(t){e(t.target.result)},t.onerror=function(e){n(e.error)},t.onabort=function(){n("The digest operation was aborted")}}))]:[4,t];case 1:return[2,n.sent()]}}))}))},ua=function(e){return function(e){return decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))}(e.replace(/_/g,"/").replace(/-/g,"+"))},la=function(e){var t=new Uint8Array(e);return function(e){var t={"+":"-","/":"_","=":""};return e.replace(/[+/=]/g,(function(e){return t[e]}))}(window.btoa(String.fromCharCode.apply(String,a([],c(Array.from(t)),!1))))};function fa(e,t){return void 0===t&&(t=[]),e&&!t.includes(e)?e:""}var da=function(e,t){return o(void 0,void 0,void 0,(function(){var n,r;return i(this,(function(o){switch(o.label){case 0:return[4,(i=e,c=t,c=c||{},new Promise((function(e,t){var n=new XMLHttpRequest,r=[],o=[],a={},s=function(){return{ok:2==(n.status/100|0),statusText:n.statusText,status:n.status,url:n.responseURL,text:function(){return Promise.resolve(n.responseText)},json:function(){return Promise.resolve(n.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([n.response]))},clone:s,headers:{keys:function(){return r},entries:function(){return o},get:function(e){return a[e.toLowerCase()]},has:function(e){return e.toLowerCase()in a}}}};for(var u in n.open(c.method||"get",i,!0),n.onload=function(){n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){r.push(t=t.toLowerCase()),o.push([t,n]),a[t]=a[t]?a[t]+","+n:n})),e(s())},n.onerror=t,n.withCredentials="include"==c.credentials,c.headers)n.setRequestHeader(u,c.headers[u]);n.send(c.body||null)})))];case 1:return n=o.sent(),r={ok:n.ok},[4,n.json()];case 2:return[2,(r.json=o.sent(),r)]}var i,c}))}))},ha=function(e,t,n){return o(void 0,void 0,void 0,(function(){var r,o;return i(this,(function(i){return r=new AbortController,t.signal=r.signal,[2,Promise.race([da(e,t),new Promise((function(e,t){o=setTimeout((function(){r.abort(),t(new Error("Timeout when executing 'fetch'"))}),n)}))]).finally((function(){clearTimeout(o)}))]}))}))},pa=function(e,t,n,r,c,a,s){return o(void 0,void 0,void 0,(function(){return i(this,(function(o){return[2,(i={auth:{audience:t,scope:n},timeout:c,fetchUrl:e,fetchOptions:r,useFormData:s},u=a,new Promise((function(e,t){var n=new MessageChannel;n.port1.onmessage=function(n){n.data.error?t(new Error(n.data.error)):e(n.data)},u.postMessage(i,[n.port2])})))];var i,u}))}))},ya=function(e,t,n,r,c,a,s){return void 0===s&&(s=1e4),o(void 0,void 0,void 0,(function(){return i(this,(function(o){return c?[2,pa(e,t,n,r,s,c,a)]:[2,ha(e,r,s)]}))}))};function va(e,t,n,c,a,s,u){return o(this,void 0,void 0,(function(){var o,l,f,d,h,p,y,v,m;return i(this,(function(i){switch(i.label){case 0:o=null,f=0,i.label=1;case 1:if(!(f<3))return[3,6];i.label=2;case 2:return i.trys.push([2,4,,5]),[4,ya(e,n,c,a,s,u,t)];case 3:return l=i.sent(),o=null,[3,6];case 4:return d=i.sent(),o=d,[3,5];case 5:return f++,[3,1];case 6:if(o)throw o.message=o.message||"Failed to fetch",o;if(h=l.json,p=h.error,y=h.error_description,v=r(h,["error","error_description"]),!l.ok){if(m=y||"HTTP error. Unable to fetch ".concat(e),"mfa_required"===p)throw new ea(p,m,v.mfa_token);throw new Mc(p||"request_error",m)}return[2,v]}}))}))}function ma(e,t){var n=e.baseUrl,c=e.timeout,a=e.audience,s=e.scope,u=e.auth0Client,l=e.useFormData,f=r(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData"]);return o(this,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=l?aa(f):JSON.stringify(f),[4,va("".concat(n,"/oauth/token"),c,a||"default",s,{method:"POST",body:e,headers:{"Content-Type":l?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(u||Dc))}},t,l)];case 1:return[2,r.sent()]}}))}))}var ba=function(e){return Array.from(new Set(e))},ga=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ba(e.join(" ").trim().split(/\s+/)).join(" ")},wa="@@auth0spajs@@",Sa=function(){function e(e,t){void 0===t&&(t=wa),this.prefix=t,this.client_id=e.client_id,this.scope=e.scope,this.audience=e.audience}return e.prototype.toKey=function(){return"".concat(this.prefix,"::").concat(this.client_id,"::").concat(this.audience,"::").concat(this.scope)},e.fromKey=function(t){var n=c(t.split("::"),4),r=n[0],o=n[1],i=n[2];return new e({client_id:o,scope:n[3],audience:i},r)},e.fromCacheEntry=function(t){return new e({scope:t.scope,audience:t.audience,client_id:t.client_id})},e}(),ka=function(){function e(){}return e.prototype.set=function(e,t){localStorage.setItem(e,JSON.stringify(t))},e.prototype.get=function(e){var t=window.localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(e){return}},e.prototype.remove=function(e){localStorage.removeItem(e)},e.prototype.allKeys=function(){return Object.keys(window.localStorage).filter((function(e){return e.startsWith(wa)}))},e}(),_a=function(){var e;this.enclosedCache=(e={},{set:function(t,n){e[t]=n},get:function(t){var n=e[t];if(n)return n},remove:function(t){delete e[t]},allKeys:function(){return Object.keys(e)}})},Ia=function(){function e(e,t,n){this.cache=e,this.keyManifest=t,this.nowProvider=n,this.nowProvider=this.nowProvider||zc}return e.prototype.get=function(e,t){var n;return void 0===t&&(t=0),o(this,void 0,void 0,(function(){var r,o,c,a,s;return i(this,(function(i){switch(i.label){case 0:return[4,this.cache.get(e.toKey())];case 1:return(r=i.sent())?[3,4]:[4,this.getCacheKeys()];case 2:return(o=i.sent())?(c=this.matchExistingCacheKey(e,o))?[4,this.cache.get(c)]:[3,4]:[2];case 3:r=i.sent(),i.label=4;case 4:return r?[4,this.nowProvider()]:[2];case 5:return a=i.sent(),s=Math.floor(a/1e3),r.expiresAt-t<s?r.body.refresh_token?(r.body={refresh_token:r.body.refresh_token},[4,this.cache.set(e.toKey(),r)]):[3,7]:[3,10];case 6:return i.sent(),[2,r.body];case 7:return[4,this.cache.remove(e.toKey())];case 8:return i.sent(),[4,null===(n=this.keyManifest)||void 0===n?void 0:n.remove(e.toKey())];case 9:return i.sent(),[2];case 10:return[2,r.body]}}))}))},e.prototype.set=function(e){var t;return o(this,void 0,void 0,(function(){var n,r;return i(this,(function(o){switch(o.label){case 0:return n=new Sa({client_id:e.client_id,scope:e.scope,audience:e.audience}),[4,this.wrapCacheEntry(e)];case 1:return r=o.sent(),[4,this.cache.set(n.toKey(),r)];case 2:return o.sent(),[4,null===(t=this.keyManifest)||void 0===t?void 0:t.add(n.toKey())];case 3:return o.sent(),[2]}}))}))},e.prototype.clear=function(e){var t;return o(this,void 0,void 0,(function(){var n,r=this;return i(this,(function(c){switch(c.label){case 0:return[4,this.getCacheKeys()];case 1:return(n=c.sent())?[4,n.filter((function(t){return!e||t.includes(e)})).reduce((function(e,t){return o(r,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,e];case 1:return n.sent(),[4,this.cache.remove(t)];case 2:return n.sent(),[2]}}))}))}),Promise.resolve())]:[2];case 2:return c.sent(),[4,null===(t=this.keyManifest)||void 0===t?void 0:t.clear()];case 3:return c.sent(),[2]}}))}))},e.prototype.clearSync=function(e){var t=this,n=this.cache.allKeys();n&&n.filter((function(t){return!e||t.includes(e)})).forEach((function(e){t.cache.remove(e)}))},e.prototype.wrapCacheEntry=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return i(this,(function(o){switch(o.label){case 0:return[4,this.nowProvider()];case 1:return t=o.sent(),n=Math.floor(t/1e3)+e.expires_in,r=Math.min(n,e.decodedToken.claims.exp),[2,{body:e,expiresAt:r}]}}))}))},e.prototype.getCacheKeys=function(){var e;return o(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return this.keyManifest?[4,this.keyManifest.get()]:[3,2];case 1:return t=null===(e=n.sent())||void 0===e?void 0:e.keys,[3,4];case 2:return[4,this.cache.allKeys()];case 3:t=n.sent(),n.label=4;case 4:return[2,t]}}))}))},e.prototype.matchExistingCacheKey=function(e,t){return t.filter((function(t){var n=Sa.fromKey(t),r=new Set(n.scope&&n.scope.split(" ")),o=e.scope.split(" "),i=n.scope&&o.reduce((function(e,t){return e&&r.has(t)}),!0);return n.prefix===wa&&n.client_id===e.client_id&&n.audience===e.audience&&i}))[0]},e}(),xa=function(){function e(e,t){this.storage=e,this.clientId=t,this.storageKey="".concat("a0.spajs.txs",".").concat(this.clientId),this.transaction=this.storage.get(this.storageKey)}return e.prototype.create=function(e){this.transaction=e,this.storage.save(this.storageKey,e,{daysUntilExpire:1})},e.prototype.get=function(){return this.transaction},e.prototype.remove=function(){delete this.transaction,this.storage.remove(this.storageKey)},e}(),Oa=function(e){return"number"==typeof e},Ta=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"],Ca=function(e){if(!e.id_token)throw new Error("ID token is required but missing");var t=function(e){var t=e.split("."),n=c(t,3),r=n[0],o=n[1],i=n[2];if(3!==t.length||!r||!o||!i)throw new Error("ID token could not be decoded");var a=JSON.parse(ua(o)),s={__raw:e},u={};return Object.keys(a).forEach((function(e){s[e]=a[e],Ta.includes(e)||(u[e]=a[e])})),{encoded:{header:r,payload:o,signature:i},header:JSON.parse(ua(r)),claims:s,user:u}}(e.id_token);if(!t.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(t.claims.iss!==e.iss)throw new Error('Issuer (iss) claim mismatch in the ID token; expected "'.concat(e.iss,'", found "').concat(t.claims.iss,'"'));if(!t.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if("RS256"!==t.header.alg)throw new Error('Signature algorithm of "'.concat(t.header.alg,'" is not supported. Expected the ID token to be signed with "RS256".'));if(!t.claims.aud||"string"!=typeof t.claims.aud&&!Array.isArray(t.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e.aud))throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but was not one of "').concat(t.claims.aud.join(", "),'"'));if(t.claims.aud.length>1){if(!t.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(t.claims.azp!==e.aud)throw new Error('Authorized Party (azp) claim mismatch in the ID token; expected "'.concat(e.aud,'", found "').concat(t.claims.azp,'"'))}}else if(t.claims.aud!==e.aud)throw new Error('Audience (aud) claim mismatch in the ID token; expected "'.concat(e.aud,'" but found "').concat(t.claims.aud,'"'));if(e.nonce){if(!t.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(t.claims.nonce!==e.nonce)throw new Error('Nonce (nonce) claim mismatch in the ID token; expected "'.concat(e.nonce,'", found "').concat(t.claims.nonce,'"'))}if(e.max_age&&!Oa(t.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(!Oa(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!Oa(t.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");var n=e.leeway||60,r=new Date(e.now||Date.now()),o=new Date(0),i=new Date(0),a=new Date(0);if(a.setUTCSeconds(parseInt(t.claims.auth_time)+e.max_age+n),o.setUTCSeconds(t.claims.exp+n),i.setUTCSeconds(t.claims.nbf-n),r>o)throw new Error("Expiration Time (exp) claim error in the ID token; current time (".concat(r,") is after expiration time (").concat(o,")"));if(Oa(t.claims.nbf)&&r<i)throw new Error("Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Currrent time (".concat(r,") is before ").concat(i));if(Oa(t.claims.auth_time)&&r>a)throw new Error("Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Currrent time (".concat(r,") is after last auth at ").concat(a));if(e.organizationId){if(!t.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(e.organizationId!==t.claims.org_id)throw new Error('Organization ID (org_id) claim mismatch in the ID token; expected "'.concat(e.organizationId,'", found "').concat(t.claims.org_id,'"'))}return t},ja=l((function(e,t){var n=s&&s.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};function r(e,t){if(!t)return"";var n="; "+e;return!0===t?n:n+"="+t}function o(e,t,n){return encodeURIComponent(e).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(t).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(e){if("number"==typeof e.expires){var t=new Date;t.setMilliseconds(t.getMilliseconds()+864e5*e.expires),e.expires=t}return r("Expires",e.expires?e.expires.toUTCString():"")+r("Domain",e.domain)+r("Path",e.path)+r("Secure",e.secure)+r("SameSite",e.sameSite)}(n)}function i(e){for(var t={},n=e?e.split("; "):[],r=/(%[\dA-F]{2})+/gi,o=0;o<n.length;o++){var i=n[o].split("="),c=i.slice(1).join("=");'"'===c.charAt(0)&&(c=c.slice(1,-1));try{t[i[0].replace(r,decodeURIComponent)]=c.replace(r,decodeURIComponent)}catch(e){}}return t}function c(){return i(document.cookie)}function a(e,t,r){document.cookie=o(e,t,n({path:"/"},r))}t.__esModule=!0,t.encode=o,t.parse=i,t.getAll=c,t.get=function(e){return c()[e]},t.set=a,t.remove=function(e,t){a(e,"",n(n({},t),{expires:-1}))}}));u(ja),ja.encode,ja.parse,ja.getAll;var Ra=ja.get,Ea=ja.set,La=ja.remove,Wa={get:function(e){var t=Ra(e);if(void 0!==t)return JSON.parse(t)},save:function(e,t,n){var r={};"https:"===window.location.protocol&&(r={secure:!0,sameSite:"none"}),(null==n?void 0:n.daysUntilExpire)&&(r.expires=n.daysUntilExpire),(null==n?void 0:n.cookieDomain)&&(r.domain=n.cookieDomain),Ea(e,JSON.stringify(t),r)},remove:function(e){La(e)}},Za="_legacy_",Aa={get:function(e){var t=Wa.get(e);return t||Wa.get("".concat(Za).concat(e))},save:function(e,t,n){var r={};"https:"===window.location.protocol&&(r={secure:!0}),(null==n?void 0:n.daysUntilExpire)&&(r.expires=n.daysUntilExpire),Ea("".concat(Za).concat(e),JSON.stringify(t),r),Wa.save(e,t,n)},remove:function(e){Wa.remove(e),Wa.remove("".concat(Za).concat(e))}},Ga={get:function(e){if("undefined"!=typeof sessionStorage){var t=sessionStorage.getItem(e);if(void 0!==t)return JSON.parse(t)}},save:function(e,t){sessionStorage.setItem(e,JSON.stringify(t))},remove:function(e){sessionStorage.removeItem(e)}};function Pa(e,t,n){var r=void 0===t?null:t,o=function(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),o=0,i=n.length;o<i;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}(e,void 0!==n&&n),i=o.indexOf("\n",10)+1,c=o.substring(i)+(r?"//# sourceMappingURL="+r:""),a=new Blob([c],{type:"application/javascript"});return URL.createObjectURL(a)}var Fa,Xa,Ka,Na,Ua=(Fa="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7dmFyIHQ9ZnVuY3Rpb24oZSxyKXtyZXR1cm4gdD1PYmplY3Quc2V0UHJvdG90eXBlT2Z8fHtfX3Byb3RvX186W119aW5zdGFuY2VvZiBBcnJheSYmZnVuY3Rpb24odCxlKXt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p7ZXJyb3JfZGVzY3JpcHRpb246Xy5tZXNzYWdlfX0pLFszLDhdO2Nhc2UgODpyZXR1cm5bMl19dmFyIGcsbSxrLFB9KSl9KSl9KSl9KCk7Cgo=",Xa=null,Ka=!1,function(e){return Na=Na||Pa(Fa,Xa,Ka),new Worker(Na,e)}),Ya={},Ha=function(){function e(e,t){this.cache=e,this.clientId=t,this.manifestKey=this.createManifestKeyFrom(this.clientId)}return e.prototype.add=function(e){var t;return o(this,void 0,void 0,(function(){var n,r;return i(this,(function(o){switch(o.label){case 0:return r=Set.bind,[4,this.cache.get(this.manifestKey)];case 1:return(n=new(r.apply(Set,[void 0,(null===(t=o.sent())||void 0===t?void 0:t.keys)||[]]))).add(e),[4,this.cache.set(this.manifestKey,{keys:a([],c(n),!1)})];case 2:return o.sent(),[2]}}))}))},e.prototype.remove=function(e){return o(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.cache.get(this.manifestKey)];case 1:return(t=r.sent())?((n=new Set(t.keys)).delete(e),n.size>0?[4,this.cache.set(this.manifestKey,{keys:a([],c(n),!1)})]:[3,3]):[3,5];case 2:case 4:return[2,r.sent()];case 3:return[4,this.cache.remove(this.manifestKey)];case 5:return[2]}}))}))},e.prototype.get=function(){return this.cache.get(this.manifestKey)},e.prototype.clear=function(){return this.cache.remove(this.manifestKey)},e.prototype.createManifestKeyFrom=function(e){return"".concat(wa,"::").concat(e)},e}(),Ja=new Yc,Va="auth0.lock.getTokenSilently",Da="auth0.is.authenticated",za={memory:function(){return(new _a).enclosedCache},localstorage:function(){return new ka}},Ma=function(e){return za[e]},Ba=function(){return!/Trident.*rv:11\.0/.test(navigator.userAgent)},Qa=function(){function e(e){var t,n,o,i;if(this.options=e,"undefined"!=typeof window&&function(){if(!ra())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(void 0===oa())throw new Error("\n auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/master/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.\n ")}(),e.cache&&e.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),e.cache)o=e.cache;else{if(this.cacheLocation=e.cacheLocation||Jc,!Ma(this.cacheLocation))throw new Error('Invalid cache location "'.concat(this.cacheLocation,'"'));o=Ma(this.cacheLocation)()}this.httpTimeoutMs=e.httpTimeoutInSeconds?1e3*e.httpTimeoutInSeconds:1e4,this.cookieStorage=!1===e.legacySameSiteCookie?Wa:Aa,this.orgHintCookieName=(i=this.options.client_id,"auth0.".concat(i,".organization_hint")),this.isAuthenticatedCookieName=function(e){return"auth0.".concat(e,".is.authenticated")}(this.options.client_id),this.sessionCheckExpiryDays=e.sessionCheckExpiryDays||1;var c,a=e.useCookiesForTransactions?this.cookieStorage:Ga;this.scope=this.options.scope,this.transactionManager=new xa(a,this.options.client_id),this.nowProvider=this.options.nowProvider||zc,this.cacheManager=new Ia(o,o.allKeys?null:new Ha(o,this.options.client_id),this.nowProvider),this.domainUrl=(c=this.options.domain,/^https?:\/\//.test(c)?c:"https://".concat(c)),this.tokenIssuer=function(e,t){return e?e.startsWith("https://")?e:"https://".concat(e,"/"):"".concat(t,"/")}(this.options.issuer,this.domainUrl),this.defaultScope=ga("openid",void 0!==(null===(n=null===(t=this.options)||void 0===t?void 0:t.advancedOptions)||void 0===n?void 0:n.defaultScope)?this.options.advancedOptions.defaultScope:"openid profile email"),this.options.useRefreshTokens&&(this.scope=ga(this.scope,"offline_access")),"undefined"!=typeof window&&window.Worker&&this.options.useRefreshTokens&&this.cacheLocation===Jc&&Ba()&&(this.worker=new Ua),this.customOptions=function(e){return e.advancedOptions,e.audience,e.auth0Client,e.authorizeTimeoutInSeconds,e.cacheLocation,e.cache,e.client_id,e.domain,e.issuer,e.leeway,e.max_age,e.nowProvider,e.redirect_uri,e.scope,e.useRefreshTokens,e.useRefreshTokensFallback,e.useCookiesForTransactions,e.useFormData,r(e,["advancedOptions","audience","auth0Client","authorizeTimeoutInSeconds","cacheLocation","cache","client_id","domain","issuer","leeway","max_age","nowProvider","redirect_uri","scope","useRefreshTokens","useRefreshTokensFallback","useCookiesForTransactions","useFormData"])}(e),this.useRefreshTokensFallback=!1!==this.options.useRefreshTokensFallback}return e.prototype._url=function(e){var t=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||Dc)));return"".concat(this.domainUrl).concat(e,"&auth0Client=").concat(t)},e.prototype._getParams=function(e,t,o,i,c){var a=this.options;a.useRefreshTokens,a.useCookiesForTransactions,a.useFormData,a.auth0Client,a.cacheLocation,a.advancedOptions,a.detailedResponse,a.nowProvider,a.authorizeTimeoutInSeconds,a.legacySameSiteCookie,a.sessionCheckExpiryDays,a.domain,a.leeway,a.httpTimeoutInSeconds;var s=r(a,["useRefreshTokens","useCookiesForTransactions","useFormData","auth0Client","cacheLocation","advancedOptions","detailedResponse","nowProvider","authorizeTimeoutInSeconds","legacySameSiteCookie","sessionCheckExpiryDays","domain","leeway","httpTimeoutInSeconds"]);return n(n(n({},s),e),{scope:ga(this.defaultScope,this.scope,e.scope),response_type:"code",response_mode:"query",state:t,nonce:o,redirect_uri:c||this.options.redirect_uri,code_challenge:i,code_challenge_method:"S256"})},e.prototype._authorizeUrl=function(e){return this._url("/authorize?".concat(aa(e)))},e.prototype._verifyIdToken=function(e,t,n){return o(this,void 0,void 0,(function(){var r;return i(this,(function(o){switch(o.label){case 0:return[4,this.nowProvider()];case 1:return r=o.sent(),[2,Ca({iss:this.tokenIssuer,aud:this.options.client_id,id_token:e,nonce:t,organizationId:n,leeway:this.options.leeway,max_age:this._parseNumber(this.options.max_age),now:r})]}}))}))},e.prototype._parseNumber=function(e){return"string"!=typeof e?e:parseInt(e,10)||void 0},e.prototype._processOrgIdHint=function(e){e?this.cookieStorage.save(this.orgHintCookieName,e,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName)},e.prototype.buildAuthorizeUrl=function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){var t,o,c,a,s,u,l,f,d,h,p,y;return i(this,(function(i){switch(i.label){case 0:return t=e.redirect_uri,o=e.appState,c=r(e,["redirect_uri","appState"]),a=ca(ia()),s=ca(ia()),u=ia(),[4,sa(u)];case 1:return l=i.sent(),f=la(l),d=e.fragment?"#".concat(e.fragment):"",h=this._getParams(c,a,s,f,t),p=this._authorizeUrl(h),y=e.organization||this.options.organization,this.transactionManager.create(n({nonce:s,code_verifier:u,appState:o,scope:h.scope,audience:h.audience||"default",redirect_uri:h.redirect_uri,state:a},y&&{organizationId:y})),[2,p+d]}}))}))},e.prototype.loginWithPopup=function(e,t){return o(this,void 0,void 0,(function(){var o,c,a,s,u,l,f,d,h,p,y,v,m;return i(this,(function(i){switch(i.label){case 0:if(e=e||{},!(t=t||{}).popup&&(t.popup=function(e){var t=window.screenX+(window.innerWidth-400)/2,n=window.screenY+(window.innerHeight-600)/2;return window.open(e,"auth0:authorize:popup","left=".concat(t,",top=").concat(n,",width=").concat(400,",height=").concat(600,",resizable,scrollbars=yes,status=1"))}(""),!t.popup))throw new Error("Unable to open a popup for loginWithPopup - window.open returned `null`");return o=r(e,[]),c=ca(ia()),a=ca(ia()),s=ia(),[4,sa(s)];case 1:return u=i.sent(),l=la(u),f=this._getParams(o,c,a,l,this.options.redirect_uri||window.location.origin),d=this._authorizeUrl(n(n({},f),{response_mode:"web_message"})),t.popup.location.href=d,[4,na(n(n({},t),{timeoutInSeconds:t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}))];case 2:if(h=i.sent(),c!==h.state)throw new Error("Invalid state");return[4,ma({audience:f.audience,scope:f.scope,baseUrl:this.domainUrl,client_id:this.options.client_id,code_verifier:s,code:h.code,grant_type:"authorization_code",redirect_uri:f.redirect_uri,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},this.worker)];case 3:return p=i.sent(),y=e.organization||this.options.organization,[4,this._verifyIdToken(p.id_token,a,y)];case 4:return v=i.sent(),m=n(n({},p),{decodedToken:v,scope:f.scope,audience:f.audience||"default",client_id:this.options.client_id}),[4,this.cacheManager.set(m)];case 5:return i.sent(),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgIdHint(v.claims.org_id),[2]}}))}))},e.prototype.getUser=function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){var t,n,r;return i(this,(function(o){switch(o.label){case 0:return t=e.audience||this.options.audience||"default",n=ga(this.defaultScope,this.scope,e.scope),[4,this.cacheManager.get(new Sa({client_id:this.options.client_id,audience:t,scope:n}))];case 1:return[2,(r=o.sent())&&r.decodedToken&&r.decodedToken.user]}}))}))},e.prototype.getIdTokenClaims=function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){var t,n,r;return i(this,(function(o){switch(o.label){case 0:return t=e.audience||this.options.audience||"default",n=ga(this.defaultScope,this.scope,e.scope),[4,this.cacheManager.get(new Sa({client_id:this.options.client_id,audience:t,scope:n}))];case 1:return[2,(r=o.sent())&&r.decodedToken&&r.decodedToken.claims]}}))}))},e.prototype.loginWithRedirect=function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){var t,n,o;return i(this,(function(i){switch(i.label){case 0:return t=e.redirectMethod,n=r(e,["redirectMethod"]),[4,this.buildAuthorizeUrl(n)];case 1:return o=i.sent(),window.location[t||"assign"](o),[2]}}))}))},e.prototype.handleRedirectCallback=function(e){return void 0===e&&(e=window.location.href),o(this,void 0,void 0,(function(){var t,r,o,a,s,u,l,f,d,h;return i(this,(function(i){switch(i.label){case 0:if(0===(t=e.split("?").slice(1)).length)throw new Error("There are no query params available for parsing.");if(r=function(e){e.indexOf("#")>-1&&(e=e.substr(0,e.indexOf("#")));var t=e.split("&"),n={};return t.forEach((function(e){var t=c(e.split("="),2),r=t[0],o=t[1];n[r]=decodeURIComponent(o)})),n.expires_in&&(n.expires_in=parseInt(n.expires_in)),n}(t.join("")),o=r.state,a=r.code,s=r.error,u=r.error_description,!(l=this.transactionManager.get()))throw new Error("Invalid state");if(this.transactionManager.remove(),s)throw new Bc(s,u,o,l.appState);if(!l.code_verifier||l.state&&l.state!==o)throw new Error("Invalid state");return f={audience:l.audience,scope:l.scope,baseUrl:this.domainUrl,client_id:this.options.client_id,code_verifier:l.code_verifier,grant_type:"authorization_code",code:a,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},void 0!==l.redirect_uri&&(f.redirect_uri=l.redirect_uri),[4,ma(f,this.worker)];case 1:return d=i.sent(),[4,this._verifyIdToken(d.id_token,l.nonce,l.organizationId)];case 2:return h=i.sent(),[4,this.cacheManager.set(n(n(n(n({},d),{decodedToken:h,audience:l.audience,scope:l.scope}),d.scope?{oauthTokenScope:d.scope}:null),{client_id:this.options.client_id}))];case 3:return i.sent(),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgIdHint(h.claims.org_id),[2,{appState:l.appState}]}}))}))},e.prototype.checkSession=function(e){return o(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get(Da))return[2];this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(Da)}n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.getTokenSilently(e)];case 2:return n.sent(),[3,4];case 3:if(t=n.sent(),!Vc.includes(t.error))throw t;return[3,4];case 4:return[2]}}))}))},e.prototype.getTokenSilently=function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){var t,o,c,a=this;return i(this,(function(i){return t=n(n({audience:this.options.audience,ignoreCache:!1},e),{scope:ga(this.defaultScope,this.scope,e.scope)}),o=t.ignoreCache,c=r(t,["ignoreCache"]),[2,(s=function(){return a._getTokenSilently(n({ignoreCache:o},c))},u="".concat(this.options.client_id,"::").concat(c.audience,"::").concat(c.scope),l=Ya[u],l||(l=s().finally((function(){delete Ya[u],l=null})),Ya[u]=l),l)];var s,u,l}))}))},e.prototype._getTokenSilently=function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){var t,c,a,s,u,l,f,d,h;return i(this,(function(p){switch(p.label){case 0:return t=e.ignoreCache,c=r(e,["ignoreCache"]),t?[3,2]:[4,this._getEntryFromCache({scope:c.scope,audience:c.audience||"default",client_id:this.options.client_id,getDetailedEntry:e.detailedResponse})];case 1:if(a=p.sent())return[2,a];p.label=2;case 2:return[4,(y=function(){return Ja.acquireLock(Va,5e3)},v=10,void 0===v&&(v=3),o(void 0,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:e=0,t.label=1;case 1:return e<v?[4,y()]:[3,4];case 2:if(t.sent())return[2,!0];t.label=3;case 3:return e++,[3,1];case 4:return[2,!1]}}))})))];case 3:if(!p.sent())return[3,15];p.label=4;case 4:return p.trys.push([4,,12,14]),t?[3,6]:[4,this._getEntryFromCache({scope:c.scope,audience:c.audience||"default",client_id:this.options.client_id,getDetailedEntry:e.detailedResponse})];case 5:if(a=p.sent())return[2,a];p.label=6;case 6:return this.options.useRefreshTokens?[4,this._getTokenUsingRefreshToken(c)]:[3,8];case 7:return u=p.sent(),[3,10];case 8:return[4,this._getTokenFromIFrame(c)];case 9:u=p.sent(),p.label=10;case 10:return s=u,[4,this.cacheManager.set(n({client_id:this.options.client_id},s))];case 11:return p.sent(),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),e.detailedResponse?(l=s.id_token,f=s.access_token,d=s.oauthTokenScope,h=s.expires_in,[2,n(n({id_token:l,access_token:f},d?{scope:d}:null),{expires_in:h})]):[2,s.access_token];case 12:return[4,Ja.releaseLock(Va)];case 13:return p.sent(),[7];case 14:return[3,16];case 15:throw new Qc;case 16:return[2]}var y,v}))}))},e.prototype.getTokenWithPopup=function(e,t){return void 0===e&&(e={}),void 0===t&&(t={}),o(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return e.audience=e.audience||this.options.audience,e.scope=ga(this.defaultScope,this.scope,e.scope),t=n(n({},Hc),t),[4,this.loginWithPopup(e,t)];case 1:return r.sent(),[4,this.cacheManager.get(new Sa({scope:e.scope,audience:e.audience||"default",client_id:this.options.client_id}))];case 2:return[2,r.sent().access_token]}}))}))},e.prototype.isAuthenticated=function(){return o(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.getUser()];case 1:return[2,!!e.sent()]}}))}))},e.prototype.buildLogoutUrl=function(e){void 0===e&&(e={}),null!==e.client_id?e.client_id=e.client_id||this.options.client_id:delete e.client_id;var t=e.federated,n=r(e,["federated"]),o=t?"&federated":"";return this._url("/v2/logout?".concat(aa(n)))+o},e.prototype.logout=function(e){var t=this;void 0===e&&(e={});var n=e.localOnly,o=r(e,["localOnly"]);if(n&&o.federated)throw new Error("It is invalid to set both the `federated` and `localOnly` options to `true`");var i=function(){if(t.cookieStorage.remove(t.orgHintCookieName),t.cookieStorage.remove(t.isAuthenticatedCookieName),!n){var e=t.buildLogoutUrl(o);window.location.assign(e)}};if(this.options.cache)return this.cacheManager.clear().then((function(){return i()}));this.cacheManager.clearSync(),i()},e.prototype._getTokenFromIFrame=function(e){return o(this,void 0,void 0,(function(){var t,o,c,a,s,u,l,f,d,h,p,y,v,m,b,g,w;return i(this,(function(i){switch(i.label){case 0:return t=ca(ia()),o=ca(ia()),c=ia(),[4,sa(c)];case 1:a=i.sent(),s=la(a),u=r(e,["detailedResponse"]),l=this._getParams(u,t,o,s,e.redirect_uri||this.options.redirect_uri||window.location.origin),(f=this.cookieStorage.get(this.orgHintCookieName))&&!l.organization&&(l.organization=f),d=this._authorizeUrl(n(n({},l),{prompt:"none",response_mode:"web_message"})),i.label=2;case 2:if(i.trys.push([2,6,,7]),window.crossOriginIsolated)throw new Mc("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");return h=e.timeoutInSeconds||this.options.authorizeTimeoutInSeconds,[4,(S=d,k=this.domainUrl,_=h,void 0===_&&(_=60),new Promise((function(e,t){var n=window.document.createElement("iframe");n.setAttribute("width","0"),n.setAttribute("height","0"),n.style.display="none";var r,o=function(){window.document.body.contains(n)&&(window.document.body.removeChild(n),window.removeEventListener("message",r,!1))},i=setTimeout((function(){t(new Qc),o()}),1e3*_);r=function(n){if(n.origin==k&&n.data&&"authorization_response"===n.data.type){var c=n.source;c&&c.close(),n.data.response.error?t(Mc.fromPayload(n.data.response)):e(n.data.response),clearTimeout(i),window.removeEventListener("message",r,!1),setTimeout(o,2e3)}},window.addEventListener("message",r,!1),window.document.body.appendChild(n),n.setAttribute("src",S)})))];case 3:if(p=i.sent(),t!==p.state)throw new Error("Invalid state");return y=e.scope,v=e.audience,m=r(e,["scope","audience","redirect_uri","ignoreCache","timeoutInSeconds","detailedResponse"]),[4,ma(n(n(n({},this.customOptions),m),{scope:y,audience:v,baseUrl:this.domainUrl,client_id:this.options.client_id,code_verifier:c,code:p.code,grant_type:"authorization_code",redirect_uri:l.redirect_uri,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:m.timeout||this.httpTimeoutMs}),this.worker)];case 4:return b=i.sent(),[4,this._verifyIdToken(b.id_token,o)];case 5:return g=i.sent(),this._processOrgIdHint(g.claims.org_id),[2,n(n({},b),{decodedToken:g,scope:l.scope,oauthTokenScope:b.scope,audience:l.audience||"default"})];case 6:throw"login_required"===(w=i.sent()).error&&this.logout({localOnly:!0}),w;case 7:return[2]}var S,k,_}))}))},e.prototype._getTokenUsingRefreshToken=function(e){return o(this,void 0,void 0,(function(){var t,o,c,a,s,u,l,f,d;return i(this,(function(i){switch(i.label){case 0:return e.scope=ga(this.defaultScope,this.options.scope,e.scope),[4,this.cacheManager.get(new Sa({scope:e.scope,audience:e.audience||"default",client_id:this.options.client_id}))];case 1:return(t=i.sent())&&t.refresh_token||this.worker?[3,4]:this.useRefreshTokensFallback?[4,this._getTokenFromIFrame(e)]:[3,3];case 2:return[2,i.sent()];case 3:throw new ta(e.audience||"default",e.scope);case 4:o=e.redirect_uri||this.options.redirect_uri||window.location.origin,a=e.scope,s=e.audience,u=r(e,["scope","audience","ignoreCache","timeoutInSeconds","detailedResponse"]),l="number"==typeof e.timeoutInSeconds?1e3*e.timeoutInSeconds:null,i.label=5;case 5:return i.trys.push([5,7,,10]),[4,ma(n(n(n(n(n({},this.customOptions),u),{audience:s,scope:a,baseUrl:this.domainUrl,client_id:this.options.client_id,grant_type:"refresh_token",refresh_token:t&&t.refresh_token,redirect_uri:o}),l&&{timeout:l}),{auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs}),this.worker)];case 6:return c=i.sent(),[3,10];case 7:return((f=i.sent()).message.indexOf("Missing Refresh Token")>-1||f.message&&f.message.indexOf("invalid refresh token")>-1)&&this.useRefreshTokensFallback?[4,this._getTokenFromIFrame(e)]:[3,9];case 8:return[2,i.sent()];case 9:throw f;case 10:return[4,this._verifyIdToken(c.id_token)];case 11:return d=i.sent(),[2,n(n({},c),{decodedToken:d,scope:e.scope,oauthTokenScope:c.scope,audience:e.audience||"default"})]}}))}))},e.prototype._getEntryFromCache=function(e){var t=e.scope,r=e.audience,c=e.client_id,a=e.getDetailedEntry,s=void 0!==a&&a;return o(this,void 0,void 0,(function(){var e,o,a,u,l;return i(this,(function(i){switch(i.label){case 0:return[4,this.cacheManager.get(new Sa({scope:t,audience:r,client_id:c}),60)];case 1:return(e=i.sent())&&e.access_token?s?(o=e.id_token,a=e.access_token,u=e.oauthTokenScope,l=e.expires_in,[2,n(n({id_token:o,access_token:a},u?{scope:u}:null),{expires_in:l})]):[2,e.access_token]:[2]}}))}))},e}();function qa(e){return o(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,(t=new Qa(e)).checkSession()];case 1:return n.sent(),[2,t]}}))}))}var $a=qa;return $a.Auth0Client=Qa,$a.createAuth0Client=qa,$a.GenericError=Mc,$a.AuthenticationError=Bc,$a.TimeoutError=Qc,$a.PopupTimeoutError=qc,$a.MfaRequiredError=ea,$a})),"Auth0Client"in this&&this.console&&this.console.warn&&this.console.warn("Auth0Client already declared on the global namespace"),this&&this.createAuth0Client&&(this.Auth0Client=this.Auth0Client||this.createAuth0Client.Auth0Client);
2
2
  //# sourceMappingURL=auth0-spa-js.production.js.map